29.04.2014 Views

Presburger Arithmetic and Its Use in Verification

Presburger Arithmetic and Its Use in Verification

Presburger Arithmetic and Its Use in Verification

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

APPENDIX B. SOURCE CODE OF EXPERIMENTS<br />

else takeLast(List.tail ls, q)<br />

let qfForm =(N, K) |>pigeonPred |> gnfToFormula<br />

let quantifiers = List.fold (fun acc (i, k) −><br />

("x" + str<strong>in</strong>g i + "_" + str<strong>in</strong>g k)::acc )<br />

[] (List.fold (fun acc i −><br />

acc @ (List.map (fun k −> (i, k<br />

)) (tab K (fun k −> k))))<br />

[] (tab N (fun i −> i)))<br />

if Q =0then qfForm<br />

else<br />

E(takeLast(quantifiers, Q), qfForm)<br />

let generatePigeonYFormula = generateFormula pigeonY<br />

let generatePigeonZFormula = generateFormula pigeonZ<br />

let generatePigeonTFormula = generateFormula pigeonT<br />

78

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!