-
Notifications
You must be signed in to change notification settings - Fork 84
Description
In #278 all the asserts in tests were changed to __goblint_check, which is declared by a goblint.h header that we forcefully include into every analyzed file via -include. This makes the programs normally uncompilable and most of them still include assert.h, which now is excessive.
This situation should be improved:
-
Add explicit
#include <goblint.h>to all tests using__goblint_check. -
Remove excessive
#include <assert.h>from such tests. -
Add explicit
#include <goblint.h>to all tests using__goblint_assume_join,__goblint_split_beginand__goblint_split_end. -
Provide a dummy implementation for
goblint.h, which wouldn't be used for analysis (they're handled as specials), but could be used for compiling the programs. It would also allow using Goblint function annotations in actual projects/stories. -
Document
__goblint_check, etc as function annotations like__goblint_assume_joinis documented in Interactive: improvements for chrony story #724. -
Design a better structure for our
includesdirectory: right now it contains a mix of various things and cannot be added to include paths of actual projects:- Goblint-specific headers:
goblint.h,linux/goblint_preconf.h,linuxlight.h? - Goblint overrides of standard headers:
assert.h. - Goblint stubs for standard functions:
stdlib.c,pthread.c. - Goblint stubs for non-standard functions:
sv-comp.c. - And eventually general stubs for Goblint-specific functions:
goblint.c.
They should be split by these various types. Moreover, each of them should have standard structure (
include,src, etc). - Goblint-specific headers:
-
Rename
includesto something better since it also contains various stub implementations.