aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer
AgeCommit message (Collapse)Author
2017-02-09Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Correct PLT tests
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-03dialyzer: Correct PLT testsHans Bolinder
Use explicit file names of PLTs so that daily builds&tests running simultaneously under the same user do not interfere with each other ("$HOME/.dialyzer_plt" is the default PLT name).
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: Increase time limit for testsHans Bolinder
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.
2017-01-25Update test cases for erlang:hash/2 removalBjörn-Egil Dahlberg
2017-01-12Merge branch 'maint'Hans Bolinder
* maint: stdlib: Correct signatures of functions in erl_parse
2017-01-12Merge branch 'hasse/stdlib/fix_anno_types/OTP-14131' into maintHans Bolinder
* hasse/stdlib/fix_anno_types/OTP-14131: stdlib: Correct signatures of functions in erl_parse
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: Compact 'file' annotations in Core codeHans Bolinder
File annotations {file, File} in Core Erlang code is replaced by {file, FakeFile}, where FakeFile is "0", "1", ..., in order to save memory. When a warning message is created, FakeFile is translated to the original File (a bit awkward but easy to do). The Core code stored in ETS tables needs less space, but more important is that a less heap memory is used in the dataflow, warnings, and typesig phases, allowing more parallelism.
2017-01-11dialyzer: Try to reduce memory usageHans Bolinder
The translation from forms to types is done in a separate process in an attempt to reduce peak memory usage. Expect further optimizations as it is probably not feasible in the long run to keep all type information on the heap.
2017-01-11dialyzer: Use less memory when translating contractsHans Bolinder
2017-01-11dialyzer: Use maps instaed of dictHans Bolinder
2017-01-11dialyzer: Use maps instead of dict for module contracts mapHans Bolinder
2017-01-11dialyzer: Compress a few more ETS tablesHans Bolinder
2017-01-11dialyzer: Optimize memory consumptionHans Bolinder
Some SCC info is no longer cached. It reduces the peak memory consumption of workers during the typesig phase, and seems to cost very little time.
2017-01-11dialyzer: Reduce memory consumption during 'remote' phaseHans Bolinder
The cache used for speeding up the translation from forms to types is no longer global, but reset per module. The peak memory consumption is reduced, and the added time seems to be small.
2017-01-11dialyzer: Update code for finding parallelismHans Bolinder
Using erlang:system_info(schedulers_online) for determining parallelism is recommended by OTP experts. It takes care of "+S 4:1" and simultaneous loading of HiPE code.
2017-01-11dialyzer: Reduce ETS usage during the typesig phaseHans Bolinder
The condensed graph of SCCs occupies less ETS memory. A table translating to and from SCC to a unique integer is introduced.
2017-01-11dialyzer: Optimize graph condensationHans Bolinder
By not using ETS when calculating the condensation of graphs, peak heap memory consumption is reduced.
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).
2017-01-10stdlib: Correct signatures of functions in erl_parseHans Bolinder
The signatures of erl_parse:anno_to_term/1 and erl_parse:anno_from_term/1 are corrected. Using these function no longer results in false Dialyzer warnings.
2017-01-10Merge branch 'maint'Hans Bolinder
* maint: stdlib: Allow characters in types and constant patterns
2016-12-21stdlib: Allow characters in types and constant patternsHans Bolinder
Characters ($char) can be used in constant pattern expressions. They can also be used in types and contracts.
2016-12-14Merge tag 'OTP-19.2'Dan Gudmundsson
=== OTP-19.2 === Changed Applications: - common_test-1.13 - compiler-7.0.3 - crypto-3.7.2 - dialyzer-3.0.3 - edoc-0.8.1 - erl_docgen-0.6.1 - erl_interface-3.9.2 - erts-8.2 - eunit-2.3.2 - hipe-3.15.3 - inets-6.3.4 - kernel-5.1.1 - mnesia-4.14.2 - observer-2.3 - odbc-2.12 - parsetools-2.1.4 - public_key-1.3 - runtime_tools-1.11 - sasl-3.0.2 - ssh-4.4 - ssl-8.1 - stdlib-3.2 - syntax_tools-2.1.1 - tools-2.9 - wx-1.8 Unchanged Applications: - asn1-4.0.4 - cosEvent-2.2.1 - cosEventDomain-1.2.1 - cosFileTransfer-1.2.1 - cosNotification-1.2.2 - cosProperty-1.2.1 - cosTime-1.2.2 - cosTransactions-1.3.2 - debugger-4.2.1 - diameter-1.12.1 - eldap-1.2.2 - et-1.6 - gs-1.6.2 - ic-4.4.2 - jinterface-1.7.1 - megaco-3.18.1 - orber-3.8.2 - os_mon-2.4.1 - otp_mibs-1.1.1 - percept-0.9 - reltool-0.7.2 - snmp-5.2.4 - typer-0.9.11 - xmerl-1.3.12 * tag 'OTP-19.2': Updated OTP version Prepare release Conflicts: OTP_VERSION
2016-12-09Prepare releaseErlang/OTP
2016-12-07Update copyright-yearErlang/OTP
2016-11-23Update obsolete author e-mailsRichard Carlsson
2016-11-23Correct copyright and license on dialyzer filesRichard Carlsson
2016-11-23Merge branch 'maint'Hans Bolinder
* maint: dialyzer: Substitute 'opacity' for 'opaqueness' dialyzer: Improve a warning message dialyzer: Improve a warning message dialyzer: Correct a warnings message
2016-11-22dialyzer: Substitute 'opacity' for 'opaqueness'Hans Bolinder
Suggested by Kostis.
2016-11-22dialyzer: Improve a warning messageHans Bolinder
Messages regarding guards with orelse/andalso could look like "Clause guard cannot succeed. The variable A was matched against the type any()". Now they look like as if or/and is used: "Guard test is_integer(A::atom()) can never succeed".
2016-11-22dialyzer: Improve a warning messageHans Bolinder
Messages like "Invalid type specification for function para3:exp_adt/0. The success typing is () -> 3" now look like "The specification for para3:exp_adt/0 has an opaque subtype para3_adt:exp1(para3_adt:exp2()) which is violated by the success typing () -> 3". The old message did not give any clue as to what invalidated the contract, namely the opaque subtype.
2016-11-22dialyzer: Correct a warnings messageHans Bolinder
Messages like "The attempt to match a term of type rec_api:f() against the variable _ breaks the opaqueness of rec_adt:f()" now look like "The attempt to match a term of type rec_adt:f() against the record field 'f' with type rec_api:f() breaks the opaqueness of the term".
2016-11-02Merge branch 'maint'Hans Bolinder
* maint: Update preloaded erts: Correct type declaration of match specification head Conflicts: erts/preloaded/ebin/erlang.beam erts/preloaded/ebin/erts_internal.beam
2016-11-01erts: Correct type declaration of match specification headHans Bolinder
Bug reported by Peti Gömöri <[email protected]>.