Must work in Python 3.4+ without any special libraries (besides those that are in all default Python installations, e.g. sys, os, etc.)

computer science

Description

      You will write a theorem prover and parser for ZOL using tableaux

      Must work in Python 3.4+ without any special libraries (besides those that are in all default Python installations, e.g. sys, os, etc.)

      The file ZOL.py with no outputting code (print or any similar statements) at any level. This file should have a function isSatisfiable(F), where:

     F: A string which is an S-expression of a ZOL formula. You can assume:

      The operators used are IF,IFF,AND,OR,XOR,and NOT.

      The NOT operator has one argument, a wff

      The IF, IFF,and XOR operators have two wffs as arguments

      The special = predicate takes two objects as arguments (= is in prefix form, not infix)

      The AND and OR operators have two or more arguments

      All predicates have zero or more arguments

      All functions will have zero or more arguments

      All predicate, function, and object symbols will be alphanumberic strings

      All formulae are well-formed

      Symbols may be overloaded---type is determined through position

     Returns a list [S, P, O, Fn] where:

      S is a string telling us whether F was satisfiable:

     “T” If the formula is a tautology,

     “S” If the formula is satisfiable but not a tautology,

     “U” If the formula is unsatisfiable.

      P is a set of strings, where each string is one of the predicate symbols in F.

      O is a set of strings, where each string is one of the object symbols in F.

      Fn is a set of strings, where each string is one of the function symbols in F.

      You must use the tableaux method to solve this problem and please comment it clearly.

      30 seconds maximum per problem

      TEST THE CODE BASED ON ATTACHED .PY FILE. 


Related Questions in computer science category


Disclaimer
The ready solutions purchased from Library are already used solutions. Please do not submit them directly as it may lead to plagiarism. Once paid, the solution file download link will be sent to your provided email. Please either use them for learning purpose or re-write them in your own language. In case if you haven't get the email, do let us know via chat support.