-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathREADME
78 lines (53 loc) · 2.28 KB
/
README
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
% ======================================
% = The Grail Theorem Prover =
% ======================================
Grail is a modern, flexible and robust parser/automated theorem prover
for multimodal categorial grammars. It is designed to allow students
and researchers to design and experiment with their grammars.
The current version of Grail 0 is based on source code developed
by Richard Moot, Xander Schrijen and Gert Jan Verhoog.
% ======================================
% = Requirements =
% ======================================
The current distribution was last modified at 22 February 2015 and
has been verified to work with SWI Prolog 6.4.1. A version of
pdflatex (or other LaTeX version) is required for the LaTeX output.
% ======================================
% = Usage =
% ======================================
The file grail/fragments/example.pl provides an empty example grammar
with comments on how to modify it for your own use. Extend this file with
your own lexicon and structural rules.
The man source code is the file grail/sources/grail.pl.
You can start Grail as follows.
cd grail/sources
swipl
[grail].
Type "grail_help." for an overview of the available commands.
You can load a grammar as follows.
load_fragment('../fragments/q.pl').
You can specify the natural deduction output format as follows
(here Prawitz-style natural deduction).
load_output_module(prawitz_tex).
Finally, you can parse a sentence as follows.
parseall([who,john,talks,to],rel).
This generates a LaTeX file proofs1.tex containing the natural
deduction version of any proofs found. In a separate shell, use
pdflatex proofs1.tex
to obtain the pdf file of the proof.
% ======================================
% = Formulas =
% ======================================
Lexical entries are of the form.
lex(Word, Formula, Semantics).
Where Word is a Prolog atom, Formula is a multimodal formula
and Semantics is a lexical lambda term, in the formats shown
below.
Multimodal formulas are represented as follows ("I" is a Prolog term
representing a mode, typically an atom)
atom (any Prolog atom)
<>A dia(I,A)
[]A box(I,A)
A/B dr(I,A,B)
B\A dl(I,B,A)
A*B p(I,A,B)