Example #1
0
    def __tc(l, r):
        if not isinstance(l, Formula):
            raise ex.TypeCheckingError('Iff: the left operand of\
 Iff is not a well-formed formula.')
        if not isinstance(r, Formula):
            raise ex.TypeCheckingError('Iff: the right operand of\
 Iff is not a well-formed formula.')
Example #2
0
 def __tc(l):
     if not isinstance(l, list):
         raise ex.TypeCheckingError(
             'Or: a list of formulae must be provided.')
     if len(l) < 2:
         raise ex.TypeCheckingError(
             'Or: at least 2 operands must be provided.')
     for f in l:
         if not isinstance(f, Formula):
             raise ex.TypeCheckingError(
                 'Or: an operand of And is not a well-formed formula.')
Example #3
0
    def __tc(l):
        if not isinstance(l, Formula):
            raise ex.TypeCheckingError('Not: the operand of\
 Not is not a well-formed formula.')
Example #4
0
    def __tc(name):
        if not isinstance(name, str):
            raise ex.TypeCheckingError('Prop: a\
 propositional variable must be a string.')
Example #5
0
 def __tc(name):
     if not isinstance(name, str):
         raise ex.TypeCheckingError('Variable: a variable must be a string.')