static void UpdateJoin( void *buf, long obji) { struct bsaveJoinNode *bj; bj = (struct bsaveJoinNode *) buf; JoinArray[obji].firstJoin = bj->firstJoin; JoinArray[obji].logicalJoin = bj->logicalJoin; JoinArray[obji].joinFromTheRight = bj->joinFromTheRight; JoinArray[obji].patternIsNegated = bj->patternIsNegated; JoinArray[obji].depth = bj->depth; JoinArray[obji].rhsType = bj->rhsType; JoinArray[obji].networkTest = HashedExpressionPointer(bj->networkTest); JoinArray[obji].nextLevel = BloadJoinPointer(bj->nextLevel); JoinArray[obji].lastLevel = BloadJoinPointer(bj->lastLevel); if (bj->joinFromTheRight == TRUE) { JoinArray[obji].rightSideEntryStructure = (void *) BloadJoinPointer(bj->rightSideEntryStructure); } JoinArray[obji].rightMatchNode = BloadJoinPointer(bj->rightMatchNode); JoinArray[obji].rightDriveNode = BloadJoinPointer(bj->rightDriveNode); JoinArray[obji].ruleToActivate = BloadDefrulePointer(DefruleArray,bj->ruleToActivate); JoinArray[obji].initialize = 0; JoinArray[obji].marked = 0; JoinArray[obji].bsaveID = 0L; JoinArray[obji].beta = NULL; }
static void UpdateDefrule( void *theEnv, void *buf, long obji) { struct bsaveDefrule *br; br = (struct bsaveDefrule *) buf; UpdateConstructHeader(theEnv,&br->header,&DefruleBinaryData(theEnv)->DefruleArray[obji].header, (int) sizeof(struct defruleModule),(void *) DefruleBinaryData(theEnv)->ModuleArray, (int) sizeof(struct defrule),(void *) DefruleBinaryData(theEnv)->DefruleArray); DefruleBinaryData(theEnv)->DefruleArray[obji].dynamicSalience = ExpressionPointer(br->dynamicSalience); DefruleBinaryData(theEnv)->DefruleArray[obji].actions = ExpressionPointer(br->actions); DefruleBinaryData(theEnv)->DefruleArray[obji].logicalJoin = BloadJoinPointer(br->logicalJoin); DefruleBinaryData(theEnv)->DefruleArray[obji].lastJoin = BloadJoinPointer(br->lastJoin); DefruleBinaryData(theEnv)->DefruleArray[obji].disjunct = BloadDefrulePointer(DefruleBinaryData(theEnv)->DefruleArray,br->disjunct); DefruleBinaryData(theEnv)->DefruleArray[obji].salience = br->salience; DefruleBinaryData(theEnv)->DefruleArray[obji].localVarCnt = br->localVarCnt; DefruleBinaryData(theEnv)->DefruleArray[obji].complexity = br->complexity; DefruleBinaryData(theEnv)->DefruleArray[obji].autoFocus = br->autoFocus; DefruleBinaryData(theEnv)->DefruleArray[obji].executing = 0; DefruleBinaryData(theEnv)->DefruleArray[obji].afterBreakpoint = 0; #if DEBUGGING_FUNCTIONS DefruleBinaryData(theEnv)->DefruleArray[obji].watchActivation = AgendaData(theEnv)->WatchActivations; DefruleBinaryData(theEnv)->DefruleArray[obji].watchFiring = DefruleData(theEnv)->WatchRules; #endif }
globle void UpdatePatternNodeHeader( struct patternNodeHeader *theHeader, struct bsavePatternNodeHeader *theBsaveHeader) { struct joinNode *theJoin; theHeader->singlefieldNode = theBsaveHeader->singlefieldNode; theHeader->multifieldNode = theBsaveHeader->multifieldNode; theHeader->stopNode = theBsaveHeader->stopNode; theHeader->beginSlot = theBsaveHeader->beginSlot; theHeader->endSlot = theBsaveHeader->endSlot; theHeader->initialize = 0; theHeader->marked = 0; theHeader->alphaMemory = NULL; theHeader->endOfQueue = NULL; theJoin = BloadJoinPointer(theBsaveHeader->entryJoin); theHeader->entryJoin = theJoin; while (theJoin != NULL) { theJoin->rightSideEntryStructure = (void *) theHeader; theJoin = theJoin->rightMatchNode; } }
static void UpdateDefrule( void *buf, long obji) { struct bsaveDefrule *br; br = (struct bsaveDefrule *) buf; UpdateConstructHeader(&br->header,&DefruleArray[obji].header, (int) sizeof(struct defruleModule),(void *) ModuleArray, (int) sizeof(struct defrule),(void *) DefruleArray); #if DYNAMIC_SALIENCE DefruleArray[obji].dynamicSalience = ExpressionPointer(br->dynamicSalience); #endif #if CERTAINTY_FACTORS DefruleArray[obji].dynamicCF = ExpressionPointer(br->dynamicCF); #endif DefruleArray[obji].actions = ExpressionPointer(br->actions); #if LOGICAL_DEPENDENCIES DefruleArray[obji].logicalJoin = BloadJoinPointer(br->logicalJoin); #endif DefruleArray[obji].lastJoin = BloadJoinPointer(br->lastJoin); DefruleArray[obji].disjunct = BloadDefrulePointer(DefruleArray,br->disjunct); DefruleArray[obji].salience = br->salience; #if CERTAINTY_FACTORS DefruleArray[obji].CF = br->CF; #endif DefruleArray[obji].localVarCnt = br->localVarCnt; DefruleArray[obji].complexity = br->complexity; DefruleArray[obji].autoFocus = br->autoFocus; DefruleArray[obji].executing = 0; DefruleArray[obji].afterBreakpoint = 0; #if FUZZY_DEFTEMPLATES DefruleArray[obji].min_of_maxmins = br->min_of_maxmins; DefruleArray[obji].lhsRuleType = br->lhsRuleType; DefruleArray[obji].numberOfFuzzySlots = br->numberOfFuzzySlots; DefruleArray[obji].pattern_fv_arrayPtr = &PatternFuzzyValueArray[br->pattern_fv_arrayPtr]; #endif #if DEBUGGING_FUNCTIONS DefruleArray[obji].watchActivation = WatchActivations; DefruleArray[obji].watchFiring = WatchRules; #endif }