Skip to content

Commit

Permalink
Replace assert.h includes with goblint.h (issue #814)
Browse files Browse the repository at this point in the history
  • Loading branch information
sim642 committed Oct 4, 2022
1 parent 840f4dd commit 3ba2cd9
Show file tree
Hide file tree
Showing 673 changed files with 644 additions and 676 deletions.
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/00-local.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int main() {
int x = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/00-local.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- tests/incremental/00-basic/00-local.c 2021-09-30 13:12:18.381946503 +0300
+++ tests/incremental/00-basic/00-local.c 2021-09-30 13:12:32.697729338 +0300
@@ -1,7 +1,7 @@
#include <assert.h>
#include <goblint.h>

int main() {
- int x = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/02-changed_start_state1.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int g = 1;

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/02-changed_start_state1.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- tests/incremental/00-basic/02-changed_start_state1.c
+++ tests/incremental/00-basic/02-changed_start_state1.c
@@ -1,13 +1,13 @@
#include <assert.h>
#include <goblint.h>

-int g = 1;
+int g = 2;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/03-changed_start_state2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int g = 1;

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/03-changed_start_state2.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- tests/incremental/00-basic/03-changed_start_state2.c
+++ tests/incremental/00-basic/03-changed_start_state2.c
@@ -1,13 +1,13 @@
#include <assert.h>
#include <goblint.h>

-int g = 1;
+int g = 2;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/05-sideeffects.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// The patch for this test case is empty on purpose. The problem described does occur in the incremental run even without any changes.
#include <assert.h>
#include <goblint.h>

int g = 1;

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/07-dead-branch.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

void foo() {

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/07-dead-branch.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- tests/incremental/00-basic/07-dead-branch.c
+++ tests/incremental/00-basic/07-dead-branch.c
@@ -1,7 +1,7 @@
#include <assert.h>
#include <goblint.h>

void foo() {
-
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/09-unreach.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

void foo() {
int x = 2;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/10-reach.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include<pthread.h>

void foo() {
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/00-basic/11-unreach-reusesuper.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

void foo() {
int x = 2;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/01-force-reanalyze/00-int.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include<assert.h>
#include <goblint.h>

int f(int in){
while(in < 17) {
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/01-force-reanalyze/01-int-reluctant.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include<assert.h>
#include <goblint.h>

int f(int in){
while(in < 17) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//PARAM: --enable annotation.int.enabled
#include <assert.h>
#include <goblint.h>
#include <math.h>

int main() __attribute__ ((goblint_precision("def_exc","interval")));
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include<assert.h>
#include <goblint.h>

int f(int in){
while(in < 17) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ index 38187f1c0..698e45b62 100644
--- tests/incremental/03-precision-annotation/02-reluctant-int-annotation.c
+++ tests/incremental/03-precision-annotation/02-reluctant-int-annotation.c
@@ -1,10 +1,11 @@
#include<assert.h>
#include <goblint.h>

+int f(int in) __attribute__ ((goblint_precision("def_exc", "interval")));
int f(int in){
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include<assert.h>
#include <goblint.h>

typedef int int_to_int_fun (int);

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/04-var-rename/04-renamed_assert.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int main() {
int myVar = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int main() {
int varFirstIteration = 0;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

void foo() {
int fooOne = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/01-global-nochange.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/02-global-remove.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/03-global-change.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/04-global-add.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/05-local-wpoint.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/06-local-wpoint-read.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/07-local-wpoint-nochange.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/08-side-restart.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <pthread.h>
#include <assert.h>
#include <goblint.h>

int g;

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/09-call-remove.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

int g = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/11-paper-example.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
#include <pthread.h>

pthread_mutex_t mutex = PTHREAD_MUTEX_INITIALIZER;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/13-changed_start_state2.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int g = 1;

Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/13-changed_start_state2.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- tests/incremental/11-restart/13-changed_start_state2.c
+++ tests/incremental/11-restart/13-changed_start_state2.c
@@ -1,13 +1,13 @@
#include <assert.h>
#include <goblint.h>

-int g = 1;
+int g = 2;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/48-local-wpoint-funcall.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int f(int x) {
return 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/11-restart/48-local-wpoint-funcall.patch
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
--- tests/incremental/11-restart/48-local-wpoint-funcall.c
+++ tests/incremental/11-restart/48-local-wpoint-funcall.c
@@ -1,7 +1,7 @@
#include <assert.h>
#include <goblint.h>

int f(int x) {
- return 1;
Expand Down
1 change: 0 additions & 1 deletion tests/incremental/13-restart-write/04-malloc-node.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <pthread.h>
#include <assert.h>

void *t_fun(void *arg) {
int *iarg = (int*) arg;
Expand Down
1 change: 0 additions & 1 deletion tests/incremental/13-restart-write/05-race-call-remove.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
#include <pthread.h>
#include <assert.h>

int g;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int g = 4;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ index cbfb0ba70..aa83393ac 100644
--- tests/incremental/14-manual-restart/01-restart_manual_simple.c
+++ tests/incremental/14-manual-restart/01-restart_manual_simple.c
@@ -1,9 +1,9 @@
#include <assert.h>
#include <goblint.h>

-int g = 4;
+int g = 5;
Expand Down
2 changes: 1 addition & 1 deletion tests/incremental/14-manual-restart/03-partial_contexts.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>
int foo(int x){
return x;
}
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/04-empty_if.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int main()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/12-errno.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <errno.h>
#include <assert.h>
#include <goblint.h>

int main(){
errno = 1;
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/13-sans_context.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// PARAM: --set ana.ctx_insens[+] base
#include <assert.h>
#include <goblint.h>

void f(int v, int i){
__goblint_check(v == 2);
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/14-startstate.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// PARAM: --set kernel true
#include <assert.h>
#include <goblint.h>
#include <linux/device.h>

int __init start (unsigned count) {
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/16-unknown_branches.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Making sure unknown conditions result in evaluating both branches.
#include<assert.h>
#include <goblint.h>

extern int * anIntPlease();
int main() {
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/17-constructors.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int g=0;

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/19-if-0.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

void stuff() {

Expand Down
2 changes: 0 additions & 2 deletions tests/regression/00-sanity/20-if-0-realnode.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
#include <assert.h>

void stuff() {

}
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/22-modulo.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include "assert.h"
#include <goblint.h>
int main() {
int x = -1;
int m = x % 5;
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/23-modulo-interval.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// PARAM: --disable ana.int.def_exc --enable ana.int.interval
#include "assert.h"
#include <goblint.h>
int main() {
int x = -1;
int m = x % 5;
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/24-update_suite.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// SKIP (just for manually testing that update_suite works)
#include <assert.h>
#include <goblint.h>

int main() {
int x = 42;
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/25-cfg-connect.c
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#include <assert.h>
#include <goblint.h>

int main()
{
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/26-strict-loop-enter.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//PARAM: --disable ana.int.def_exc --enable ana.int.interval --set solver slr3tp
#include <assert.h>
#include <goblint.h>

int g = 0;

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/28-strict-multi-entry-loop.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// PARAM: --enable dbg.cfg.loop-clusters
#include <assert.h>
#include <goblint.h>

int cycle2_1() {
int r = 1; // variable to prevent CIL simplification
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/30-both_branches.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// PARAM: --enable exp.earlyglobs --disable exp.fast_global_inits
#include <assert.h>
#include <goblint.h>

union bloirg {
int iValdue ;
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/00-sanity/40-wpoint-restart-sound.c
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// PARAM: --enable ana.int.interval
#include <pthread.h>
#include <assert.h>
#include <goblint.h>

int g = 0;

Expand Down
2 changes: 1 addition & 1 deletion tests/regression/01-cpa/01-expressions.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include<stdio.h>
#include<assert.h>
#include <goblint.h>

int glob1;
int glob2 = 9;
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/01-cpa/02-branch.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include<stdio.h>
#include<assert.h>
#include <goblint.h>

int main() {
int i,j,k;
Expand Down
2 changes: 1 addition & 1 deletion tests/regression/01-cpa/03-loops.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include<stdio.h>
#include<assert.h>
#include <goblint.h>

int main () {
int i,j,k;
Expand Down
Loading

0 comments on commit 3ba2cd9

Please sign in to comment.