-
I am studying some Prolog code from a book so that I can rewrite it in the preferred method, I am encountering some syntax I haven't seen before. I believe it might be constraint notation? % book code
prec_constr( _, []).
prec_constr( T/P/S/D, [T1/P1/S1/D1 | Rest]) :-
( prec(T,T1), !, { S+D =< S1} %% <--- what is this bracketed notation?
; prec( T1, T),!, { S1+D1 =< S} %% <--- what is this bracketed notation?
; true
),
prec_constr( T/P/S/D, Rest). if using clp(z), are the brackets necessary to constrain the expression or could I simply use the I read through the clp(z) comments and didn't see any mention of that notation, so I'm thinking this is not a Scryer concept |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
Beta Was this translation helpful? Give feedback.
{}/1
is used in Christian Holzbaur's CLP(Q) and CLP(R) systems which ship for example with SICStus Prolog:https://sicstus.sics.se/sicstus/docs/4.3.2/html/sicstus/CLPQR-Solver-Predicates.html#CLPQR-Solver-Predicates
library(clpz)
uses(#=<)/2
.