aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src/dialyzer_typesig.erl
AgeCommit message (Collapse)Author
2014-01-31Shut off a dialyzer unmatched return warningKostis Sagonas
Dialyzer does not like list comprehensions for which the result is not assigned to some variable (maybe anonymous). In this particular case, the comprehension, containing only a filter but no generator, was used to save some lines, but IMO this type of code, while "cute", is not so easy to comprehend.
2014-01-29dialyzer: Remove dead codeBjörn-Egil Dahlberg
2014-01-28dialyzer,hipe,stdlib: Add Maps understanding to DialyzerBjörn-Egil Dahlberg
2014-01-21[dialyzer] Re-work the handling of opaque typesHans Bolinder
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.
2013-04-08Minor refactoringsStavros Aronis
2013-04-08Fix an error in the type inference of bitstring dataStavros Aronis
Dialyzer was constraining bitstring data used in the construction of other bitstring values too much. These constraints have now been relaxed.
2013-02-22Update copyright yearsBjörn-Egil Dahlberg
2013-02-20Merge branch 'ks/dialyzer-R16B-final-fixes/OTP-10865'Fredrik Gustafsson
* ks/dialyzer-R16B-final-fixes/OTP-10865: Native code compilation changes Code simplification Simplify a case construct using inequality Simplify a case construct using a boolean operator Code simplifications + take out obsolete note
2013-02-19Code simplificationKostis Sagonas
2013-02-15Minor refactoringStavros Aronis
2012-08-21Add an undocumented option [--solver [v1 | v2]]Hans Bolinder
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.
2012-08-21Add an alternative implmentation of the typesignature solverHans Bolinder
An alternative implementation of the solver in dialyzer_typesig has been introduced. It is faster than the original implementation. Note: there is code for "loop detection". Where a loop occurs, the evaluation is stopped and the current solution returned. This behaviour is consistent with how the original implementation works. There are a few known cases where the loop detection kicks in. They are due to bugs which will hopefully be fixed in a near future.
2012-06-01Bug fixes and improvements of dialyzer_typesigHans Bolinder
1. Sometimes the solver forgot that a list had entered the error state. The bug has been fixed by storing the atom 'error' in MapDict. An example where the bug occurred is io_lib_pretty:printable_bin(). The returned spec was weaker than it should have been, but the fix-point loop hid the bug (in this case). 2. lists:partition() has been substituted for lists:splitwith() in enumerate_constraints(). This fix together with 3. solves a problem with long execution times for deeply nested fun:s. An example which is now much faster is lib/compiler/test/lc_SUITE:deeply_nested/1 (included as dialyzer/test/small_SUITE_data/src/deep_lc.erl). 3. The calculation of components in enumerate_constraints() has been simplified and optimized. The important thing here is that _all_ of the simple constraints have been saturated before entering the complex part. 4. The pretty printing of constraints has been improved.
2012-05-21Regulate all kinds of running workers up to the number of schedulersStavros Aronis
2012-05-21Solve big SCC constraints in parallelStavros Aronis
2012-03-30Update copyright yearsBjörn-Egil Dahlberg
2012-02-22Review by Kostis Sagonas and fixesStavros Aronis
2012-02-22Remove callgraph from the state used during solvingStavros Aronis
2012-02-22Refactorings in dialyzer_typesigStavros Aronis
2012-02-22Avoid unnecessary passing of huge terms in some closuresStavros Aronis
The relevant terms were instances of Dialyzer's typesig analysis state that were stored together with some "dynamic" constraints in a dict. Due to sharing this was not apparent until we tried to copy the dictionary. Initial debugging was by Björn Gustavsson.
2012-02-22Simplify dialyzer_succ_typings codeStavros Aronis
2011-12-01Fix crash in DialyzerStavros Aronis
Variable substitution was not generalizing any unknown variables.
2011-10-14Fix false warning about closure applicationStavros Aronis
Whenever a variable that could hold one of two or more possible closures was used in a particular application, the application was assumed to fail if ONE of the closures would fail in this application. This has been corrected to infer failing application if ALL possible closures would fail in the particular application.
2011-09-29Update copyright yearsBjörn-Egil Dahlberg
2011-08-30Add origin information to #fun_var closuresStavros Aronis
2011-05-13Fix server loop detectionStavros Aronis
Dialyzer does not normally emit warnings for functions that implement non-terminating server loops. This detection failed when some of the elements in an SCC terminated normally (being for example list comprehensions or other generic anonymous functions that were included in the SCC). This patch fixes that.
2010-12-20Fix bug in the handling of 'or' by DialyzerStavros Aronis
Dialyzer had a minor issue when the arguments of the built-in function 'or' had the fixed value 'false'. This testcase should return no warnings: -module(false_false). -export([false_or/0]). false_or() -> false or false.
2010-11-09dialyzer: Speed up analysis of nested list comprehensionsKostis Sagonas
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.
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-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