Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iGPS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
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
FP
iGPS
Merge requests
!2
Coq8.6 is also compatible with 8.5 - make it the new master
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Coq8.6 is also compatible with 8.5 - make it the new master
coq8.6
into
master
Overview
0
Commits
75
Pipelines
0
Changes
34
Merged
Janno
requested to merge
coq8.6
into
master
8 years ago
Overview
0
Commits
75
Pipelines
0
Changes
34
Expand
[No text]
0
0
Merge request reports
Compare
master
master (base)
and
latest version
latest version
f493010c
75 commits,
8 years ago
34 files
+
4267
−
3969
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
34
Search (e.g. *.vue) (Ctrl+P)
coq/ra/examples/circ_buffer.v
0 → 100644
+
46
−
0
Options
From
iris
.
program_logic
Require
Export
weakestpre
.
From
iris
.
proofmode
Require
Import
tactics
.
From
ra
Require
Export
notation
foundational
alloc
repeat
.
Import
uPred
.
Section
CircBuffer
.
Context
(
n
:
positive
).
Local
Notation
wi
:=
#
0.
Local
Notation
ri
:=
#
1.
Local
Notation
b
:=
#
2.
Definition
newBuffer
:
base
.
val
:=
λ
:
<>
,
let:
"q"
:=
malloc
(#(
Z
.
pos
n
)
+
#
2
)
in
[
"q"
+
ri
]
_
na
<-
#
0
;;
[
"q"
+
wi
]
_
na
<-
#
0
;;
"q"
.
Definition
tryProd
:
base
.
val
:=
λ
:
"q"
"x"
,
let:
"w"
:=
[
"q"
+
wi
]
_
at
in
let:
"r"
:=
[
"q"
+
ri
]
_
at
in
let:
"w'"
:=
(
"w"
+
#
1
)
`mod
`
#(
Z
.
pos
n
)
in
if:
"w'"
=
"r"
then
#
0
else
[
"q"
+
b
+
"w"
]
_
na
<-
"x"
;;
[
"q"
+
wi
]
_
at
<-
"w'"
;;
#
1.
Definition
tryCons
:
base
.
val
:=
λ
:
"q"
,
let:
"w"
:=
[
"q"
+
wi
]
_
at
in
let:
"r"
:=
[
"q"
+
ri
]
_
at
in
if:
"w"
=
"r"
then
#
0
else
let:
"x"
:=
[
"q"
+
b
+
"r"
]
_
na
in
[
"q"
+
ri
]
_
at
<-
(
"r"
+
#
1
)
`mod
`
#(
Z
.
pos
n
)
;;
"x"
.
End
CircBuffer
.
\ No newline at end of file
Loading