Page Menu
Home
Xreate
Search
Configure Global Search
Log In
Docs
Questions
Repository
Issues
Patches
Internal API
Files
F3996369
clasplayer.h
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jul 8, 10:38 AM
Size
1 KB
Mime Type
text/x-c++
Expires
Fri, Jul 10, 10:38 AM (1 d, 11 h)
Engine
blob
Format
Raw Data
Handle
271795
Attached To
rXR Xreate
clasplayer.h
View Options
#ifndef CLASPLAYER_H
#define CLASPLAYER_H
#include <string>
#include <gringo/control.hh>
#include <ast.h>
#include <QStringList>
namespace xreate {
class CFGraph;
class ClaspLayer {
public:
AST *ast;
ClaspLayer();
void addFunctionTags(const std::string &function, const std::vector<Tag> &tags);
void addCFGData(CFGraph &&graph);
void addRuleWarning(const RuleWarning &rule);
void run();
private:
std::map<std::string, std::string> __hooks;
std::ostringstream __partTags;
std::ostringstream __partGeneral;
bool onModel(Gringo::Model const &model);
QStringList compile(const Expression &e) const;
QStringList compileNeg(const Expression &e) const;
std::string registerHook(const std::string &message);
};
class CFGraph {
friend class ClaspLayer;
public:
void addNode(FID function, std::string &&tag);
void addLink(FID nodeFrom, FID nodeTo);
bool existsNode(FID function) const;
void print(std::ostream &cout) const;
private:
std::map<FID, FID> __relations;
std::map<FID, std::string> __nodes;
};
}
#endif
Event Timeline
Log In to Comment