Class: Udb::LogicNode::MemoizedState
- Inherits:
-
T::Struct
- Object
- T::Struct
- Udb::LogicNode::MemoizedState
- Defined in:
- lib/udb/logic.rb
Overview
object to hold results of expensive calculations LogicNode type and children are frozen at construction so we can safely remember and return these values
Instance Attribute Summary collapse
-
#cnf_form ⇒ LogicNode?
when not nil, an equisatisfiable representation of self in CNF form.
-
#equisat_cnf ⇒ LogicNode?
result of #equisat_cnf.
-
#equiv_cnf ⇒ LogicNode?
result of #equisat_cnf.
-
#is_cnf ⇒ Boolean?
when true, the formula is known to be in CNF form when false, the formula is known to not be in CNF form.
-
#is_nested_cnf ⇒ Boolean?
when true, a flattened version of the formula would be CNF when false, a flattened version of the formula would not be CNF.
-
#is_reduced ⇒ Boolean?
when true, the formula would be unaltered by calling reduce when false, the formula would be reduced further by calling reduce.
-
#is_satisfiable ⇒ Boolean?
when true, formula is known to be satisfiable when false, formula is known to be unsatisfiable.
-
#literals ⇒ Array<TermType>?
list of literals in the formula.
-
#terms ⇒ Array<TermType>?
list of terms in the formula.
Instance Method Summary collapse
Constructor Details
#initialize(is_cnf: nil, cnf_form: nil, is_nested_cnf: nil, is_reduced: nil, terms: nil, literals: nil, is_satisfiable: nil, equisat_cnf: nil, equiv_cnf: nil)
|
|
# File '' prop :is_cnf, T.nilable(T::Boolean) prop :cnf_form, T.nilable(LogicNode) prop :is_nested_cnf, T.nilable(T::Boolean) prop :is_reduced, T.nilable(T::Boolean) prop :terms, T.nilable(T::Array[TermType]) prop :literals, T.nilable(T::Array[TermType]) prop :is_satisfiable, T.nilable(T::Boolean) prop :equisat_cnf, T.nilable(LogicNode) prop :equiv_cnf, T.nilable(LogicNode) |
Instance Attribute Details
#cnf_form ⇒ LogicNode?
when not nil, an equisatisfiable representation of self in CNF form
|
|
# File '' prop :cnf_form, T.nilable(LogicNode) |
#is_cnf ⇒ Boolean?
when true, the formula is known to be in CNF form when false, the formula is known to not be in CNF form
|
|
# File '' prop :is_cnf, T.nilable(T::Boolean) |
#is_nested_cnf ⇒ Boolean?
when true, a flattened version of the formula would be CNF when false, a flattened version of the formula would not be CNF
|
|
# File '' prop :is_nested_cnf, T.nilable(T::Boolean) |
#is_reduced ⇒ Boolean?
when true, the formula would be unaltered by calling reduce when false, the formula would be reduced further by calling reduce
|
|
# File '' prop :is_reduced, T.nilable(T::Boolean) |
#is_satisfiable ⇒ Boolean?
when true, formula is known to be satisfiable when false, formula is known to be unsatisfiable
|
|
# File '' prop :is_satisfiable, T.nilable(T::Boolean) |