Integrating st lmarck s algorithm in coq
This presentation is the property of its rightful owner.
Sponsored Links
1 / 26

Integrating Stålmarck’s algorithm in Coq PowerPoint PPT Presentation


  • 43 Views
  • Uploaded on
  • Presentation posted in: General

Integrating Stålmarck’s algorithm in Coq. Laurent Théry Lemme. Motivations. Verifying verification tools Adding more automation to Coq. Outline. What is Stålmarck’s algorithm? How to integrate it to Coq? How efficient is the result?. Stålmarck’s algorithm. Tautology Checker

Download Presentation

Integrating Stålmarck’s algorithm in Coq

An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Integrating st lmarck s algorithm in coq

Integrating Stålmarck’s algorithm in Coq

Laurent Théry

Lemme


Motivations

Motivations

  • Verifying verification tools

  • Adding more automation to Coq


Outline

Outline

  • What is Stålmarck’s algorithm?

  • How to integrate it to Coq?

  • How efficient is the result?


St lmarck s algorithm

Stålmarck’s algorithm

  • Tautology Checker

  • Developed by Gunnar Stålmarck

  • Year 1994

  • Commercialised by Prover Technology

  • Patented Algorithm!!!!


Boolean formulae

Boolean Formulae

Constant value:

Variables:

Negation:

Conjunction:

Disjunction:

Implication:


Checking tautologies

Checking tautologies

Checking if the formula is true for

all assignment:


Triplets

Triplets


Refutation

Refutation


Propagation rules

Propagation Rules

If Then

If Then

If Then


Example

Example


Case splitting

Case Split

Propagation

Case Split

Case Splitting

Propagation

Exponential Growth

Propagation


Dilemma rule

Intersection

Dilemma Rule

Propagation

Case Split

Propagation

Propagation


Iteration

Iteration

On all variables

Till no new information is gained


Nesting

Nesting

Level 2: most tautologies


Integrating

Extraction

Reflection

Coq

Proof

Checking

Trace

Integrating


Implementation

Implementation

  • A Single Implementation for Extraction and Reflection

  • Functional style

  • Strict termination criterion


State

State

  • Variables: integer (T=1,=-1)

  • State: {2=-3,3=-1,4=5}

  • Union-find:

    {1  1, 2  1, 3  -1, 4 4, 5  4}

  • Back-pointer:

    {1 [2,-3],2 -1,3 -1,4 [5],5 4}


Termination

Termination

  • Easy except:

    fun append =

    [] M => M

    | L [] => L

    | [a|L] [b|M] =>

    if (lt a b) then [a |(append [a|L] M)]

    else [b | (append L [b|M])]

    • _


Integrating st lmarck s algorithm in coq

fun append =

[] M => M

| L [] => L

| [a|L] [b|M] =>

if (lt a b) then [a |(append L [b|M])]

else

let append1 = fun

[] => L

| [c|N] => if (lt a c) then [a|(append L [c|N])]

else [c|(append1 N)]

in [b|(append1 M)]


Extraction reflection

Extraction/Reflection


Trace

Trace

Coq

Ocaml


3 level approach

3 Level Approach

  • Adding Trace:

  • Checking Trace:

  • Correctness Theorem:


Trace1

Trace

Reducing Search:

Successful case splitting (v)

Successful rule propagation (r)

Result of the intersection (i)


Benchmark time

Benchmark (time)


Benchmarck size

Benchmarck (size)


Conclusions

Conclusions

  • Extraction: clearly the most efficient

  • Reflection: computation is expensive in Coq (< 1s)

  • Trace: practical if we can reduce the amount of computation


  • Login