[go: up one dir, main page]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add C++ API #8

Open
85 of 100 tasks
SSoelvsten opened this issue Nov 8, 2022 · 0 comments
Open
85 of 100 tasks

Add C++ API #8

SSoelvsten opened this issue Nov 8, 2022 · 0 comments
Assignees
Labels
___.cpp C++ wrapper enhancement New feature or request

Comments

@SSoelvsten
Copy link
Owner
SSoelvsten commented Nov 8, 2022

With 5a3ae0b we added a C++ wrapper on the entire CAL library. Yet, it only included the operations necessary to get it to run on my BDD-Benchmark repository. We ought to expand on this to all of CAL's operations.

Operations

CAL Class

  • Cal_BddStats(...)
  • Cal_BddTotalSize(...)
  • Cal_BddDynamicReordering(...)
  • Cal_BddReorder(...)
  • Cal_BddVars(...)
  • Cal_BddNodeLimit(...)
  • Cal_BddOverflow(...)
  • Cal_BddManagerGetHooks(...)
  • Cal_BddManagerSetHooks(...)
  • Cal_BddManagerInit...)
  • Cal_BddManagerQuit(...) [ free(): invalid pointer for Cal_BddManagerQuit #3 ]
  • Cal_BddManagerSetParameters(...)
  • Cal_BddManagerGetNumNodes(...)
  • Cal_BddManagerCreateNewVarFirst(...)
  • Cal_BddManagerCreateNewVarLast(...)
  • Cal_BddNewVarBlock(...)
  • Cal_BddVarBlockReorderable(...)
  • Cal_BddSetGCMode(...)
  • Cal_BddManagerGC(...)
  • Cal_BddManagerSetGCLimit(...)

BDD Class

  • Cal_BddIsEqual(...)
  • Cal_BddIsBddOne(...)
  • Cal_BddIsBddZero(...)
  • Cal_BddIsBddNull(...)
  • Cal_BddIsBddConst(...)
  • Cal_BddIdentity(...)
  • Cal_BddOne(...)
  • Cal_BddZero(...)
  • Cal_BddNot(...)
  • Cal_BddGetIfIndex(...)
  • Cal_BddGetIfId(...)
  • Cal_BddIf(...)
  • Cal_BddThen(...)
  • Cal_BddElse(...)
  • Cal_BddGetRegular(...)
  • Cal_BddIntersects(...)
  • Cal_BddImplies(...)
  • Cal_BddType(...)
  • Cal_BddIsCube(...)
  • Cal_BddCompose(...)
  • Cal_BddITE(...)
  • Cal_BddManagerCreateNewVarBefore(...)
  • Cal_BddManagerCreateNewVarAfter(...)
  • Cal_BddManagerGetVarWithIndex(...) [:lady_beetle: Cal_BddManagerGetVarWithId]
  • Cal_BddManagerGetVarWithId(...)
  • Cal_BddAnd(...)
  • Cal_BddNand(...)
  • Cal_BddOr(...)
  • Cal_BddNor(...)
  • Cal_BddXor(...)
  • Cal_BddXnor(...)
  • Cal_BddPairwiseAnd(...)
  • Cal_BddPairwiseOr(...)
  • Cal_BddPairwiseXor(...)
  • Cal_BddMultiwayAnd(...)
  • Cal_BddMultiwayOr(...)
  • Cal_BddMultiwayXor(...)
  • Cal_BddSatisfy(...)
  • Cal_BddSatisfySupport(...)
  • Cal_BddSatisfyingFraction(...)
  • Cal_BddSize(...)
  • Cal_BddSizeMultiple(...)
  • Cal_BddSubstitute(...)
  • Cal_BddVarSubstitute(...)
  • Cal_BddSupport(...)
  • Cal_BddDependsOn(...)
  • Cal_BddSwapVars(...)
  • Cal_BddPrintBdd(...)
  • Cal_BddProfile(...)
  • Cal_BddProfileMultiple(...)
  • Cal_BddPrintProfile(...)
  • Cal_BddPrintProfileMultiple(...)
  • Cal_BddFunctionPrint(...)
  • Cal_BddFunctionProfile(...)
  • Cal_BddFunctionProfileMultiple(...)
  • Cal_BddPrintFunctionProfile(...)
  • Cal_BddPrintFunctionProfileMultiple(...)
  • Cal_BddExists(...)
  • Cal_BddRelProd(...)
  • Cal_BddForAll(...)
  • Cal_BddCofactor(...)
  • Cal_BddReduce(...)
  • Cal_BddBetween(...)
  • Cal_BddUndumpBdd(...)
  • Cal_BddDumpBdd(...)

The following operations, I believe are internal or should be hidden within the C++ classes. That is, these do not need to be lifted to C++.

  • Cal_BddFree(...)
  • Cal_BddUnFree(...)
  • Cal_MemFatal(...)
  • Address_t Cal_MemAllocation(...)
  • Pointer_t Cal_MemGetBlock(...)
  • Cal_MemFreeBlock(...)
  • Pointer_t Cal_MemResizeBlock(...)
  • Pointer_t Cal_MemNewRec(...)
  • Cal_MemFreeRec(...)
  • RecMgr Cal_MemNewRecMgr(...)
  • Cal_MemFreeRecMgr(...)

Association

Operations like Cal_BddForAll depend on an Association list, which essentially is a list of variables. These then, depending on the operation, determine how the BDD operations progress.

  • Cal_AssociationInit(...)
  • Cal_AssociationQuit(...)
  • Cal_AssociationSetCurrent(...)
  • Cal_TempAssociationAugment(...)
  • Cal_TempAssociationInit(...)
  • Cal_TempAssociationQuit(...)

Note the final argument pairs is a boolean whether it is a mapping x -> f. These are then used with substitution rather than exists.

Other Data Structures

  • Functions
  • Some of the operations above take a pointer to array(s) of input or to place the output. Both of these ought to be changed into using an iterator instead

Pipeline

The pipeline should probably get its own interface and class. One may even want to use operator overloading similar to TPIE to make pipelining readable.

  • Cal_PipelineInit(...)
  • Cal_PipelineSetDepth(...)
  • Bdd Cal_PipelineCreateProvisionalBdd(...)
  • Bdd Cal_PipelineUpdateProvisionalBdd(...)
  • Cal_BddIsProvisional(...)
  • Cal_PipelineExecute(...)
  • Cal_PipelineQuit(...)
@SSoelvsten SSoelvsten added enhancement New feature or request ___.cpp C++ wrapper labels Nov 8, 2022
@SSoelvsten SSoelvsten pinned this issue Nov 8, 2022
@SSoelvsten SSoelvsten unpinned this issue Aug 16, 2023
@SSoelvsten SSoelvsten self-assigned this Aug 19, 2023
@SSoelvsten SSoelvsten changed the title Fully expand C++ Support Add C++ API Aug 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
___.cpp C++ wrapper enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant