Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Named constants in ACSL specifications

Tags:

frama-c

How can I make use of named constants in ACSL specifications? These constants are either Macros (#define MY_CONST ...) or constant declarations (const int MY_CONST ...). The former does not work since the macros are not expanded by the preprocessor (ACSL specs are C comments), the latter does not because the constants are treated as variables so that some proofs fail. The specification works fine if I replace the named constants with the actual numbers.

Does anyone have a good idea to handle named constants? Thanks in advance

like image 360
dordow Avatar asked Mar 20 '23 05:03

dordow


1 Answers

In order to expand macros in ACSL specification, you can use the -pp-annot option.

like image 200
Anne Avatar answered May 10 '23 19:05

Anne