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
M
menhir
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
13
Issues
13
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
POTTIER Francois
menhir
Commits
4b3b8c9f
Commit
4b3b8c9f
authored
Oct 22, 2015
by
POTTIER Francois
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Renamed "cumulated star size" to "total star size".
parent
a2d27552
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
src/LRijkstra.ml
src/LRijkstra.ml
+7
-7
No files found.
src/LRijkstra.ml
View file @
4b3b8c9f
...
@@ -265,9 +265,9 @@ module Trie : sig
...
@@ -265,9 +265,9 @@ module Trie : sig
of the trie that has been constructed for state [s]. *)
of the trie that has been constructed for state [s]. *)
val
size
:
int
->
int
val
size
:
int
->
int
(* After [star] has been called a number of times, [
cumulated
_size()]
(* After [star] has been called a number of times, [
total
_size()]
reports the total size of the tries that have been constructed. *)
reports the total size of the tries that have been constructed. *)
val
cumulated
_size
:
unit
->
int
val
total
_size
:
unit
->
int
(* Every (sub-)trie has a unique identity. (One can think of it as its
(* Every (sub-)trie has a unique identity. (One can think of it as its
address.) [compare] compares the identity of two tries. This can be
address.) [compare] compares the identity of two tries. This can be
...
@@ -430,7 +430,7 @@ end = struct
...
@@ -430,7 +430,7 @@ end = struct
assert
(
size
.
(
s
)
>=
0
);
assert
(
size
.
(
s
)
>=
0
);
size
.
(
s
)
size
.
(
s
)
let
cumulated
_size
()
=
let
total
_size
()
=
!
c
!
c
let
compare
t1
t2
=
let
compare
t1
t2
=
...
@@ -449,7 +449,7 @@ end = struct
...
@@ -449,7 +449,7 @@ end = struct
SymbolMap
.
find
a
t
.
transitions
(* careful: may raise [Not_found] *)
SymbolMap
.
find
a
t
.
transitions
(* careful: may raise [Not_found] *)
let
verbose
()
=
let
verbose
()
=
Printf
.
eprintf
"
Cumulated star size: %d
\n
%!"
(
cumulated
_size
()
)
Printf
.
eprintf
"
Total star size: %d
\n
%!"
(
total
_size
()
)
let
decode
i
=
let
decode
i
=
let
t
=
MenhirLib
.
InfiniteArray
.
get
tries
i
in
let
t
=
MenhirLib
.
InfiniteArray
.
get
tries
i
in
...
@@ -499,7 +499,7 @@ let dummy : fact =
...
@@ -499,7 +499,7 @@ let dummy : fact =
(* The lookahead symbol fits in 8 bits. In the largest grammars that we have
(* The lookahead symbol fits in 8 bits. In the largest grammars that we have
seen, the number of unique words is about 3.10^5, so a word should fit in
seen, the number of unique words is about 3.10^5, so a word should fit in
about 19 bits (2^19 = 524288). In the largest grammars that we have seen,
about 19 bits (2^19 = 524288). In the largest grammars that we have seen,
the
cumulated
star size is about 64000, so a trie should fit in about 17
the
total
star size is about 64000, so a trie should fit in about 17
bits (2^17 = 131072). We have ample space in a 63-bit word! We allocate 8
bits (2^17 = 131072). We have ample space in a 63-bit word! We allocate 8
bits for [lookahead], 30 bits for [word], and 25 bits for [position]. We
bits for [lookahead], 30 bits for [word], and 25 bits for [position]. We
could support 32-bit machines too, but that is probably pointless. *)
could support 32-bit machines too, but that is probably pointless. *)
...
@@ -1340,8 +1340,8 @@ let () =
...
@@ -1340,8 +1340,8 @@ let () =
end
end
(* Automaton size (i.e., number of states). *)
(* Automaton size (i.e., number of states). *)
Lr1
.
n
Lr1
.
n
(*
Cumulated
trie size. *)
(*
Total
trie size. *)
(
Trie
.
cumulated
_size
()
)
(
Trie
.
total
_size
()
)
(* Size of [F]. *)
(* Size of [F]. *)
(
F
.
size
()
)
(
F
.
size
()
)
(* Size of [E]. *)
(* Size of [E]. *)
...
...
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