免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2468 | 回复: 6

[函数] 【dialyzer】 win7 [复制链接]

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
发表于 2015-03-10 21:49 |显示全部楼层
Erlang的类型系统
a.png

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
发表于 2015-03-10 21:51 |显示全部楼层
  1.   Creating PLT c:/Users/Administrator/Desktop/.dialyzer_plt ...
  2. Unknown functions:
  3.   compile:file/2
  4.   compile:forms/2
  5.   compile:noenv_forms/2
  6.   compile:output_generated/1
  7.   crypto:block_decrypt/4
  8.   crypto:start/0
  9. Unknown types:
  10.   compile:option/0
  11. done in 3m1.35s
  12. done (passed successfully)
复制代码

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
发表于 2015-03-10 21:52 |显示全部楼层
通过dialyzer我们可能用来检测我们的程序

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
发表于 2015-03-10 21:53 |显示全部楼层
  1. -date... yes
  2.   Proceeding with analysis...
  3. validate.erl:27: Call to missing or unexported function io:f/0
  4. Unknown functions:
  5.   crypto:sha/1
  6. done in 0m0.70s
  7. done (warnings were emitted)
复制代码

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
发表于 2015-03-10 21:56 |显示全部楼层
同样的还有typer
  1. typer: Analysis failed with error report:
  2. v.erl:3: can't find include lib "include/v.hrl"
  3. v.erl:4: can't find include lib "include/s.hrl"
复制代码

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
发表于 2015-03-10 21:58 |显示全部楼层
  1. D:\program\erlang>typer --help
  2. Usage: typer [--help] [--version] [--plt PLT] [--edoc]
  3.               [--show | --show-exported | --annotate | --annotate-inc-files]
  4.               [-Ddefine]* [-I include_dir]* [-pa dir]* [-pz dir]*
  5.               [-T application]* [-r] file*

  6. Options:
  7.    -r dir*
  8.        search directories recursively for .erl files below them
  9.    --show
  10.        Prints type specifications for all functions on stdout.
  11.        (this is the default behaviour; this option is not really needed)
  12.    --show-exported (or --show_exported)
  13.        Same as --show, but prints specifications for exported functions only
  14.        Specs are displayed sorted alphabetically on the function's name
  15.    --annotate
  16.        Annotates the specified files with type specifications
  17.    --annotate-inc-files
  18.        Same as --annotate but annotates all -include() files as well as
  19.        all .erl files (use this option with caution - has not been tested much)
  20.    --edoc
  21.        Prints type information as Edoc @spec comments, not as type specs
  22.    --plt PLT
  23.        Use the specified dialyzer PLT file rather than the default one
  24.    -T file*
  25.        The specified file(s) already contain type specifications and these
  26.        are to be trusted in order to print specs for the rest of the files
  27.        (Multiple files or dirs, separated by spaces, can be specified.)
  28.    -Dname (or -Dname=value)
  29.        pass the defined name(s) to TypEr
  30.        (The syntax of defines is the same as that used by "erlc".)
  31.    -I include_dir
  32.        pass the include_dir to TypEr
  33.        (The syntax of includes is the same as that used by "erlc".)
  34.    -pa dir
  35.    -pz dir
  36.        Set code path options to TypEr
  37.        (This is useful for files that use parse tranforms.)
  38.    --version (or -v)
  39.        prints the Typer version and exits
  40.    --help (or -h)
  41.        prints this message and exits

  42. Note:
  43.    * denotes that multiple occurrences of these options are possible.
复制代码

论坛徽章:
27
水瓶座
日期:2014-08-22 21:06:34程序设计版块每日发帖之星
日期:2015-11-25 06:20:0015-16赛季CBA联赛之新疆
日期:2015-12-19 19:05:48IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:31IT运维版块每日发帖之星
日期:2015-12-25 06:20:3315-16赛季CBA联赛之上海
日期:2016-04-15 19:51:31程序设计版块每日发帖之星
日期:2016-04-17 06:23:29程序设计版块每日发帖之星
日期:2016-04-23 06:20:00程序设计版块每日发帖之星
日期:2016-05-26 06:20:00每日论坛发贴之星
日期:2016-05-26 06:20:0015-16赛季CBA联赛之辽宁
日期:2017-02-16 23:59:47
发表于 2015-03-10 21:59 |显示全部楼层
  1. Usage: dialyzer [--help] [--version] [--shell] [--quiet] [--verbose]
  2.                 [-pa dir]* [--plt plt] [--plts plt*] [-Ddefine]*
  3.                 [-I include_dir]* [--output_plt file] [-Wwarn]* [--raw]
  4.                 [--src] [--gui] [files_or_dirs] [-r dirs]
  5.                 [--apps applications] [-o outfile]
  6.                 [--build_plt] [--add_to_plt] [--remove_from_plt]
  7.                 [--check_plt] [--no_check_plt] [--plt_info] [--get_warnings]
  8.                 [--dump_callgraph file] [--no_native] [--fullpath]
  9.                 [--statistics]
  10. Options:
  11.   files_or_dirs (for backwards compatibility also as: -c files_or_dirs)
  12.       Use Dialyzer from the command line to detect defects in the
  13.       specified files or directories containing .erl or .beam files,
  14.       depending on the type of the analysis.
  15.   -r dirs
  16.       Same as the previous but the specified directories are searched
  17.       recursively for subdirectories containing .erl or .beam files in
  18.       them, depending on the type of analysis.
  19.   --apps applications
  20.       Option typically used when building or modifying a plt as in:
  21.         dialyzer --build_plt --apps erts kernel stdlib mnesia ...
  22.       to conveniently refer to library applications corresponding to the
  23.       Erlang/OTP installation. However, the option is general and can also
  24.       be used during analysis in order to refer to Erlang/OTP applications.
  25.       In addition, file or directory names can also be included, as in:
  26.         dialyzer --apps inets ssl ./ebin ../other_lib/ebin/my_module.beam
  27.   -o outfile (or --output outfile)
  28.       When using Dialyzer from the command line, send the analysis
  29.       results to the specified outfile rather than to stdout.
  30.   --raw
  31.       When using Dialyzer from the command line, output the raw analysis
  32.       results (Erlang terms) instead of the formatted result.
  33.       The raw format is easier to post-process (for instance, to filter
  34.       warnings or to output HTML pages).
  35.   --src
  36.       Override the default, which is to analyze BEAM files, and
  37.       analyze starting from Erlang source code instead.
  38.   -Dname (or -Dname=value)
  39.       When analyzing from source, pass the define to Dialyzer. (**)
  40.   -I include_dir
  41.       When analyzing from source, pass the include_dir to Dialyzer. (**)
  42.   -pa dir
  43.       Include dir in the path for Erlang (useful when analyzing files
  44.       that have '-include_lib()' directives).
  45.   --output_plt file
  46.       Store the plt at the specified file after building it.
  47.   --plt plt
  48.       Use the specified plt as the initial plt (if the plt was built
  49.       during setup the files will be checked for consistency).
  50.   --plts plt*
  51.       Merge the specified plts to create the initial plt -- requires
  52.       that the plts are disjoint (i.e., do not have any module
  53.       appearing in more than one plt).
  54.       The plts are created in the usual way:
  55.         dialyzer --build_plt --output_plt plt_1 files_to_include
  56.         ...
  57.         dialyzer --build_plt --output_plt plt_n files_to_include
  58.       and then can be used in either of the following ways:
  59.         dialyzer files_to_analyze --plts plt_1 ... plt_n
  60.       or:
  61.         dialyzer --plts plt_1 ... plt_n -- files_to_analyze
  62.       (Note the -- delimiter in the second case)
  63.   -Wwarn
  64.       A family of options which selectively turn on/off warnings
  65.       (for help on the names of warnings use dialyzer -Whelp).
  66.   --shell
  67.       Do not disable the Erlang shell while running the GUI.
  68.   --version (or -v)
  69.       Print the Dialyzer version and some more information and exit.
  70.   --help (or -h)
  71.       Print this message and exit.
  72.   --quiet (or -q)
  73.       Make Dialyzer a bit more quiet.
  74.   --verbose
  75.       Make Dialyzer a bit more verbose.
  76.   --statistics
  77.       Prints information about the progress of execution (analysis phases,
  78.       time spent in each and size of the relative input).
  79.   --build_plt
  80.       The analysis starts from an empty plt and creates a new one from the
  81.       files specified with -c and -r. Only works for beam files.
  82.       Use --plt(s) or --output_plt to override the default plt location.
  83.   --add_to_plt
  84.       The plt is extended to also include the files specified with -c and -r.
  85.       Use --plt(s) to specify which plt to start from, and --output_plt to
  86.       specify where to put the plt. Note that the analysis might include
  87.       files from the plt if they depend on the new files.
  88.       This option only works with beam files.
  89.   --remove_from_plt
  90.       The information from the files specified with -c and -r is removed
  91.       from the plt. Note that this may cause a re-analysis of the remaining
  92.       dependent files.
  93.   --check_plt
  94.       Check the plt for consistency and rebuild it if it is not up-to-date.
  95.       Actually, this option is of rare use as it is on by default.
  96.   --no_check_plt (or -n)
  97.       Skip the plt check when running Dialyzer. Useful when working with
  98.       installed plts that never change.
  99.   --plt_info
  100.       Make Dialyzer print information about the plt and then quit. The plt
  101.       can be specified with --plt(s).
  102.   --get_warnings
  103.       Make Dialyzer emit warnings even when manipulating the plt. Warnings
  104.       are only emitted for files that are actually analyzed.
  105.   --dump_callgraph file
  106.       Dump the call graph into the specified file whose format is determined
  107.       by the file name extension. Supported extensions are: raw, dot, and ps.
  108.       If something else is used as file name extension, default format '.raw'
  109.       will be used.
  110.   --no_native (or -nn)
  111.       Bypass the native code compilation of some key files that Dialyzer
  112.       heuristically performs when dialyzing many files; this avoids the
  113.       compilation time but it may result in (much) longer analysis time.
  114.   --fullpath
  115.       Display the full path names of files for which warnings are emitted.
  116.   --gui
  117.       Use the GUI.

  118. Note:
  119.   * denotes that multiple occurrences of these options are possible.
  120. ** options -D and -I work both from command-line and in the Dialyzer GUI;
  121.     the syntax of defines and includes is the same as that used by "erlc".

  122. Warning options:
  123.   -Wno_return
  124.      Suppress warnings for functions that will never return a value.
  125.   -Wno_unused
  126.      Suppress warnings for unused functions.
  127.   -Wno_improper_lists
  128.      Suppress warnings for construction of improper lists.
  129.   -Wno_fun_app
  130.      Suppress warnings for fun applications that will fail.
  131.   -Wno_match
  132.      Suppress warnings for patterns that are unused or cannot match.
  133.   -Wno_opaque
  134.      Suppress warnings for violations of opaqueness of data types.
  135.   -Wno_fail_call
  136.      Suppress warnings for failing calls.
  137.   -Wno_contracts
  138.      Suppress warnings about invalid contracts.
  139.   -Wno_behaviours
  140.      Suppress warnings about behaviour callbacks which drift from the published
  141.      recommended interfaces.
  142.   -Wno_undefined_callbacks
  143.      Suppress warnings about behaviours that have no -callback attributes for
  144.      their callbacks.
  145.   -Wunmatched_returns ***
  146.      Include warnings for function calls which ignore a structured return
  147.      value or do not match against one of many possible return value(s).
  148.   -Werror_handling ***
  149.      Include warnings for functions that only return by means of an exception.
  150.   -Wrace_conditions ***
  151.      Include warnings for possible race conditions.
  152.   -Wunderspecs ***
  153.      Warn about underspecified functions
  154.      (those whose -spec is strictly more allowing than the success typing).

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

  162. *** Identifies options that turn on warnings rather than turning them off.

  163. The exit status of the command line version is:
  164.   0 - No problems were encountered during the analysis and no
  165.       warnings were emitted.
  166.   1 - Problems were encountered during the analysis.
  167.   2 - No problems were encountered, but warnings were emitted.
复制代码
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP