Inference Rules and Axioms
- Axioms - Things we know (given)
- Inference Rules - Things we can deduce from things we know in step 1 (Axioms)
- Derivations - Sequences of inference rule applications
An inference rule is a set of antecedents and a consequent. If the antecedents are true, the consequent follows. (If A and B then C)
Logic Rules:
Notational conventions:
is a variable representing values is a variable representing terms is an operation in our concrete syntax while is an operation in Haskell is an evaluation relation, it is read " evaluates to "
Rules
Values evaluate to themselves. (Note the underline)
eval (Num v) = v
Subtraction in AE is subtraction in Haskell
Note
We add a second rule to make sure invalid cases evaluate as well.
eval (Sub (Num v1) (Num v2))