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
ccf74b05
Commit
ccf74b05
authored
9 years ago
by
Robbert Krebbers
Browse files
Options
Downloads
Patches
Plain Diff
Improve indentation.
parent
86dec2b6
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
heap_lang/par.v
+5
-4
5 additions, 4 deletions
heap_lang/par.v
heap_lang/spawn.v
+8
-4
8 additions, 4 deletions
heap_lang/spawn.v
with
13 additions
and
8 deletions
heap_lang/par.v
+
5
−
4
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. *)
...
...
This diff is collapsed.
Click to expand it.
heap_lang/spawn.v
+
8
−
4
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. *)
...
...
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