mCRL2
Loading...
Searching...
No Matches
aterm.h File Reference

The term_appl class represents function application. More...

Go to the source code of this file.

Classes

class  atermpp::aterm
 
struct  atermpp::is_convertible< Term1, Term2 >
 
struct  std::hash< atermpp::aterm >
 Standard hash function. More...
 

Namespaces

namespace  atermpp
 The main namespace for the aterm++ library.
 
namespace  std
 STL namespace.
 

Typedefs

typedef void(* atermpp::term_callback) (const aterm &)
 

Functions

void atermpp::add_deletion_hook (const function_symbol &, term_callback)
 Check for reasonably sized aterm (32 bits, 4 bytes) This check might break on perfectly valid architectures that have char == 2 bytes, and sizeof(header_type) == 2.
 
template<class Term , 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>
void atermpp::make_term_appl (Term &target, const function_symbol &sym, ForwardIterator begin, ForwardIterator end)
 Constructor an aterm in a variable based on a function symbol and an forward iterator providing the arguments.
 
template<class Term , 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>
void atermpp::make_term_appl (Term &target, const function_symbol &sym, InputIterator begin, InputIterator end)
 Constructor an aterm in a variable based on a function symbol and an input iterator providing the arguments.
 
template<class Term , class InputIterator , class TermConverter , typename std::enable_if< mcrl2::utilities::is_iterator< InputIterator >::value >::type * = nullptr>
void atermpp::make_term_appl (Term &target, const function_symbol &sym, InputIterator begin, InputIterator end, TermConverter converter)
 Constructor an aterm in a variable based on a function symbol and an forward iterator providing the arguments.
 
template<class Term >
void atermpp::make_term_appl (Term &target, const function_symbol &sym)
 Make an term_appl consisting of a single function symbol.
 
template<class Term , typename ... Terms>
void atermpp::make_term_appl (Term &target, const function_symbol &symbol, const Terms &...arguments)
 Make an aterm application for n-arity function application.
 
template<class Term , class INDEX_TYPE , typename ... Terms>
void atermpp::make_term_appl_with_index (aterm &target, const function_symbol &symbol, const Terms &...arguments)
 Constructor for n-arity function application with an index.
 
template<class Derived , class Base >
const Derived & atermpp::down_cast (const Base &t, typename std::enable_if< is_convertible< Base, Derived >::value &&!std::is_base_of< Derived, Base >::value >::type *=nullptr)
 A cheap cast from one aterm based type to another When casting one aterm based type into another, generally a new aterm is constructed, and the old one is destroyed. This can cause undesired overhead, for instance due to increasing and decreasing of reference counts. This cast changes the type, without changing the aterm itself. It can only be used if Base and Derived inherit from aterm, and contain no additional information than a single aterm.
 
template<class Derived , class Base >
Derived & atermpp::reference_cast (Base &t, typename std::enable_if< is_convertible< Base, Derived >::value &&!std::is_base_of< Derived, Base >::value >::type *=nullptr)
 A cast from one aterm based type to another, as a reference, allowing to assign to it.
 
template<class Derived >
Derived & atermpp::reference_cast (Derived &t)
 A cast from one aterm based type to another, as a reference, allowing to assign to it.
 
template<typename DerivedCont , typename Base , template< typename Elem > class Cont>
const DerivedCont & atermpp::container_cast (const Cont< Base > &t, typename std::enable_if_t< is_container< DerivedCont, aterm >::value &&std::is_same_v< Cont< typename DerivedCont::value_type >, DerivedCont > &&!std::is_base_of_v< DerivedCont, Cont< Base > > &&is_convertible< Base, typename DerivedCont::value_type >::value > *=nullptr)
 
template<class Derived , class Base >
const Derived & atermpp::vertical_cast (const Base &t, typename std::enable_if< is_convertible< Base, Derived >::value >::type *=nullptr)
 A cast form an aterm derived class to a class that inherits in possibly multiple steps from this class.
 
template<typename DerivedCont , typename Base , template< typename Elem > class Cont>
const DerivedCont & atermpp::vertical_cast (const Cont< Base > &t, typename std::enable_if_t< is_container< DerivedCont, aterm >::value &&std::is_same_v< Cont< typename DerivedCont::value_type >, DerivedCont > &&is_convertible< Base, typename DerivedCont::value_type >::value > *=nullptr)
 
std::ostream & atermpp::operator<< (std::ostream &out, const atermpp::aterm &t)
 Send the term in textual form to the ostream.
 
std::string atermpp::pp (const atermpp::aterm &t)
 Transform an aterm to an ascii string.
 
template<>
void std::swap (atermpp::unprotected_aterm_core &t1, atermpp::unprotected_aterm_core &t2) noexcept
 Swaps two aterms.
 
void std::swap (atermpp::aterm &t1, atermpp::aterm &t2) noexcept
 Swaps two term_applss.
 

Detailed Description

The term_appl class represents function application.

Definition in file aterm.h.