コード例 #1
0
ファイル: InlineResult.c プロジェクト: ancailliau/pynusmv
/**Function********************************************************************

  Synopsis           [The InlineResult class private deinitializer]

  Description        [The InlineResult class private deinitializer]

  SideEffects        []

  SeeAlso            [InlineResult_destroy]

******************************************************************************/
static void inline_result_calc_cset(InlineResult_ptr self)
{
  Dag_DfsFunctions_t funcs;
  InlineDfsData data;

  /* clears the user fields. */
  Dag_Dfs(self->f, &dag_DfsClean, (char*) NULL);

  /* sets up the DFS functions */
  funcs.Set        = inline_set;
  funcs.FirstVisit = inline_first;
  funcs.BackVisit  = inline_back;
  funcs.LastVisit  = inline_last;

  /* sets up data */
  data.mgr = self->mgr;
  data.res = self;

  /* Calling DFS on f. */
  Dag_Dfs(self->f, &funcs, (char*)(&data));

  /* flattenizes the produced ConjSet */
  ConjSet_flattenize(self->conj);

  self->fns = data.tmp_res;
}
コード例 #2
0
ファイル: rbcSubst.c プロジェクト: hklarner/NuSMV-a
Rbc_t* Rbc_LogicalSubstRbc(Rbc_Manager_t* rbcManager,
                           Rbc_t* f,
                           Rbc_t** substRbc,
                           int* phy2log)
{
  Dag_DfsFunctions_t SubstRbcFunctions;
  SubstRbcDfsData_t  SubstRbcData;

  /* Cleaning the user fields. */
  Dag_Dfs(f, Rbc_ManagerGetDfsCleanFun(rbcManager), NIL(char));

  /* Setting up the DFS functions. */
  SubstRbcFunctions.Set        = (PF_IVPCPI)SubstRbcSet;
  SubstRbcFunctions.FirstVisit = (PF_VPVPCPI)SubstRbcFirst;
  SubstRbcFunctions.BackVisit  = (PF_VPVPCPI)SubstRbcBack;
  SubstRbcFunctions.LastVisit  = (PF_VPVPCPI)LogicalSubstRbcLast;

  /* Setting up the DFS data. */
  SubstRbcData.rbcManager = rbcManager;
  SubstRbcData.substRbc   = substRbc;
  SubstRbcData.phy2log    = phy2log;
  SubstRbcData.result     = NIL(Rbc_t);

  /* Calling DFS on f. */
  Dag_Dfs(f, &SubstRbcFunctions, (char*)(&SubstRbcData));

  return SubstRbcData.result;

} /* End of Rbc_SubstRbc. */
コード例 #3
0
ファイル: rbcSubst.c プロジェクト: hklarner/NuSMV-a
Rbc_t* Rbc_LogicalShift(Rbc_Manager_t* rbcManager,
                        Rbc_t* f,
                        int shift,
                        const int* log2phy, const int* phy2log)
{
  Dag_DfsFunctions_t shiftFunctions;
  ShiftDfsData_t     shiftData;

  /* Cleaning the user fields. */
  Dag_Dfs(f, Rbc_ManagerGetDfsCleanFun(rbcManager), NIL(char));

  /* Setting up the DFS. */
  shiftFunctions.Set        = (PF_IVPCPI)ShiftSet;
  shiftFunctions.FirstVisit = (PF_VPVPCPI)ShiftFirst;
  shiftFunctions.BackVisit  = (PF_VPVPCPI)ShiftBack;
  shiftFunctions.LastVisit  = (PF_VPVPCPI)LogicalShiftLast;

  /* Setting up the DFS data. */
  shiftData.rbcManager = rbcManager;
  shiftData.shift      = shift;
  shiftData.log2phy    = log2phy;
  shiftData.phy2log    = phy2log;
  shiftData.result     = NIL(Rbc_t);

  /* Calling DFS on f. */
  Dag_Dfs(f, &shiftFunctions, (char*)(&shiftData));

  return shiftData.result;

} /* End of Rbc_Shift. */
コード例 #4
0
ファイル: rbcSubst.c プロジェクト: hklarner/NuSMV-a
Rbc_t *
Rbc_Subst(Rbc_Manager_t * rbcManager,
          Rbc_t         * f,
          int           * subst)
{
  Dag_DfsFunctions_t SubstFunctions;
  SubstDfsData_t     SubstData;

  /* Cleaning the user fields. */
  Dag_Dfs(f, Rbc_ManagerGetDfsCleanFun(rbcManager), NIL(char));

  /* Setting up the DFS functions. */
  SubstFunctions.Set        = (PF_IVPCPI)SubstSet;
  SubstFunctions.FirstVisit = (PF_VPVPCPI)SubstFirst;
  SubstFunctions.BackVisit  = (PF_VPVPCPI)SubstBack;
  SubstFunctions.LastVisit  = (PF_VPVPCPI)SubstLast;

  /* Setting up the DFS data. */
  SubstData.rbcManager = rbcManager;
  SubstData.subst   = subst;
  SubstData.log2phy = (const int *) NULL;
  SubstData.phy2log = (const int *) NULL;
  SubstData.result     = NIL(Rbc_t);

  /* Calling DFS on f. */
  Dag_Dfs(f, &SubstFunctions, (char*)(&SubstData));

  return SubstData.result;

} /* End of Rbc_Subst. */