Added array analysis (computes paths used to add elements/tuples to sets/relations.
[repair.git] / Repair / RepairCompiler / compiler-steps.txt
1 Step 1: Building Compiler
2 -------------------------
3 cd RepairCompiler/MCC
4 make clean
5 make
6
7
8 Step 2: Run Compiler
9 --------------------
10 Example: 
11 For the specifs in ex.constraints, ex.struct, ex.space, ex.abstract, ex.model 
12 in directory Repair/Ex:
13
14 A) cd Ex
15 B) java -classpath <path to RepairCompiler> MCC.Compiler -checkonly ex
16
17 which builds:
18   ex.cc
19   ex_aux.h
20   ex_aux.cc
21   size.h
22   size.cc
23   
24
25 Step 3: Compile checker
26 -----------------------
27
28 A) copy the Runtime directory in Repair/Ex:   
29    cp -r <path to RepairCompiler>/MCC/Runtime .
30 B) copy generated files into the Runtime directory 
31    cp ex.cc ex_aux.* size.* Runtime
32 C) remove old object files 
33    cd Runtime; rm *.o
34 D) ./buildruntime
35 E) build checking object: 
36    g++ -g -c ex_aux.cc
37
38
39 Step 4: Check the application
40 -----------------------------
41
42 If ex_test.c is the application under testing, then:
43
44 A) in ex_test.c, add:
45    #include "ex_aux.h" 
46    #include "memory.h"
47 B) at the beginning of the main method, add:
48    initializemmap();
49 C) wherever you want to check the consistency constraints, add:
50    #include "ex.cc"
51 D) compile the application:
52    g++ -g ex_test.cc *.o -o ex_test
53 E) run the application: 
54    ./ex_test