Skip to content

Added a reifiction function for modular reification without pmaps.#102

Open
jesper-bengtson wants to merge 18 commits intomasterfrom
reify-func-no-table
Open

Added a reifiction function for modular reification without pmaps.#102
jesper-bengtson wants to merge 18 commits intomasterfrom
reify-func-no-table

Conversation

@jesper-bengtson
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Owner

@gmalecha gmalecha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tiny bit of cleanup.

(rf ++
((Patterns.CVar (@ExprCore.Var typ func)) ::
(Patterns.CApp (Patterns.CRec 0) (Patterns.CRec 0) (@ExprCore.App typ func)) ::
(Patterns.CAbs (CCall (reify_scheme typ)) (CRec 0) (@ExprCore.Abs typ func)) :: nil))).
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would it make sense to factor out the common code here? Maybe make something that takes both before and after commands and then instantiate it appropriately for both reify_func and reify_func'?

Arguments Reify_func _ _ {_ _} _.

Arguments reify_func' _ _ {_} _.
Arguments Reify_func' _ _ {_} _.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What are the first two arguments to this function?

@jesper-bengtson
Copy link
Copy Markdown
Collaborator Author

jesper-bengtson commented Dec 11, 2016 via email

@gmalecha
Copy link
Copy Markdown
Owner

This PR is now a lot bigger, it fixes several issue in the plugin.

Typeclasses Opaque IgnorePatterns.

Arguments reify_IgnorePatterns {_} _ {_}.
*)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IgnorePatterns should be moved to another file.

Require Import MirrorCore.Lib.EqView.
Require Import MirrorCore.CTypes.BaseType.
Require Import MirrorCore.Lemma.
(* Require Import MirrorCore.TCLemma. *)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed.

(* This reifies *)
reify_poly (forall x : nat, True -> True -> x = x -> x = x).
apply I.
Qed.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should probably be removed?

type syntax_data =
{ reify : lazy_term -> Term.constr reifier
; result_type : Term.constr
; result_type : unit (* Term.constr *)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The result_type field should be removed entirely.

(* ++ Printer.pr_constr_env env evm cmd *)
(* ++ fnl () *)
(* ++ str "has type" ++ fnl () *)
(* ++ Printer.pr_constr_env env evm typ) *)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete!

let compile_name (prg : Term.constr) =
let (evm,env) = Lemmas.get_current_context () in
let typ = get_Command_type env evm prg in
(* let typ = get_Command_type env evm prg in *)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete.

let reify_type (name : Term.constr) =
let data = get_entry name in
data.result_type
*)
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete.

Eval unfold Lemma.add_var, Lemma.add_prem , Lemma.vars , Lemma.concl , Lemma.premises in
<:: @eq_refl' ::>.

Print lem_eq_refl'.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed.

Eval unfold Lemma.add_var, Lemma.add_prem , Lemma.vars , Lemma.concl , Lemma.premises in
<:: @Proper_exists ::>.

Print lem_Proper_exists.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed.

end.
*)

Locate ctyp.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed.

Qed.


Locate RewriteHintDb.
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be removed.

; type_cast := ctyp_cast
; tyAcc := ctyp_acc }.

Program Fixpoint ctyp_noVar (c : ctyp) : Prop :=
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is Program necessary here? It is odd that you didn't need to include anything for it.

@gmalecha
Copy link
Copy Markdown
Owner

I should have merged this a while ago, but it needs updates now.

@gmalecha gmalecha self-assigned this May 31, 2017
@gmalecha
Copy link
Copy Markdown
Owner

@jesper-bengtson are you developing on 8.5 or have you moved to 8.6?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants