Inferno  0.2
CompareReplace Class Reference

#include <search_replace.hpp>

Inheritance diagram for CompareReplace:
[legend]
Collaboration diagram for CompareReplace:
[legend]

List of all members.

Public Member Functions

 CompareReplace (TreePtr< Node > cp=TreePtr< Node >(), TreePtr< Node > rp=TreePtr< Node >(), bool im=true)
void Configure (TreePtr< Node > cp, TreePtr< Node > rp=TreePtr< Node >())
TreePtr< NodeGetContext () const
virtual void GetGraphInfo (vector< string > *labels, vector< TreePtr< Node > > *links) const
const CompareReplaceGetOverallMaster () const
bool DecidedCompare (const TreePtrInterface &x, TreePtr< Node > pattern, bool can_key, Conjecture &conj) const
bool Compare (const TreePtrInterface &x, TreePtr< Node > pattern, bool can_key=false) const
virtual bool IsMatch (TreePtr< Node > context, TreePtr< Node > root)
TreePtr< NodeBuildReplace (TreePtr< Node > pattern) const
void operator() (TreePtr< Node > context, TreePtr< Node > *proot)

Static Public Member Functions

static void Test ()
static void SetMaxReps (int n, bool e)

Public Attributes

bool is_master
TreePtr< Nodecompare_pattern
TreePtr< Nodereplace_pattern
CompareReplacemaster_ptr
TreePtr< Node > * pcontext
CouplingKeys coupling_keys
set< TreePtr< Node > > dirty_grass
Set< TreePtr< Node > > pattern_pedigree
Set< TreePtr< Node > > duplicated_pedigree
Set< TreePtr< Node > > keyed_pedigree

Friends

class Conjecture
class NormalAgent

Detailed Description

Definition at line 76 of file search_replace.hpp.


Constructor & Destructor Documentation

CompareReplace::CompareReplace ( TreePtr< Node cp = TreePtr<Node>(),
TreePtr< Node rp = TreePtr<Node>(),
bool  im = true 
)

Definition at line 47 of file search_replace.cpp.

References Configure().

Referenced by Test().


Member Function Documentation

bool CompareReplace::Compare ( const TreePtrInterface x,
TreePtr< Node pattern,
bool  can_key = false 
) const

Definition at line 185 of file search_replace.cpp.

References ASSERT, Conjecture::Increment(), INDENT, and TRACE.

Referenced by IsMatch(), StarBase::MatchRange(), and Test().

void CompareReplace::Configure ( TreePtr< Node cp,
TreePtr< Node rp = TreePtr<Node>() 
)

Reimplemented in SearchReplace.

Definition at line 60 of file search_replace.cpp.

References ASSERT, compare_pattern, coupling_keys, FOREACH, replace_pattern, and TRACE.

Referenced by CompareReplace().

Definition at line 94 of file search_replace.hpp.

References ASSERT, and pcontext.

void CompareReplace::GetGraphInfo ( vector< string > *  labels,
vector< TreePtr< Node > > *  links 
) const [virtual]

Reimplemented from Transformation.

Reimplemented in SlaveIntermediate< SearchReplace >, SlaveIntermediate< CompareReplace >, and SearchReplace.

Definition at line 114 of file search_replace.cpp.

References compare_pattern, and replace_pattern.

Definition at line 118 of file search_replace.hpp.

References master_ptr.

Referenced by NormalAgent::DecidedCompare().

bool CompareReplace::IsMatch ( TreePtr< Node context,
TreePtr< Node root 
) [virtual]

Implements Filter.

Definition at line 228 of file search_replace.cpp.

References ASSERT, Compare(), compare_pattern, and pcontext.

void CompareReplace::operator() ( TreePtr< Node context,
TreePtr< Node > *  proot 
) [virtual]

Implements Transformation.

Definition at line 460 of file search_replace.cpp.

References ASSERT, compare_pattern, INDENT, pcontext, and TRACE.

static void CompareReplace::SetMaxReps ( int  n,
bool  e 
) [inline, static]

Definition at line 117 of file search_replace.hpp.

Referenced by main().

void CompareReplace::Test ( ) [static]

Definition at line 630 of file search_replace.cpp.

References ASSERT, Compare(), CompareReplace(), and TRACE.

Referenced by SelfTest().


Friends And Related Function Documentation

friend class Conjecture [friend]

Definition at line 136 of file search_replace.hpp.

friend class NormalAgent [friend]

Definition at line 169 of file search_replace.hpp.


Member Data Documentation

Definition at line 105 of file search_replace.hpp.

Referenced by NormalAgent::DecidedCompare().

Definition at line 111 of file search_replace.hpp.

Definition at line 99 of file search_replace.hpp.

Definition at line 112 of file search_replace.hpp.

Definition at line 103 of file search_replace.hpp.

Referenced by GetContext(), IsMatch(), and operator()().


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