dlvhex
2.5.0
|
Public Member Functions | |
void | setAll (int NumConstant, int NumPredicate, int SizeOfHead, int SizeOfBody, int NotProbability, int NumRule, int NumModules, std::string &OutputFilePrefix) |
void | generate () |
Protected Member Functions | |
int * | createAtom (int idxModule, int idxPredicate, std::string content, int maxToRand, std::ostream &oss) |
void | createGroundAtom (int idxModule, int idxPredicate, std::ostream &oss) |
int * | createNonGroundAtom (int idxModule, int idxPredicate, std::ostream &oss) |
void | createModuleHeader (int idxModule, std::ostream &oss) |
void | generateFacts (int idxModule, std::ostream &oss) |
void | generateRule (int idxModule, std::ostream &ossResult) |
void | generateRules (int idxModule, std::ostream &oss) |
void | generateModuleCall (int idxModuleSrc, int idxModuleDest, std::ostream &oss) |
virtual void | createMainModule (std::ostream &oss) |
virtual void | createLibraryModule (int idxModule, std::ostream &oss) |
Protected Attributes | |
std::string | outputFilePrefix |
int | numConstantMax |
int | numPredicateMax |
int | sizeOfHeadMax |
int | sizeOfBodyMax |
int | notProbability |
int | numRuleMax |
int | numModules |
int | maxPredArity |
std::vector< int > | numInputPredVector |
std::vector< std::vector< int > > | listInputPreds |
std::vector< std::vector< int > > | numPredArity |
Definition at line 47 of file Module.cpp.
int * BaseTopology::createAtom | ( | int | idxModule, |
int | idxPredicate, | ||
std::string | content, | ||
int | maxToRand, | ||
std::ostream & | oss | ||
) | [protected] |
Definition at line 195 of file Module.cpp.
References maxPredArity, and numPredArity.
Referenced by createGroundAtom(), and createNonGroundAtom().
void BaseTopology::createGroundAtom | ( | int | idxModule, |
int | idxPredicate, | ||
std::ostream & | oss | ||
) | [protected] |
Definition at line 213 of file Module.cpp.
References createAtom(), and numConstantMax.
Referenced by generateFacts().
virtual void BaseTopology::createLibraryModule | ( | int | idxModule, |
std::ostream & | oss | ||
) | [inline, protected, virtual] |
Reimplemented in TreeTopology, RandomTopology, DiamondTopology, RingTopology, LineTopology, and StarTopology.
Definition at line 73 of file Module.cpp.
Referenced by generate().
virtual void BaseTopology::createMainModule | ( | std::ostream & | oss | ) | [inline, protected, virtual] |
Reimplemented in TreeTopology, RandomTopology, DiamondTopology, RingTopology, LineTopology, and StarTopology.
Definition at line 72 of file Module.cpp.
Referenced by generate().
void BaseTopology::createModuleHeader | ( | int | idxModule, |
std::ostream & | oss | ||
) | [protected] |
Definition at line 229 of file Module.cpp.
References listInputPreds, numInputPredVector, and numPredArity.
Referenced by StarTopology::createLibraryModule(), LineTopology::createLibraryModule(), RingTopology::createLibraryModule(), DiamondTopology::createLibraryModule(), RandomTopology::createLibraryModule(), TreeTopology::createLibraryModule(), StarTopology::createMainModule(), LineTopology::createMainModule(), RingTopology::createMainModule(), DiamondTopology::createMainModule(), RandomTopology::createMainModule(), and TreeTopology::createMainModule().
int * BaseTopology::createNonGroundAtom | ( | int | idxModule, |
int | idxPredicate, | ||
std::ostream & | oss | ||
) | [protected] |
Definition at line 221 of file Module.cpp.
References createAtom(), and maxPredArity.
Referenced by generateRule().
void BaseTopology::generate | ( | ) |
Definition at line 367 of file Module.cpp.
References createLibraryModule(), createMainModule(), numModules, and outputFilePrefix.
Referenced by main().
void BaseTopology::generateFacts | ( | int | idxModule, |
std::ostream & | oss | ||
) | [protected] |
Definition at line 243 of file Module.cpp.
References createGroundAtom(), numConstantMax, and numPredicateMax.
Referenced by StarTopology::createLibraryModule(), LineTopology::createLibraryModule(), RingTopology::createLibraryModule(), DiamondTopology::createLibraryModule(), RandomTopology::createLibraryModule(), TreeTopology::createLibraryModule(), StarTopology::createMainModule(), LineTopology::createMainModule(), RingTopology::createMainModule(), DiamondTopology::createMainModule(), RandomTopology::createMainModule(), and TreeTopology::createMainModule().
void BaseTopology::generateModuleCall | ( | int | idxModuleSrc, |
int | idxModuleDest, | ||
std::ostream & | oss | ||
) | [protected] |
Definition at line 339 of file Module.cpp.
References listInputPreds, numInputPredVector, numPredArity, and numPredicateMax.
Referenced by StarTopology::createLibraryModule(), LineTopology::createLibraryModule(), RingTopology::createLibraryModule(), DiamondTopology::createLibraryModule(), RandomTopology::createLibraryModule(), TreeTopology::createLibraryModule(), StarTopology::createMainModule(), LineTopology::createMainModule(), RingTopology::createMainModule(), DiamondTopology::createMainModule(), RandomTopology::createMainModule(), and TreeTopology::createMainModule().
void BaseTopology::generateRule | ( | int | idxModule, |
std::ostream & | ossResult | ||
) | [protected] |
Definition at line 257 of file Module.cpp.
References createNonGroundAtom(), maxPredArity, notProbability, numPredicateMax, sizeOfBodyMax, and sizeOfHeadMax.
Referenced by generateRules().
void BaseTopology::generateRules | ( | int | idxModule, |
std::ostream & | oss | ||
) | [protected] |
Definition at line 327 of file Module.cpp.
References generateRule(), and numRuleMax.
Referenced by StarTopology::createLibraryModule(), LineTopology::createLibraryModule(), RingTopology::createLibraryModule(), DiamondTopology::createLibraryModule(), RandomTopology::createLibraryModule(), TreeTopology::createLibraryModule(), StarTopology::createMainModule(), LineTopology::createMainModule(), RingTopology::createMainModule(), DiamondTopology::createMainModule(), RandomTopology::createMainModule(), and TreeTopology::createMainModule().
void BaseTopology::setAll | ( | int | NumConstant, |
int | NumPredicate, | ||
int | SizeOfHead, | ||
int | SizeOfBody, | ||
int | NotProbability, | ||
int | NumRule, | ||
int | NumModules, | ||
std::string & | OutputFilePrefix | ||
) |
Definition at line 131 of file Module.cpp.
References listInputPreds, maxPredArity, notProbability, numConstantMax, numInputPredVector, numModules, numPredArity, numPredicateMax, numRuleMax, outputFilePrefix, sizeOfBodyMax, and sizeOfHeadMax.
Referenced by main().
std::vector< std::vector<int> > BaseTopology::listInputPreds [protected] |
Definition at line 60 of file Module.cpp.
Referenced by createModuleHeader(), generateModuleCall(), and setAll().
int BaseTopology::maxPredArity [protected] |
Definition at line 58 of file Module.cpp.
Referenced by createAtom(), createNonGroundAtom(), generateRule(), and setAll().
int BaseTopology::notProbability [protected] |
Definition at line 55 of file Module.cpp.
Referenced by generateRule(), and setAll().
int BaseTopology::numConstantMax [protected] |
Definition at line 51 of file Module.cpp.
Referenced by createGroundAtom(), generateFacts(), and setAll().
std::vector<int> BaseTopology::numInputPredVector [protected] |
Definition at line 59 of file Module.cpp.
Referenced by createModuleHeader(), generateModuleCall(), and setAll().
int BaseTopology::numModules [protected] |
Definition at line 57 of file Module.cpp.
Referenced by LineTopology::createLibraryModule(), RingTopology::createLibraryModule(), DiamondTopology::createLibraryModule(), RandomTopology::createLibraryModule(), TreeTopology::createLibraryModule(), StarTopology::createMainModule(), LineTopology::createMainModule(), RingTopology::createMainModule(), DiamondTopology::createMainModule(), RandomTopology::createMainModule(), TreeTopology::createMainModule(), generate(), and setAll().
std::vector< std::vector<int> > BaseTopology::numPredArity [protected] |
Definition at line 61 of file Module.cpp.
Referenced by createAtom(), createModuleHeader(), generateModuleCall(), and setAll().
int BaseTopology::numPredicateMax [protected] |
Definition at line 52 of file Module.cpp.
Referenced by generateFacts(), generateModuleCall(), generateRule(), and setAll().
int BaseTopology::numRuleMax [protected] |
Definition at line 56 of file Module.cpp.
Referenced by generateRules(), and setAll().
std::string BaseTopology::outputFilePrefix [protected] |
Definition at line 50 of file Module.cpp.
Referenced by generate(), and setAll().
int BaseTopology::sizeOfBodyMax [protected] |
Definition at line 54 of file Module.cpp.
Referenced by generateRule(), and setAll().
int BaseTopology::sizeOfHeadMax [protected] |
Definition at line 53 of file Module.cpp.
Referenced by generateRule(), and setAll().