mCRL2
Loading...
Searching...
No Matches
mcrl2::core Namespace Reference

Namespaces

namespace  detail
 

Classes

class  add_binding
 Traverser that defines functions for maintaining bound variables. More...
 
class  apply_builder
 
class  apply_builder_arg1
 
class  apply_builder_arg2
 
struct  apply_traverser
 
struct  builder
 expression builder that visits all sub expressions More...
 
struct  default_parser_actions
 
struct  parse_node
 Wrapper for D_ParseNode. More...
 
class  parse_node_exception
 
class  parse_node_unexpected_exception
 
struct  parser
 Wrapper for D_Parser and its corresponding D_ParserTables. More...
 
struct  parser_actions
 
struct  parser_table
 Wrapper for D_ParserTables. More...
 
struct  stream_printer
 Prints the object x to a stream. More...
 
struct  term_traits
 Contains type information for terms. More...
 
struct  term_traits< data::data_expression >
 Contains type information for data expressions. More...
 
struct  term_traits< pbes_system::pbes_expression >
 Contains type information for pbes expressions. More...
 
struct  term_traits< pres_system::pres_expression >
 Contains type information for pres expressions. More...
 
struct  term_traits_optimized
 Contains type information for terms. More...
 
struct  term_traits_optimized< pbes_system::pbes_expression >
 Contains type information for pbes expressions. More...
 
struct  term_traits_optimized< pres_system::pres_expression >
 Contains type information for pres expressions. More...
 
struct  traverser
 expression traverser that visits all sub expressions More...
 
struct  update_apply_builder
 
class  update_apply_builder_arg1
 

Typedefs

using identifier_string = atermpp::aterm_string
 String type of the LPS library. Identifier strings are represented internally as ATerms.
 
using identifier_string_list = atermpp::term_list< identifier_string >
 \brief list of identifier_strings
 
using identifier_string_vector = std::vector< identifier_string >
 \brief vector of identifier_strings
 

Enumerations

enum class  print_format_type { print_default , print_internal }
 print_format_type represents the available pretty print formats More...
 

Functions

std::string pp (const core::identifier_string &x, bool arg0)
 
template<typename T >
std::string pp (const T &x, bool precedence_aware=true)
 Returns a string representation of the object x.
 
atermpp::aterm load_aterm (std::istream &stream, bool binary=true, const std::string &format="aterm", const std::string &source="", atermpp::aterm_transformer transformer=atermpp::identity)
 Attempts to read an aterm from a stream.
 
template<template< class > class Builder>
apply_builder< Builder > make_apply_builder ()
 
template<template< class > class Builder, class Arg1 >
apply_builder_arg1< Builder, Arg1 > make_apply_builder_arg1 (const Arg1 &arg1)
 
template<template< class > class Builder, class Arg1 , class Arg2 >
apply_builder_arg2< Builder, Arg1, Arg2 > make_apply_builder_arg2 (const Arg1 &arg1, const Arg2 &arg2)
 
template<template< class > class Builder, class Function >
update_apply_builder< Builder, Function > make_update_apply_builder (const Function &f)
 
template<template< class > class Builder, class Function , class Arg1 >
update_apply_builder_arg1< Builder, Function, Arg1 > make_update_apply_builder_arg1 (const Function &f)
 
std::ostream & operator<< (std::ostream &out, const identifier_string &x)
 
void swap (identifier_string &t1, identifier_string &t2) noexcept
 \brief swap overload
 
bool is_identifier_string (const atermpp::aterm &t)
 Tests if a term is an identifier string.
 
identifier_string empty_identifier_string ()
 Provides the empty identifier string.
 
template<typename Term >
void make_optimized_not (Term &result, const Term &arg)
 Make a negation.
 
template<typename Term >
Term optimized_not (const Term &arg)
 Make a negation.
 
template<typename Term >
void make_optimized_and (Term &result, const Term &p, const Term &q)
 Make a conjunction, and optimize if possible.
 
template<typename Term >
Term optimized_and (const Term &p, const Term &q)
 Make a conjunction, and optimize if possible.
 
template<typename Term >
void make_optimized_or (Term &result, const Term &p, const Term &q)
 Make a disjunction.
 
template<typename Term >
Term optimized_or (const Term &p, const Term &q)
 Make a disjunction, and optimize if possible.
 
template<typename Term >
void make_optimized_imp (Term &result, const Term &p, const Term &q)
 Make an implication.
 
template<typename Term >
Term optimized_imp (const Term &p, const Term &q)
 Make a conjunction, and optimize if possible.
 
template<typename Term , typename VariableSequence >
void make_optimized_forall (Term &result, const VariableSequence &l, const Term &p, bool remove_variables=false)
 Make an optimized universal quantification, applying optimisations when possible.
 
template<typename Term , typename VariableSequence >
Term optimized_forall (const VariableSequence &l, const Term &p, bool remove_variables=false)
 Make an optimized universal quantification, applying optimisations.
 
template<typename Term , typename VariableSequence >
void make_optimized_exists (Term &result, const VariableSequence &l, const Term &p, bool remove_variables=false)
 Make an optimized existential quantification, optimizing the result.
 
template<typename Term , typename VariableSequence >
Term optimized_exists (const VariableSequence &l, const Term &p, bool remove_variables=false)
 Make an optimized existential quantification.
 
template<typename T >
void print_aterm (const T &)
 
template<>
void print_aterm (const atermpp::aterm &x)
 
identifier_string parse_identifier (const std::string &text)
 Parse an identifier.
 
bool is_user_identifier (std::string const &s)
 
void warn_and_or (const parse_node &)
 Prints a warning for each occurrence of 'x && y || z' in the parse tree.
 
void warn_left_merge_merge (const parse_node &)
 Prints a warning for each occurrence of 'x ||_ y || z' in the parse tree.
 
std::string pp_format_to_string (const print_format_type pp_format)
 Print string representation of pretty print format.
 
std::ostream & operator<< (std::ostream &os, const print_format_type &pp_format)
 
print_format_type parse_pp_format (const std::string &s)
 
std::istream & operator>> (std::istream &is, print_format_type &f)
 
template<template< class > class Traverser>
apply_traverser< Traverser > make_apply_traverser ()
 

Typedef Documentation

◆ identifier_string

String type of the LPS library. Identifier strings are represented internally as ATerms.

Definition at line 23 of file identifier_string.h.

◆ identifier_string_list

\brief list of identifier_strings

Definition at line 27 of file identifier_string.h.

◆ identifier_string_vector

\brief vector of identifier_strings

Definition at line 30 of file identifier_string.h.

Enumeration Type Documentation

◆ print_format_type

enum class mcrl2::core::print_format_type
strong

print_format_type represents the available pretty print formats

Enumerator
print_default 
print_internal 

Definition at line 22 of file print_format.h.

Function Documentation

◆ empty_identifier_string()

identifier_string mcrl2::core::empty_identifier_string ( )
inline

Provides the empty identifier string.

Returns
The empty identifier string.

Definition at line 64 of file identifier_string.h.

◆ is_identifier_string()

bool mcrl2::core::is_identifier_string ( const atermpp::aterm &  t)
inline

Tests if a term is an identifier string.

Parameters
[in]tA term
Returns
Whether t is an identifier string.

Definition at line 56 of file identifier_string.h.

◆ is_user_identifier()

bool mcrl2::core::is_user_identifier ( std::string const &  s)
inline

Definition at line 272 of file parse.h.

◆ load_aterm()

atermpp::aterm mcrl2::core::load_aterm ( std::istream &  stream,
bool  binary = true,
const std::string &  format = "aterm",
const std::string &  source = "",
atermpp::aterm_transformer  transformer = atermpp::identity 
)
inline

Attempts to read an aterm from a stream.

Parameters
[in]streamThe stream from which the term is read.
[in]binaryA boolean indicating whether the stream is in binary of textual format.
[in]formatThe format that is being read (for example "LPS" or "PBES").
[in]sourceThe source from which the stream originates (the empty string is used for an unknown source).
[in]transformerA funtion that is applied to every subterm of the read term.
Exceptions
Throwsa mcrl2 runtime error when an error occurs when reading the term.

Definition at line 43 of file load_aterm.h.

◆ make_apply_builder()

template<template< class > class Builder>
apply_builder< Builder > mcrl2::core::make_apply_builder ( )

Definition at line 103 of file builder.h.

◆ make_apply_builder_arg1()

template<template< class > class Builder, class Arg1 >
apply_builder_arg1< Builder, Arg1 > mcrl2::core::make_apply_builder_arg1 ( const Arg1 &  arg1)

Definition at line 127 of file builder.h.

◆ make_apply_builder_arg2()

template<template< class > class Builder, class Arg1 , class Arg2 >
apply_builder_arg2< Builder, Arg1, Arg2 > mcrl2::core::make_apply_builder_arg2 ( const Arg1 &  arg1,
const Arg2 &  arg2 
)

Definition at line 151 of file builder.h.

◆ make_apply_traverser()

template<template< class > class Traverser>
apply_traverser< Traverser > mcrl2::core::make_apply_traverser ( )

Definition at line 78 of file traverser.h.

◆ make_optimized_and()

template<typename Term >
void mcrl2::core::make_optimized_and ( Term &  result,
const Term &  p,
const Term &  q 
)
inline

Make a conjunction, and optimize if possible.

Parameters
resultVariable to contain the resulting optimized and.
pA term
qA term

Definition at line 278 of file optimized_boolean_operators.h.

◆ make_optimized_exists()

template<typename Term , typename VariableSequence >
void mcrl2::core::make_optimized_exists ( Term &  result,
const VariableSequence &  l,
const Term &  p,
bool  remove_variables = false 
)
inline

Make an optimized existential quantification, optimizing the result.

Parameters
resultPlace where the quantified expressions is placed. If l is empty, result becomes p.
lA sequence of variables.
pA term.
remove_variablesIf true, unused quantifier variables are removed

Definition at line 377 of file optimized_boolean_operators.h.

◆ make_optimized_forall()

template<typename Term , typename VariableSequence >
void mcrl2::core::make_optimized_forall ( Term &  result,
const VariableSequence &  l,
const Term &  p,
bool  remove_variables = false 
)
inline

Make an optimized universal quantification, applying optimisations when possible.

Parameters
resultPlace where the quantified expressions is placed. If the variable list l is empty, result becomes p.
lA sequence of variables.
pA term.
remove_variablesIf true, unused quantifier variables are removed.

Definition at line 351 of file optimized_boolean_operators.h.

◆ make_optimized_imp()

template<typename Term >
void mcrl2::core::make_optimized_imp ( Term &  result,
const Term &  p,
const Term &  q 
)
inline

Make an implication.

Parameters
resultVariable to contain the resulting optimized implication.
pA term
qA term

Definition at line 326 of file optimized_boolean_operators.h.

◆ make_optimized_not()

template<typename Term >
void mcrl2::core::make_optimized_not ( Term &  result,
const Term &  arg 
)
inline

Make a negation.

Parameters
resultThe placeholder where the negation of the argument is put. This is more efficient than returning as a function result.
argA term

Definition at line 255 of file optimized_boolean_operators.h.

◆ make_optimized_or()

template<typename Term >
void mcrl2::core::make_optimized_or ( Term &  result,
const Term &  p,
const Term &  q 
)
inline

Make a disjunction.

Parameters
resultVariable to contain the resulting optimized or.
pA term
qA term

Definition at line 302 of file optimized_boolean_operators.h.

◆ make_update_apply_builder()

template<template< class > class Builder, class Function >
update_apply_builder< Builder, Function > mcrl2::core::make_update_apply_builder ( const Function &  f)

Definition at line 186 of file builder.h.

◆ make_update_apply_builder_arg1()

template<template< class > class Builder, class Function , class Arg1 >
update_apply_builder_arg1< Builder, Function, Arg1 > mcrl2::core::make_update_apply_builder_arg1 ( const Function &  f)

Definition at line 220 of file builder.h.

◆ operator<<() [1/2]

std::ostream & mcrl2::core::operator<< ( std::ostream &  os,
const print_format_type &  pp_format 
)
inline

Definition at line 48 of file print_format.h.

◆ operator<<() [2/2]

std::ostream & mcrl2::core::operator<< ( std::ostream &  out,
const identifier_string &  x 
)
inline

\brief Outputs the object to a stream \param out An output stream \param x Object x \return The output stream

Definition at line 40 of file identifier_string.h.

◆ operator>>()

std::istream & mcrl2::core::operator>> ( std::istream &  is,
print_format_type &  f 
)
inline

Definition at line 72 of file print_format.h.

◆ optimized_and()

template<typename Term >
Term mcrl2::core::optimized_and ( const Term &  p,
const Term &  q 
)
inline

Make a conjunction, and optimize if possible.

Parameters
pA term
qA term
Returns
The application of and to the arguments.

Definition at line 289 of file optimized_boolean_operators.h.

◆ optimized_exists()

template<typename Term , typename VariableSequence >
Term mcrl2::core::optimized_exists ( const VariableSequence &  l,
const Term &  p,
bool  remove_variables = false 
)
inline

Make an optimized existential quantification.

Parameters
lA sequence of variables
pA term
remove_variablesIf true, unused quantifier variables are removed
Returns
The application of existential quantification to the arguments. If l is empty, p is returned.

Definition at line 389 of file optimized_boolean_operators.h.

◆ optimized_forall()

template<typename Term , typename VariableSequence >
Term mcrl2::core::optimized_forall ( const VariableSequence &  l,
const Term &  p,
bool  remove_variables = false 
)
inline

Make an optimized universal quantification, applying optimisations.

Parameters
lA sequence of variables
pA term
remove_variablesIf true, unused quantifier variables are removed
Returns
The application of universal quantification to the arguments. If the l is empty, p is returned.

Definition at line 363 of file optimized_boolean_operators.h.

◆ optimized_imp()

template<typename Term >
Term mcrl2::core::optimized_imp ( const Term &  p,
const Term &  q 
)
inline

Make a conjunction, and optimize if possible.

Parameters
pA term
qA term
Returns
The application of an optimized implication to the arguments.

Definition at line 337 of file optimized_boolean_operators.h.

◆ optimized_not()

template<typename Term >
Term mcrl2::core::optimized_not ( const Term &  arg)
inline

Make a negation.

Parameters
argA term
Returns
The application of not to the argument.

Definition at line 265 of file optimized_boolean_operators.h.

◆ optimized_or()

template<typename Term >
Term mcrl2::core::optimized_or ( const Term &  p,
const Term &  q 
)
inline

Make a disjunction, and optimize if possible.

Parameters
pA term
qA term
Returns
The application of the disjunction to the arguments.

Definition at line 313 of file optimized_boolean_operators.h.

◆ parse_identifier()

identifier_string mcrl2::core::parse_identifier ( const std::string &  text)
inline

Parse an identifier.

Definition at line 261 of file parse.h.

◆ parse_pp_format()

print_format_type mcrl2::core::parse_pp_format ( const std::string &  s)
inline

Definition at line 55 of file print_format.h.

◆ pp() [1/2]

std::string mcrl2::core::pp ( const core::identifier_string &  x,
bool  arg0 = true 
)

Definition at line 26 of file core.cpp.

◆ pp() [2/2]

template<typename T >
std::string mcrl2::core::pp ( const T &  x,
bool  precedence_aware = true 
)

Returns a string representation of the object x.

Definition at line 228 of file print.h.

◆ pp_format_to_string()

std::string mcrl2::core::pp_format_to_string ( const print_format_type  pp_format)
inline

Print string representation of pretty print format.

Parameters
pp_formata pretty print format
Returns
string representation of the pretty print format
Exceptions
mcrl2::runtimeerror if an unknown pretty print format is passed into the function.

Definition at line 34 of file print_format.h.

◆ print_aterm() [1/2]

template<>
void mcrl2::core::print_aterm ( const atermpp::aterm &  x)
inline

Definition at line 254 of file parse.h.

◆ print_aterm() [2/2]

template<typename T >
void mcrl2::core::print_aterm ( const T &  )

Definition at line 248 of file parse.h.

◆ swap()

void mcrl2::core::swap ( identifier_string &  t1,
identifier_string &  t2 
)
inlinenoexcept

\brief swap overload

Definition at line 46 of file identifier_string.h.

◆ warn_and_or()

void mcrl2::core::warn_and_or ( const parse_node &  )
inline

Prints a warning for each occurrence of 'x && y || z' in the parse tree.

Definition at line 215 of file parser_utility.h.

◆ warn_left_merge_merge()

void mcrl2::core::warn_left_merge_merge ( const parse_node &  )
inline

Prints a warning for each occurrence of 'x ||_ y || z' in the parse tree.

Definition at line 221 of file parser_utility.h.