What is the definition of the symbol "=>" in Picat and how do you read it ? Is it an implication ? I have trouble to understand it since there seems to be no informations about it in the manual nor in the book.
%example using "=>"
main =>
A = true,
B = true,
C = function(A,B),
predicate(A,B).
function(true,true) = R => R = true.
predicate(true,true) => true.
How would you describe the meaning of "=>" in the previous example ? Is it just something syntactically required, such as "{" after the declaration of a method in Java, or has a deeper meaning ?
Briefly, if you use
=>instead of:-, you are essentially writing a deterministic predicate. As we know that Prolog is a practical programming language and it is not necessary to keep all predicates pure. A lot of time, we actually write impure programs bycutand hope single sided unification. The=>just provides a convenient mechanism to write such programs.You can understand
=>by program transformation.is semantically equivalent to
More detail see https://swi-prolog.discourse.group/t/picat-style-matching