Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Fengmin Zhu
Tutorial POPL20
Commits
3faf90cb
Commit
3faf90cb
authored
Jan 18, 2020
by
Robbert Krebbers
Browse files
Consistent names for constructors of the typing judgment.
parent
1c99fa3e
Changes
1
Hide whitespace changes
Inline
Side-by-side
theories/typed.v
View file @
3faf90cb
...
...
@@ -74,36 +74,36 @@ Inductive typed (Γ : gmap string ty) : expr → ty → Prop :=
|
TApp_typed
e
τ
τ
'
:
Γ
⊢
ₜ
e
:
TForall
τ
→
Γ
⊢
ₜ
e
<
_
>
:
ty_subst
0
τ
'
τ
|
T
Pack
e
τ
τ
'
:
|
Pack
_typed
e
τ
τ
'
:
Γ
⊢
ₜ
e
:
ty_subst
0
τ
'
τ
→
Γ
⊢
ₜ
e
:
TExist
τ
|
T
Unpack
e1
x
e2
τ
τ
2
:
|
Unpack
_typed
e1
x
e2
τ
τ
2
:
Γ
⊢
ₜ
e1
:
TExist
τ
→
binder_insert
x
τ
(
ty_lift
0
<$>
Γ
)
⊢
ₜ
e2
:
ty_lift
0
τ
2
→
Γ
⊢
ₜ
(
unpack
:
x
:
=
e1
in
e2
)
:
τ
2
(** Heap operations *)
|
T
Alloc
e
τ
:
|
Alloc
_typed
e
τ
:
Γ
⊢
ₜ
e
:
τ
→
Γ
⊢
ₜ
Alloc
e
:
TRef
τ
|
T
Load
e
τ
:
|
Load
_typed
e
τ
:
Γ
⊢
ₜ
e
:
TRef
τ
→
Γ
⊢
ₜ
Load
e
:
τ
|
T
Store
e1
e2
τ
:
|
Store
_typed
e1
e2
τ
:
Γ
⊢
ₜ
e1
:
TRef
τ
→
Γ
⊢
ₜ
e2
:
τ
→
Γ
⊢
ₜ
Store
e1
e2
:
TUnit
|
T
FAA
e1
e2
:
|
FAA
_typed
e1
e2
:
Γ
⊢
ₜ
e1
:
TRef
TInt
→
Γ
⊢
ₜ
e2
:
TInt
→
Γ
⊢
ₜ
FAA
e1
e2
:
TInt
|
T
CmpXchg
e1
e2
e3
τ
:
|
CmpXchg
_typed
e1
e2
e3
τ
:
ty_unboxed
τ
→
Γ
⊢
ₜ
e1
:
TRef
τ
→
Γ
⊢
ₜ
e2
:
τ
→
Γ
⊢
ₜ
e3
:
τ
→
Γ
⊢
ₜ
CmpXchg
e1
e2
e3
:
TProd
τ
TBool
(** Operators *)
|
UnOp_typed
_nat
op
e
τ
σ
:
|
UnOp_typed
op
e
τ
σ
:
Γ
⊢
ₜ
e
:
τ
→
ty_un_op
op
τ
σ
→
Γ
⊢
ₜ
UnOp
op
e
:
σ
|
BinOp_typed
_nat
op
e1
e2
τ
1
τ
2
σ
:
|
BinOp_typed
op
e1
e2
τ
1
τ
2
σ
:
Γ
⊢
ₜ
e1
:
τ
1
→
Γ
⊢
ₜ
e2
:
τ
2
→
ty_bin_op
op
τ
1
τ
2
σ
→
Γ
⊢
ₜ
BinOp
op
e1
e2
:
σ
...
...
@@ -111,7 +111,7 @@ Inductive typed (Γ : gmap string ty) : expr → ty → Prop :=
Γ
⊢
ₜ
e0
:
TBool
→
Γ
⊢
ₜ
e1
:
τ
→
Γ
⊢
ₜ
e2
:
τ
→
Γ
⊢
ₜ
If
e0
e1
e2
:
τ
(** Fork *)
|
T
Fork
e
:
|
Fork
_typed
e
:
Γ
⊢
ₜ
e
:
TUnit
→
Γ
⊢
ₜ
Fork
e
:
TUnit
where
"Γ ⊢ₜ e : τ"
:
=
(
typed
Γ
e
τ
).
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment