public class CNF
extends java.lang.Object
Diese Klasse ist das gesamte oeffentliche Interface des
Pakets cnf. Die anderen Klassen stellen kein
oeffentliches Interface bereit.
| Modifier and Type | Method and Description |
|---|---|
static Formula |
and(Formula f1,
Formula f2)
Erzeugt die Konjunktion zweier Formeln.
|
static Formula |
and(java.util.List<Formula> fms)
Erzeugt die Konjunktion einer Liste von Formeln.
|
static Formula |
cnf(Formula f)
Gibt eine zur uebergebenen Formel erfuellbarkeitsaequivalente
Formel in CNF zurueck.
|
static java.lang.String |
cnfDIMACS(Formula f)
Gibt eine zur uebergebenen Formel erfuellbarkeitsaequivalente
Formel in CNF als String im DIMACS zurueck.
|
static VarName |
freshVarName()
Erzeugt eine neue Variable.
|
static Formula |
iff(Formula fm1,
Formula fm2)
Erzeugt die Biimplikation zweier Formeln.
|
static Formula |
imp(Formula fm1,
Formula fm2)
Erzeugt die Implikation zweier Formeln.
|
static Formula |
neg(Formula f)
Erzeugt die Negation einer gegbenen Formel.
|
static Formula |
or(Formula f1,
Formula f2)
Erzeugt die Disjunktion zweier Formeln.
|
static Formula |
or(java.util.List<Formula> fms)
Erzeugt die Disjunktion einer Liste von Formeln.
|
static void |
reset()
Setzt den Variablennamengenerator zurueck.
|
static java.util.Set<VarName> |
satisfiable(Formula f)
Wandelt die uebergebene Formel in eine erfuellbarkeitsaequivalente Formel
in CNF um und ueberprueft sie mittels des SAT-Solvers SAT4j auf Erfuellbarkeit.
|
static Formula |
var(VarName name)
Erzeugt die Formel, die durch eine aussagenlogische Variable
gegeben ist.
|
static Formula |
xor(Formula fm1,
Formula fm2)
Erzeugt das exklusive Oder zweier Formeln.
|
public static Formula var(VarName name)
name - Name der Variablepublic static Formula and(java.util.List<Formula> fms)
public static Formula or(java.util.List<Formula> fms)
public static Formula imp(Formula fm1, Formula fm2)
fm1 - Formelfm2 - Formelpublic static Formula iff(Formula fm1, Formula fm2)
fm1 - Formelfm2 - Formelpublic static Formula cnf(Formula f)
Diese Methode kann zum Anzeigen der CNF einer Formel benutzt werden:
System.out.println(cnf(f)).
f - Formelpublic static java.lang.String cnfDIMACS(Formula f)
public static java.util.Set<VarName> satisfiable(Formula f) throws TimeoutException
null, wenn es keine solche gibt.f - Formelf wahr sind; oder null wenn f
unerfuellbar ist.TimeoutExceptionpublic static VarName freshVarName()
public static void reset()