aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_plt.erl
AgeCommit message (Collapse)Author
2018-02-21Compute MD5s in dialyzer using the .beam fileJosé Valim
The previous mechanism was based on the core file which meant that for every module in the PLT, we had to fetch its .beam file, retrieve Erlang AST, compile that down to core, serialize it into a binary and then get its MD5. In a project with stdlib, kernel, elixir and a small application in the PLT, relying only on the .beam sped up --check_plt from 10s to 0.8s.
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-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: 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-09dialyzer: Improve handling of UnicodeHans Bolinder
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-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-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: 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-01-12Merge branch 'maint'Hans Bolinder
* 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
2017-01-11dialyzer: Use maps instaed of dictHans Bolinder
2017-01-11dialyzer: Do not send full PLTs as messagesHans Bolinder
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).
2016-11-23Correct copyright and license on dialyzer filesRichard Carlsson
2016-03-15update copyright-yearHenrik Nord
2016-01-11Fix inadvertent deletion of callback infoStavros Aronis
If a behaviour module contains an non-exported function with the same name as one of the behaviour's callbacks, the callback info was inadvertently deleted from the PLT as the dialyzer_plt:delete_list/2 function was cleaning up the callback table. This bug was reported by Brujo Benavides. Fixes ERL-72 bug report.
2015-06-18Change license text to APLv2Bruce Yinhe
2014-04-28Introduce the attribute -optional_callbacks in the context of behavioursHans Bolinder
2014-02-23Deprecate pre-defined built-in typesHans Bolinder
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.
2012-05-21Fix a spec in pltStavros Aronis
2012-05-21Keep mini plt for warnings passStavros Aronis
2012-05-21Success typing analysis uses ETS tables for necessary plt infoStavros Aronis
Only the info and contracts dicts were neccessary for success typing inference and these have been converted to ETS tables.
2012-05-21Convert remaining codeserver fields to ETS tablesStavros Aronis
2012-05-21Refactoring in pltStavros Aronis
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-02-22Review by Kostis Sagonas and fixesStavros Aronis
2012-02-22Simplify external vs bad calls checkStavros Aronis
2012-02-22Remove redundant codeStavros Aronis
2012-02-22Prettify specStavros Aronis
2011-11-18Add lookup function for callbacksStavros Aronis
2011-11-18Store callbacks in codeserver and PLTStavros Aronis
2011-03-29Fix the name of an error functionMaria Christakis
2011-03-11Update copyright yearsBjörn-Egil Dahlberg
2011-03-11Renamed error/1 function and added specsKostis Sagonas
2010-11-30dialyzer: Add support for multiple PLTsMaria Christakis
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)
2010-10-04Dialyzer: Fix erroneous type and use the same definition in two placesKostis Sagonas
2010-09-10Remove warnings for clashes with new autoimported BIFsPatrik Nyblom
2010-06-08Various changes to dialyzer-related files for R14.Kostis Sagonas
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.
2010-06-03Support -export_type() in dialyzer and erl_typesKostis Sagonas
2010-02-17Merge branch 'ks/hipe' into ccase/r13b04_devErlang/OTP
* 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
2010-02-14dialyzer: New version for the R13B04 releaseKostis Sagonas
2009-11-20The R13B03 release.OTP_R13B03Erlang/OTP