[mercury-users] more Mercury homework: "Mercuryfy" some simple Prolog
jeanmarc.vanel at gmail.com
Fri Sep 24 00:30:15 AEST 2010
I'm in the middle of translating into Mercury some simple Prolog from the
book "the Art Of Prolog" , namely Program 2.1: Defining family
And, again, I do not find much help in the documentation.
First , I put this is interface :
:- type person.
But, then, what to put in the implementation, which would the equivalent of
an empty class in Java ?
A 2nd problem is with pure database predicates (primitives), like brother. I
put this :
:- pred brother( person, person) is multi .
:- mode brother( in, out ) is multi .
:- mode brother( out, in ) is multi .
But the compiler is not happy :
Error: no clauses for predicate `brother'/2.
Let's suppose that brother/2 is provided by external facts .
Consulting, services, training,
Rule-based programming, Semantic Web
EulerGUI, a turntable GUI for Semantic Web + rules, XML, UML, eCore, Java
+33 (0)6 89 16 29 52 -- +33 (0)1 39 55 58 16
( we rarely listen to voice messages, please send a mail instead )
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users