Skip to content

Commit 5e74d00

Browse files
committed
Move erasure to its own directory
1 parent cc6e1f4 commit 5e74d00

File tree

11 files changed

+27
-302
lines changed

11 files changed

+27
-302
lines changed

Diff for: Makefile

+8-1
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,29 @@
1-
all: template-coq checker
1+
all: template-coq checker extraction
22

33
.PHONY: all template-coq checker install html clean mrproper .merlin test-suite translations
44

55
install:
66
$(MAKE) -C template-coq install
77
$(MAKE) -C checker install
8+
$(MAKE) -C extraction install
89

910
html: all
1011
$(MAKE) -C template-coq html
12+
$(MAKE) -C extraction html
1113
mv template-coq/html/*.html html
1214
rm template-coq/html/coqdoc.css
1315
rm -d template-coq/html
1416

1517
clean:
1618
$(MAKE) -C template-coq clean
19+
$(MAKE) -C extraction clean
1720
$(MAKE) -C checker clean
1821
$(MAKE) -C test-suite clean
1922
$(MAKE) -C translations clean
2023

2124
mrproper:
2225
$(MAKE) -C template-coq mrproper
26+
$(MAKE) -C extraction mrproper
2327
$(MAKE) -C checker mrproper
2428

2529
.merlin:
@@ -29,6 +33,9 @@ mrproper:
2933
template-coq:
3034
$(MAKE) -C template-coq
3135

36+
extraction: template-coq
37+
$(MAKE) -C extraction
38+
3239
checker: template-coq
3340
./movefiles.sh
3441
$(MAKE) -C checker

Diff for: extraction/_CoqProject

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
-R theories Extraction
2+
-Q ../template-coq/theories Template
3+
4+
theories/Ast.v
5+
theories/Induction.v
6+
theories/LiftSubst.v
7+
theories/UnivSubst.v
8+
theories/WcbvEval.v
9+
theories/Typing.v
10+
theories/Erase.v

Diff for: template-coq/theories/Erasure/Ast.v renamed to extraction/theories/Ast.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,9 @@ Require Import List. Import ListNotations.
66
From Template Require Import monad_utils.
77
From Template Require Export univ uGraph Ast.
88

9-
(** Erased terms
9+
(** Extracted terms
1010
11-
These are the terms produced by erasure:
11+
These are the terms produced by extraction:
1212
compared to kernel terms, all proofs are translated to [tBox] and
1313
casts are removed.
1414
*)

Diff for: template-coq/theories/Erasure/Erase.v renamed to extraction/theories/Erase.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
From Coq Require Import Bool String List Program BinPos Compare_dec Omega.
44
From Template Require Import config utils monad_utils Ast univ Induction LiftSubst UnivSubst Typing Checker Retyping MetaTheory WcbvEval.
5-
From Template Require AstUtils Erasure.Ast Erasure.WcbvEval.
5+
From Extraction Require Ast WcbvEval.
66
Require Import String.
77
Local Open Scope string_scope.
88
Set Asymmetric Patterns.

Diff for: template-coq/theories/Erasure/Induction.v renamed to extraction/theories/Induction.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(* Distributed under the terms of the MIT license. *)
22

33
From Template Require Import univ.
4-
From Template.Erasure Require Import Ast.
4+
From Extraction Require Import Ast.
55
Require Import List Program.
66
Require Import BinPos.
77
Require Import Coq.Arith.Compare_dec Bool.

Diff for: template-coq/theories/Erasure/LiftSubst.v renamed to extraction/theories/LiftSubst.v

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
(* Distributed under the terms of the MIT license. *)
22

33
Require Import List Program.
4-
Require Import Erasure.Ast.
4+
Require Import Ast.
55
Require Import BinPos.
66
Require Import Coq.Arith.Compare_dec Bool.
7-
Require Import Erasure.Induction.
7+
Require Import Induction.
88

99
(** * Lifting and substitution for the AST
1010

Diff for: template-coq/theories/Erasure/Typing.v renamed to extraction/theories/Typing.v

+1-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@
22

33
From Coq Require Import Bool String List Program BinPos Compare_dec Omega.
44
Require Import Template.config Template.utils Template.kernel.univ.
5-
From Template.Erasure Require Import Ast Induction LiftSubst UnivSubst.
6-
From Template Require AstUtils Loader.
5+
From Extraction Require Import Ast Induction LiftSubst UnivSubst.
76
Require Import String.
87
Local Open Scope string_scope.
98
Set Asymmetric Patterns.

Diff for: template-coq/theories/Erasure/UnivSubst.v renamed to extraction/theories/UnivSubst.v

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
From Coq Require Import Bool String List Program BinPos Compare_dec Omega.
44
From Template Require Import utils univ.
5-
From Template.Erasure Require Import Ast Induction LiftSubst.
5+
From Extraction Require Import Ast Induction LiftSubst.
66
From Template Require AstUtils.
77
Require Import String.
88
Local Open Scope string_scope.

Diff for: template-coq/theories/Erasure/WcbvEval.v renamed to extraction/theories/WcbvEval.v

+1-14
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
From Coq Require Import Bool String List Program BinPos Compare_dec Omega.
44
From Template Require Import config utils Ast univ.
5-
From Template.Erasure Require Import Ast Induction LiftSubst UnivSubst Typing.
5+
From Extraction Require Import Ast Induction LiftSubst UnivSubst Typing.
66
From Template Require AstUtils.
77
Require Import String.
88
Local Open Scope string_scope.
@@ -298,16 +298,3 @@ Section Wcbv.
298298
Admitted. (* FIXME complete *)
299299

300300
End Wcbv.
301-
302-
(** Well-typed closed programs can't go wrong: they always evaluate to a value. *)
303-
304-
Conjecture closed_typed_wcbeval : forall (Σ : global_context) t T,
305-
Σ ;;; [] |- t : T -> exists u, eval (fst Σ) [] t u.
306-
307-
(** Evaluation is a subrelation of reduction: *)
308-
309-
Lemma wcbeval_red : forall (Σ : global_declarations) Γ t u,
310-
eval Σ Γ t u -> red Σ Γ t u.
311-
Proof.
312-
induction 1; try constructor; eauto.
313-
Admitted. (** TODO: Congruence lemmas of red for all constructions (as done in Coq in Coq) *)

Diff for: template-coq/_CoqProject

-7
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,5 @@ theories/MetaTheory.v
2929
theories/Checker.v
3030
theories/WcbvEval.v
3131
theories/Retyping.v
32-
theories/Erasure/Ast.v
33-
theories/Erasure/Induction.v
34-
theories/Erasure/LiftSubst.v
35-
theories/Erasure/UnivSubst.v
36-
theories/Erasure/WcbvEval.v
37-
theories/Erasure/Typing.v
38-
theories/Erasure/Erase.v
3932
theories/All.v
4033
theories/Extraction.v

0 commit comments

Comments
 (0)