aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src
AgeCommit message (Collapse)Author
2017-11-22dialyzer: Extend the map implementation's handling of ?unitHans Bolinder
The Maps implementation handles ?unit in more cases. Exactly when t_is_none_or_unit() is to be called is not clear to me. The added cases are about a map type being ?unit, but the key or the value of an association can also be ?unit, but that is not always checked.
2017-11-10dialyzer: Display error messages without call stackHans Bolinder
As of commit 12b379 many of the reasons displayed after "Analysis failed with error:" erroneously include a call stack. The bug is now corrected. The bug was pointed out in http://erlang.org/pipermail/erlang-questions/2017-October/093838.html.
2017-09-19Update runtime deps to depend on new stdlib functionalityDan Gudmundsson
~tw and new string functions are new since OTP-20 (stdlib-3.4)
2017-09-15dialyzer: Improve check of unknown typesHans Bolinder
The implementation of OTP-14218 (commit 6d3b38a) has a weakness: only a very limited part of the type form is checked. This is now fixed: types not used by specs are checked equally well as types used by specs. The new function erl_types:t_from_form_check_remote() checks usage of remote types. It does not expand used local types, and has (almost) no limits on depth and size.
2017-09-12dialyzer: Do not fix ETS tables when merging PLTsHans Bolinder
This commit removes the call to ets:safe_fixtable/2 introduced in commit 9458495. ETS memory can now be reclaimed while merging PLTs.
2017-09-05dialyzer: Improve handling of UnicodeHans Bolinder
2017-08-24dialyzer: Fix a bug where merging PLT:s could lose infoHans Bolinder
A missing call to ets:safe_fixtable/2 meant that information was sometimes lost when merging PLT:s.
2017-06-13dialyzer: Run more of analyses in subprocessHans Bolinder
Memory consumption is marginally reduced.
2017-06-13dialyzer: Do not use two records for PLTsHans Bolinder
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).
2017-06-13dialyzer: Improve compression of an ETS tableHans Bolinder
2017-06-13dialyzer: Minor optimizationsHans Bolinder
Avoid some ETS-lookups. Marginal speed-ups.
2017-06-13dialyzer: Warn about unused unknown typesHans Bolinder
2017-06-13dialyzer: Correct a mistakeHans Bolinder
The arguments of calls to a debug function are no longer evaluated.
2017-06-13dialyzer: Rearrange some code to save memoryHans Bolinder
2017-06-13dialyzer: Optimize by avoiding some table lookupsHans Bolinder
In typesig: do not look up the module's types unless it is necessary.
2017-06-09dialyzer: Improve handling of UnicodeHans Bolinder
2017-05-04Update copyright yearRaimo Niskanen
2017-05-02Merge branch 'maint'Hans Bolinder
* maint: Updated OTP version Prepare release inets: Add missing release note dialyzer: Fix a bug regarding unknown types erl_mseg.c: don't use invalid indices in - > cache_powered_node[] Fix release note for OTP-14290 Conflicts: OTP_VERSION erts/emulator/sys/common/erl_mseg.c erts/vsn.mk lib/dialyzer/src/dialyzer_analysis_callgraph.erl
2017-04-27dialyzer: Fix unknown typeHans Bolinder
Due to a bug in Dialyzer, unknown types have been introduced.
2017-04-26dialyzer: Fix a bug regarding unknown typesHans Bolinder
Since commit 12b3790 Dialyzer has not reported unknown types.
2017-04-25Store abstract code in the Dbgi chunkJosé Valim
The new Dbgi chunk returns data in the following format: {debug_info_v1, Backend, Data} This allows compilers to store the debug info in different formats. In order to retrieve a particular format, for instance, Erlang Abstract Format, one may invoke: Backend:debug_info(erlang_v1, Module, Data, Opts) Besides introducing the chunk above, this commit also: * Changes beam_lib:chunk(Beam, [:abstract_code]) to read from the new Dbgi chunk while keeping backwards compatibility with old .beams * Adds the {debug_info, {Backend, Data}} option to compile:file/2 and friends that are stored in the Dbgi chunk. This allows the debug info encryption mechanism to work across compilers * Improves dialyzer to work directly on Core Erlang, allowing languages that do not have the Erlang Abstract Format to be dialyzer as long as they emit the new chunk and their backend implementation is available Backwards compatibility is kept across the board except for those calling beam_lib:chunk(Beam, ["Abst"]), as the old chunk is no longer available. Note however the "Abst" chunk has always been optional. Future OTP versions may remove parsing the "Abst" chunk altogether from beam_lib once Erlang 19 and earlier is no longer supported. The current Dialyzer implementation still supports earlier .beam files and such may also be removed in future versions.
2017-04-21Merge branch 'bjorn/dialyzer/add-typer/OTP-14336' into run-travisBjörn Gustavsson
* bjorn/dialyzer/add-typer/OTP-14336: Add smoke test for TypER Add back TypEr to the main OTP repository
2017-04-20Add back TypEr to the main OTP repositoryBjörn Gustavsson
It turned out that the dependencies between Dialyzer and TypEr makes it impractical to have TypEr in a separate repository. Add it back to the OTP repository, but put the Erlang module 'typer' in the dialyzer application.
2017-04-13stdlib: Add checks of the dialyzer attribute to the linterHans Bolinder
The same checks are also performed by the Dialyzer.
2017-03-10Update copyright yearRickard Green
2017-03-06Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Improve a warning dialyzer: Fix a weird warning dialyzer: Fix an opaque bug dialyzer: Minor fix Conflicts: lib/dialyzer/src/dialyzer_dataflow.erl
2017-03-06Merge branch 'hasse/dialyzer/fix_warnings/OTP-14177' into maintHans Bolinder
* hasse/dialyzer/fix_warnings/OTP-14177: dialyzer: Improve a warning dialyzer: Fix a weird warning dialyzer: Fix an opaque bug dialyzer: Minor fix
2017-03-03Merge branch 'maint'Björn Gustavsson
* maint: tools: Use portable lookup of home directory dialyzer, observer: Use portable lookup of home directory
2017-03-02dialyzer, observer: Use portable lookup of home directoryBjörn Gustavsson
Use init:get_argument(home) to find the location of the home directory. That will work on all platforms (including Windows). Note that the run-time system will fail to start if HOME (or the equivalent on Windows) is not set. Therefore, it can be assumed that init:get_argument(home) will not fail. ERL-161
2017-03-02Merge branch 'maint'Hans Bolinder
* maint: typer: Update runtime dependencies dialyzer: Update runtime dependencies Correct documentation of get_modules message
2017-03-02dialyzer: Update runtime dependenciesHans Bolinder
2017-02-28dialyzer: Fix an opaque bugHans Bolinder
An opaque bug that would crash Dialyzer has been fixed. The bug was reported by Nick Marino.
2017-02-28dialyzer: Minor fixHans Bolinder
2017-02-14Fixed typos in lib/dialyzerAndrew Dryga
2017-02-06Merge branch 'hasse/dialyzer/memory_opt/OTP-14127'Hans Bolinder
* hasse/dialyzer/memory_opt/OTP-14127: dialyzer: Attempt to reduce memory consumption dialyzer: Do not spawn all workers at once dialyzer: Write PLT in subprocess dialyzer: Remove code for non-started workers dialyzer: Sort graphs topologically dialyzer: Compress some PLT tables dialyzer: Check return value of digrahp:add_edge() dialyzer: Use less memory for the PLT when analyzing typer: Fix a bug regarding the -T option dialyzer: Do not keep the code server's type info on the heap
2017-02-03Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Fix a Dialyzer warning
2017-02-03dialyzer: Fix a Dialyzer warningHans Bolinder
2017-02-03dialyzer: Attempt to reduce memory consumptionHans Bolinder
The 'deps' field is reset when no longer used, which could possibly save some memory.
2017-02-03dialyzer: Do not spawn all workers at onceHans Bolinder
Spawning all worker processes at once has the potential to increase peak memory consumption. Therefore the implementation is now slightly modified: `20 * dialyzer_utils:parallelism()' processes are running in parallel. 20 i quite a big factor, but seems necessary to keep all schedulers busy according to the Observer application's Load Charts, with a 100 ms update interval.
2017-02-03dialyzer: Write PLT in subprocessHans Bolinder
At common case, which will otherwise leave a big heap.
2017-02-03dialyzer: Remove code for non-started workersHans Bolinder
Since SCCs and modules are now topologically sorted (relative the active graph), we can safely assume that workers have been started.
2017-02-03dialyzer: Sort graphs topologicallyHans Bolinder
Although some variable names indicate that lists of SCCs and modules are sorted, that was not always the case. The effect on the execution time of sorting them doesn't seem to be significant. dialyzer_coordinator:sccs_to_pids() should now always return an empty second list (not yet started workers). Since the condensation of graphs often needs a lot of heap memory, it is run in a separate process.
2017-02-03dialyzer: Compress some PLT tablesHans Bolinder
Compressing the signatures or the contract records would cost time. The contract records are still held in two places (code server and PLT) in many cases.
2017-02-03dialyzer: Check return value of digrahp:add_edge()Hans Bolinder
2017-02-03dialyzer: Use less memory for the PLT when analyzingHans Bolinder
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.
2017-02-03typer: Fix a bug regarding the -T optionHans Bolinder
The -T option has not been working for a long time.
2017-02-03dialyzer: Do not keep the code server's type info on the heapHans Bolinder
The table used during translation of forms to types used to be a dictionary of the type info (-type(), -opaque(), and -record()) for all modules. Now it is reduced to the modules that are needed to handle references to types in other modules. The PLT:s type info is still kept on the heap.
2017-02-03Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Increase time limit for tests dialyzer: Optimize typesig dialyzer: Optimize evaluation of complex code dialyzer: Optimize collection of variables Conflicts: lib/dialyzer/src/dialyzer_typesig.erl
2017-02-01dialyzer: Optimize typesigHans Bolinder
dialyzer_typesig:traverse_scc() now resets the context for each element of the SCC. Since the results of traversing the elements are saved in the 'cmap' table, there is no need to create an SCC conjunction. For huge SCCs this saves quite some time: the lift_lists() function added one element at a time, which made the calculation of deps very slow.
2017-02-01dialyzer: Optimize evaluation of complex codeHans Bolinder
Improve the evaluation of long lists of constraints.