|
cprover
|
#include "code_with_references.h"Go to the source code of this file.
Functions | |
| code_with_references_listt | assign_from_json (const exprt &expr, const jsont &json, const irep_idt &function_id, symbol_table_baset &symbol_table, std::optional< ci_lazy_methods_neededt > &needed_lazy_methods, size_t max_user_array_length, std::unordered_map< std::string, object_creation_referencet > &references) |
Given an expression expr representing a Java object or primitive and a JSON representation json of the value of a Java object or primitive of a compatible type, adds statements to block to assign expr to the deterministic value specified by json. | |
| code_with_references_listt assign_from_json | ( | const exprt & | expr, |
| const jsont & | json, | ||
| const irep_idt & | function_id, | ||
| symbol_table_baset & | symbol_table, | ||
| std::optional< ci_lazy_methods_neededt > & | needed_lazy_methods, | ||
| size_t | max_user_array_length, | ||
| std::unordered_map< std::string, object_creation_referencet > & | references ) |
Given an expression expr representing a Java object or primitive and a JSON representation json of the value of a Java object or primitive of a compatible type, adds statements to block to assign expr to the deterministic value specified by json.
The expected format of the JSON representation is mostly the same as that of the json-io serialization library (https://github.com/jdereg/json-io) if run with the following options, as of version 4.10.1:
Some examples of json-io representations that may not be obvious include:
The above rule has the following exceptions:
For examples of JSON representations of objects, see the regression tests for this feature in jbmc/regression/jbmc/deterministic_assignments_json.
Known limitations:
For parameter documentation, see object_creation_infot.
Definition at line 914 of file assignments_from_json.cpp.