Ignore:
Timestamp:
Jan 8, 2012, 5:12:00 PM (12 years ago)
Author:
cecile
Message:

abnormal structure in network

File:
1 edited

Legend:

Unmodified
Added
Removed
  • vis_dev/vis-2.3/src/debug/debug.c

    r38 r40  
    296296    return 1;
    297297  }
     298
    298299  /*
    299300    We need the bdd when building the transition relation of the automaton
     
    308309    }
    309310  }
    310 
     311Dbg_Abnormal_t * abn = Dbg_NetworkReadAbnormal(network);
     312printf("abnormal %d \n",array_n(Dbg_ReadAbn(abn)));
    311313/*
    312314 * Read the formula
     
    394396    int l;
    395397    // return the clause number
    396     int noLoopIndex = BmcGenerateCnfForLtl(network, ltlFormula, 0, k, -1, cnfClauses);
     398    int noLoopIndex = BmcGenerateCnfForLtl(network, ltlFormula, 0, k, k, cnfClauses);
    397399   
    398400    int leftValue   = checkIndex(noLoopIndex, cnfClauses);
    399401    printf("noLoopIndex %d , leftValue %d \n", noLoopIndex,leftValue);
    400     int rightValue,loop,andIndex;
    401     array_t           *orClause = NIL(array_t);
    402     array_t           *loopClause, *tmpclause;
    403 
    404     if (leftValue != 1) {
    405       orClause = array_alloc(int, 0);   
    406       if (leftValue == -1){
    407             array_insert_last(int, orClause, noLoopIndex);
    408       }
    409       loopClause = array_alloc(int, k+1);
    410       for(l=0; l<=k; l++){
    411             int loopIndex = BmcGenerateCnfForLtl(network, ltlFormula, 0, k, l, cnfClauses);
    412             rightValue = checkIndex(loopIndex, cnfClauses);
    413           if (rightValue == 0){
    414             break;
    415           }
    416       if (rightValue !=0){
    417             loop = cnfClauses->cnfGlobalIndex++;
    418             BmcCnfGenerateClausesFromStateToState(network, k, l, cnfClauses,
    419                                                 nodeToMvfAigTable, CoiTable, loop);
    420           array_insert(int, loopClause, l, loop);
    421           if(rightValue == -1){
    422            
    423             andIndex   = cnfClauses->cnfGlobalIndex++;
    424             tmpclause  = array_alloc(int, 2);
    425             array_insert(int, tmpclause, 0, loop);
    426             array_insert(int, tmpclause, 1, -andIndex);
    427             BmcCnfInsertClause(cnfClauses, tmpclause);
    428 
    429             array_insert(int, tmpclause, 0, loopIndex);
    430             array_insert(int, tmpclause, 1, -andIndex);
    431             BmcCnfInsertClause(cnfClauses, tmpclause);
    432         array_free(tmpclause);
    433             array_insert_last(int, orClause, andIndex);
    434       }
    435       else {
    436             array_insert_last(int, orClause, loop);
    437           }
    438       }} // for l loop
    439       }
    440        BmcCnfInsertClause(cnfClauses, orClause);
    441         array_free(orClause);
    442 
    443 
     402        array_t           *objClause = NIL(array_t);
     403        objClause = array_alloc(int, 0);   
     404        array_insert_last(int, objClause, noLoopIndex);
     405        BmcCnfInsertClause(cnfClauses, objClause);
     406    array_free(objClause);
     407
     408       
     409//TODO Add abnormal formula
    444410
    445411
Note: See TracChangeset for help on using the changeset viewer.