Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
Iris
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Matthieu Sozeau
Iris
Commits
bb8f7667
Commit
bb8f7667
authored
9 years ago
by
Ralf Jung
Committed by
Robbert Krebbers
9 years ago
Browse files
Options
Downloads
Patches
Plain Diff
some more comments
parent
162c2f80
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
heap_lang/lang.v
+15
-0
15 additions, 0 deletions
heap_lang/lang.v
with
15 additions
and
0 deletions
heap_lang/lang.v
+
15
−
0
View file @
bb8f7667
...
...
@@ -32,8 +32,16 @@ Proof.
destruct
mx
;
rewrite
/=
?elem_of_cons
;
naive_solver
.
Qed
.
(** A typeclass for whether a variable is bound in a given
context. Making this a typeclass means we can use tpeclass search
to program solving these constraints, so this becomes extensible.
Also, since typeclass search runs *after* unification, Coq has already
inferred the X for us; if we were to go for embedded proof terms ot
tactics, Coq would do things in the wrong order. *)
Class
VarBound
(
x
:
string
)
(
X
:
list
string
)
:=
var_bound
:
bool_decide
(
x
∈
X
)
.
(* FIXME shouldn't this have this Hint to only perfom search of x and X
are not evars? *)
Hint
Extern
0
(
VarBound
_
_)
=>
vm_compute
;
exact
I
:
typeclass_instances
.
Instance
var_bound_proof_irrel
x
X
:
ProofIrrel
(
VarBound
x
X
)
.
...
...
@@ -46,6 +54,13 @@ Qed.
Inductive
expr
(
X
:
list
string
)
:=
(* Base lambda calculus *)
(* Var is the only place where the terms contain a proof. The fact that they
contain a proof at all is suboptimal, since this means two seeminlgy
convertible terms could differ in their proofs. However, this also has
some advantages:
* We can make the [X] an index, so we can do non-dependent match.
* In expr_weaken, we can push the proof all the way into Var, making
sure that proofs never block computation. *)
|
Var
(
x
:
string
)
`{
VarBound
x
X
}
|
Rec
(
f
x
:
binder
)
(
e
:
expr
(
f
:
b
:
x
:
b
:
X
))
|
App
(
e1
e2
:
expr
X
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment