mCRL2
Loading...
Searching...
No Matches
rewrite_strategies.h
Go to the documentation of this file.
1// Author(s): Frank Stappers
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/data/detail/rewrite_strategies.h
10/// \brief Utility functions for unit testing
11
12#ifndef MCRL2_DATA_DETAIL_REWRITE_STRATEGIES_H
13#define MCRL2_DATA_DETAIL_REWRITE_STRATEGIES_H
14
15#include "mcrl2/data/rewrite_strategy.h"
16#include <algorithm>
17#include <cctype>
18#include <fstream>
19#include <vector>
20
21namespace mcrl2::data::detail
22{
23
24/// \brief Static initialisation of rewrite strategies used for testing.
25static inline
27{
28 std::vector<data::rewrite_strategy> result;
29 result.push_back(data::jitty);
30 if (with_prover)
31 {
32 result.push_back(data::jitty_prover);
33 }
34#ifdef MCRL2_TEST_JITTYC
35#ifdef MCRL2_ENABLE_JITTYC
36 result.push_back(data::jitty_compiling);
37 if (with_prover)
38 {
39 result.push_back(data::jitty_compiling_prover);
40 }
41#endif // MCRL2_ENABLE_JITTYC
42#endif // MCRL2_TEST_JITTYC
43
44 return result;
45}
46
47/// \brief Rewrite strategies that should be tested.
48inline
50{
51 static std::vector<data::rewrite_strategy> rewrite_strategies = initialise_test_rewrite_strategies(with_prover);
52 return rewrite_strategies;
53}
54
55} // namespace mcrl2::data::detail
56
57#endif // MCRL2_DATA_DETAIL_REWRITE_STRATEGIES_H
const std::vector< data::rewrite_strategy > & get_test_rewrite_strategies(const bool with_prover)
Rewrite strategies that should be tested.
static std::vector< data::rewrite_strategy > initialise_test_rewrite_strategies(const bool with_prover)
Static initialisation of rewrite strategies used for testing.