Skip to content

Commit

Permalink
Merge branch 'ks/hipe' into ccase/r13b04_dev
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
Erlang/OTP committed Feb 17, 2010
2 parents edac07f + abe48c2 commit 8b39d05
Show file tree
Hide file tree
Showing 45 changed files with 2,800 additions and 1,039 deletions.
4 changes: 1 addition & 3 deletions lib/dialyzer/README
Expand Up @@ -3,9 +3,7 @@
## Author(s): Tobias Lindahl <tobias.lindahl@it.uu.se>
## Kostis Sagonas <kostis@it.uu.se>
##
## Copyright: Held by the authors; all rights reserved (2004 - 2009).
##
## $Id$
## Copyright: Held by the authors; all rights reserved (2004 - 2010).
##----------------------------------------------------------------------------

The DIALYZER, a DIscrepany AnaLYZer for ERlang programs.
Expand Down
18 changes: 16 additions & 2 deletions lib/dialyzer/RELEASE_NOTES
Expand Up @@ -3,11 +3,25 @@
(in reversed chronological order)
==============================================================================

Version 2.2.0 (in Erlang/OTP R13B04)
------------------------------------
- Much better support for opaque types (thanks to Manouk Manoukian).
- Added support for recursive types (experimental).
- Added support for parameterized modules.
- Dialyzer now warns when -specs state that a function returns some type
when in fact it does not.
- Added --no_native (-nn) option so that the user can bypass the native code
compilation that dialyzer heuristically performs when dialyzing many files.
- Fixed minor bug in the dialyzer script allowing the --wx option to bring
up the wx-based GUI regardless of its placement in the options list.
- Options --apps and -Wrace_conditions, which were added in the previous
version, are now properly documented in the manual.

Version 2.1.0 (in Erlang/OTP R13B03)
------------------------------------
- Dialyzer can statically detect some kinds of data races in Erlang programs.
Use the new option -Wrace_conditions to enable the race analysis.
The technique is described in a paper which is available at:
The static analysis technique is described in a paper available at:
http://www.it.uu.se/research/group/hipe/dialyzer/publications/races.pdf
- Added support for packages (thanks to Maria Christakis).
- There has been a major change in the default mode of Dialyzer.
Expand All @@ -27,7 +41,7 @@ Version 2.1.0 (in Erlang/OTP R13B03)
The new option can also take absolute file names as well as applications.
Note that the application versions that will be included in the PLT are
those that correspond to the Erlang/OTP system which is used.
- Dialyzer has a new wxWidgets based GUI (thanks to Elli Frangaki)
- Dialyzer has a new wxWidgets based GUI (thanks to Elli Fragkaki)
for platforms where the wx application is available.

Version 2.0.0 (in Erlang/OTP R13B02)
Expand Down
82 changes: 53 additions & 29 deletions lib/dialyzer/doc/manual.txt
Expand Up @@ -2,8 +2,6 @@
## File: doc/manual.txt
## Author(s): Tobias Lindahl <tobiasl@it.uu.se>
## Kostis Sagonas <kostis@it.uu.se>
##
## $Id$
##----------------------------------------------------------------------------

The DIALYZER, a DIscrepany AnaLYZer for ERlang programs.
Expand Down Expand Up @@ -126,22 +124,29 @@ The exit status of the command line version is:

Usage: dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
[-pa dir]* [--plt plt] [-Ddefine]* [-I include_dir]*
[--output_plt file] [-Wwarn]* [--src]
[-c applications] [-r applications] [-o outfile]
[--build_plt] [--add_to_plt] [--remove_from_plt] [--check_plt]
[--plt_info] [--get_warnings]
[--output_plt file] [-Wwarn]* [--src] [--gui | --wx]
[files_or_dirs] [-r dirs] [--apps applications] [-o outfile]
[--build_plt] [--add_to_plt] [--remove_from_plt]
[--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
[--no_native]

Options:
-c applications (or --command-line applications)
Use Dialyzer from the command line (no GUI) to detect defects in the
specified applications (directories or .erl or .beam files)
-r applications
Same as -c only that directories are searched recursively for
subdirectories containing .erl or .beam files (depending on the
type of analysis)
-o outfile (or --output outfile)
When using Dialyzer from the command line, send the analysis
results in the specified \"outfile\" rather than in stdout
files_or_dirs (for backwards compatibility also as: -c files_or_dirs)
Use Dialyzer from the command line to detect defects in the
specified files or directories containing .erl or .beam files,
depending on the type of the analysis
-r dirs
Same as the previous but the specified directories are searched
recursively for subdirectories containing .erl or .beam files in
them, depending on the type of analysis
--apps applications
Option typically used when building or modifying PLT as in:
dialyzer --build_plt --apps erts kernel stdlib mnesia ...
to conveniently refer to library applications corresponding to the
Erlang/OTP installation. However, the option is general and can also
be used during analysis in order to refer to Erlang/OTP applications.
In addition, file or directory names can also be included, as in:
dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam
--raw
When using Dialyzer from the command line, output the raw analysis
results (Erlang terms) instead of the formatted result.
Expand All @@ -154,14 +159,14 @@ Options:
When analyzing from source, pass the define to Dialyzer (**)
-I include_dir
When analyzing from source, pass the include_dir to Dialyzer (**)
-pa dir
Include dir in the path for Erlang (useful when analyzing files
that have '-include_lib()' directives)
--output_plt file
Store the plt at the specified file after building it
--plt plt
Use the specified plt as the initial plt (if the plt was built
during setup the files will be checked for consistency)
-pa dir
Include dir in the path for Erlang (useful when analyzing files
that have '-include_lib()' directives)
-Wwarn
A family of options which selectively turn on/off warnings
(for help on the names of warnings use dialyzer -Whelp)
Expand Down Expand Up @@ -200,6 +205,19 @@ Options:
--get_warnings
Makes Dialyzer emit warnings even when manipulating the plt. Only
emits warnings for files that are actually analyzed.
--dump_callgraph file
Dump the call graph into the specified file whose format is determined
by the file name extension. Supported extensions are: raw, dot, and ps.
If something else is used as file name extension, default format '.raw'
will be used.
--no_native (or -nn)
Bypass the native code compilation of some key files that dialyzer
heuristically performs when dialyzing many files; this avoids the
compilation time but it may result in (much) longer analysis time.
--gui
Use the gs-based GUI.
--wx
Use the wx-based GUI.

Note:
* denotes that multiple occurrences of these options are possible.
Expand All @@ -221,14 +239,22 @@ Warning options:
Include warnings for function calls which ignore the return value(s).
-Werror_handling ***
Include warnings for functions that only return by means of an exception.
-Wrace_conditions ***
Include warnings for possible race conditions.
-Wbehaviours ***
Include warnings about behaviour callbacks which drift from the published
recommended interfaces.
-Wunderspecs ***
Warn about underspecified functions
(the -spec is strictly more allowing than the success typing)
(those whose -spec is strictly more allowing than the success typing).

The following options are also available but their use is not recommended:
(they are mostly for Dialyzer developers and internal debugging)
-Woverspecs ***
Warn about overspecified functions
(the -spec is strictly less allowing than the success typing)
(those whose -spec is strictly less allowing than the success typing).
-Wspecdiffs ***
Warn when the -spec is different than the success typing
Warn when the -spec is different than the success typing.

Note:
*** These are options that turn on warnings rather than turning them off.
Expand Down Expand Up @@ -307,9 +333,7 @@ are using frequently.
The PLT is built using the --build_plt option to dialyzer. The
following command builds the recommended minimal PLT for OTP.

dialyzer --build_plt -r $ERL_TOP/lib/stdlib/ebin\
$ERL_TOP/lib/kernel/ebin\
$ERL_TOP/lib/mnesia/ebin
dialyzer --build_plt --apps erts kernel stdlib mnesia

Dialyzer will look if there is an environment variable called
$DIALYZER_PLT and place the PLT at this location. If no such variable
Expand All @@ -321,22 +345,22 @@ You can also add information to an existing plt using the --add_to_plt
option. Suppose you want to also include the compiler in the PLT and
place it in a new PLT, then give the command

dialyzer --add_to_plt -r $ERL_TOP/lib/compiler/ebin --output_plt my.plt
dialyzer --add_to_plt --apps compiler --output_plt my.plt

Then you would like to add your favorite application my_app to the new
plt.

dialyzer --add_to_plt --plt my.plt -r <path>/my_app/ebin
dialyzer --add_to_plt --plt my.plt -r <path>/my_app/ebin

But you realize that it is unnecessary to have compiler in this one.

dialyzer --remove_from_plt --plt my.plt -r $ERL_TOP/lib/compiler/ebin
dialyzer --remove_from_plt --plt my.plt ---apps compiler

Later, when you have fixed a bug in your application my_app, you want
to update the plt so that it will be fresh the next time you run
Dialyzer, run the command

dialyzer --check_plt --plt my.plt
dialyzer --check_plt --plt my.plt

Dialyzer will then reanalyze the files that have been changed, and the
files that depend on these files. Note that this consistency check
Expand Down
3 changes: 1 addition & 2 deletions lib/dialyzer/doc/src/Makefile
Expand Up @@ -13,8 +13,7 @@
# Portions created by Ericsson are Copyright 1999, Ericsson Utvecklings
# AB. All Rights Reserved.''
#
# $Id$
#

include $(ERL_TOP)/make/target.mk
include $(ERL_TOP)/make/$(TARGET)/otp.mk

Expand Down
2 changes: 0 additions & 2 deletions lib/dialyzer/doc/warnings.txt
Expand Up @@ -2,8 +2,6 @@
## File: doc/warnings.txt
## Author(s): Tobias Lindahl <tobiasl@it.uu.se>
## Kostis Sagonas <kostis@it.uu.se>
##
## $Id$
##----------------------------------------------------------------------------


Expand Down
12 changes: 7 additions & 5 deletions lib/dialyzer/src/Makefile
@@ -1,19 +1,19 @@
#
# %CopyrightBegin%
#
# Copyright Ericsson AB 2006-2009. All Rights Reserved.
#
#
# Copyright Ericsson AB 2006-2010. All Rights Reserved.
#
# The contents of this file are subject to the Erlang Public License,
# Version 1.1, (the "License"); you may not use this file except in
# compliance with the License. You should have received a copy of the
# Erlang Public License along with this software. If not, it can be
# retrieved online at http://www.erlang.org/.
#
#
# Software distributed under the License is distributed on an "AS IS"
# basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
# the License for the specific language governing rights and limitations
# under the License.
#
#
# %CopyrightEnd%
#
#=============================================================================
Expand Down Expand Up @@ -48,6 +48,7 @@ DIALYZER_DIR = $(ERL_TOP)/lib/dialyzer
MODULES = \
dialyzer \
dialyzer_analysis_callgraph \
dialyzer_behaviours \
dialyzer_callgraph \
dialyzer_cl \
dialyzer_cl_parse \
Expand Down Expand Up @@ -128,6 +129,7 @@ $(APPUP_TARGET): $(APPUP_SRC) ../vsn.mk
$(EBIN)/dialyzer.beam: dialyzer.hrl
$(EBIN)/dialyzer_analysis_callgraph.beam: dialyzer.hrl
$(EBIN)/dialyzer_callgraph.beam: dialyzer.hrl
$(EBIN)/dialyzer_behaviours.beam: dialyzer.hrl
$(EBIN)/dialyzer_cl.beam: dialyzer.hrl ../../kernel/include/file.hrl
$(EBIN)/dialyzer_cl_parse.beam: dialyzer.hrl
$(EBIN)/dialyzer_codeserver.beam: dialyzer.hrl
Expand Down
15 changes: 9 additions & 6 deletions lib/dialyzer/src/dialyzer.app.src
@@ -1,20 +1,20 @@
%% This is an -*- erlang -*- file.
%%
%% %CopyrightBegin%
%%
%% Copyright Ericsson AB 2006-2009. All Rights Reserved.
%%
%%
%% Copyright Ericsson AB 2006-2010. All Rights Reserved.
%%
%% The contents of this file are subject to the Erlang Public License,
%% Version 1.1, (the "License"); you may not use this file except in
%% compliance with the License. You should have received a copy of the
%% Erlang Public License along with this software. If not, it can be
%% retrieved online at http://www.erlang.org/.
%%
%%
%% Software distributed under the License is distributed on an "AS IS"
%% basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
%% the License for the specific language governing rights and limitations
%% under the License.
%%
%%
%% %CopyrightEnd%
%%

Expand All @@ -23,20 +23,23 @@
{vsn, "%VSN%"},
{modules, [dialyzer,
dialyzer_analysis_callgraph,
dialyzer_behaviours,
dialyzer_callgraph,
dialyzer_cl,
dialyzer_cl_parse,
dialyzer_codeserver,
dialyzer_contracts,
dialyzer_dataflow,
dialyzer_dep,
dialyzer_explanation,
dialyzer_gui,
dialyzer_gui_wx,
dialyzer_options,
dialyzer_plt,
dialyzer_races,
dialyzer_succ_typings,
dialyzer_typesig,
dialyzer_utils]},
{registered, []},
{applications, [compiler, gs, hipe, kernel, stdlib]},
{applications, [compiler, gs, hipe, kernel, stdlib, wx]},
{env, []}]}.

0 comments on commit 8b39d05

Please sign in to comment.