cprover
Toggle main menu visibility
Loading...
Searching...
No Matches
string_constraint_instantiation.h
Go to the documentation of this file.
1
/*******************************************************************\
2
3
Module: Defines related function for string constraints.
4
5
Author: Jesse Sigal, jesse.sigal@diffblue.com
6
7
\*******************************************************************/
8
11
12
#ifndef CPROVER_SOLVERS_REFINEMENT_STRING_CONSTRAINT_INSTANTIATION_H
13
#define CPROVER_SOLVERS_REFINEMENT_STRING_CONSTRAINT_INSTANTIATION_H
14
15
#include <
util/mp_arith.h
>
16
#include <
util/std_expr.h
>
// IWYU pragma: keep
17
18
#include <set>
19
20
class
string_constraintt
;
21
struct
string_not_contains_constraintt
;
22
38
exprt
instantiate
(
39
const
string_constraintt
&axiom,
40
const
exprt
&str,
41
const
exprt
&val);
42
43
std::vector<exprt>
instantiate_not_contains
(
44
const
string_not_contains_constraintt
&axiom,
45
const
std::set<std::pair<exprt, exprt>> &index_pairs,
46
const
std::unordered_map<string_not_contains_constraintt, symbol_exprt>
47
&witnesses);
48
52
class
linear_functiont
53
{
54
public
:
57
explicit
linear_functiont
(
const
exprt
&f);
58
60
void
add
(
const
linear_functiont
&other);
61
64
exprt
to_expr
(
bool
negated =
false
)
const
;
65
70
static
exprt
solve
(
linear_functiont
f,
const
exprt
&var,
const
exprt
&val);
71
73
std::string
format
();
74
75
private
:
76
mp_integer
constant_coefficient
;
77
std::unordered_map<exprt, mp_integer, irep_hash>
coefficients
;
78
typet
type
;
79
};
80
81
#endif
// CPROVER_SOLVERS_REFINEMENT_STRING_CONSTRAINT_INSTANTIATION_H
exprt
Base class for all expressions.
Definition
expr.h:57
linear_functiont::to_expr
exprt to_expr(bool negated=false) const
Definition
string_constraint_instantiation.cpp:109
linear_functiont::solve
static exprt solve(linear_functiont f, const exprt &var, const exprt &val)
Return an expression y such that f(var <- y) = val.
Definition
string_constraint_instantiation.cpp:146
linear_functiont::linear_functiont
linear_functiont(const exprt &f)
Put an expression f composed of additions and subtractions into its cannonical representation.
Definition
string_constraint_instantiation.cpp:60
linear_functiont::type
typet type
Definition
string_constraint_instantiation.h:78
linear_functiont::coefficients
std::unordered_map< exprt, mp_integer, irep_hash > coefficients
Definition
string_constraint_instantiation.h:77
linear_functiont::format
std::string format()
Format the linear function as a string, can be used for debugging.
Definition
string_constraint_instantiation.cpp:166
linear_functiont::add
void add(const linear_functiont &other)
Make this function the sum of the current function with other.
Definition
string_constraint_instantiation.cpp:101
linear_functiont::constant_coefficient
mp_integer constant_coefficient
Definition
string_constraint_instantiation.h:76
string_constraintt
Definition
string_constraint.h:56
typet
The type of an expression, extends irept.
Definition
type.h:29
mp_arith.h
mp_integer
BigInt mp_integer
Definition
smt_terms.h:17
std_expr.h
API to expression classes.
instantiate
exprt instantiate(const string_constraintt &axiom, const exprt &str, const exprt &val)
Instantiates a string constraint by substituting the quantifiers.
Definition
string_constraint_instantiation.cpp:175
instantiate_not_contains
std::vector< exprt > instantiate_not_contains(const string_not_contains_constraintt &axiom, const std::set< std::pair< exprt, exprt > > &index_pairs, const std::unordered_map< string_not_contains_constraintt, symbol_exprt > &witnesses)
string_not_contains_constraintt
Constraints to encode non containement of strings.
Definition
string_constraint.h:127
solvers
strings
string_constraint_instantiation.h
Generated by
1.17.0