CloudStyleStudio / aic-expresso

Automatically exported from code.google.com/p/aic-expresso
0 stars 0 forks source link

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

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 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