Internal functions and data structures of the rbc package.

static void 
CnfBack(
  Rbc_t * f, 
  char * cnfData, 
  int  sign 
)
Dfs BackVisit for CNF conversion.

Side Effects None

Defined in rbcCnf.c

static void 
CnfFirst(
  Rbc_t * f, 
  char * cnfData, 
  int  sign 
)
Dfs FirstVisit for CNF conversion.

Side Effects None

Defined in rbcCnf.c

static void 
CnfLast(
  Rbc_t * f, 
  char * cnfData, 
  int  sign 
)
Dfs LastVisit for CNF conversion.

Side Effects None

Defined in rbcCnf.c

static int 
CnfSet(
  Rbc_t * f, 
  char * cnfData, 
  int  sign 
)
Dfs Set for CNF conversion.

Side Effects None

Defined in rbcCnf.c

static void 
DaVinciBack(
  Rbc_t * f, 
  char * daVinciData, 
  int  sign 
)
Dfs BackVisit for DaVinci output.

Side Effects None

Defined in rbcOutput.c

static void 
DaVinciFirst(
  Rbc_t * f, 
  char * DaVinciData, 
  int  sign 
)
Dfs FirstVisit for DaVinci output.

Side Effects None

Defined in rbcOutput.c

static void 
DaVinciLast(
  Rbc_t * f, 
  char * daVinciData, 
  int  sign 
)
Dfs LastVisit for DaVinci outputon.

Side Effects None

Defined in rbcOutput.c

static int 
DaVinciSet(
  Rbc_t * f, 
  char * daVinciData, 
  int  sign 
)
Dfs Set for DaVinci output.

Side Effects None

Defined in rbcOutput.c

int 
Rbc_Convert2Cnf(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * f, 
  lsList  clauses, 
  lsList  vars 
)
Given `rbcManager' and `f', `clauses' is filled with the disjunctions corresponding to the rbc nodes according to the rules: f = A & B => -f A f = A <-> B => f A B -f B f -A -B f -A -B -f -A B -f A -B `vars' is filled with the variables that occurred in `f' (original or model variables). It is user's responsibility to create `clauses' and `vars' *before* calling the function. New variables are added by the conversion: the maximum index (the last added variable) is returned by the function. The function returns 0 when `f' is true or false.

Side Effects `clauses' and `vars' are filled up. `clauses' is the empty list if `f' was true, and contains a single empty clause if `f' was false.

Defined in rbcCnf.c

Rbc_t * 
Rbc_GetIthVar(
  Rbc_Manager_t * rbcManager, 
  int  varIndex 
)
Returns a pointer to an rbc node containing the requested variable. Works in three steps:

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_GetLeftOpnd(
  Rbc_t * f 
)
Gets the left operand.

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_GetOne(
  Rbc_Manager_t * rbcManager 
)
Returns the rbc that stands for logical truth.

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_GetRightOpnd(
  Rbc_t * f 
)
Gets the right operand.

Side Effects none

Defined in rbcFormula.c

int 
Rbc_GetVarIndex(
  Rbc_t * f 
)
Returns the variable index, -1 if the rbc is not a variable.

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_GetZero(
  Rbc_Manager_t * rbcManager 
)
Returns the rbc that stands for logical falsity.

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_MakeAnd(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * left, 
  Rbc_t * right, 
  Rbc_Bool_c  sign 
)
Makes the conjunction of two rbcs. Works in three steps:

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_MakeIff(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * left, 
  Rbc_t * right, 
  Rbc_Bool_c  sign 
)
Makes the coimplication of two rbcs. Works in four steps:

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_MakeIte(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * c, 
  Rbc_t * t, 
  Rbc_t * e, 
  Rbc_Bool_c  sign 
)
Makes the if-then-else of three rbcs: expands the connective into the corresponding product-of-sums.

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_MakeNot(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * left 
)
Returns the complement of an rbc.

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_MakeOr(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * left, 
  Rbc_t * right, 
  Rbc_Bool_c  sign 
)
Makes the disjunction of two rbcs: casts the connective to the negation of a conjunction using De Morgan's law.

Side Effects none

Defined in rbcFormula.c

Rbc_t * 
Rbc_MakeXor(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * left, 
  Rbc_t * right, 
  Rbc_Bool_c  sign 
)
Makes the exclusive disjunction of two rbcs: casts the connective as the negation of a coimplication.

Side Effects none

Defined in rbcFormula.c

Rbc_Manager_t * 
Rbc_ManagerAlloc(
  int  varCapacity 
)
Creates a new RBC manager: Returns the allocated manager if varCapacity is greater than 0, and NIL(Rbc_Manager_t) otherwise.

Side Effects none

See Also Rbc_ManagerFree
Defined in rbcManager.c

int 
Rbc_ManagerCapacity(
  Rbc_Manager_t * rbcManager 
)
This number is the maximum number of variables (starting from 0) that can be requested without causing any memory allocation.

Side Effects none

Defined in rbcManager.c

void 
Rbc_ManagerFree(
  Rbc_Manager_t * rbcManager 
)
Frees the variable index and the internal dag manager.

Side Effects none

Defined in rbcManager.c

void 
Rbc_ManagerGC(
  Rbc_Manager_t * rbcManager 
)
Relies on the internal DAG garbage collector.

Side Effects None

Defined in rbcManager.c

void 
Rbc_ManagerReserve(
  Rbc_Manager_t * rbcManager, 
  int  newVarCapacity 
)
If the requested space is bigger than the current one makes room for more variables in the varTable.

Side Effects none

Defined in rbcManager.c

void 
Rbc_Mark(
  Rbc_Manager_t * rbc, 
  Rbc_t * f 
)
Marks the vertex in the internal dag. This saves the rbc from being wiped out during garbage collection.

Side Effects none

Defined in rbcFormula.c

void 
Rbc_OutputDaVinci(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * f, 
  FILE * outFile 
)
Print out an rbc using DaVinci graph format.

Side Effects None

Defined in rbcOutput.c

void 
Rbc_OutputSexpr(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * f, 
  FILE * outFile 
)
Print out an rbc using LISP S-exrpressions.

Side Effects None

Defined in rbcOutput.c

void 
Rbc_PrintStats(
  Rbc_Manager_t * rbcManager, 
  int  clustSz, 
  FILE * outFile 
)
Prints various statistics.

Side Effects None

Defined in rbcStat.c

Rbc_t * 
Rbc_Shift(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * f, 
  int  shift 
)
Given `rbcManager', the rbc `f', and the integer `shift', replaces every occurence of the variable x_i in in `f' with the variable x_(i + shift).

Side Effects none

Defined in rbcSubst.c

Rbc_t * 
Rbc_SubstRbc(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * f, 
  Rbc_t ** substRbc 
)
Given `rbcManager', the rbc `f', and the array of rbcs `substRbc', replaces every occurence of the variable x_i in in `f' with the rbc r_i provided that substRbc[i

Side Effects none

Defined in rbcSubst.c

Rbc_t * 
Rbc_Subst(
  Rbc_Manager_t * rbcManager, 
  Rbc_t * f, 
  int * subst 
)
Given `rbcManager', the rbc `f', and the array of integers `subst', replaces every occurence of the variable x_i in in `f' with the variable x_j provided that subst[i

Side Effects none

Defined in rbcSubst.c

void 
Rbc_Unmark(
  Rbc_Manager_t * rbc, 
  Rbc_t * f 
)
Unmarks the vertex in the internal dag. This exposes the rbc to garbage collection.

Side Effects none

Defined in rbcFormula.c

static Rbc_t * 
Reduce(
  Rbc_Manager_t * rbcManager, 
  int  op, 
  Rbc_t * left, 
  Rbc_t * right 
)
Reduction (simplification) of rbcs.

Side Effects none

Defined in rbcFormula.c

static void 
SexprBack(
  Rbc_t * f, 
  char * SexprData, 
  int  sign 
)
Dfs BackVisit for Sexpr output.

Side Effects None

Defined in rbcOutput.c

static void 
SexprFirst(
  Rbc_t * f, 
  char * SexprData, 
  int  sign 
)
Dfs FirstVisit for Sexpr output.

Side Effects None

Defined in rbcOutput.c

static void 
SexprLast(
  Rbc_t * f, 
  char * SexprData, 
  int  sign 
)
Dfs LastVisit for Sexpr outputon.

Side Effects None

Defined in rbcOutput.c

static int 
SexprSet(
  Rbc_t * f, 
  char * SexprData, 
  int  sign 
)
Dfs Set for Sexpr output.

Side Effects None

Defined in rbcOutput.c

static void 
ShiftBack(
  Rbc_t * f, 
  char * shiftData, 
  int  sign 
)
Dfs BackVisit for shifting.

Side Effects None

Defined in rbcSubst.c

static void 
ShiftFirst(
  Rbc_t * f, 
  char * shiftData, 
  int  sign 
)
Dfs FirstVisit for shifting.

Side Effects None

Defined in rbcSubst.c

static void 
ShiftLast(
  Rbc_t * f, 
  char * shiftData, 
  int  sign 
)
Dfs LastVisit for shifting.

Side Effects None

Defined in rbcSubst.c

static int 
ShiftSet(
  Rbc_t * f, 
  char * shiftData, 
  int  sign 
)
Dfs Set for shifting.

Side Effects None

Defined in rbcSubst.c

static void 
SubstBack(
  Rbc_t * f, 
  char * SubstData, 
  int  sign 
)
Dfs BackVisit for substitution.

Side Effects None

Defined in rbcSubst.c

static void 
SubstFirst(
  Rbc_t * f, 
  char * SubstData, 
  int  sign 
)
Dfs FirstVisit for substitution.

Side Effects None

Defined in rbcSubst.c

static void 
SubstLast(
  Rbc_t * f, 
  char * SubstData, 
  int  sign 
)
Dfs LastVisit for Substitution.

Side Effects None

Defined in rbcSubst.c

static void 
SubstRbcBack(
  Rbc_t * f, 
  char * SubstRbcData, 
  int  sign 
)
Dfs BackVisit for substRbcitution.

Side Effects None

Defined in rbcSubst.c

static void 
SubstRbcFirst(
  Rbc_t * f, 
  char * SubstRbcData, 
  int  sign 
)
Dfs FirstVisit for substitution (variables to formulas).

Side Effects None

Defined in rbcSubst.c

static void 
SubstRbcLast(
  Rbc_t * f, 
  char * SubstRbcData, 
  int  sign 
)
Dfs LastVisit for SubstRbcitution.

Side Effects None

Defined in rbcSubst.c

static int 
SubstRbcSet(
  Rbc_t * f, 
  char * SubstRbcData, 
  int  sign 
)
Dfs Set for substitution (variables to formulas).

Side Effects None

Defined in rbcSubst.c

static int 
SubstSet(
  Rbc_t * f, 
  char * SubstData, 
  int  sign 
)
Dfs Set for substitution.

Side Effects None

Defined in rbcSubst.c

static lsGeneric 
SwapSign(
  lsGeneric  data 
)
Swaps the sign of the argument.

Side Effects None

Defined in rbcCnf.c

 
(
    
)
The pointer is filtered by a bitwise-xor with either RBC_FALSE or RBC_TRUE. The pointer is not altered, but the leftmost bit is complemented when s==RBC_FALSE and goes unchanged when s == RBC_TRUE.

Side Effects none

Defined in rbcInt.h

Last updated on 1011105 17h15