dollabs / pamela

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

Provide mechanism for including other Pamela files #180

Closed dcerys closed 5 years ago

dcerys commented 5 years ago

When reading input files, Pamela doesn't provide a mechanism for including other Pamela files in the parsing/building process. However, this would be a useful feature.

For example, now that inheritance is supported, it would be often useful to maintain the superclasses in one (or more) file(s), and the subclasses in their own distinct file(s).

Two (at least) approaches to consider:

  1. Add a top-level declaration within a file, e.g., (defimport foo bar) that would treat foo et al as additional input files. This would be something like the ns :require statements in a clojure file.

  2. Add a top-level multi-file system declaration file.

Of the two, (1) is more modular. However, it still might require a top-level source path declaration like that found in a build.boot file.

dcerys commented 5 years ago

The :depends declaration was intended to provide this capability. Let's support this (work-in-progress).

(defpclass qc-demo []
  :meta {:version "0.2.1"
         :depends [[qc "0.2.1"]
                   [qc-waypoints "0.2.1"]]