diff options
author | filip <“filip.rabiega@gmail.com”> | 2025-04-22 18:38:38 +0200 |
---|---|---|
committer | filip <“filip.rabiega@gmail.com”> | 2025-04-22 18:59:19 +0200 |
commit | 2e893fd0df7dae8c4ae843d4a23acb098dd97aff (patch) | |
tree | 1f4a50da28d2e6ef04b2fc2b663790b42352f2ca /lib/types.ml | |
parent | af76b11278204c25428c4f95ef51d4aa8f2a1e0e (diff) | |
download | chadprover-2e893fd0df7dae8c4ae843d4a23acb098dd97aff.tar.gz chadprover-2e893fd0df7dae8c4ae843d4a23acb098dd97aff.tar.bz2 chadprover-2e893fd0df7dae8c4ae843d4a23acb098dd97aff.zip |
added a functional parser
Diffstat (limited to 'lib/types.ml')
-rw-r--r-- | lib/types.ml | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/types.ml b/lib/types.ml new file mode 100644 index 0000000..bf6a34d --- /dev/null +++ b/lib/types.ml @@ -0,0 +1,32 @@ +(* Data types useful for our theorem prover *) + +(* logical proposition *) +type proposition = + | True + | False + | Lit of string + | Not of proposition + | And of proposition * proposition + | Or of proposition * proposition + | Implies of proposition * proposition + | Iff of proposition * proposition + +(* interpretation of propositional symbols *) +type interpretation = (string * bool) list + +(* allows us to substitute any proposition for any atomic literal *) +type substitution = (string * proposition) list + +(* tokens used by lexer and parser *) +type tok = + | TRUE + | FALSE + | LIT of string + | NOT + | AND + | OR + | IMPLIES + | IFF + | LEFT_PAREN + | RIGHT_PAREN + | SKIP |