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

Class VariableBinderExpression

source code

object --+    
         |    
Expression --+
             |
            VariableBinderExpression
Known Subclasses:
AllExpression, LambdaExpression, SomeExpression

A variable binding expression: e.g. \x.M.

Instance Methods [hide private]
 
__init__(self, variable, term)
x.__init__(...) initializes x; see x.__class__.__doc__ for signature
source code
 
equals(self, other)
Defines equality modulo alphabetic variance.
source code
 
_relabel(self, other)
Relabel other's bound variables to be the same as self's variable.
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
 
alpha_convert(self, newvar)
Rename all occurrences of the variable introduced by this variable binder in the expression to @newvar.
source code
 
simplify(self)
Evaluate the form by repeatedly applying applications.
source code
 
infixify(self) source code
 
__str__(self, continuation=0)
str(x)
source code
 
__hash__(self)
hash(x)
source code

Inherited from Expression: __eq__, __ne__, __repr__, clauses, normalize, replace_unique, skolemise, skolemize

Inherited from Expression (private): _skolemise

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

Class Variables [hide private]
  _counter = Counter()
Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, variable, term)
(Constructor)

source code 

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

Overrides: Expression.__init__

equals(self, other)

source code 

Defines equality modulo alphabetic variance.

If we are comparing \x.M and \y.N, then check equality of M and N[x/y].

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, replace_bound=True)

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)

__str__(self, continuation=0)
(Informal representation operator)

source code 

str(x)

Overrides: Expression.__str__

__hash__(self)
(Hashing function)

source code 

hash(x)

Overrides: Expression.__hash__