ediprolog -- Emacs does Interactive Prolog




Here are Emacs definitions that let you transparently interact with
SWI Prolog in all buffers. You can load and syntax-check Prolog
programs and execute queries with minimal exposure to the toplevel:

http://stud4.tuwien.ac.at/~e0225855/ediprolog/ediprolog.html

A video with a simple query, a CLP and a CHR program:

http://stud4.tuwien.ac.at/~e0225855/ediprolog/ediprolog.mpg


The definitions are self-contained and orthogonal to other Prolog
editing modes. The central function is "ediprolog-dwim" (Do What I
Mean). Depending on the line at point, it either loads the current
buffer into Prolog (moving point to the first error, if there are
any), or executes the query and inserts its results in the buffer. I
first saw this idea in Ulrich Neumerkel's GUPU teaching environment.

The code is in the public domain. While it currently depends on SWI's
prompts and "-q" switch, I hope that authors of other systems also
find it useful, and that they can adapt it to provide even better
development and teaching environments. If you have more suggestions or
ideas regarding editing/development features, please let me know.

All the best,
Markus Triska
.



Relevant Pages

  • Re: communicate with Prolog engine in Prolog
    ... I have to run the main application as a server. ... program connects to the server program. ... As you appearently have threads in Prolog you may be using SWI-Prolog? ... We load it with over 10 million RDF triples (startup time ...
    (comp.lang.prolog)
  • Text_buffers and vars
    ... I´d like to know if there´s anyway to copy the output of a prolog ... comand to a text buffer. ... On my case I´m executing a listing, ...
    (comp.lang.prolog)
  • Re: consult cant find file
    ... ericwan78@xxxxxxxxx schrieb: ... trying to use [fam]. ... to load fam.pl, but got an ... You don't say which prolog you are using. ...
    (comp.lang.prolog)