CBMC
Loading...
Searching...
No Matches
Functions
string_constraint_generator_main.cpp File Reference

Generates string constraints to link results from string functions with their arguments. More...

#include "string_constraint_generator.h"
#include "string_refinement_invariant.h"
#include <iterator>
#include <util/arith_tools.h>
#include <util/deprecate.h>
#include <util/interval_constraint.h>
#include <util/mathematical_expr.h>
#include <util/simplify_expr.h>
#include <util/ssa_expr.h>
#include <util/string_constant.h>
+ Include dependency graph for string_constraint_generator_main.cpp:

Go to the source code of this file.

Functions

 
  Merge two sets of constraints by appending to the first one.
 
 
 
 
 
 
  Returns a non-negative version of the argument.
 

Detailed Description

Generates string constraints to link results from string functions with their arguments.

This is inspired by the PASS paper at HVC'13: "PASS: String Solving with Parameterized Array and Interval Automaton" by Guodong Li and Indradeep Ghosh, which gives examples of constraints for several functions.

Definition in file string_constraint_generator_main.cpp.

Function Documentation

◆  get_function_name()

static irep_idt get_function_name ( const function_application_exprtexpr )
static

Definition at line 187 of file string_constraint_generator_main.cpp.

◆  get_return_code_type()

signedbv_typet get_return_code_type ( )

Definition at line 182 of file string_constraint_generator_main.cpp.

◆  is_positive()

exprt is_positive ( const exprtx )
Parameters
x an expression
Returns
a Boolean expression true exactly when x is positive

Definition at line 341 of file string_constraint_generator_main.cpp.

◆  maximum()

exprt maximum ( const exprta,
const exprtb 
)
Returns
expression representing the maximum of two expressions

Definition at line 404 of file string_constraint_generator_main.cpp.

◆  merge()

void merge ( string_constraintstresult,
)

Merge two sets of constraints by appending to the first one.

Definition at line 101 of file string_constraint_generator_main.cpp.

◆  minimum()

exprt minimum ( const exprta,
const exprtb 
)
Returns
expression representing the minimum of two expressions

Definition at line 399 of file string_constraint_generator_main.cpp.

◆  sum_overflows()

exprt sum_overflows ( const plus_exprtsum )
Returns
Boolean true when the sum of the two expressions overflows

Definition at line 40 of file string_constraint_generator_main.cpp.

◆  zero_if_negative()

exprt zero_if_negative ( const exprtexpr )

Returns a non-negative version of the argument.

Parameters
expr expression of which we want a non-negative version
Returns
max(0, expr)

Definition at line 412 of file string_constraint_generator_main.cpp.

AltStyle によって変換されたページ (->オリジナル) /