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
f138827c
Commit
f138827c
authored
1 year ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[Kernel] Persistent array: slightly simplifies [pretty] function.
Uses the same convention as Pretty_utils.
parent
ef7261d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
src/kernel_services/analysis/filter/linear.ml
+1
-2
1 addition, 2 deletions
src/kernel_services/analysis/filter/linear.ml
src/libraries/utils/parray.ml
+2
-2
2 additions, 2 deletions
src/libraries/utils/parray.ml
src/libraries/utils/parray.mli
+1
-1
1 addition, 1 deletion
src/libraries/utils/parray.mli
with
4 additions
and
5 deletions
src/kernel_services/analysis/filter/linear.ml
+
1
−
2
View file @
f138827c
...
@@ -38,8 +38,7 @@ module Space (Field : Field.S) = struct
...
@@ -38,8 +38,7 @@ module Space (Field : Field.S) = struct
module
Vector
=
struct
module
Vector
=
struct
let
pretty
(
type
n
)
fmt
(
M
{
data
;
_
}
:
n
vector
)
=
let
pretty
(
type
n
)
fmt
(
M
{
data
;
_
}
:
n
vector
)
=
let
pp_sep
fmt
()
=
Format
.
fprintf
fmt
"@ "
in
Parray
.
pretty
~
sep
:
"@ "
Field
.
pretty
fmt
data
Parray
.
pretty
~
pp_sep
Field
.
pretty
fmt
data
let
init
size
f
=
let
init
size
f
=
let
data
=
Parray
.
init
(
Nat
.
to_int
size
)
(
fun
_
->
Field
.
zero
)
in
let
data
=
Parray
.
init
(
Nat
.
to_int
size
)
(
fun
_
->
Field
.
zero
)
in
...
...
This diff is collapsed.
Click to expand it.
src/libraries/utils/parray.ml
+
2
−
2
View file @
f138827c
...
@@ -36,10 +36,10 @@ let rec reroot t =
...
@@ -36,10 +36,10 @@ let rec reroot t =
t'
:=
Diff
(
i
,
v'
,
t
)
;
t'
:=
Diff
(
i
,
v'
,
t
)
;
mem
mem
let
pretty
?
(
pp_
sep
=
F
ormat
.
pp_print_space
)
pp
fmt
t
=
let
pretty
?
(
sep
=
f
ormat
_of_string
" "
)
pp
fmt
t
=
let
mem
=
reroot
t
in
let
mem
=
reroot
t
in
for
i
=
0
to
Array
.
length
mem
-
1
do
for
i
=
0
to
Array
.
length
mem
-
1
do
if
i
>
0
then
pp_sep
fmt
()
;
if
i
>
0
then
Format
.
fprintf
fmt
sep
;
pp
fmt
mem
.
(
i
)
pp
fmt
mem
.
(
i
)
done
done
...
...
This diff is collapsed.
Click to expand it.
src/libraries/utils/parray.mli
+
1
−
1
View file @
f138827c
...
@@ -33,6 +33,6 @@ val fold : (int -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
...
@@ -33,6 +33,6 @@ val fold : (int -> 'a -> 'b -> 'b) -> 'a t -> 'b -> 'b
val
map
:
(
'
a
->
'
a
)
->
'
a
t
->
'
a
t
val
map
:
(
'
a
->
'
a
)
->
'
a
t
->
'
a
t
val
pretty
:
val
pretty
:
?
pp_
sep
:
(
Format
.
formatter
->
unit
->
unit
)
->
?
sep
:
Pretty_utils
.
sformat
->
(
Format
.
formatter
->
'
a
->
unit
)
->
(
Format
.
formatter
->
'
a
->
unit
)
->
Format
.
formatter
->
'
a
t
->
unit
Format
.
formatter
->
'
a
t
->
unit
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