pathterminuspages/projects/aboutcontactabout me

Proposition to Table - Well-formed syntax

Prop2Table #4 :: 18-05-2018

Contents
 -Proposition to Table - Preface
 -Proposition to Table - Parsing input (SLR parser)
 -Proposition to Table - Parser F# code
 @Proposition to Table - Well-formed syntax
 -Proposition to Table - Semantics of propositional logic
 -Proposition to Table - Constructing tables
 -Proposition to Table - The application

A well formed formula is closely related to the CFG (Context Free Grammar) used in the former chapter. To check whether a formula is well formed, we recursively apply these rules

  • ¬: If φ is well-formed, so is ¬φ
  • ∧: If φ and ψ are well-formed, so is (φ ∧ ψ).
  • ∨: If φ and ψ are well-formed, so is (φ ∨ ψ).
  • ⇒: If φ and ψ are well-formed, so is (φ ⇒ ψ).
  • ⇔: If φ and ψ are well-formed, so is (φ ⇔ ψ).

Nothing else is a well-formed formula.

To put this into context: if our parser does not return an error, we can brag about how well-formed our input formula is :-).

CommentsGuest Name:Comment: