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

Class VariableExpression

source code

Expression --+
             |
            VariableExpression
Known Subclasses:
IndVariableExpression

A variable expression which consists solely of a variable.

Instance Methods [hide private]
 
__init__(self, variable) source code
 
equals(self, other)
Allow equality between instances of VariableExpression and IndVariableExpression.
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
 
infixify(self) source code
 
name(self) source code
 
_skolemise(self, bound_vars, counter) source code
 
__str__(self) source code
 
__repr__(self) source code
 
__hash__(self) source code

Inherited from Expression: __eq__, __ne__, skolemise

Method Details [hide private]

__init__(self, variable)
(Constructor)

source code 
Overrides: Expression.__init__

equals(self, other)

source code 

Allow equality between instances of VariableExpression and IndVariableExpression.

Overrides: Expression.equals

variables(self)

source code 

Set of all variables.

Overrides: Expression.variables
(inherited documentation)

free(self)

source code 

Set of free variables.

Overrides: Expression.free
(inherited documentation)

subterms(self)

source code 

Set of all subterms (including self).

Overrides: Expression.subterms
(inherited documentation)

replace(self, variable, expression)

source code 

Replace all instances of variable v with expression E in self, where v is free in self.

Overrides: Expression.replace
(inherited documentation)

simplify(self)

source code 

Evaluate the form by repeatedly applying applications.

Overrides: Expression.simplify
(inherited documentation)

_skolemise(self, bound_vars, counter)

source code 
Overrides: Expression._skolemise

__str__(self)
(Informal representation operator)

source code 
Overrides: Expression.__str__

__repr__(self)
(Representation operator)

source code 
Overrides: Expression.__repr__

__hash__(self)
(Hashing function)

source code 
Overrides: Expression.__hash__