Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
why3
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
119
Issues
119
List
Boards
Labels
Service Desk
Milestones
Merge Requests
16
Merge Requests
16
Operations
Operations
Incidents
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Why3
why3
Commits
fe790130
Commit
fe790130
authored
Apr 20, 2020
by
Cláudio Belo Lourenço
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert "Documentation about the introduction of attributes in the API"
This reverts commit
1f45ff36
.
parent
f5deafd9
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
7 deletions
+4
-7
examples/use_api/mlw_expr.ml
examples/use_api/mlw_expr.ml
+2
-3
examples/use_api/mlw_tree.ml
examples/use_api/mlw_tree.ml
+2
-4
No files found.
examples/use_api/mlw_expr.ml
View file @
fe790130
...
...
@@ -28,7 +28,7 @@ let env : Env.env = Env.create_env (Whyconf.loadpath main)
declaration of
BEGIN{source2}
let f2
[@foo]
() : int
let f2 () : int
requires { true }
ensures { result >= 0 }
= let x = ref 42 in !x
...
...
@@ -63,8 +63,7 @@ let get_fun : Expr.rsymbol =
(* BEGIN{code2} *)
let
d2
=
let
attrs
=
Ident
.(
Sattr
.
singleton
(
create_attribute
"foo"
))
in
let
id
=
Ident
.
id_fresh
~
attrs
"f"
in
let
id
=
Ident
.
id_fresh
"f"
in
let
post
=
let
result
=
Term
.
create_vsymbol
(
Ident
.
id_fresh
"result"
)
Ty
.
ty_int
...
...
examples/use_api/mlw_tree.ml
View file @
fe790130
...
...
@@ -96,7 +96,7 @@ let mod_M1 =
(* declaration of
BEGIN{source2}
module M2
let f
[@foo]
(x:int) : int
let f (x:int) : int
requires { x=6 }
ensures { result=42 }
= x*7
...
...
@@ -137,9 +137,7 @@ let mod_M2 =
Efun
(
param1
id_x
int_type
,
None
,
mk_pat
Pwild
,
Ity
.
MaskVisible
,
spec
,
body
)
in
let
attr
=
ATstr
(
Ident
.
create_attribute
"foo"
)
in
let
id
=
{
(
mk_ident
"f"
)
with
id_ats
=
[
attr
]
}
in
Dlet
(
id
,
false
,
Expr
.
RKnone
,
mk_expr
f
)
Dlet
(
mk_ident
"f"
,
false
,
Expr
.
RKnone
,
mk_expr
f
)
in
(
mk_ident
"M2"
,
[
use_int_Int
;
f
])
(* END{code2} *)
...
...
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