This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml"><head><title>InferModules__CTL (infer.InferModules__CTL)</title><linkrel="stylesheet"href="../../odoc.css"/><metacharset="utf-8"/><metaname="generator"content="odoc %%VERSION%%"/><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>» InferModules__CTL</nav><h1>Module <code>InferModules__CTL</code></h1><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></header><dl><dtclass="spec type"id="type-transitions"><ahref="#type-transitions"class="anchor"></a><code><spanclass="keyword">type</span> transitions</code><code> = </code><tableclass="variant"><trid="type-transitions.AccessorForProperty"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.AccessorForProperty"class="anchor"></a><code>| </code><code><spanclass="constructor">AccessorForProperty</span><spanclass="keyword">of</span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a></code></td><tdclass="doc"><p>decl to decl</p></td></tr><trid="type-transitions.Body"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.Body"class="anchor"></a><code>| </code><code><spanclass="constructor">Body</span></code></td><tdclass="doc"><p>decl to stmt</p></td></tr><trid="type-transitions.FieldName"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.FieldName"class="anchor"></a><code>| </code><code><spanclass="constructor">FieldName</span><spanclass="keyword">of</span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a></code></td><tdclass="doc"><p>stmt to stmt, decl to decl</p></td></tr><trid="type-transitions.Fields"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.Fields"class="anchor"></a><code>| </code><code><spanclass="constructor">Fields</span></code></td><tdclass="doc"><p>stmt to stmt, decl to decl</p></td></tr><trid="type-transitions.InitExpr"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.InitExpr"class="anchor"></a><code>| </code><code><spanclass="constructor">InitExpr</span></code></td><tdclass="doc"><p>decl to stmt</p></td></tr><trid="type-transitions.Super"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.Super"class="anchor"></a><code>| </code><code><spanclass="constructor">Super</span></code></td><tdclass="doc"><p>decl to decl</p></td></tr><trid="type-transitions.ParameterName"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.ParameterName"class="anchor"></a><code>| </code><code><spanclass="constructor">ParameterName</span><spanclass="keyword">of</span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a></code></td><tdclass="doc"><p>stmt to stmt, decl to decl</p></td></tr><trid="type-transitions.ParameterPos"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.ParameterPos"class="anchor"></a><code>| </code><code><spanclass="constructor">ParameterPos</span><spanclass="keyword">of</span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a></code></td><tdclass="doc"><p>stmt to stmt, decl to decl</p></td></tr><trid="type-transitions.Parameters"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.Parameters"class="anchor"></a><code>| </code><code><spanclass="constructor">Parameters</span></code></td><tdclass="doc"><p>stmt to stmt, decl to decl</p></td></tr><trid="type-transitions.Cond"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.Cond"class="anchor"></a><code>| </code><code><spanclass="constructor">Cond</span></code></td></tr><trid="type-transitions.PointerToDecl"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.PointerToDecl"class="anchor"></a><code>| </code><code><spanclass="constructor">PointerToDecl</span></code></td><tdclass="doc"><p>stmt to decl</p></td></tr><trid="type-transitions.Protocol"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.Protocol"class="anchor"></a><code>| </code><code><spanclass="constructor">Protocol</span></code></td><tdclass="doc"><p>decl to decl</p></td></tr><trid="type-transitions.SourceExpr"class="anchored"><tdclass="def constructor"><ahref="#type-transitions.SourceExpr"class="anchor"></a><code>| </code><code><spanclass="constructor">SourceExpr</span></code></td></tr></table></dt><dd><p>Transition labels used for example to switch from decl to stmt</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare_transitions"><ahref="#val-compare_transitions"class="anchor"></a><code><spanclass="keyword">val</span> compare_transitions : <ahref="index.html#type-transitions">transitions</a><span>-></span><ahref="index.html#type-transitions">transitions</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec type"id="type-t"><ahref="#type-t"class="anchor"></a><code><spanclass="keyword">type</span> t</code><code> = </code><tableclass="variant"><trid="type-t.True"class="anchored"><tdclass="def constructor"><ahref="#type-t.True"class="anchor"></a><code>| </code><code><spanclass="constructor">True</span></code></td></tr><trid="type-t.False"class="anchored"><tdclass="def constructor"><ahref="#type-t.False"class="anchor"></a><code>| </code><code><spanclass="constructor">False</span></code></td></tr><trid="type-t.Atomic"class="anchored"><tdclass="def constructor"><ahref="#type-t.Atomic"class="anchor"></a><code>| </code><code><spanclass="constructor">Atomic</span><spanclass="keyword">of</span><ahref="../InferModules/CPredicates/index.html#type-t">InferModules.CPredicates.t</a></code></td><tdclass="doc"><p>Atomic formula</p></td></tr><trid="type-t.Not"class="anchored"><tdclass="def constructor"><ahref="#type-t.Not"class="anchor"></a><code>| </code><code><spanclass="constructor">Not</span><spanclass="keyword">of</span><ahref="index.html#type-t">t</a></code></td></tr><trid="type-t.And"class="anchored"><tdclass="def constructor"><ahref="#type-t.And"class="anchor"></a><code>| </code><code><spanclass="constructor">And</span><spanclass="keyword">of</span><ahref="index.html#type-t">t</a> * <ahref="index.html#type-t">t</a></code></td></tr><trid="type-t.Or"class="anchored"><tdclass="def constructor"><ahref="#type-t.Or"class="anchor"></a><code>| </code><code><spanclass="constructor">Or</span><spanclass="keyword">of</span><ahref="index.html#type-t">t</a> * <ahref="index.html#type-t">t</a></code></td></tr><trid="type-t.Implies"class="anchored"><tdclass="def constructor"><ahref="#type-t.Implies"class="anchor"></a><code>| </code><code><spanclass="constructor">Implies</span><spanclass="keyword">of</span><ahref="index.html#type-t">t</a> * <ahref="index.html#type-t">t</a></code></td></tr><trid="type-t.InNode"class="anchored"><tdclass="def constructor"><ahref="#type-t.InNode"class="anchor"></a><code>| </code><code><spanclass="constructor">InNode</span><spanclass="keyword">of</span><span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a> list</span> * <ahref="index.html#type-t">t</a></code></td></tr><trid="type-t.AX"class="anchored"><tdclass="def constructor"><ahref="#type-t.AX"class="anchor"></a><code>| </code><code><spanclass="constructor">AX</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>AX phi <=> for all children of the current node phi holds</p></td></tr><trid="type-t.EX"class="anchored"><tdclass="def constructor"><ahref="#type-t.EX"class="anchor"></a><code>| </code><code><spanclass="constructor">EX</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>EX phi <=> exist a child of the current node such that phi holds</p></td></tr><trid="type-t.AF"class="anchored"><tdclass="def constructor"><ahref="#type-t.AF"class="anchor"></a><code>| </code><code><spanclass="constructor">AF</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>AF phi <=> for all path from the current node there is a descendant where phi holds</p></td></tr><trid="type-t.EF"class="anchored"><tdclass="def constructor"><ahref="#type-t.EF"class="anchor"></a><code>| </code><code><spanclass="constructor">EF</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>EF phi <=> there exits a a path from the current node with a descendant where phi hold</p></td></tr><trid="type-t.AG"class="anchored"><tdclass="def constructor"><ahref="#type-t.AG"class="anchor"></a><code>| </code><code><spanclass="constructor">AG</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>AG phi <=> for all discendant of the current node phi hold</p></td></tr><trid="type-t.EG"class="anchored"><tdclass="def constructor"><ahref="#type-t.EG"class="anchor"></a><code>| </code><code><spanclass="constructor">EG</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>EG phi <=> there exists a path (of descendants) from the current node where phi hold at each node of the path</p></td></tr><trid="type-t.AU"class="anchored"><tdclass="def constructor"><ahref="#type-t.AU"class="anchor"></a><code>| </code><code><spanclass="constructor">AU</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>AU(phi1, phi2) <=> for all paths from the current node phi1 holds in every node until ph2 holds</p></td></tr><trid="type-t.EU"class="anchored"><tdclass="def constructor"><ahref="#type-t.EU"class="anchor"></a><code>| </code><code><spanclass="constructor">EU</span><spanclass="keyword">of</span><span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>EU(phi1, phi2) <=> there exists a path from the current node such that phi1 holds until phi2 holds</p></td></tr><trid="type-t.EH"class="anchored"><tdclass="def constructor"><ahref="#type-t.EH"class="anchor"></a><code>| </code><code><spanclass="constructor">EH</span><spanclass="keyword">of</span><span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a> list</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>EH<code>classes</code>phi <=> there exists a node defining a super class in the hierarchy of the class defined by the current node (if any) where phi holds</p></td></tr><trid="type-t.ET"class="anchored"><tdclass="def constructor"><ahref="#type-t.ET"class="anchor"></a><code>| </code><code><spanclass="constructor">ET</span><spanclass="keyword">of</span><span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a> list</span> * <span><ahref="index.html#type-transitions">transitions</a> option</span> * <ahref="index.html#type-t">t</a></code></td><tdclass="doc"><p>ET <code>T</code><code>l</code> phi <=> there exists a descentant an of the current node such that an is of type in set T making a transition to a node an' via label l, such that in an phi holds.</p></td></tr><trid="type-t.InObjCClass"class="anchored"><tdclass="def constructor"><ahref="#type-t.InObjCClass"class="anchor"></a><code>| </code><code><spanclass="constructor">InObjCClass</span><spanclass="keyword">of</span><ahref="index.html#type-t">t</a> * <ahref="index.html#type-t">t</a></code></td></tr></table></dt><dd><p>A ctl formula</p></dd></dl><div><divclass="spec include"><divclass="doc"><dl><dtclass="spec value"id="val-compare"><ahref="#val-compare"class="anchor"></a><code><spanclass="keyword">val</span> compare : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> int</code></dt></dl></div></div></div><dl><dtclass="spec value"id="val-equal"><ahref="#val-equal"class="anchor"></a><code><spanclass="keyword">val</span> equal : <ahref="index.html#type-t">t</a><span>-></span><ahref="index.html#type-t">t</a><span>-></span> bool</code></dt></dl><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="../InferModules/ALVar/index.html#type-formula_id">InferModules.ALVar.formula_id</a> * <span><ahref="../InferModules/ALVar/index.html#type-t">InferModules.ALVar.t</a> list</span> * <ahref="index.html#type-t">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="../InferModules/ALVar/index.html#type-keyword">InferModules.ALVar.keyword</a> * <ahref="index.html#type-t">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="../InferModules/ALVar/index.html#type-keyword">InferModules.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="../InferModules/ALVar/index.html#type-t">InferModules.ALVar.t</a> list</span></code></td></tr></table></dt><dtclass="spec type"id="type-ctl_checker"><ahref="#type-ctl_checker"class="anchor"></a><code><spanclass="keyword">type</span> ctl_checker</code><code> = </code><code>{</code><tableclass="record"><trid="type-ctl_checker.id"class="anchored"><tdclass="def field"><ahref="#type-ctl_checker.id"class="anchor"></a><code>id : string;</code></td><tdclass="doc"><p>Checker's id</p></td></tr><trid="type-ctl_checker.definitions"class="anchored"><tdclass="def field"><ahref="#type-ctl_checker.definitions"class="anchor"></a><code>definitions : <span><ahref="index.html#type-clause">clause</a> list</span>;</code></td><tdclass="doc"><p>A list of let/set definitions</p></td></tr></table><code>}</code></dt><dtclass="spec type"id="type-al_file"><ahref="#type-al_file"class="anchor"></a><code><spanclass="keyword">type</span> al_file</code><code> = </code><code>{</code><tableclass="record"><trid="type-al_file.import_files"class="anchored"><tdclass="def field"><ahref="#type-al_file.import_files"class="anchor"></a><code>import_files : <span>string list</span>;</code></td></tr><trid="type-al_file.global_macros"class="anchored"><tdclass="def field"><ahref="#type-al_file.global_macros"class="anchor"></a><code>global_macros : <span><ahref="index.html#type-clause">clause</a> list</span>;</code></td></tr><trid="type-al_file.global_paths"class="anchored"><tdclass="def field"><ahref="#type-al_file.global_paths"class="anchor"></a><code>global_paths : <span><span>(string * <span><ahref="../InferModules/ALVar/index.html#type-alexp">InferModules.ALVar.alexp</a> list</span>)</span> list</span>;</code></td></tr><trid="type-al_file.checkers"class="anchored"><tdclass="def field"><ahref="#type-al_file.checkers"class="anchor"></a><code>checkers : <span><ahref="index.html#type-ctl_checker">ctl_checker</a> list</span>;</code></td></tr></table><code>}</code></dt></dl><dl><dtclass="spec value"id="val-print_checker"><ahref="#val-print_checker"class="anchor"></a><code><spanclass="keyword">val</span> print_checker : <ahref="index.html#type-ctl_checker">ctl_checker</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-eval_formula"><ahref="#val-eval_formula"class="anchor"></a><code><spanclass="keyword">val</span> eval_formula : <ahref="index.html#type-t">t</a><span>-></span><ahref="../InferModules/Ctl_parser_types/index.html#type-ast_node">InferModules.Ctl_parser_types.ast_node</a><span>-></span><ahref="../InferModules/CLintersContext/index.html#type-context">InferModules.CLintersContext.context</a><span>-></span><span><ahref="../InferModules/Ctl_parser_types/index.html#type-ast_node">InferModules.Ctl_parser_types.ast_node</a> option</span></code></dt><dd><p>return the evaluation of the formula and a witness</p></dd></dl><dl><dtclass="spec value"id="val-save_dotty_when_in_debug_mode"><ahref="#val-save_dotty_when_in_debug_mode"class="anchor"></a><code><spanclass="keyword">val</span> save_dotty_when_in_debug_mode : <ahref="../../InferBase/InferBase/SourceFile/index.html#type-t">InferBase.SourceFile.t</a><span>-></span> unit</code></dt><dtclass="spec value"id="val-next_state_via_transition"><ahref="#val-next_state_via_transition"class="anchor"></a><code><spanclass="keyword">val</span> next_state_via_transition : <ahref="../InferModules/Ctl_parser_types/index.html#type-ast_node">InferModules.Ctl_parser_types.ast_node</a><span>-></span><ahref="index.html#type-transitions">transitions</a><span>-></span><span><ahref="../InferModules/Ctl_parser_types/index.html#type-ast_node">InferModules.Ctl_parser_types.ast_node</a> list</span></code></dt><dtclass="spec value"id="val-create_ctl_evaluation_tracker"><ahref="#val-create_ctl_evaluation_tracker"class="anchor"></a><code><spanclass="keyword">val</span> create_ctl_evaluation_tracker : <ahref="../../InferBase/InferBase/SourceFile/index.html#type-t">InferBase.SourceFile.t</a><span>-></span> unit</code></dt></dl><divclass="spec module"id="module-Debug"><ahref="#module-Debug"class="anchor"></a><code><spanclass="keyword">module</span><ahref="Debug/index.html">Debug</a> : <spanclass="keyword">sig</span> ... <spanclass="keyword">end</span></code></div></div></body></html>