aic-sri-international / aic-expresso

SRI International's AIC Symbolic Manipulation and Evaluation Library (for Java 1.8+)
BSD 3-Clause "New" or "Revised" License
8 stars 0 forks source link

GrinderUtil extend contextual variables logic needs to work with constants and not just logical variables #4

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Current GrinderUtil's extendContextualVariablesAndConstraint() logic which is 
called by AbstractExpression when establishing a process specific to the 
context only looks for logical variables. However, it also needs to be able to 
handle scoped constant variables, for e.g. in the expression:

if even(X) then {(on even(a)) f(even(Y))} else g(even(X))

'even(a)' should be considered a scoped random variable.

See GrinderTest.testIfThenElseConditionIsTrueInThenBranchAndFalseInElseBranch() 
for relevant examples.

Original issue reported on code.google.com by ctjoreilly@gmail.com on 10 Apr 2013 at 11:58