souffle
2.0.2-371-g6315b36
|
Go to the documentation of this file.
35 class TranslationUnit;
39 class NormalisedClause {
41 struct NormalisedClauseElement {
43 std::vector<std::string>
params;
62 const std::vector<NormalisedClauseElement>&
getElements()
const {
76 void addClauseAtom(
const std::string& qualifier,
const std::string& scopeID,
const Atom* atom);
91 static constexpr
const char*
name =
"clause-normalisation";
97 void print(std::ostream& os)
const override;
const std::set< std::string > & getVariables() const
bool isFullyNormalised() const
const std::vector< NormalisedClauseElement > & getElements() const
Intermediate representation of a horn clause.
void print(std::ostream &os) const override
print the analysis result in HTML format
void run(const TranslationUnit &translationUnit) override
run analysis for a Ast translation unit
NormalisedClause()=default
An abstract class for arguments.
const std::set< std::string > & getConstants() const
std::set< std::string > variables
std::vector< std::string > params
std::map< const Clause *, NormalisedClause > normalisations
Translation unit class for the translation pipeline.
static constexpr const char * name
ClauseNormalisationAnalysis()
Defines an abstract class for literals in a horn clause.
std::vector< NormalisedClauseElement > clauseElements
const NormalisedClause & getNormalisation(const Clause *clause) const
Abstract class for a AST Analysis.
std::set< std::string > constants
void addClauseBodyLiteral(const std::string &scopeID, const Literal *lit)
Parse a body literal into the element list.
std::string normaliseArgument(const Argument *arg)
Return a normalised string repr of an argument.
void addClauseAtom(const std::string &qualifier, const std::string &scopeID, const Atom *atom)
Parse an atom with a preset name qualifier into the element list.