The Davis-Putnam and the Davis-Putnam-Loveland-Logemann procedures.
Type | Description |
Function or value | Description |
NoteThis operator is not part of the original code and it was added here for convenience. Example
Evaluates to [[`p`]; [`p`; `~q`]] .
|
Function or value | Description | ||
Full Usage:
hasUnitClause clauses
Parameters:
formula<'a> list list
-
The input clauses to be checked.
Returns: bool
true, if clauses contain unit clauses; otherwise, false.
|
NoteThis function is not part of the original code: it has been added to remove the use of exceptions as control flow (which causes performance degradation in F#) in the implementations of the DP and DPLL procedures. Example
Evaluates to true .
Example
Evaluates to false .
|
||
|
For the first unit clause
ExampleRemoves the first unit clause present.
Evaluates to [[`q`; `p /\ q`]] .
ExampleRemoves also complements of the literal from other clauses.
Evaluates to [[`s`]; [`t`]] .
ExampleRemoves all clauses containing the literal of the unit clause.
Evaluates to [[`q`; `t`]] .
ExampleFails if there aren't unit clauses.
Throws System.Collections.Generic.KeyNotFoundException: An index satisfying the predicate was not found in the collection. .
|
Function or value | Description | ||
|
Example
Evaluates to [[`p`; `t`]] .
Example
Throws System.Exception: affirmative_negative_rule .
|
||
Full Usage:
hasPureLiteral clauses
Parameters:
formula<'a> list list
-
The input clauses to be checked.
Returns: bool
true, if clauses contain pure literals; otherwise, false.
|
A literal is said to be 'pure' if it occurs only positively or only negatively in the list of clauses.
NoteThis function is not part of the original code: it has been added to remove the use of exceptions as control flow (which causes performance degradation in F#) in the implementations of the DP and DPLL procedures. Example
Evaluates to false .
Example
Evaluates to true .
|
||
|
A literal is said to be 'pure' if it occurs only positively or only negatively in the list of clauses.
NoteThis function is not part of the original code: it has been added to remove the use of exceptions as control flow (which causes performance degradation in F#) in the implementations of the DP and DPLL procedures. Example
Evaluates to [`q`] .
Example
Evaluates to [] .
|
Function or value | Description |
|
Example
|
Full Usage:
resolution_rule clauses
Parameters:
formula<'a> list list
-
The input clauses.
Returns: formula<'a> list list
The result of resolving the input clauses on the literal which minimizes DP.resolution_blowup.
|
Example
Evaluates to [[`c`; `d`]; [`q`; `~c`]; [`q`; `~d`]; [`q`; `~e`];[`~q`; `e`]; [`~q`; `~d`]] .
|
|
NoteThis rule can increase the clauses' size. Example
Evaluates to [[`c1`; `c2`; `d1`; `d2`; `d3`; `d4`]; [`d1`; `d2`;`d3`; `d4`; `e1`; `e2`];[`q`; `t`]] .
Example
Evaluates to [[`a`]; [`b`]] .
|
Function or value | Description |
Full Usage:
dp clauses
Parameters:
formula<'a> list list
-
The input clauses.
Returns: bool
true, if the recursive application of the rules leads to an empty set
of clauses (meaning that the input is satisfiable); otherwise, when the
rules lead to a set that contains an empty clause, false (meaning that
the input is unsatisfiable).
|
Tests the (propositional) satisfiability of a list of clauses (to be understood as an iterated conjunction of disjunctions), using the Davis-Putnam procedure which consists in applying recursively the rules DP.one_literal_rule, DP.affirmative_negative_rule and DP.resolution_rule
Example
Evaluates to true .
Example
Evaluates to false .
|
Function or value | Description |
Full Usage:
dpll clauses
Parameters:
formula<'a> list list
-
The input clauses.
Returns: bool
true, if the recursive application of the rules leads to an empty set
of clauses (meaning that the input is satisfiable); otherwise, when the
rules lead to a set that contains an empty clause, false (meaning that
the input is unsatisfiable).
|
Tests the (propositional) satisfiability of a list of clauses (to be understood as an iterated conjunction of disjunctions), using the Davis-Putnam-Loveland-Logemann procedure which consists in applying recursively the rules DP.one_literal_rule, DP.affirmative_negative_rule and, if neither of these is applicable (instead of DP.resolution_rule) the splitting rule. The splitting rule consists in choosing some literal and testing, separately, the satisfiability of the union of the input with this literal and its negation, respectively: if one of these is satisfiable so the original input is. The literal that maximizes DP.posneg_count is chosen for the splitting rule.
Example
Evaluates to true .
Example
Evaluates to false .
|
|
|
|
|
|
It is used as an heuristic to chose the literal for the splitting rule in the Davis-Putnam-Loveland-Logemann procedure.
Example
Evaluates to 5 .
|
Function or value | Description |
|
Example
Evaluates to
[(`a`, Guessed); (`e`, Deduced); (`d`, Guessed)] .
Example
Evaluates to
[] .
|
|
Example
Evaluates to false .
Example
Evaluates to true .
|
|
Example
Evaluates to true .
Example
Evaluates to false .
|
|
Example
Evaluates to false .
Example
Evaluates to true .
|
|
Example
val trail: (obj * obj) list
Evaluates to [`c`; `d`; `e`] .
|
Full Usage:
unit_propagate (cls, trail)
Parameters:
formula<'a> list list
-
The input clauses.
trail : (formula<'a> * trailmix) list
-
The input trail of assigned literals.
Returns: formula<'a> list list * (formula<'a> * trailmix) list
The tuple of the clauses and trail updated with the
result of unit propagation.
|
The clauses are updated only from the point of view of the removing of unit clauses' complementary literals, if there are.
Example
Evaluates to
([[`p`]; [`p`; `q`]], [(`p`, Deduced)]) .
Example
Evaluates to
([[`p`]; [`q`]], [(`q`, Deduced); (`p`, Deduced)]) .
|
Full Usage:
unit_subpropagate (cls, fn, trail)
Parameters:
formula<'a> list list
-
The input clauses.
fn : func<formula<'a>, unit>
-
The fpf to process the trail.
trail : (formula<'a> * trailmix) list
-
The input trail of assigned literals.
Returns: formula<'a> list list * func<formula<'a>, unit> * (formula<'a> * trailmix) list
The triple of the clauses, fpf and trail updated with the result of
unit propagation.
|
The clauses are updated only from the point of view of the removing of unit clauses' complementary literals, if there are.
Example
val cls: obj
val fpf: obj
val trail: obj
Evaluates to
([[`p`]; [`p`; `q`]], [(`p`, ())], [(`p`, Deduced)]) .
Example
val cls: obj
val fpf: obj
val trail: obj
Evaluates to
([[`p`]; [`q`]], [(`p`, ()); (`q`, ())], [(`q`, Deduced); (`p`, Deduced)]) .
|
Function or value | Description |
Full Usage:
backjump cls p trail
Parameters:
formula<'a> list list
-
The input clauses.
p : formula<'a>
-
The literal to check.
trail : (formula<'a> * trailmix) list
-
The input trail of assigned literals.
Returns: (formula<'a> * trailmix) list
true, if the input formula is a tautology: otherwise false.
|
Example
Evaluates to [(`p`, Deduced); (`d`, Guessed)] .
|
|
Example
Evaluates to false .
Example
Evaluates to true .
|
|
Example
Evaluates to true .
Example
Evaluates to false .
|
|
Example
Evaluates to false .
Example
Evaluates to true .
Exampledplbtaut is 4X more faster than dplitaut:
|