Notice that the value of an assignment guard is usually an operator like (- T3 100ms) in the assignment for T1. But notice that the value of the assignment for DeltaP is the literal (vec3 -0.5 0 0). Currently, the AERA code assumes that the value of an assignment guard is always the result of evaluating an operator. But we want to allow an object literal.
This pull request updates BindingMap::bind_variable to allow the value to be a structured object like (vec3 -0.5 0 0) .
NOTE: There also could be the case that a literal is a simple number like DeltaP:5 . Right now the syntax of Replicode doesn't allow this, so we would have to update the code parser and possibly other places to support this. The workaround is to use an operator like DeltaP:(+ 5 0) .
We want to be able to make a model like this:
Notice that the value of an assignment guard is usually an operator like
(- T3 100ms)
in the assignment forT1
. But notice that the value of the assignment forDeltaP
is the literal(vec3 -0.5 0 0)
. Currently, the AERA code assumes that the value of an assignment guard is always the result of evaluating an operator. But we want to allow an object literal.This pull request updates
BindingMap::bind_variable
to allow the value to be a structured object like(vec3 -0.5 0 0)
.NOTE: There also could be the case that a literal is a simple number like
DeltaP:5
. Right now the syntax of Replicode doesn't allow this, so we would have to update the code parser and possibly other places to support this. The workaround is to use an operator likeDeltaP:(+ 5 0)
.