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
F
Fairis
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Iris
Fairis
Commits
ccf74b05
Commit
ccf74b05
authored
Mar 05, 2016
by
Robbert Krebbers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Improve indentation.
parent
86dec2b6
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
8 deletions
+13
-8
heap_lang/par.v
heap_lang/par.v
+5
-4
heap_lang/spawn.v
heap_lang/spawn.v
+8
-4
No files found.
heap_lang/par.v
View file @
ccf74b05
...
...
@@ -3,10 +3,11 @@ From heap_lang Require Import wp_tactics notation.
Import
uPred
.
Definition
par
:
val
:=
λ
:
"fs"
,
let
:
"handle"
:=
^
spawn
(
Fst
'
"fs"
)
in
let:
"v2"
:=
Snd
'
"fs"
#()
in
let:
"v1"
:=
^
join
'
"handle"
in
Pair
'
"v1"
'
"v2"
.
λ
:
"fs"
,
let:
"handle"
:=
^
spawn
(
Fst
'
"fs"
)
in
let:
"v2"
:=
Snd
'
"fs"
#()
in
let:
"v1"
:=
^
join
'
"handle"
in
Pair
'
"v1"
'
"v2"
.
Notation
Par
e1
e2
:=
(
^
par
(
Pair
(
λ
:
<>
,
e1
)
(
λ
:
<>
,
e2
)))
%
E
.
Notation
ParV
e1
e2
:=
(
par
(
Pair
(
λ
:
<>
,
e1
)
(
λ
:
<>
,
e2
)))
%
E
.
(
*
We
want
both
par
and
par
^
to
print
like
this
.
*
)
...
...
heap_lang/spawn.v
View file @
ccf74b05
...
...
@@ -4,11 +4,15 @@ From heap_lang Require Import wp_tactics notation.
Import
uPred
.
Definition
spawn
:
val
:=
λ
:
"f"
,
let
:
"c"
:=
ref
(
InjL
#
0
)
in
Fork
(
'
"c"
<-
InjR
(
'
"f"
#()))
;;
'
"c"
.
λ
:
"f"
,
let:
"c"
:=
ref
(
InjL
#
0
)
in
Fork
(
'
"c"
<-
InjR
(
'
"f"
#()))
;;
'
"c"
.
Definition
join
:
val
:=
rec:
"join"
"c"
:=
match
:
!
'
"c"
with
InjR
"x"
=>
'
"x"
|
InjL
<>
=>
'
"join"
'
"c"
end
.
rec:
"join"
"c"
:=
match:
!
'
"c"
with
InjR
"x"
=>
'
"x"
|
InjL
<>
=>
'
"join"
'
"c"
end
.
(
**
The
monoids
we
need
.
*
)
(
*
Not
bundling
heapG
,
as
it
may
be
shared
with
other
users
.
*
)
...
...
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