Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Port to Coq 8.7 and template-coq v8.7 branch #3

Merged
merged 35 commits into from
Feb 28, 2018
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
35 commits
Select commit Hold shift + click to select a range
2b42ef6
Port to Coq 8.7 and template-coq v8.7 branch
mattam82 Jan 30, 2018
e64a3e6
everything compiles with the new 8.7 release of Squiggle
aa755 Jan 30, 2018
a5756d4
reverted a file to HEAD^^: already compiles with the 8.7 version
aa755 Jan 30, 2018
5c28876
Fixes for move of univ_constraint to a separated, qualified namespace
mattam82 Feb 9, 2018
337ee98
Update README, moving to README.md
mattam82 Feb 9, 2018
fbb0d59
Not the best, template-coq now extracts Z to int so have to hack it here
mattam82 Feb 9, 2018
6d79b3e
Plugin makefile config
mattam82 Feb 9, 2018
30081e6
Expand README instruction. TODO: update for template-coq release
mattam82 Feb 14, 2018
26eb733
Expand README
mattam82 Feb 14, 2018
ad14b74
proof of the L4 to L4_2 instance. some admits remain.
aa755 Feb 14, 2018
f9341d4
in comments, 2 questions for Matthieu
aa755 Feb 15, 2018
d8fe4c4
Update for changes in Template-Coq, which removed program
mattam82 Feb 15, 2018
d2af6ea
Update Camlcoq due to extraction of Z and positive to ints
mattam82 Feb 16, 2018
69a268d
Update README with compatible package versions.
mattam82 Feb 16, 2018
5d374d6
Update .gitignore
mattam82 Feb 16, 2018
fd3b2b8
Remove interactive Print and Search commands from .v files
mattam82 Feb 16, 2018
3a8a0a4
Fix local axiom warning
mattam82 Feb 16, 2018
295cbd8
Update PrintCsyntax
mattam82 Feb 16, 2018
bac0f7b
Use a CertiCoq toplevel namespace for everything, except compcert (le…
mattam82 Feb 16, 2018
b3a11cf
Moved plugin to toplevel directory, added install target
mattam82 Feb 16, 2018
003b03c
Minor README fixes
mattam82 Feb 16, 2018
a50101a
Make plugin/extraction directory if not present
mattam82 Feb 17, 2018
d5d126a
No more params in L4 -> skipping unnecessary
mattam82 Feb 17, 2018
cb12bbc
Remove comment, it's already the case that wf fixes start with a lambda:
mattam82 Feb 17, 2018
cc38fb3
Complete L3->L3_eta correctness proof and preservation of observations
mattam82 Feb 17, 2018
19d7c74
some lemmas for the L4_2 to L4_5 correctness instance
aa755 Feb 27, 2018
5245ea5
proved the L4_2 to L4_5 correctness instance. 1 admit remains.
aa755 Feb 27, 2018
f5ddd15
proved the remaining admits in L4_2 to L4_5 correctness instance
aa755 Feb 27, 2018
33c1595
some wf lemmas for the L4 to L4_2 correctness instance
aa755 Feb 28, 2018
11d9566
Fix README.md typesetting of shell commands
mattam82 Feb 28, 2018
62c5543
L4 to L4_2 preserves goodness (well-formedness props)
aa755 Feb 28, 2018
7e7f768
temporarily commenting out lemmas that need SquiggleEq update.
aa755 Feb 28, 2018
52638cb
Merge branch 'coq-8.7' of github:PrincetonUniversity/certicoq into co…
aa755 Feb 28, 2018
a4db98c
Another minor README fix
mattam82 Feb 28, 2018
22a0d65
Merge remote-tracking branch 'github/master' into coq-8.7
aa755 Feb 28, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixes for move of univ_constraint to a separated, qualified namespace
  • Loading branch information
mattam82 committed Feb 9, 2018
commit 5c28876a022115fdf1a844829d566600ea49d3e8
8 changes: 4 additions & 4 deletions theories/L1g/compile.v
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Require Import Coq.Lists.List.
Require Import Coq.Strings.String.
Require Import Coq.omega.Omega.
Require Import Coq.Bool.Bool.
Require Import Template.Ast.
Require Import Template.Ast Template.kernel.univ.
Require Import Common.Common.

Local Open Scope string_scope.
Expand Down Expand Up @@ -278,8 +278,8 @@ Function term_Term (t:term) : Term :=
| tRel n => TRel n
| tSort srt =>
TSort (match srt with
| (lProp, false) :: nil => SProp
| (lSet, false) :: nil => SSet
| (Level.lProp, false) :: nil => SProp
| (Level.lSet, false) :: nil => SSet
| _ => SType (* throwing away sort info *)
end)
| tCast tm _ (tCast _ _ (tSort sProp)) => mkProof (term_Term tm)
Expand Down Expand Up @@ -322,7 +322,7 @@ Fixpoint program_Pgm
| PIn t => {| main:= (term_Term dtEnv t); env:= e |}
| PConstr nm us ty t p =>
program_Pgm dtEnv p (cons (pair nm (ecTrm (term_Term dtEnv t))) e)
| PType nm npar ibs p =>
| PType nm uctx npar ibs p =>
let Ibs := ibodies_itypPack ibs in
program_Pgm dtEnv p (cons (pair nm (ecTyp Term npar Ibs)) e)
| PAxiom nm us _ p =>
Expand Down
15 changes: 8 additions & 7 deletions theories/common/AstCommon.v
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

Require Import Template.kernel.univ.
Require Export Template.Ast.
Require Import Template.Template.
Require Import Coq.Strings.String.
Expand Down Expand Up @@ -36,10 +36,10 @@ induction s1; induction s2; try (solve [right; intros h; discriminate]).
+ right. injection. intuition.
Defined.

Lemma level_dec : forall x y : level, {x = y} + {x <> y}.
Lemma level_dec : forall x y : Level.t, {x = y} + {x <> y}.
Proof. decide equality. apply String.string_dec. apply NPeano.Nat.eq_dec. Defined.

Lemma level_bool_dec : forall x y : level * bool, {x = y} + {x <> y}.
Lemma level_bool_dec : forall x y : Level.t * bool, {x = y} + {x <> y}.
Proof. intros [l b] [l' b']. decide equality. apply Bool.bool_dec. apply level_dec. Defined.

Lemma universe_dec: forall x y : universe, {x = y} + {x <> y}.
Expand All @@ -53,10 +53,11 @@ try (solve [left; reflexivity]).
Defined.

Lemma inductive_dec: forall (s1 s2:inductive), {s1 = s2}+{s1 <> s2}.
induction s1; induction s2.
destruct (string_dec k k0); destruct (eq_nat_dec n n0); subst;
intros [mind i] [mind' i'].
destruct (string_dec mind mind');
destruct (eq_nat_dec i i'); subst;
try (solve [left; reflexivity]);
right; intros h; elim n1; injection h; intuition.
right; intros h; elim n; injection h; intuition.
Defined.

Lemma nat_list_dec : forall l1 l2 : list nat, {l1 = l2} + {l1 <> l2}.
Expand Down Expand Up @@ -220,7 +221,7 @@ Fixpoint program_datatypeEnv (p:program) (e:environ) : environ :=
match p with
| PIn _ => e
| PConstr _ _ _ _ p => program_datatypeEnv p e
| PType nm npar ibs p =>
| PType nm uctx npar ibs p =>
let Ibs := ibodies_itypPack ibs in
program_datatypeEnv p (cons (pair nm (ecTyp npar Ibs)) e)
| PAxiom nm _ _ p =>
Expand Down
2 changes: 1 addition & 1 deletion theories/common/Common.v
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@ Require Export Template.Ast.

Require Export Common.exceptionMonad.
Require Export Common.RandyPrelude.
Require Export Common.classes.
Require Export Common.AstCommon.
Require Export Common.classes.