From d9011b5b2b5163228de4dd33edd3903ff09d8434 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Fri, 6 Jul 2018 15:30:13 +0200 Subject: Try to let Z3 minimize stuff --- Assignment2/src/Z3.icl | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'Assignment2/src/Z3.icl') diff --git a/Assignment2/src/Z3.icl b/Assignment2/src/Z3.icl index 8494bad..ca869a1 100644 --- a/Assignment2/src/Z3.icl +++ b/Assignment2/src/Z3.icl @@ -38,9 +38,9 @@ addMinimize z3 s w # (_, w) = writePipe (trace_id $ "(minimize " <+ s <+ ")\n") z3.Z3.stdIn w = w -addVariable :: !Z3 !String !*World -> *World -addVariable z3 s w -# (_, w) = writePipe (trace_id $ "(declare-const " <+ s <+ " Real)\n") z3.Z3.stdIn w +addVariable :: !Z3 !String !String !*World -> *World +addVariable z3 type s w +# (_, w) = writePipe (trace_id $ "(declare-const " <+ s <+ " " <+ type <+ ")\n") z3.Z3.stdIn w = w checkSat :: !Z3 !*World -> (!Bool, !*World) @@ -49,7 +49,7 @@ checkSat z3 w # (out, w) = readPipeBlocking z3.Z3.stdOut w # out = fromOk out # out = trace_id out -= (startsWith "sat" out, w) += (endsWith "sat\n" out, w) getModel :: !Z3 !*World -> (!String, !*World) getModel z3 w -- cgit v1.2.3