Re: SUO: Re: CG: Negotiation Instead of Legislation
> We have discussed a few times with Peter the relative merits
> of Oz/Mozart vs. new Prolog developments - and agreed to disagree :-)
> I would only add to what John already said that Jinni 2002 has a very
> general object system of its own - supporting "cyclical depth first
> multiple inheritance" (see
> http://www.binnetcorp.com/download/jinnidemo/JinniUserGuide.html ).
> It is is a fast, "all compile time" Object Oriented Prolog implementation.
> Among other things, this allows mapping CGs (which are graphs!) directly to
> compiled Jinni classes (the feature is source level and it will get also in
> BinProlog's next release).
I would be surprised that Jinni's object system is the definitive one for
mapping CGs. Most likely, you will have to change it to ensure that the
mapping remains possible ("tracking" the CG developments). Such tracking
is much easier if the language is higher-order. In that case, it is easy
to write any kind of object system as a simple higher-order program.
Object-oriented programming is just one way of using higher-order
programming, of course (for an explanation of how, see Chapter 6 of the
programming textbook at http://www.info.ucl.ac.be/people/PVR/book.html).
> I would add the fact that Arun's programs,
> which are the key component of our joint work, are in Prolog - and
> porting them to Oz's fairly different syntax would be very hard.
>
> Cheers,
>
> Paul Tarau
The term syntaxes of Oz and Prolog are quite compatible -- Oz is a
logic programming language after all. The basic data structures of
Oz are rational trees, like modern Prologs. The statement syntaxes
are of course quite different.
Mapping the Horn clause syntax of Prolog to Oz is simple, *if* the
Prolog program has a "reasonable" logical semantics. That is, if
green cuts are used then all is well. If cuts are used in a way
that has no logical reading, then you have to translate the
operational semantics, which cannot be done automatically. The
mapping is explained in detail in Chapter 9 of the programming
textbook mentioned above.
Peter
--
Peter Van Roy
Département d'Ingénierie Informatique
(Department of Computing Science and Engineering)
Université catholique de Louvain
B-1348 Louvain-la-Neuve, Belgium
Email: pvr@info.ucl.ac.be
Tel: (+32) (10) 47.83.74
Web: http://www.info.ucl.ac.be/people/cvvanroy.html
Mozart: http://www.mozart-oz.org