From a7e214bb01085492e330186295a71da35846a6b7 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Sun, 13 Feb 2011 20:50:29 -0800 Subject: Improved timeout in the BDD reachability engines. --- src/bdd/cudd/cuddAndAbs.c | 3 +++ src/bdd/cudd/cuddBddIte.c | 3 +++ src/bdd/cudd/cuddBridge.c | 5 +++++ 3 files changed, 11 insertions(+) (limited to 'src/bdd') diff --git a/src/bdd/cudd/cuddAndAbs.c b/src/bdd/cudd/cuddAndAbs.c index 39695918..2f38490d 100644 --- a/src/bdd/cudd/cuddAndAbs.c +++ b/src/bdd/cudd/cuddAndAbs.c @@ -259,6 +259,9 @@ cuddBddAndAbstractRecur( } } + if ( manager->TimeStop && manager->TimeStop < clock() ) + return NULL; + if (topf == top) { index = F->index; ft = cuddT(F); diff --git a/src/bdd/cudd/cuddBddIte.c b/src/bdd/cudd/cuddBddIte.c index 1b152f02..4e75aab2 100644 --- a/src/bdd/cudd/cuddBddIte.c +++ b/src/bdd/cudd/cuddBddIte.c @@ -926,6 +926,9 @@ cuddBddAndRecur( if (r != NULL) return(r); } + if ( manager->TimeStop && manager->TimeStop < clock() ) + return NULL; + /* Here we can skip the use of cuddI, because the operands are known ** to be non-constant. */ diff --git a/src/bdd/cudd/cuddBridge.c b/src/bdd/cudd/cuddBridge.c index d0f96a2f..97a6f393 100644 --- a/src/bdd/cudd/cuddBridge.c +++ b/src/bdd/cudd/cuddBridge.c @@ -975,6 +975,11 @@ cuddBddTransferRecur( /* Check the cache. */ if (st_lookup(table, (const char *)f, (char **)&res)) return(Cudd_NotCond(res,comple)); + + if ( ddS->TimeStop && ddS->TimeStop < clock() ) + return NULL; + if ( ddD->TimeStop && ddD->TimeStop < clock() ) + return NULL; /* Recursive step. */ index = f->index; -- cgit v1.2.3