Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
POTTIER Francois
menhir
Commits
4b3b8c9f
Commit
4b3b8c9f
authored
Oct 22, 2015
by
POTTIER Francois
Browse files
Renamed "cumulated star size" to "total star size".
parent
a2d27552
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/LRijkstra.ml
View file @
4b3b8c9f
...
...
@@ -265,9 +265,9 @@ module Trie : sig
of the trie that has been constructed for state [s]. *)
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. *)
val
cumulated
_size
:
unit
->
int
val
total
_size
:
unit
->
int
(* 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
...
...
@@ -430,7 +430,7 @@ end = struct
assert
(
size
.
(
s
)
>=
0
);
size
.
(
s
)
let
cumulated
_size
()
=
let
total
_size
()
=
!
c
let
compare
t1
t2
=
...
...
@@ -449,7 +449,7 @@ end = struct
SymbolMap
.
find
a
t
.
transitions
(* careful: may raise [Not_found] *)
let
verbose
()
=
Printf
.
eprintf
"
Cumulated
star size: %d
\n
%!"
(
cumulated
_size
()
)
Printf
.
eprintf
"
Total
star size: %d
\n
%!"
(
total
_size
()
)
let
decode
i
=
let
t
=
MenhirLib
.
InfiniteArray
.
get
tries
i
in
...
...
@@ -499,7 +499,7 @@ let dummy : fact =
(* 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
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 for [lookahead], 30 bits for [word], and 25 bits for [position]. We
could support 32-bit machines too, but that is probably pointless. *)
...
...
@@ -1340,8 +1340,8 @@ let () =
end
(* Automaton size (i.e., number of states). *)
Lr1
.
n
(*
Cumulated
trie size. *)
(
Trie
.
cumulated
_size
()
)
(*
Total
trie size. *)
(
Trie
.
total
_size
()
)
(* Size of [F]. *)
(
F
.
size
()
)
(* 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