mCRL2
Loading...
Searching...
No Matches
mcrl2::data::structured_sort Class Reference

structured sort. More...

#include <structured_sort.h>

Inheritance diagram for mcrl2::data::structured_sort:
mcrl2::data::sort_expression atermpp::aterm atermpp::aterm_core atermpp::unprotected_aterm_core

Public Member Functions

 structured_sort ()
 \brief Default constructor X3.
 
 structured_sort (const atermpp::aterm &term)
 
 structured_sort (const structured_sort_constructor_list &constructors)
 \brief Constructor Z14.
 
template<typename Container >
 structured_sort (const Container &constructors, typename atermpp::enable_if_container< Container, structured_sort_constructor >::type *=nullptr)
 \brief Constructor Z2.
 
 structured_sort (const structured_sort &) noexcept=default
 Move semantics.
 
 structured_sort (structured_sort &&) noexcept=default
 
structured_sortoperator= (const structured_sort &) noexcept=default
 
structured_sortoperator= (structured_sort &&) noexcept=default
 
const structured_sort_constructor_listconstructors () const
 
function_symbol_vector constructor_functions () const
 Returns the constructor functions of this sort, such that the result can be used by the rewriter.
 
function_symbol_vector comparison_functions () const
 Returns the additional functions of this sort, used to implement its comparison operators.
 
function_symbol_vector projection_functions () const
 Returns the projection functions of this sort, such that the result can be used by the rewriter.
 
function_symbol_vector recogniser_functions () const
 Returns the recogniser functions of this sort, such that the result can be used by the rewriter.
 
data_equation_vector constructor_equations () const
 Returns the equations for ==, < and <= for this sort, such that the result can be used by the rewriter internally.
 
data_equation_vector comparison_equations () const
 Returns the equations for the functions used to implement comparison operators on this sort. Needed to do proper rewriting.
 
data_equation_vector projection_equations () const
 Generate equations for the projection functions of this sort.
 
data_equation_vector recogniser_equations () const
 Generate equations for the recognisers of this sort, assuming that this sort is referred to with s.
 
- Public Member Functions inherited from mcrl2::data::sort_expression
 sort_expression ()
 \brief Default constructor X3.
 
 sort_expression (const atermpp::aterm &term)
 
 sort_expression (const sort_expression &) noexcept=default
 Move semantics.
 
 sort_expression (sort_expression &&) noexcept=default
 
sort_expressionoperator= (const sort_expression &) noexcept=default
 
sort_expressionoperator= (sort_expression &&) noexcept=default
 
const sort_expressiontarget_sort () const
 Returns the target sort of this expression.
 
- Public Member Functions inherited from atermpp::aterm
 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.
 

Private Member Functions

function_symbol to_pos_function (const sort_expression &s) const
 
function_symbol equal_arguments_function (const sort_expression &s) const
 
function_symbol smaller_arguments_function (const sort_expression &s) const
 
function_symbol smaller_equal_arguments_function (const sort_expression &s) const
 
function_symbol_vector constructor_functions (const sort_expression &s) const
 
function_symbol_vector comparison_functions (const sort_expression &s) const
 
function_symbol_vector projection_functions (const sort_expression &s) const
 
function_symbol_vector recogniser_functions (const sort_expression &s) const
 
data_equation_vector comparison_equations (const sort_expression &s) const
 
data_equation_vector constructor_equations (const sort_expression &s) const
 
data_equation_vector projection_equations (const sort_expression &s) const
 
data_equation_vector recogniser_equations (const sort_expression &s) const
 

Static Private Member Functions

static bool has_recogniser (structured_sort_constructor const &s)
 

Friends

class data_specification
 
class sort_specification
 
function_symbol_vector sort_fset::fset_generate_constructors_code (const sort_expression &)
 
function_symbol_vector sort_fset::fset_generate_functions_code (const sort_expression &)
 
data_equation_vector sort_fset::fset_generate_equations_code (const sort_expression &)
 
function_symbol_vector sort_fbag::fbag_generate_constructors_code (const sort_expression &)
 
function_symbol_vector sort_fbag::fbag_generate_functions_code (const sort_expression &)
 
data_equation_vector sort_fbag::fbag_generate_equations_code (const sort_expression &)
 

Additional Inherited Members

- Public Types inherited from atermpp::aterm
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.
 
- Protected Member Functions inherited from atermpp::aterm
 aterm (detail::_term_appl *t)
 Constructor.
 
- Protected Attributes inherited from atermpp::unprotected_aterm_core
const detail::_atermm_term
 

Detailed Description

structured sort.

A structured sort is a sort with the following structure: struct c1(pr1,1:S1,1, ..., pr1,k1:S1,k1)?is_c1 | ... | cn(prn,1:Sn,1, ..., prn,kn:Sn,kn)?is_cn in this:

  • c1, ..., cn are called constructors.
  • pri,j are the projection functions (or constructor arguments).
  • is_ci are the recognisers. \brief A structured sort

Definition at line 55 of file structured_sort.h.

Constructor & Destructor Documentation

◆ structured_sort() [1/6]

mcrl2::data::structured_sort::structured_sort ( )
inline

\brief Default constructor X3.

Definition at line 59 of file structured_sort.h.

◆ structured_sort() [2/6]

mcrl2::data::structured_sort::structured_sort ( const atermpp::aterm term)
inlineexplicit

\brief Constructor Z9. \param term A term

Definition at line 65 of file structured_sort.h.

◆ structured_sort() [3/6]

mcrl2::data::structured_sort::structured_sort ( const structured_sort_constructor_list constructors)
inlineexplicit

\brief Constructor Z14.

Definition at line 72 of file structured_sort.h.

◆ structured_sort() [4/6]

template<typename Container >
mcrl2::data::structured_sort::structured_sort ( const Container &  constructors,
typename atermpp::enable_if_container< Container, structured_sort_constructor >::type *  = nullptr 
)
inline

\brief Constructor Z2.

Definition at line 78 of file structured_sort.h.

◆ structured_sort() [5/6]

mcrl2::data::structured_sort::structured_sort ( const structured_sort )
defaultnoexcept

Move semantics.

◆ structured_sort() [6/6]

mcrl2::data::structured_sort::structured_sort ( structured_sort &&  )
defaultnoexcept

Member Function Documentation

◆ comparison_equations() [1/2]

data_equation_vector mcrl2::data::structured_sort::comparison_equations ( ) const
inline

Returns the equations for the functions used to implement comparison operators on this sort. Needed to do proper rewriting.

Definition at line 414 of file structured_sort.h.

◆ comparison_equations() [2/2]

data_equation_vector mcrl2::data::structured_sort::comparison_equations ( const sort_expression s) const
inlineprivate

Definition at line 184 of file structured_sort.h.

◆ comparison_functions() [1/2]

function_symbol_vector mcrl2::data::structured_sort::comparison_functions ( ) const
inline

Returns the additional functions of this sort, used to implement its comparison operators.

Definition at line 384 of file structured_sort.h.

◆ comparison_functions() [2/2]

function_symbol_vector mcrl2::data::structured_sort::comparison_functions ( const sort_expression s) const
inlineprivate

Definition at line 145 of file structured_sort.h.

◆ constructor_equations() [1/2]

data_equation_vector mcrl2::data::structured_sort::constructor_equations ( ) const
inline

Returns the equations for ==, < and <= for this sort, such that the result can be used by the rewriter internally.

Definition at line 406 of file structured_sort.h.

◆ constructor_equations() [2/2]

data_equation_vector mcrl2::data::structured_sort::constructor_equations ( const sort_expression s) const
inlineprivate

Definition at line 263 of file structured_sort.h.

◆ constructor_functions() [1/2]

function_symbol_vector mcrl2::data::structured_sort::constructor_functions ( ) const
inline

Returns the constructor functions of this sort, such that the result can be used by the rewriter.

Definition at line 377 of file structured_sort.h.

◆ constructor_functions() [2/2]

function_symbol_vector mcrl2::data::structured_sort::constructor_functions ( const sort_expression s) const
inlineprivate

Definition at line 135 of file structured_sort.h.

◆ constructors()

const structured_sort_constructor_list & mcrl2::data::structured_sort::constructors ( ) const
inline

Definition at line 88 of file structured_sort.h.

◆ equal_arguments_function()

function_symbol mcrl2::data::structured_sort::equal_arguments_function ( const sort_expression s) const
inlineprivate

Definition at line 117 of file structured_sort.h.

◆ has_recogniser()

static bool mcrl2::data::structured_sort::has_recogniser ( structured_sort_constructor const &  s)
inlinestaticprivate

Definition at line 106 of file structured_sort.h.

◆ operator=() [1/2]

structured_sort & mcrl2::data::structured_sort::operator= ( const structured_sort )
defaultnoexcept

◆ operator=() [2/2]

structured_sort & mcrl2::data::structured_sort::operator= ( structured_sort &&  )
defaultnoexcept

◆ projection_equations() [1/2]

data_equation_vector mcrl2::data::structured_sort::projection_equations ( ) const
inline

Generate equations for the projection functions of this sort.

Returns
A vector of equations for the projection functions of this sort.

Definition at line 421 of file structured_sort.h.

◆ projection_equations() [2/2]

data_equation_vector mcrl2::data::structured_sort::projection_equations ( const sort_expression s) const
inlineprivate

Definition at line 293 of file structured_sort.h.

◆ projection_functions() [1/2]

function_symbol_vector mcrl2::data::structured_sort::projection_functions ( ) const
inline

Returns the projection functions of this sort, such that the result can be used by the rewriter.

Definition at line 391 of file structured_sort.h.

◆ projection_functions() [2/2]

function_symbol_vector mcrl2::data::structured_sort::projection_functions ( const sort_expression s) const
inlineprivate

Definition at line 155 of file structured_sort.h.

◆ recogniser_equations() [1/2]

data_equation_vector mcrl2::data::structured_sort::recogniser_equations ( ) const
inline

Generate equations for the recognisers of this sort, assuming that this sort is referred to with s.

Returns
A vector of equations for the recognisers of this sort.

Definition at line 429 of file structured_sort.h.

◆ recogniser_equations() [2/2]

data_equation_vector mcrl2::data::structured_sort::recogniser_equations ( const sort_expression s) const
inlineprivate

Definition at line 331 of file structured_sort.h.

◆ recogniser_functions() [1/2]

function_symbol_vector mcrl2::data::structured_sort::recogniser_functions ( ) const
inline

Returns the recogniser functions of this sort, such that the result can be used by the rewriter.

Definition at line 399 of file structured_sort.h.

◆ recogniser_functions() [2/2]

function_symbol_vector mcrl2::data::structured_sort::recogniser_functions ( const sort_expression s) const
inlineprivate

Definition at line 170 of file structured_sort.h.

◆ smaller_arguments_function()

function_symbol mcrl2::data::structured_sort::smaller_arguments_function ( const sort_expression s) const
inlineprivate

Definition at line 123 of file structured_sort.h.

◆ smaller_equal_arguments_function()

function_symbol mcrl2::data::structured_sort::smaller_equal_arguments_function ( const sort_expression s) const
inlineprivate

Definition at line 129 of file structured_sort.h.

◆ to_pos_function()

function_symbol mcrl2::data::structured_sort::to_pos_function ( const sort_expression s) const
inlineprivate

Definition at line 111 of file structured_sort.h.

Friends And Related Symbol Documentation

◆ data_specification

friend class data_specification
friend

Definition at line 94 of file structured_sort.h.

◆ sort_fbag::fbag_generate_constructors_code

◆ sort_fbag::fbag_generate_equations_code

◆ sort_fbag::fbag_generate_functions_code

◆ sort_fset::fset_generate_constructors_code

◆ sort_fset::fset_generate_equations_code

◆ sort_fset::fset_generate_functions_code

◆ sort_specification

friend class sort_specification
friend

Definition at line 95 of file structured_sort.h.


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