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
93771ae6
Commit
93771ae6
authored
4 years ago
by
David Bühler
Browse files
Options
Downloads
Patches
Plain Diff
[server] Data: fixes the signature of functors for indexed values.
These functors only require a 'kind' string.
parent
a75b4445
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
src/plugins/server/data.ml
+11
-7
11 additions, 7 deletions
src/plugins/server/data.ml
src/plugins/server/data.mli
+9
-6
9 additions, 6 deletions
src/plugins/server/data.mli
with
20 additions
and
13 deletions
src/plugins/server/data.ml
+
11
−
7
View file @
93771ae6
...
@@ -565,6 +565,11 @@ end
...
@@ -565,6 +565,11 @@ end
(* --- Index --- *)
(* --- Index --- *)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
module
type
Info
=
sig
val
kind
:
string
end
(** Simplified [Map.S] *)
(** Simplified [Map.S] *)
module
type
Map
=
module
type
Map
=
sig
sig
...
@@ -584,7 +589,7 @@ sig
...
@@ -584,7 +589,7 @@ sig
val
clear
:
unit
->
unit
val
clear
:
unit
->
unit
end
end
module
INDEXER
(
M
:
Map
)(
D
:
S
)(
I
:
Index
with
type
t
=
D
.
t
)
:
module
INDEXER
(
M
:
Map
)(
I
:
Info
)
:
sig
sig
type
index
type
index
val
create
:
unit
->
index
val
create
:
unit
->
index
...
@@ -634,10 +639,10 @@ struct
...
@@ -634,10 +639,10 @@ struct
end
end
module
Static
(
M
:
Map
)(
S
:
S
)(
I
:
Index
with
type
t
=
S
.
t
)
module
Static
(
M
:
Map
)(
I
:
Info
)
:
Index
with
type
t
=
M
.
key
=
:
Index
with
type
t
=
M
.
key
=
struct
struct
module
INDEX
=
INDEXER
(
M
)(
S
)(
I
)
module
INDEX
=
INDEXER
(
M
)(
I
)
let
kind
=
I
.
kind
let
kind
=
I
.
kind
let
index
=
INDEX
.
create
()
let
index
=
INDEX
.
create
()
let
clear
()
=
INDEX
.
clear
index
let
clear
()
=
INDEX
.
clear
index
...
@@ -652,10 +657,10 @@ struct
...
@@ -652,10 +657,10 @@ struct
end
)
end
)
end
end
module
Index
(
M
:
Map
)(
S
:
S
)(
I
:
Index
with
type
t
=
S
.
t
)
module
Index
(
M
:
Map
)(
I
:
Info
)
:
Index
with
type
t
=
M
.
key
=
:
Index
with
type
t
=
M
.
key
=
struct
struct
module
INDEX
=
INDEXER
(
M
)(
S
)(
I
)
module
INDEX
=
INDEXER
(
M
)(
I
)
module
TYPE
:
Datatype
.
S
with
type
t
=
INDEX
.
index
=
module
TYPE
:
Datatype
.
S
with
type
t
=
INDEX
.
index
=
Datatype
.
Make
Datatype
.
Make
(
struct
(
struct
...
@@ -695,8 +700,7 @@ sig
...
@@ -695,8 +700,7 @@ sig
val
id
:
t
->
int
val
id
:
t
->
int
end
end
module
Identified
(
A
:
IdentifiedType
)(
S
:
S
)
module
Identified
(
A
:
IdentifiedType
)(
I
:
Info
)
:
Index
with
type
t
=
A
.
t
=
(
I
:
Index
with
type
t
=
S
.
t
)
:
Index
with
type
t
=
A
.
t
=
struct
struct
type
index
=
(
int
,
A
.
t
)
Hashtbl
.
t
type
index
=
(
int
,
A
.
t
)
Hashtbl
.
t
...
...
This diff is collapsed.
Click to expand it.
src/plugins/server/data.mli
+
9
−
6
View file @
93771ae6
...
@@ -323,6 +323,12 @@ end
...
@@ -323,6 +323,12 @@ end
*)
*)
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(** Datatype information. *)
module
type
Info
=
sig
val
kind
:
string
end
(** Simplified [Map.S]. *)
(** Simplified [Map.S]. *)
module
type
Map
=
module
type
Map
=
sig
sig
...
@@ -345,12 +351,10 @@ sig
...
@@ -345,12 +351,10 @@ sig
end
end
(** Builds an indexer that {i does not} depend on current project. *)
(** Builds an indexer that {i does not} depend on current project. *)
module
Static
(
M
:
Map
)(
S
:
S
)
module
Static
(
M
:
Map
)(
I
:
Info
)
:
Index
with
type
t
=
M
.
key
(
I
:
Index
with
type
t
=
S
.
t
)
:
Index
with
type
t
=
M
.
key
(** Builds a {i projectified} index. *)
(** Builds a {i projectified} index. *)
module
Index
(
M
:
Map
)(
S
:
S
)
module
Index
(
M
:
Map
)(
I
:
Info
)
:
Index
with
type
t
=
M
.
key
(
I
:
Index
with
type
t
=
S
.
t
)
:
Index
with
type
t
=
M
.
key
(** Datatype already identified by unique integers. *)
(** Datatype already identified by unique integers. *)
module
type
IdentifiedType
=
module
type
IdentifiedType
=
...
@@ -360,8 +364,7 @@ sig
...
@@ -360,8 +364,7 @@ sig
end
end
(** Builds a {i projectified} index on types with {i unique} identifiers. *)
(** Builds a {i projectified} index on types with {i unique} identifiers. *)
module
Identified
(
A
:
IdentifiedType
)(
S
:
S
)
module
Identified
(
A
:
IdentifiedType
)(
I
:
Info
)
:
Index
with
type
t
=
A
.
t
(
I
:
Index
with
type
t
=
S
.
t
)
:
Index
with
type
t
=
A
.
t
(* -------------------------------------------------------------------------- *)
(* -------------------------------------------------------------------------- *)
(** {2 Error handling}
(** {2 Error handling}
...
...
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