Package aterm :: Module term :: Class Term
[frames] | no frames]

Class Term




Base class for all terms.

Terms are non-modifiable. Changes are carried out by returning another term instance.

Instance Methods
 
__init__(self, factory)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
 
__setattr__(self, name, value)
Prevent modification of term attributes.
 
__delattr__(self, name)
Prevent deletion of term attributes.
 
getType(self)
Gets the type of this term.
 
getHash(self)
Generate a hash value for this term.
 
getStructuralHash(self)
Generate a hash value for this term.
 
__hash__(self)
Generate a hash value for this term.
 
isEquivalent(self, other)
Checks for structural equivalence of this term agains another term.
 
isEqual(self, other)
Checks equality of this term against another term.
 
__eq__(self, other)
 
__ne__(self, other)
 
rmatch(self, other)
Matches this term against a string pattern.
 
accept(self, visitor, *args, **kargs)
Accept a visitor.
 
writeToTextFile(self, fp)
Write this term to a file object.
 
__str__(self)
Get the string representation of this term.
 
__repr__(self)
repr(x)

Inherited from object: __getattribute__, __new__, __reduce__, __reduce_ex__

Properties

Inherited from object: __class__

Method Details

__init__(self, factory)
(Constructor)

 
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
Overrides: object.__init__
(inherited documentation)

__setattr__(self, name, value)

 
Prevent modification of term attributes.
Overrides: object.__setattr__

__delattr__(self, name)

 
Prevent deletion of term attributes.
Overrides: object.__delattr__

getStructuralHash(self)

 
Generate a hash value for this term. Annotations are not taken into account.

__hash__(self)
(Hashing function)

 
Generate a hash value for this term. Annotations are not taken into account.
Overrides: object.__hash__

isEqual(self, other)

 
Checks equality of this term against another term. Note that for two terms to be equal, any annotations they might have must be equal as well.

__str__(self)
(Informal representation operator)

 
Get the string representation of this term.
Overrides: object.__str__

__repr__(self)
(Representation operator)

 
repr(x)
Overrides: object.__repr__
(inherited documentation)