-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from whitemech/fix/pddl-generation
Fix: Remove PDDL4J dependency
- Loading branch information
Showing
25 changed files
with
722 additions
and
2,566 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,66 +1,53 @@ | ||
(define (domain alignment) | ||
(:requirements :typing :conditional-effects :action-costs) | ||
(:types | ||
dummy_act - ACTIVITY | ||
activity - OBJECT | ||
automaton - OBJECT | ||
automaton_state - STATE | ||
trace_state - STATE | ||
) | ||
(:predicates | ||
(trace_trans ?t1 - TRACE_STATE ?e - ACTIVITY ?t2 - TRACE_STATE) | ||
(cur_state ?a - AUTOMATON ?s - AUTOMATON_STATE) | ||
(cur_state_trace ?t - TRACE_STATE) | ||
(automaton_trans ?a - AUTOMATON ?s1 - AUTOMATON_STATE ?e - ACTIVITY ?s2 - AUTOMATON_STATE) | ||
(final_state ?s - AUTOMATON_STATE) | ||
(dummy_trans ?a - AUTOMATON ?s1 - AUTOMATON_STATE ?de - DUMMY_ACT ?s2 - AUTOMATON_STATE) | ||
) | ||
(:functions | ||
(total-cost) | ||
) | ||
(:action sync | ||
:parameters (?t1 - TRACE_STATE ?e - ACTIVITY ?t2 - TRACE_STATE) | ||
:precondition | ||
(and (cur_state ?t1) | ||
(trace_trans ?t1 ?e ?t2)) | ||
:effect | ||
(and (not (cur_state_trace ?t1)) | ||
(cur_state_trace ?t2) | ||
(forall (?a - AUTOMATON ?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?a ?s1) | ||
(automaton_trans ?a ?s1 ?e ?s2)) (and (not (cur_state ?a ?s1)) | ||
(cur_state ?a ?s2))))) | ||
) | ||
(:action add | ||
:parameters (?e - ACTIVITY) | ||
:precondition | ||
(and) | ||
:effect | ||
(and (increase (total-cost) 1.0) | ||
(forall (?a - AUTOMATON ?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?a ?s1) | ||
(automaton_trans ?a ?s1 ?e ?s2)) (and (not (cur_state ?a ?s1)) | ||
(cur_state ?a ?s2))))) | ||
) | ||
(:action del | ||
:parameters (?t1 - TRACE_STATE ?e - ACTIVITY ?t2 - TRACE_STATE) | ||
:precondition | ||
(and (cur_state_trace ?t1) | ||
(trace_trans ?t1 ?e ?t2)) | ||
:effect | ||
(and (increase (total-cost) 1.0) | ||
(not (cur_state_trace ?t1)) | ||
(cur_state_trace ?t2)) | ||
) | ||
(:action goto-goal | ||
:parameters (?t1 - TRACE_STATE ?de - DUMMY_ACT) | ||
:precondition | ||
(and (cur_state_trace ?t1) | ||
(final_state ?t1)) | ||
:effect | ||
(forall (?a - AUTOMATON ?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?a ?s1) | ||
(dummy_trans ?a ?s1 ?de ?s2)) (and (not (cur_state ?a ?s1)) | ||
(cur_state ?a ?s2)))) | ||
) | ||
(:requirements :typing :disjunctive-preconditions :conditional-effects :universal-preconditions :action-costs) | ||
(:types trace_state automaton_state - state act dummy_act - activity automaton) | ||
(:predicates | ||
(trace_trans ?t1 - trace_state ?e - act ?t2 - trace_state) | ||
(cur_state ?a - automaton ?s - automaton_state) | ||
(cur_state_trace ?t - trace_state) | ||
(automaton_trans ?a - automaton ?s1 - automaton_state ?e - act ?s2 - automaton_state) | ||
(final_state ?s - trace_state) | ||
(dummy_trans ?a - automaton ?s1 - automaton_state ?de - dummy_act ?s2 - automaton_state) | ||
) | ||
(:functions (total-cost)) | ||
|
||
(:action sync | ||
:parameters (?t1 - trace_state ?e - act ?t2 - trace_state) | ||
:precondition (and (cur_state_trace ?t1) (trace_trans ?t1 ?e ?t2)) | ||
:effect (and | ||
(not (cur_state_trace ?t1)) (cur_state_trace ?t2) | ||
(forall (?a - automaton ?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?a ?s1) (automaton_trans ?a ?s1 ?e ?s2)) | ||
(and (not (cur_state ?a ?s1)) (cur_state ?a ?s2))) | ||
) | ||
) | ||
) | ||
(:action add | ||
:parameters (?e - act) | ||
:effect (and | ||
(increase (total-cost) 1) | ||
(forall (?a - automaton ?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?a ?s1) (automaton_trans ?a ?s1 ?e ?s2)) | ||
(and (not (cur_state ?a ?s1)) (cur_state ?a ?s2))) | ||
) | ||
) | ||
) | ||
(:action del | ||
:parameters (?t1 - trace_state ?e - act ?t2 - trace_state) | ||
:precondition (and (cur_state_trace ?t1) (trace_trans ?t1 ?e ?t2)) | ||
:effect (and | ||
(increase (total-cost) 1) | ||
(not (cur_state_trace ?t1)) (cur_state_trace ?t2) | ||
) | ||
) | ||
(:action goto-goal | ||
:parameters (?t1 - trace_state ?de - dummy_act) | ||
:precondition (and (cur_state_trace ?t1) (final_state ?t1)) | ||
:effect | ||
(forall (?a - automaton ?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?a ?s1) (dummy_trans ?a ?s1 ?de ?s2)) | ||
(and (not (cur_state ?a ?s1)) (cur_state ?a ?s2)) | ||
) | ||
) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,64 +1,51 @@ | ||
(define (domain alignment) | ||
(:requirements :typing :conditional-effects :action-costs) | ||
(:types | ||
dummy_act - ACTIVITY | ||
act - ACTIVITY | ||
automaton_state - STATE | ||
trace_state - STATE | ||
) | ||
(:predicates | ||
(trace ?t1 - TRACE_STATE ?e - ACT ?t2 - TRACE_STATE) | ||
(cur_state ?s - STATE) | ||
(automaton ?s1 - AUTOMATON_STATE ?e - ACT ?s2 - AUTOMATON_STATE) | ||
(final_state ?s - STATE) | ||
(dummy_trans ?s1 - AUTOMATON_STATE ?de - DUMMY_ACT ?s2 - AUTOMATON_STATE) | ||
) | ||
(:functions | ||
(total-cost) | ||
) | ||
(:action sync | ||
:parameters (?t1 - TRACE_STATE ?e - ACT ?t2 - TRACE_STATE) | ||
:precondition | ||
(and (cur_state ?t1) | ||
(trace ?t1 ?e ?t2)) | ||
:effect | ||
(and (not (cur_state ?t1)) | ||
(cur_state ?t2) | ||
(forall (?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?s1) | ||
(automaton ?s1 ?e ?s2)) (and (not (cur_state ?s1)) | ||
(cur_state ?s2))))) | ||
) | ||
(:action add | ||
:parameters (?e - ACT) | ||
:precondition | ||
(and) | ||
:effect | ||
(and (increase (total-cost) 1.0) | ||
(forall (?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?s1) | ||
(automaton ?s1 ?e ?s2)) (and (not (cur_state ?s1)) | ||
(cur_state ?s2))))) | ||
) | ||
(:action del | ||
:parameters (?t1 - TRACE_STATE ?e - ACT ?t2 - TRACE_STATE) | ||
:precondition | ||
(and (cur_state ?t1) | ||
(trace ?t1 ?e ?t2)) | ||
:effect | ||
(and (increase (total-cost) 1.0) | ||
(not (cur_state ?t1)) | ||
(cur_state ?t2)) | ||
) | ||
(:action goto-goal | ||
:parameters (?t1 - TRACE_STATE ?de - DUMMY_ACT) | ||
:precondition | ||
(and (cur_state ?t1) | ||
(final_state ?t1)) | ||
:effect | ||
(forall (?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?s1) | ||
(dummy_trans ?s1 ?de ?s2)) (and (not (cur_state ?s1)) | ||
(cur_state ?s2)))) | ||
) | ||
(:requirements :typing :disjunctive-preconditions :conditional-effects :universal-preconditions :action-costs) | ||
(:types trace_state automaton_state - state act dummy_act - activity) | ||
(:predicates | ||
(trace ?t1 - trace_state ?e - act ?t2 - trace_state) | ||
(cur_state ?s - state) | ||
(automaton ?s1 - automaton_state ?e - act ?s2 - automaton_state) | ||
(final_state ?s - state) | ||
(dummy_trans ?s1 - automaton_state ?de - dummy_act ?s2 - automaton_state) | ||
) | ||
(:functions (total-cost)) | ||
|
||
(:action sync | ||
:parameters (?t1 - trace_state ?e - act ?t2 - trace_state) | ||
:precondition (and (cur_state ?t1) (trace ?t1 ?e ?t2)) | ||
:effect (and | ||
(not (cur_state ?t1)) (cur_state ?t2) | ||
(forall (?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?s1) (automaton ?s1 ?e ?s2)) | ||
(and (not (cur_state ?s1)) (cur_state ?s2))) | ||
) | ||
) | ||
) | ||
(:action add | ||
:parameters (?e - act) | ||
:effect (and | ||
(increase (total-cost) 1) | ||
(forall (?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?s1) (automaton ?s1 ?e ?s2)) | ||
(and (not (cur_state ?s1)) (cur_state ?s2))) | ||
) | ||
) | ||
) | ||
(:action del | ||
:parameters (?t1 - trace_state ?e - act ?t2 - trace_state) | ||
:precondition (and (cur_state ?t1) (trace ?t1 ?e ?t2)) | ||
:effect (and | ||
(increase (total-cost) 1) | ||
(not (cur_state ?t1)) (cur_state ?t2) | ||
) | ||
) | ||
(:action goto-goal | ||
:parameters (?t1 - trace_state ?de - dummy_act) | ||
:precondition (and (cur_state ?t1) (final_state ?t1)) | ||
:effect | ||
(forall (?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?s1) (dummy_trans ?s1 ?de ?s2)) | ||
(and (not (cur_state ?s1)) (cur_state ?s2))) | ||
) | ||
) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,42 @@ | ||
(define (domain alignment) | ||
(:requirements :typing :conditional-effects :universal-preconditions :action-costs) | ||
(:types | ||
automaton_state - STATE | ||
trace_state - STATE | ||
state - OBJECT | ||
automaton - OBJECT | ||
activity - OBJECT | ||
) | ||
(:predicates | ||
(trace_trans ?t1 - TRACE_STATE ?e - ACTIVITY ?t2 - TRACE_STATE) | ||
(cur_state ?a - AUTOMATON ?s - AUTOMATON_STATE) | ||
(cur_state_trace ?t - TRACE_STATE) | ||
(automaton_trans ?a - AUTOMATON ?s1 - AUTOMATON_STATE ?e - ACTIVITY ?s2 - AUTOMATON_STATE) | ||
(final_state ?a - AUTOMATON ?s - AUTOMATON_STATE) | ||
) | ||
(:functions | ||
(total-cost) | ||
) | ||
(:action sync | ||
:parameters (?t1 - TRACE_STATE ?e - ACTIVITY ?t2 - TRACE_STATE) | ||
:precondition | ||
(and (cur_state_trace ?t1) | ||
(trace_trans ?t1 ?e ?t2)) | ||
:effect | ||
(and (not (cur_state_trace ?t1)) | ||
(cur_state_trace ?t2) | ||
(forall (?a - AUTOMATON ?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?a ?s1) | ||
(automaton_trans ?a ?s1 ?e ?s2)) (and (not (cur_state ?a ?s1)) | ||
(cur_state ?a ?s2))))) | ||
) | ||
(:action add | ||
:parameters (?e - ACTIVITY) | ||
:precondition | ||
(and) | ||
:effect | ||
(and (increase (total-cost) 1.0) | ||
(forall (?a - AUTOMATON ?s1 ?s2 - AUTOMATON_STATE) | ||
(when (and (cur_state ?a ?s1) | ||
(automaton_trans ?a ?s1 ?e ?s2)) (and (not (cur_state ?a ?s1)) | ||
(cur_state ?a ?s2))))) | ||
) | ||
(:action del | ||
:parameters (?t1 - TRACE_STATE ?e - ACTIVITY ?t2 - TRACE_STATE) | ||
:precondition | ||
(and (cur_state_trace ?t1) | ||
(trace_trans ?t1 ?e ?t2)) | ||
:effect | ||
(and (increase (total-cost) 1.0) | ||
(not (cur_state_trace ?t1)) | ||
(cur_state_trace ?t2)) | ||
) | ||
(:requirements :typing :disjunctive-preconditions :conditional-effects :universal-preconditions :action-costs) | ||
(:types trace_state automaton_state - state activity automaton) | ||
(:predicates | ||
(trace_trans ?t1 - trace_state ?e - activity ?t2 - trace_state) | ||
(cur_state ?a - automaton ?s - automaton_state) | ||
(cur_state_trace ?t - trace_state) | ||
(automaton_trans ?a - automaton ?s1 - automaton_state ?e - activity ?s2 - automaton_state) | ||
(final_state ?a - automaton ?s - state) | ||
) | ||
(:functions (total-cost)) | ||
|
||
(:action sync | ||
:parameters (?t1 - trace_state ?e - activity ?t2 - trace_state) | ||
:precondition (and (cur_state_trace ?t1) (trace_trans ?t1 ?e ?t2)) | ||
:effect (and | ||
(not (cur_state_trace ?t1)) (cur_state_trace ?t2) | ||
(forall (?a - automaton ?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?a ?s1) (automaton_trans ?a ?s1 ?e ?s2)) | ||
(and (not (cur_state ?a ?s1)) (cur_state ?a ?s2))) | ||
) | ||
) | ||
) | ||
(:action add | ||
:parameters (?e - activity) | ||
:effect (and | ||
(increase (total-cost) 1) | ||
(forall (?a - automaton ?s1 ?s2 - automaton_state) | ||
(when (and (cur_state ?a ?s1) (automaton_trans ?a ?s1 ?e ?s2)) | ||
(and (not (cur_state ?a ?s1)) (cur_state ?a ?s2))) | ||
) | ||
) | ||
) | ||
(:action del | ||
:parameters (?t1 - trace_state ?e - act ?t2 - trace_state) | ||
:precondition (and (cur_state_trace ?t1) (trace_trans ?t1 ?e ?t2)) | ||
:effect (and | ||
(increase (total-cost) 1) | ||
(not (cur_state_trace ?t1)) (cur_state_trace ?t2) | ||
) | ||
) | ||
) |
Oops, something went wrong.