mCRL2
Loading...
Searching...
No Matches
pbessolve_options.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//
9/// \file mcrl2/pbes/pbessolve_options.h
10/// \brief add your file description here.
11
12#ifndef MCRL2_PBES_PBESSOLVE_OPTIONS_H
13#define MCRL2_PBES_PBESSOLVE_OPTIONS_H
14
15#include <iomanip>
16#include "mcrl2/core/detail/print_utility.h"
17#include "mcrl2/data/rewrite_strategy.h"
18#include "mcrl2/pbes/search_strategy.h"
19
20namespace mcrl2::pbes_system {
21
22/// \brief Enumeration of partial strategies for solving PBESs.
23enum class partial_solve_strategy: int {
24 none = -1,
34};
35
36inline
38{
39 try
40 {
41 int i;
42 is >> i;
43 strategy = static_cast<partial_solve_strategy>(i);
44 }
45 catch(mcrl2::runtime_error&)
46 {
47 is.setstate(std::ios_base::failbit);
48 }
49 return is;
50}
51
52inline
54{
55 os << static_cast<int>(strategy);
56 return os;
57}
58
60{
61 data::rewrite_strategy rewrite_strategy = data::jitty;
64 bool prune_todo_list = false;
65 search_strategy exploration_strategy = breadth_first;
67
68 // if true, apply optimization and pruning more frequently than by default.
70 // if true, apply optimizations at every iteration.
71 bool aggressive = false;
72
73 // if true, run the naive algorithm for instantiating pbes with counter example information.
75
76 // for doing a consistency check on the computed strategy
77 bool check_strategy = false;
78
80};
81
82inline
84{
85 out << "rewrite-strategy = " << options.rewrite_strategy << std::endl;
86 out << "replace-constants-by-variables = " << std::boolalpha << options.replace_constants_by_variables << std::endl;
87 out << "remove-unused-rewrite-rules = " << std::boolalpha << options.remove_unused_rewrite_rules << std::endl;
88 out << "reset-todo = " << std::boolalpha << options.prune_todo_list << std::endl;
89 out << "search-strategy = " << options.exploration_strategy << std::endl;
90 out << "optimization = " << static_cast<int>(options.optimization) << std::endl;
91 out << "frequent = " << std::boolalpha << options.prune_and_solve_frequently << std::endl;
92 out << "check-strategy = " << std::boolalpha << options.check_strategy << std::endl;
93 out << "threads = " << options.number_of_threads << std::endl;
94 return out;
95}
96
97} // namespace mcrl2::pbes_system
98
99
100
101#endif // MCRL2_PBES_PBESSOLVE_OPTIONS_H
std::ostream & operator<<(std::ostream &out, const pbessolve_options &options)
std::istream & operator>>(std::istream &is, partial_solve_strategy &strategy)
std::ostream & operator<<(std::ostream &os, const partial_solve_strategy &strategy)
partial_solve_strategy
Enumeration of partial strategies for solving PBESs.