Tableaux, seen as an optimized version of a Prawitz-like procedure.
Function or value | Description | ||||||
Full Usage:
unify_complements env (p, q)
Parameters:
func<string, term>
-
An environment of mappings (represented as a finite partial function) from variables to terms, used as an accumulator for the final result of the unification procedure.
p : formula<fol>
-
The first input literal.
q : formula<fol>
-
The second input literal.
Returns: func<string, term>
The instantiation that makes the input literals become complementary,
if such an instantiation exists.
|
ExampleSuccessful unification
Evaluates to [("x", ``f(y)``)] .
ExampleCyclic assignment
Throws System.Exception: cyclic .
ExampleImpossible unification
Throws System.Exception: impossible unification .
ExampleInvalid input
Throws System.Exception: Can't unify literals .
|
||||||
Full Usage:
unify_literals env (p, q)
Parameters:
func<string, term>
-
An environment of mappings (represented as a finite partial function) from variables to terms, used as an accumulator for the final result of the unification procedure.
p : formula<fol>
-
The first input literal.
q : formula<fol>
-
The second input literal.
Returns: func<string, term>
A variable-term mappings that unify eq , if the unification is
possible and there are no cycles.
|
It also handles the pair
ExampleSuccessful unification
Evaluates to [("x", ``f(y)``)] .
ExampleDegenerated case
Evaluates to [] .
ExampleCyclic assignment
Throws System.Exception: cyclic .
ExampleImpossible unification
Throws System.Exception: impossible unification .
ExampleInvalid input
Throws System.Exception: Can't unify literals .
|
Function or value | Description | ||
Full Usage:
unify_refute djs env
Parameters:
formula<fol> list list
-
The input DNF list of clauses
env : func<string, term>
-
An environment of mappings (represented as a finite partial function) from variables to terms, used as an accumulator for the final result of the unification procedure.
Returns: func<string, term>
The variable-term mappings that causes each clause to contain
complementary literals, if this mapping exists.
|
ExampleSuccessful refutation
Evaluates to [("x", ``f(y)``)] .
ExampleFailing refutation
Throws to System.Exception: tryfind .
|
Function or value | Description |
|
|
Full Usage:
prawitz_loop djs0 fvs djs n
Parameters:
formula<fol> list list
-
The input set of clauses.
fvs : string list
-
The free variables to unify.
djs : formula<fol> list list
-
The accumulator for the substitution instances.
n : int
-
A counter to generate fresh variable names.
Returns: func<string, term> * int
The final instantiation together with the number of instances tried.
|
The input set of clauses
ExampleSuccessful refutation
val env: obj
val nr: obj
Evaluates to [("x", ``f(y)``)] .
|
Function or value | Description | ||||
Full Usage:
deepen f n
Parameters:
int -> 'a
-
The input function.
n : int
-
The input integer.
Returns: 'a
The result of the input function call and prints to the stdout
information that the function has been call with the given integer.
|
Calls a function that accepts an input integer; and then calls it again with the integer incremented, if the previous call has failed.
Example
val id: x: 'T -> 'T
Evaluates to 1 and prints stdout .
|
||||
Example
Evaluates to 4 and prints to the stdout
|
|||||
Full Usage:
tableau (fms, lits, n) cont (env, k)
Parameters:
formula<fol> list
-
The set of DNF formulas (assumptions) to be refuted.
lits : formula<fol> list
-
The list of (derived) literals against which to refute the formulas.
n : int
-
The limit of universal variables to be replaced.
cont : func<string, term> * int -> func<string, term> * int
-
The supporting continuation function.
env : func<string, term>
-
The given instantiation under which trying refuting.
k : int
-
The counter of universal variables already replaced.
Returns: func<string, term> * int
The pair of the successful instantiation together with the number of
universal variables replaced, if the procedure succeeds.
|
![]() ![]() ![]() ![]() ![]() ![]() Tries to refute a set of Skolem.askolemized formulas (assumptions) against a list of (derived) literals given a limit of universal variables to be replaced. The procedure applies recursively the following rules. If the list is empty, fail: there are no refutations; otherwise consider the first formula.
Example
val id: x: 'T -> 'T
val inst: obj
val nrInst: obj
Evaluates to ([("x", ``f(y)``)], 0) .
Example
val id: x: 'T -> 'T
val inst: obj
val nrInst: obj
Throws System.Exception: no proof at this level .
Example
val id: x: 'T -> 'T
val inst: obj
val nrInst: obj
Throws System.Exception: no proof .
|
||||
|
![]() ![]() ![]() ![]() ![]() ![]() Tries to refute a set of Skolem.askolemized formulas using a iterative deepening of the Tableaux.tableau procedure.
NoteCrashes if the list of formulas is satisfiable or the search too long. Example
Evaluates to 2 and prints to the stdout
|
Function or value | Description |
Full Usage:
splittab fm
Parameters: Returns: int list
The numbers of universal variables replaced for each of the
independently tested subproblems, if the procedure succeeds,
and prints to the stdout the depth limits (max number of
universal variables to replace) tried.
|
The formula is generalized, negated and askolemized. Then Prop.simpdnf is applied and, thus, the formula transformed in a sort of a 'DNF set of clauses' with possibly some universal formulas in place of literals. Each of these 'clauses' is tested separately with Tableaux.tabrefute.
Example
Evaluates to [5; 4; 5; 3; 3; 3; 2; 4; 6; 2; 3; 3; 4; 3; 3; 3; 3; 2; 2; 3; 6; 3; 2; 4; 3; 3; 3; 3; 3; 4; 4; 4] and prints to the stdout
|