Luse Howto
this is a description of how to check out, play around with, and finding
things in the current LUSE sources.
If checking out doesn't work because of file permissions (CVS complains
about not being able to create a lock file), please contact me so I can
try to fix it.
I'll also try to upload current sources to the Wiki
Step 1: checking out the sources
* if you're in the nats cluster:
bash$ export CVSROOT=/data/cvs
bash$ cvs checkout luse
* if you're elsewhere and have cvs and ssh (Linux, Win+Cygwin, MacOSX)
tcsh% setenv CVSROOT username@nats17.informatik.uni-hamburg.de:/data/cvs
tcsh% setenv CVS_RSH ssh
tcsh% cvs checkout luse
or
bash$ export CVSROOT=username@nats17.informatik.uni-hamburg.de:/data/cvs
bash$ export CVS_RSH=ssh
bash$ cvs checkout luse
Step 2: trying it out
you need SWI-Prolog with a version newer than 5.1.5 (current is 5.2.8)
and a running X11 server (because we're using the XPCE http server).
bash$ cd luse
bash$ pl
?- [main].
% files being loaded and lots of stuff printed out
?-
you can now access the web application at
http://localhost:8123/query.plht
Step 3: a touristic tour of the code
diagnose/3 in domain.pl
here is where the error messages from various components are gathered.
Id is the id of the exercise (e.g. bib-2)
Term is the query with variables replaced by '<var>'(Varname)
and anonymous vars replaced by '<a-var>'(Gensym)
Errs gets unified with the list of errors
normalform:normalizeBody/3 in normalform.pl
converts a clause with commas into a list from terms
so, (do,this,and,that) becomes [do,this,and,that]
aufgaben.dom
This is the list of exercises and test cases.
Although these are valid prolog terms (and have to be),
you should not consult this file, but load it with
load_domain(Filename) from domain.pl
bibliothek_typen.pl
This file is referenced from aufgaben.dom and contains the type
information for the database predicates
bibliothek.pl
the database itself
web/query.plht
is the plht file for the web frontend.
This is XML, not HTML, so all tags have to be closed
( <br></br> or <br/> and not simply <br>)
If you're still well and alive, take a look at ids.pl which implements
iterative deepening search with some syntactic sugar that is used in
infer_types.pl and auswertung.pl
--
YannickVersley --
29 Oct 2003