Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions check/classic/classic.exp
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down
8 changes: 3 additions & 5 deletions check/classic/classic.ref
Original file line number Diff line number Diff line change
Expand Up @@ -236,8 +236,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down Expand Up @@ -770,7 +768,7 @@ Nothing else to report in this section
--------------------------------------------------------------------------------


Total: 641
Success: 635
Total: 639
Success: 633
Failed: 6
Ratio: 99.0639625585%
Ratio: 99.0610328638%
2 changes: 0 additions & 2 deletions check/internal/internal.exp
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down
8 changes: 3 additions & 5 deletions check/internal/internal.ref
Original file line number Diff line number Diff line change
Expand Up @@ -188,8 +188,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down Expand Up @@ -722,7 +720,7 @@ Nothing else to report in this section
--------------------------------------------------------------------------------


Total: 597
Success: 591
Total: 595
Success: 589
Failed: 6
Ratio: 98.9949748744%
Ratio: 98.9915966387%
7 changes: 0 additions & 7 deletions check/threshold-1/threshold-1.exp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@

./examples/docs/methods/code_constructs/class/class_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/class_type/class_type_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/coercion/coercion_lib.mli:2: obj

./examples/docs/methods/code_constructs/constructor/constructor_bin.ml:4: push_n_times
Expand Down Expand Up @@ -482,8 +480,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down Expand Up @@ -576,9 +572,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#f
./examples/using_make/obj/class.mli:1: c#g
./examples/using_make/obj/class_type.mli:7: p#f
./examples/using_make/obj/class_type.mli:7: p#h
./examples/using_make/obj/coerce.mli:8: c#h
./examples/using_make/obj/constraint.ml:1: p#f
./examples/using_make/obj/depend.ml:8: M.c#f
./examples/using_make/obj/fooCl.mli:1: p1#f
Expand Down
13 changes: 3 additions & 10 deletions check/threshold-1/threshold-1.ref
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@

./examples/docs/methods/code_constructs/class/class_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/class_type/class_type_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/coercion/coercion_lib.mli:2: obj

./examples/docs/methods/code_constructs/constructor/constructor_bin.ml:4: push_n_times
Expand Down Expand Up @@ -482,8 +480,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down Expand Up @@ -576,9 +572,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#f
./examples/using_make/obj/class.mli:1: c#g
./examples/using_make/obj/class_type.mli:7: p#f
./examples/using_make/obj/class_type.mli:7: p#h
./examples/using_make/obj/coerce.mli:8: c#h
./examples/using_make/obj/constraint.ml:1: p#f
./examples/using_make/obj/depend.ml:8: M.c#f
./examples/using_make/obj/fooCl.mli:1: p1#f
Expand Down Expand Up @@ -1250,7 +1243,7 @@ Nothing else to report in this section
--------------------------------------------------------------------------------


Total: 1039
Success: 1033
Total: 1033
Success: 1027
Failed: 6
Ratio: 99.4225216554%
Ratio: 99.4191674734%
13 changes: 3 additions & 10 deletions check/threshold-3-0.5/threshold-3-0.5.exp
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@

./examples/docs/methods/code_constructs/class/class_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/class_type/class_type_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/coercion/coercion_lib.mli:2: obj

./examples/docs/methods/code_constructs/constructor/constructor_bin.ml:4: push_n_times
Expand Down Expand Up @@ -426,6 +424,8 @@

./examples/docs/methods/code_constructs/alias/alias_lib.mli:2: original

./examples/docs/methods/code_constructs/class_type/class_type_bin.ml:4: push_n_times

./examples/docs/optional_arguments/code_constructs/intext_app/intext_app_lib.mli:2: max
./examples/docs/optional_arguments/code_constructs/intext_app/intext_app_lib.mli:3: min

Expand Down Expand Up @@ -536,7 +536,7 @@

.>-> ALMOST UNUSED EXPORTED VALUES: Called 3 time(s):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./examples/docs/methods/code_constructs/class_type/class_type_lib.mli:10: int_stack
./examples/docs/methods/code_constructs/class_type/class_type_lib.mli:10: int_stack_o

./examples/docs/methods/code_constructs/factory_fun/factory_fun_lib.mli:2: get_stack

Expand Down Expand Up @@ -625,8 +625,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down Expand Up @@ -719,9 +717,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#f
./examples/using_make/obj/class.mli:1: c#g
./examples/using_make/obj/class_type.mli:7: p#f
./examples/using_make/obj/class_type.mli:7: p#h
./examples/using_make/obj/coerce.mli:8: c#h
./examples/using_make/obj/constraint.ml:1: p#f
./examples/using_make/obj/depend.ml:8: M.c#f
./examples/using_make/obj/fooCl.mli:1: p1#f
Expand Down Expand Up @@ -772,8 +767,6 @@ Nothing else to report in this section
./examples/using_dune/wrapped_lib/obj/without_class.mli:11: factory#used_fun
./examples/using_dune/wrapped_lib/obj/without_class.mli:11: factory#used_int

./examples/using_make/obj/class_type.mli:7: p#g
./examples/using_make/obj/coerce.mli:8: c#f
./examples/using_make/obj/named.mli:1: p1#f
./examples/using_make/obj/obj_inher.ml:1: c#f
--------
Expand Down
19 changes: 6 additions & 13 deletions check/threshold-3-0.5/threshold-3-0.5.ref
Original file line number Diff line number Diff line change
Expand Up @@ -186,8 +186,6 @@

./examples/docs/methods/code_constructs/class/class_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/class_type/class_type_bin.ml:4: push_n_times

./examples/docs/methods/code_constructs/coercion/coercion_lib.mli:2: obj

./examples/docs/methods/code_constructs/constructor/constructor_bin.ml:4: push_n_times
Expand Down Expand Up @@ -426,6 +424,8 @@

./examples/docs/methods/code_constructs/alias/alias_lib.mli:2: original

./examples/docs/methods/code_constructs/class_type/class_type_bin.ml:4: push_n_times

./examples/docs/optional_arguments/code_constructs/intext_app/intext_app_lib.mli:2: max
./examples/docs/optional_arguments/code_constructs/intext_app/intext_app_lib.mli:3: min

Expand Down Expand Up @@ -536,7 +536,7 @@

.>-> ALMOST UNUSED EXPORTED VALUES: Called 3 time(s):
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./examples/docs/methods/code_constructs/class_type/class_type_lib.mli:10: int_stack
./examples/docs/methods/code_constructs/class_type/class_type_lib.mli:10: int_stack_o

./examples/docs/methods/code_constructs/factory_fun/factory_fun_lib.mli:2: get_stack

Expand Down Expand Up @@ -625,8 +625,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#h
./examples/using_make/obj/class_type.mli:9: c#h
./examples/using_make/obj/coerce.mli:6: p#f
./examples/using_make/obj/coerce.mli:6: p#h
./examples/using_make/obj/constraint.ml:1: p#g
./examples/using_make/obj/fooCl.mli:1: p1#g
./examples/using_make/obj/fooCl.mli:1: p1#h
Expand Down Expand Up @@ -719,9 +717,6 @@ Nothing else to report in this section

./examples/using_make/obj/class.mli:1: c#f
./examples/using_make/obj/class.mli:1: c#g
./examples/using_make/obj/class_type.mli:7: p#f
./examples/using_make/obj/class_type.mli:7: p#h
./examples/using_make/obj/coerce.mli:8: c#h
./examples/using_make/obj/constraint.ml:1: p#f
./examples/using_make/obj/depend.ml:8: M.c#f
./examples/using_make/obj/fooCl.mli:1: p1#f
Expand Down Expand Up @@ -772,8 +767,6 @@ Nothing else to report in this section
./examples/using_dune/wrapped_lib/obj/without_class.mli:11: factory#used_fun
./examples/using_dune/wrapped_lib/obj/without_class.mli:11: factory#used_int

./examples/using_make/obj/class_type.mli:7: p#g
./examples/using_make/obj/coerce.mli:8: c#f
./examples/using_make/obj/named.mli:1: p1#f
./examples/using_make/obj/obj_inher.ml:1: c#f
--------
Expand Down Expand Up @@ -1651,7 +1644,7 @@ Nothing else to report in this section
--------------------------------------------------------------------------------


Total: 1361
Success: 1355
Total: 1354
Success: 1348
Failed: 6
Ratio: 99.5591476855%
Ratio: 99.5568685377%
84 changes: 0 additions & 84 deletions docs/methods/METHODS.md
Original file line number Diff line number Diff line change
Expand Up @@ -166,87 +166,3 @@ type definitions.
As explained in the [Object type](./code_constructs/OBJECT_TYPE.md) example, the
analyzer is currently restricted to not reporting methods declared in object
types.

### Example

The reference files for this example are in the
[alias](../../examples/docs/methods/limitations/alias) directory.

The reference takes place in `/tmp/docs/methods/limitations`, which
is a copy of the [limitations](../../../examples/docs/methods/limitations)
directory. Reported locations may differ depending on the location of the source
files.

The compilation command is :
```
make -C alias build
```

The analysis command is :
```
make -C alias analyze
```

The compile + analyze command is :
```
make -C alias
```

Code:
```OCaml
(* alias_lib.mli *)
val original :
< used : unit
; used_by_alias : unit
; unused : unit
>

val alias :
< used : unit
; used_by_alias : unit
; unused : unit
>
```
```OCaml
(* alias_lib.ml *)
let original =
object
method used = ()
method used_by_alias = ()
method unused = ()
end

let alias = original
```
```OCaml
(* alias_bin.ml *)
open Alias_lib

let () =
original#used;
alias#used_by_alias
```

Compile and analyze:
```
$ make -C alias
make: Entering directory '/tmp/docs/methods/limitations/alias'
ocamlopt -bin-annot alias_lib.mli alias_lib.ml alias_bin.ml
dead_code_analyzer --nothing -M all .
Scanning files...
[DONE]

.> UNUSED METHODS:
=================
/tmp/docs/methods/limitations/alias/alias_lib.mli:2: original#unused
/tmp/docs/methods/limitations/alias/alias_lib.mli:2: original#used_by_alias

Nothing else to report in this section
--------------------------------------------------------------------------------


make: Leaving directory '/tmp/docs/methods/limitations/alias'
```

The analyzer reports `original#used_by_alias` although it is used by
`alias#used_by_alias`.
Loading
Loading