mCRL2
Loading...
Searching...
No Matches
real_utilities.h
Go to the documentation of this file.
1// Author(s): Jeroen Keiren and Jan Friso Groote
2// Copyright: see the accompanying file COPYING or copy at
3// https://github.com/mCRL2org/mCRL2/blob/master/COPYING
4//
5// Distributed under the Boost Software License, Version 1.0.
6// (See accompanying file LICENSE_1_0.txt or copy at
7// http://www.boost.org/LICENSE_1_0.txt)
8//
11
12
13#ifndef MCRL2_DATA_REAL_UTILITIES_H
14#define MCRL2_DATA_REAL_UTILITIES_H
15
17
18namespace mcrl2
19{
20namespace data
21{
22namespace sort_real
23{
24
26{
28 return real_zero;
29}
30
32{
34 return real_one;
35}
36
37inline bool is_zero(const atermpp::aterm& e)
38{
39 return (e==real_zero());
40}
41
42inline bool is_one(const atermpp::aterm& e)
43{
44 return (e==real_one());
45}
46
48inline bool is_larger_zero(const atermpp::aterm& e)
49{
51 {
52 const application& ea=atermpp::down_cast<application>(e);
53 return sort_int::is_cint_application(ea[0]) &&
54 sort_nat::is_natural_constant(atermpp::down_cast<application>(ea[0])[0]) &&
55 e!=real_zero();
56 }
57 return false;
58}
59
60
61} // namespace real
62} // namespace data
63
64} // namespace mcrl2
65
66#endif // MCRL2_DATA_REAL_UTILITIES_H
67
68
An application of a data expression to a number of arguments.
bool is_cint_application(const atermpp::aterm &e)
Recogniser for application of @cInt.
Definition int1.h:124
bool is_natural_constant(const data_expression &n)
Determines whether n is a natural constant.
bool is_zero(const atermpp::aterm &e)
data_expression & real_one()
bool is_one(const atermpp::aterm &e)
data_expression & real_zero()
bool is_creal_application(const atermpp::aterm &e)
Recogniser for application of @cReal.
Definition real1.h:153
const basic_sort & real_()
Constructor for sort expression Real.
Definition real1.h:48
bool is_larger_zero(const atermpp::aterm &e)
Functions that returns true if e is a closed real number larger than zero.
A class that takes a linear process specification and checks all tau-summands of that LPS for conflue...
Definition indexed_set.h:72
Provides utilities for working with data expressions of standard sorts.