ROSE 0.11.145.147
Functions
Rose::AST::Checker Namespace Reference

Description

Checking function that apply to the whole AST.

Two categories of checker: integrity and consistency If integrity checker reports defects then the consistency checker might fail. Similarly, if the edges integrity checker reports defects then the other integrity checkers might fail.

Functions

bool all (SgProject *project)
 Apply all existing Checkers.
 
bool integrity (SgProject *project)
 check multiple low-level properties of the AST's graph.
 
bool integrity_edges (SgProject *project)
 for all valid node in the AST's graph check that the target of all edges are valid.
 
bool integrity_declarations (SgProject *project)
 check all declaration subgraphs (1st-nondef / defn)
 
bool integrity_symbols (SgProject *project)
 check all symbol subgraphs.
 
bool integrity_types (SgProject *project)
 check all type subgraphs.
 
bool consistency (SgProject *project)
 check (potentially complex) rules
 

Function Documentation

◆ all()

bool Rose::AST::Checker::all ( SgProject project)

Apply all existing Checkers.

Parameters
project
Returns
true if no defect was found

Run all integrity checkers followed by the consistency checkers if the former does not find any defects.

Any defect found is saved in Rose::AST::Defect::all (aka Rose::AST::Defects::defect_t<Defects::Kind::any>::all).

◆ integrity()

bool Rose::AST::Checker::integrity ( SgProject project)

check multiple low-level properties of the AST's graph.

Parameters
project
Returns
true if no defect was found

Run all integrity checkers starting by the edge integrity checker then the other integrity checkers if the edges have no defect.

Any defect found is saved in Rose::AST::Defect::all (aka Rose::AST::Defects::defect_t<Defects::Kind::any>::all).

◆ integrity_edges()

bool Rose::AST::Checker::integrity_edges ( SgProject project)

for all valid node in the AST's graph check that the target of all edges are valid.

Parameters
project
Returns
true if no defect was found

Check the edges out of all allocated nodes in the memory pool. For each (non-null) edge, it looks for the pointer in all memory pools. If not found, an IntegrityEdgeDefect is produced with Reason::invalid. If found in an unexpected memory pool, an IntegrityEdgeDefect is produced with Reason::incompatible. If found but not marked as allocated, an IntegrityEdgeDefect is produced with Reason::unallocated. A single edge can yield two defects one with Reason::incompatible and the other with Reason::unallocated.

Any defect found is saved in Rose::AST::Defect::all (aka Rose::AST::Defects::defect_t<Defects::Kind::any>::all).

◆ integrity_declarations()

bool Rose::AST::Checker::integrity_declarations ( SgProject project)

check all declaration subgraphs (1st-nondef / defn)

Parameters
project
Returns
true if no defect was found

Check ...

Any defect found is saved in Rose::AST::Defect::all (aka Rose::AST::Defects::defect_t<Defects::Kind::any>::all).

◆ integrity_symbols()

bool Rose::AST::Checker::integrity_symbols ( SgProject project)

check all symbol subgraphs.

Parameters
project
Returns
true if no defect was found

Check ...

Any defect found is saved in Rose::AST::Defect::all (aka Rose::AST::Defects::defect_t<Defects::Kind::any>::all).

◆ integrity_types()

bool Rose::AST::Checker::integrity_types ( SgProject project)

check all type subgraphs.

Parameters
project
Returns
true if no defect was found

Check ...

Any defect found is saved in Rose::AST::Defect::all (aka Rose::AST::Defects::defect_t<Defects::Kind::any>::all).

◆ consistency()

bool Rose::AST::Checker::consistency ( SgProject project)

check (potentially complex) rules

Parameters
project
Returns
true if no defect was found

Check ...

Any defect found is saved in Rose::AST::Defect::all (aka Rose::AST::Defects::defect_t<Defects::Kind::any>::all).