dialyzer

MODULE

dialyzer

MODULE SUMMARY

The Dialyzer, a DIscrepancy AnalYZer for ERlang programs

DESCRIPTION

The Dialyzer is a static analysis tool that identifies software
discrepancies such as type errors, unreachable code, unnecessary
tests, etc in single Erlang modules or entire (sets of)
applications. Dialyzer starts its analysis from either
debug-compiled BEAM bytecode or from Erlang source code. The file
and line number of a discrepancy is reported along with an
indication of what the discrepancy is about. Dialyzer bases its
analysis on the concept of success typings which allows for sound
warnings (no false positives).

use Dialyzer from the command line (no GUI) to detect defects in the
specified applications (directories or .erl or .beam files)

-r applications

same as -c only that directories are searched recursively for
subdirectories containing .erl or .beam files (depending on the
type of analysis)

-o outfile(or --output outfile)

when using Dialyzer from the command line, send the analysis
results in the specified outfile rather than in stdout

--src

overide the default, which is to analyze debug compiled BEAM
bytecode, and analyze starting from Erlang source code instead

-Dname(or -Dname=value)

when analyzing from source, pass the define to Dialyzer (**)

-I include_dir

when analyzing from source, pass the include_dir to Dialyzer (**)

-pa dir

Include dir in the path for Erlang. Useful when analyzing files
that have -include_lib() directives.

--output_plt file

Store the plt at the specified location after building it.

--no_warn_on_inline

Suppress warnings when analyzing an inline compiled bytecode file.

-plt plt

Use the specified plt as the initial plt. If the plt was built
during setup the files will be checked for consistency.

-Wwarn

a family of option which selectively turn on/off warnings.
(for help on the names of warnings use dialyzer -Whelp)

--check_init_plt

Only checks if the init plt is up to date. For installed systems
this also forces the rebuilding of the plt if this is not the case.

--shell

do not disable the Erlang shell while running the GUI

--version (or -v)

prints the Dialyzer version and some more information and exits

--help (or -h)

prints this message and exits

--quiet (or -q)

makes Dialyzer a bit more quiet

--verbose

makes Dialyzer a bit more verbose

Note

* denotes that multiple occurrences of these options are possible.

** options -D and -I work both from command-line and in the Dialyzer GUI;
the syntax of defines and includes is the same as that used by erlc.

Warning options:

-Wno_return

Suppress warnings for functions of no return.

-Wno_unused

Suppress warnings for unused functions.

-Wno_improper_lists

Suppress warnings for construction of improper lists.

-Wno_fun_app

Suppress warnings for fun applications that will fail.

-Wno_match

Suppress warnings for pattern matching operations that will never
succeed.

-Werror_handling***

Include warnings for functions that only return by means of an
exception.

Note

*** This is the only option that turns on warnings rather than
turning them off.

Using the Dialyzer from Erlang

You can also use Dialyzer directly from Erlang. Both the gui and the
command line version is available. The options are similar to the ones
given from the command line, so please refer to the sections above for
a description of these.