Skip to content

HondaPL/Haskell-Tautology-Checker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Haskell Tautology Checker and Parser

Table of contents

Tables of truth for operators

Negation
P ~P
T F
F T
Disjunction
P Q P | Q
T T T
T F T
F T T
F F F
Conjunction
P Q P & Q
T T T
T F F
F T F
F F F
Implication
P Q P -> Q
T T T
T F F
F T T
F F T
Biconditional
P Q P <=> Q
T T T
T F F
F T F
F F T

Screenshots

Tests examples Example screenshot

Example screenshot

Technologies

  • Haskell

Setup

  1. Run ghci command
  2. Run l TautologyParser.hs Example screenshot

Then you can run runFormula eg.

Example screenshot

or getFormula eg. Example screenshot

Features

  • Parsing logical formulas with

    • Disjunction as |
    • Conjunction as &
    • Implication as ->
    • Biconditional as <=>
    • Negation as ~
    • Brackets as () Example screenshot
  • Checking if it's a tautology

Status

Project is: completed

Inspiration

  1. Video about parsers by Professor Graham Hutton
  2. Book about programming in Haskell

Contact

Created by @HondaPL 2021

Releases

No releases published

Packages

No packages published