-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathREADME.txt
69 lines (62 loc) · 1.87 KB
/
README.txt
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
The Python Z3 program contained in ioz3.py
uses SMT to parse I/O logic norms, one conclusion
and any number of premises, from a text file and
determines whether the conclusion is provable
given the premises. This is done by representing
the norms as boolean implications using Z3. If no
proof can be found, the program prints the norms
required to complete the proof.
To run the program, ensure that the Z3 Prover is built
and installed in the parent of the current directory.
To do this, visit the following link:
https://github.com/Z3Prover/z3
Once this is done, run the following code:
----
python3 ioz3.py
----
####################
Norm File Notation
####################
Five text files of norms named 'normsk.txt'
(k being an integer 0-4) are included and can be
selected for parsing on line 33 of ioz3.py. The
norms in each text file can also be altered
according to the user.
For parsing purposes, instead of formulating a
norm like
----
(a, x)
----
as in customary I/O logic notation, norms in
the text files are formulated like so:
----
Bool('a') ; Bool('x')
----
There are no parentheses enclosing the entire norm,
a semicolon separates the norm body and head instead
of a comma, and literals are expressed as "Bool('x')"
instead of "x".
To express a conjunctive clause, And() is used. Thus
if "^" is the logical conjunction symbol, the norm
----
(a ^ b, x)
----
is instead formulated as
----
And( Bool('a'), Bool('b') ) ; x
----
Similarly, to express a disjunctive clause, Or() is used. Thus
if "v" is the logical disjunction symbol, the norm
----
(a v b, x)
----
is instead formulated as
----
Or( Bool('a'), Bool('b') ) ; x
----
In these text files, premise norms are entered
directly under the line that says 'Given Premises'
with no lines skipped. below the premise norms, a
blank linke must be preserved before the line with
'Given Conclusion', under which the conclusion norm
is entered.