(define-relation Do (?a ?s1 ?s2) ((Arity 3) (nth-domain 1 action) (nth-domain 2 situation) (nth-domain 3 situation)) :axiom (forall (?a) (exists (?Phi) (complex_action_def ?a ?Phi))) (define-relation subaction (?a1 ?a2) ((Arity 2) (nth-domain 1 action) (nth-domain 2 action)) :axioms (forall (?a) (subaction ?a ?a)) (forall (?a1 ?a2 ?a3) (=> (and (subaction ?a1 ?a2) (subaction ?a2 ?a3)) (subaction ?a1 ?a3))) (forall (?a1 ?a2 ?a3) (=> (and (subaction ?a2 ?a1) (subaction ?a3 ?a1)) (exists (?a) (and (subaction ?a2 ?a) (subaction ?a3 ?a) (subaction ?a ?a1))))) (define-relation primitive (?a) ((Arity 1) (nth-domain 1 action)) :axioms (forall (?a) (<=> (primitive ?a) (not (exists (?a1) (subaction ?a1 ?a)))) (forall (?a ?s1 ?s2) (=> (primitive ?a) (<=> (Do ?a ?s1 ?s2) (and (Poss ?a ?s) (= ?s2 (do ?a ?s1)))))) (define-relation DoT (?a ?t1 ?t2) ((Arity 3) (nth-domain 1 action) (nth-domain 2 time) (nth-domain 3 time)) :def (exists (?s1 ?s2) (and (Do ?a ?s1 ?s2) (= (start ?s1) ?t1) (= (start ?s2) ?t2))) (define-relation duration (?a ?t) ((Arity 2) (nth-domain 1 action) (nth-domain 2 time)) :def (=> (DoT ?a ?t1 ?t2) (= ?t (- ?t2 ?t1))) (define-relation Occurs (?a ?s1 ?s2) ((Arity 3) (nth-domain 1 action) (nth-domain 2 situation) (nth-domain 3 situation)) :def (and (Do ?a ?s1 ?s2) (actual ?s2)) (define-relation OccursT (?a ?t1 ?t2) ((Arity 3) (nth-domain 1 action) (nth-domain 2 time) (nth-domain 3 time)) :def (exists (?s1 ?s2) (and (Occurs ?a ?s1 ?s2) (= (start ?s1) ?t1) (= (start ?s2) ?t2))) (define-relation Occurs^B (?a ?s1 ?s2 ?b) ((Arity 4) (nth-domain 1 action) (nth-domain 2 situation) (nth-domain 3 situation) (nth-domain 4 branch)) :def (and (Do ?a ?s1 ?s2) (branch ?s2 ?b) (feasible_branch ?b))