Skip to content

Question/feature-request: combining model source code with pre-existing SPE-models #126

Description

@Schaechtle

Is there a good way to execute SPPL model source code while having it rely on a previously existing model? For example, assume I have an SPPL model m (of type ProductSPE) which models variables a and b.
I have this source code source in form of a string:

if a < 17 
    c ~= bernoulli(p=0.1)

else:
    c ~= bernoulli(p=0.9)

which relies on a being defined but which would otherwise compile fine if I run:

SPPL_Compiler(source).execute_module().model

Obviously, without knowing about m it won't compile because the compiler doesn't know about a. Is there a good way to tell the compiler about a model (like m) as a starting point? i.e. something like this:

SPPL_Compiler(m, source).execute_module().model

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions