summaryrefslogtreecommitdiffstats
path: root/Documentation/pgm-prolog-shell.txt
blob: f3fa2d803c378e39dfcb0df5461f117aa009bd8d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
prolog-shell
============

NAME
----
prolog-shell - Simple interactive Prolog interpreter

SYNOPSIS
--------
[verse]
'java' -jar gerrit.war 'prolog-shell' [-s FILE.pl ...]

DESCRIPTION
-----------
Provides a simple interactive Prolog interpreter for development
and testing.

OPTIONS
-------
-s::
	Dynamically load the Prolog source code at startup,
	as though the user had entered `['FILE.pl'].` into
	the interepter once it was running. This option may
	be supplied more than once to load multiple files.

EXAMPLES
--------
Define a simple predicate and test it:

====
	$ cat >simple.pl
	food(apple).
	food(orange).
	^D

	$ java -jar gerrit.war prolog-shell -s simple.pl
	Gerrit Code Review 2.2.1-84-ge9c3992 - Interactive Prolog Shell
	based on Prolog Cafe 1.2.5 (mantis)
	         Copyright(C) 1997-2009 M.Banbara and N.Tamura
	(type Ctrl-D or "halt." to exit, "['path/to/file.pl']." to load a file)

	{consulting /usr/local/google/users/sop/gerrit2/gerrit/simple.pl ...}
	{/usr/local/google/users/sop/gerrit2/gerrit/simple.pl consulted 99 msec}

	| ?- food(Type).

	Type = apple ? ;

	Type = orange ? ;

	no
	| ?-
====

GERRIT
------
Part of link:index.html[Gerrit Code Review]