Xreate
The Xreate programming language
List of all members
TranscendLayer Class Reference

Logic reasoning implementation. Internally, it's a proxy to the external ASP solver Clasp More...

Detailed Description

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:

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.

Adaptability

Decorators are used to extend TranscendLayer functionality. The default bundle defined by DefaultTranscendLayerImpl.

See also
See xreate::dfa::DFAPass, xreate::cfa::CFAPass, xreate::IQuery, xreate::IAnalysisReport
Inheritance diagram for TranscendLayer:
LateReasoningTranscendDecorator< Parent >

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

IQueryregisterQuery (IQuery *query, const QueryId &id)
 Registers a query. See xreate::IQuery.
 
IQuerygetQuery (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.
 

The documentation for this class was generated from the following files: