cprover
Loading...
Searching...
No Matches
mathematical_expr.cpp
Go to the documentation of this file.
1/*******************************************************************\
2
3Module: API to expression classes for 'mathematical' expressions
4
5Author: Daniel Kroening, kroening@kroening.com
6
7\*******************************************************************/
8
9#include "mathematical_expr.h"
10#include "mathematical_types.h"
11
12#include <map>
13
26
32
34lambda_type(const lambda_exprt::variablest &variables, const exprt &where)
35{
37
38 domain.reserve(variables.size());
39
40 for(const auto &v : variables)
41 domain.push_back(v.type());
42
43 return mathematical_function_typet(std::move(domain), where.type());
44}
45
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Definition ai.h:564
A base class for binary expressions.
Definition std_expr.h:550
A base class for variable bindings (quantifiers, let, lambda)
Definition std_expr.h:2900
std::vector< symbol_exprt > variablest
Definition std_expr.h:2902
Base class for all expressions.
Definition expr.h:54
typet & type()
Return the type of the expression.
Definition expr.h:82
function_application_exprt(const exprt &_function, argumentst _arguments)
const mathematical_function_typet & function_type() const
This helper method provides the type of the expression returned by function.
lambda_exprt(const variablest &, const exprt &_where)
A type for mathematical functions (do not confuse with functions/methods in code)
static mathematical_function_typet lambda_type(const lambda_exprt::variablest &variables, const exprt &where)
API to expression classes for 'mathematical' expressions.
Mathematical types.
const mathematical_function_typet & to_mathematical_function_type(const typet &type)
Cast a typet to a mathematical_function_typet.
STL namespace.
#define PRECONDITION(CONDITION)
Definition invariant.h:463