souffle  2.0.2-371-g6315b36
Public Member Functions | Protected Member Functions
souffle::ram::DebugInfo Class Reference

Debug statement. More...

#include <DebugInfo.h>

Inheritance diagram for souffle::ram::DebugInfo:
Inheritance graph
Collaboration diagram for souffle::ram::DebugInfo:
Collaboration graph

Public Member Functions

void apply (const NodeMapper &map) override
 Apply the mapper to all child nodes. More...
 
DebugInfoclone () const override
 Create a clone (i.e. More...
 
 DebugInfo (Own< Statement > stmt, std::string msg)
 
std::vector< const Node * > getChildNodes () const override
 Obtain list of all embedded child nodes. More...
 
- Public Member Functions inherited from souffle::ram::Node
bool operator!= (const Node &other) const
 Inequality check for two RAM nodes. More...
 
bool operator== (const Node &other) const
 Equivalence check for two RAM nodes. More...
 
virtual void rewrite (const Node *oldNode, Own< Node > newNode)
 Rewrite a child node. More...
 
virtual ~Node ()=default
 
- Public Member Functions inherited from souffle::ram::AbstractLog
 AbstractLog (Own< Statement > stmt, std::string msg)
 
void apply (const NodeMapper &map)
 
std::vector< const Node * > getChildNodes () const
 
const std::string & getMessage () const
 Get logging message. More...
 
const StatementgetStatement () const
 Get logging statement. More...
 

Protected Member Functions

void print (std::ostream &os, int tabpos) const override
 Pretty print with indentation. More...
 
- Protected Member Functions inherited from souffle::ram::Statement
void print (std::ostream &os) const override
 Print RAM node. More...
 
- Protected Member Functions inherited from souffle::ram::Node
virtual bool equal (const Node &) const
 Equality check for two RAM nodes. More...
 
- Protected Member Functions inherited from souffle::ram::AbstractLog
bool equal (const Node &node) const
 

Additional Inherited Members

- Static Protected Member Functions inherited from souffle::ram::Statement
static void print (const Statement *statement, std::ostream &os, int tabpos)
 Pretty print jump-bed. More...
 
- Protected Attributes inherited from souffle::ram::AbstractLog
const std::string message
 Logging message. More...
 
Own< Statementstatement
 Logging statement. More...
 

Detailed Description

Debug statement.

For example:

BEGIN_DEBUG "gen(1) \nin file /file.dl [7:7-7:10]\;"
...
END_DEBUG

Definition at line 47 of file DebugInfo.h.

Constructor & Destructor Documentation

◆ DebugInfo()

souffle::ram::DebugInfo::DebugInfo ( Own< Statement stmt,
std::string  msg 
)
inline

Definition at line 49 of file DebugInfo.h.

51 {

Referenced by getChildNodes().

Member Function Documentation

◆ apply()

void souffle::ram::DebugInfo::apply ( const NodeMapper )
inlineoverridevirtual

Apply the mapper to all child nodes.

Reimplemented from souffle::ram::Node.

Definition at line 59 of file DebugInfo.h.

59  :
60  void print(std::ostream& os, int tabpos) const override {
61  os << times(" ", tabpos) << "BEGIN_DEBUG \"" << stringify(message) << "\"" << std::endl;

References souffle::ram::AbstractLog::message, souffle::ram::Statement::print(), souffle::ram::AbstractLog::statement, souffle::stringify(), and souffle::times().

Here is the call graph for this function:

◆ clone()

DebugInfo* souffle::ram::DebugInfo::clone ( ) const
inlineoverridevirtual

Create a clone (i.e.

deep copy) of this node

Implements souffle::ram::Statement.

Definition at line 55 of file DebugInfo.h.

55  {
57  }

References souffle::ram::AbstractLog::apply(), and souffle::map().

Here is the call graph for this function:

◆ getChildNodes()

std::vector<const Node*> souffle::ram::DebugInfo::getChildNodes ( ) const
inlineoverridevirtual

Obtain list of all embedded child nodes.

Reimplemented from souffle::ram::Node.

Definition at line 51 of file DebugInfo.h.

51  {
53  }

References souffle::clone(), DebugInfo(), souffle::ram::AbstractLog::message, and souffle::ram::AbstractLog::statement.

Here is the call graph for this function:

◆ print()

void souffle::ram::DebugInfo::print ( std::ostream &  os,
int  tabpos 
) const
inlineoverrideprotectedvirtual

Pretty print with indentation.

Implements souffle::ram::Statement.

Definition at line 64 of file DebugInfo.h.


The documentation for this class was generated from the following file:
souffle::map
auto map(const std::vector< A > &xs, F &&f)
Applies a function to each element of a vector and returns the results.
Definition: ContainerUtil.h:158
souffle::ram::AbstractLog::apply
void apply(const NodeMapper &map)
Definition: AbstractLog.h:59
souffle::ram::AbstractLog::message
const std::string message
Logging message.
Definition: AbstractLog.h:74
souffle::stringify
std::string stringify(const std::string &input)
Stringify a string using escapes for escape, newline, tab, double-quotes and semicolons.
Definition: StringUtil.h:334
souffle::clone
auto clone(const std::vector< A * > &xs)
Definition: ContainerUtil.h:172
souffle::times
detail::multiplying_printer< T > times(const T &value, unsigned num)
A utility printing a given value multiple times.
Definition: StreamUtil.h:322
souffle::ram::DebugInfo::DebugInfo
DebugInfo(Own< Statement > stmt, std::string msg)
Definition: DebugInfo.h:49
souffle::ram::DebugInfo::print
void print(std::ostream &os, int tabpos) const override
Pretty print with indentation.
Definition: DebugInfo.h:64
souffle::ram::AbstractLog::statement
Own< Statement > statement
Logging statement.
Definition: AbstractLog.h:71