13.13 Summary


 
Building Parsers with Java
By Steven  John  Metsker

Table of Contents
Chapter  13.   Logic Programming

    Content

Logic programming lets you model a problem in terms of relations. Thinking about the relations in a problem is fundamentally different from thinking about objects. To show this difference, you can try asking seasoned Java developers this question: How would you model, in Java, the fact that Aristotle is taller than Plato if you do not know either man's height?

In Logikus, the answer is

 taller(aristotle, plato) 

In Java, the answer is more elusive , and many developers find that they simply cannot arrive at a solution. Interestingly, for such stymied developers, it simplifies the problem to modify the relationship so that Aristotle manages Plato.

There are no problems Logikus can solve that Java cannot solve. There are, however, many problems that are more easily solved in a logic language than in an object-oriented language. For example, it takes many more lines to model the taller relation in Java than in Logikus. Any problem that is oriented around modeling relations or rules can be more readily rendered in Logikus than in Java.


   
Top


Building Parsers with Java
Building Parsers With Javaв„ў
ISBN: 0201719622
EAN: 2147483647
Year: 2000
Pages: 169

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net