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
Iris
RefinedC
Commits
a1f2afe5
Commit
a1f2afe5
authored
Jan 15, 2021
by
Rodolphe Lepigre
Browse files
Remove sugar for [value<v>].
parent
188fabd4
Pipeline
#40528
passed with stage
in 15 minutes and 2 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
ANNOTATIONS.md
View file @
a1f2afe5
...
@@ -545,7 +545,6 @@ There is some special support for predefined type constructors:
...
@@ -545,7 +545,6 @@ There is some special support for predefined type constructors:
does not have to deal with this directly, but there are cases where this is
does not have to deal with this directly, but there are cases where this is
necessary. For example, when recursive occurences of a type appear undear
necessary. For example, when recursive occurences of a type appear undear
an
`array`
type.
an
`array`
type.
-
`value<v>`
is sugar for
`value<LPtr, v>`
.
# Annotations using macros
# Annotations using macros
...
...
frontend/coq_pp.ml
View file @
a1f2afe5
...
@@ -625,15 +625,6 @@ and pp_type_expr_guard : unit pp option -> guard_mode -> type_expr pp =
...
@@ -625,15 +625,6 @@ and pp_type_expr_guard : unit pp option -> guard_mode -> type_expr pp =
Panic
.
panic_no_pos
"[%s] expects exactly one argument."
id
Panic
.
panic_no_pos
"[%s] expects exactly one argument."
id
in
in
fprintf
ff
"guarded %a %a"
with_uid
s
(
pp_arg
true
true
)
ty
;
fprintf
ff
"guarded %a %a"
with_uid
s
(
pp_arg
true
true
)
ty
;
|
"value"
->
let
(
ly
,
v
)
=
match
tyas
with
|
[
v
]
->
(
Ty_arg_expr
(
Ty_Coq
(
Coq_ident
(
"void*"
)))
,
v
)
|
[
ly
;
v
]
->
(
ly
,
v
)
|
_
->
Panic
.
panic_no_pos
"[%s] expects one or two argument."
id
in
fprintf
ff
"value %a %a"
(
pp_arg
true
true
)
ly
(
pp_arg
true
true
)
v
|
_
->
|
_
->
default
()
default
()
and
pp_arg
wrap
guarded
ff
tya
=
and
pp_arg
wrap
guarded
ff
tya
=
...
...
theories/typing/singleton.v
View file @
a1f2afe5
...
@@ -104,7 +104,6 @@ Section value.
...
@@ -104,7 +104,6 @@ Section value.
End
value
.
End
value
.
Notation
"value< ly , v >"
:
=
(
value
ly
v
)
(
only
printing
,
format
"'value<' ly ',' v '>'"
)
:
printing_sugar
.
Notation
"value< ly , v >"
:
=
(
value
ly
v
)
(
only
printing
,
format
"'value<' ly ',' v '>'"
)
:
printing_sugar
.
Notation
"value< v >"
:
=
(
value
void
*
v
)
(
only
printing
,
format
"'value<' v '>'"
)
:
printing_sugar
.
Section
place
.
Section
place
.
Context
`
{!
typeG
Σ
}.
Context
`
{!
typeG
Σ
}.
...
...
tutorial/proofs/t03_list/generated_proof_length_val.v
View file @
a1f2afe5
...
@@ -17,7 +17,7 @@ Section proof_length_val.
...
@@ -17,7 +17,7 @@ Section proof_length_val.
<[
"#1"
:
=
<[
"#1"
:
=
∃
v2
:
val
,
∃
v2
:
val
,
∃
l1
:
list
type
,
∃
l1
:
list
type
,
arg_p
◁ₗ
(
own_constrained
(
nonshr_constraint
(
v2
◁ᵥ
l1
@
list_t
))
(
value
void
*
(
v2
)))
∗
arg_p
◁ₗ
(
own_constrained
(
nonshr_constraint
(
v2
◁ᵥ
l1
@
list_t
))
(
value
(
void
*
)
(
v2
)))
∗
local_len
◁ₗ
((
length
l
-
length
l1
)
@
(
int
(
size_t
)))
∗
local_len
◁ₗ
((
length
l
-
length
l1
)
@
(
int
(
size_t
)))
∗
(
v
◁ᵥ
(
wand_val
(
void
*)
(
v2
◁ᵥ
l1
@
list_t
)
(
l
@
(
list_t
))))
(
v
◁ᵥ
(
wand_val
(
void
*)
(
v2
◁ᵥ
l1
@
list_t
)
(
l
@
(
list_t
))))
]>
$
]>
$
...
...
tutorial/proofs/t03_list/generated_spec.v
View file @
a1f2afe5
...
@@ -129,12 +129,12 @@ Section spec.
...
@@ -129,12 +129,12 @@ Section spec.
(* Specifications for function [length_val_rec]. *)
(* Specifications for function [length_val_rec]. *)
Definition
type_of_length_val_rec
:
=
Definition
type_of_length_val_rec
:
=
fn
(
∀
(
v
,
l
)
:
val
*
(
list
type
)
;
(
value
void
*
(
v
))
;
(
v
◁ᵥ
(
l
@
(
list_t
)))
∗
⌜
length
l
<=
max_int
size_t
⌝
)
fn
(
∀
(
v
,
l
)
:
val
*
(
list
type
)
;
(
value
(
void
*
)
(
v
))
;
(
v
◁ᵥ
(
l
@
(
list_t
)))
∗
⌜
length
l
<=
max_int
size_t
⌝
)
→
∃
()
:
(),
((
length
l
)
@
(
int
(
size_t
)))
;
(
v
◁ᵥ
(
l
@
(
list_t
))).
→
∃
()
:
(),
((
length
l
)
@
(
int
(
size_t
)))
;
(
v
◁ᵥ
(
l
@
(
list_t
))).
(* Specifications for function [length_val]. *)
(* Specifications for function [length_val]. *)
Definition
type_of_length_val
:
=
Definition
type_of_length_val
:
=
fn
(
∀
(
v
,
l
)
:
val
*
(
list
type
)
;
(
value
void
*
(
v
))
;
(
v
◁ᵥ
l
@
list_t
)
∗
⌜
length
l
<=
max_int
size_t
⌝
)
fn
(
∀
(
v
,
l
)
:
val
*
(
list
type
)
;
(
value
(
void
*
)
(
v
))
;
(
v
◁ᵥ
l
@
list_t
)
∗
⌜
length
l
<=
max_int
size_t
⌝
)
→
∃
()
:
(),
((
length
l
)
@
(
int
(
size_t
)))
;
(
v
◁ᵥ
l
@
list_t
).
→
∃
()
:
(),
((
length
l
)
@
(
int
(
size_t
)))
;
(
v
◁ᵥ
l
@
list_t
).
(* Specifications for function [append]. *)
(* Specifications for function [append]. *)
...
...
tutorial/t03_list.c
View file @
a1f2afe5
...
@@ -98,7 +98,7 @@ size_t length (list_t *p) {
...
@@ -98,7 +98,7 @@ size_t length (list_t *p) {
}
}
[[
rc
::
parameters
(
"v : val"
,
"l : {list type}"
)]]
[[
rc
::
parameters
(
"v : val"
,
"l : {list type}"
)]]
[[
rc
::
args
(
"value<v>"
)]]
[[
rc
::
args
(
"value<
void*,
v>"
)]]
[[
rc
::
requires
(
"v : l @ list_t"
)]]
[[
rc
::
requires
(
"v : l @ list_t"
)]]
[[
rc
::
requires
(
"{length l <= max_int size_t}"
)]]
[[
rc
::
requires
(
"{length l <= max_int size_t}"
)]]
[[
rc
::
returns
(
"{length l} @ int<size_t>"
)]]
[[
rc
::
returns
(
"{length l} @ int<size_t>"
)]]
...
@@ -111,7 +111,7 @@ size_t length_val_rec (list_t p) {
...
@@ -111,7 +111,7 @@ size_t length_val_rec (list_t p) {
}
}
[[
rc
::
parameters
(
"v : val"
,
"l : {list type}"
)]]
[[
rc
::
parameters
(
"v : val"
,
"l : {list type}"
)]]
[[
rc
::
args
(
"value<v>"
)]]
[[
rc
::
args
(
"value<
void*,
v>"
)]]
[[
rc
::
requires
(
"[v ◁ᵥ l @ list_t]"
)]]
[[
rc
::
requires
(
"[v ◁ᵥ l @ list_t]"
)]]
[[
rc
::
requires
(
"{length l <= max_int size_t}"
)]]
[[
rc
::
requires
(
"{length l <= max_int size_t}"
)]]
[[
rc
::
returns
(
"{length l} @ int<size_t>"
)]]
[[
rc
::
returns
(
"{length l} @ int<size_t>"
)]]
...
@@ -119,7 +119,7 @@ size_t length_val_rec (list_t p) {
...
@@ -119,7 +119,7 @@ size_t length_val_rec (list_t p) {
size_t
length_val
(
list_t
p
)
{
size_t
length_val
(
list_t
p
)
{
size_t
len
=
0
;
size_t
len
=
0
;
[[
rc
::
exists
(
"v2 : val"
,
"l1 : {list type}"
)]]
[[
rc
::
exists
(
"v2 : val"
,
"l1 : {list type}"
)]]
[[
rc
::
inv_vars
(
"p : own_constrained<nonshr_constraint<{v2 ◁ᵥ l1 @ list_t}>, value<v2>>"
,
[[
rc
::
inv_vars
(
"p : own_constrained<nonshr_constraint<{v2 ◁ᵥ l1 @ list_t}>, value<
void*,
v2>>"
,
"len : {length l - length l1} @ int<size_t>"
)]]
"len : {length l - length l1} @ int<size_t>"
)]]
[[
rc
::
constraints
(
"v : wand_val<void*, {v2 ◁ᵥ l1 @ list_t}, l @ list_t>"
)]]
[[
rc
::
constraints
(
"v : wand_val<void*, {v2 ◁ᵥ l1 @ list_t}, l @ list_t>"
)]]
while
(
p
!=
NULL
)
{
while
(
p
!=
NULL
)
{
...
...
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