Package jazzparser :: Package formalisms :: Package base :: Package semantics :: Module lambdacalc :: Class LambdaAbstraction
[hide private]
[frames] | no frames]

Class LambdaAbstraction

source code

 object --+    
          |    
LogicalForm --+
              |
             LambdaAbstraction
Known Subclasses:

A type of complex logical form element corresponding to a lambda abstraction.

Instance Methods [hide private]
 
__init__(self, variable, expression)
Builds a lambda abstraction.
source code
 
copy(self)
This should be overridden by subclasses.
source code
 
alpha_convert(self, source_var, target_var)
This should be overridden by subclasses.
source code
 
beta_reduce(self, *args, **kwargs)
This should be overridden by subclasses.
source code
 
substitute(self, source_variable, target_expression)
This should be overridden by subclasses.
source code
 
replace_immediate_constituent(self, old_lf, new_lf)
This should be overridden by subclasses.
source code
 
get_variables(self)
This should be overridden by subclasses.
source code
 
get_bound_variables(self)
This should be overridden by subclasses.
source code
 
__eq__(self, lf)
This should be overridden by subclasses.
source code
 
alpha_equivalent(self, other, substitution)
Checks whether self is equal to a LF that can be derived by some variable substitution S into other, where S contains the substitution T given by "substitution".
source code
 
comma_string(self)
Returns the string that is to be used if this expression follows another lambda abstraction.
source code
 
comma_latex(self)
Returns the Latex representation that is to be used if this expression follows another lambda abstraction.
source code
 
__str__(self)
str(x)
source code
 
to_latex(self) source code
 
get_children(self)
This should be overridden by subclasses.
source code

Inherited from LogicalForm: __ne__, __repr__, get_ancestor_bound_variables, get_instances, get_unbound_variables, replace_in_parent

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, variable, expression)
(Constructor)

source code 

Builds a lambda abstraction. variable should be a Variable object and expression should be another LogicalForm, potentially containing the variable, bound by this abstraction.

Overrides: object.__init__

copy(self)

source code 

This should be overridden by subclasses.

Overrides: LogicalForm.copy
(inherited documentation)

alpha_convert(self, source_var, target_var)

source code 

This should be overridden by subclasses.

Overrides: LogicalForm.alpha_convert
(inherited documentation)

beta_reduce(self, *args, **kwargs)

source code 

This should be overridden by subclasses.

Overrides: LogicalForm.beta_reduce
(inherited documentation)

substitute(self, source_variable, target_expression)

source code 

This should be overridden by subclasses.

Overrides: LogicalForm.substitute
(inherited documentation)

replace_immediate_constituent(self, old_lf, new_lf)

source code 

This should be overridden by subclasses. It should replace the LogicalForm old_lf with new_lf if it appears as an immediate constituent of this LogicalForm.

Overrides: LogicalForm.replace_immediate_constituent
(inherited documentation)

get_variables(self)

source code 

This should be overridden by subclasses.

This method returns a list of all the variables used in this LF. This includes bound and unbound variables. (Only unbound variables need to be alpha-converted to avoid accidental binding, but we will convert bound variables too for readability.)

Note that this only contains one instance of each variable, not every occurrence.

Overrides: LogicalForm.get_variables
(inherited documentation)

get_bound_variables(self)

source code 

This should be overridden by subclasses.

Overrides: LogicalForm.get_bound_variables
(inherited documentation)

__eq__(self, lf)
(Equality operator)

source code 

This should be overridden by subclasses.

Overrides: LogicalForm.__eq__
(inherited documentation)

alpha_equivalent(self, other, substitution)

source code 

Checks whether self is equal to a LF that can be derived by some variable substitution S into other, where S contains the substitution T given by "substitution".

Overrides: LogicalForm.alpha_equivalent

__str__(self)
(Informal representation operator)

source code 

str(x)

Overrides: object.__str__
(inherited documentation)

get_children(self)

source code 

This should be overridden by subclasses.

Overrides: LogicalForm.get_children
(inherited documentation)