mCRL2
Loading...
Searching...
No Matches
mcrl2::pbes_system::pbesinst_lazy_algorithm Class Reference

A PBES instantiation algorithm that uses a lazy strategy. More...

#include <pbesinst_lazy.h>

Inheritance diagram for mcrl2::pbes_system::pbesinst_lazy_algorithm:
mcrl2::pbes_system::pbesinst_structure_graph_algorithm mcrl2::pbes_system::pbesinst_structure_graph_algorithm2

Public Member Functions

 pbesinst_lazy_algorithm (const pbessolve_options &options, const pbes &p)
 Constructor.
 
virtual ~pbesinst_lazy_algorithm ()=default
 
virtual void on_report_equation (const std::size_t, const propositional_variable_instantiation &, const pbes_expression &, std::size_t)
 Reports BES equations that are produced by the algorithm. This function is called for every BES equation X = psi with rank k that is produced. By default it does nothing.
 
virtual void on_discovered_elements (const std::set< propositional_variable_instantiation > &)
 This function is called when new elements are added to discovered.
 
virtual void on_end_while_loop ()
 This function is called right after the while loop is finished.
 
void next_todo (propositional_variable_instantiation &result)
 
const fixpoint_symbolsymbol (std::size_t i) const
 
virtual void rewrite_psi (const std::size_t, pbes_expression &result, const fixpoint_symbol &symbol, const propositional_variable_instantiation &X, const pbes_expression &psi)
 
virtual bool solution_found (const propositional_variable_instantiation &) const
 
virtual void run_thread (const std::size_t thread_index, pbesinst_lazy_todo &todo, std::atomic< std::size_t > &number_of_active_processes, data::mutable_indexed_substitution<> sigma, enumerate_quantifiers_rewriter R)
 
virtual void run ()
 Runs the algorithm. The result is obtained by calling the function get_result.
 
const pbes_equation_indexequation_index () const
 
enumerate_quantifiers_rewriterrewriter ()
 

Protected Member Functions

virtual std::string status_message (std::size_t equation_count)
 
pbes preprocess (const pbes &x) const
 
data::rewriter construct_rewriter (const pbes &pbesspec)
 

Static Protected Member Functions

static void rewrite_true_false (pbes_expression &result, const fixpoint_symbol &symbol, const propositional_variable_instantiation &X, const pbes_expression &psi)
 

Protected Attributes

const pbessolve_optionsm_options
 Algorithm options.
 
data::rewriter datar
 Data rewriter.
 
pbes m_pbes
 A PBES.
 
pbes_equation_index m_equation_index
 A lookup map for PBES equations.
 
pbesinst_lazy_todo todo
 The propositional variable instantiations that need to be handled.
 
atermpp::indexed_set< propositional_variable_instantiation, true > discovered
 The propositional variable instantiations that have been discovered (not necessarily handled).
 
propositional_variable_instantiation init
 The initial value (after rewriting).
 
std::size_t m_iteration_count = 0
 
enumerate_quantifiers_rewriter m_global_R
 The rewriter.
 
utilities::mutex m_todo_access
 
volatile bool m_must_abort = false
 

Detailed Description

A PBES instantiation algorithm that uses a lazy strategy.

Definition at line 174 of file pbesinst_lazy.h.

Constructor & Destructor Documentation

◆ pbesinst_lazy_algorithm()

mcrl2::pbes_system::pbesinst_lazy_algorithm::pbesinst_lazy_algorithm ( const pbessolve_options options,
const pbes p 
)
inlineexplicit

Constructor.

Parameters
pThe pbes used in the exploration algorithm.
rewrite_strategyA strategy for the data rewriter.
search_strategyThe search strategy used to explore the pbes, typically depth or breadth first.
optimizationAn indication of the optimisation level.

Definition at line 293 of file pbesinst_lazy.h.

◆ ~pbesinst_lazy_algorithm()

virtual mcrl2::pbes_system::pbesinst_lazy_algorithm::~pbesinst_lazy_algorithm ( )
virtualdefault

Member Function Documentation

◆ construct_rewriter()

data::rewriter mcrl2::pbes_system::pbesinst_lazy_algorithm::construct_rewriter ( const pbes pbesspec)
inlineprotected

Definition at line 272 of file pbesinst_lazy.h.

◆ equation_index()

const pbes_equation_index & mcrl2::pbes_system::pbesinst_lazy_algorithm::equation_index ( ) const
inline

Definition at line 497 of file pbesinst_lazy.h.

◆ next_todo()

void mcrl2::pbes_system::pbesinst_lazy_algorithm::next_todo ( propositional_variable_instantiation result)
inline

Definition at line 323 of file pbesinst_lazy.h.

◆ on_discovered_elements()

virtual void mcrl2::pbes_system::pbesinst_lazy_algorithm::on_discovered_elements ( const std::set< propositional_variable_instantiation > &  )
inlinevirtual

This function is called when new elements are added to discovered.

Reimplemented in mcrl2::pbes_system::pbesinst_structure_graph_algorithm2.

Definition at line 316 of file pbesinst_lazy.h.

◆ on_end_while_loop()

virtual void mcrl2::pbes_system::pbesinst_lazy_algorithm::on_end_while_loop ( )
inlinevirtual

This function is called right after the while loop is finished.

Reimplemented in mcrl2::pbes_system::pbesinst_structure_graph_algorithm2.

Definition at line 320 of file pbesinst_lazy.h.

◆ on_report_equation()

virtual void mcrl2::pbes_system::pbesinst_lazy_algorithm::on_report_equation ( const std::size_t  ,
const propositional_variable_instantiation ,
const pbes_expression ,
std::size_t   
)
inlinevirtual

Reports BES equations that are produced by the algorithm. This function is called for every BES equation X = psi with rank k that is produced. By default it does nothing.

Reimplemented in mcrl2::pbes_system::pbesinst_structure_graph_algorithm2, and mcrl2::pbes_system::pbesinst_structure_graph_algorithm.

Definition at line 309 of file pbesinst_lazy.h.

◆ preprocess()

pbes mcrl2::pbes_system::pbesinst_lazy_algorithm::preprocess ( const pbes x) const
inlineprotected

Definition at line 224 of file pbesinst_lazy.h.

◆ rewrite_psi()

virtual void mcrl2::pbes_system::pbesinst_lazy_algorithm::rewrite_psi ( const std::size_t  ,
pbes_expression result,
const fixpoint_symbol symbol,
const propositional_variable_instantiation X,
const pbes_expression psi 
)
inlinevirtual

Reimplemented in mcrl2::pbes_system::pbesinst_structure_graph_algorithm2.

Definition at line 343 of file pbesinst_lazy.h.

◆ rewrite_true_false()

static void mcrl2::pbes_system::pbesinst_lazy_algorithm::rewrite_true_false ( pbes_expression result,
const fixpoint_symbol symbol,
const propositional_variable_instantiation X,
const pbes_expression psi 
)
inlinestaticprotected

Definition at line 237 of file pbesinst_lazy.h.

◆ rewriter()

enumerate_quantifiers_rewriter & mcrl2::pbes_system::pbesinst_lazy_algorithm::rewriter ( )
inline

Definition at line 502 of file pbesinst_lazy.h.

◆ run()

virtual void mcrl2::pbes_system::pbesinst_lazy_algorithm::run ( )
inlinevirtual

Runs the algorithm. The result is obtained by calling the function get_result.

Reimplemented in mcrl2::pbes_system::pbesinst_structure_graph_algorithm.

Definition at line 443 of file pbesinst_lazy.h.

◆ run_thread()

virtual void mcrl2::pbes_system::pbesinst_lazy_algorithm::run_thread ( const std::size_t  thread_index,
pbesinst_lazy_todo todo,
std::atomic< std::size_t > &  number_of_active_processes,
data::mutable_indexed_substitution<>  sigma,
enumerate_quantifiers_rewriter  R 
)
inlinevirtual

Definition at line 365 of file pbesinst_lazy.h.

◆ solution_found()

virtual bool mcrl2::pbes_system::pbesinst_lazy_algorithm::solution_found ( const propositional_variable_instantiation ) const
inlinevirtual

Reimplemented in mcrl2::pbes_system::pbesinst_structure_graph_algorithm2.

Definition at line 360 of file pbesinst_lazy.h.

◆ status_message()

virtual std::string mcrl2::pbes_system::pbesinst_lazy_algorithm::status_message ( std::size_t  equation_count)
inlineprotectedvirtual

Reimplemented in mcrl2::pbes_system::pbesinst_structure_graph_algorithm.

Definition at line 211 of file pbesinst_lazy.h.

◆ symbol()

const fixpoint_symbol & mcrl2::pbes_system::pbesinst_lazy_algorithm::symbol ( std::size_t  i) const
inline

Definition at line 337 of file pbesinst_lazy.h.

Member Data Documentation

◆ datar

data::rewriter mcrl2::pbes_system::pbesinst_lazy_algorithm::datar
protected

Data rewriter.

Definition at line 181 of file pbesinst_lazy.h.

◆ discovered

atermpp::indexed_set<propositional_variable_instantiation, true> mcrl2::pbes_system::pbesinst_lazy_algorithm::discovered
protected

The propositional variable instantiations that have been discovered (not necessarily handled).

Definition at line 193 of file pbesinst_lazy.h.

◆ init

propositional_variable_instantiation mcrl2::pbes_system::pbesinst_lazy_algorithm::init
protected

The initial value (after rewriting).

Definition at line 196 of file pbesinst_lazy.h.

◆ m_equation_index

pbes_equation_index mcrl2::pbes_system::pbesinst_lazy_algorithm::m_equation_index
protected

A lookup map for PBES equations.

Definition at line 187 of file pbesinst_lazy.h.

◆ m_global_R

enumerate_quantifiers_rewriter mcrl2::pbes_system::pbesinst_lazy_algorithm::m_global_R
protected

The rewriter.

Definition at line 203 of file pbesinst_lazy.h.

◆ m_iteration_count

std::size_t mcrl2::pbes_system::pbesinst_lazy_algorithm::m_iteration_count = 0
protected

Definition at line 199 of file pbesinst_lazy.h.

◆ m_must_abort

volatile bool mcrl2::pbes_system::pbesinst_lazy_algorithm::m_must_abort = false
protected

Definition at line 208 of file pbesinst_lazy.h.

◆ m_options

const pbessolve_options& mcrl2::pbes_system::pbesinst_lazy_algorithm::m_options
protected

Algorithm options.

Definition at line 178 of file pbesinst_lazy.h.

◆ m_pbes

pbes mcrl2::pbes_system::pbesinst_lazy_algorithm::m_pbes
protected

A PBES.

Definition at line 184 of file pbesinst_lazy.h.

◆ m_todo_access

utilities::mutex mcrl2::pbes_system::pbesinst_lazy_algorithm::m_todo_access
protected

Definition at line 206 of file pbesinst_lazy.h.

◆ todo

pbesinst_lazy_todo mcrl2::pbes_system::pbesinst_lazy_algorithm::todo
protected

The propositional variable instantiations that need to be handled.

Definition at line 190 of file pbesinst_lazy.h.


The documentation for this class was generated from the following file: