@@ -350,73 +350,6 @@ bool variable_sensitivity_domaint::is_top() const
350350
351351/* ******************************************************************\
352352
353- Function: variable_sensitivity_domaint::ai_simplify_lhs
354-
355- Inputs:
356- condition - the expression to simplify
357- ns - the namespace
358-
359- Outputs: True if condition did not change. False otherwise. condition
360- will be updated with the simplified condition if it has worked
361-
362- Purpose: Use the information in the domain to simplify the expression
363- on the LHS of an assignment. This for example won't simplify symbols
364- to their values, but does simplify indices in arrays, members of
365- structs and dereferencing of pointers
366-
367- \*******************************************************************/
368-
369- bool variable_sensitivity_domaint::ai_simplify_lhs (
370- exprt &condition, const namespacet &ns) const
371- {
372- // Care must be taken here to give something that is still writable
373- if (condition.id ()==ID_index)
374- {
375- index_exprt ie = to_index_expr (condition);
376- exprt index = ie.index ();
377- bool no_simplification=ai_simplify (index, ns);
378- if (!no_simplification)
379- {
380- ie.index () = index;
381- condition = simplify_expr (ie, ns);
382- }
383-
384- return no_simplification;
385- }
386- else if (condition.id ()==ID_dereference)
387- {
388- dereference_exprt de = to_dereference_expr (condition);
389- exprt pointer = de.pointer ();
390- bool no_simplification = ai_simplify (pointer, ns);
391- if (!no_simplification)
392- {
393- de.pointer () = pointer;
394- condition = simplify_expr (de, ns); // So *(&x) -> x
395- }
396-
397- return no_simplification;
398- }
399- else if (condition.id ()==ID_member)
400- {
401- member_exprt me = to_member_expr (condition);
402- exprt compound = me.compound ();
403- // Carry on the RHS since we still require an addressable object for the
404- // struct
405- bool no_simplification = ai_simplify_lhs (compound, ns);
406- if (!no_simplification)
407- {
408- me.compound () = compound;
409- condition = simplify_expr (me, ns);
410- }
411-
412- return no_simplification;
413- }
414- else
415- return true ;
416- }
417-
418- /* ******************************************************************\
419-
420353Function: variable_sensitivity_domaint::transform_function_call
421354
422355 Inputs:
0 commit comments