Package nltk_lite :: Package contrib :: Package mit :: Package six863 :: Package semantics :: Module logic :: Class Expression
[hide private]
[frames] | no frames]

Class Expression

source code

object --+
         |
        Expression
Known Subclasses:
VariableBinderExpression, ApplicationExpression, ConstantExpression, VariableExpression

The abstract class of a lambda calculus expression.

Instance Methods [hide private]
 
__init__(self)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
__eq__(self, other) source code
 
__ne__(self, other) source code
 
equals(self, other)
Are the two expressions equal, modulo alpha conversion?
source code
 
variables(self)
Set of all variables.
source code
 
free(self)
Set of free variables.
source code
 
subterms(self)
Set of all subterms (including self).
source code
 
replace(self, variable, expression, replace_bound=True)
Replace all instances of variable v with expression E in self, where v is free in self.
source code
 
replace_unique(self, variable, counter=None, replace_bound=True)
Replace a variable v with a new, uniquely-named variable.
source code
 
simplify(self)
Evaluate the form by repeatedly applying applications.
source code
 
skolemise(self)
Perform a simple Skolemisation operation.
source code
 
skolemize(self)
Perform a simple Skolemisation operation.
source code
 
_skolemise(self, bound_vars, counter) source code
 
clauses(self) source code
 
__str__(self)
str(x)
source code
 
__repr__(self)
repr(x)
source code
 
__hash__(self)
hash(x)
source code
 
normalize(self) source code

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

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self)
(Constructor)

source code 

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
(inherited documentation)

skolemise(self)

source code 

Perform a simple Skolemisation operation. Existential quantifiers are simply dropped and all variables they introduce are renamed so that they are unique.

skolemize(self)

source code 

Perform a simple Skolemisation operation. Existential quantifiers are simply dropped and all variables they introduce are renamed so that they are unique.

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

__repr__(self)
(Representation operator)

source code 

repr(x)

Overrides: object.__repr__
(inherited documentation)

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: object.__hash__
(inherited documentation)