Am 31.03.2010 15:18, schrieb Oliver Shycle: > Another example for behavior I dont understand is the following: > X #< 8 => greater_eight(Y) > > This raises the error "calling an undefined procedure greater_eight" > even if it is defined. I gues that is because greater_eight/1 is not > recognized as a constraint. The operator "=>" however expects a > constraint? The constraint: X #<8 => Y #>8 uses the reified versions of #< and #>, i.e., '#<'/3 and '#>'/3. See section 3.2.3 in the Constraint Library Manual: "Reified constraints are implemented using the the 3 argument form of the constraint predicate if it exists (and it does exist for the arithmetic relation constraints). User-defined constraints will be treated as reifiable if they appear in an expression context and as such should provide forms where the last argument is the reified truth value reflected into a variable." Cheers, ThorstenReceived on Wed Mar 31 2010 - 13:28:01 CEST
This archive was generated by hypermail 2.3.0 : Wed Sep 25 2024 - 15:13:20 CEST