Xreate
The Xreate programming language
|
Logic reasoning implementation. Internally, it's a proxy to the external ASP solver Clasp More...
Logic reasoning implementation. Internally, it's a proxy to the external ASP solver Clasp
Performs reasoning over source codes in order to facilitate efficient compilation using results from a number of internal analyzers. Clients implement IAnalysisReport to supply Transcend with data and implement IQuery to find out resolutions.
Transcend uses the following sources to build a logic program before actual reasoning is performed:
involveImports()
(private member).Generally, Transcend input could be loosely broke down into three categories:
After Transcend has gathered data from all providers and the logic program is fully constructed, it runs the external logic reasoner to receive back the solution.
The solution from the external logic reasoner is accessible via queries. Classes which want to request data from Transcend should implement the IQuery interface. See IQuery descendants to find out currently available queries.
Decorators are used to extend TranscendLayer functionality. The default bundle defined by DefaultTranscendLayerImpl.
Public Member Functions | |
void | run () |
Executes reasoning. | |
Data Providers Management | |
void | registerReport (IAnalysisReport *report) |
void | printReports () |
void | deleteReports () |
void | addRawScript (std::string &&script) |
Appends arbitrary string to a logic program. | |
Queries Management | |
IQuery * | registerQuery (IQuery *query, const QueryId &id) |
Registers a query. See xreate::IQuery. | |
IQuery * | getQuery (const QueryId &id) |
Returns a particular query. See xreate::IQuery. | |
StaticModel | query (const std::string &atom) const |
size_t | getScopesCount () const |
SymbolPacked | pack (const Symbol &symbol, std::string hintSymbolName="") |
ScopePacked | pack (const CodeScope *const scope) |
Symbol | unpack (const SymbolPacked &symbol) const |
SymbolNode | pack (const SymbolGeneralized &symbol, const std::string &hintSymbolName) |
SymbolGeneralized | unpack (const SymbolNode &symbol) const |
std::string | getHintForPackedSymbol (const SymbolPacked &symbol) |
template<class ... Types> | |
static std::tuple< Types... > | parse (const Gringo::Symbol &atom) |
Diagnostic | |
void | addRuleWarning (const RuleWarning &rule) |
Registers diagnostic rules. | |
unsigned int | registerWarning (std::string &&message) |
Registers diagnostic messages. | |