mCRL2
Loading...
Searching...
No Matches
vector.h
Go to the documentation of this file.
1// Author(s): Jan Friso Groote, Maurice Laveaux
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//
10/// \file mcrl2/data/standard_containers/vector.h
11/// \brief This file contains a vector class that behaves
12/// exactly as a standard vector. It can only be used
13/// to store class instances that derive from aterms.
14/// The stored aterms are protected as a whole, i.e.,
15/// time and memory is saved as individual protection
16/// per element is unnecessary.
17
18#ifndef MCRL2_ATERMPP_STANDARD_CONTAINER_VECTOR_H
19#define MCRL2_ATERMPP_STANDARD_CONTAINER_VECTOR_H
20
21#include <vector>
22
23#include "mcrl2/atermpp/detail/aterm_container.h"
24#include "mcrl2/atermpp/detail/thread_aterm_pool.h"
25#include "mcrl2/utilities/shared_mutex.h"
26
27/// \brief The main namespace for the aterm++ library.
28namespace atermpp
29{
30
31/// \brief A vector class in which aterms can be stored.
32template < class T, class Alloc = std::allocator<detail::reference_aterm<T> >, bool ThreadSafe = false >
34{
35protected:
37
39
40public:
41 /// Standard typedefs.
43 typedef typename super::value_type value_type;
44 typedef typename super::size_type size_type;
45 typedef typename super::reference reference;
46 typedef typename super::iterator iterator;
48
49 /// \brief Default constructor.
51 : super(),
53 {}
54
55 /// \brief Constructor.
56 explicit vector (const allocator_type& alloc)
57 : super::vector(alloc),
59 {}
60
61 /// \brief Constructor.
62 explicit vector (size_type n, const allocator_type& alloc = allocator_type())
63 : super::vector(n, alloc),
65 {}
66
67 vector (size_type n, const value_type& val, const allocator_type& alloc = allocator_type())
70 {}
71
72 /// \brief Constructor.
73 template <class InputIterator>
74 vector (InputIterator first, InputIterator last, const allocator_type& alloc = allocator_type())
77 {}
78
79 /// \brief Constructor.
80 vector (const vector& x)
81 : super::vector(x),
83 {}
84
85 /// \brief Constructor.
86 vector (const vector& x, const allocator_type& alloc)
87 : super::vector(x, alloc),
89 {}
90
91 /// \brief Constructor.
93 : super::vector(std::move(x)),
95 {}
96
97 /// \brief Constructor.
98 vector (vector&& x, const allocator_type& alloc)
99 : super::vector(std::move(x), alloc),
100 container_wrapper(*this)
101 {}
102
103 /// \brief Constructor. To be done later....
104 vector (std::initializer_list<value_type> il, const allocator_type& alloc = allocator_type())
105 : super::vector(il, alloc),
106 container_wrapper(*this)
107 {}
108
109 /// \brief Assignment operator.
110 vector& operator=(const vector& x) = default;
111
112 /// \brief Move assignment operator
113 vector& operator=(vector&& x) = default;
114
115 /// \brief Standard destructor.
116 ~vector() {}
117
119 {
120 if constexpr (ThreadSafe) {
122 super::shrink_to_fit();
123 } else {
125 super::shrink_to_fit();
126 }
127 }
128
129 void clear() noexcept
130 {
131 if constexpr (ThreadSafe) {
133 super::clear();
134 } else {
136 super::clear();
137 }
138 }
139
140 iterator insert( const_iterator pos, const T& value )
141 {
142 if constexpr (ThreadSafe) {
144
145 // This is not thread safe otherwise since the length or end iterator is updated during this producedure.
146 return super::insert(pos, value);
147 }
148
150 return super::insert(pos, value);
151 }
152
154 {
155 if constexpr (ThreadSafe) {
157 return super::insert(pos, value);
158 }
159
161 return super::insert(pos, value);
162 }
163
164 iterator insert( const_iterator pos, size_type count, const T& value )
165 {
166 if constexpr (ThreadSafe) {
168 return super::insert(pos, count, value);
169 }
170
172 return super::insert(pos, count, value);
173 }
174
175 template< class InputIt >
177 InputIt first, InputIt last )
178 {
179 if constexpr (ThreadSafe) {
181 return super::insert(pos, first, last);
182 }
183
185 return super::insert(pos, first, last);
186 }
187
188 iterator insert( const_iterator pos, std::initializer_list<T> ilist )
189 {
190 if constexpr (ThreadSafe) {
192 return super::insert(pos, ilist);
193 }
194
196 return super::insert(pos, ilist);
197 }
198
199 template< class... Args >
200 iterator emplace( const_iterator pos, Args&&... args )
201 {
202 if constexpr (ThreadSafe) {
204 return super::emplace(pos, args...);
205 }
206
208 return super::emplace(pos, args...);
209 }
210
212 {
213 if constexpr (ThreadSafe) {
215 return super::erase(pos);
216 }
217
219 return super::erase(pos);
220 }
221
223 {
224 if constexpr (ThreadSafe) {
226 return super::erase(first, last);
227 }
228
230 return super::erase(first, last);
231 }
232
233 void push_back( const T& value )
234 {
235 if constexpr (ThreadSafe)
236 {
238 super::push_back(value);
239 }
240 else
241 {
243 super::push_back(value);
244 }
245 }
246
247 void push_back( T&& value )
248 {
249 if constexpr (ThreadSafe)
250 {
252 super::push_back(value);
253 }
254 else
255 {
257 super::push_back(value);
258 }
259 }
260
261 template< class... Args >
262 reference emplace_back( Args&&... args )
263 {
264 if constexpr (ThreadSafe) {
266 return super::emplace_back(args...);
267 }
268
270 return super::emplace_back(args...);
271 }
272
273 void pop_back()
274 {
275 if constexpr (ThreadSafe)
276 {
278 super::pop_back();
279 }
280 else
281 {
283 super::pop_back();
284 }
285 }
286
287 void resize( size_type count )
288 {
289 if constexpr (ThreadSafe)
290 {
292 super::resize(count);
293 }
294 else
295 {
297 super::resize(count);
298 }
299 }
300
301 void resize( size_type count, const value_type& value )
302 {
303 if constexpr (ThreadSafe)
304 {
306 super::resize(count, value);
307 }
308 else
309 {
311 super::resize(count, value);
312 }
313 }
314
315 void swap( vector& other ) noexcept
316 {
317 if constexpr (ThreadSafe)
318 {
320 super::swap(other); // Invalidates end() so must be protected.
321 }
322 else
323 {
325 super::swap(other); // Invalidates end() so must be protected.
326 }
327 }
328
329 std::size_t size() const
330 {
331 // Concurrent read/write on the size.
333 return super::size();
334 }
335};
336
337} // namespace atermpp
338#endif // MCRL2_ATERMPP_STANDARD_CONTAINER_VECTOR_H
aterm_core & assign(const aterm_core &other, detail::thread_aterm_pool &pool) noexcept
Assignment operator, to be used if busy and forbidden flags are explicitly available.
size_type size() const
Returns the number of arguments of this term.
Definition aterm.h:151
function_symbol_pool & get_symbol_pool()
Definition aterm_pool.h:132
mcrl2::utilities::lock_guard lock()
Acquire an exclusive lock.
mcrl2::utilities::shared_guard lock_shared()
Acquire a shared lock on this thread aterm pool.
Generates unique function symbols with a given prefix.
std::size_t m_initial_index
Cache the value that is set in the constructor.
void clear()
Restores the index back to the value that was initially assigned in the constructor.
std::size_t m_index
A reference to the index as present in the function symbol generator.
std::string m_string_buffer
A local string cache to prevent allocating new strings for every function symbol generated.
function_symbol operator()(std::size_t arity=0)
Generates a unique function symbol with the given prefix followed by a number.
function_symbol_generator(const std::string &prefix)
Constructor.
std::shared_ptr< std::size_t > m_central_index
The address of the central index for this prefix.
An unprotected term does not change the reference count of the shared term when it is copied or moved...
Definition aterm_core.h:32
bool operator==(const unprotected_aterm_core &t) const
Comparison operator.
Definition aterm_core.h:83
bool operator!=(const unprotected_aterm_core &t) const
Inequality operator on two unprotected aterms.
Definition aterm_core.h:92
A vector class in which aterms can be stored.
Definition vector.h:34
std::size_t size() const
Definition vector.h:329
iterator insert(const_iterator pos, InputIt first, InputIt last)
Definition vector.h:176
vector & operator=(const vector &x)=default
Assignment operator.
iterator insert(const_iterator pos, std::initializer_list< T > ilist)
Definition vector.h:188
vector & operator=(vector &&x)=default
Move assignment operator.
iterator insert(const_iterator pos, T &&value)
Definition vector.h:153
~vector()
Standard destructor.
Definition vector.h:116
void swap(vector &other) noexcept
Definition vector.h:315
super::allocator_type allocator_type
Standard typedefs.
Definition vector.h:42
iterator emplace(const_iterator pos, Args &&... args)
Definition vector.h:200
void push_back(const T &value)
Definition vector.h:233
iterator insert(const_iterator pos, size_type count, const T &value)
Definition vector.h:164
super::reference reference
Definition vector.h:45
vector(const vector &x, const allocator_type &alloc)
Constructor.
Definition vector.h:86
void push_back(T &&value)
Definition vector.h:247
super::value_type value_type
Definition vector.h:43
super::iterator iterator
Definition vector.h:46
vector(vector &&x)
Constructor.
Definition vector.h:92
iterator erase(const_iterator first, const_iterator last)
Definition vector.h:222
vector(const allocator_type &alloc)
Constructor.
Definition vector.h:56
void resize(size_type count, const value_type &value)
Definition vector.h:301
vector(InputIterator first, InputIterator last, const allocator_type &alloc=allocator_type())
Constructor.
Definition vector.h:74
void shrink_to_fit()
Definition vector.h:118
super::const_iterator const_iterator
Definition vector.h:47
super::size_type size_type
Definition vector.h:44
vector(vector &&x, const allocator_type &alloc)
Constructor.
Definition vector.h:98
vector(size_type n, const allocator_type &alloc=allocator_type())
Constructor.
Definition vector.h:62
iterator erase(const_iterator pos)
Definition vector.h:211
iterator insert(const_iterator pos, const T &value)
Definition vector.h:140
vector(const vector &x)
Constructor.
Definition vector.h:80
void resize(size_type count)
Definition vector.h:287
detail::generic_aterm_container< std::vector< detail::reference_aterm< T >, Alloc > > container_wrapper
Definition vector.h:38
void clear() noexcept
Definition vector.h:129
void pop_back()
Definition vector.h:273
reference emplace_back(Args &&... args)
Definition vector.h:262
vector(std::initializer_list< value_type > il, const allocator_type &alloc=allocator_type())
Constructor. To be done later....
Definition vector.h:104
vector()
Default constructor.
Definition vector.h:50
std::vector< detail::reference_aterm< T >, Alloc > super
Definition vector.h:36
vector(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
Definition vector.h:67
An abstraction expression.
Definition abstraction.h:26
const variable_list & variables() const
Definition abstraction.h:63
abstraction(const binder_type &binding_operator, const variable_list &variables, const data_expression &body)
Constructor.
Definition abstraction.h:42
const data_expression & body() const
Definition abstraction.h:68
const binder_type & binding_operator() const
Definition abstraction.h:58
\brief A data equation
data_equation(const data_equation &) noexcept=default
Move semantics.
data_expression & operator=(const data_expression &) noexcept=default
data_expression & operator=(data_expression &&) noexcept=default
bool is_default_data_expression() const
A function to efficiently determine whether a data expression is made by the default constructor.
const function_symbol_vector & constructors() const
Gets all constructors including those that are system defined.
const function_symbol_vector & mappings() const
Gets all mappings in this specification including those that are system defined.
std::shared_ptr< detail::Rewriter > clone()
Clone a rewriter.
Definition jitty.h:72
strategy create_a_rewriting_based_strategy(const function_symbol &f, const data_equation_list &rules1)
Definition strategy.cpp:46
void rewrite(data_expression &result, const data_expression &term, substitution_type &sigma)
Rewrite an mCRL2 data term.
Definition jitty.cpp:893
rewrite_strategy getStrategy()
Get rewriter strategy that is used.
Definition jitty.cpp:940
strategy create_a_cpp_function_based_strategy(const function_symbol &f, const data_specification &data_spec)
Definition strategy.cpp:222
class rewrite_stack m_rewrite_stack
Definition jitty.h:90
void rewrite_aux_const_function_symbol(data_expression &result, const function_symbol &op, substitution_type &sigma)
Definition jitty.cpp:817
data_expression rewrite(const data_expression &term, substitution_type &sigma)
Rewrite an mCRL2 data term.
Definition jitty.cpp:930
RewriterJitty(const data_specification &data_spec, const used_data_equation_selector &)
Definition jitty.cpp:166
void rewrite_aux(data_expression &result, const data_expression &term, substitution_type &sigma)
Rewrite a term with a given substitution and put the rewritten term in result.
Definition jitty.cpp:456
RewriterJitty(const RewriterJitty &other)=default
strategy create_strategy(const function_symbol &f, const data_equation_list &rules1, const data_specification &data_spec)
Definition strategy.cpp:242
void apply_cpp_code_to_higher_order_term(data_expression &result, const application &t, const std::function< void(data_expression &, const data_expression &)> rewrite_cpp_code, ITERATOR begin, ITERATOR end, substitution_type &sigma)
Definition jitty.cpp:427
const function_symbol & this_term_is_in_normal_form()
Definition jitty.h:77
void subst_values(data_expression &result, const jitty_assignments_for_a_rewrite_rule &assignments, const data_expression &t, data::enumerator_identifier_generator &generator)
Definition jitty.cpp:224
RewriterJitty & operator=(const RewriterJitty &other)=delete
void rewrite_aux_function_symbol(data_expression &result, const function_symbol &op, const application &term, substitution_type &sigma)
Definition jitty.cpp:592
data_expression remove_normal_form_function(const data_expression &t)
Definition jitty.cpp:38
atermpp::detail::thread_aterm_pool * m_thread_aterm_pool
Definition jitty.h:96
void rebuild_strategy(const data_specification &data_spec, const mcrl2::data::used_data_equation_selector &equation_selector)
Definition jitty.cpp:144
std::vector< strategy > jitty_strat
Definition jitty.h:94
std::map< function_symbol, data_equation_list > jitty_eqns
Definition jitty.h:93
function_symbol this_term_is_in_normal_form_symbol
Definition jitty.h:87
void make_jitty_strat_sufficiently_larger(const std::size_t i)
Auxiliary function to take care that the array jitty_strat is sufficiently large to access element i.
Definition jitty.cpp:136
std::vector< data_expression > rhs_for_constants_cache
Definition jitty.h:92
Rewriter interface class.
Definition rewrite.h:42
used_data_equation_selector data_equation_selector
Definition rewrite.h:57
mcrl2::data::data_specification m_data_specification_for_enumeration
Definition rewrite.h:234
virtual std::shared_ptr< detail::Rewriter > clone()=0
Clone a rewriter.
data_expression universal_quantifier_enumeration(const abstraction &t, substitution_type &sigma)
Definition rewrite.h:161
void rewrite_lambda_application(data_expression &result, const data_expression &t, substitution_type &sigma)
Rewrite t, assuming that the headsymbol of t, which can be nested, is a lambda term.
Definition rewrite.cpp:214
void rewrite_lambda_application(data_expression &result, const abstraction &lambda_term, const application &t, substitution_type &sigma)
Definition rewrite.cpp:256
void rewrite_where(data_expression &result, const where_clause &term, substitution_type &sigma)
Definition rewrite.cpp:70
void existential_quantifier_enumeration(data_expression &result, const abstraction &t, substitution_type &sigma)
Definition rewrite.cpp:334
virtual void rewrite(data_expression &result, const data_expression &term, substitution_type &sigma)=0
Rewrite an mCRL2 data term.
data_expression operator()(const data_expression &term, substitution_type &sigma)
Provide the rewriter with a () operator, such that it can also rewrite terms using this operator.
Definition rewrite.h:105
void existential_quantifier_enumeration(data_expression &result, const variable_list &vl, const data_expression &t1, const bool t1_is_normal_form, substitution_type &sigma)
Definition rewrite.cpp:350
data_expression existential_quantifier_enumeration(const abstraction &t, substitution_type &sigma)
Definition rewrite.h:142
void universal_quantifier_enumeration(data_expression &result, const abstraction &t, substitution_type &sigma)
Definition rewrite.cpp:362
data_expression universal_quantifier_enumeration(const variable_list &vl, const data_expression &t1, const bool t1_is_normal_form, substitution_type &sigma)
Definition rewrite.h:170
Rewriter(const Rewriter &other)=default
The copy constructor operator is protected. Public copying is not allowed.
virtual rewrite_strategy getStrategy()=0
Get rewriter strategy that is used.
mutable_indexed_substitution substitution_type
Definition rewrite.h:55
virtual data_expression rewrite(const data_expression &term, substitution_type &sigma)=0
Rewrite an mCRL2 data term.
data_expression existential_quantifier_enumeration(const variable_list &vl, const data_expression &t1, const bool t1_is_normal_form, substitution_type &sigma)
Definition rewrite.h:150
data_expression rewrite_single_lambda(const variable_list &vl, const data_expression &body, const bool body_in_normal_form, substitution_type &sigma)
Definition rewrite.h:201
data_expression rewrite_where(const where_clause &term, substitution_type &sigma)
Definition rewrite.cpp:61
data_expression rewrite_lambda_application(const data_expression &t, substitution_type &sigma)
Definition rewrite.cpp:241
virtual ~Rewriter()
Destructor.
Definition rewrite.h:70
data::enumerator_identifier_generator & identifier_generator()
The fresh name generator of the rewriter.
Definition rewrite.h:75
void rewrite_single_lambda(data_expression &result, const variable_list &vl, const data_expression &body, const bool body_in_normal_form, substitution_type &sigma)
Definition rewrite.cpp:109
virtual void thread_initialise()
Definition rewrite.h:228
Rewriter(const data_specification &data_spec, const used_data_equation_selector &eq_selector)
Constructor. Do not use directly; use createRewriter() function instead.
Definition rewrite.h:63
Rewriter & operator=(const Rewriter &other)=default
The copy assignment operator is protected. Public copying is not allowed.
void universal_quantifier_enumeration(data_expression &result, const variable_list &vl, const data_expression &t1, const bool t1_is_normal_form, substitution_type &sigma)
Definition rewrite.cpp:375
enumerator_identifier_generator m_generator
Definition rewrite.h:44
void quantifier_enumeration(data_expression &result, const variable_list &vl, const data_expression &t1, const bool t1_is_normal_form, substitution_type &sigma, const binder_type &binder, data_expression(*lazy_op)(const data_expression &, const data_expression &), const data_expression &identity_element, const data_expression &absorbing_element)
Definition rewrite.cpp:386
const std::set< std::size_t > & dependencies() const
Definition jitty.cpp:121
dependencies_rewrite_rule_pair(std::set< std::size_t > &dependencies, const data_equation &eq)
Definition jitty.cpp:117
mutable_indexed_substitution & m_sigma
Definition jitty.cpp:97
jitty_argument_rewriter(mutable_indexed_substitution<> &sigma, RewriterJitty &r)
Definition jitty.cpp:100
void operator()(data_expression &result, const data_expression &t)
Definition jitty.cpp:104
void increase(std::size_t distance)
void set_element(std::size_t pos, std::size_t frame_size, const data_expression &d)
data_expression & element(std::size_t pos, std::size_t frame_size)
void decrease(std::size_t distance)
atermpp::vector< data_expression >::const_iterator stack_iterator(std::size_t pos, std::size_t frame_size) const
A strategy is a list of rules and the number of variables that occur in it.
std::size_t number_of_variables() const
Provides the maximal number of variables used in the rewrite rules making up this strategy.
core::identifier_string operator()()
Generates a unique function symbol with the given prefix followed by a number.
enumerator_identifier_generator(const std::string &prefix="x_")
Constructor.
\brief A function sort
const sort_expression & codomain() const
function_sort(const atermpp::aterm &term)
const sort_expression_list & domain() const
\brief A function symbol
const sort_expression & sort() const
function_symbol(const std::string &name, const sort_expression &sort)
Constructor.
const expression_type & operator()(const variable_type &v) const
Application operator; applies substitution to v.
ExpressionType expression_type
Type of expressions.
atermpp::utilities::unordered_map< VariableType, ExpressionType > substitution_type
mutable_indexed_substitution< VariableType, ExpressionType > clone()
Create a clone of the rewriter in which the underlying rewriter is copied, and not passed as a shared...
void apply(const variable_type &v, expression_type &target, atermpp::detail::thread_aterm_pool &thread_aterm_pool)
Application operator; applies substitution to v.
bool size()
Returns the number of assigned variables in the substitution.
bool operator==(const Substitution &) const
Compare substitutions.
void apply(const variable_type &v, ResultType &target)
Application operator; applies substitution to v.
const std::multiset< variable_type > & variables_occurring_in_right_hand_sides() const
Provides a multiset containing the variables in the rhs.
bool empty()
Returns true if the substitution is empty.
assignment operator[](variable_type const &v)
Index operator.
substitution_type m_substitution
Internal storage for substitutions. Required to be a container with random access through [] operator...
std::string to_string() const
string representation of the substitution. N.B. This is an expensive operation!
bool variable_occurs_in_a_rhs(const variable &v)
Checks whether a variable v occurs in one of the rhs's of the current substitution.
mutable_indexed_substitution(const substitution_type &substitution, const bool variables_in_rhs_set_is_defined, const std::multiset< variable_type > &variables_in_rhs)
\brief A sort expression
sort_expression & operator=(const sort_expression &) noexcept=default
\brief Unknown sort expression
untyped_sort()
\brief Default constructor X3.
Component for selecting a subset of equations that are actually used in an encompassing specification...
Definition selection.h:37
used_data_equation_selector(const data_specification &specification, const std::set< function_symbol > &function_symbols, const std::set< data::variable > &global_variables, const bool do_not_remove_function_symbols)
Definition selection.h:165
void add_data_specification_symbols(const data_specification &specification)
Definition selection.h:56
used_data_equation_selector()
default constructor
Definition selection.h:152
used_data_equation_selector(const data_specification &)
select all equations
Definition selection.h:182
void add_function_symbols(const data_expression &t)
Definition selection.h:146
used_data_equation_selector(data_specification const &data_spec, Range const &context)
context is a range of function symbols
Definition selection.h:158
void add_symbol(const function_symbol &f)
Definition selection.h:44
bool operator()(const data_equation &e) const
Check whether data equation relates to used symbols, and therefore is important.
Definition selection.h:132
bool operator()(const data::function_symbol &f) const
Check whether the symbol is used.
Definition selection.h:122
std::set< function_symbol > m_used_symbols
Definition selection.h:40
\brief A data variable
Definition variable.h:28
\brief A where expression
const data_expression & body() const
const assignment_expression_list & declarations() const
Standard exception class for reporting runtime errors.
Definition exception.h:27
An exclusive lock guard for the shared_mutex.
A shared lock guard for the shared_mutex.
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Definition logger.h:391
thread_aterm_pool & g_thread_term_pool()
A reference to the thread local term pool storage.
The main namespace for the aterm++ library.
Definition algorithm.h:21
static std::size_t & generator_sequence_number()
static std::mutex & function_symbol_generator_mutex()
atermpp::aterm_string identifier_string
String type of the LPS library. Identifier strings are represented internally as ATerms.
void CheckRewriteRule(const data_equation &data_eqn)
Check that an mCRL2 data equation is a valid rewrite rule. If not, an runtime_error is thrown indicat...
Definition rewrite.cpp:597
data_expression remove_normal_form_function(const data_expression &t)
removes auxiliary expressions this_term_is_in_normal_form from data_expressions that are being rewrit...
bool isValidRewriteRule(const data_equation &data_eqn)
Check whether or not an mCRL2 data equation is a valid rewrite rule.
Definition rewrite.cpp:655
std::size_t recursive_number_of_args(const data_expression &t)
const data_expression & get_argument_of_higher_order_term(const application &t, std::size_t i)
std::shared_ptr< detail::Rewriter > createRewriter(const data_specification &DataSpec, const used_data_equation_selector &equations_selector, const rewrite_strategy Strategy=jitty)
Create a rewriter.
Definition rewrite.cpp:513
static bool match_jitty(const data_expression &t, const data_expression &p, jitty_assignments_for_a_rewrite_rule &assignments, const bool term_context_guarantees_normal_form)
Definition jitty.cpp:355
std::size_t getArity(const data::function_symbol &op)
Definition rewrite.h:278
std::size_t get_direct_arity(const data::function_symbol &op)
Definition rewrite.h:294
std::set< variable > bound_variables_in_substitution(const jitty_assignments_for_a_rewrite_rule &assignments)
Definition jitty.cpp:212
const data_expression & get_nested_head(const data_expression &t)
Namespace for system defined sort bool_.
Definition bool.h:32
const basic_sort & bool_()
Constructor for sort expression Bool.
Definition bool.h:44
const function_symbol & and_()
Constructor for function symbol &&.
Definition bool.h:235
const function_symbol & or_()
Constructor for function symbol ||.
Definition bool.h:299
const function_symbol & not_()
Constructor for function symbol !.
Definition bool.h:173
Namespace for all data library functionality.
Definition data.cpp:22
atermpp::term_list< assignment_expression > assignment_expression_list
\brief list of assignment_expressions
Definition assignment.h:50
std::vector< assignment > assignment_vector
\brief vector of assignments
Definition assignment.h:149
std::multiset< variable > substitution_variables(const mutable_indexed_substitution< VariableType, ExpressionType > &sigma)
bool is_application(const data_expression &t)
Returns true if the term t is an application.
bool is_where_clause(const atermpp::aterm &x)
Returns true if the term t is a where clause.
std::istream & operator>>(std::istream &is, rewrite_strategy &s)
standard conversion from stream to rewrite strategy
std::string pp(const rewrite_strategy s)
Pretty prints a rewrite strategy.
std::string description(const rewrite_strategy s)
standard descriptions for rewrite strategies
bool is_abstraction(const atermpp::aterm &x)
Returns true if the term t is an abstraction.
std::vector< variable > variable_vector
\brief vector of variables
Definition variable.h:89
atermpp::term_list< sort_expression > sort_expression_list
\brief list of sort_expressions
rewrite_strategy
The strategy of the rewriter.
@ jitty_prover
JITty.
bool is_exists_binder(const atermpp::aterm &x)
bool is_lambda_binder(const atermpp::aterm &x)
bool is_forall(const atermpp::aterm &x)
Returns true if the term t is a universal quantification.
bool is_function_symbol(const atermpp::aterm &x)
Returns true if the term t is a function symbol.
atermpp::term_list< data_equation > data_equation_list
\brief list of data_equations
atermpp::term_list< variable > variable_list
\brief list of variables
bool is_exists(const atermpp::aterm &x)
Returns true if the term t is an existential quantification.
bool is_function_sort(const atermpp::aterm &x)
Returns true if the term t is a function sort.
atermpp::term_list< assignment > assignment_list
\brief list of assignments
Definition assignment.h:146
bool is_machine_number(const atermpp::aterm &x)
Returns true if the term t is a machine_number.
bool is_lambda(const atermpp::aterm &x)
Returns true if the term t is a lambda abstraction.
bool is_forall_binder(const atermpp::aterm &x)
std::vector< function_symbol > function_symbol_vector
\brief vector of function_symbols
function_symbol if_(const sort_expression &s)
Constructor for function symbol if.
Definition standard.h:200
bool is_variable(const atermpp::aterm &x)
Returns true if the term t is a variable.
static constexpr bool GlobalThreadSafe
Enables thread safety for the whole toolset.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
jitty_variable_assignment_for_a_rewrite_rule * assignment
Definition jitty.h:40
jitty_assignments_for_a_rewrite_rule(jitty_variable_assignment_for_a_rewrite_rule *a)
Definition jitty.h:42
jitty_variable_assignment_for_a_rewrite_rule(const variable &m_var, const data_expression &m_term, bool m_nf)
Definition jitty.h:30
Wrapper class for internal storage and substitution updates using operator()
mutable_indexed_substitution< VariableType, ExpressionType > & m_super
assignment(const variable_type &v, mutable_indexed_substitution< VariableType, ExpressionType > &super)
Constructor.
void operator=(const expression_type &e)
Actual assignment.
std::size_t operator()(const atermpp::detail::reference_aterm< T > &t) const