Skip to content

Commit

Permalink
Merge pull request #30 from hferee/dec
Browse files Browse the repository at this point in the history
Decision procedure for iSL
  • Loading branch information
hferee authored Sep 3, 2024
2 parents 4245a6d + 2d9d210 commit cae160f
Show file tree
Hide file tree
Showing 4 changed files with 649 additions and 4 deletions.
4 changes: 2 additions & 2 deletions bin/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(executables
(public_names uiml_demo benchmark uiml_cmdline)
(names uiml_demo benchmark uiml_cmdline)
(public_names uiml_demo benchmark uiml_cmdline isl_dec)
(names uiml_demo benchmark uiml_cmdline isl_dec)
(modes js native)
(preprocess (pps js_of_ocaml-ppx))
(libraries js_of_ocaml UIML angstrom exenum)
Expand Down
27 changes: 27 additions & 0 deletions bin/isl_dec.ml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
open Exenum
open Printer
open UIML.Formulas
open Sys
open Char
open UIML.DecisionProcedure
open UIML.Datatypes
open Stringconversion
open Modal_expressions_parser



let nb_args = Array.length Sys.argv

let form = if nb_args = 2 then (Sys.argv.(1)) else "T"

let usage_string =
"isl_dec φ: decides the provability of the modal formula φ in iSL.\n"

let print_decision = function
| Coq_inl _ -> "Probable"
| _ -> "Not provable"

let () =
if nb_args = 2 then form |> eval |> coq_Provable_dec [] |>
print_decision |> print_string |> print_newline
else print_string usage_string
4 changes: 2 additions & 2 deletions theories/extraction/UIML_extraction.v
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Require Import ExtrOcamlBasic ExtrOcamlString.

Require Import K.Interpolation.UIK_braga.
Require Import KS_export.
Require Import ISL.PropQuantifiers.
Require Import ISL.PropQuantifiers ISL.DecisionProcedure.

Require Import ISL.Simp.

Expand Down Expand Up @@ -41,5 +41,5 @@ Definition isl_simplified_A v f := A_simplified v f.

Set Extraction Output Directory "extraction".

Separate Extraction gl_UI k_UI isl_E isl_A isl_simplified_E isl_simplified_A Formulas.weight isl_simp.
Separate Extraction Provable_dec gl_UI k_UI isl_E isl_A isl_simplified_E isl_simplified_A Formulas.weight isl_simp.

Loading

0 comments on commit cae160f

Please sign in to comment.