[PPL-devel] [GIT] ppl/ppl(master): Minor corrections in the documentation for set_deterministic_timeout.

Enea Zaffanella zaffanella at cs.unipr.it
Fri Apr 13 10:54:10 CEST 2012


Module: ppl/ppl
Branch: master
Commit: 4ba2111047479b93493861aeede40ab50bb89b9d
URL:    http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=4ba2111047479b93493861aeede40ab50bb89b9d

Author: Enea Zaffanella <zaffanella at cs.unipr.it>
Date:   Fri Apr 13 10:53:41 2012 +0200

Minor corrections in the documentation for set_deterministic_timeout.

---

 interfaces/C/ppl_c_header.h                     |    2 +-
 interfaces/OCaml/OCaml_interface.dox            |   13 +++++++------
 interfaces/Prolog/Prolog_interface_sysindep.dox |    2 +-
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/interfaces/C/ppl_c_header.h b/interfaces/C/ppl_c_header.h
index db17060..c9d7e21 100644
--- a/interfaces/C/ppl_c_header.h
+++ b/interfaces/C/ppl_c_header.h
@@ -406,7 +406,7 @@ ppl_reset_timeout PPL_PROTO((void));
   If \p unscaled_weight has value \f$u\f$ and \p scale has value \f$s\f$,
   then the (scaled) weight threshold is computed as \f$w = u \cdot 2^s\f$.
   Computations taking exponential time will be interrupted some time
-  after reaching the complexity threshold \f$w\f$;
+  after reaching the complexity threshold \f$w\f$.
   If the computation is interrupted that way, the interrupted function
   will return error code <code>PPL_TIMEOUT_EXCEPTION</code>.
   Otherwise, if the computation completes without being interrupted,
diff --git a/interfaces/OCaml/OCaml_interface.dox b/interfaces/OCaml/OCaml_interface.dox
index 757ce02..8cb9c6f 100644
--- a/interfaces/OCaml/OCaml_interface.dox
+++ b/interfaces/OCaml/OCaml_interface.dox
@@ -215,13 +215,14 @@ included with all instantiations of the OCaml interfaces.
    Resets the timeout time so that the computation is not interrupted.
    An exception is thrown if the PPL Watchdog library is not enabled.
 
-<H2><CODE> ppl_set_deterministic_timeout weight </CODE></H2>
+<H2><CODE> ppl_set_deterministic_timeout unscaled_weight scale</CODE></H2>
    Computations taking exponential time will be interrupted some time
-   after reaching the <CODE>weight</CODE> complexity threshold.
-   If the computation is interrupted that way, a timeout exception
-   will be thrown.
-   An exception is immediately thrown if <CODE>weight</CODE> is not strictly
-   greater than zero, or if the PPL Watchdog library is not enabled.
+   after reaching the complexity threshold
+   \f$\mathrm{weight} = \mathrm{unscaled\_weight} \cdot 2^\mathrm{scale}\f$.
+   If the computation is interrupted that way, a timeout exception will
+   be thrown. <CODE>unscaled_weight</CODE> must be strictly greater than
+   zero; <CODE>scale</CODE> must be non-negative; an exception is thrown
+   if the computed weight threshold exceeds the maximum allowed value.
    <EM>NOTE:</EM> This "timeout" checking functionality is said to be
    <EM>deterministic</EM> because it is not based on actual elapsed time.
    Its behavior will only depend on (some of the) computations performed
diff --git a/interfaces/Prolog/Prolog_interface_sysindep.dox b/interfaces/Prolog/Prolog_interface_sysindep.dox
index 7a23ef7..482525f 100644
--- a/interfaces/Prolog/Prolog_interface_sysindep.dox
+++ b/interfaces/Prolog/Prolog_interface_sysindep.dox
@@ -421,7 +421,7 @@ that are included with all instantiations of the Prolog interfaces.
 
    <EM>Computations taking exponential time will be interrupted
    some time after reaching the complexity threshold
-   \f$\mathrm{Weight} = \mathrm{Unscaled_Weight} \cdot 2^\mathrm{Scale}\f$.
+   \f$\mathrm{Weight} = \mathrm{Unscaled\_Weight} \cdot 2^\mathrm{Scale}\f$.
    If the computation is interrupted that way, the current timeout
    exception atom will be thrown.
    <CODE>Unscaled_Weight</CODE> must be strictly greater than zero;




More information about the PPL-devel mailing list