mCRL2
Loading...
Searching...
No Matches
jitty_jittyc.h
Go to the documentation of this file.
1// Author(s): Jan Friso Groote
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#ifndef MCRL2_DATA_DETAIL_REWRITE_JITTY_JITTYC_H
11#define MCRL2_DATA_DETAIL_REWRITE_JITTY_JITTYC_H
12
13#include "mcrl2/data/detail/rewrite.h"
14#include "mcrl2/data/function_update.h"
15
16
17
18namespace mcrl2::data::detail
19{
20
21template <template <class> class Traverser>
23{
25 using super::enter;
26 using super::leave;
27 using super::apply;
28
31
32 void apply(const variable& v)
33 {
34 if (!m_seen.insert(v).second)
35 {
36 m_doubles.insert(v);
37 }
38 }
39
41 {
42 return m_doubles;
43 }
44};
45
46
47inline variable_list get_free_vars(const data_expression& a)
48{
49 const std::set<variable> s = find_free_variables(a);
50 return variable_list(s.begin(), s.end());
51}
52
53inline sort_expression residual_sort(const sort_expression& s, std::size_t no_of_initial_arguments)
54{
55 // Remove no_of_initial_arguments sort from sort s.
56
57 sort_expression result=s;
58 while (no_of_initial_arguments > 0)
59 {
60 assert(is_function_sort(result));
61 const function_sort& sf = atermpp::down_cast<function_sort>(result);
62 assert(sf.domain().size()<=no_of_initial_arguments);
63 no_of_initial_arguments=no_of_initial_arguments-sf.domain().size();
64 result=sf.codomain();
65 }
66
67 return result;
68}
69
70// This function returns <b, arg_i> where arg_i is the i-th argument of the application t and
71// b is a boolean that indicates whether this argument exists.
72// TODO: use the optional class of c++17 when it can be used. The current solution is somewhat ugly.
73// This function yields a pointer to argument_i if it exists. If not it yields the nullptr;
74inline const data_expression* get_argument_of_higher_order_term_helper(const application& t, std::size_t& i)
75{
76 // t has the shape t application(....)
77 if (!is_application(t.head()))
78 {
79 const std::size_t arity = t.size();
80 if (arity>i)
81 {
82 return &t[i];
83 }
84 // arity <=i
85 i=i-arity;
86 return nullptr;
87 }
88 const data_expression* p=get_argument_of_higher_order_term_helper(atermpp::down_cast<application>(t.head()),i);
89 if (p!=nullptr)
90 {
91 return p;
92 }
93 const std::size_t arity = t.size();
94 if (arity>i)
95 {
96 return &t[i];
97 }
98 // arity <=i
99 i=i-arity;
100 return nullptr;
101}
102
103// This function returns the i-th argument t_i. NOTE: The first argument has index 1.
104// t is an applicatoin of the shape application(application(...application(f,t1,...tn),tn+1....),tm...).
105// i must be a valid index of an argument.
106inline const data_expression& get_argument_of_higher_order_term(const application& t, std::size_t i)
107{
108 // This first case applies to the majority of cases. Therefore this cheap check is done first, before
109 // going into a recursive algorithm. Furthermore checking that t is a function_symbol, etc. is cheaper
110 // than checking that t is not an application by !is_application(t.head()).
111 const data_expression& head=t.head();
112 if (is_function_symbol(head) ||
113 is_variable(head) ||
114 is_where_clause(head) ||
116 {
117 assert(t.size()>i);
118 return t[i];
119 }
120
121 const data_expression* p=get_argument_of_higher_order_term_helper(t,i);
122 assert(p!=nullptr);
123 return *p;
124}
125
127{
128 // Checking these cases is together more efficient than
129 // checking whether t is an application.
130 if (is_machine_number(t) ||
132 is_variable(t) ||
135 {
136 return 0;
137 }
138
139 assert(is_application(t));
140
141 const application& ta = atermpp::down_cast<application>(t);
142 return ta.size()+recursive_number_of_args(ta.head());
143}
144
145// Return the head symbol, nested within applications.
146// This helper function is used to allow inlining of the function
147// get_nested_head.
148inline const data_expression& get_nested_head_helper(const application& t)
149{
150 if (is_application(t.head()))
151 {
152 return get_nested_head_helper(atermpp::down_cast<application>(t.head()));
153 }
154
155 return t.head();
156}
157
158// Return the head symbol, nested within applications.
160{
161 if (is_machine_number(t) ||
163 is_variable(t) ||
166 {
167 return t;
168 }
169
170 const application& ta = atermpp::down_cast<application>(t);
171 const data_expression& head=ta.head();
172
173 if (is_machine_number(t) ||
175 is_variable(head) ||
176 is_where_clause(head) ||
178 {
179 return head;
180 }
181 return get_nested_head_helper(atermpp::down_cast<application>(head));
182}
183
184// Replace the recursively nested head symbol in t by head.
186{
187 if (is_application(t))
188 {
189 const application& ta = atermpp::down_cast<application>(t);
190 return application(replace_nested_head(ta.head(),head),ta.begin(),ta.end());
191 }
192
193 return head;
194}
195
196template <class ARGUMENT_REWRITER>
198 const application& t,
199 const ARGUMENT_REWRITER rewriter,
200 const bool skip_rewriting_head=false)
201{
202 make_application(result, t.head(), t.begin(), t.end(), rewriter, skip_rewriting_head);
203}
204
205}
206
207
208
209#endif // REWRITE_JITTY_JITTYC_COMMON_H
std::stack< std::reference_wrapper< _aterm > > m_todo
A reusable todo stack.
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 operator()(const std::string &prefix)
Generate a unique function symbol, based on the 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.
A unordered_map class in which aterms can be stored.
A vector class in which aterms can be stored.
Definition vector.h:40
const value_type * data() const noexcept
Definition vector.h:200
std::size_t size() const
Definition vector.h:348
reference back()
Definition vector.h:196
iterator insert(const_iterator pos, InputIt first, InputIt last)
Definition vector.h:273
size_type max_size() const noexcept
Definition vector.h:225
const_iterator end() const noexcept
Definition vector.h:207
iterator insert(const_iterator pos, std::initializer_list< T > ilist)
Definition vector.h:280
iterator insert(const_iterator pos, T &&value)
Definition vector.h:260
void mark(term_mark_stack &todo) const
Marks all stored terms during garbage collection; used when this container is an element of another p...
Definition vector.h:357
const_reference at(size_type pos) const
Definition vector.h:188
void swap(vector &other) noexcept
Definition vector.h:342
auto operator<=>(const vector &other) const
Definition vector.h:367
const_iterator cbegin() const noexcept
Definition vector.h:204
super m_container
Definition vector.h:44
iterator emplace(const_iterator pos, Args &&... args)
Definition vector.h:287
reference front()
Definition vector.h:193
size_type capacity() const noexcept
Definition vector.h:236
const_reference front() const
Definition vector.h:194
void push_back(const T &value)
Definition vector.h:305
iterator insert(const_iterator pos, size_type count, const T &value)
Definition vector.h:266
vector(const vector &x, const allocator_type &alloc)
Constructor.
Definition vector.h:113
void push_back(T &&value)
Definition vector.h:311
allocator_type get_allocator() const noexcept
Definition vector.h:163
iterator begin() noexcept
Definition vector.h:202
iterator erase(const_iterator first, const_iterator last)
Definition vector.h:299
vector(const allocator_type &alloc)
Constructor.
Definition vector.h:83
~vector()=default
Standard destructor.
void resize(size_type count, const value_type &value)
Definition vector.h:336
static auto acquire_guard()
Acquires the lock that structural modifications must hold: exclusive when ThreadSafe,...
Definition vector.h:49
vector(InputIterator first, InputIterator last, const allocator_type &alloc=allocator_type())
Constructor.
Definition vector.h:101
const_reverse_iterator rend() const noexcept
Definition vector.h:215
void shrink_to_fit()
Definition vector.h:241
const_reverse_iterator crbegin() const noexcept
Definition vector.h:212
const_reference back() const
Definition vector.h:197
reference operator[](size_type pos)
Definition vector.h:190
const_reverse_iterator rbegin() const noexcept
Definition vector.h:211
value_type * data() noexcept
Definition vector.h:199
reverse_iterator rbegin() noexcept
Definition vector.h:210
detail::generic_aterm_container< super > container_wrapper
Definition vector.h:45
reverse_iterator rend() noexcept
Definition vector.h:214
void assign(std::initializer_list< value_type > ilist)
Definition vector.h:181
iterator end() noexcept
Definition vector.h:206
void assign(size_type count, const value_type &value)
Definition vector.h:168
vector(vector &&x, const allocator_type &alloc)
Constructor.
Definition vector.h:126
vector(size_type n, const allocator_type &alloc=allocator_type())
Constructor.
Definition vector.h:89
iterator erase(const_iterator pos)
Definition vector.h:293
void reserve(size_type new_cap)
Definition vector.h:230
iterator insert(const_iterator pos, const T &value)
Definition vector.h:253
vector(const vector &x)
Constructor.
Definition vector.h:107
void resize(size_type count)
Definition vector.h:330
const_iterator cend() const noexcept
Definition vector.h:208
const_reverse_iterator crend() const noexcept
Definition vector.h:216
bool empty() const noexcept
Definition vector.h:218
reference at(size_type pos)
Definition vector.h:187
vector & operator=(vector &&x) noexcept
Move assignment operator.
Definition vector.h:149
void assign(InputIt first, InputIt last)
Definition vector.h:175
void clear() noexcept
Definition vector.h:247
vector(vector &&x) noexcept
Constructor.
Definition vector.h:119
bool operator==(const vector &other) const
Definition vector.h:365
vector & operator=(const vector &x)
Assignment operator.
Definition vector.h:138
const_iterator begin() const noexcept
Definition vector.h:203
void pop_back()
Definition vector.h:324
reference emplace_back(Args &&... args)
Definition vector.h:318
vector()
Default constructor.
Definition vector.h:77
const_reference operator[](size_type pos) const
Definition vector.h:191
vector(size_type n, const value_type &val, const allocator_type &alloc=allocator_type())
Definition vector.h:94
An abstraction expression.
Definition abstraction.h:23
const variable_list & variables() const
Definition abstraction.h:60
abstraction(const binder_type &binding_operator, const variable_list &variables, const data_expression &body)
Constructor.
Definition abstraction.h:39
const data_expression & body() const
Definition abstraction.h:65
const binder_type & binding_operator() const
Definition abstraction.h:55
\brief A data equation
data_expression & operator=(const 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.
strategy create_a_rewriting_based_strategy(const function_symbol &f, const data_equation_list &rules1)
Definition strategy.cpp:44
strategy create_a_cpp_function_based_strategy(const function_symbol &f, const data_specification &data_spec)
Definition strategy.cpp:220
class rewrite_stack m_rewrite_stack
Definition jitty.h:84
void apply_cpp_code_to_higher_order_term(data_expression &result, const application &t, std::function< void(data_expression &, const data_expression &)> rewrite_cpp_code, ITERATOR begin, ITERATOR end, substitution_type &sigma)
void rewrite_aux_const_function_symbol(data_expression &result, const function_symbol &op, substitution_type &sigma)
Definition jitty.cpp:803
void thread_initialise() override
Definition jitty.h:131
rewrite_strategy getStrategy() override
Get rewriter strategy that is used.
Definition jitty.cpp:925
RewriterJitty(const data_specification &data_spec, const used_data_equation_selector &)
Definition jitty.cpp:169
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:446
RewriterJitty(const RewriterJitty &other)=default
void add_normal_form_function(data_expression &t)
Definition jitty.cpp:92
strategy create_strategy(const function_symbol &f, const data_equation_list &rules1, const data_specification &data_spec)
Definition strategy.cpp:240
data_expression rewrite(const data_expression &term, substitution_type &sigma) override
Rewrite an mCRL2 data term.
Definition jitty.cpp:915
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:417
const function_symbol & this_term_is_in_normal_form()
Definition jitty.h:71
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
data_expression remove_normal_form_function(const data_expression &t)
Definition jitty.cpp:36
atermpp::detail::thread_aterm_pool * m_thread_aterm_pool
Definition jitty.h:91
void rebuild_strategy(const data_specification &data_spec, const mcrl2::data::used_data_equation_selector &equation_selector)
Definition jitty.cpp:147
void rewrite_aux_function_symbol(data_expression &result, const function_symbol &op, const application &term, substitution_type &sigma, std::size_t do_not_rewrite_first_arguments=0)
Definition jitty.cpp:583
std::vector< strategy > jitty_strat
Definition jitty.h:88
void rewrite(data_expression &result, const data_expression &term, substitution_type &sigma) override
Rewrite an mCRL2 data term.
Definition jitty.cpp:878
std::map< function_symbol, data_equation_list > jitty_eqns
Definition jitty.h:87
void make_jitty_strat_sufficiently_larger(std::size_t i)
Auxiliary function to take care that the array jitty_strat is sufficiently large to access element i.
Definition jitty.cpp:139
std::shared_ptr< detail::Rewriter > clone() override
Clone a rewriter.
Definition jitty.h:69
function_symbol this_term_is_in_normal_form_symbol
Definition jitty.h:81
std::vector< data_expression > rhs_for_constants_cache
Definition jitty.h:86
Rewriter interface class.
Definition rewrite.h:39
used_data_equation_selector data_equation_selector
Definition rewrite.h:54
mcrl2::data::data_specification m_data_specification_for_enumeration
Definition rewrite.h:170
virtual std::shared_ptr< detail::Rewriter > clone()=0
Clone a rewriter.
void rewrite_single_lambda(data_expression &result, const variable_list &vl, const data_expression &body, substitution_type &sigma, bool body_in_normal_form)
Definition rewrite.cpp:100
void rewrite_lambda_application(data_expression &result, const data_expression &t, substitution_type &sigma, bool arguments_are_in_normal_form=false)
Rewrite t, assuming that the headsymbol of t, which can be nested, is a lambda term.
Definition rewrite.cpp:205
void rewrite_where(data_expression &result, const where_clause &term, substitution_type &sigma)
Definition rewrite.cpp:61
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:101
virtual ~Rewriter()=default
Destructor.
void existential_quantifier_enumeration(data_expression &result, const variable_list &vl, const data_expression &t1, substitution_type &sigma, bool t1_is_normal_form=false)
Definition rewrite.cpp:357
void existential_quantifier_enumeration(data_expression &result, const abstraction &t, substitution_type &sigma, bool t1_is_normal_form=false)
Definition rewrite.cpp:340
Rewriter(const Rewriter &other)=default
The copy constructor operator is protected. Public copying is not allowed.
void universal_quantifier_enumeration(data_expression &result, const variable_list &vl, const data_expression &t1, substitution_type &sigma, bool t1_is_normal_form=false)
Definition rewrite.cpp:383
virtual rewrite_strategy getStrategy()=0
Get rewriter strategy that is used.
void quantifier_enumeration(data_expression &result, const variable_list &vl, const data_expression &t1, 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:394
virtual data_expression rewrite(const data_expression &term, substitution_type &sigma)=0
Rewrite an mCRL2 data term.
void rewrite_lambda_application(data_expression &result, const abstraction &lambda_term, const application &t, substitution_type &sigma, bool arguments_are_in_normal_form=false)
Definition rewrite.cpp:251
void universal_quantifier_enumeration(data_expression &result, const abstraction &t, substitution_type &sigma, bool t1_is_normal_form=false)
Definition rewrite.cpp:369
data::enumerator_identifier_generator & identifier_generator()
The fresh name generator of the rewriter.
Definition rewrite.h:70
virtual void thread_initialise()
Definition rewrite.h:164
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:60
Rewriter & operator=(const Rewriter &other)=default
The copy assignment operator is protected. Public copying is not allowed.
enumerator_identifier_generator m_generator
Definition rewrite.h:41
const std::set< std::size_t > & dependencies() const
Definition jitty.cpp:124
dependencies_rewrite_rule_pair(std::set< std::size_t > &dependencies, const data_equation &eq)
Definition jitty.cpp:120
mutable_indexed_substitution & m_sigma
Definition jitty.cpp:100
jitty_argument_rewriter(mutable_indexed_substitution<> &sigma, RewriterJitty &r)
Definition jitty.cpp:103
void operator()(data_expression &result, const data_expression &t)
Definition jitty.cpp:107
const data_expression & get_element(std::size_t pos, std::size_t frame_size) const
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
Is either a rewrite rule to be matched or an index that should be rewritten.
std::function< void(data_expression &, const data_expression &)> m_cpp_function
std::function< void(data_expression &, const data_expression &)> rewrite_cpp_code() const
const data_equation & equation() const
strategy_rule(const data_equation &eq)
strategy_rule(const std::size_t n)
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.
const std::vector< strategy_rule > & rules() const
Yield the rules of the strategy.
strategy(size_t n, const std::vector< strategy_rule > &r)
Default constructor.
strategy()
Default constructor.
std::vector< strategy_rule > m_rules
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.
core::identifier_string operator()(const std::string &prefix)
Generates a unique constant function symbol with the given prefix followed by a number.
\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
const expression_type & operator()(const variable_type &v) const
Application operator; applies substitution to v.
mutable_indexed_substitution(const VARIABLES &vars, const EXPRESSIONS &exps)
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.
const std::multiset< variable_type > & variables_occurring_in_right_hand_sides() const
Provides a multiset containing the variables in the rhs.
void apply(const variable_type &v, ResultType &target) const
Application operator; applies substitution to v.
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
Component for selecting a subset of equations that are actually used in an encompassing specification...
Definition selection.h:36
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:164
void add_data_specification_symbols(const data_specification &specification)
Definition selection.h:55
used_data_equation_selector()
default constructor
Definition selection.h:151
used_data_equation_selector(const data_specification &)
select all equations
Definition selection.h:181
void add_function_symbols(const data_expression &t)
Definition selection.h:145
used_data_equation_selector(data_specification const &data_spec, Range const &context)
context is a range of function symbols
Definition selection.h:157
void add_symbol(const function_symbol &f)
Definition selection.h:43
bool operator()(const data_equation &e) const
Check whether data equation relates to used symbols, and therefore is important.
Definition selection.h:131
bool operator()(const data::function_symbol &f) const
Check whether the symbol is used.
Definition selection.h:121
std::set< function_symbol > m_used_symbols
Definition selection.h:39
\brief A data variable
Definition variable.h:25
\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
#define mCRL2log(LEVEL)
mCRL2log(LEVEL) provides the stream used to log.
Definition logger.h:435
thread_aterm_pool & g_thread_term_pool()
A reference to the thread local term pool storage.
The main namespace for the aterm++ library.
static std::size_t & generator_sequence_number()
static std::mutex & function_symbol_generator_mutex()
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:603
std::shared_ptr< detail::Rewriter > createRewriter(const data_specification &DataSpec, const used_data_equation_selector &equations_selector, rewrite_strategy Strategy=data::rewrite_strategy::jitty)
Create a rewriter.
Definition rewrite.cpp:519
strategy create_strategy(data_equation_list rules)
Creates a strategy for given set of rewrite rules with head symbol f.
data_expression replace_nested_head(const data_expression &t, const data_expression &head)
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:661
const data_expression * get_argument_of_higher_order_term_helper(const application &t, std::size_t &i)
void rewrite_all_arguments(data_expression &result, const application &t, const ARGUMENT_REWRITER rewriter, const bool skip_rewriting_head=false)
std::size_t recursive_number_of_args(const data_expression &t)
const data_expression & get_nested_head_helper(const application &t)
const data_expression & get_argument_of_higher_order_term(const application &t, std::size_t i)
variable_list get_free_vars(const data_expression &a)
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:346
std::size_t getArity(const data::function_symbol &op)
Definition rewrite.h:211
std::size_t get_direct_arity(const data::function_symbol &op)
Definition rewrite.h:227
std::set< variable > bound_variables_in_substitution(const jitty_assignments_for_a_rewrite_rule &assignments)
Definition jitty.cpp:212
sort_expression residual_sort(const sort_expression &s, std::size_t no_of_initial_arguments)
const data_expression & get_nested_head(const data_expression &t)
Namespace for system defined sort bool_.
Definition bool.h:29
const basic_sort & bool_()
Constructor for sort expression Bool.
Definition bool.h:41
const function_symbol & and_()
Constructor for function symbol &&.
Definition bool.h:232
const function_symbol & or_()
Constructor for function symbol ||.
Definition bool.h:296
const function_symbol & not_()
Constructor for function symbol !.
Definition bool.h:170
std::multiset< variable > substitution_variables(const mutable_indexed_substitution< VariableType, ExpressionType > &sigma)
bool is_data_equation(const atermpp::aterm &t)
Recognizer function.
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.
bool is_abstraction(const atermpp::aterm &x)
Returns true if the term t is an abstraction.
std::ostream & operator<<(std::ostream &out, const mutable_indexed_substitution< VariableType, ExpressionType > &sigma)
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.
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.
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)
function_symbol if_(const sort_expression &s)
Constructor for function symbol if.
Definition standard.h:205
bool is_variable(const atermpp::aterm &x)
Returns true if the term t is a variable.
const std::set< variable > & result()
jitty_variable_assignment_for_a_rewrite_rule * assignment
Definition jitty.h:38
jitty_assignments_for_a_rewrite_rule(jitty_variable_assignment_for_a_rewrite_rule *a)
Definition jitty.h:40
jitty_variable_assignment_for_a_rewrite_rule(const variable &m_var, const data_expression &m_term, bool m_nf)
Definition jitty.h:28
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.
assignment & operator=(const expression_type &e)
Actual assignment.