Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
frama-c
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
pub
frama-c
Commits
8dc7935d
Commit
8dc7935d
authored
5 years ago
by
Allan Blanchard
Browse files
Options
Downloads
Patches
Plain Diff
[wp] Supports sqrt/f
parent
ecfeaf24
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/plugins/wp/Cfloat.ml
+9
-0
9 additions, 0 deletions
src/plugins/wp/Cfloat.ml
with
9 additions
and
0 deletions
src/plugins/wp/Cfloat.ml
+
9
−
0
View file @
8dc7935d
...
@@ -57,6 +57,7 @@ let fq64 = extern_f ~library ~result:t64 ~link:(link "to_f64") "q64"
...
@@ -57,6 +57,7 @@ let fq64 = extern_f ~library ~result:t64 ~link:(link "to_f64") "q64"
let
f_model
ft
=
extern_f
~
library
~
result
:
(
ftau
ft
)
"model_%a"
pp_suffix
ft
let
f_model
ft
=
extern_f
~
library
~
result
:
(
ftau
ft
)
"model_%a"
pp_suffix
ft
let
f_delta
ft
=
extern_f
~
library
~
result
:
(
ftau
ft
)
"delta_%a"
pp_suffix
ft
let
f_delta
ft
=
extern_f
~
library
~
result
:
(
ftau
ft
)
"delta_%a"
pp_suffix
ft
let
f_epsilon
ft
=
extern_f
~
library
~
result
:
(
ftau
ft
)
"epsilon_%a"
pp_suffix
ft
let
f_epsilon
ft
=
extern_f
~
library
~
result
:
(
ftau
ft
)
"epsilon_%a"
pp_suffix
ft
let
f_sqrt
ft
=
extern_f
~
library
~
result
:
(
ftau
ft
)
"sqrt_%a"
pp_suffix
ft
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(* --- Model Setting --- *)
(* --- Model Setting --- *)
...
@@ -385,12 +386,20 @@ let () = Context.register
...
@@ -385,12 +386,20 @@ let () = Context.register
(* --- Models --- *)
(* --- Models --- *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
let
register_c_acsl_builtin
name
lfun
ft
=
let
name
=
match
ft
with
|
Float32
->
name
^
"f"
|
Float64
->
name
in
LogicBuiltins
.
add_builtin
name
[
F
ft
]
(
lfun
ft
)
let
()
=
let
()
=
let
open
LogicBuiltins
in
let
open
LogicBuiltins
in
let
register_builtin
ft
=
let
register_builtin
ft
=
add_builtin
"
\\
model"
[
F
ft
]
(
f_model
ft
)
;
add_builtin
"
\\
model"
[
F
ft
]
(
f_model
ft
)
;
add_builtin
"
\\
delta"
[
F
ft
]
(
f_delta
ft
)
;
add_builtin
"
\\
delta"
[
F
ft
]
(
f_delta
ft
)
;
add_builtin
"
\\
epsilon"
[
F
ft
]
(
f_epsilon
ft
)
;
add_builtin
"
\\
epsilon"
[
F
ft
]
(
f_epsilon
ft
)
;
register_c_acsl_builtin
"sqrt"
f_sqrt
ft
in
in
register_builtin
Float32
;
register_builtin
Float32
;
register_builtin
Float64
register_builtin
Float64
...
...
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