Age | Commit message (Collapse) | Author |
|
Invoking Dialyzer through the function dialyzer:run/1 instead of from
the command line activates "Erlang mode", meaning that warnings are
returned instead of printed, and that HiPE compilation of modules does
not take place. With this change, HiPE compilation can optionally be
enabled in this situation by passing the option {native, true}.
Caching of natively compiled modules is enabled by default, but can be
turned off using the option {native_cache, false}.
|
|
By default Dialyzer tries to improve the readability of warnings.
Newlines are inserted before and inside types, signatures, and Erlang
code. Sometimes the newlines look misplaced. The raw format
(option --raw) is not affected.
Use the new --no_indentation option get the old behavior (no inserted
line breaks).
A note on the implementation. The types &c present in the warning
tuples are parsed, and then formatted using erl_pp, the Erlang Pretty
Printer. The alternative, to create message tuples with formatted
types, turned out to more complicated, and has no real benefits.
Also notice that the fixes for binaries (commit 9db8a098) and union
elements (commit a1e51d12) are required. As a consequence, messages
created before these commits using the --raw option cannot always be
indented.
|
|
|
|
Instead of two records, #plt{} with dict:s and #mini_plt{} with ETS
tables, one record is used for representing PLT:s in RAM.
The #mini_plt{} is the one now used throughout analyses, but it is
called #plt{}.
When writing the PLT to file, another record is used, #file_plt{} (as
before). When creating #file_plt{}, the #plt{} is deleted (it cannot
be used for further analyses).
|
|
|
|
At common case, which will otherwise leave a big heap.
|
|
The two tables for (record) types and exported types are no longer
kept in memory (by the PLT) when analyzing, which reduces memory
consumption.
A first step towards removing (or replacing) the #plt{} record.
|
|
* maint:
dialyzer: Compact 'file' annotations in Core code
dialyzer: Try to reduce memory usage
dialyzer: Use less memory when translating contracts
dialyzer: Use maps instaed of dict
dialyzer: Use maps instead of dict for module contracts map
dialyzer: Compress a few more ETS tables
dialyzer: Optimize memory consumption
dialyzer: Reduce memory consumption during 'remote' phase
dialyzer: Update code for finding parallelism
compiler: Do not spawn process when dialyzing
dialyzer: Reduce ETS usage during the typesig phase
dialyzer: Optimize graph condensation
dialyzer: Do not send full PLTs as messages
|
|
The mini PLT is extended to hold all data of the full PLT, and the
full PLT is restored when needed (for storing the PLT on file).
|
|
|
|
|
|
Conflicts:
lib/dialyzer/src/dialyzer_analysis_callgraph.erl
|
|
Dialyzer used to report unknown behaviours in the same way as unknown
functions and types. This functionality has been removed in d101155, but
some code remained.
|
|
Record field types have been modified due to commit 8ce35b2:
"Take out automatic insertion of 'undefined' from typed record fields".
|
|
Main problem:
A faulty HIPE_LITERAL_CRC was not detected by the loader.
Strangeness #1:
Dialyzer should ask the hipe compiler about the target checksum,
not an internal bif.
Strangeness #2:
The HIPE_SYSTEM_CRC checksum was based on the HIPE_LITERALS_CRC
checksum.
Solution:
New HIPE_ERTS_CHECKSUM which is an bxor of the two (now independent)
HIPE_LITERALS_CRC and HIPE_SYSTEM_CRC.
HIPE_LITERALS_CRC represents values that are assumed to stay constant
for different VM configurations of the same arch, and are therefor
hard coded into the hipe compiler.
HIPE_SYSTEM_CRC represents values that may differ between VM variants.
By default the hipe compiler asks the running VM for this checksum,
in order to create beam files for the same running VM.
The hipe compiler can be configured (with "make XCOMP=yes ...") to
create beam files for another VM variant, in which case HIPE_SYSTEM_CRC
is also hard coded.
ToDo:
Treat all erts properties the same. Either ask the running VM or hard
coded into hipe (if XCOMP=yes). This will simplify and reduce the risk
of dangerous mismatches. One concern might be the added overhead
from more frequent calls to hipe_bifs:get_rts_param.
|
|
|
|
Cache the results of native compilation in
$XDG_CACHE_HOME/dialyzer_hipe_cache. This can reduce the startup time
significantly.
If XDG_CACHE_HOME is unset, it defaults to $HOME/.cache.
See the XDG Base Directory spec for more details:
http://standards.freedesktop.org/basedir-spec/basedir-spec-0.7.html
Under that directory, create a subdirectory called
ARCH-VERSION-CHECKSUM, where ARCH is the HiPE architecture, VERSION is
the HiPE version number, and CHECKSUM is the return value of
hipe_bifs:system_crc/0.
Caching can be disabled by specifying --no_native_cache on the command
line.
|
|
Replace the undocumented option 'no_unknown' with the documented
option 'unknown'.
|
|
Thanks to James Fish for the bug report, and to Stavros Aronis for
fixing the bug.
|
|
The -dialyzer() attribute can be used for suppressing warnings in a
module by specifying functions or warning options. It can also be used
for requesting warnings in a module.
|
|
|
|
Not (yet) documented.
|
|
The warnings about unknown types and functions are now returned
when calling Dialyzer from Erlang, in particular from an escript.
When calling Dialyzer from the command line the warnings about unknown
types and functions are output last as before; and when using the GUI
the warnings are displayed in a pop-up window, as before.
|
|
hipe:c/1 ignores '-compile(no_native).'
|
|
The types array(), dict(), digraph(), gb_set(), gb_tree(), queue(),
set(), and tid() have been deprecated. They will be removed in OTP 18.0.
Instead the types array:array(), dict:dict(), digraph:graph(),
gb_set:set(), gb_tree:tree(), queue:queue(), sets:set(), and ets:tid()
can be used. (Note: it has always been necessary to use ets:tid().)
It is allowed in OTP 17.0 to locally re-define the types array(), dict(),
and so on.
New types array:array/1, dict:dict/2, gb_sets:set/1, gb_trees:tree/2,
queue:queue/1, and sets:set/1 have been added.
|
|
|
|
It is now OK to inspect and modify the internals of opaque types within
the scope of the module.
The contracts are used for decorating types with opaqueness when it is
harmless to do so. The opaqueness is propagated by the typesig module
and also by the dataflow module.
A lot of details have been fixed or updated. In particular the modules
erl_types and erl_bif_types have been modified extensively.
The version in vsn.mk has been updated to 2.7. The reason is a
modification of #opaque{} in erl_types.
Dialyzer seems to be about five percent slower than it used to be.
|
|
Even though dialyzer_typesig is the module doing most of the work, compiling it
to native code twice will not make it faster than the rest. :-)
|
|
|
|
Add more files to be compiled to native code and
do the native code compilation in parallel if there are enough cores.
|
|
The original implementation of the type signature solver is called 'v1'
and the newly introduced alternative implementation is called 'v2'.
It is possible to run just the one of the solvers (in case there is a
bug in for instance the v2 implementation) or both solvers
("--solver v1 --solver v2"). In the latter case an error is thrown if
the outcome differ.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
* aronisstav/dialyzer/dialyzer_tests/OTP-9116:
Increase timetrap of options1 suite
Write output_plt even when plt_check is ok
Create plt with erts, kernel and stdlib only
Update test results as they currently appear in dev
Major restructure of dialyzer's testsuite
Add 'apps' option to the erlang interface
Update spec file to work with new common test structure
Test suites for Dialyzer
|
|
|
|
This change adds a --fullpath option to Dialyzer, which makes the
warning messages contain the full path of the corresponding file.
Original patch submitted by Magnus Henoch (legoscia) on 15/9/2010
and cooked to death in the 'pu' branch all this time.
The patch was essentially correct and most of it has been used as
is, but there have been some changes to make the code slightly
prettier, avoid some code duplication, and add documentation to
dialyzer's doc files and to its help message.
|
|
This new feature is able to take multiple PLTs, merge them during the
start of the analysis, and work from there. This works provided that
the PLTs do not have a module with the same name appearing in more
than one PLT.
The PLTs are created in the usual way:
dialyzer --build_plt --output_plt PLT_1 FILES_TO_INCLUDE
...
dialyzer --build_plt --output_plt PLT_N FILES_TO_INCLUDE
and then can be used in either of the following ways:
dialyzer FILES_TO_ANALYZE --plts PLT_1 ... PLT_N
or:
dialyzer --plts PLT_1 ... PLT_N -- FILES_TO_ANALYZE
(Note the -- delimiter in the second case)
|
|
Nested list comprehensions are translated into strongly connected
funs but dialyzer ignored this. This meant that self-recursive
analysis was normally executed for each fun and the whole fixpoint
took some time to calculate. This patch adds every fun found in
constraint generation to the SCC that is under analysis and then
solves the SCC as a whole.
Possible issues:
- The returned dict contains more entries than usual. This
triggered a bug in contract checking that is dealt with is
this patch as well (dialyzer_contracts.erl).
- As it's not easy to tell apart real fun SCCs from simple funs it
performance might be hampered in the simple funs case.
While doing these changes, also added and strengthened some specs.
In addition, incorporated a modified patch by Ahmed Omar that fixes
a bug in dialyzer_analysis_callgraph module that kept the files of
only one selected directory in dialyzer's GUI.
|
|
|
|
Bumped version number and wrote RELEASE_NOTES.
Included all changes described in release notes.
Some spec-related changes to some files in lib/hipe/cerl.
|
|
|
|
|
|
* ks/hipe:
dialyzer: Fix system_limit exception in race analysis
syntax_tools: Add types and specs for most exported functions
syntax_tools: Support the --enable-native-libs configure option
syntax_tools: Remove $Id$ annotations
dialyzer: New version for the R13B04 release
hipe: Miscellaneous additions
typer: New version for the R13B04 release
Fix a HiPE compiler bug evaluating an expression that throws system_limit
OTP-8460 ks/hipe
|
|
|