# mcrl2/pbes/replace_constants_by_variables.h¶

Include file:

#include "mcrl2/pbes/replace_constants_by_variables.h"


## Classes¶

• mcrl2::pbes_system::detail::replace_constants_by_variables_builder

## Functions¶

void mcrl2::pbes_system::replace_constants_by_variables(T &x, const data::rewriter &r, data::mutable_indexed_substitution<> &sigma, typename std::enable_if<!std::is_base_of< atermpp::aterm, T >::value >::type *=nullptr)

Replace each constant data application c in x by a fresh variable v, and add extend the substitution sigma with the assignment v := r(c). This can be used in rewriting, to avoid that c is rewritten by the rewriter multiple times.

T mcrl2::pbes_system::replace_constants_by_variables(const T &x, const data::rewriter &r, data::mutable_indexed_substitution<> &sigma, typename std::enable_if<std::is_base_of<atermpp::aterm, T>::value>::type * = nullptr)

Replace each constant data application c in x by a fresh variable v, and add extend the substitution sigma with the assignment v := r(c). This can be used in rewriting, to avoid that c is rewritten by the rewriter multiple times.