blob: f3fa2d803c378e39dfcb0df5461f117aa009bd8d [file] [log] [blame]
Shawn O. Pearce5e007112011-06-21 14:14:34 -07001prolog-shell
2============
3
4NAME
5----
6prolog-shell - Simple interactive Prolog interpreter
7
8SYNOPSIS
9--------
10[verse]
11'java' -jar gerrit.war 'prolog-shell' [-s FILE.pl ...]
12
13DESCRIPTION
14-----------
15Provides a simple interactive Prolog interpreter for development
16and testing.
17
18OPTIONS
19-------
20-s::
21Dynamically load the Prolog source code at startup,
22as though the user had entered `['FILE.pl'].` into
23the interepter once it was running. This option may
24be supplied more than once to load multiple files.
25
26EXAMPLES
27--------
28Define a simple predicate and test it:
29
30====
31$ cat >simple.pl
32food(apple).
33food(orange).
34^D
35
36$ java -jar gerrit.war prolog-shell -s simple.pl
37Gerrit Code Review 2.2.1-84-ge9c3992 - Interactive Prolog Shell
38based on Prolog Cafe 1.2.5 (mantis)
39 Copyright(C) 1997-2009 M.Banbara and N.Tamura
40(type Ctrl-D or "halt." to exit, "['path/to/file.pl']." to load a file)
41
42{consulting /usr/local/google/users/sop/gerrit2/gerrit/simple.pl ...}
43{/usr/local/google/users/sop/gerrit2/gerrit/simple.pl consulted 99 msec}
44
45| ?- food(Type).
46
47Type = apple ? ;
48
49Type = orange ? ;
50
51no
52| ?-
53====
54
55GERRIT
56------
57Part of link:index.html[Gerrit Code Review]