Package ru.ispras.fortress.logic
Class Orthogonalizer
- java.lang.Object
-
- ru.ispras.fortress.logic.Orthogonalizer
-
public final class Orthogonalizer extends java.lang.Object
Orthogonalizer
contains a set of utils dealing with disjunctive normal forms.
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static boolean
areDisjoint(Clause lhs, Clause rhs)
Checks whether two clauses (conjuncts),lhs
andrhs
, are disjoint (mutually exclusive, or orthogonal).static boolean
areDisjoint(Clause lhs, Clause rhs, java.util.Set<Clause> conflicts)
Checks whether two clauses (conjuncts),lhs
andrhs
, are disjoint (mutually exclusive, or orthogonal) w.r.t.static NormalForm
orthogonalize(NormalForm form)
Orthogonalizes the specified DNF, i.e.static NormalForm
orthogonalize(NormalForm form, java.util.Set<Clause> conflicts)
Orthogonalizes the specified DNF, i.e.
-
-
-
Method Detail
-
areDisjoint
public static boolean areDisjoint(Clause lhs, Clause rhs)
Checks whether two clauses (conjuncts),lhs
andrhs
, are disjoint (mutually exclusive, or orthogonal).- Parameters:
lhs
- the left-hand-side clause.rhs
- the right-hand-side clause.- Returns:
true
if the clauses are disjoint;false
otherwise.
-
areDisjoint
public static boolean areDisjoint(Clause lhs, Clause rhs, java.util.Set<Clause> conflicts)
Checks whether two clauses (conjuncts),lhs
andrhs
, are disjoint (mutually exclusive, or orthogonal) w.r.t. the given set of conflicts.- Parameters:
lhs
- the left-hand-side clause.rhs
- the right-hand-side clause.conflicts
- the set of conflicts.- Returns:
true
if the clauses are disjoint;false
otherwise.
-
orthogonalize
public static NormalForm orthogonalize(NormalForm form, java.util.Set<Clause> conflicts)
Orthogonalizes the specified DNF, i.e. constructs an equivalent DNF consisting of disjoint clauses.- Parameters:
form
- the DNF to be orthogonalized.conflicts
- the set of conflicts.- Returns:
- the orthogonal DNF equivalent to the specified one.
-
orthogonalize
public static NormalForm orthogonalize(NormalForm form)
Orthogonalizes the specified DNF, i.e. constructs an equivalent DNF consisting of disjoint clauses.- Parameters:
form
- the DNF to be orthogonalized.- Returns:
- the orthogonal DNF equivalent to the specified one.
-
-