transf :: lib :: congruent :: Subterms :: Class Subterms
[frames] | no frames]

Class Subterms




Congruent transformation of subterms.

Instance Methods
 
__init__(self, children, leaf)
Constructor.
 
apply(self, term, ctx)
Applies the transformation to the given term with the specified context.

Inherited from transformation.Transformation: __add__, __call__, __mul__, __neg__, __pos__, __pow__, __repr__

Inherited from object: __delattr__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __str__

Properties

Inherited from object: __class__

Method Details

__init__(self, children, leaf)
(Constructor)

 
Constructor.
Parameters:
  • children - transformation to be applied to the term children.
  • leaf - transformation to be applied if the term has no children.
Overrides: transformation.Transformation.__init__

apply(self, term, ctx)

 
Applies the transformation to the given term with the specified context.
Returns:
The transformed term on success.
Overrides: transformation.Transformation.apply
(inherited documentation)