Notas sobre lógica y semántica declarativa de la programación lógica(In Spanish). Last revision: April 19 2009.
The following are various software experiments I develop just for fun.
silxpi is an interpreter for a logic programming language which is a subset of Prolog.
It implements
unification without ocurr-check and SLD resolution. In addition to the "pure Prolog" subset
it also implements the Cut symbol with usual Prolog semantics, and extra-logical built-in
predicates (such as consult/1, write/1 or fail/0).
It's written in C and should compile and work on any UNIX system.
In SILXPI 1.6, the engine has been completely rewritten and it is a lot faster than previous versions. It also features automatic memory management.
Example: queens.prl (N-queens problem).
Example of an interactive interpreter session:
$ ./silxpi SILXPI 1.6 - a simple logic program interpreter (a la Prolog). ?- consult(user). /* user file. type ^L to return. */ takeout(X,[X|R],R). takeout(X,[F|R],[F|S]) :- takeout(X,R,S). perm([X|Y],Z) :- perm(Y,W), takeout(X,Z,W). perm([],[]). ^L yes ?- perm([1,2,3],P). P = [1,2,3] ? ; P = [2,1,3] ? ; P = [2,3,1] ? ; P = [1,3,2] ? ; P = [3,1,2] ? ; P = [3,2,1] ? ; no ?- ^D
slsic is a very simple interpreter for a functional language. It is implemented in just 1000 lines of C89 source code and contains support for lambda expressions , (recursive) ordered pairs, definitions, atoms (any arbitrary symbolic identifier can be used), pattern matching ...
This interpreter is not available currently.
Example: bina.sic.
This is stuff I use in my BSD systems:
| Mahjong Solitaire 3.0 (BinHexed Disk Copy image of 800K floppy). |
This is a mahjong solitaire game that works on classic Macintosh models. Minimum system requirements:
Includes source code and MPW Makefile.
Last updated: August 31, 2009
marcotrillo () gmail ! com