switch(1..3). action(tog(X)) :- switch(X). #program dynamic. % Effect axioms c(sw(X),up) :- 'h(sw(X),down), o(tog(X)). c(sw(X),down) :- 'h(sw(X),up), o(tog(X)). c(light,off) :- 'h(light,on), o(tog(_)). c(light,on) :- 'h(light,off), o(tog(_)). % Executability constraints: none in this case % Anything caused, also holds h(F,V) :- c(F,V). c(F) :- c(F,V). % Inertia h(F,V) :- 'h(F,V), not c(F). % Action generation 1 { o(A): _action(A) } 1.