|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
For example, here is a of first-order logic sentence and its translation into OTTER syntax:
FOL: " x (((Breath(x) L
Take(you,
x)) V (Move(x) L Make(you, x)) => Watching(i,
you))
OTTER: all x (((Breath(x) & Take(you, x)) | (Move(x)
& Make(you, x)) -> Watching(i, you))
NOTE: Spaces are important to OTTER. "P & Q" is legal;
"P&Q" is not.
All you do is translate your logical sentences into this syntax and
type them in one by one, with a period at the end of each one. A
few tips to make sure that you get it right:
Dead(Grass) & OtherSide(Grass).
OK, the rest is fairly simple. Check to see that a file named 'input' was created as described above and is in the same directory as the files 'otter' and 'simple_otter.pl'. Then just type in the following line:Note that its easy to make mistakes while typing in your input. Even if OTTER doesn't complain, you may not actually be proving what you think you are. The best way to make sure that you're doing the right thing is to assume the innocence of Arthur, Bertram, and Carleton one by one and get OTTER to try to refute each assumption. If you do not get exactly two contradictions (for example, if OTTER can't contradict two of the innocence assumptions), then you know that you're doing something wrong.perl simple_otter.plJust like with GSAT. And again, the answer should just pop out after OTTER has done its thing. If OTTER was unable to find a contradiction in the sentences you gave it, it should report 'NO CONTRADICTION FOUND.' If it was, however, able to find a contradiction, it will display a series of steps describing its proof that will look something like this (for the sample file given above):1 [] -OtherSide(Grass)|Greener(Grass).In order to interpret this output, you need to know a few things. The numbers in the leftmost column are the proof steps, and the bracketed expression following each number is the justification for each step. The justification '[]' means that the statement was given as input and the justification '[x,y]' means that OTTER resolved the lines 'x' and 'y' to give the deduction presented in this line. Of course, if you're paying attention you'll have already noticed that the statements taken as given above are not actually the statements that we gave it in the input file. This is because OTTER converts your input sentences into a clausal form before working with them -- and if you work through them, you should see that anything that OTTER claims to be given is nothing more than a rewriting of your input sentences. Finally, the '$F' in the last step means that the 'x' and 'y' used to justify this step are contradictory.
2 [] -Dead(Grass)| -Greener(Grass).
3 [] Dead(Grass).
4 [] OtherSide(Grass).
5 [1,4] Greener(Grass).
6 [2,3] -Greener(Grass).
7 [6,5] $F.
In case you missed it, a copy of the proof will be saved in a file named 'output' which you can examine at your convenience by typing:more outputThat should be everything. Good luck.
Special Thanks: The simple_otter.pl script and the first draft of this documentation are by Samar Mehta, one of the best TAs I've ever worked with. Thanks so much, Samar!