Giter VIP home page Giter VIP logo

natural-natural-deduction's Introduction

"Natural" Natural Deduction

Repository for the "Natural" Natural Deduction system: a theorem prover for propositional logic that uses natural deduction and heuristics to find its proofs.

Dependencies

  • SWI Prolog version >= 8.2.4 for finding proofs and parsing to LaTeX code
  • Python version >= 3.8.5 for file operations and parsing input to Prolog code
  • The Python module PySwip version >= 0.2.10 for connecting Prolog to Python
  • pdflatex/TeX Live 2020 for compiling a LaTeX document

Install

git clone https://github.com/flijnzaad/natural-natural-deduction.git
cd natural-natural-deduction
chmod +x interface/main.py

Run

  • cd to the interface directory and run ./main.py. See ./main.py --help for more information and options. Note that while using the program via its interface, it can only be aborted by using killall python3. This is because of a limitation in PySwip. The interface has a set time limit of 10 minutes, after which it aborts the search.

Running the system within Prolog

One may also run the system from within Prolog.

Starting, stopping and loading the system

  • You can load the system by passing the program to the Prolog interpreter (prolog and swipl are equivalent commands) directly:

    $ prolog system.pl queries.pl
    
  • Within the Prolog interpreter, you can load the knowledge bases using make/0:

    ?- make.
    
    • make/0 consults all source files that have been changed since they were consulted.
    • If you started the interpreter without arguments (i.e. just prolog), you first need to load the knowledge bases using [system]. and [queries]. before you can use make..
  • To test all queries at once:

    $ prolog test.pl
    
    • This will exit the Prolog interpreter if it has succesfully executed all goals.
  • The Prolog interpreter can be stopped with Ctrl + D, or by typing:

    ?- halt.
    

Debugging

  • If the system gets stuck in infinite recursion, you can stop it with Ctrl + C. Then type a, for [a]bort.
  • To find out how long execution of a query is taking, you may use the time/1 predicate, e.g. time(q5(X)).

To do

(Note to supervisor and second reader: I will not change these things in the main branch until after I have received a grade for my thesis.)

  • Fix the issues with completeness and the search strategy
  • Add input file functionality
  • Add option to change the timeout time via command line
  • Add documentation (i.e. thesis report) for developing
  • Make this README more extensive in describing the options etc. for user
  • Catch syntax errors in parsing input formulas before starting to query

natural-natural-deduction's People

Contributors

flijnzaad avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

natural-natural-deduction's Issues

how testing this prover?

Hello, this prover seems very nice, but I am unable to understand how testing it. Where have I to write formulas to test their validity? It is very unclear and th documentation should be more explicit about this basic point. Thanks.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.