blob: 3566b8fff7a68f7554bd642f6b625542de1c621a [file] [log] [blame]
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08001= prolog-shell
Shawn O. Pearce5e007112011-06-21 14:14:34 -07002
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08003== NAME
Shawn O. Pearce5e007112011-06-21 14:14:34 -07004prolog-shell - Simple interactive Prolog interpreter
5
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -08006== SYNOPSIS
Michael Ochmanna8434612016-07-08 10:58:27 +02007[verse]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -08008--
Michael Ochmanna8434612016-07-08 10:58:27 +02009_java_ -jar gerrit.war _prolog-shell_
Chih-Hung Hsieh06ed5b32019-04-02 09:46:15 -070010 [-q] [-s FILE.pl ...]
Yuxuan 'fishy' Wangd85b6872013-11-15 11:47:46 -080011--
Shawn O. Pearce5e007112011-06-21 14:14:34 -070012
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080013== DESCRIPTION
Shawn O. Pearce5e007112011-06-21 14:14:34 -070014Provides a simple interactive Prolog interpreter for development
15and testing.
16
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080017== OPTIONS
Chih-Hung Hsieh06ed5b32019-04-02 09:46:15 -070018-q::
19 Do not display banner.
Shawn O. Pearce5e007112011-06-21 14:14:34 -070020-s::
21 Dynamically load the Prolog source code at startup,
22 as though the user had entered `['FILE.pl'].` into
David Pursehouse92463562013-06-24 10:16:28 +090023 the interpreter once it was running. This option may
Shawn O. Pearce5e007112011-06-21 14:14:34 -070024 be supplied more than once to load multiple files.
25
Yuxuan 'fishy' Wang61698b12013-12-20 12:55:51 -080026== EXAMPLES
Shawn O. Pearce5e007112011-06-21 14:14:34 -070027Define a simple predicate and test it:
28
Michael Ochmannb99feab2016-07-06 14:10:22 +020029----
Shawn O. Pearce5e007112011-06-21 14:14:34 -070030 $ cat >simple.pl
31 food(apple).
32 food(orange).
33 ^D
34
35 $ java -jar gerrit.war prolog-shell -s simple.pl
36 Gerrit Code Review 2.2.1-84-ge9c3992 - Interactive Prolog Shell
37 based on Prolog Cafe 1.2.5 (mantis)
38 Copyright(C) 1997-2009 M.Banbara and N.Tamura
39 (type Ctrl-D or "halt." to exit, "['path/to/file.pl']." to load a file)
40
David Pursehouse64df83a2017-07-04 21:20:47 +090041 {consulting /usr/local/google/users/sop/gerrit/gerrit/simple.pl ...}
42 {/usr/local/google/users/sop/gerrit/gerrit/simple.pl consulted 99 msec}
Shawn O. Pearce5e007112011-06-21 14:14:34 -070043
44 | ?- food(Type).
45
46 Type = apple ? ;
47
48 Type = orange ? ;
49
50 no
51 | ?-
Michael Ochmannb99feab2016-07-06 14:10:22 +020052----
Shawn O. Pearce5e007112011-06-21 14:14:34 -070053
54GERRIT
55------
56Part of link:index.html[Gerrit Code Review]
Yuxuan 'fishy' Wang99cb68d2013-10-31 17:26:00 -070057
58SEARCHBOX
59---------