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
Model registry
Operate
Environments
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
Tej Chajed
iris
Commits
25dc2bc8
Commit
25dc2bc8
authored
1 year ago
by
Ralf Jung
Browse files
Options
Downloads
Patches
Plain Diff
fix forgotten renames: head_redex -> base_redex, head_atomic -> base_atomic
parent
6a0d62a5
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
iris/program_logic/ectx_language.v
+13
-13
13 additions, 13 deletions
iris/program_logic/ectx_language.v
with
13 additions
and
13 deletions
iris/program_logic/ectx_language.v
+
13
−
13
View file @
25dc2bc8
...
...
@@ -29,23 +29,23 @@ Section ectx_language_mixin.
mixin_fill_inj
K
:
Inj
(
=
)
(
=
)
(
fill
K
);
mixin_fill_val
K
e
:
is_Some
(
to_val
(
fill
K
e
))
→
is_Some
(
to_val
e
);
(** Given a
head
redex [e1_redex] somewhere in a term, and another
(** Given a
base
redex [e1_redex] somewhere in a term, and another
decomposition of the same term into [fill K' e1'] such that [e1'] is not
a value, then the
head
redex context is [e1']'s context [K'] filled with
a value, then the
base
redex context is [e1']'s context [K'] filled with
another context [K'']. In particular, this implies [e1 = fill K''
e1_redex] by [fill_inj], i.e., [e1]' contains the
head
redex.)
e1_redex] by [fill_inj], i.e., [e1]' contains the
base
redex.)
This implies there can be only one
head
redex, see
[
head
_redex_unique]. *)
This implies there can be only one
base
redex, see
[
base
_redex_unique]. *)
mixin_step_by_val
K'
K_redex
e1'
e1_redex
σ1
κ
e2
σ2
efs
:
fill
K'
e1'
=
fill
K_redex
e1_redex
→
to_val
e1'
=
None
→
base_step
e1_redex
σ1
κ
e2
σ2
efs
→
∃
K''
,
K_redex
=
comp_ectx
K'
K''
;
(** If [fill K e] takes a
head
step, then either [e] is a value or [K] is
(** If [fill K e] takes a
base
step, then either [e] is a value or [K] is
the empty evaluation context. In other words, if [e] is not a value
wrapping it in a context does not add new
head
redex positions. *)
wrapping it in a context does not add new
base
redex positions. *)
mixin_base_ctx_step_val
K
e
σ1
κ
e2
σ2
efs
:
base_step
(
fill
K
e
)
σ1
κ
e2
σ2
efs
→
is_Some
(
to_val
e
)
∨
K
=
empty_ectx
;
}
.
...
...
@@ -143,7 +143,7 @@ Section ectx_language.
Canonical
Structure
ectx_lang
:
language
:=
Language
ectx_lang_mixin
.
Definition
head
_atomic
(
a
:
atomicity
)
(
e
:
expr
Λ
)
:
Prop
:=
Definition
base
_atomic
(
a
:
atomicity
)
(
e
:
expr
Λ
)
:
Prop
:=
∀
σ
κ
e'
σ'
efs
,
base_step
e
σ
κ
e'
σ'
efs
→
if
a
is
WeaklyAtomic
then
irreducible
e'
σ'
else
is_Some
(
to_val
e'
)
.
...
...
@@ -158,12 +158,12 @@ Section ectx_language.
Lemma
not_base_reducible
e
σ
:
¬
base_reducible
e
σ
↔
base_irreducible
e
σ
.
Proof
.
unfold
base_reducible
,
base_irreducible
.
naive_solver
.
Qed
.
(** The decomposition into
head
redex and context is unique.
(** The decomposition into
base
redex and context is unique.
In all sensible instances, [comp_ectx K' empty_ectx] will be the same as
[K'], so the conclusion is [K = K' ∧ e = e'], but we do not require a law
to actually prove that so we cannot use that fact here. *)
Lemma
head
_redex_unique
K
K'
e
e'
σ
:
Lemma
base
_redex_unique
K
K'
e
e'
σ
:
fill
K
e
=
fill
K'
e'
→
base_reducible
e
σ
→
base_reducible
e'
σ
→
...
...
@@ -237,7 +237,7 @@ Section ectx_language.
Qed
.
Lemma
ectx_language_atomic
a
e
:
head
_atomic
a
e
→
sub_redexes_are_values
e
→
Atomic
a
e
.
base
_atomic
a
e
→
sub_redexes_are_values
e
→
Atomic
a
e
.
Proof
.
intros
Hatomic_step
Hatomic_fill
σ
κ
e'
σ'
efs
[
K
e1'
e2'
->
->
Hstep
]
.
assert
(
K
=
empty_ectx
)
as
->
by
eauto
10
using
val_base_stuck
.
...
...
@@ -321,8 +321,8 @@ work.
Note that this trick no longer works when we switch to canonical projections
because then the pattern match [let '...] will be desugared into projections. *)
Definition
LanguageOfEctx
(
Λ
:
ectxLanguage
)
:
language
:=
let
'
@
EctxLanguage
E
V
C
St
K
of_val
to_val
empty
comp
fill
head
mix
:=
Λ
in
let
'
@
EctxLanguage
E
V
C
St
K
of_val
to_val
empty
comp
fill
base
mix
:=
Λ
in
@
Language
E
V
St
K
of_val
to_val
_
(
@
ectx_lang_mixin
(
@
EctxLanguage
E
V
C
St
K
of_val
to_val
empty
comp
fill
head
mix
))
.
(
@
ectx_lang_mixin
(
@
EctxLanguage
E
V
C
St
K
of_val
to_val
empty
comp
fill
base
mix
))
.
Global
Arguments
LanguageOfEctx
:
simpl
never
.
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