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

Class Expression

source code

Known Subclasses:
ApplicationExpression, VariableBinderExpression, ConstantExpression, VariableExpression

The abstract class of a lambda calculus expression.

Instance Methods [hide private]
 
__init__(self) 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 all instances of variable v with expression E in self, where v is free in self.
source code
 
simplify(self)
Evaluate the form by repeatedly applying applications.
source code
 
skolemise(self)
Perform a simple Skolemisation operation.
source code
 
_skolemise(self, bound_vars, counter) source code
 
__str__(self) source code
 
__repr__(self) source code
 
__hash__(self) source code
Method Details [hide private]

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.