[PPL-devel] [GIT] ppl/ppl(master): Fixed a bug in the Prolog interface whereby predicate ppl_set_deterministic_timeout /1.
Roberto Bagnara
bagnara at cs.unipr.it
Sat Apr 7 19:34:05 CEST 2012
Module: ppl/ppl
Branch: master
Commit: 0f021f3e7bd4d84cc2ebff07d41af4ae2ef5c9d3
URL: http://www.cs.unipr.it/git/gitweb.cgi?p=ppl/ppl.git;a=commit;h=0f021f3e7bd4d84cc2ebff07d41af4ae2ef5c9d3
Author: Roberto Bagnara <bagnara at cs.unipr.it>
Date: Sat Apr 7 19:33:27 2012 +0200
Fixed a bug in the Prolog interface whereby predicate ppl_set_deterministic_timeout/1.
It was flagging arguments bigger than 4294967295 as erroneous.
---
NEWS | 4 ++++
interfaces/Prolog/ppl_prolog_common.cc | 10 +++++-----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/NEWS b/NEWS
index 1b83c0f..8efb8a6 100644
--- a/NEWS
+++ b/NEWS
@@ -34,6 +34,10 @@ o Two BibTeX databases of papers related to the Parma Polyhedra Library
Bugfixes
========
+o Fixed a bug in the Prolog interface whereby predicate
+ ppl_set_deterministic_timeout/1 was flagging arguments bigger than
+ 4294967295 as erroneous.
+
o Minor documentation fixes.
o Portability improved.
diff --git a/interfaces/Prolog/ppl_prolog_common.cc b/interfaces/Prolog/ppl_prolog_common.cc
index af94425..47c45d3 100644
--- a/interfaces/Prolog/ppl_prolog_common.cc
+++ b/interfaces/Prolog/ppl_prolog_common.cc
@@ -1930,11 +1930,11 @@ ppl_set_deterministic_timeout(Prolog_term_ref t_weight) {
// In case a deterministic timeout was already set.
reset_deterministic_timeout();
static deterministic_timeout_exception e;
- unsigned weight
- = term_to_unsigned<unsigned>(t_weight,
- "ppl_set_deterministic_timeout/1");
- p_deterministic_timeout_object =
- new Weightwatch(weight, abandon_expensive_computations, e);
+ unsigned long long weight
+ = term_to_unsigned<unsigned long long>(t_weight,
+ "ppl_set_deterministic_timeout/1");
+ p_deterministic_timeout_object
+ = new Weightwatch(weight, abandon_expensive_computations, e);
return PROLOG_SUCCESS;
}
CATCH_ALL;
More information about the PPL-devel
mailing list