Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Lustrec - public version
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
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
LustreC
Lustrec - public version
Commits
08faae63
Commit
08faae63
authored
6 years ago
by
Pierre Loic Garoche
Browse files
Options
Downloads
Patches
Plain Diff
NumMartel functions
parent
b068041a
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/salsa/salsaDatatypes.ml
+7
-3
7 additions, 3 deletions
src/plugins/salsa/salsaDatatypes.ml
with
7 additions
and
3 deletions
src/plugins/salsa/salsaDatatypes.ml
+
7
−
3
View file @
08faae63
...
...
@@ -6,6 +6,8 @@ module Float = Salsa.Float
let
debug
=
ref
false
(* let _ = Salsa.Prelude.sliceSize := 1000 *)
let
pp_hash
~
sep
f
fmt
r
=
Format
.
fprintf
fmt
"[@[<v>"
;
Hashtbl
.
iter
(
fun
k
v
->
Format
.
fprintf
fmt
"%t%s@ "
(
f
k
v
)
sep
)
r
;
...
...
@@ -91,8 +93,8 @@ struct
ST.(I(min x1 x1', max x2 x2'), J(min y1 y1', max y2 y2'))
| _ -> Format.eprintf "%a cup %a failed@.@?" pp v1 pp v2; assert false
*)
let
inject
cst
=
match
cst
with
(* ATTENTION ATTENTION !!!!! Remettre les Num !!!! *)
|
LT
.
Const_int
(
i
)
->
Salsa
.
Builder
.
mk_cst
(
ST
.
R
(
float_of_int
i
(*Num.num_
of_int i
*)
,
[]
)
,
ST
.
R
(
float_of_int
i
(*Num.num_
of_int i
*)
,
[]
))
let
inject
cst
=
match
cst
with
|
LT
.
Const_int
(
i
)
->
Salsa
.
Builder
.
mk_cst
(
ST
.
R
(
Salsa
.
NumMartel
.
of_int
i
,
[]
)
,
ST
.
R
(
Salsa
.
NumMartel
.
of_int
i
,
[]
))
|
LT
.
Const_real
(
c
,
e
,
s
)
->
(* TODO: this is incorrect. We should rather
compute the error associated to the float *)
let
r
=
float_of_string
s
in
...
...
@@ -203,7 +205,9 @@ module VarEnv = Map.Make (struct type t = LT.ident let compare = compare end )
let
get_var
vars_env
v
=
try
VarEnv
.
find
v
vars_env
with
Not_found
->
Format
.
eprintf
"Impossible to find var %s@.@?"
v
;
assert
false
with
Not_found
->
Format
.
eprintf
"Impossible to find var %s in var env %a@.@?"
v
(
Utils
.
fprintf_list
~
sep
:
", "
(
fun
fmt
(
id
,
_
)
->
Format
.
pp_print_string
fmt
id
))
(
VarEnv
.
bindings
vars_env
)
;
assert
false
let
compute_vars_env
m
=
let
env
=
VarEnv
.
empty
in
...
...
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