|
| CUDA | Simplifier (AType atype, AType store_aty, abstract_ptr< sub_type > sub, const allocator_type &alloc=allocator_type()) |
| |
| CUDA | Simplifier (this_type &&other) |
| |
| template<class A2 , class Alloc2 > |
| CUDA | Simplifier (const Simplifier< A2, Alloc2 > &other, light_copy_tag tag, abstract_ptr< sub_type > sub, const allocator_type &alloc=allocator_type()) |
| |
| CUDA allocator_type | get_allocator () const |
| |
| CUDA AType | aty () const |
| |
| CUDA local::B | is_bot () const |
| |
| CUDA size_t | vars () const |
| |
| template<bool diagnose = false, class F , class Env , class Alloc2 > |
| CUDA NI bool | interpret_tell (const F &f, Env &env, tell_type< Alloc2 > &tell, IDiagnostics &diagnostics) const |
| |
| template<IKind kind, bool diagnose = false, class F , class Env , class Alloc2 > |
| CUDA bool | interpret (const F &f, Env &env, tell_type< Alloc2 > &tell, IDiagnostics &diagnostics) const |
| |
| CUDA void | initialize (int num_vars, int num_cons) |
| |
| template<class Seq > |
| CUDA void | initialize_tnf (int num_vars, const Seq &tnf) |
| |
| template<class Alloc2 > |
| CUDA bool | deduce (tell_type< Alloc2 > &&t) |
| |
| CUDA AVar | var_of (const TFormula< allocator_type > &f) const |
| |
| template<class Alloc , class Abs , class Env > |
| CUDA void | print_variable (const LVar< Alloc > &vname, const Env &benv, const Abs &b) const |
| |
| CUDA local::B | cons_deduce (int i) |
| |
| CUDA size_t | num_deductions () const |
| |
| CUDA local::B | deduce (size_t i) |
| |
| template<class Env > |
| CUDA void | init_env (const Env &env) |
| |
| template<class Seq > |
| CUDA bool | i_cse (const Seq &tnf, SimplifierStats &stats) |
| |
| template<class Seq > |
| CUDA bool | algebraic_simplify (Seq &tnf, SimplifierStats &stats) |
| |
| CUDA void | meet_equivalence_classes () |
| |
| template<class B , class Seq > |
| CUDA void | eliminate_entailed_constraints (const B &b, const Seq &tnf, SimplifierStats &stats) |
| |
| template<class Seq > |
| CUDA void | eliminate_useless_variables (const Seq &tnf, size_t &num_eliminated_variables) |
| |
| template<class F > |
| CUDA void | substitute (F &f) const |
| |
| CUDA size_t | num_vars_after_elimination () const |
| |
| template<class Seq > |
| CUDA NI TFormula< allocator_type > | deinterpret (const Seq &source, bool substitute) |
| |
| CUDA NI TFormula< allocator_type > | deinterpret () |
| |
template<class A, class Allocator>
class lala::Simplifier< A, Allocator >
This abstract domain works at the level of logical formulas. It deduces the formula by performing a number of simplifications w.r.t. an underlying abstract domain including:
- Removing assigned variables.
- Removing unused variables.
- Removing entailed formulas.
- Removing variable equality by tracking equivalence classes.
The simplified formula can be obtained by calling deinterpret(). Given a solution to the simplified formula, the value of the variables deleted can be obtained by calling print_variable().
template<class A , class Allocator >
template<class Seq >
I-CSE algorithm. For each pair of TNF constraints x <=> y op z and ‘x’ <=> y' op' z', whenever[y'] = [y],op = op'and[z] = [z'], we add the equivalencex = x'and eliminate the second constraint. Note that [x] represents the equivalence class ofx. To avoid an algorithm running in O(n^2), we use a hash map to detect syntactical equivalence betweeny op zandy' op z'`. Further, for commutative operators, we redefine the equality function.
This algorithm is applied until a fixpoint is reached.
- Returns
- The number of formulas eliminated.