Model elimination procedure (MESON version, based on Stickel's PTTP).
Function or value | Description | ||||
|
If the clause is completely negative, is also added the rule with
Example
Evaluates to [([`~Q`; `R`], `P`); ([`~P`; `R`], `Q`); ([`~P`; `~Q`], `~R`)] .
Example
Evaluates to [([`P`; `Q`; `R`], `false`); ([`Q`; `R`], `~P`); ([`P`; `R`], `~Q`); ([`P`; `Q`], `~R`)] .
|
||||
|
Note
Prints the depth limits tried to the Example
Evaluates to [8] and prints to the stdout :
|
||||
Full Usage:
mexpand_basic rules ancestors g cont (env, n, k)
Parameters:
(formula<fol> list * formula<fol>) list
-
The input list of rules.
ancestors : formula<fol> list
-
The accumulator for the ancestors.
g : formula<fol>
-
The goal to be solved from the rules.
cont : func<string, term> * int * int -> func<string, term> * int * int
-
The continuation function to solve the subgoals.
env : func<string, term>
-
The given instantiation under which trying solving.
n : int
-
The maximum number of rule applications permitted.
k : int
-
The counter for variable renaming.
Returns: func<string, term> * int * int
The triple with the current instantiation, the depth reached and the
number of variables renamed.
|
It tries to solve the input goal
NoteSee also Prolog.backchain, Tableaux.tableau Example
val id: x: 'T -> 'T
val env: obj
val n: obj
val k: obj
Evaluates to ([("_0", ``_1``)], 0, 2) .
Example
val id: x: 'T -> 'T
Throws System.Exception: tryfind .
Example
val id: x: 'T -> 'T
Throws System.Exception: Too deep .
|
||||
|
Note
Prints the depth limits tried to the Example
Evaluates to 1 and prints to the stdout :
|
Function or value | Description | ||||||
Full Usage:
equal env fm1 fm2
Parameters:
func<string, term>
-
The given instantiation.
fm1 : formula<fol>
-
The first input literal.
fm2 : formula<fol>
-
The second input literal.
Returns: bool
true, if the input formulas are literals and identical under the give
instantiation; otherwise, false (this is the case also if the input
formulas are identical but not literals).
|
ExampleIdentical literals
Evaluates to true .
ExampleDifferent literals
Evaluates to false .
ExampleIdentical formulas that are not literals
Evaluates to false .
|
||||||
Full Usage:
expand2 expfn goals1 n1 goals2 n2 n3 cont env k
Parameters:
formula<fol> list -> (func<string, term> * int * int -> func<string, term> * int * int) -> func<string, term> * int * int -> func<string, term> * int * int
-
The input basic expansion.
goals1 : formula<fol> list
-
The first list of subgoals.
n1 : int
-
The depth limit for goals1 .
goals2 : formula<fol> list
-
The second list of subgoals.
n2 : int
-
The depth limit for goals2 that will be added to what is left from goals1 .
n3 : int
-
The minimum depth limit allowed for goals2 .
cont : func<string, term> * int * int -> func<string, term> * int * int
-
The supporting continuation function.
env : func<string, term>
-
The given instantiation under which trying solving.
k : int
-
The counter for variable renaming.
Returns: func<string, term> * int * int
The triple with the current instantiation, the depth reached and the
number of variables renamed.
|
Applies
|
||||||
Note
Prints the depth limits tried to the Example
Evaluates to [8] and prints to the stdout :
|
|||||||
Full Usage:
mexpand rules ancestors g cont (env, n, k)
Parameters:
(formula<fol> list * formula<fol>) list
-
The input list of rules.
ancestors : formula<fol> list
-
The accumulator for the ancestors.
g : formula<fol>
-
The goal to be solved from the rules.
cont : func<string, term> * int * int -> func<string, term> * int * int
-
The continuation function to solve the subgoals.
env : func<string, term>
-
The given instantiation under which trying solving.
n : int
-
The maximum number of rule applications permitted.
k : int
-
The counter for variable renaming.
Returns: func<string, term> * int * int
The triple with the current instantiation, the depth reached and the
number of variables renamed.
|
... TODO
Example
val id: x: 'T -> 'T
val env: obj
val n: obj
val k: obj
Evaluates to ([("_0", ``_1``)], 0, 2) .
Example
val id: x: 'T -> 'T
Throws System.Exception: tryfind .
Example
val id: x: 'T -> 'T
Throws System.Exception: Too deep .
|
||||||
|
Note
Prints the depth limits tried to the Example
Evaluates to 1 and prints to the stdout :
|