mCRL2
Loading...
Searching...
No Matches
atermpp::aterm Class Reference

#include <aterm.h>

Inheritance diagram for atermpp::aterm:
atermpp::aterm_core atermpp::unprotected_aterm_core atermpp::term_list< variable_with_a_rational_factor > atermpp::term_list< variable > atermpp::term_list< data_expression > atermpp::term_list< action_label > atermpp::term_list< lps::state > atermpp::term_list< match_tree_list > atermpp::term_list< match_tree_list_list > atermpp::term_list< assignment > atermpp::aterm_int atermpp::aterm_string atermpp::detail::shared_subset< T >::bdd_node atermpp::term_balanced_tree< Term > atermpp::term_list< Term > mcrl2::action_formulas::action_formula mcrl2::data::alias mcrl2::data::assignment_expression mcrl2::data::binder_type mcrl2::data::container_type mcrl2::data::data_equation mcrl2::data::data_expression mcrl2::data::detail::match_tree mcrl2::data::detail::variable_or_number mcrl2::data::detail::variable_with_a_rational_factor mcrl2::data::linear_inequality mcrl2::data::sort_expression mcrl2::data::structured_sort_constructor mcrl2::data::structured_sort_constructor_argument mcrl2::data::untyped_data_parameter mcrl2::lps::multi_action mcrl2::lps::process_initializer mcrl2::lps::stochastic_distribution mcrl2::pbes_system::fixpoint_symbol mcrl2::pbes_system::pbes_expression mcrl2::pbes_system::propositional_variable mcrl2::pres_system::pres_expression mcrl2::process::action_label mcrl2::process::action_name_multiset mcrl2::process::communication_expression mcrl2::process::process_equation mcrl2::process::process_expression mcrl2::process::process_identifier mcrl2::process::rename_expression mcrl2::process::untyped_multi_action mcrl2::regular_formulas::regular_formula mcrl2::state_formulas::state_formula

Public Types

typedef std::size_t size_type
 An unsigned integral type.
 
typedef ptrdiff_t difference_type
 A signed integral type.
 
typedef term_appl_iterator< atermiterator
 Iterator used to iterate through an term_appl.
 
typedef term_appl_iterator< atermconst_iterator
 Const iterator used to iterate through an term_appl.
 

Public Member Functions

 aterm ()
 Default constructor.
 
 aterm (const aterm &other) noexcept=default
 This class has user-declared copy constructor so declare default copy and move operators.
 
atermoperator= (const aterm &other) noexcept=default
 
 aterm (aterm &&other) noexcept=default
 
atermoperator= (aterm &&other) noexcept=default
 
template<class ForwardIterator , typename std::enable_if< mcrl2::utilities::is_iterator< ForwardIterator >::value >::type * = nullptr, typename std::enable_if<!std::is_same< typename ForwardIterator::iterator_category, std::input_iterator_tag >::value >::type * = nullptr, typename std::enable_if<!std::is_same< typename ForwardIterator::iterator_category, std::output_iterator_tag >::value >::type * = nullptr>
 aterm (const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
 Constructor that provides an aterm based on a function symbol and forward iterator providing the arguments.
 
template<class InputIterator , typename std::enable_if< mcrl2::utilities::is_iterator< InputIterator >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename InputIterator::iterator_category, std::input_iterator_tag >::value >::type * = nullptr>
 aterm (const function_symbol &sym, InputIterator begin, InputIterator end)
 Constructor that provides an aterm based on a function symbol and an input iterator providing the arguments.
 
template<class InputIterator , class TermConverter , typename std::enable_if< mcrl2::utilities::is_iterator< InputIterator >::value >::type * = nullptr>
 aterm (const function_symbol &sym, InputIterator begin, InputIterator end, TermConverter converter)
 
 aterm (const function_symbol &sym)
 Constructor.
 
template<typename ... Terms>
 aterm (const function_symbol &symbol, const Terms &...arguments)
 Constructor for n-arity function application.
 
const function_symbolfunction () const
 Returns the function symbol belonging to an aterm.
 
size_type size () const
 Returns the number of arguments of this term.
 
bool empty () const
 Returns true if the term has no arguments.
 
const_iterator begin () const
 Returns an iterator pointing to the first argument.
 
const_iterator end () const
 Returns a const_iterator pointing past the last argument.
 
constexpr size_type max_size () const
 Returns the largest possible number of arguments.
 
const atermoperator[] (const size_type i) const
 Returns the i-th argument.
 
- Public Member Functions inherited from atermpp::aterm_core
 aterm_core () noexcept
 Default constructor.
 
 ~aterm_core () noexcept
 Standard destructor.
 
 aterm_core (const detail::_aterm *t) noexcept
 Constructor based on an internal term data structure. This is not for public use.
 
 aterm_core (const aterm_core &other) noexcept
 Copy constructor.
 
 aterm_core (aterm_core &&other) noexcept
 Move constructor.
 
aterm_coreoperator= (const aterm_core &other) noexcept
 Assignment operator.
 
aterm_coreassign (const aterm_core &other, detail::thread_aterm_pool &pool) noexcept
 Assignment operator, to be used if busy and forbidden flags are explicitly available.
 
template<bool CHECK_BUSY_FLAG = true>
aterm_coreunprotected_assign (const aterm_core &other) noexcept
 Assignment operator, to be used when the busy flags do not need to be set.
 
aterm_coreoperator= (aterm_core &&other) noexcept
 Move assignment operator.
 
- Public Member Functions inherited from atermpp::unprotected_aterm_core
 unprotected_aterm_core () noexcept
 Default constuctor.
 
 unprotected_aterm_core (const detail::_aterm *term) noexcept
 Constructor.
 
bool type_is_appl () const noexcept
 Dynamic check whether the term is an aterm.
 
bool type_is_int () const noexcept
 Dynamic check whether the term is an aterm_int.
 
bool type_is_list () const noexcept
 Dynamic check whether the term is an aterm_list.
 
bool operator== (const unprotected_aterm_core &t) const
 Comparison operator.
 
bool operator!= (const unprotected_aterm_core &t) const
 Inequality operator on two unprotected aterms.
 
bool operator< (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool operator> (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool operator<= (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool operator>= (const unprotected_aterm_core &t) const
 Comparison operator for two unprotected aterms.
 
bool defined () const
 Returns true if this term is not equal to the term assigned by the default constructor of aterms, aterm_appls and aterm_int.
 
void swap (unprotected_aterm_core &t) noexcept
 Swaps this term with its argument.
 
const function_symbolfunction () const
 Yields the function symbol in an aterm.
 

Protected Member Functions

 aterm (detail::_term_appl *t)
 Constructor.
 

Additional Inherited Members

- Protected Attributes inherited from atermpp::unprotected_aterm_core
const detail::_atermm_term
 

Detailed Description

Definition at line 24 of file aterm.h.

Member Typedef Documentation

◆ const_iterator

Const iterator used to iterate through an term_appl.

Definition at line 45 of file aterm.h.

◆ difference_type

A signed integral type.

Definition at line 39 of file aterm.h.

◆ iterator

Iterator used to iterate through an term_appl.

Definition at line 42 of file aterm.h.

◆ size_type

typedef std::size_t atermpp::aterm::size_type

An unsigned integral type.

Definition at line 36 of file aterm.h.

Constructor & Destructor Documentation

◆ aterm() [1/9]

atermpp::aterm::aterm ( detail::_term_appl t)
inlineexplicitprotected

Constructor.

Parameters
tA pointer internal data structure from which the term is constructed.

This function is explicitly protected such that is not used in common code.

Definition at line 30 of file aterm.h.

◆ aterm() [2/9]

atermpp::aterm::aterm ( )
inline

Default constructor.

Definition at line 48 of file aterm.h.

◆ aterm() [3/9]

atermpp::aterm::aterm ( const aterm other)
defaultnoexcept

This class has user-declared copy constructor so declare default copy and move operators.

◆ aterm() [4/9]

atermpp::aterm::aterm ( aterm &&  other)
defaultnoexcept

◆ aterm() [5/9]

template<class ForwardIterator , typename std::enable_if< mcrl2::utilities::is_iterator< ForwardIterator >::value >::type * = nullptr, typename std::enable_if<!std::is_same< typename ForwardIterator::iterator_category, std::input_iterator_tag >::value >::type * = nullptr, typename std::enable_if<!std::is_same< typename ForwardIterator::iterator_category, std::output_iterator_tag >::value >::type * = nullptr>
atermpp::aterm::aterm ( const function_symbol sym,
ForwardIterator  begin,
ForwardIterator  end 
)
inline

Constructor that provides an aterm based on a function symbol and forward iterator providing the arguments.

The iterator range is traversed more than once. If only one traversal is required use term_appl with a TermConverter argument. But this function is substantially less efficient. The length of the iterator range must match the arity of the function symbol.

Parameters
symA function symbol.
beginThe start of a range of elements.
endThe end of a range of elements.

Definition at line 75 of file aterm.h.

◆ aterm() [6/9]

template<class InputIterator , typename std::enable_if< mcrl2::utilities::is_iterator< InputIterator >::value >::type * = nullptr, typename std::enable_if< std::is_same< typename InputIterator::iterator_category, std::input_iterator_tag >::value >::type * = nullptr>
atermpp::aterm::aterm ( const function_symbol sym,
InputIterator  begin,
InputIterator  end 
)
inline

Constructor that provides an aterm based on a function symbol and an input iterator providing the arguments.

The given iterator is traversed only once. So it can be used with an input iterator. This means that the TermConverter is applied exactly once to each element. The length of the iterator range must be equal to the arity of the function symbol.

Parameters
symA function symbol.
beginThe start of a range of elements.
endThe end of a range of elements.

Definition at line 96 of file aterm.h.

◆ aterm() [7/9]

template<class InputIterator , class TermConverter , typename std::enable_if< mcrl2::utilities::is_iterator< InputIterator >::value >::type * = nullptr>
atermpp::aterm::aterm ( const function_symbol sym,
InputIterator  begin,
InputIterator  end,
TermConverter  converter 
)
inline

The given iterator is traversed only once. So it can be used with an input iterator. This means that the TermConverter is applied exactly once to each element. The length of the iterator range must be equal to the arity of the function symbol.

Parameters
symA function symbol.
beginThe start of a range of elements.
endThe end of a range of elements.
converterAn class or lambda term containing an operator Term operator()(const Term& t) which is applied to each each element in the iterator range before it becomes an argument of this term.

Definition at line 116 of file aterm.h.

◆ aterm() [8/9]

atermpp::aterm::aterm ( const function_symbol sym)
inline

Constructor.

Parameters
symA function symbol.

Definition at line 128 of file aterm.h.

◆ aterm() [9/9]

template<typename ... Terms>
atermpp::aterm::aterm ( const function_symbol symbol,
const Terms &...  arguments 
)
inline

Constructor for n-arity function application.

Parameters
symbolA function symbol.
argumentsThe arguments of the function application.

Definition at line 137 of file aterm.h.

Member Function Documentation

◆ begin()

const_iterator atermpp::aterm::begin ( ) const
inline

Returns an iterator pointing to the first argument.

Returns
An iterator pointing to the first argument.

Definition at line 165 of file aterm.h.

◆ empty()

bool atermpp::aterm::empty ( ) const
inline

Returns true if the term has no arguments.

Returns
True if this term has no arguments.

Definition at line 158 of file aterm.h.

◆ end()

const_iterator atermpp::aterm::end ( ) const
inline

Returns a const_iterator pointing past the last argument.

Returns
A const_iterator pointing past the last argument.

Definition at line 172 of file aterm.h.

◆ function()

const function_symbol & atermpp::aterm::function ( ) const
inline

Returns the function symbol belonging to an aterm.

Returns
The function symbol of this term.

Definition at line 144 of file aterm.h.

◆ max_size()

constexpr size_type atermpp::aterm::max_size ( ) const
inlineconstexpr

Returns the largest possible number of arguments.

Returns
The largest possible number of arguments.

Definition at line 179 of file aterm.h.

◆ operator=() [1/2]

aterm & atermpp::aterm::operator= ( aterm &&  other)
defaultnoexcept

◆ operator=() [2/2]

aterm & atermpp::aterm::operator= ( const aterm other)
defaultnoexcept

◆ operator[]()

const aterm & atermpp::aterm::operator[] ( const size_type  i) const
inline

Returns the i-th argument.

Parameters
iA positive integer.
Returns
The argument with the given index.

Definition at line 187 of file aterm.h.

◆ size()

size_type atermpp::aterm::size ( ) const
inline

Returns the number of arguments of this term.

Returns
The number of arguments of this term.

Definition at line 151 of file aterm.h.


The documentation for this class was generated from the following file: