void infeas_analysis( char *obj_file ) {

  readInstr( obj_file );
  readBlockCounts( obj_file );

  clearReg();
  initRegSet();
  //printInstructions();

  printf( "Starting symbolic execution...\n" ); fflush(stdout);
  execute();
  //printEffects(0);

  printf( "Starting conflict detection...\n" ); fflush(stdout);
  detectConflicts();
  printf( "Detected %d BB and %d BA\n", num_BB, num_BA ); fflush(stdout);
  //printEffects(1);
}
示例#2
0
/*
 * Initializes infeasible path detection.
 */
int initInfeas()
{
  DSTART( "initInfeas" );

  int i, j;
  procedure *p;

  DOUT( "\nInitializing register set...\n" ); fflush(stdout);
  initRegSet();

  DOUT( "Allocating data structures...\n" ); fflush( stdout );
  MALLOC( num_assign, int**, num_procs * sizeof(int*), "num_assign" );
  MALLOC( assignlist, assign****, num_procs * sizeof(assign***), "assignlist" );
  MALLOC( branchlist, branch***, num_procs * sizeof(branch**),  "branchlist" );

  for( i = 0; i < num_procs; i++ ) {
    p = procs[i];

    CALLOC( num_assign[i], int*, p->num_bb, sizeof(int), "num_assign elm" );
    MALLOC( assignlist[i], assign***, p->num_bb * sizeof(assign**), "assignlist elm" );
    MALLOC( branchlist[i], branch**, p->num_bb * sizeof(branch*),  "branchlist elm" );

    for( j = 0; j < p->num_bb; j++ ) {
      assignlist[i][j] = NULL;
      branchlist[i][j] = NULL;
    }
  }

  DOUT( "Detecting effects...\n" ); fflush( stdout );
  execute();

  DOUT( "\nFinding related effects...\n" ); fflush( stdout );
  detectConflicts();

  DOUT( "Detected %d BB and %d BA\n", num_BB, num_BA );
  DRETURN( 0 );
}