1313
1414#include < util/simplify_expr.h>
1515
16- jsont ai_domain_baset::output_json (
17- const ai_baset &ai,
18- const namespacet &ns) const
16+ jsont ai_domain_baset::output_json (const ai_baset &ai, const namespacet &ns)
17+ const
1918{
2019 std::ostringstream out;
2120 output (out, ai, ns);
2221 json_stringt json (out.str ());
2322 return json;
2423}
2524
26- xmlt ai_domain_baset::output_xml (
27- const ai_baset &ai,
28- const namespacet &ns) const
25+ xmlt ai_domain_baset::output_xml (const ai_baset &ai, const namespacet &ns) const
2926{
3027 std::ostringstream out;
3128 output (out, ai, ns);
3229 xmlt xml (" abstract_state" );
33- xml.data = out.str ();
30+ xml.data = out.str ();
3431 return xml;
3532}
3633
@@ -42,38 +39,38 @@ xmlt ai_domain_baset::output_xml(
4239// / \param ns: the namespace
4340// / \return True if condition did not change. False otherwise. condition will be
4441// / updated with the simplified condition if it has worked
45- bool ai_domain_baset::ai_simplify_lhs (
46- exprt &condition, const namespacet &ns) const
42+ bool ai_domain_baset::ai_simplify_lhs (exprt &condition, const namespacet &ns)
43+ const
4744{
4845 // Care must be taken here to give something that is still writable
49- if (condition.id ()== ID_index)
46+ if (condition.id () == ID_index)
5047 {
51- index_exprt ie= to_index_expr (condition);
52- bool no_simplification= ai_simplify (ie.index (), ns);
48+ index_exprt ie = to_index_expr (condition);
49+ bool no_simplification = ai_simplify (ie.index (), ns);
5350 if (!no_simplification)
54- condition= simplify_expr (ie, ns);
51+ condition = simplify_expr (ie, ns);
5552
5653 return no_simplification;
5754 }
58- else if (condition.id ()== ID_dereference)
55+ else if (condition.id () == ID_dereference)
5956 {
60- dereference_exprt de= to_dereference_expr (condition);
61- bool no_simplification= ai_simplify (de.pointer (), ns);
57+ dereference_exprt de = to_dereference_expr (condition);
58+ bool no_simplification = ai_simplify (de.pointer (), ns);
6259 if (!no_simplification)
63- condition= simplify_expr (de, ns); // So *(&x) -> x
60+ condition = simplify_expr (de, ns); // So *(&x) -> x
6461
6562 return no_simplification;
6663 }
67- else if (condition.id ()== ID_member)
64+ else if (condition.id () == ID_member)
6865 {
69- member_exprt me= to_member_expr (condition);
66+ member_exprt me = to_member_expr (condition);
7067 // Since simplify_ai_lhs is required to return an addressable object
7168 // (so remains a valid left hand side), to simplify
7269 // `(something_simplifiable).b` we require that `something_simplifiable`
7370 // must also be addressable
74- bool no_simplification= ai_simplify_lhs (me.compound (), ns);
71+ bool no_simplification = ai_simplify_lhs (me.compound (), ns);
7572 if (!no_simplification)
76- condition= simplify_expr (me, ns);
73+ condition = simplify_expr (me, ns);
7774
7875 return no_simplification;
7976 }
0 commit comments