|
mCRL2
|
#include <bqnf2ppg_rewriter.h>
Public Types | |
| using | equation_type = pbes_equation |
| The equation type. | |
| using | term_type = pbes_expression |
| The expression type of the equation. | |
Public Member Functions | |
| bqnf2ppg_rewriter (const pbes &p) | |
| Constructor. | |
| virtual std::vector< equation_type > | result () |
| Returns the result of the transformation. | |
| virtual std::string | fresh_variable_name (const std::string &s) |
| Generates a fresh variable name, based on s (extending s). | |
| virtual bool | visit_inner_implies (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e, const data::variable_list &qvars, const term_type &qexpr) |
| Visits a disjunctive expression qexpr within a bounded universal quantifier expression e. Rewrites the expression qexpr to PPG form and adds a universal quantifier over the variables qvars. The resulting equations are added to the sequence of result equations. | |
| bool | visit_bounded_forall (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e) override |
| Visits a bounded universal quantifier expression. Rewrites the expression to PPG form by collecting quantified variables and calling visit_inner_implies. The resulting equations are added to the sequence of result equations. | |
| virtual bool | visit_inner_and_quantified (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e, const data::variable_list &qvars, const term_type &qexpr) |
| Visits a conjunctive expression qexpr within a bounded existential quantifier expression e. Rewrites the expression qexpr to PPG form and adds a existential quantifier over the variables qvars. The resulting equations are added to the sequence of result equations. | |
| bool | visit_bounded_exists (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e) override |
| Visits a bounded existential quantifier expression. Rewrites the expression to PPG form by collecting quantified variables and calling visit_inner_and. The resulting equations are added to the sequence of result equations. | |
| virtual std::pair< term_type, equation_type > | rewrite_inner_bounded_forall (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e, const equation_type &dummy) |
| Rewrites an inner bounded universal quantifier expression to PPG form. Returns the rewritten expression and possibly a newly introduced equation. The new equation is itself not rewritten yet. | |
| bool | visit_and (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e) override |
| Visits a conjunctive expression. Rewrites the expression to PPG form. The resulting equations are added to the sequence of result equations. | |
| virtual std::pair< term_type, equation_type > | rewrite_inner_bounded_exists (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e, const equation_type &dummy) |
| Rewrites an inner bounded existential quantifier expression to PPG form. Returns the rewritten expression and possibly a newly introduced equation. The new equation is itself not rewritten yet. | |
| bool | visit_or (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e) override |
| Visits a disjunctive expression. Rewrites the expression to PPG form. The resulting equations are added to the sequence of result equations. | |
| bool | visit_bqnf_expression (const fixpoint_symbol &sigma, const propositional_variable &var, const term_type &e) override |
| Visits a BQNF expression. Rewrites the expression to PPG form. The resulting equations are added to the sequence of result equations. | |
| bool | visit_bqnf_equation (const equation_type &eqn) override |
| Visits a BQNF equation. Rewrites the equation to a PPG equation. The resulting equations are added to the sequence of result equations. | |
Public Member Functions inherited from mcrl2::pbes_system::detail::bqnf_visitor | |
| virtual | ~bqnf_visitor ()=default |
| Destructor. | |
| virtual bool | visit_simple_expression (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a simple expression. An expression is simple if it does not contain propositional variables. | |
| virtual bool | visit_propositional_variable (const fixpoint_symbol &, const propositional_variable &, const pbes_expression &e) |
| Visits a propositional variable expression. | |
| virtual bool | visit_inner_and (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a conjunctive expression within an inner existential quantifier expression. | |
| virtual bool | visit_inner_bounded_exists (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a bounded existential quantifier expression within a disjunctive expression. | |
| virtual bool | visit_or (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a disjunctive expression. | |
| virtual bool | visit_inner_bounded_forall (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a bounded universal quantifier expression within a conjunctive expression. | |
| virtual bool | visit_and (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a conjunctive expression. | |
| virtual bool | visit_bounded_forall (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a bounded universal quantifier expression. | |
| virtual bool | visit_bounded_exists (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a bounded existential quantifier expression. | |
| virtual bool | visit_bounded_quantifier (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a bounded quantifier expression. | |
| virtual bool | visit_bqnf_expression (const fixpoint_symbol &sigma, const propositional_variable &var, const pbes_expression &e) |
| Visits a BQNF expression. | |
| virtual bool | visit_bqnf_expression (const pbes_expression &e) |
| Visits a BQNF expression. In the current BQNF visitor sigma and var parameters are added for use in bqnf2ppg_rewriter. This functions adds dummy values for sigma and var. | |
| virtual bool | visit_bqnf_equation (const pbes_equation &eqn) |
| Visits a BQNF equation. | |
| virtual bool | visit_bqnf_equation_debug (const pbes_equation &eqn) |
| Visits a BQNF equation in debug mode. | |
Public Attributes | |
| std::set< std::string > | variable_names |
| The set of variable names already in use. | |
| std::map< std::string, int > | variable_name_suffix |
| A map from variable name prefix to the last suffix that has been added. | |
| std::vector< equation_type > | equations |
| The sequence of equations resulting from the transformation. | |
Public Attributes inherited from mcrl2::pbes_system::detail::bqnf_visitor | |
| bool | debug = false |
| flag that indicates if debug output should be printed. | |
Additional Inherited Members | |
Static Public Member Functions inherited from mcrl2::pbes_system::detail::bqnf_visitor | |
| static std::string | print_brief (const pbes_expression &e) |
| Returns a string representation of the type of the root node of the expression. | |
| static bool | is_inner_and (const pbes_expression &e) |
| Determines if an expression if of the form phi /\ psi where phi is a simple expression and psi is an arbitrary expression. | |
| static bool | is_inner_implies (const pbes_expression &e) |
| Determines if an expression if of the form phi => psi or of the form phi \/ psi where phi is a simple expression and psi is an arbitrary expression. | |
Definition at line 28 of file bqnf2ppg_rewriter.h.
The equation type.
Definition at line 31 of file bqnf2ppg_rewriter.h.
The expression type of the equation.
Definition at line 33 of file bqnf2ppg_rewriter.h.
|
inline |
Constructor.
| p | The PBES of which the equation is part. Used to avoid name clashes when introducing new variables. |
Definition at line 44 of file bqnf2ppg_rewriter.h.
|
inlinevirtual |
Generates a fresh variable name, based on s (extending s).
| s | A string. |
Definition at line 63 of file bqnf2ppg_rewriter.h.
|
inlinevirtual |
Returns the result of the transformation.
Definition at line 55 of file bqnf2ppg_rewriter.h.
|
inlinevirtual |
Rewrites an inner bounded existential quantifier expression to PPG form. Returns the rewritten expression and possibly a newly introduced equation. The new equation is itself not rewritten yet.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | a PBES expression. |
| dummy | dummy equation, returned as equation if no equation is generated. |
Definition at line 408 of file bqnf2ppg_rewriter.h.
|
inlinevirtual |
Rewrites an inner bounded universal quantifier expression to PPG form. Returns the rewritten expression and possibly a newly introduced equation. The new equation is itself not rewritten yet.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | a PBES expression. |
| dummy | dummy equation, returned as equation if no equation is generated. |
Definition at line 297 of file bqnf2ppg_rewriter.h.
|
inlineoverridevirtual |
Visits a conjunctive expression. Rewrites the expression to PPG form. The resulting equations are added to the sequence of result equations.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | a PBES expression. |
Reimplemented from mcrl2::pbes_system::detail::bqnf_visitor.
Definition at line 367 of file bqnf2ppg_rewriter.h.
|
inlineoverridevirtual |
Visits a bounded existential quantifier expression. Rewrites the expression to PPG form by collecting quantified variables and calling visit_inner_and. The resulting equations are added to the sequence of result equations.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | a PBES expression. |
Reimplemented from mcrl2::pbes_system::detail::bqnf_visitor.
Definition at line 268 of file bqnf2ppg_rewriter.h.
|
inlineoverridevirtual |
Visits a bounded universal quantifier expression. Rewrites the expression to PPG form by collecting quantified variables and calling visit_inner_implies. The resulting equations are added to the sequence of result equations.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | a PBES expression. |
Reimplemented from mcrl2::pbes_system::detail::bqnf_visitor.
Definition at line 168 of file bqnf2ppg_rewriter.h.
|
inlineoverridevirtual |
Visits a BQNF equation. Rewrites the equation to a PPG equation. The resulting equations are added to the sequence of result equations.
| eqn | a PBES equation |
Reimplemented from mcrl2::pbes_system::detail::bqnf_visitor.
Definition at line 533 of file bqnf2ppg_rewriter.h.
|
inlineoverridevirtual |
Visits a BQNF expression. Rewrites the expression to PPG form. The resulting equations are added to the sequence of result equations.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | a PBES expression. |
Reimplemented from mcrl2::pbes_system::detail::bqnf_visitor.
Definition at line 508 of file bqnf2ppg_rewriter.h.
|
inlinevirtual |
Visits a conjunctive expression qexpr within a bounded existential quantifier expression e. Rewrites the expression qexpr to PPG form and adds a existential quantifier over the variables qvars. The resulting equations are added to the sequence of result equations.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | the parent PBES expression. |
| qvars | the quantifier variables of the quantifier in the parent expression. |
| qexpr | the PBES expression within the quantifier expression. |
Definition at line 198 of file bqnf2ppg_rewriter.h.
|
inlinevirtual |
Visits a disjunctive expression qexpr within a bounded universal quantifier expression e. Rewrites the expression qexpr to PPG form and adds a universal quantifier over the variables qvars. The resulting equations are added to the sequence of result equations.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | the parent PBES expression. |
| qvars | the quantifier variables of the quantifier in the parent expression. |
| qexpr | the PBES expression within the quantifier expression. |
Definition at line 90 of file bqnf2ppg_rewriter.h.
|
inlineoverridevirtual |
Visits a disjunctive expression. Rewrites the expression to PPG form. The resulting equations are added to the sequence of result equations.
| sigma | fixpoint symbol of the parent equation. |
| var | propositional variable of the parent equation. |
| e | a PBES expression. |
Reimplemented from mcrl2::pbes_system::detail::bqnf_visitor.
Definition at line 470 of file bqnf2ppg_rewriter.h.
| std::vector<equation_type> mcrl2::pbes_system::detail::bqnf2ppg_rewriter::equations |
The sequence of equations resulting from the transformation.
Definition at line 40 of file bqnf2ppg_rewriter.h.
| std::map<std::string,int> mcrl2::pbes_system::detail::bqnf2ppg_rewriter::variable_name_suffix |
A map from variable name prefix to the last suffix that has been added.
Definition at line 38 of file bqnf2ppg_rewriter.h.
| std::set<std::string> mcrl2::pbes_system::detail::bqnf2ppg_rewriter::variable_names |
The set of variable names already in use.
Definition at line 36 of file bqnf2ppg_rewriter.h.