XD1LP: An XSB implementation of D1LP

This is XD1LP, an XSB implementation of D1LP.  This is the version 
as of July, 2000.  

Click here to download.

The downloaded zip file consists of the following files: Main.P the parser (using DCG), meta-interpreter, top-level predicates for loading D1LP rules, and predicates that load existing examples and sample queries Tokenizer.P the lexical scanner Compiler.P the transformer from internal representation of D1LP rule to that of OLP Library.P rules that implement inferencing involving threshold structures, conjunctions and disjunctions in principal structures; these rules are used by the meta-interpreter examples/ the directory that contains some examples TopLevelWindow.java This is not part of XD1LP. It is my modified version of the same file in InterProlog. XD1LP needs XSB 2.1 or higher to run. XSB is available from http://www.cs.sunysb.edu/~sbprolog/xsb-page.html The implementation reads in a file that is a D1LP program, and then answers queries. Example queries are in the file main.P. The example D1LP programs are under the directory examples. You need to replace every occurrence of c:\work\dl in main.P with where you extract all the files to. Then start XSB, and type consult('path_to_main.P'). Then you can type test1 to load first example and type different queries, e.g, query01(S). This is developed under Win32 platform. To use it under Unix, you need to change the path separator "\" to "/". Todo list: 1. Currently one has to type OLP queries directly. It would be desirable to handle D1LP queries directly. 2. The syntax needs to be extended to allow "A delegates ?P^1 to B,'' which means A delegates every predicate to B. This should be just a matter of changing the DCG grammar. 3. A better way to distinguish all principals from other terms is needed. To actually use this XSB implementation in other applications, you probably need interface between XSB and other languages. Such info is available from XSB's web site. InterProlog, a Java-to-Prolog interface is available from http://dev.servisoft.pt/interprolog/ To quote from the website: "First, InterProlog provides a simple facelift to Prolog, by running it under a separate process and redirecting its STDIO to a Java window. But it also provides Prolog with the ability to call any Java method, and for Java to invoke Prolog goals, by using standard TCP/IP sockets to pass object/term data among both processes." The current version of InterProlog (as of August 2000) is 1.0b3 (released in December, 1999). Somehow, the jar file didn't work on my environment. But it worked when I compiled the source file and used the class files directly. I use InterProlog as a GUI to XSB. Because I use it quite often, I modified the pt.servisosft.interprolog.gui.TopLevelWindow class to (1) allow one to use up arrow and down arrow to access command history (2) make the history menu an 20-item window. Otherwise, the menu keep growing until one can not see the most recent commands (3) and make the history menu do not store short commands (one or two characters). Otherwise, during debugging, these short commands quickly take up all spaces in history menu, making the history menu useless. The new file is also included in this package. You can use it to replace the original file in InterProlog 1.0b3. Please send questions and suggestions to ninghui@cs.nyu.edu