summaryrefslogtreecommitdiff
path: root/contrib/correctness/examples/extract.v
blob: e225ba187ab6d461aa737e27ecddc5212b6a2d1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43

(* Tests d'extraction *)

Require ProgramsExtraction.
Save State Ici "test extraction".

(* exp *)

Require exp.
Write Caml File "exp" [ i_exp r_exp ].

(* exp_int *)

Restore State Ici.
Require exp_int.
Write Caml File "exp_int" [ i_exp r_exp ].

(* fact *)

Restore State Ici.
Require fact.
Initialize x with (S (S (S O))).
Initialize y with O.
Write Caml File "fact" [ factorielle ].

(* fact_int *)

Restore State Ici.
Require fact_int.
Initialize x with `3`.
Initialize y with `0`.
Write Caml File "fact_int" [ factorielle ].

(* Handbook *)

Restore State Ici.
Require Handbook.
Initialize X with `3`.
Initialize Y with `3`.
Initialize Z with `3`.
Initialize N with `3`.
Initialize S with `3`.
Write Caml File "Handbook" [ pgm178 pgm186 pgm196 ].