Warning: X is used without being explicitly declared |
|
In predicate definitions, you can use variables without explicitly declaring these variables. This is an ancient tradition among the high priests of logic programming who have practiced their art way before the vulgar idea of declaring variables became en vogue. For fear of being put under a spell by these high priests, the .QL designers allow you to engage in such ancient rites, but at your own risk.
What you may write
predicate p(int X) { X=Y and Y=3 }
What you should have written
predicate p(int X) { exists(int Y | X=Y and Y=3 ) }
|