Регистрация | Вход
create task t1
t1 has object r
r has attribute xr.x has view fieldr.x has type integerr.x has value 1
r has attribute yr.y has view fieldr.y has type integerr.y has value 1
r has action xir.xi has pattern ^MOVE_RIGHTr.xi leads-to r.x +
r has action yir.yi has pattern ^MOVE_UPr.yi leads-to r.y +
t1 has aim r.x = 10t1 has aim r.y = 10
run t1
r.xi leads-to r.x +
r.xi has pattern ^MOVE_RIGHT
r.yi leads-to r.y +r.yi has pattern ^MOVE_UP
create type-group tg1tg1 has object-type Field Field has attribute x Field.x has view set Field.x has type integer --Field.x can-not-be < 1 --Field.x can-not-be > 10 Field has attribute y Field.y has view set Field.y has type integer --Field.y can-not-be < 1 --Field.y can-not-be > 10tg1 has object-type Robot Robot has attribute x Robot.x has view field Robot.x has type integer --Robot.x belongs-to Field.x Robot.x has pattern ^X$valY*=ROBOT Robot has attribute y Robot.y has view field Robot.y has type integer --Robot.y belongs-to Field.y Robot.y has pattern ^X*Y$val=ROBOT Robot has action xi Robot.xi has pattern ^MOVE_RIGHT Robot.xi leads-to Robot.x + Robot has action xd Robot.xd has pattern ^MOVE_LEFT Robot.xd leads-to Robot.x - Robot has action yi Robot.yi has pattern ^MOVE_UP Robot.yi leads-to Robot.y + Robot has action yd Robot.yd has pattern ^MOVE_DOWN Robot.yd leads-to Robot.y -create model m1m1 has object f f has type tg1.Fieldm1 has object r r has type tg1.Robotcreate task t1t1 has reference f f is m1.ft1 has reference r r is m1.r r.x has value 1 r.y has value 1t1 has aim r.x = 10t1 has aim r.y = 10run t1exit