1
|
To compile Lustrec:
|
2
|
------------------
|
3
|
|
4
|
# autoconf
|
5
|
# ./configure
|
6
|
# make
|
7
|
# make install
|
8
|
|
9
|
|
10
|
To use lustrec:
|
11
|
--------------
|
12
|
|
13
|
In a modular setting:
|
14
|
# lustrec <filename.lus>
|
15
|
will generate filename.c and filename.h
|
16
|
|
17
|
With a main node:
|
18
|
# lustrec -node <main_node> <filename.lus>
|
19
|
will generate the same two files,
|
20
|
but also filename_main.c that contains a main function
|
21
|
and filename_alloc.h that contains the node allocation macros
|
22
|
|
23
|
With a main node, with a static memory allocation scheme:
|
24
|
# lustrec -node <main_node> -dynamic <filename.lus>
|
25
|
same as above, but main function will dynamically allocate node memory
|
26
|
|
27
|
To compile it:
|
28
|
# gcc -Iinclude filename.c
|
29
|
# gcc -Iinclude filename_main.c
|
30
|
where include links to the include folder
|
31
|
|
32
|
To run it with the generated main function:
|
33
|
- compile the io_frontend.o
|
34
|
# gcc -c include/io_frontend.c
|
35
|
# gcc -Iinclude -o target_name io_frontend.o filename.o filename_main.o
|
36
|
# ./target_name
|
37
|
|
38
|
To analyze it with frama-c
|
39
|
# frama-c -cpp-extra-args='-Iinclude' filename.c
|