|
Revision 4662, 1.4 KB
(checked in by pmoura, 5 days ago)
|
|
Updated copyright notice.
|
-
Property svn:eol-style set to
native
-
Property svn:keywords set to
Author Date Id Revision
|
| Line | |
|---|
| 1 | ================================================================ |
|---|
| 2 | Logtalk - Open source object-oriented logic programming language |
|---|
| 3 | Release 2.35.0 |
|---|
| 4 | |
|---|
| 5 | Copyright (c) 1998-2009 Paulo Moura. All Rights Reserved. |
|---|
| 6 | Logtalk is free software. You can redistribute it and/or modify |
|---|
| 7 | it under the terms of the "Artistic License 2.0" as published by |
|---|
| 8 | The Perl Foundation. Consult the "LICENSE.txt" file for details. |
|---|
| 9 | ================================================================ |
|---|
| 10 | |
|---|
| 11 | |
|---|
| 12 | To load this example and for sample queries, please see the SCRIPT |
|---|
| 13 | file. |
|---|
| 14 | |
|---|
| 15 | This folder contains an object which implements a translator from |
|---|
| 16 | first-order predicate logic propositions to conjunctive normal form |
|---|
| 17 | and to clausal form. The translator code is partially based on code |
|---|
| 18 | published in the book "Programming in Prolog" by W. F. Clocksin and |
|---|
| 19 | C. S. Mellish. |
|---|
| 20 | |
|---|
| 21 | The following operators are used for representing logic connectives: |
|---|
| 22 | |
|---|
| 23 | negation: ~ |
|---|
| 24 | disjunction: v |
|---|
| 25 | conjunction: & |
|---|
| 26 | implication: => |
|---|
| 27 | equivalence: <=> |
|---|
| 28 | |
|---|
| 29 | Quantifiers are represented using the following notation: |
|---|
| 30 | |
|---|
| 31 | universal: all(X, P) |
|---|
| 32 | existential: exists(X, P) |
|---|
| 33 | |
|---|
| 34 | The two main object predicates are translate/2 and step_by_step/2. |
|---|
| 35 | The first predicate, translate/2, translate a logic proposition to |
|---|
| 36 | a list of clauses. The second predicate, step_by_step/2, performs |
|---|
| 37 | the same translations as translate/2 but also prints the results |
|---|
| 38 | of each conversion step. |
|---|