mCRL2
Loading...
Searching...
No Matches
pbesinfo.h
Go to the documentation of this file.
1// Author(s): Wieger Wesselink
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12#ifndef MCRL2_PBES_TOOLS_PBESINFO_H
13#define MCRL2_PBES_TOOLS_PBESINFO_H
14
16#include "mcrl2/pbes/io.h"
17
18namespace mcrl2 {
19
20namespace pbes_system {
21
22void pbesinfo(const std::string& input_filename,
23 const std::string& input_file_message,
24 const utilities::file_format& file_format,
25 bool opt_full
26 )
27{
28 pbes p;
29 load_pbes(p, input_filename, file_format);
30
32
33 // Show file from which PBES was read
34 std::cout << input_file_message << "\n\n";
35
36 // Show number of equations
37 std::cout << "Number of equations: " << p.equations().size() << std::endl;
38
39 // Show number of mu's with the predicate variables from the mu's
40 std::cout << "Number of mu's: " << info["mu_equation_count"] << std::endl;
41
42 // Show number of nu's with the predicate variables from the nu's
43 std::cout << "Number of nu's: " << info["nu_equation_count"] << std::endl;
44
45 // Show number of nu's with the predicate variables from the nu's
46 std::cout << "Block nesting depth: " << info["block_nesting_depth"] << std::endl;
47
48 // Show if PBES is closed and well formed
49 std::cout << "The PBES is closed: " << std::flush;
50 std::cout << (p.is_closed() ? "yes" : "no ") << std::endl;
51 std::cout << "The PBES is well formed: " << std::flush;
52 std::cout << (p.is_well_typed() ? "yes" : "no ") << std::endl;
53
54 // Show binding variables with their signature
55 if (opt_full)
56 {
57 std::cout << "Predicate variables:\n";
58 for (std::vector<pbes_equation>::const_iterator i = p.equations().begin(); i != p.equations().end(); ++i)
59 {
60 std::cout << core::pp(i->symbol()) << "." << pp(i->variable()) << std::endl;
61 }
62 }
63}
64
65} // namespace pbes_system
66
67} // namespace mcrl2
68
69#endif // MCRL2_PBES_TOOLS_PBESINFO_H
Stores the following properties of a linear process specification:
parameterized boolean equation system
Definition pbes.h:58
bool is_closed() const
True if the pbes is closed.
Definition pbes.h:245
const std::vector< pbes_equation > & equations() const
Returns the equations.
Definition pbes.h:164
bool is_well_typed() const
Checks if the PBES is well typed.
Definition pbes.h:267
std::string pp(const identifier_string &x)
Definition core.cpp:26
void load_pbes(pbes &pbes, std::istream &stream, utilities::file_format format, const std::string &source="")
Load a PBES from file.
Definition io.cpp:82
void pbesinfo(const std::string &input_filename, const std::string &input_file_message, const utilities::file_format &file_format, bool opt_full)
Definition pbesinfo.h:22
std::string pp(const fixpoint_symbol &x)
Definition pbes.cpp:37
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
IO routines for boolean equation systems.
A property map containing properties of an LPS specification.