README for LLP 1996/11/14 written for version 0.40 1996/12/09 revised for version 0.41 1997/05/04 revised for version 0.42 1998/04/01 revised for version 0.43 2001/01/23 revised for version 0.50 2002/04/19 revised for version 0.51 LLP: a linear logic programming language and its compiler system The language LLP is a logic programming language based on intuitionistic linear logic. LLP is a superset of Prolog and a subset of Lolli which is another linear logic programming language developed by Hodas and Miller (see http://www.cs.hmc.edu/~hodas/research/lolli/). LLP is distributed as free software for non-profit use. WWW: http://bach.cs.kobe-u.ac.jp/llp/ http://kaminari.scitec.kobe-u.ac.jp/PrologCafe/ Any comments and suggestions are welcome! ---------------------------------------------------------------- REQUIREMENTS You need the following systems to use LLP compiler. * ANSI C compiler Abstract machine emulator is written in ANSI C. I am using GNU C compiler version egcs-2.91.66. * Prolog system Prolog system is used to compile LLP program into abstract machine code. I am using - SICStus Prolog version 3.7.1 (commercial, see http://www.sics.se/ps/sicstus.html). You don't need Prolog if you only execute example programs included in the package (they are already compiled). See also http://kaminari.scitec.kobe-u.ac.jp/PrologCafe/, if you want LLP to Java translator. ---------------------------------------------------------------- INSTALLATION * Unzip and untar the distribution file % zcat llp051.tar.gz | tar xvf - Directory named llp051 will be created. * Make symbolic link for further set-up. % ln -s llp051 llp % cd llp * Edit Makefile to meet your machine architecture Currently, LLP can run on Linux and Solaris. * Edit Makefile to select your Prolog system. $PROLOG and $PSYSTEM are referred in 'comp_pl' program, which is used at installation procedure. * Set PATH and LLPDIR % set path = (~/llp/bin $path) % rehash % setenv LLPDIR ~/llp * Make the system % make * If you use Emacs, append the following lines to .emacs file. ;;; ;;; LLP ;;; (setq load-path (cons (expand-file-name "~/llp/lib") load-path)) (setq auto-mode-alist (cons '("\\.llp$" . llprolog-mode) auto-mode-alist)) (autoload 'run-llprolog "llprolog" "Start a LLProlog sub-process." t) (autoload 'llprolog-mode "llprolog" "Major mode for editing LLProlog programs" t) You can use the following key commands in llprolog-mode. C-c K compile the buffer C-c k compile the region C-c C-k compile the predicate ---------------------------------------------------------------- HOW TO USE Some example programs are in "examples" directory. % cd ~/llp/examples/llp % llp queens You can also use Small LLP interpreter. % cd ~/llp/examples/llp % llp Small LLP Interpreter | ?- load(queens). | ?- main. To run java interface, you need to have JDK. % cd ~/llp/tools/java % java Queens % java Pentomino Since Process class is system dependent feature of Java, the program might not work well on your machine. I checked the program on Java version 1.2.2 on Linux. To compile your program, please use "llprun" command. % llprun file /* to compile & run */ The "llprun" command executes the following. % llpc file "file.llp" is compiled into LLPAM binary code "file.llpo". % llp file "file.llpo" is executed with built-in predicates defined in built.llpo, inout.llpo, and llpi.llpo. Your program should include main/0 predicate as the start point (you can change the entry predicate by -e option). ---------------------------------------------------------------- LIMITATIONS * No debugging aids. Small interpreter system with tracing facilities is available. * Few built-in predicates (see BUILTINS). * No garbage collectors. You need to edit "llpam.h" file to enlarge data areas. * No optimizations (register allocation, environment trimming, last-call-optimization). * No floating point numbers, integer is 28 bits signed. * Nesting of & and ! goals are limited to 2^27-2. * What are limited compared with Lolli. - Universal quantifiers can not be used in G-formulas and R-formulas. - Compound formulas can not be used in clause heads. - No modules - Syntax is different (operator precedences are defined same as much as possible) Lolli LLP true true erase top (You can also use erase) {P} !P P, Q P, Q P & Q P & Q P ; Q P ; Q P -o Q P -<> Q P :- Q P :- Q P => Q P => Q P <= Q Q => P forall x \ P forall [X] \ P exists x \ P (not available) top (top level loop) (not available) ---------------------------------------------------------------- KNOWN BUGS ---------------------------------------------------------------- DOCUMENTS Summary of built-in predicates can be found in: BUILTINS Technical papers related to LLP can be found at: http://bach.cs.kobe-u.ac.jp/llp/papers/ ---------------------------------------------------------------- FUTURE PLANS This space is too narrow to write all of my hopes... ---------------------------------------------------------------- CHANGES See CHANGES file. -- Naoyuki Tamura Department of Computer and Systems Engineering Faculty of Engineering, Kobe University 1-1 Rokkodai, Nada, Kobe 657-8501 Japan E-mail: tamura@kobe-u.ac.jp WWW: http://bach.cs.kobe-u.ac.jp/tamura.html Mutsunori Banbara Nara National College of Technology E-mail: banbara@kaminari.scitec.kobe-u.ac.jp WWW: http://kaminari.scitec.kobe-u.ac.jp/~banbara/