Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
Iris
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
116
Issues
116
List
Boards
Labels
Service Desk
Milestones
Merge Requests
20
Merge Requests
20
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Iris
Commits
ee807b2f
Commit
ee807b2f
authored
Nov 01, 2019
by
Ralf Jung
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'ralf/poison' into 'master'
rename LitErased -> LitPoison See merge request
!318
parents
4ae66d43
85f7ca8a
Pipeline
#20775
passed with stage
in 14 minutes and 57 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
4 deletions
+10
-4
theories/heap_lang/lang.v
theories/heap_lang/lang.v
+10
-4
No files found.
theories/heap_lang/lang.v
View file @
ee807b2f
...
...
@@ -60,8 +60,13 @@ Open Scope Z_scope.
(** Expressions and vals. *)
Definition
proph_id
:
=
positive
.
(** We have a notion of "poison" as a variant of unit that may not be compared
with anything. This is useful for erasure proofs: if we erased things to unit,
[<erased> == unit] would evaluate to true after erasure, changing program
behavior. So we erase to the poison value instead, making sure that no legal
comparisons could be affected. *)
Inductive
base_lit
:
Set
:
=
|
LitInt
(
n
:
Z
)
|
LitBool
(
b
:
bool
)
|
LitUnit
|
Lit
Erased
|
LitInt
(
n
:
Z
)
|
LitBool
(
b
:
bool
)
|
LitUnit
|
Lit
Poison
|
LitLoc
(
l
:
loc
)
|
LitProphecy
(
p
:
proph_id
).
Inductive
un_op
:
Set
:
=
|
NegOp
|
MinusUnOp
.
...
...
@@ -141,6 +146,7 @@ architectures). The tags have the following meaning:
6: Payload is one of the following finitely many values, which 61 bits are more
than enough to encode:
LitV LitUnit, InjLV (LitV LitUnit), InjRV (LitV LitUnit),
LitV LitPoison, InjLV (LitV LitPoison), InjRV (LitV LitPoison),
LitV (LitBool _), InjLV (LitV (LitBool _)), InjRV (LitV (LitBool _)).
7: Value is boxed, i.e., payload is a pointer to some read-only memory area on
the heap which stores whether this is a RecV, PairV, InjLV or InjRV and the
...
...
@@ -155,7 +161,7 @@ Definition lit_is_unboxed (l: base_lit) : Prop :=
match
l
with
(** Disallow comparing (erased) prophecies with (erased) prophecies, by
considering them boxed. *)
|
LitProphecy
_
|
Lit
Erased
=>
False
|
LitProphecy
_
|
Lit
Poison
=>
False
|
_
=>
True
end
.
Definition
val_is_unboxed
(
v
:
val
)
:
Prop
:
=
...
...
@@ -261,14 +267,14 @@ Proof.
|
LitInt
n
=>
(
inl
(
inl
n
),
None
)
|
LitBool
b
=>
(
inl
(
inr
b
),
None
)
|
LitUnit
=>
(
inr
(
inl
false
),
None
)
|
Lit
Erased
=>
(
inr
(
inl
true
),
None
)
|
Lit
Poison
=>
(
inr
(
inl
true
),
None
)
|
LitLoc
l
=>
(
inr
(
inr
l
),
None
)
|
LitProphecy
p
=>
(
inr
(
inl
false
),
Some
p
)
end
)
(
λ
l
,
match
l
with
|
(
inl
(
inl
n
),
None
)
=>
LitInt
n
|
(
inl
(
inr
b
),
None
)
=>
LitBool
b
|
(
inr
(
inl
false
),
None
)
=>
LitUnit
|
(
inr
(
inl
true
),
None
)
=>
Lit
Erased
|
(
inr
(
inl
true
),
None
)
=>
Lit
Poison
|
(
inr
(
inr
l
),
None
)
=>
LitLoc
l
|
(
_
,
Some
p
)
=>
LitProphecy
p
end
)
_
)
;
by
intros
[].
...
...
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