dollabs / pamela

Probabalistic Advanced Modeling and Execution Learning Architecture
Apache License 2.0
233 stars 13 forks source link

Verify PAMELA representation of HTN methods is correct #57

Closed tmarble closed 7 years ago

tmarble commented 7 years ago

HTN methods in PAMELA must have exactly one of {sequence parallel choose}

The place to do this is in src/pamela/htn.clj #'make-htn-methods because that's where we convert the PAMELA IR into the Clojure HTN data structure.

We need to keep track of the number of times we've seen (#{:sequence :parallel :choose} type) Which means "is the type of this subtask in the set of :sequence :parallel :choose ? At the end of one run through the function we need to verify that the counter is exactly 1 or error out.