dollabs / pamela

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

Enhance proposition support - add defproposition as a new top-level form #198

Closed dcerys closed 3 years ago

dcerys commented 3 years ago

The defproposition command is a top level Pamela construct which defines a Pamela global proposition that can be used by any pclass.

(defproposition :connects-with [a b]
  :meta {:doc "a is connected to b"})

(defproposition :many-arg-prop [a b c d e])

The first argument to defproposition is the Pamela proposition keyword being defined.

Then, there is a vector formal arguments to the proposition (which may be empty).

The proposition is then optionally defined with the :meta option, just as in defpclass (see above).