dollabs / pamela

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

When generating HTN/TPN, a false arity mismatch error occurs when one of the arguments is the literal `false` #187

Open dcerys opened 5 years ago

dcerys commented 5 years ago

When generating HTN/TPN, a false arity mismatch error occurs when one of the arguments is the literal false (note that true is fine).

For example:

(defpclass device [arg1 arg2 arg3])

(defpclass main []
  :fields {d1 (device 1 2 3)
           d2 (device 1 false 2)}
  :methods [(defpmethod sub-method [])
            (defpmethod main []
              (sub-method))
            ])

Doing

pamela -i issue-XX-false-constructor-args.pamela -o issue-XX-false-constructor-args -t "(main.main)" htn

results in the error:

pclass constructor arity mismatch for pclass device expecting [arg1 arg2 arg3] provided [1]