Mercurial > hg > CbC > old > akasha
changeset 42:9240d7ca8b5d
Merge
author | Yasutaka Higa <e115763@ie.u-ryukyu.ac.jp> |
---|---|
date | Thu, 16 Jun 2016 16:21:04 +0900 |
parents | 6bf95d172d46 (current diff) 56ea709e7af3 (diff) |
children | 23b9717a5c14 |
files | |
diffstat | 4 files changed, 9 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/src/insert_verification/akashaLLRBContext.c Thu Jun 16 14:11:55 2016 +0900 +++ b/src/insert_verification/akashaLLRBContext.c Thu Jun 16 16:21:04 2016 +0900 @@ -58,7 +58,7 @@ __code initIteratorElem(struct Context* context, struct Allocate* allocate, struct IterElem* prev); __code initLLRBContext(struct Context* context, enum Code next) { - context->codeNum = Exit; + context->codeNum = CodeTerminal; context->heapLimit = sizeof(union Data)*ALLOCATE_SIZE; context->code = malloc(sizeof(__code*)*context->codeNum); @@ -110,7 +110,7 @@ context->data[AkashaInfo] = context->heap; context->heap += sizeof(struct AkashaInfo); - context->dataNum = AkashaInfo; + context->dataNum = UniqueDataTerminal; struct Tree* tree = &context->data[Tree]->tree; tree->root = 0;
--- a/src/insert_verification/include/akashaLLRBContext.h Thu Jun 16 14:11:55 2016 +0900 +++ b/src/insert_verification/include/akashaLLRBContext.h Thu Jun 16 16:21:04 2016 +0900 @@ -49,6 +49,7 @@ DeleteCase5, DeleteCase6, Exit, + CodeTerminal }; enum Relational { @@ -63,6 +64,7 @@ Node, Iter, AkashaInfo, + UniqueDataTerminal }; struct Context {
--- a/src/insert_verification/main.c Thu Jun 16 14:11:55 2016 +0900 +++ b/src/insert_verification/main.c Thu Jun 16 16:21:04 2016 +0900 @@ -100,10 +100,6 @@ goto showTrace(context, &context->data[Iter]->iterator); } -__code verifySpecification_stub(struct Context* context) { - goto verifySpecification(context, &context->data[Allocate]->allocate, &context->data[Tree]->tree, &context->data[AkashaInfo]->akashaInfo); -} - __code duplicateIterator_stub(struct Context* context) { goto duplicateIterator(context, &context->data[Allocate]->allocate, &context->data[Iter]->iterator); }
--- a/src/insert_verification/verifySpecification.c Thu Jun 16 14:11:55 2016 +0900 +++ b/src/insert_verification/verifySpecification.c Thu Jun 16 16:21:04 2016 +0900 @@ -1,6 +1,7 @@ #include <stdio.h> #include "akashaLLRBContext.h" +extern __code meta(struct Context*, enum Code); extern void allocator(struct Context*); /* C functions (TODO: convert to code segment) */ @@ -162,6 +163,10 @@ goto getMaxHeight_stub(context); } +__code verifySpecification_stub(struct Context* context) { + goto verifySpecification(context, &context->data[Allocate]->allocate, &context->data[Tree]->tree, &context->data[AkashaInfo]->akashaInfo); +} + __code verifySpecification(struct Context* context, struct Allocate* allocate, struct Tree* tree, struct AkashaInfo* akashaInfo) { if (tree->root == NULL) { akashaInfo->minHeight = 1;