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(
2498
2498
2499
2499
return is_dynamic_object_expr;
2500
2500
}
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
+ }
2501
2533
else if (identifier==CPROVER_PREFIX " POINTER_OFFSET" )
2502
2534
{
2503
2535
if (expr.arguments ().size ()!=1 )
Original file line number Diff line number Diff line change @@ -49,6 +49,8 @@ void __CPROVER_old(const void *);
49
49
void __CPROVER_loop_entry (const void * );
50
50
51
51
// pointers
52
+ __CPROVER_bool __CPROVER_LIVE_OBJECT (const void * );
53
+ __CPROVER_bool __CPROVER_WRITEABLE_OBJECT (const void * );
52
54
__CPROVER_size_t __CPROVER_POINTER_OBJECT (const void * );
53
55
__CPROVER_ssize_t __CPROVER_POINTER_OFFSET (const void * );
54
56
__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)
3988
3988
{ID_count_leading_zeros, " __builtin_clz" },
3989
3989
{ID_count_trailing_zeros, " __builtin_ctz" },
3990
3990
{ID_dynamic_object, " DYNAMIC_OBJECT" },
3991
+ {ID_live_object, " LIVE_OBJECT" },
3992
+ {ID_writeable_object, " WRITEABLE_OBJECT" },
3991
3993
{ID_floatbv_div, " FLOAT/" },
3992
3994
{ID_floatbv_minus, " FLOAT-" },
3993
3995
{ID_floatbv_mult, " FLOAT*" },
You can’t perform that action at this time.
0 commit comments