如何在下面的谓词中编写'set'而不是'some'关键字
pred foreward [rov: Robot, d: Direction, t,t': Time] {
-- preconditions
-- rover is on
is_on[rov, t]
-- d is rover's direction
rov.dir.t = d
let np = next_pos[rov.pos.t, d] | {
-- precondition
some np //<------------- here changes are needed
--postcondition
rov.pos.t' = np
}
-- frame conditions
-- all rovers stay on or off as they were
no_on_changes[Robot, t, t']
-- No rover changes direction
no_direction_changes[Robot, t, t']
-- No other rover changes position
no_position_changes[Robot - rov, t, t']
}
答案 0 :(得分:0)
如果你的意思是# np >= 0
,那么这总是正确的,因为你不能有负数的np&#39;