Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 4371d3368644c35d973c1717a39b9bf2 > files > 28

ocaml-bisect-devel-1.3-7.mga4.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<link rel="stylesheet" href="style.css" type="text/css">
<meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type">
<link rel="Start" href="index.html">
<link rel="next" href="Common.html">
<link rel="Up" href="index.html">
<link title="Index of types" rel=Appendix href="index_types.html">
<link title="Index of exceptions" rel=Appendix href="index_exceptions.html">
<link title="Index of values" rel=Appendix href="index_values.html">
<link title="Index of class methods" rel=Appendix href="index_methods.html">
<link title="Index of class types" rel=Appendix href="index_class_types.html">
<link title="Index of modules" rel=Appendix href="index_modules.html">
<link title="Runtime" rel="Chapter" href="Runtime.html">
<link title="Common" rel="Chapter" href="Common.html">
<link title="Version" rel="Chapter" href="Version.html">
<link title="ReportXML" rel="Chapter" href="ReportXML.html">
<link title="ReportUtils" rel="Chapter" href="ReportUtils.html">
<link title="ReportHTML" rel="Chapter" href="ReportHTML.html">
<link title="CombineAST" rel="Chapter" href="CombineAST.html">
<link title="ReportStat" rel="Chapter" href="ReportStat.html">
<link title="ReportGeneric" rel="Chapter" href="ReportGeneric.html">
<link title="Combine" rel="Chapter" href="Combine.html">
<link title="ReportXMLEmma" rel="Chapter" href="ReportXMLEmma.html">
<link title="ReportDump" rel="Chapter" href="ReportDump.html">
<link title="ReportArgs" rel="Chapter" href="ReportArgs.html">
<link title="ReportCSV" rel="Chapter" href="ReportCSV.html">
<link title="CombineParser" rel="Chapter" href="CombineParser.html">
<link title="CombineLexer" rel="Chapter" href="CombineLexer.html">
<link title="ReportText" rel="Chapter" href="ReportText.html"><title>Runtime</title>
</head>
<body>
<div class="navbar">&nbsp;<a class="up" href="index.html" title="Index">Up</a>
&nbsp;<a class="post" href="Common.html" title="Common">Next</a>
</div>
<h1>Module <a href="type_Runtime.html">Runtime</a></h1>

<pre><span class="keyword">module</span> Runtime: <code class="code">sig</code> <a href="Runtime.html">..</a> <code class="code">end</code></pre><div class="info module top">
This module provides runtime support for Bisect. Instrumented programs
    should hence be linked with this module.
<p>

    This stateful module maintains counters associated with the various
    points of the instrumented program. Points are places in the source
    code, and associated counters indicate how many times the control flow
    of the program passed at the place.
<p>

    At initialization, this module determines the output file for coverage
    information and creates this file. It also registers a function using
    <code class="code">Pervasives.at_exit</code> to dump coverage information at program exit.
<p>

    The default base name is "bisect" in the current directory, but
    another base name can be specified using the "BISECT_FILE" environment
    variable. The actual file name is the first non-existing
    "&lt;base&gt;&lt;n&gt;.out" file where &lt;base&gt; is the base name and &lt;n&gt; a natural
    number value padded with zeroes to 4 digits (i.e. "0001", "0002", and
    so on).
<p>

    Another environment variable can be used to customize the behaviour of
    Bisect: "BISECT_SILENT". If this variable is set to "YES" or "ON"
    (ignoring case) then Bisect will not output any message (its default
    value is "OFF"). If not silent, Bisect will output a message on the
    standard error in various situations such as:<ul>
<li>when the file cannot be created at program initialization;</li>
<li>when the data cannot be written at program termination.</li>
</ul>

    Because of the initialization part of Bisect, one is advised to link
    this module as one of the first ones of the program. Indeed, when
    determining the output file for coverage data, the value of the
    current working directory may be used (if "BISECT_FILE" is not set, or
    if "BISECT_FILE" designates a relative path). As a consequence, the
    instrumented program should not modify the current directory before
    Bisect uses this value, or should modify it purposely.<br>
</div>
<hr width="100%">

<pre><span id="VALinit"><span class="keyword">val</span> init</span> : <code class="type">string -> unit</code></pre><div class="info ">
<code class="code">init file</code> indicates that the file <code class="code">file</code> is part of the application
    that has been instrumented.<br>
</div>

<pre><span id="VALinit_with_array"><span class="keyword">val</span> init_with_array</span> : <code class="type">string -> int array -> bool -> unit</code></pre><div class="info ">
<code class="code">init file marks unsafe</code> indicates that the file <code class="code">file</code> is part of the
    application that has been instrumented, using the passed array <code class="code">marks</code>
    to store marks. <code class="code">unsafe</code> indicates whether <code class="code">file</code> was compiled in
    unsafe mode.<br>
</div>

<pre><span id="VALmark"><span class="keyword">val</span> mark</span> : <code class="type">string -> int -> unit</code></pre><div class="info ">
<code class="code">mark file point</code> indicates that the point identified by the integer
    <code class="code">point</code> in the file <code class="code">file</code> has been <i>visited</i>. Its associated
    counter is thus incremented, except if its value is already equal to
    <code class="code">max_int</code>.<br>
</div>

<pre><span id="VALmark_array"><span class="keyword">val</span> mark_array</span> : <code class="type">string -> int array -> unit</code></pre><div class="info ">
<code class="code">mark_array file points</code> is equivalent to
    <code class="code">Array.iter (mark file) points</code>.<br>
</div>
</body></html>