39 "source location should be encoded as an object"};
58 if(
kv.first ==
"workingDirectory")
63 else if(
kv.first ==
"file")
67 else if(
kv.first ==
"line")
71 else if(
kv.first ==
"column")
75 else if(
kv.first ==
"function")
79 else if(
kv.first ==
"bytecodeIndex")
84 else if(
kv.first ==
"propertyId")
88 else if(
kv.first ==
"propertyClass")
92 else if(
kv.first ==
"comment")
96 else if(
kv.first ==
"caseNumber")
100 else if(
kv.first ==
"basicBlockSourceLines")
106 else if(
kv.first ==
"propertyFatal")
110 else if(
kv.first ==
"hide")
115 else if(
kv.first ==
"pragma")
117 if(!
kv.second.is_array())
130 "try_get_source_location: unexpected key '" +
kv.first +
"'"};
148 if(
kv.first ==
"type")
151 result.
type =
static_cast<typet &
>(irep);
153 else if(
kv.first ==
"value")
158 else if(
kv.first ==
"location")
160 else if(
kv.first ==
"name")
162 else if(
kv.first ==
"module")
164 else if(
kv.first ==
"baseName")
166 else if(
kv.first ==
"mode")
168 else if(
kv.first ==
"prettyName")
170 else if(
kv.first ==
"isType")
172 else if(
kv.first ==
"isMacro")
174 else if(
kv.first ==
"isExported")
176 else if(
kv.first ==
"isInput")
178 else if(
kv.first ==
"isOutput")
180 else if(
kv.first ==
"isStateVar")
182 else if(
kv.first ==
"isProperty")
184 else if(
kv.first ==
"isStaticLifetime")
186 else if(
kv.first ==
"isThreadLocal")
188 else if(
kv.first ==
"isLvalue")
190 else if(
kv.first ==
"isFileLocal")
192 else if(
kv.first ==
"isExtern")
194 else if(
kv.first ==
"isVolatile")
196 else if(
kv.first ==
"isParameter")
198 else if(
kv.first ==
"isAuxiliary")
200 else if(
kv.first ==
"isWeak")
202 else if(
kv.first ==
"prettyType")
205 else if(
kv.first ==
"prettyValue")
210 "symbol_from_json: unexpected key '" +
kv.first +
"'");
ait supplies three of the four components needed: an abstract interpreter (in this case handling func...
Thrown when failing to deserialize a value from some low level format, like JSON or raw bytes.
Base class for all expressions.
There are a large number of kinds of tree structured or tree-like data in CPROVER.
void set_column(const irep_idt &column)
void set_comment(const irep_idt &comment)
void set_property_id(const irep_idt &property_id)
static const source_locationt & nil()
bool property_fatal() const
void set_basic_block_source_lines(irept source_lines)
void set_working_directory(const irep_idt &cwd)
void set_property_class(const irep_idt &property_class)
void set_case_number(const irep_idt &number)
void set_java_bytecode_index(const irep_idt &index)
void add_pragma(const irep_idt &pragma)
void set_file(const irep_idt &file)
void set_line(const irep_idt &line)
void set_function(const irep_idt &function)
source_locationt location
Source code location of definition of symbol.
typet type
Type of symbol.
irep_idt name
The unique identifier.
irep_idt pretty_name
Language-specific display name.
irep_idt irep_idt base_name
Name of module the symbol belongs to.
exprt value
Initial value of symbol.
irep_idt mode
Language mode.
The type of an expression, extends irept.
json_objectt & to_json_object(jsont &json)
json_arrayt & to_json_array(jsont &json)
bool try_get_bool(const jsont &in, const std::string &key)
Return boolean value for a given key if present in the json object.
source_locationt try_get_source_location(const jsont &json)
Return a source_locationt from the given JSON object.
symbolt symbol_from_json(const jsont &in)
Deserialise a json object to a symbolt.
const std::string & try_get_string(const jsont &in, const std::string &key)
Return string value for a given key if present in the json object.
static void json(json_objectT &result, const irep_idt &property_id, const property_infot &property_info)
Defines typet, type_with_subtypet and type_with_subtypest.