12#ifndef MCRL2_PBES_PBESINST_STRUCTURE_GRAPH_H
13#define MCRL2_PBES_PBESINST_STRUCTURE_GRAPH_H
17#include "mcrl2/pbes/algorithms.h"
18#include "mcrl2/pbes/join.h"
19#include "mcrl2/pbes/pbesinst_lazy.h"
20#include "mcrl2/pbes/structure_graph_builder.h"
21#include "mcrl2/utilities/logger.h"
36 auto vertex_phi = m_graph_builder.insert_variable(X, psi, k);
48 m_graph_builder.insert_edge(vertex_phi, vertex_psi);
52 for (
const pbes_expression& psi_i: split_and(psi))
54 auto vertex_psi_i = SG1(psi_i);
55 m_graph_builder.insert_edge(vertex_phi, vertex_psi_i);
60 for (
const pbes_expression& psi_i: split_or(psi))
62 auto vertex_psi_i = SG1(psi_i);
63 m_graph_builder.insert_edge(vertex_phi, vertex_psi_i);
85 for (
const pbes_expression& psi_i: split_and(psi))
87 auto vertex_psi_i = SG1(psi_i);
88 m_graph_builder.insert_edge(vertex_psi, vertex_psi_i);
93 for (
const pbes_expression& psi_i: split_or(psi))
95 auto vertex_psi_i = SG1(psi_i);
96 m_graph_builder.insert_edge(vertex_psi, vertex_psi_i);
104 if (equation_count > 0 && equation_count % 1000 == 0)
106 std::ostringstream out;
107 out <<
"Generated " << equation_count <<
" BES equations (" << std::fixed << std::setprecision(2) <<
108 ((100.0 *
static_cast<
double>(equation_count)) /
static_cast<
double>(m_graph_builder.extent())) <<
"% explored)" << std::endl;
120 std::optional<data::rewriter> rewriter =
std::
nullopt
parameterized boolean equation system
A PBES instantiation algorithm that uses a lazy strategy.
virtual void run()
Runs the algorithm. The result is obtained by calling the function get_result.
Variant of pbesinst that will compute a structure graph for a PBES. The result will be put in the str...
detail::structure_graph_builder m_graph_builder
pbesinst_structure_graph_algorithm(const pbessolve_options &options, const pbes &p, structure_graph &G, std::optional< data::rewriter > rewriter=std::nullopt)
void run() override
Runs the algorithm. The result is obtained by calling the function get_result.
structure_graph::index_type SG1(const pbes_expression &psi)
void on_report_equation(const std::size_t, const propositional_variable_instantiation &X, const pbes_expression &psi, std::size_t k) override
Reports BES equations that are produced by the algorithm. This function is called for every BES equat...
std::optional< std::string > status_message(std::size_t equation_count) override
void SG0(const propositional_variable_instantiation &X, const pbes_expression &psi, std::size_t k)
\brief A propositional variable instantiation
const data::data_expression & undefined_data_expression()
Returns a data expression that corresponds to 'undefined'.
bool is_or(const atermpp::aterm &x)
bool is_false(const pbes_expression &t)
Test for the value false.
bool is_propositional_variable_instantiation(const atermpp::aterm &x)
bool is_and(const atermpp::aterm &x)
bool is_true(const pbes_expression &t)
Test for the value true.
void set_initial_state(const propositional_variable_instantiation &x)
pbes_expression m_initial_state
structure_graph_builder(structure_graph &G)
index_type insert_vertex(const pbes_expression &x)
index_type insert_variable(const pbes_expression &x)