People walk beside a stone wall.
People walk by a castle
A stone wall doesn't imply that it is a castle.
exists e1 x1 x2 x3.(beside(e1,x2) & n_wall(x2) & of(x2,x3) & n_stone(x3) & Actor(e1,x1) & v_walk(e1) & n_people(x1))
exists e1 x1 x2 x3.(a_topic(x1) & Actor(e1,x3) & n_castle(x3) & Theme(e1,x2) & v_walk(e1) & (x1 = x2) & n_people(x1))