Skip to content

Coq implementation and proof of a basic SAT algorithm

Notifications You must be signed in to change notification settings

fabiensiron/coqsat

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CoqSat

CoqSat is a Coq implementation of a basic Sat algorithm with soundness proof. Its goal is only pedagogical.

Installation

To build:

source env_win32.sh # if on win32 via linux subsystem
./configure.sh # generate makefile with coq_makefile
make

I recommand using proof-general, the emacs plugin. Tested with Coq 8.8.2.

Usage

Require Import Formula.

Definition X := Var 0.
Definition Y := Var 1.

Definition ex :=
  And (Or X (Negate Y))
      (Or (Negate X) Y).

Definition model : valuation :=
  update_valuation
    (update_valuation empty_valuation 0 true)
    1 true.


Compute (simplify_and_valuate model ex).

Require Import Solver.

Compute (solver ex).

TODO

  • DPLL solver and soundness
  • use it as an ocaml library

License

Beerware

About

Coq implementation and proof of a basic SAT algorithm

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published