O'Reilly logo

Building Parsers with Java™ by Steven John Metsker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

13.13. Summary

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, ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required