You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Add assertions to prevent users from imposing constraints with invalid program trees:
g =@csgrammarbegin
Real =1
Real =:x
Real =-Real
Real = Real + Real
Real = Real * Real
Real = Real / Real
end
constraint1 =Forbidden(RuleNode(1, [RuleNode(2), RuleNode(2)]))
addconstraint!(grammar, constraint1) #should raise an AssertionException: rule 1 must have 0 children
constraint2 =Forbidden(RuleNode(4, [RuleNode(5), RuleNode(2)]))
addconstraint!(grammar, constraint2) #should raise an AssertionException: rule 5 must have 2 children
Also add assertions for DomainRuleNodes
The text was updated successfully, but these errors were encountered:
Add assertions to prevent users from imposing constraints with invalid program trees:
Also add assertions for
DomainRuleNode
sThe text was updated successfully, but these errors were encountered: