dollabs / pamela

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

Add constant arithmetic to pamela #196

Closed paulratdollabs closed 4 years ago

paulratdollabs commented 4 years ago

I added support for arithmetic in constant expressions containing lvars that can be used only in bounds for the present. There is a case for adding the constant expressions elsewhere, such as in arguments to method invocation, and to class and lvar constructors. I did not add those at present because I wanted to minimise the changes. Before making constant expressions more widespread, we should decide where we want them to be used, and what other primitives we may want to add beyond +,-,*,/