File tree 5 files changed +12
-1
lines changed 5 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ void __CPROVER_assume(__CPROVER_bool assumption);
2
2
void __VERIFIER_assume (__CPROVER_bool assumption );
3
3
void __CPROVER_assert (__CPROVER_bool assertion , const char * description );
4
4
void __CPROVER_precondition (__CPROVER_bool precondition , const char * description );
5
+ void __CPROVER_postcondition (__CPROVER_bool assertion , const char * description );
5
6
void __CPROVER_havoc_object (void * );
6
7
__CPROVER_bool __CPROVER_equal ();
7
8
__CPROVER_bool __CPROVER_same_object (const void * , const void * );
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ extern const void *__CPROVER_memory_leak;
20
20
void __CPROVER_assume (__CPROVER_bool assumption ) __attribute__((__noreturn__ ));
21
21
void __CPROVER_assert (__CPROVER_bool assertion , const char * description );
22
22
void __CPROVER_precondition (__CPROVER_bool assertion , const char * description );
23
+ void __CPROVER_postcondition (__CPROVER_bool assertion , const char * description );
23
24
24
25
__CPROVER_bool __CPROVER_is_zero_string (const void * );
25
26
__CPROVER_size_t __CPROVER_zero_string_length (const void * );
Original file line number Diff line number Diff line change @@ -21,6 +21,7 @@ extern const void *__CPROVER_memory_leak;
21
21
void __CPROVER_assume (__CPROVER_bool assumption ) __attribute__((__noreturn__ ));
22
22
void __CPROVER_assert (__CPROVER_bool assertion , const char * description );
23
23
void __CPROVER_precondition (__CPROVER_bool assertion , const char * description );
24
+ void __CPROVER_postcondition (__CPROVER_bool assertion , const char * description );
24
25
25
26
// NOLINTNEXTLINE(build/deprecated)
26
27
void __CPROVER_input (const char * description , ...);
Original file line number Diff line number Diff line change @@ -736,7 +736,8 @@ void goto_convertt::do_function_call_symbol(
736
736
}
737
737
}
738
738
else if (identifier==CPROVER_PREFIX " assert" ||
739
- identifier==CPROVER_PREFIX " precondition" )
739
+ identifier==CPROVER_PREFIX " precondition" ||
740
+ identifier==CPROVER_PREFIX " postcondition" )
740
741
{
741
742
if (arguments.size ()!=2 )
742
743
{
@@ -747,6 +748,8 @@ void goto_convertt::do_function_call_symbol(
747
748
748
749
bool is_precondition=
749
750
identifier==CPROVER_PREFIX " precondition" ;
751
+ bool is_postcondition=
752
+ identifier==CPROVER_PREFIX " postcondition" ;
750
753
751
754
const irep_idt description=
752
755
get_string_constant (arguments[1 ]);
@@ -760,6 +763,10 @@ void goto_convertt::do_function_call_symbol(
760
763
{
761
764
t->source_location .set_property_class (ID_precondition);
762
765
}
766
+ else if (is_postcondition)
767
+ {
768
+ t->source_location .set_property_class (ID_postcondition);
769
+ }
763
770
else
764
771
{
765
772
t->source_location .set (
Original file line number Diff line number Diff line change @@ -89,6 +89,7 @@ IREP_ID_ONE(assume)
89
89
IREP_ID_ONE(assert)
90
90
IREP_ID_ONE(assertion)
91
91
IREP_ID_ONE(precondition)
92
+ IREP_ID_ONE(postcondition)
92
93
IREP_ID_ONE(precondition_instance)
93
94
IREP_ID_ONE(goto)
94
95
IREP_ID_ONE(gcc_computed_goto)
You can’t perform that action at this time.
0 commit comments