Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Decision procedure for iSL #30

Merged
merged 2 commits into from
Sep 3, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading