Reported as "Expensive Autoreleasepool Size" by [cost](/docs/next/checker-cost).
\[EXPERIMENTAL\] This warning indicates that non-constant and non-top ObjC autoreleasepool's size in
the procedure. By default, this issue type is disabled.
## EXPENSIVE_EXECUTION_TIME
Reported as "Expensive Execution Time" by [cost](/docs/next/checker-cost).
\[EXPERIMENTAL\] This warning indicates that non-constant and non-top execution time complexity of
the procedure. By default, this issue type is disabled.
## EXPENSIVE_LOOP_INVARIANT_CALL
## EXPENSIVE_LOOP_INVARIANT_CALL
Reported as "Expensive Loop Invariant Call" by [loop-hoisting](/docs/next/checker-loop-hoisting).
Reported as "Expensive Loop Invariant Call" by [loop-hoisting](/docs/next/checker-loop-hoisting).
@ -1189,6 +1237,24 @@ weak pointer to `self`. Possibly the developer meant to capture only `weakSelf`
to avoid a retain cycle, but made a typo and used `self` as well in the block,
to avoid a retain cycle, but made a typo and used `self` as well in the block,
instead of `strongSelf`. In this case, this could cause a retain cycle.
instead of `strongSelf`. In this case, this could cause a retain cycle.
## MODIFIES_IMMUTABLE
Reported as "Modifies Immutable" by [impurity](/docs/next/checker-impurity).
This issue type indicates modifications to fields marked as @Immutable. For instance, below function `mutateArray` would be marked as modifying immutable field `testArray`:
```java
@Immutable int[] testArray = new int[]{0, 1, 2, 4};
int[] getTestArray() {
return testArray;
}
void mutateArray() {
int[] array = getTestArray();
array[2] = 7;
}
```
## MULTIPLE_WEAKSELF
## MULTIPLE_WEAKSELF
Reported as "Multiple WeakSelf Use" by [self-in-block](/docs/next/checker-self-in-block).
Reported as "Multiple WeakSelf Use" by [self-in-block](/docs/next/checker-self-in-block).
@ -1426,6 +1492,11 @@ An example of such variadic methods is
In this example, if `str` is `nil` then an array `@[@"aaa"]` of size 1 will be
In this example, if `str` is `nil` then an array `@[@"aaa"]` of size 1 will be
created, and not an array `@[@"aaa", str, @"bbb"]` of size 3 as expected.
created, and not an array `@[@"aaa", str, @"bbb"]` of size 3 as expected.
## PULSE_UNINITIALIZED_VALUE
Reported as "Unitialized Value" by [pulse](/docs/next/checker-pulse).
See [UNITIALIZED_VALUE](#uninitialized_value). Re-implemented using Pulse.
## PURE_FUNCTION
## PURE_FUNCTION
Reported as "Pure Function" by [purity](/docs/next/checker-purity).
Reported as "Pure Function" by [purity](/docs/next/checker-purity).
Cost analysis statically estimates an upper bound on the worst-case execution cost of a program (WCET). This page gives an overview of how the analysis works for *Java* code. The analyser also has limited support for C/C++ and Objective-C.
Cost analysis statically estimates an upper bound on the worst-case execution cost of a program (WCET). This page gives an overview of how the analysis works for *Java* code. The analyser also has limited support for C/C++ and Objective-C.
@ -96,5 +97,7 @@ The following issue types are reported by this checker:
This is an experimental inter-procedural analysis that detects impure functions. It is meant to be an improvement over the [purity](/docs/next/checker-purity) analysis with a negation on the issue types. For each function, impurity analysis keeps track of not only the impurity of the function but also some additional information such as which parameters/globals the function modifies. It models functions with no summary/model as impure. The analysis relies on [Pulse](/docs/next/checker-pulse) summaries to determine impurity.
This is an experimental inter-procedural analysis that detects impure functions. It is meant to be an improvement over the [purity](/docs/next/checker-purity) analysis with a negation on the issue types. For each function, impurity analysis keeps track of not only the impurity of the function but also some additional information such as which parameters/globals the function modifies. It models functions with no summary/model as impure. The analysis relies on [Pulse](/docs/next/checker-pulse) summaries to determine impurity.
@ -18,3 +19,4 @@ This is an experimental inter-procedural analysis that detects impure functions.
The following issue types are reported by this checker:
The following issue types are reported by this checker:
@ -10,6 +10,7 @@ Activate with `--litho-required-props`.
Supported languages:
Supported languages:
- C/C++/ObjC: No
- C/C++/ObjC: No
- Java: Yes
- Java: Yes
- C#/.Net: Yes
This analysis checks that all non-optional [`@Prop`](https://fblitho.com/docs/props)`s have been specified when constructing Litho components. This is a [Litho](https://fblitho.com/) specific checker.
This analysis checks that all non-optional [`@Prop`](https://fblitho.com/docs/props)`s have been specified when constructing Litho components. This is a [Litho](https://fblitho.com/) specific checker.
This checker detects opportunities to hoist function calls that are invariant to outside of loop bodies. The hoisting analysis relies on [purity](/docs/next/checker-purity) analysis to determine whather a function is pure or not.
This checker detects opportunities to hoist function calls that are invariant to outside of loop bodies. The hoisting analysis relies on [purity](/docs/next/checker-purity) analysis to determine whather a function is pure or not.
This is an experimental inter-procedural analysis that detects pure (side-effect free) functions. For each function, purity analysis keeps track of not only the purity of the function but also some additional information such as whether the function modifies a global variable or which of the parameters are modified. It models functions with no summary/model as modifying the global state (hence impure).
This is an experimental inter-procedural analysis that detects pure (side-effect free) functions. For each function, purity analysis keeps track of not only the purity of the function but also some additional information such as whether the function modifies a global variable or which of the parameters are modified. It models functions with no summary/model as modifying the global state (hence impure).
@ -10,6 +10,7 @@ Activate with `--resource-leak-lab`.
Supported languages:
Supported languages:
- C/C++/ObjC: No
- C/C++/ObjC: No
- Java: Yes
- Java: Yes
- C#/.Net: Yes
This toy checker does nothing by default. Hack on it to make it report resource leaks! See the [lab instructions](https://github.com/facebook/infer/blob/master/infer/src/labs/README.md).
This toy checker does nothing by default. Hack on it to make it report resource leaks! See the [lab instructions](https://github.com/facebook/infer/blob/master/infer/src/labs/README.md).
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage (infer.ASTLanguage)</title><linkrel="stylesheet"href="../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="index.html">Up</a>–<ahref="index.html">infer</a>» ASTLanguage</nav><h1id="ast-language-(al)"><ahref="#ast-language-(al)"class="anchor"></a>AST Language (AL)</h1><p>Linter framework based on the <ahref="ClangFrontend.html">Clang frontend</a>.</p><p>All modules: <ahref="ASTLanguage/index.html"><code>ASTLanguage</code></a></p></header></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage (infer.ASTLanguage)</title><linkrel="stylesheet"href="../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="index.html">Up</a>–<ahref="index.html">infer</a>» ASTLanguage</nav><h1id="ast-language-(al)"><ahref="#ast-language-(al)"class="anchor"></a>AST Language (AL)</h1><p>Linter framework based on the <ahref="ClangFrontend.html">Clang frontend</a>.</p><p>All modules: <ahref="ASTLanguage/index.html"><code>ASTLanguage</code></a></p></header></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>CTL (infer.ASTLanguage.CTL)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» CTL</nav><h1>Module <code>ASTLanguage.CTL</code></h1></header><aside><p>This module defines a language to define checkers. These checkers are interpreted over the AST of the program. A checker is defined by a CTL formula which expresses a condition saying when the checker should report a problem.</p></aside><dl><dtclass="spec type"id="type-clause"><ahref="#type-clause"class="anchor"></a><code><spanclass="keyword">type</span> clause</code><code> = </code><tableclass="variant"><trid="type-clause.CLet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CLet"class="anchor"></a><code>| </code><code><spanclass="constructor">CLet</span><spanclass="keyword">of</span><ahref="../ALVar/index.html#type-formula_id">ALVar.formula_id</a> * <span><ahref="../ALVar/index.html#type-t">ALVar.t</a> list</span> * <ahref="../CTLTypes/index.html#type-t">CTLTypes.t</a></code></td><tdclass="doc"><p>Let clause: let id = definifion;</p></td></tr><trid="type-clause.CSet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CSet"class="anchor"></a><code>| </code><code><spanclass="constructor">CSet</span><spanclass="keyword">of</span><ahref="../ALVar/index.html#type-keyword">ALVar.keyword</a> * <ahref="../CTLTypes/index.html#type-t">CTLTypes.t</a></code></td><tdclass="doc"><p>Set clause: set id = definition</p></td></tr><trid="type-clause.CDesc"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CDesc"class="anchor"></a><code>| </code><code><spanclass="constructor">CDesc</span><spanclass="keyword">of</span><ahref="../ALVar/index.html#type-keyword">ALVar.keyword</a> * string</code></td><tdclass="doc"><p>Description clause eg: set message = "..."</p></td></tr><trid="type-clause.CPath"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CPath"class="anchor"></a><code>| </code><code><spanclass="constructor">CPath</span><spanclass="keyword">of</span><span>[ `WhitelistPath <span>| `BlacklistPath</span> ]</span> * <span><ahref="../ALVar/index.html#type-t">ALVar.t</a> list</span></code></td></tr></table></dt><dd><p>"set" clauses are used for defining mandatory variables that will be used by when reporting issues: eg for defining the condition.</p><p>"desc" clauses are used for defining the error message, the suggestion, the severity.</p><p>"let" clauses are used to define temporary formulas which are then used to abbreviate the another formula. For example</p><pre> let f = a And B
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>CTL (infer.ASTLanguage.CTL)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» CTL</nav><h1>Module <code>ASTLanguage.CTL</code></h1></header><aside><p>This module defines a language to define checkers. These checkers are interpreted over the AST of the program. A checker is defined by a CTL formula which expresses a condition saying when the checker should report a problem.</p></aside><dl><dtclass="spec type"id="type-clause"><ahref="#type-clause"class="anchor"></a><code><spanclass="keyword">type</span> clause</code><code> = </code><tableclass="variant"><trid="type-clause.CLet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CLet"class="anchor"></a><code>| </code><code><spanclass="constructor">CLet</span><spanclass="keyword">of</span><ahref="../ALVar/index.html#type-formula_id">ALVar.formula_id</a> * <span><ahref="../ALVar/index.html#type-t">ALVar.t</a> list</span> * <ahref="../CTLTypes/index.html#type-t">CTLTypes.t</a></code></td><tdclass="doc"><p>Let clause: let id = definifion;</p></td></tr><trid="type-clause.CSet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CSet"class="anchor"></a><code>| </code><code><spanclass="constructor">CSet</span><spanclass="keyword">of</span><ahref="../ALVar/index.html#type-keyword">ALVar.keyword</a> * <ahref="../CTLTypes/index.html#type-t">CTLTypes.t</a></code></td><tdclass="doc"><p>Set clause: set id = definition</p></td></tr><trid="type-clause.CDesc"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CDesc"class="anchor"></a><code>| </code><code><spanclass="constructor">CDesc</span><spanclass="keyword">of</span><ahref="../ALVar/index.html#type-keyword">ALVar.keyword</a> * string</code></td><tdclass="doc"><p>Description clause eg: set message = "..."</p></td></tr><trid="type-clause.CPath"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CPath"class="anchor"></a><code>| </code><code><spanclass="constructor">CPath</span><spanclass="keyword">of</span><span>[ `WhitelistPath <span>| `BlacklistPath</span> ]</span> * <span><ahref="../ALVar/index.html#type-t">ALVar.t</a> list</span></code></td></tr></table></dt><dd><p>"set" clauses are used for defining mandatory variables that will be used by when reporting issues: eg for defining the condition.</p><p>"desc" clauses are used for defining the error message, the suggestion, the severity.</p><p>"let" clauses are used to define temporary formulas which are then used to abbreviate the another formula. For example</p><pre> let f = a And B
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>CTLExceptions (infer.ASTLanguage.CTLExceptions)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» CTLExceptions</nav><h1>Module <code>ASTLanguage.CTLExceptions</code></h1></header><dl><dtclass="spec exception"id="exception-ALParserInvariantViolationException"><ahref="#exception-ALParserInvariantViolationException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALParserInvariantViolationException</span><spanclass="keyword">of</span> string</code></dt><dd><p>Raised when the parser encounters a violation of a certain invariant</p></dd></dl><dl><dtclass="spec type"id="type-exc_info"><ahref="#type-exc_info"class="anchor"></a><code><spanclass="keyword">type</span> exc_info</code></dt></dl><dl><dtclass="spec exception"id="exception-ALFileException"><ahref="#exception-ALFileException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALFileException</span><spanclass="keyword">of</span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dd><p>Raised when any exception from the lexer/parser of AL is caught, to include source-location info</p></dd></dl><dl><dtclass="spec value"id="val-create_exc_info"><ahref="#val-create_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> create_exc_info : string <span>-></span> Stdlib.Lexing.lexbuf <span>-></span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dtclass="spec value"id="val-json_of_exc_info"><ahref="#val-json_of_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> json_of_exc_info : <ahref="index.html#type-exc_info">exc_info</a><span>-></span> Yojson.Basic.t</code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>CTLExceptions (infer.ASTLanguage.CTLExceptions)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» CTLExceptions</nav><h1>Module <code>ASTLanguage.CTLExceptions</code></h1></header><dl><dtclass="spec exception"id="exception-ALParserInvariantViolationException"><ahref="#exception-ALParserInvariantViolationException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALParserInvariantViolationException</span><spanclass="keyword">of</span> string</code></dt><dd><p>Raised when the parser encounters a violation of a certain invariant</p></dd></dl><dl><dtclass="spec type"id="type-exc_info"><ahref="#type-exc_info"class="anchor"></a><code><spanclass="keyword">type</span> exc_info</code></dt></dl><dl><dtclass="spec exception"id="exception-ALFileException"><ahref="#exception-ALFileException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALFileException</span><spanclass="keyword">of</span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dd><p>Raised when any exception from the lexer/parser of AL is caught, to include source-location info</p></dd></dl><dl><dtclass="spec value"id="val-create_exc_info"><ahref="#val-create_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> create_exc_info : string <span>-></span> Stdlib.Lexing.lexbuf <span>-></span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dtclass="spec value"id="val-json_of_exc_info"><ahref="#val-json_of_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> json_of_exc_info : <ahref="index.html#type-exc_info">exc_info</a><span>-></span> Yojson.Basic.t</code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ComponentKit (infer.ASTLanguage.ComponentKit)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» ComponentKit</nav><h1>Module <code>ASTLanguage.ComponentKit</code></h1></header><dl><dtclass="spec value"id="val-contains_ck_impl"><ahref="#val-contains_ck_impl"class="anchor"></a><code><spanclass="keyword">val</span> contains_ck_impl : <span><ahref="../../ATDGenerated/Clang_ast_t/index.html#type-decl">ATDGenerated.Clang_ast_t.decl</a> list</span><span>-></span> bool</code></dt><dd><p>Returns true if the passed-in list of decls contains an ObjCImplementationDecl of a descendant of CKComponent or CKComponentController.</p><p>Does not recurse into hierarchy.</p></dd></dl><dl><dtclass="spec value"id="val-mutable_local_vars_advice"><ahref="#val-mutable_local_vars_advice"class="anchor"></a><code><spanclass="keyword">val</span> mutable_local_vars_advice : <ahref="../CLintersContext/index.html#type-context">CLintersContext.context</a><span>-></span><ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../CIssue/index.html#type-t">CIssue.t</a> option</span></code></dt><dtclass="spec value"id="val-component_with_multiple_factory_methods_advice"><ahref="#val-component_with_multiple_factory_methods_advice"class="anchor"></a><code><spanclass="keyword">val</span> component_with_multiple_factory_methods_advice : <ahref="../CLintersContext/index.html#type-context">CLintersContext.context</a><span>-></span><ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../CIssue/index.html#type-t">CIssue.t</a> list</span></code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ComponentKit (infer.ASTLanguage.ComponentKit)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» ComponentKit</nav><h1>Module <code>ASTLanguage.ComponentKit</code></h1></header><dl><dtclass="spec value"id="val-contains_ck_impl"><ahref="#val-contains_ck_impl"class="anchor"></a><code><spanclass="keyword">val</span> contains_ck_impl : <span><ahref="../../ATDGenerated/Clang_ast_t/index.html#type-decl">ATDGenerated.Clang_ast_t.decl</a> list</span><span>-></span> bool</code></dt><dd><p>Returns true if the passed-in list of decls contains an ObjCImplementationDecl of a descendant of CKComponent or CKComponentController.</p><p>Does not recurse into hierarchy.</p></dd></dl><dl><dtclass="spec value"id="val-mutable_local_vars_advice"><ahref="#val-mutable_local_vars_advice"class="anchor"></a><code><spanclass="keyword">val</span> mutable_local_vars_advice : <ahref="../CLintersContext/index.html#type-context">CLintersContext.context</a><span>-></span><ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../CIssue/index.html#type-t">CIssue.t</a> option</span></code></dt><dtclass="spec value"id="val-component_with_multiple_factory_methods_advice"><ahref="#val-component_with_multiple_factory_methods_advice"class="anchor"></a><code><spanclass="keyword">val</span> component_with_multiple_factory_methods_advice : <ahref="../CLintersContext/index.html#type-context">CLintersContext.context</a><span>-></span><ahref="../Ctl_parser_types/index.html#type-ast_node">Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../CIssue/index.html#type-t">CIssue.t</a> list</span></code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>RegisterCallback (infer.ASTLanguage.RegisterCallback)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» RegisterCallback</nav><h1>Module <code>ASTLanguage.RegisterCallback</code></h1></header><dl><dtclass="spec value"id="val-register_frontend_checks"><ahref="#val-register_frontend_checks"class="anchor"></a><code><spanclass="keyword">val</span> register_frontend_checks : unit <span>-></span> unit</code></dt><dd><p>call this before running the clang frontend</p></dd></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>RegisterCallback (infer.ASTLanguage.RegisterCallback)</title><linkrel="stylesheet"href="../../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../../index.html">infer</a>»<ahref="../index.html">ASTLanguage</a>» RegisterCallback</nav><h1>Module <code>ASTLanguage.RegisterCallback</code></h1></header><dl><dtclass="spec value"id="val-register_frontend_checks"><ahref="#val-register_frontend_checks"class="anchor"></a><code><spanclass="keyword">val</span> register_frontend_checks : unit <span>-></span> unit</code></dt><dd><p>call this before running the clang frontend</p></dd></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__CTL (infer.ASTLanguage__CTL)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__CTL</nav><h1>Module <code>ASTLanguage__CTL</code></h1></header><aside><p>This module defines a language to define checkers. These checkers are interpreted over the AST of the program. A checker is defined by a CTL formula which expresses a condition saying when the checker should report a problem.</p></aside><dl><dtclass="spec type"id="type-clause"><ahref="#type-clause"class="anchor"></a><code><spanclass="keyword">type</span> clause</code><code> = </code><tableclass="variant"><trid="type-clause.CLet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CLet"class="anchor"></a><code>| </code><code><spanclass="constructor">CLet</span><spanclass="keyword">of</span><ahref="../ASTLanguage/ALVar/index.html#type-formula_id">ASTLanguage.ALVar.formula_id</a> * <span><ahref="../ASTLanguage/ALVar/index.html#type-t">ASTLanguage.ALVar.t</a> list</span> * <ahref="../ASTLanguage/CTLTypes/index.html#type-t">ASTLanguage.CTLTypes.t</a></code></td><tdclass="doc"><p>Let clause: let id = definifion;</p></td></tr><trid="type-clause.CSet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CSet"class="anchor"></a><code>| </code><code><spanclass="constructor">CSet</span><spanclass="keyword">of</span><ahref="../ASTLanguage/ALVar/index.html#type-keyword">ASTLanguage.ALVar.keyword</a> * <ahref="../ASTLanguage/CTLTypes/index.html#type-t">ASTLanguage.CTLTypes.t</a></code></td><tdclass="doc"><p>Set clause: set id = definition</p></td></tr><trid="type-clause.CDesc"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CDesc"class="anchor"></a><code>| </code><code><spanclass="constructor">CDesc</span><spanclass="keyword">of</span><ahref="../ASTLanguage/ALVar/index.html#type-keyword">ASTLanguage.ALVar.keyword</a> * string</code></td><tdclass="doc"><p>Description clause eg: set message = "..."</p></td></tr><trid="type-clause.CPath"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CPath"class="anchor"></a><code>| </code><code><spanclass="constructor">CPath</span><spanclass="keyword">of</span><span>[ `WhitelistPath <span>| `BlacklistPath</span> ]</span> * <span><ahref="../ASTLanguage/ALVar/index.html#type-t">ASTLanguage.ALVar.t</a> list</span></code></td></tr></table></dt><dd><p>"set" clauses are used for defining mandatory variables that will be used by when reporting issues: eg for defining the condition.</p><p>"desc" clauses are used for defining the error message, the suggestion, the severity.</p><p>"let" clauses are used to define temporary formulas which are then used to abbreviate the another formula. For example</p><pre> let f = a And B
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__CTL (infer.ASTLanguage__CTL)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__CTL</nav><h1>Module <code>ASTLanguage__CTL</code></h1></header><aside><p>This module defines a language to define checkers. These checkers are interpreted over the AST of the program. A checker is defined by a CTL formula which expresses a condition saying when the checker should report a problem.</p></aside><dl><dtclass="spec type"id="type-clause"><ahref="#type-clause"class="anchor"></a><code><spanclass="keyword">type</span> clause</code><code> = </code><tableclass="variant"><trid="type-clause.CLet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CLet"class="anchor"></a><code>| </code><code><spanclass="constructor">CLet</span><spanclass="keyword">of</span><ahref="../ASTLanguage/ALVar/index.html#type-formula_id">ASTLanguage.ALVar.formula_id</a> * <span><ahref="../ASTLanguage/ALVar/index.html#type-t">ASTLanguage.ALVar.t</a> list</span> * <ahref="../ASTLanguage/CTLTypes/index.html#type-t">ASTLanguage.CTLTypes.t</a></code></td><tdclass="doc"><p>Let clause: let id = definifion;</p></td></tr><trid="type-clause.CSet"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CSet"class="anchor"></a><code>| </code><code><spanclass="constructor">CSet</span><spanclass="keyword">of</span><ahref="../ASTLanguage/ALVar/index.html#type-keyword">ASTLanguage.ALVar.keyword</a> * <ahref="../ASTLanguage/CTLTypes/index.html#type-t">ASTLanguage.CTLTypes.t</a></code></td><tdclass="doc"><p>Set clause: set id = definition</p></td></tr><trid="type-clause.CDesc"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CDesc"class="anchor"></a><code>| </code><code><spanclass="constructor">CDesc</span><spanclass="keyword">of</span><ahref="../ASTLanguage/ALVar/index.html#type-keyword">ASTLanguage.ALVar.keyword</a> * string</code></td><tdclass="doc"><p>Description clause eg: set message = "..."</p></td></tr><trid="type-clause.CPath"class="anchored"><tdclass="def constructor"><ahref="#type-clause.CPath"class="anchor"></a><code>| </code><code><spanclass="constructor">CPath</span><spanclass="keyword">of</span><span>[ `WhitelistPath <span>| `BlacklistPath</span> ]</span> * <span><ahref="../ASTLanguage/ALVar/index.html#type-t">ASTLanguage.ALVar.t</a> list</span></code></td></tr></table></dt><dd><p>"set" clauses are used for defining mandatory variables that will be used by when reporting issues: eg for defining the condition.</p><p>"desc" clauses are used for defining the error message, the suggestion, the severity.</p><p>"let" clauses are used to define temporary formulas which are then used to abbreviate the another formula. For example</p><pre> let f = a And B
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__CTLExceptions (infer.ASTLanguage__CTLExceptions)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__CTLExceptions</nav><h1>Module <code>ASTLanguage__CTLExceptions</code></h1></header><dl><dtclass="spec exception"id="exception-ALParserInvariantViolationException"><ahref="#exception-ALParserInvariantViolationException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALParserInvariantViolationException</span><spanclass="keyword">of</span> string</code></dt><dd><p>Raised when the parser encounters a violation of a certain invariant</p></dd></dl><dl><dtclass="spec type"id="type-exc_info"><ahref="#type-exc_info"class="anchor"></a><code><spanclass="keyword">type</span> exc_info</code></dt></dl><dl><dtclass="spec exception"id="exception-ALFileException"><ahref="#exception-ALFileException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALFileException</span><spanclass="keyword">of</span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dd><p>Raised when any exception from the lexer/parser of AL is caught, to include source-location info</p></dd></dl><dl><dtclass="spec value"id="val-create_exc_info"><ahref="#val-create_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> create_exc_info : string <span>-></span> Stdlib.Lexing.lexbuf <span>-></span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dtclass="spec value"id="val-json_of_exc_info"><ahref="#val-json_of_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> json_of_exc_info : <ahref="index.html#type-exc_info">exc_info</a><span>-></span> Yojson.Basic.t</code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__CTLExceptions (infer.ASTLanguage__CTLExceptions)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__CTLExceptions</nav><h1>Module <code>ASTLanguage__CTLExceptions</code></h1></header><dl><dtclass="spec exception"id="exception-ALParserInvariantViolationException"><ahref="#exception-ALParserInvariantViolationException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALParserInvariantViolationException</span><spanclass="keyword">of</span> string</code></dt><dd><p>Raised when the parser encounters a violation of a certain invariant</p></dd></dl><dl><dtclass="spec type"id="type-exc_info"><ahref="#type-exc_info"class="anchor"></a><code><spanclass="keyword">type</span> exc_info</code></dt></dl><dl><dtclass="spec exception"id="exception-ALFileException"><ahref="#exception-ALFileException"class="anchor"></a><code><spanclass="keyword">exception</span></code><code><spanclass="exception">ALFileException</span><spanclass="keyword">of</span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dd><p>Raised when any exception from the lexer/parser of AL is caught, to include source-location info</p></dd></dl><dl><dtclass="spec value"id="val-create_exc_info"><ahref="#val-create_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> create_exc_info : string <span>-></span> Stdlib.Lexing.lexbuf <span>-></span><ahref="index.html#type-exc_info">exc_info</a></code></dt><dtclass="spec value"id="val-json_of_exc_info"><ahref="#val-json_of_exc_info"class="anchor"></a><code><spanclass="keyword">val</span> json_of_exc_info : <ahref="index.html#type-exc_info">exc_info</a><span>-></span> Yojson.Basic.t</code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__ComponentKit (infer.ASTLanguage__ComponentKit)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__ComponentKit</nav><h1>Module <code>ASTLanguage__ComponentKit</code></h1></header><dl><dtclass="spec value"id="val-contains_ck_impl"><ahref="#val-contains_ck_impl"class="anchor"></a><code><spanclass="keyword">val</span> contains_ck_impl : <span><ahref="../ATDGenerated/Clang_ast_t/index.html#type-decl">ATDGenerated.Clang_ast_t.decl</a> list</span><span>-></span> bool</code></dt><dd><p>Returns true if the passed-in list of decls contains an ObjCImplementationDecl of a descendant of CKComponent or CKComponentController.</p><p>Does not recurse into hierarchy.</p></dd></dl><dl><dtclass="spec value"id="val-mutable_local_vars_advice"><ahref="#val-mutable_local_vars_advice"class="anchor"></a><code><spanclass="keyword">val</span> mutable_local_vars_advice : <ahref="../ASTLanguage/CLintersContext/index.html#type-context">ASTLanguage.CLintersContext.context</a><span>-></span><ahref="../ASTLanguage/Ctl_parser_types/index.html#type-ast_node">ASTLanguage.Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../ASTLanguage/CIssue/index.html#type-t">ASTLanguage.CIssue.t</a> option</span></code></dt><dtclass="spec value"id="val-component_with_multiple_factory_methods_advice"><ahref="#val-component_with_multiple_factory_methods_advice"class="anchor"></a><code><spanclass="keyword">val</span> component_with_multiple_factory_methods_advice : <ahref="../ASTLanguage/CLintersContext/index.html#type-context">ASTLanguage.CLintersContext.context</a><span>-></span><ahref="../ASTLanguage/Ctl_parser_types/index.html#type-ast_node">ASTLanguage.Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../ASTLanguage/CIssue/index.html#type-t">ASTLanguage.CIssue.t</a> list</span></code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__ComponentKit (infer.ASTLanguage__ComponentKit)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__ComponentKit</nav><h1>Module <code>ASTLanguage__ComponentKit</code></h1></header><dl><dtclass="spec value"id="val-contains_ck_impl"><ahref="#val-contains_ck_impl"class="anchor"></a><code><spanclass="keyword">val</span> contains_ck_impl : <span><ahref="../ATDGenerated/Clang_ast_t/index.html#type-decl">ATDGenerated.Clang_ast_t.decl</a> list</span><span>-></span> bool</code></dt><dd><p>Returns true if the passed-in list of decls contains an ObjCImplementationDecl of a descendant of CKComponent or CKComponentController.</p><p>Does not recurse into hierarchy.</p></dd></dl><dl><dtclass="spec value"id="val-mutable_local_vars_advice"><ahref="#val-mutable_local_vars_advice"class="anchor"></a><code><spanclass="keyword">val</span> mutable_local_vars_advice : <ahref="../ASTLanguage/CLintersContext/index.html#type-context">ASTLanguage.CLintersContext.context</a><span>-></span><ahref="../ASTLanguage/Ctl_parser_types/index.html#type-ast_node">ASTLanguage.Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../ASTLanguage/CIssue/index.html#type-t">ASTLanguage.CIssue.t</a> option</span></code></dt><dtclass="spec value"id="val-component_with_multiple_factory_methods_advice"><ahref="#val-component_with_multiple_factory_methods_advice"class="anchor"></a><code><spanclass="keyword">val</span> component_with_multiple_factory_methods_advice : <ahref="../ASTLanguage/CLintersContext/index.html#type-context">ASTLanguage.CLintersContext.context</a><span>-></span><ahref="../ASTLanguage/Ctl_parser_types/index.html#type-ast_node">ASTLanguage.Ctl_parser_types.ast_node</a><span>-></span><span><ahref="../ASTLanguage/CIssue/index.html#type-t">ASTLanguage.CIssue.t</a> list</span></code></dt></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__RegisterCallback (infer.ASTLanguage__RegisterCallback)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__RegisterCallback</nav><h1>Module <code>ASTLanguage__RegisterCallback</code></h1></header><dl><dtclass="spec value"id="val-register_frontend_checks"><ahref="#val-register_frontend_checks"class="anchor"></a><code><spanclass="keyword">val</span> register_frontend_checks : unit <span>-></span> unit</code></dt><dd><p>call this before running the clang frontend</p></dd></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ASTLanguage__RegisterCallback (infer.ASTLanguage__RegisterCallback)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="../index.html">Up</a>–<ahref="../index.html">infer</a>» ASTLanguage__RegisterCallback</nav><h1>Module <code>ASTLanguage__RegisterCallback</code></h1></header><dl><dtclass="spec value"id="val-register_frontend_checks"><ahref="#val-register_frontend_checks"class="anchor"></a><code><spanclass="keyword">val</span> register_frontend_checks : unit <span>-></span> unit</code></dt><dd><p>call this before running the clang frontend</p></dd></dl></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ATDGenerated (infer.ATDGenerated)</title><linkrel="stylesheet"href="../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.1"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="index.html">Up</a>–<ahref="index.html">infer</a>» ATDGenerated</nav><h1id="library-atdgenerated"><ahref="#library-atdgenerated"class="anchor"></a>Library ATDGenerated</h1><p>Source code that is generated from ATD definitions.</p><p>The entry point of this library is the module <ahref="ATDGenerated/index.html"><code>ATDGenerated</code></a>.</p></header></div></body></html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>ATDGenerated (infer.ATDGenerated)</title><linkrel="stylesheet"href="../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc 1.5.2"/><metaname="viewport"content="width=device-width,initial-scale=1.0"/><scriptsrc="../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><divclass="content"><header><nav><ahref="index.html">Up</a>–<ahref="index.html">infer</a>» ATDGenerated</nav><h1id="library-atdgenerated"><ahref="#library-atdgenerated"class="anchor"></a>Library ATDGenerated</h1><p>Source code that is generated from ATD definitions.</p><p>The entry point of this library is the module <ahref="ATDGenerated/index.html"><code>ATDGenerated</code></a>.</p></header></div></body></html>