catch warnings
This commit is contained in:
parent
6d2e2597b1
commit
e9eb030bb6
@ -9201,9 +9201,11 @@ Yap_absmi(int inp)
|
||||
GONext();
|
||||
}
|
||||
}
|
||||
break;
|
||||
case (CELL)FunctorLongInt:
|
||||
PREG = NEXTOP(PREG, xl);
|
||||
GONext();
|
||||
break;
|
||||
default:
|
||||
PREG = PREG->u.xl.F;
|
||||
GONext();
|
||||
|
@ -1201,7 +1201,7 @@ char* getFileName(const char *function) {
|
||||
DdNode* LineParser(DdManager *manager, namedvars varmap, DdNode **inter, int maxinter, char *function, int iline) {
|
||||
int istart, iend, ilength, i, symbol, ivar, inegvar, inegoper, iconst;
|
||||
long startAt, endAt;
|
||||
double secs;
|
||||
//double secs;
|
||||
DdNode *bdd;//, *temp;
|
||||
char *term, curoper;
|
||||
bdd = HIGH(manager);
|
||||
@ -1269,7 +1269,7 @@ DdNode* LineParser(DdManager *manager, namedvars varmap, DdNode **inter, int max
|
||||
} else {
|
||||
switch(curoper) {
|
||||
case '+':
|
||||
if (inegvar ^ inegoper) ; else {
|
||||
if (!(inegvar ^ inegoper)) {
|
||||
bdd = HIGH(manager);
|
||||
Cudd_Ref(bdd);
|
||||
}
|
||||
@ -1281,12 +1281,12 @@ DdNode* LineParser(DdManager *manager, namedvars varmap, DdNode **inter, int max
|
||||
}
|
||||
break;
|
||||
case '#':
|
||||
if (inegvar ^ inegoper) ; else bdd = NOT(bdd);
|
||||
if (!(inegvar ^ inegoper)) bdd = NOT(bdd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
endAt = clock();
|
||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
//secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||
if (bdd == NULL) {
|
||||
@ -1318,7 +1318,7 @@ DdNode* LineParser(DdManager *manager, namedvars varmap, DdNode **inter, int max
|
||||
if (inegvar) bdd = BDD_Operator(manager, NOT(inter[ivar]), bdd, curoper, inegoper);
|
||||
else bdd = BDD_Operator(manager, inter[ivar], bdd, curoper, inegoper);
|
||||
endAt = clock();
|
||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
//secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||
if (bdd == NULL) {
|
||||
@ -1513,7 +1513,7 @@ DdNode* OnlineGenerateBDD(DdManager *manager, namedvars *varmap) {
|
||||
DdNode* OnlineLineParser(DdManager *manager, namedvars *varmap, DdNode **inter, int maxinter, char *function, int iline) {
|
||||
int istart, iend, ilength, i, symbol, ivar, inegvar, inegoper, iconst;
|
||||
long startAt, endAt;
|
||||
double secs;
|
||||
//double secs;
|
||||
DdNode *bdd;
|
||||
char *term, curoper;
|
||||
bdd = HIGH(manager);
|
||||
@ -1581,7 +1581,7 @@ DdNode* OnlineLineParser(DdManager *manager, namedvars *varmap, DdNode **inter,
|
||||
} else {
|
||||
switch(curoper) {
|
||||
case '+':
|
||||
if (inegvar ^ inegoper) ; else {
|
||||
if (!(inegvar ^ inegoper)) {
|
||||
bdd = HIGH(manager);
|
||||
Cudd_Ref(bdd);
|
||||
}
|
||||
@ -1593,12 +1593,12 @@ DdNode* OnlineLineParser(DdManager *manager, namedvars *varmap, DdNode **inter,
|
||||
}
|
||||
break;
|
||||
case '#':
|
||||
if (inegvar ^ inegoper) ; else bdd = NOT(bdd);
|
||||
if (!(inegvar ^ inegoper)) bdd = NOT(bdd);
|
||||
break;
|
||||
}
|
||||
}
|
||||
endAt = clock();
|
||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
//secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||
if (bdd == NULL) {
|
||||
@ -1630,7 +1630,7 @@ DdNode* OnlineLineParser(DdManager *manager, namedvars *varmap, DdNode **inter,
|
||||
if (inegvar) bdd = BDD_Operator(manager, NOT(inter[ivar]), bdd, curoper, inegoper);
|
||||
else bdd = BDD_Operator(manager, inter[ivar], bdd, curoper, inegoper);
|
||||
endAt = clock();
|
||||
secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
//secs = ((double) (endAt - startAt)) / ((double) CLOCKS_PER_SEC);
|
||||
if (_debug) fprintf(stderr, "term: %s of line: %i took: %ld\n", term, iline, endAt - startAt);
|
||||
//if ((endAt - startAt) > 10000000) Cudd_AutodynDisable(manager);
|
||||
if (bdd == NULL) {
|
||||
|
@ -761,7 +761,7 @@ double CalcExpectedCounts(extmanager * MyManager, DdNode *Current, char *query_i
|
||||
// fprintf(stderr,"%%calcing down\n");
|
||||
|
||||
if (calcdown_needed != 0) {
|
||||
double retd=CalcExpectedCountsDown(MyManager,Current, query_id);
|
||||
// double retd=CalcExpectedCountsDown(MyManager,Current, query_id);
|
||||
}
|
||||
/* if(1 != retd){ */
|
||||
/* fprintf(stderr,"down %e != up %e/%e\n",ret,retd,ret); */
|
||||
@ -807,7 +807,7 @@ double CalcExpectedCounts(extmanager * MyManager, DdNode *Current, char *query_i
|
||||
#define LOG_EXPECTED 0
|
||||
|
||||
|
||||
|
||||
static
|
||||
void PrintNodeQueue(Queue q , extmanager MyManager){
|
||||
|
||||
QueueIterator qiter = QueueIteratorNew(q, 1);
|
||||
@ -824,6 +824,8 @@ void PrintNodeQueue(Queue q , extmanager MyManager){
|
||||
/** also nesting in CalcExpected seems to not work (must be here nested only valid within function frame)*/
|
||||
/* will be changed at later stage */
|
||||
static extmanager * ineedtostorethatsomehow;
|
||||
|
||||
static
|
||||
int comparator(void *av, void *bv){
|
||||
int ret = 0;
|
||||
DdNode* a = (DdNode*)av;
|
||||
@ -852,7 +854,11 @@ int comparator(void *av, void *bv){
|
||||
return ret;
|
||||
}
|
||||
|
||||
static void
|
||||
skip_nodes_cnt(extmanager * MyManager, double (*counts)[] , int skipcnt, DdNode* l,double dprob, char *query_id);
|
||||
|
||||
/** output information for skipped nodes **/
|
||||
static void
|
||||
skip_nodes(extmanager * MyManager, double (*counts)[] , DdNode* node, DdNode* l,double dprob, char *query_id){
|
||||
int skipcnt;
|
||||
skipcnt = Cudd_ReadPerm(MyManager->manager,GetIndex(node))+1;
|
||||
@ -866,9 +872,10 @@ skip_nodes(extmanager * MyManager, double (*counts)[] , DdNode* node, DdNode* l,
|
||||
Cudd_IsConstant(l)
|
||||
);
|
||||
}
|
||||
return skip_nodes_cnt( MyManager, counts, skipcnt, l, dprob, query_id);
|
||||
|
||||
skip_nodes_cnt( MyManager, counts, skipcnt, l, dprob, query_id);
|
||||
}
|
||||
|
||||
static void
|
||||
skip_nodes_cnt(extmanager * MyManager, double (*counts)[] , int skipcnt, DdNode* l,double dprob, char *query_id){
|
||||
if(LOG_EXPECTED) fprintf(stderr,"====================\n");
|
||||
double p;
|
||||
@ -954,7 +961,7 @@ double CalcExpectedCountsDown(extmanager * MyManager, DdNode *Current, char *que
|
||||
if(LOG_EXPECTED){PrintNodeQueue(q,*MyManager);}
|
||||
node=QueueGet(q);
|
||||
curnode = GetNodeVarNameDisp(MyManager->manager, MyManager->varmap, node);
|
||||
int level = Cudd_ReadPerm(MyManager->manager,GetIndex(node));
|
||||
// int level = Cudd_ReadPerm(MyManager->manager,GetIndex(node));
|
||||
if(!Cudd_IsConstant(node)){
|
||||
tvalue = MyManager->varmap.dvalue[GetIndex(node) - MyManager->varmap.varstart];
|
||||
ivalue = MyManager->varmap.ivalue[GetIndex(node) - MyManager->varmap.varstart];
|
||||
|
Reference in New Issue
Block a user