File tree Expand file tree Collapse file tree 3 files changed +36
-0
lines changed
Expand file tree Collapse file tree 3 files changed +36
-0
lines changed Original file line number Diff line number Diff line change @@ -2498,6 +2498,38 @@ exprt c_typecheck_baset::do_special_functions(
24982498
24992499 return is_dynamic_object_expr;
25002500 }
2501+ else if (identifier == CPROVER_PREFIX " LIVE_OBJECT" )
2502+ {
2503+ if (expr.arguments ().size () != 1 )
2504+ {
2505+ error ().source_location = f_op.source_location ();
2506+ error () << " live_object expects one argument" << eom;
2507+ throw 0 ;
2508+ }
2509+
2510+ typecheck_function_call_arguments (expr);
2511+
2512+ exprt live_object_expr = live_object_exprt (expr.arguments ()[0 ]);
2513+ live_object_expr.add_source_location () = source_location;
2514+
2515+ return live_object_expr;
2516+ }
2517+ else if (identifier == CPROVER_PREFIX " WRITEABLE_OBJECT" )
2518+ {
2519+ if (expr.arguments ().size () != 1 )
2520+ {
2521+ error ().source_location = f_op.source_location ();
2522+ error () << " writeable_object expects one argument" << eom;
2523+ throw 0 ;
2524+ }
2525+
2526+ typecheck_function_call_arguments (expr);
2527+
2528+ exprt writeable_object_expr = writeable_object_exprt (expr.arguments ()[0 ]);
2529+ writeable_object_expr.add_source_location () = source_location;
2530+
2531+ return writeable_object_expr;
2532+ }
25012533 else if (identifier==CPROVER_PREFIX " POINTER_OFFSET" )
25022534 {
25032535 if (expr.arguments ().size ()!=1 )
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ void __CPROVER_old(const void *);
4949void __CPROVER_loop_entry (const void * );
5050
5151// pointers
52+ __CPROVER_bool __CPROVER_LIVE_OBJECT (const void * );
53+ __CPROVER_bool __CPROVER_WRITEABLE_OBJECT (const void * );
5254__CPROVER_size_t __CPROVER_POINTER_OBJECT (const void * );
5355__CPROVER_ssize_t __CPROVER_POINTER_OFFSET (const void * );
5456__CPROVER_size_t __CPROVER_OBJECT_SIZE (const void * );
Original file line number Diff line number Diff line change @@ -3988,6 +3988,8 @@ optionalt<std::string> expr2ct::convert_function(const exprt &src)
39883988 {ID_count_leading_zeros, " __builtin_clz" },
39893989 {ID_count_trailing_zeros, " __builtin_ctz" },
39903990 {ID_dynamic_object, " DYNAMIC_OBJECT" },
3991+ {ID_live_object, " LIVE_OBJECT" },
3992+ {ID_writeable_object, " WRITEABLE_OBJECT" },
39913993 {ID_floatbv_div, " FLOAT/" },
39923994 {ID_floatbv_minus, " FLOAT-" },
39933995 {ID_floatbv_mult, " FLOAT*" },
You can’t perform that action at this time.
0 commit comments