@@ -63,8 +63,10 @@ Uses of values Y.x and Z.y (in b.ml) are not counted since they come from a "loc
6363
6464 $ occurrences_print main__. occ | sort
6565
66+ A only uses " persistent" values : one it defines itself.
6667 $ occurrences_print main__A. occ | sort
6768
69+ " Aliased" values are not counted since they become persistent
6870 $ occurrences_print main__B. occ | sort
6971 Main was used directly 0 times and indirectly 7 times
7072 Main. A was used directly 2 times and indirectly 5 times
@@ -73,12 +75,13 @@ Uses of values Y.x and Z.y (in b.ml) are not counted since they come from a "loc
7375 Main. A. t was used directly 1 times and indirectly 0 times
7476 Main. A. x was used directly 1 times and indirectly 0 times
7577
78+ " Aliased" values are not counted since they become persistent
7679 $ occurrences_print main__C. occ | sort
7780 Main was used directly 0 times and indirectly 2 times
7881 Main. A was used directly 1 times and indirectly 1 times
7982 Main. A. x was used directly 1 times and indirectly 0 times
8083
81- Now we can merge both files
84+ Now we can merge all tables
8285
8386 $ cat > files. map << EOF
8487 > main__A. occ
@@ -87,7 +90,8 @@ Now we can merge both files
8790 > EOF
8891 $ odoc aggregate-occurrences main. occ main__. occ -- file-list files. map -o aggregated. txt
8992
90- $ occurrences_print aggregated. txt | sort
93+ $ occurrences_print aggregated. txt | sort > all_merged
94+ $ cat all_merged
9195 Main was used directly 0 times and indirectly 11 times
9296 Main. A was used directly 4 times and indirectly 6 times
9397 Main. A. (|| > ) was used directly 1 times and indirectly 0 times
@@ -99,41 +103,14 @@ Now we can merge both files
99103Compare with the one created directly with all occurrences:
100104
101105 $ odoc count-occurrences -I . -o occurrences. txt
102- $ occurrences_print occurrences. txt | sort
103- Main was used directly 0 times and indirectly 11 times
104- Main. A was used directly 4 times and indirectly 6 times
105- Main. A. (|| > ) was used directly 1 times and indirectly 0 times
106- Main. A. M was used directly 2 times and indirectly 0 times
107- Main. A. t was used directly 1 times and indirectly 0 times
108- Main. A. x was used directly 2 times and indirectly 0 times
109- Main. B was used directly 1 times and indirectly 0 times
106+ $ occurrences_print occurrences. txt | sort > directly_all
107+ $ diff all_merged directly_all
110108
111- We can also include persistent ids, and hidden ids:
112-
113- $ odoc count-occurrences -I main__A -o occurrences. txt -- include-own
114- $ occurrences_print occurrences. txt | sort
115- string was used directly 1 times and indirectly 0 times
109+ We can also include hidden ids:
116110
117111 $ odoc count-occurrences -I main__A -o occurrences. txt -- include-hidden
118112 $ occurrences_print occurrences. txt | sort
119113
120- $ odoc count-occurrences -I main__A -o occurrences. txt -- include-own -- include-hidden
121- $ occurrences_print occurrences. txt | sort
122- Main__A was used directly 0 times and indirectly 2 times
123- Main__A. x was used directly 2 times and indirectly 0 times
124- string was used directly 1 times and indirectly 0 times
125-
126- $ odoc count-occurrences -I . -o occurrences. txt -- include-own
127- $ occurrences_print occurrences. txt | sort
128- Main was used directly 0 times and indirectly 13 times
129- Main. A was used directly 4 times and indirectly 8 times
130- Main. A. (|| > ) was used directly 1 times and indirectly 0 times
131- Main. A. M was used directly 2 times and indirectly 0 times
132- Main. A. t was used directly 1 times and indirectly 0 times
133- Main. A. x was used directly 4 times and indirectly 0 times
134- Main. B was used directly 1 times and indirectly 0 times
135- string was used directly 1 times and indirectly 0 times
136-
137114 $ odoc count-occurrences -I . -o occurrences. txt -- include-hidden
138115 $ occurrences_print occurrences. txt | sort
139116 Main was used directly 0 times and indirectly 11 times
@@ -149,45 +126,3 @@ We can also include persistent ids, and hidden ids:
149126 Main__A was used directly 1 times and indirectly 0 times
150127 Main__B was used directly 1 times and indirectly 0 times
151128 Main__C was used directly 1 times and indirectly 0 times
152-
153- $ odoc count-occurrences -I . -o occurrences. txt -- include-own -- include-hidden
154- $ occurrences_print occurrences. txt | sort
155- Main was used directly 0 times and indirectly 13 times
156- Main. A was used directly 4 times and indirectly 8 times
157- Main. A. (|| > ) was used directly 1 times and indirectly 0 times
158- Main. A. M was used directly 2 times and indirectly 0 times
159- Main. A. t was used directly 1 times and indirectly 0 times
160- Main. A. x was used directly 4 times and indirectly 0 times
161- Main. B was used directly 1 times and indirectly 0 times
162- Main__ was used directly 0 times and indirectly 2 times
163- Main__. C was used directly 1 times and indirectly 1 times
164- Main__. C. y was used directly 1 times and indirectly 0 times
165- Main__A was used directly 1 times and indirectly 2 times
166- Main__A. x was used directly 2 times and indirectly 0 times
167- Main__B was used directly 1 times and indirectly 1 times
168- Main__B. Z was used directly 0 times and indirectly 1 times
169- Main__B. Z . y was used directly 1 times and indirectly 0 times
170- Main__C was used directly 1 times and indirectly 0 times
171- string was used directly 1 times and indirectly 0 times
172-
173-
174- REMARKS!
175-
176- $ odoc count-occurrences -I main__B -o b_only_persistent. occ
177- $ odoc count-occurrences -I main__B -o b_with_own. occ -- include-own
178- $ occurrences_print b_only_persistent. occ | sort > only_persistent
179- $ occurrences_print b_with_own. occ | sort > with_own
180- $ diff only_persistent with_own | grep Main. A. x
181- < Main. A. x was used directly 1 times and indirectly 0 times
182- > Main. A. x was used directly 2 times and indirectly 0 times
183-
184- This is because the persistent Y. x is resolved into Main. A. x . So maybe relying
185- on Ident. persistent is not the good way of knowing if it is persistent or not ?
186-
187- $ odoc count-occurrences -I main__A -o a_with_own_and_hidden. occ -- include-own -- include-hidden
188- $ occurrences_print a_with_own_and_hidden. occ | sort
189- Main__A was used directly 0 times and indirectly 2 times
190- Main__A. x was used directly 2 times and indirectly 0 times
191- string was used directly 1 times and indirectly 0 times
192-
193- That's a problem: it should be Main. A and Main. A. x
0 commit comments