george: User Manual

[ Introduction ] [ File Structure ] [ #check PROP ] [ #check PRED ] [ #check PREDTYPES ] [ #check TP ]
[ #check ND ] [ #check ST ] [ Arithmetic ] [ Sets ] [ #check Z ] [ #check PC ]
[ Contributions by Students ] [ Credits ] Keywords ]

Propositional Logic Formulas (#check PROP)

Here is an example of the response to a question that requires a propositional logic formula:

#q 05a

Formalize the following sentence:

If it is windy and cold then I won't go outside.

#check PROP

(a & b) => !c

/*
where
a means it's windy
b means it's cold
c means I go outside
*/

george's syntax for propositional logic formulas follows the rules presented in SE212 (e.g., infix, brackets, precedence, and associativity) with the following ASCII symbols for the operators:

Syntax in george Meaning
! operator not
& operator and
| operator or
=> operator implies
<=> operator iff
false false
true true

george's keywords may not be used as identifiers.

What does george check?

For propositional formula, george checks the first non-comment line after the directive to make sure:

The comments are necessary to inform the TAs of the meanings that you associate with each proposition. george expect only one line of propositional logic formula. It does not check a formula split over multiple lines or multiple formulas.