aboutsummaryrefslogtreecommitdiffstats
path: root/lib/dialyzer/src
AgeCommit message (Collapse)Author
2014-02-22Introduce parameterized opaque typesHans Bolinder
Handle immediate opaque types as aliases: A declaration of dict/0 -opaque dict() :: dict(_, _). -opaque dict(Key, Value) :: ... is handled as an alias, that is, when using dict() it is immediately replaced by dict(_, _). This is a means to avoid having to handle equivalent opaque types later. To be changed if it doesn't work well.
2014-02-17Merge branch 'bjorn/lc-warnings/OTP-11626'Björn Gustavsson
* bjorn/lc-warnings/OTP-11626: dialyzer: Silence useless warnings about list comprehensions
2014-02-07Merge branch 'kostis/dialyzer-r17c0-fixes'Henrik Nord
* kostis/dialyzer-r17c0-fixes: Shut off a dialyzer unmatched return warning Add a spec for a function that does not return
2014-02-06Add app-test and correct dialyzer.app.srcHans Bolinder
2014-02-05dialyzer: Silence useless warnings about list comprehensionsBjörn Gustavsson
Dialyzer will warn if the value of list comprehension is ignored by putting it in a sequence like this: [SomeSideEffect(E) || E <- Es], ok To avoid a warning, you'll have to write: _ = [SomeSideEffect(E) || E <- Es], ok Most of the time, this warning is merely annoying because it does not point out any real errors. Kostis Sagonas suggested that by suppressing the warning for list comprehension that return a list of a simple type (e.g. ['ok']), there would be no warning for code such as: [io:format("~p\n", [E]) || E <- Es], ok but there would be still be a warning for: [file:close(Fd) || Fd <- Fds], ok because an error condition is ignored.
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-31Add a spec for a function that does not returnKostis Sagonas
2014-01-29dialyzer: Remove dead codeBjörn-Egil Dahlberg
2014-01-29dialyzer: Reflect map_pair core changes in dialyzerBjörn-Egil Dahlberg
2014-01-28dialyzer,hipe,stdlib: Add Maps understanding to DialyzerBjörn-Egil Dahlberg
2014-01-28Merge branch 'hb/dialyzer/opaque_types_fixes/OTP-10397'Hans Bolinder
* hb/dialyzer/opaque_types_fixes/OTP-10397: [dialyzer] Re-work the handling of opaque types
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.
2014-01-14Fix an erroneous specKostis Sagonas
The branch that patched this file to handle the new "named funs" added an extra argument to the main function of the module but forgot to update its spec.
2013-12-20Merge remote-tracking branch 'origin/kostis/dialyzer_hipe-remove-gs'Dan Gudmundsson
2013-12-12Support non top level letrecs in dialyzerJosé Valim
Dialyzer so far only supported letrecs at the top-level and comprehension-like letrecs (i.e. that were directly applied) in their body. This commit address this issue by storing in the callgraph bound letrec labels pointing to their functions. This information is then used by the dataflow to properly lookup recursive definitions.
2013-11-13Remove the --wx option and promore the --gui to use the wx-based GUIKostis Sagonas
2013-11-13Remove the GS-based GUI of DialyzerKostis Sagonas
R17 will come without support for 'gs' so the old gs-based GUI of dialyzer has been removed.
2013-06-12Update copyright yearsBjörn-Egil Dahlberg
2013-04-24[dialyzer] Fix a bug concerning the --gui and --wx optionsHans Bolinder
A bug that made it impossible to do any analyses from the GUI has been fixed. The bug was introduced in dialyzer-2.5.2.
2013-04-10Merge branch 'sa/dialyzer-bitstring-fixes/OTP-11027' into maintFredrik Gustafsson
* sa/dialyzer-bitstring-fixes/OTP-11027: Minor refactorings Fix minor error in natively compiled module list Fix notification for duplicate modules Fix an error in the type inference of bitstring data
2013-04-08Minor refactoringsStavros Aronis
2013-04-08Fix minor error in natively compiled module listStavros Aronis
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. :-)
2013-04-08Fix notification for duplicate modulesStavros Aronis
Dialyzer fails when asked to analyze multiple modules with the same name, but the error message was erroneous. With this patch Dialyzer generates a correct error message. Bug reported and patch submitted by Maxim Treskin.
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-03-26Improve Dialyzer output for scan errorsMagnus Henoch
To reproduce, create an empty file "foo.erl" and run dialyzer on it. Results without this patch: $ dialyzer --src /tmp/foo.erl Checking whether the PLT /Users/magnus/.dialyzer_r16_plt is up-to-date... yes Proceeding with analysis... dialyzer: Analysis failed with error: Could not scan the following file(s): [{"/tmp/foo.erl", ["/tmp/foo.erl:1: no module definition\n"]}] Last messages in the log cache: Reading files and computing callgraph... Results with this patch: $ dialyzer --src /tmp/foo.erl Checking whether the PLT /Users/magnus/.dialyzer_r16_plt is up-to-date... yes Proceeding with analysis... dialyzer: Analysis failed with error: Could not scan the following file(s): /tmp/foo.erl:1: no module definition Last messages in the log cache: Reading files and computing callgraph...
2013-03-06Include module, function and arity in Dialyzer's "overlapping domain" warningsMagnus Henoch
The function name can give information that the line number doesn't, for example when using a parse transform that creates new functions.
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-19Native code compilation changesKostis Sagonas
Add more files to be compiled to native code and do the native code compilation in parallel if there are enough cores.
2013-02-19Code simplificationKostis Sagonas
2013-02-19Simplify a case construct using inequalityKostis Sagonas
2013-02-19Simplify a case construct using a boolean operatorKostis Sagonas
2013-02-19Code simplifications + take out obsolete noteKostis Sagonas
2013-02-15Minor refactoringStavros Aronis
2013-02-15Support for types with the same name and different arityStavros Aronis
2013-01-22Merge branch 'sa/dialyzer-list-spec/OTP-10740'Fredrik Gustafsson
* sa/dialyzer-list-spec/OTP-10740: Report spec discrepancy on mismatching lists
2013-01-15Implement ./otp_build configure --enable-silent-rulesAnthony Ramine
With silent rules, the output of make is less verbose and compilation warnings are easier to spot. Silent rules are disabled by default and can be disabled or enabled at will by make V=0 and make V=1.
2012-12-20Report spec discrepancy on mismatching listsStavros Aronis
This patch enables Dialyzer to detect cases where a function has a specification for a return type containing some list with elements different than the ones Dialyzer's own algorithm can infer e.g. a function specified to return [atom()] when actually [[atom()]] is returned. Previously Dialyzer remained silent, under normal operation, seeing that these two types have the empty list as a common element, so they were not 'completely irrelevant'.
2012-11-23Update copyright yearsBjörn-Egil Dahlberg
2012-10-03Merge branch 'maint'Henrik Nord
2012-09-26Fix a crash in race condition detectionStavros Aronis
Analysis is not always able to find the variable labels and names for any kind of arguments passed to the ets module functions.
2012-09-26Remove old untested experimental extensionStavros Aronis
This extension allowed minimal detection of race conditions that were passing through behaviour API calls, but had no tests in any suite and also caused a crash in R15B02.
2012-09-26Respect {plt_check,false} option when using dialyzer:run/1Stavros Aronis
2012-09-24dialyzer: Do not output warnings for unused funsHans Bolinder
Dialyzer no longer outputs warnings for unused anonymous functions ("funs"). Warnings are still output for unused functions. Funs in functions with -nowarn_unused_function attributes generated warnings for unused functions. Unused list comprehensions also generated warnings for unused funs.
2012-08-31Update copyright yearsBjörn-Egil Dahlberg
2012-08-24Stop a forgotten server processKostis Sagonas
Dialyzer forgot to stop a server process before finishing its analysis. This is a concurrency error detected by Concuerror.
2012-08-24Changes to fix warnings identified by running dialyzer -Wunmatched_returnsKostis Sagonas
2012-08-21Fix a bug in dialyzer_dataflowHans Bolinder
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.