Re: Prolog to SQL ..??



W <wgw at cruzio dot com> wrote:
> They look similar because they are based on relations. however there are a
> lot of differences in the details.
[...]


There are lots of nice tricks, but translating Prolog to SQL is not
so strange if you just treat SQL like an assembly language ;-) and use
bottom-up evaluation when appropriate.


There are obviously times when a Prolog clause or 2 can be translated
almost verbatim into some other relational calculus (SQL, loosley),
but a more general purpose translation has to abandone the idea that
the resulting SQL "looks like" it's doing what the original Prolog was
doing and/or in much the same way.


If you want something REALLY tedious, try Prolog to Yacc.
.



Relevant Pages

  • Re: SQL to Prolog compiler?
    ... transactional stuff may not translate so easily, and I'm sure SQL has ... update -> query matching rows, ... It is tailored to a Prolog system where evaluable predicates ... Let E' denote the conditions that result from translating the ...
    (comp.lang.prolog)
  • Re: Prolog to SQL ..??
    ... > There are lots of nice tricks, but translating Prolog to SQL is not ... > so strange if you just treat SQL like an assembly language;-) and use ... > There are obviously times when a Prolog clause or 2 can be translated ... The problem with Yacc is that he make only finite state automata, ...
    (comp.lang.prolog)
  • Re: Prolog to SQL ..??
    ... >> There are lots of nice tricks, but translating Prolog to SQL is not ... >> There are obviously times when a Prolog clause or 2 can be translated ... >> If you want something REALLY tedious, try Prolog to Yacc. ...
    (comp.lang.prolog)
  • Re: Critique of Robert C. Martins "Agile Principles, Patterns, and Practices"
    ... code in your book is WASTED on translating back and forth between two ... To the right the code deals with SQL, tables, rows, ... Martin commits a common OO mistake of making a hierarchy of "employee ...
    (comp.object)
  • Re: Blog Post - Why prolog is by far the best, most productive, easiest programming language
    ... Why prolog is by far the best, most productive, easiest programming ... First of all I will only advocate the use of pure prolog - that means ... everyone's nose - sql. ... (unlike lisp and any other language). ...
    (comp.lang.prolog)