cprover
json_expr.cpp File Reference
#include "json_expr.h"
#include "namespace.h"
#include "expr.h"
#include "json.h"
#include "arith_tools.h"
#include "ieee_float.h"
#include "fixedbv.h"
#include "std_expr.h"
#include "config.h"
#include "identifier.h"
#include "invariant.h"
#include <langapi/mode.h>
#include <langapi/language.h>
#include <memory>
+ Include dependency graph for json_expr.cpp:

Go to the source code of this file.

Functions

static exprt simplify_json_expr (const exprt &src, const namespacet &ns)
 
json_objectt json (const source_locationt &location)
 
json_objectt json (const typet &type, const namespacet &ns, const irep_idt &mode)
 Output a CBMC type in json. More...
 
static std::string binary (const constant_exprt &src)
 
json_objectt json (const exprt &expr, const namespacet &ns, const irep_idt &mode)
 Output a CBMC expression in json. More...
 

Detailed Description

Expressions in JSON

Definition in file json_expr.cpp.

Function Documentation

◆ binary()

static std::string binary ( const constant_exprt src)
static

Definition at line 224 of file json_expr.cpp.

◆ json() [1/3]

json_objectt json ( const exprt expr,
const namespacet ns,
const irep_idt mode 
)

Output a CBMC expression in json.

The mode is used to correctly report types.

Parameters
expran expression
nsa namespace
modelanguage in which the code was written; for now ID_C and ID_java are supported
Returns
a json object

Definition at line 238 of file json_expr.cpp.

◆ json() [2/3]

json_objectt json ( const source_locationt location)

Definition at line 87 of file json_expr.cpp.

◆ json() [3/3]

json_objectt json ( const typet type,
const namespacet ns,
const irep_idt mode 
)

Output a CBMC type in json.

The mode argument is used to correctly report types.

Parameters
typea type
nsa namespace
modelanguage in which the code was written; for now ID_C and ID_java are supported
Returns
a json object

Definition at line 119 of file json_expr.cpp.

◆ simplify_json_expr()

static exprt simplify_json_expr ( const exprt src,
const namespacet ns 
)
static

Definition at line 30 of file json_expr.cpp.