Comments (14)
from angelix.
The previous Makefile can't work well on my docker, it shows Makefile:5: *** missing separator. Stop.
when running make.
So I changed it to:
distance:distance.o
gcc distance.o -o distance
distance.o:distance.c
gcc -I. -c distance.c -o distance.o
But it seems like failed again:
root@9f2c2b97a49e:/angelix/test# angelix /angelix/test/src distance.c oracle 1 2 3 --assert assert.json --verbose
INFO repair option synthesis_levels = ['alternatives', 'integer-constants', 'boolean-constants']
INFO repair option ignore_trans_errors = False
INFO repair option localize_from_bottom = False
INFO repair option mute_test_message = False
INFO repair option initial_tests = 1
INFO repair option synthesis_bool_only = False
INFO repair option defect = ['if-conditions', 'assignments']
INFO repair option group_by_score = False
INFO repair option mute_warning = False
INFO repair option synthesis_ptr_vars = False
INFO repair option synthesis_func_params = False
INFO repair option klee_search = None
INFO repair option synthesis_timeout = 30000
INFO repair option klee_max_forks = None
INFO repair option use_semfix_syn = False
INFO repair option mute_build_message = False
INFO repair option max_z3_trials = 2
INFO repair option ignore_infer_errors = False
INFO repair option group_size = 1
INFO repair option build_before_instr = False
INFO repair option klee_debug = False
INFO repair option generate_all = False
INFO repair option init_uninit_vars = False
INFO repair option instr_printf = None
INFO repair option suspicious = 20
INFO repair option test_timeout = None
INFO repair option klee_max_depth = None
INFO repair option use_nsynth = False
INFO repair option all_tests = False
INFO repair option klee_ignore_errors = False
INFO repair option semfix = False
INFO repair option path_solving_timeout = 60000
INFO repair option localize_only = False
INFO repair option verbose = True
INFO repair option invalid_localization = False
INFO repair option synthesis_used_vars = True
INFO repair option localization = jaccard
INFO repair option ignore_trivial = False
INFO repair option synthesis_global_vars = False
INFO repair option klee_timeout = None
INFO repair option klee_solver_timeout = None
INFO repair option max_angelic_paths = None
INFO repair option redundant_test = False
INFO project configuring validation source
INFO project building json compilation database from validation source
gcc -I. -c distance.c -o distance.o
gcc distance.o -o distance
INFO testing running test '1' of validation source
INFO testing running test '2' of validation source
INFO testing running test '3' of validation source
INFO project configuring frontend source
INFO transformation instrumenting repairable of frontend source
/angelix/test/.angelix/frontend/distance.c:21:10: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
x1 = atoi(argv[1]);
^
5 9 5 14
x1 > x2
6 14 6 19
x1 - x2
8 14 8 19
x2 - x1
9 9 9 14
y1 > y2
10 14 10 19
y1 - y2
12 14 12 19
y1 - y2
13 9 13 14
dx > dy
1 warning generated.
INFO project building frontend source
gcc -I. -c distance.c -o distance.o
gcc distance.o -o distance
distance.o: In function `distance':
distance.c:(.text+0x3d): undefined reference to `angelix_trace_and_load'
distance.c:(.text+0x6c): undefined reference to `angelix_trace_and_load'
distance.c:(.text+0x9c): undefined reference to `angelix_trace_and_load'
distance.c:(.text+0xcc): undefined reference to `angelix_trace_and_load'
distance.c:(.text+0xfb): undefined reference to `angelix_trace_and_load'
distance.o:distance.c:(.text+0x12b): more undefined references to `angelix_trace_and_load' follow
collect2: error: ld returned 1 exit status
make: *** [distance] Error 1
WARNING project compilation of .angelix/frontend returned non-zero code
INFO repair running positive tests for debugging
INFO testing running test '1' of frontend source
/angelix/src/tools/angelix-run-test: line 19: ./distance: No such file or directory
INFO testing running test '2' of frontend source
/angelix/src/tools/angelix-run-test: line 19: ./distance: No such file or directory
INFO repair running negative tests for debugging
INFO testing running test '3' of frontend source
/angelix/src/tools/angelix-run-test: line 19: ./distance: No such file or directory
INFO repair repair test suite: ['1', '2', '3']
INFO repair validation test suite: ['1', '2', '3']
WARNING repair no suspicious expressions localized
INFO repair no patch generated in 0s
FAIL
from angelix.
from angelix.
Thanks for your reply.
I changed it to:
root@9f2c2b97a49e:/angelix/test# cat src/Makefile
CC=gcc
CFLAGS=-I.
distance:distance.o
$(CC) distance.o -o distance
distance.o:distance.c
$(CC) $(CFLAGS) -c distance.c -o distance.o
It seems like the compiling works but patch generating failed finally:
root@9f2c2b97a49e:/angelix/test# angelix /angelix/test/src distance.c oracle 1 2 3 --assert assert.json --verbose
INFO repair option localization = jaccard
INFO repair option verbose = True
INFO repair option max_z3_trials = 2
INFO repair option group_size = 1
INFO repair option use_nsynth = False
INFO repair option synthesis_levels = ['alternatives', 'integer-constants', 'boolean-constants']
INFO repair option klee_solver_timeout = None
INFO repair option semfix = False
INFO repair option instr_printf = None
INFO repair option test_timeout = None
INFO repair option synthesis_ptr_vars = False
INFO repair option localize_only = False
INFO repair option all_tests = False
INFO repair option synthesis_timeout = 30000
INFO repair option suspicious = 20
INFO repair option klee_timeout = None
INFO repair option max_angelic_paths = None
INFO repair option klee_max_forks = None
INFO repair option synthesis_func_params = False
INFO repair option ignore_trans_errors = False
INFO repair option init_uninit_vars = False
INFO repair option ignore_infer_errors = False
INFO repair option use_semfix_syn = False
INFO repair option localize_from_bottom = False
INFO repair option mute_warning = False
INFO repair option generate_all = False
INFO repair option path_solving_timeout = 60000
INFO repair option synthesis_used_vars = True
INFO repair option group_by_score = False
INFO repair option mute_build_message = False
INFO repair option synthesis_bool_only = False
INFO repair option klee_ignore_errors = False
INFO repair option klee_search = None
INFO repair option build_before_instr = False
INFO repair option mute_test_message = False
INFO repair option invalid_localization = False
INFO repair option synthesis_global_vars = False
INFO repair option initial_tests = 1
INFO repair option ignore_trivial = False
INFO repair option defect = ['if-conditions', 'assignments']
INFO repair option klee_max_depth = None
INFO repair option redundant_test = False
INFO repair option klee_debug = False
INFO project configuring validation source
INFO project building json compilation database from validation source
gcc -I. -c distance.c -o distance.o
gcc distance.o -o distance
INFO testing running test '1' of validation source
INFO testing running test '2' of validation source
INFO testing running test '3' of validation source
INFO project configuring frontend source
INFO transformation instrumenting repairable of frontend source
/angelix/test/.angelix/frontend/distance.c:21:10: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
x1 = atoi(argv[1]);
^
5 9 5 14
x1 > x2
6 14 6 19
x1 - x2
8 14 8 19
x2 - x1
9 9 9 14
y1 > y2
10 14 10 19
y1 - y2
12 14 12 19
y1 - y2
13 9 13 14
dx > dy
1 warning generated.
INFO project building frontend source
angelix-compiler --test -I. -c distance.c -o distance.o
[angelix-compiler] gcc -include /angelix/src/runtime/runtime.h '-I.' '-c' 'distance.c' '-o' 'distance.o' -L/angelix/build/lib/test -langelix -L/angelix/src/klee/Release+Asserts/lib -lkleeRuntest
angelix-compiler --test distance.o -o distance
[angelix-compiler] gcc -include /angelix/src/runtime/runtime.h 'distance.o' '-o' 'distance' -L/angelix/build/lib/test -langelix -L/angelix/src/klee/Release+Asserts/lib -lkleeRuntest
INFO repair running positive tests for debugging
INFO testing running test '1' of frontend source
INFO testing running test '2' of frontend source
INFO repair running negative tests for debugging
INFO testing running test '3' of frontend source
INFO repair repair test suite: ['1', '2', '3']
INFO repair validation test suite: ['1', '2', '3']
INFO localization selected expressions [(12, 14, 12, 19)] with group score 1.0
INFO localization selected expressions [(6, 14, 6, 19)] with group score 0.5
INFO localization selected expressions [(5, 9, 5, 14)] with group score 0.33333
INFO localization selected expressions [(9, 9, 9, 14)] with group score 0.33333
INFO localization selected expressions [(13, 9, 13, 14)] with group score 0.33333
INFO repair considering suspicious expressions [(12, 14, 12, 19)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
/angelix/test/.angelix/backend/distance.c:21:10: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
x1 = atoi(argv[1]);
^
12 14 12 19
y1 - y2
1 warning generated.
INFO project building backend source
angelix-compiler --klee -I. -c distance.c -o distance.o
[angelix-compiler] llvm-gcc -include /angelix/src/runtime/runtime.h -emit-llvm -g -O0 -D ANGELIX_SYMBOLIC_RUNTIME '-I.' '-c' 'distance.c' '-o' 'distance.o'
angelix-compiler --klee distance.o -o distance
[angelix-compiler] llvm-ld --disable-opt 'distance.o' '-o' 'distance' -L/angelix/build/lib/klee -langelix
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
mv: 'klee.log' and '/angelix/test/.angelix/backend/klee.log' are the same file
mv: './klee-out-0' and '/angelix/test/.angelix/backend/klee-out-0' are the same file
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000002.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair considering suspicious expressions [(6, 14, 6, 19)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
/angelix/test/.angelix/backend/distance.c:21:10: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
x1 = atoi(argv[1]);
^
6 14 6 19
x1 - x2
1 warning generated.
INFO project building backend source
angelix-compiler --klee -I. -c distance.c -o distance.o
[angelix-compiler] llvm-gcc -include /angelix/src/runtime/runtime.h -emit-llvm -g -O0 -D ANGELIX_SYMBOLIC_RUNTIME '-I.' '-c' 'distance.c' '-o' 'distance.o'
angelix-compiler --klee distance.o -o distance
[angelix-compiler] llvm-ld --disable-opt 'distance.o' '-o' 'distance' -L/angelix/build/lib/klee -langelix
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
mv: 'klee.log' and '/angelix/test/.angelix/backend/klee.log' are the same file
mv: './klee-out-0' and '/angelix/test/.angelix/backend/klee-out-0' are the same file
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000002.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair considering suspicious expressions [(5, 9, 5, 14)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
/angelix/test/.angelix/backend/distance.c:21:10: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
x1 = atoi(argv[1]);
^
5 9 5 14
x1 > x2
1 warning generated.
INFO project building backend source
angelix-compiler --klee -I. -c distance.c -o distance.o
[angelix-compiler] llvm-gcc -include /angelix/src/runtime/runtime.h -emit-llvm -g -O0 -D ANGELIX_SYMBOLIC_RUNTIME '-I.' '-c' 'distance.c' '-o' 'distance.o'
angelix-compiler --klee distance.o -o distance
[angelix-compiler] llvm-ld --disable-opt 'distance.o' '-o' 'distance' -L/angelix/build/lib/klee -langelix
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
mv: 'klee.log' and '/angelix/test/.angelix/backend/klee.log' are the same file
mv: './klee-out-0' and '/angelix/test/.angelix/backend/klee-out-0' are the same file
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000002.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair considering suspicious expressions [(9, 9, 9, 14)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
/angelix/test/.angelix/backend/distance.c:21:10: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
x1 = atoi(argv[1]);
^
9 9 9 14
y1 > y2
1 warning generated.
INFO project building backend source
angelix-compiler --klee -I. -c distance.c -o distance.o
[angelix-compiler] llvm-gcc -include /angelix/src/runtime/runtime.h -emit-llvm -g -O0 -D ANGELIX_SYMBOLIC_RUNTIME '-I.' '-c' 'distance.c' '-o' 'distance.o'
angelix-compiler --klee distance.o -o distance
[angelix-compiler] llvm-ld --disable-opt 'distance.o' '-o' 'distance' -L/angelix/build/lib/klee -langelix
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
mv: 'klee.log' and '/angelix/test/.angelix/backend/klee.log' are the same file
mv: './klee-out-0' and '/angelix/test/.angelix/backend/klee-out-0' are the same file
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair considering suspicious expressions [(13, 9, 13, 14)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
/angelix/test/.angelix/backend/distance.c:21:10: warning: implicit declaration of function 'atoi' is invalid in C99 [-Wimplicit-function-declaration]
x1 = atoi(argv[1]);
^
13 9 13 14
dx > dy
1 warning generated.
INFO project building backend source
angelix-compiler --klee -I. -c distance.c -o distance.o
[angelix-compiler] llvm-gcc -include /angelix/src/runtime/runtime.h -emit-llvm -g -O0 -D ANGELIX_SYMBOLIC_RUNTIME '-I.' '-c' 'distance.c' '-o' 'distance.o'
angelix-compiler --klee distance.o -o distance
[angelix-compiler] llvm-ld --disable-opt 'distance.o' '-o' 'distance' -L/angelix/build/lib/klee -langelix
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
mv: 'klee.log' and '/angelix/test/.angelix/backend/klee.log' are the same file
mv: './klee-out-0' and '/angelix/test/.angelix/backend/klee-out-0' are the same file
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000002.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair no patch generated in 13s
FAIL
from angelix.
In order to fix this bug, the group size should be set to 2, because it requires a multi-line change. Please try --group-size 2. I will update the tutorial
from angelix.
Do you mean adding it at the end of the command?
root@9f2c2b97a49e:/angelix/test# angelix /angelix/test/src distance.c oracle 1 2 3 --assert assert.json --group-size 2
INFO project configuring validation source
INFO project building json compilation database from validation source
INFO testing running test '1' of validation source
INFO testing running test '2' of validation source
INFO testing running test '3' of validation source
INFO project configuring frontend source
INFO transformation instrumenting repairable of frontend source
INFO project building frontend source
INFO repair running positive tests for debugging
INFO testing running test '1' of frontend source
INFO testing running test '2' of frontend source
INFO repair running negative tests for debugging
INFO testing running test '3' of frontend source
INFO repair repair test suite: ['1', '2', '3']
INFO repair validation test suite: ['1', '2', '3']
INFO localization selected expressions [(9, 9, 9, 14), (12, 14, 12, 19)] with group score 1.3333
INFO localization selected expressions [(5, 9, 5, 14), (6, 14, 6, 19)] with group score 0.83333
INFO localization selected expressions [(13, 9, 13, 14)] with group score 0.33333
INFO repair considering suspicious expressions [(9, 9, 9, 14), (12, 14, 12, 19)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
INFO project building backend source
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000003.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000002.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair considering suspicious expressions [(5, 9, 5, 14), (6, 14, 6, 19)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
INFO project building backend source
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000003.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000002.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair considering suspicious expressions [(13, 9, 13, 14)]
INFO reduction selected 1 tests
INFO reduction selected passing tests: []
INFO reduction selected failing tests: ['3']
INFO project configuring backend source
INFO transformation instrumenting suspicious of backend source
INFO project building backend source
INFO inference inferring specification for test '3'
INFO testing running test '3' of backend source with KLEE
INFO inference sleeping for 1 second...
INFO inference solving path .angelix/backend/klee-out-0/test000001.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference solving path .angelix/backend/klee-out-0/test000002.smt2
INFO inference value 'stdout' executed 0 times while 1 required
INFO inference found 0 angelic paths for test '3'
INFO repair no patch generated in 8s
FAIL
from angelix.
from angelix.
Sure, it just like you discussed in another issue, 1 fail, others pass.
root@9f2c2b97a49e:/angelix# make test
python3 tests/tests.py
..F..............
======================================================================
FAIL: test_deletebreak (__main__.TestAngelix)
----------------------------------------------------------------------
Traceback (most recent call last):
File "tests/tests.py", line 126, in test_deletebreak
self.assertEqual(result, 'SUCCESS')
AssertionError: 'FAIL' != 'SUCCESS'
- FAIL
+ SUCCESS
----------------------------------------------------------------------
Ran 17 tests in 81.928s
FAILED (failures=1)
make: *** [test] Error 1
from angelix.
from angelix.
test.zip
I think most of the information is the same as you, except for the minor diff of Makefile.
from angelix.
Why don't you have ANGELIX_OUTPUT
as in the tutorial?
from angelix.
Oh, the ANGELIX_OUTPUT
need to be added manually? I thought it introduced automatically.
Sorry for that.
But I think it will make the tools hard to implement automatically in a large program. It may need large manual work.
from angelix.
Unfortunately, C does not have a standard testing framework, so in general it is not possible to say if a program passes or fails a given test without some annotations. But these annotations are only needed for the return values/assertions.
from angelix.
Thanks for your reply!
from angelix.
Related Issues (20)
- Guards not add for certain type of statement
- Support augmented assignments
- Use klee_prefer_cex for characters
- Don't consider expression with 0 suspiciousness score, because they are not executed by failing tests
- Problem of reproducing the angelix test HOT 2
- Dockerfile doesn't build: Unsupported major.minor version 52.0 HOT 1
- What should I write in assert.json if the output includes string? HOT 1
- Files are never closed after being written (in src/repair) HOT 2
- Update for the latest KLEE HOT 1
- Problem of generating the patch for tutorial folder
- Downloading dependencies during docker build fails due to Java certificates
- https://git.llvm.org/git/clang-tools-extra not accessible HOT 2
- compiling failed HOT 4
- Angelix docker version failed test HOT 4
- make with multi-threaded fail HOT 1
- Can't pass tutorial test HOT 1
- Can't reproduce experimental results with docker image
- Error: make default
- Angelix example from `Tutorial.md` fails to find a repair with `--instr-printf distance.c` HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from angelix.