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

Module logic

source code

Classes [hide private]
  Error
  Variable
A variable, either free or bound.
  Constant
A nonlogical constant.
  Expression
The abstract class of a lambda calculus expression.
  VariableExpression
A variable expression which consists solely of a variable.
  IndVariableExpression
An individual variable expression, as determined by is_indvar().
  ConstantExpression
A constant expression, consisting solely of a constant.
  Operator
A boolean operator, such as 'not' or 'and', or the equality relation ('=').
  VariableBinderExpression
A variable binding expression: e.g.
  LambdaExpression
A lambda expression: \x.M.
  SomeExpression
An existential quantification expression: some x.M.
  AllExpression
A universal quantification expression: all x.M.
  ApplicationExpression
An application expression: (M N).
  ApplicationExpressionSubst
  LambdaExpressionSubst
  SomeExpressionSubst
  AllExpressionSubst
  Parser
A lambda calculus expression parser.
Functions [hide private]
 
unique_variable(counter=None) source code
Boolean
is_indvar(expr)
Check whether an expression has the form of an individual variable.
source code
 
expressions()
Return a sequence of test expressions.
source code
 
demo() source code
Variables [hide private]
  _counter = Counter()
Function Details [hide private]

is_indvar(expr)

source code 

Check whether an expression has the form of an individual variable.

An individual variable matches the following regex: '^[wxyz](\d*)'.

Parameters:
  • expr - String
Returns: Boolean