mCRL2
|
Classes | |
class | _aterm |
This is the class to which an aterm points. More... | |
class | _aterm_appl |
This class stores a term followed by N arguments. Where N should be equal to the arity of the function symbol. These arguments do have room reserved for them during the creation of the _aterm_appl. More... | |
class | _aterm_appl_allocator |
This class allocates _aterm_appl objects where the size is based on the arity of the function symbol. More... | |
class | _aterm_int |
The underlying integer term that actually carries the integer data. More... | |
class | _function_symbol |
Stores the data for a function symbol (name, arity) pair. More... | |
class | _term_list |
class | aterm_allocator |
class | aterm_container |
Provides safe storage of unprotected_aterm_core instances in a container by marking them during garbage collection. More... | |
struct | aterm_equals |
Returns true iff first and second are value-equivalent. More... | |
struct | aterm_equals_finite |
struct | aterm_hasher |
Computes the hash of the given term. More... | |
struct | aterm_hasher_finite |
Computes the hash of the given term. More... | |
struct | aterm_int_equals |
Returns true iff the given term(s) or value are equivalent. More... | |
struct | aterm_int_hasher |
Computes the hash of the integral term arguments. More... | |
class | aterm_pool |
The interface for the term library. Provides the storage of of all classes of terms. More... | |
class | aterm_pool_storage |
This class provides for all types of term storage. It also provides garbage collection via its mark and sweep functions. More... | |
struct | bottom_up_replace_aterm_builder |
struct | cached_bottom_up_replace_aterm_builder |
struct | do_not_convert_term |
struct | found_term_exception |
struct | function_symbol_equals |
True iff the given function symbols are equal to eachother or to the given key. More... | |
struct | function_symbol_hasher |
Computes the hash for given function symbol objects and for the function_symbol_key. More... | |
class | function_symbol_pool |
This class stores a set of function symbols. More... | |
class | generic_aterm_container |
struct | index_traits |
For several variable types in mCRL2 an implicit mapping of these variables to integers is available. This is done for efficiency reasons. Examples are: More... | |
struct | is_container_impl |
struct | is_container_impl< std::list< T > > |
struct | is_container_impl< std::multiset< T > > |
struct | is_container_impl< std::set< T > > |
struct | is_container_impl< std::vector< T > > |
struct | is_pair |
struct | is_pair_helper |
struct | is_pair_helper< std::pair< T, U > > |
struct | is_reference_aterm |
struct | is_reference_aterm_helper |
struct | is_reference_aterm_helper< reference_aterm< T > > |
struct | is_set_impl |
struct | is_set_impl< std::multiset< T > > |
struct | is_set_impl< std::set< T > > |
struct | iterator_value |
struct | iterator_value< std::back_insert_iterator< Container > > |
struct | iterator_value< std::front_insert_iterator< Container > > |
struct | iterator_value< std::insert_iterator< Container > > |
struct | lazy_check_value_type |
struct | lazy_check_value_type< true, Container, ValueType > |
struct | partial_replace_aterm_builder |
class | reference_aterm |
Base class that should not be used. More... | |
class | reference_aterm< T, typename std::enable_if< is_pair< T >::value >::type > |
A pair that is stored into an atermpp container. This class takes care that all aterms that occur (recursively) inside such a pair are marked, whears non-aterm_core types are not marked. More... | |
class | reference_aterm< T, typename std::enable_if< std::is_base_of< aterm_core, T >::value >::type > |
An unprotected term that is stored inside an aterm_container. More... | |
class | reference_aterm< T, typename std::enable_if< std::is_fundamental< typename std::decay< T >::type >::value >::type > |
A reference aterm_core applied to fundamental types, such as int, bool. Nothing needs to happen with such terms. But a special class is needed, because such types are not classes, and we cannot derive from it. More... | |
struct | replace_aterm_builder |
class | shared_subset |
Stores a subset of a given base set using maximum sharing. More... | |
class | thread_aterm_pool |
This is a thread's specific access to the global aterm pool which ensures that garbage collection and hash table resizing can proceed. More... | |
class | thread_aterm_pool_interface |
A thread specific aterm pool that provides a local interface to the global term pool. Ensures that terms created by this thread are protected during garbage collection. More... | |
Functions | |
template<template< class > class Builder, class ReplaceFunction > | |
replace_aterm_builder< Builder, ReplaceFunction > | make_replace_aterm_builder (ReplaceFunction f) |
template<template< class > class Builder, class ReplaceFunction > | |
partial_replace_aterm_builder< Builder, ReplaceFunction > | make_partial_replace_aterm_builder (ReplaceFunction f) |
template<template< class > class Builder, class ReplaceFunction > | |
bottom_up_replace_aterm_builder< Builder, ReplaceFunction > | make_bottom_up_replace_aterm_builder (ReplaceFunction f) |
template<template< class > class Builder, class ReplaceFunction > | |
cached_bottom_up_replace_aterm_builder< Builder, ReplaceFunction > | make_cached_bottom_up_replace_aterm_builder (ReplaceFunction f, std::unordered_map< aterm, aterm > &cache) |
_aterm * | address (const unprotected_aterm_core &t) |
template<typename Function > | |
aterm | appl_apply (const aterm &a, const Function f) |
Applies the function f to all children of a. | |
template<typename UnaryFunction > | |
UnaryFunction | for_each_impl (aterm t, UnaryFunction op) |
Implements the for_each algorithm. | |
template<typename MatchPredicate > | |
bool | find_if_impl (const aterm &t, MatchPredicate match, aterm &output) |
Implements the find_if algorithm If the term t is found, it is stored in output and true is returned. | |
template<typename MatchPredicate , typename OutputIterator > | |
void | find_all_if_impl (const aterm &t, MatchPredicate op, OutputIterator &destBegin) |
Implements the find_all_if algorithm. | |
template<typename MatchPredicate , typename StopPredicate > | |
aterm | partial_find_if_impl (const aterm &t, MatchPredicate match, StopPredicate stop) |
Implements the partial_find_if_impl algorithm. | |
template<typename MatchPredicate , typename StopPredicate , typename OutputIterator > | |
void | partial_find_all_if_impl (const aterm &t, MatchPredicate match, StopPredicate stop, OutputIterator &destBegin) |
Implements the partial_find_all_if algorithm. | |
template<class Derived , class Base > | |
term_appl_iterator< Derived > | aterm_appl_iterator_cast (term_appl_iterator< Base > a, typename std::enable_if< std::is_base_of< aterm, Base >::value &&std::is_base_of< aterm, Derived >::value >::type *) |
This function can be used to translate an term_appl_iterator of one sort into another. | |
template<typename T > | |
std::pair< typename std::conditional< is_reference_aterm< typename T::first_type >::value, typename T::first_type, reference_aterm< typename T::first_type > >::type, typename std::conditional< is_reference_aterm< typename T::second_type >::value, typename T::second_type, reference_aterm< typename T::second_type > >::type > | reference_aterm_pair_constructor_helper (const T &other) |
void | debug_print (std::ostream &o, const _aterm *t, const std::size_t d=3) |
std::size_t | combine (const std::size_t hnr, const unprotected_aterm_core &term) |
Auxiliary function to combine hnr with aterms. | |
template<std::size_t I = 0, typename... Tp, typename std::enable_if< I==sizeof...(Tp), void >::type * = nullptr> | |
std::size_t | combine_args (std::size_t seed, const Tp &...) |
template<typename Term , typename Iter , typename ATermConverter > | |
aterm | make_list_backward (Iter first, Iter last, ATermConverter convert_to_aterm) |
Constructs a list starting from first to last. The iterators are traversed backwards and each element is converted using the TermConverter. | |
template<class Term , class Iter , class ATermConverter > | |
void | make_list_backward (term_list< Term > &result, Iter first, Iter last, ATermConverter convert_to_aterm) |
Constructs a list starting from first to last where the result is put in result. | |
template<typename Term , typename Iter , typename ATermConverter , typename ATermFilter > | |
aterm | make_list_backward (Iter first, Iter last, ATermConverter convert_to_aterm, ATermFilter aterm_filter) |
Constructs a list starting from first to last. The iterators are traversed backwards and each element is converted using the TermConverter and inserted whenever TermFilter yields true for the converted element. | |
template<class Term , class Iter , class ATermConverter , class ATermFilter > | |
void | make_list_backward (term_list< Term > &result, Iter first, Iter last, ATermConverter convert_to_aterm, ATermFilter aterm_filter) |
Construct a list iterating from the last to the first element. Result is put in the variable result. | |
template<typename Term , class Iter , class ATermConverter > | |
aterm | make_list_forward (Iter first, Iter last, ATermConverter convert_to_aterm) |
Constructs a list starting from first to last. Each element is converted using the TermConverter. | |
template<typename Term , class Iter , class ATermConverter > | |
void | make_list_forward (term_list< Term > &result, Iter first, Iter last, ATermConverter convert_to_aterm) |
Constructs a list starting from first to last. Each element is converted using the TermConverter. | |
template<typename Term , class Iter , class ATermConverter , class ATermFilter > | |
aterm | make_list_forward (Iter first, Iter last, ATermConverter convert_to_aterm, ATermFilter aterm_filter) |
Constructs a list starting from first to last. Each element is converted using the TermConverter and inserted whenever TermFilter yields true for the converted element. | |
template<class Term , class Iter , class ATermConverter , class ATermFilter > | |
void | make_list_forward (term_list< Term > &result, Iter first, Iter last, ATermConverter convert_to_aterm, ATermFilter aterm_filter) |
Constructs a list traversing the iterator from first to last, putting the result in place in the variable result. | |
template<class Term , typename ForwardTraversalIterator , class Transformer > | |
void | make_list_forward_helper (term_list< Term > &result, ForwardTraversalIterator &p, const ForwardTraversalIterator last, Transformer transformer) |
void | mark_term (const _aterm &root, std::stack< std::reference_wrapper< _aterm > > &todo) |
Marks a term and recursively all arguments that are not reachable. | |
template<std::size_t N, typename InputIterator , typename TermConverter , typename std::enable_if< mcrl2::utilities::is_iterator< InputIterator >::value, void >::type * = nullptr, typename std::enable_if< std::is_convertible< typename std::invoke_result< TermConverter, typename InputIterator::value_type >::type, aterm >::value, void >::type * = nullptr> | |
std::array< unprotected_aterm_core, N > | construct_arguments (InputIterator it, InputIterator end, TermConverter converter) |
Construct the proxy where its arguments are given by applying the converter to each element in the iterator. | |
template<std::size_t N> | |
void | store_in_argument_array_ (std::size_t, std::array< unprotected_aterm_core, N > &) |
template<std::size_t N, class FUNCTION_OR_TERM_TYPE , typename... Args> | |
void | store_in_argument_array_ (std::size_t i, std::array< unprotected_aterm_core, N > &argument_array, FUNCTION_OR_TERM_TYPE &function_or_term, const Args &... args) |
template<std::size_t N, typename... Args> | |
void | store_in_argument_array (std::array< unprotected_aterm_core, N > &argument_array, const Args &... args) |
template<bool lazy = false> | |
aterm_pool & | g_term_pool () |
obtain a reference to the global aterm pool. | |
template<typename Variable , typename KeyType > | |
atermpp::unordered_map< KeyType, std::size_t > & | variable_index_map () |
template<typename Variable , typename KeyType > | |
std::stack< std::size_t > & | variable_map_free_numbers () |
template<typename Variable , typename KeyType > | |
std::mutex & | variable_mutex () |
template<typename Variable , typename KeyType > | |
std::size_t & | variable_map_max_index () |
thread_aterm_pool & | g_thread_term_pool () |
A reference to the thread local term pool storage. | |
Variables | |
static constexpr bool | EnableGarbageCollection = true |
Enable garbage collection. | |
static constexpr bool | EnableBlockAllocator = true |
Enable the block allocator for terms. | |
static constexpr bool | EnableGarbageCollectionMetrics = false |
Enable to print garbage collection statistics. | |
static constexpr bool | EnableAggressiveGarbageCollection = false |
Performs garbage collection intensively for testing purposes. | |
static constexpr bool | EnableHashtableMetrics = false |
Enable to print hashtable collision, size and number of buckets. | |
static constexpr bool | EnableCreationMetrics = false |
Enable to obtain the percentage of terms found compared to allocated. | |
static constexpr bool | EnableVariableRegistrationMetrics = false |
Keep track of the number of variables registered. | |
constexpr std::size_t | DynamicNumberOfArguments = std::numeric_limits<std::size_t>::max() |
Indicates that the number of arguments is not known at compile time. | |
std::aligned_storage< sizeof(aterm_pool), alignof(aterm_pool)>::type | g_aterm_pool_storage = {} |
Storage for a global term pool that is not initialized. | |
static aterm_pool & | g_aterm_pool_instance = *static_cast<aterm_pool*>(static_cast<void*>(&g_aterm_pool_storage)) |
A reference to the global term pool storage. | |
function_symbol | g_as_int |
These function symbols are used to indicate integer, list and empty list terms. | |
function_symbol | g_as_list |
function_symbol | g_as_empty_list |
using atermpp::detail::_term_appl = typedef _aterm_appl<> |
Definition at line 26 of file aterm_pool.h.
using atermpp::detail::are_terms = typedef mcrl2::utilities::forall<std::is_convertible<Terms, unprotected_aterm_core>...> |
Can be used to check whether all elements in the parameter pack are derived from aterms.
Definition at line 33 of file aterm_core.h.
using atermpp::detail::are_terms_or_functions = typedef mcrl2::utilities::forall<is_term_or_function<Terms>...> |
Definition at line 44 of file aterm_core.h.
using atermpp::detail::function_application_storage = typedef aterm_pool_storage<_aterm_appl<N>, aterm_hasher_finite<N>, aterm_equals_finite<N>, N> |
Definition at line 32 of file aterm_pool.h.
using atermpp::detail::integer_term_storage = typedef aterm_pool_storage<_aterm_int, aterm_int_hasher, aterm_int_equals, 0> |
Define several specializations of the term pool storage objects.
Definition at line 24 of file aterm_pool.h.
using atermpp::detail::is_term_or_function = typedef std::disjunction<std::is_convertible<Term, unprotected_aterm_core>, std::disjunction<mcrl2::utilities::is_applicable<Term, unprotected_aterm_core&>, mcrl2::utilities::is_constant_function_yielding<Term, unprotected_aterm_core> > > |
Check whether all arguments of a parameter pack are terms, constant functions yielding a term or a function putting a term in a result parameter.
Definition at line 39 of file aterm_core.h.
using atermpp::detail::term_storage = typedef aterm_pool_storage<_aterm, aterm_hasher_finite<0>, aterm_equals_finite<0>, 0> |
Definition at line 25 of file aterm_pool.h.
|
inline |
Definition at line 239 of file aterm_core.h.
aterm atermpp::detail::appl_apply | ( | const aterm & | a, |
const Function | f | ||
) |
Applies the function f to all children of a.
a | A term |
f | A function on terms |
Definition at line 27 of file algorithm_impl.h.
term_appl_iterator< Derived > atermpp::detail::aterm_appl_iterator_cast | ( | term_appl_iterator< Base > | a, |
typename std::enable_if< std::is_base_of< aterm, Base >::value &&std::is_base_of< aterm, Derived >::value >::type * | = nullptr |
||
) |
This function can be used to translate an term_appl_iterator of one sort into another.
Definition at line 225 of file aterm_appl_iterator.h.
|
inline |
Auxiliary function to combine hnr with aterms.
Definition at line 158 of file aterm_hash.h.
std::size_t atermpp::detail::combine_args | ( | std::size_t | seed, |
const Tp & | ... | ||
) |
Definition at line 247 of file aterm_hash.h.
|
inline |
Construct the proxy where its arguments are given by applying the converter to each element in the iterator.
Definition at line 35 of file aterm_pool_storage_implementation.h.
|
inline |
void atermpp::detail::find_all_if_impl | ( | const aterm & | t, |
MatchPredicate | op, | ||
OutputIterator & | destBegin | ||
) |
Implements the find_all_if algorithm.
t | A term |
op | A predicate function on terms |
destBegin | The beginning of a range to where the results are written |
Definition at line 139 of file algorithm_impl.h.
bool atermpp::detail::find_if_impl | ( | const aterm & | t, |
MatchPredicate | match, | ||
aterm & | output | ||
) |
Implements the find_if algorithm If the term t is found, it is stored in output and true is returned.
t | A term |
match | A predicate function on terms |
output | The variable to store the match in |
Definition at line 105 of file algorithm_impl.h.
UnaryFunction atermpp::detail::for_each_impl | ( | aterm | t, |
UnaryFunction | op | ||
) |
Implements the for_each algorithm.
t | A term |
op | A unary function on terms |
Definition at line 75 of file algorithm_impl.h.
|
inline |
obtain a reference to the global aterm pool.
provides lazy initialization which should be used when instantiating global terms and function symbols.
Definition at line 31 of file global_aterm_pool.h.
thread_aterm_pool & atermpp::detail::g_thread_term_pool | ( | ) |
A reference to the thread local term pool storage.
Definition at line 31 of file aterm_implementation.cpp.
bottom_up_replace_aterm_builder< Builder, ReplaceFunction > atermpp::detail::make_bottom_up_replace_aterm_builder | ( | ReplaceFunction | f | ) |
Definition at line 126 of file algorithm.h.
cached_bottom_up_replace_aterm_builder< Builder, ReplaceFunction > atermpp::detail::make_cached_bottom_up_replace_aterm_builder | ( | ReplaceFunction | f, |
std::unordered_map< aterm, aterm > & | cache | ||
) |
Definition at line 165 of file algorithm.h.
|
inline |
Constructs a list starting from first to last. The iterators are traversed backwards and each element is converted using the TermConverter.
The functions make_list_backward and make_list_forward with three and four arguments are almost the same. The reason for this is that there is a 5% loss of speed of the toolset when merging these two functions. This is caused by storing and protecting the intermediate value of the converted aterm. See Term t = convert_to_aterm(...).
Definition at line 338 of file aterm_list_implementation.h.
|
inline |
Constructs a list starting from first to last. The iterators are traversed backwards and each element is converted using the TermConverter and inserted whenever TermFilter yields true for the converted element.
Definition at line 317 of file aterm_list_implementation.h.
|
inline |
Constructs a list starting from first to last where the result is put in result.
Constructs a list starting from the first iterator element to the last. The result is put into the variable result.
Definition at line 325 of file aterm_list_implementation.h.
|
inline |
Construct a list iterating from the last to the first element. Result is put in the variable result.
Definition at line 299 of file aterm_list_implementation.h.
|
inline |
Constructs a list starting from first to last. Each element is converted using the TermConverter.
Definition at line 484 of file aterm_list_implementation.h.
|
inline |
Constructs a list starting from first to last. Each element is converted using the TermConverter and inserted whenever TermFilter yields true for the converted element.
Will first store the converted elements in an array and then insert them into the list.
Definition at line 403 of file aterm_list_implementation.h.
|
inline |
Constructs a list starting from first to last. Each element is converted using the TermConverter.
Definition at line 441 of file aterm_list_implementation.h.
|
inline |
Constructs a list traversing the iterator from first to last, putting the result in place in the variable result.
Definition at line 348 of file aterm_list_implementation.h.
void atermpp::detail::make_list_forward_helper | ( | term_list< Term > & | result, |
ForwardTraversalIterator & | p, | ||
const ForwardTraversalIterator | last, | ||
Transformer | transformer | ||
) |
Definition at line 411 of file aterm_list_implementation.h.
partial_replace_aterm_builder< Builder, ReplaceFunction > atermpp::detail::make_partial_replace_aterm_builder | ( | ReplaceFunction | f | ) |
Definition at line 95 of file algorithm.h.
replace_aterm_builder< Builder, ReplaceFunction > atermpp::detail::make_replace_aterm_builder | ( | ReplaceFunction | f | ) |
Definition at line 58 of file algorithm.h.
|
inline |
Marks a term and recursively all arguments that are not reachable.
Definition at line 84 of file aterm_pool_storage_implementation.h.
void atermpp::detail::partial_find_all_if_impl | ( | const aterm & | t, |
MatchPredicate | match, | ||
StopPredicate | stop, | ||
OutputIterator & | destBegin | ||
) |
Implements the partial_find_all_if algorithm.
t | A term |
match | A predicate function on terms |
stop | A predicate function on terms |
destBegin | The beginning of a range to where the results are written |
Definition at line 218 of file algorithm_impl.h.
aterm atermpp::detail::partial_find_if_impl | ( | const aterm & | t, |
MatchPredicate | match, | ||
StopPredicate | stop | ||
) |
Implements the partial_find_if_impl algorithm.
t | A term |
match | A predicate function on terms |
stop | A predicate function on terms |
Definition at line 175 of file algorithm_impl.h.
std::pair< typename std::conditional< is_reference_aterm< typename T::first_type >::value, typename T::first_type, reference_aterm< typename T::first_type > >::type, typename std::conditional< is_reference_aterm< typename T::second_type >::value, typename T::second_type, reference_aterm< typename T::second_type > >::type > atermpp::detail::reference_aterm_pair_constructor_helper | ( | const T & | other | ) |
Definition at line 273 of file aterm_container.h.
void atermpp::detail::store_in_argument_array | ( | std::array< unprotected_aterm_core, N > & | argument_array, |
const Args &... | args | ||
) |
Definition at line 185 of file aterm_pool_storage_implementation.h.
void atermpp::detail::store_in_argument_array_ | ( | std::size_t | i, |
std::array< unprotected_aterm_core, N > & | argument_array, | ||
FUNCTION_OR_TERM_TYPE & | function_or_term, | ||
const Args &... | args | ||
) |
Definition at line 159 of file aterm_pool_storage_implementation.h.
void atermpp::detail::store_in_argument_array_ | ( | std::size_t | , |
std::array< unprotected_aterm_core, N > & | |||
) |
Definition at line 155 of file aterm_pool_storage_implementation.h.
atermpp::unordered_map< KeyType, std::size_t > & atermpp::detail::variable_index_map | ( | ) |
Definition at line 25 of file index_traits.h.
std::stack< std::size_t > & atermpp::detail::variable_map_free_numbers | ( | ) |
Definition at line 32 of file index_traits.h.
std::size_t & atermpp::detail::variable_map_max_index | ( | ) |
Definition at line 47 of file index_traits.h.
std::mutex & atermpp::detail::variable_mutex | ( | ) |
Definition at line 39 of file index_traits.h.
|
constexpr |
Indicates that the number of arguments is not known at compile time.
Definition at line 78 of file aterm_hash.h.
|
staticconstexpr |
Performs garbage collection intensively for testing purposes.
Definition at line 30 of file aterm_configuration.h.
|
staticconstexpr |
Enable the block allocator for terms.
Definition at line 24 of file aterm_configuration.h.
|
staticconstexpr |
Enable to obtain the percentage of terms found compared to allocated.
Definition at line 36 of file aterm_configuration.h.
|
staticconstexpr |
Enable garbage collection.
Definition at line 21 of file aterm_configuration.h.
|
staticconstexpr |
Enable to print garbage collection statistics.
Definition at line 27 of file aterm_configuration.h.
|
staticconstexpr |
Enable to print hashtable collision, size and number of buckets.
Definition at line 33 of file aterm_configuration.h.
|
staticconstexpr |
Keep track of the number of variables registered.
Definition at line 39 of file aterm_configuration.h.
|
extern |
|
extern |
These function symbols are used to indicate integer, list and empty list terms.
They are copied from the function_symbol_pool so that type_is_{int|list|appl} can be defined in the header.
|
extern |
|
static |
A reference to the global term pool storage.
Definition at line 25 of file global_aterm_pool.h.
|
extern |
Storage for a global term pool that is not initialized.
Definition at line 51 of file aterm_implementation.cpp.