I have been experimenting with z3 java bindings and have coded the following : https://pastebin.com/x1Tcw10Z . I get the following error and have no clue how to solve it.
com.microsoft.z3.Z3Exception: file access error
at com.microsoft.z3.Native.parseSmtlib2File(Native.java:3665)
at com.microsoft.z3.Context.parseSMTLIB2File(Context.java:2584)
at JavaExample1.smt2FileTest(JavaExample1.java:57)
at JavaExample1.main(JavaExample1.java:144)
Note : The file is getting converted to the string alright and there is no issue there.
Pls help. Thanks in advance.
You're calling p.smt2FileTest(contents);
, i.e. ctx.parseSMTLIB2File
will get the contents of the file, not just the name of the file. You can use parseSMTLIB2String
instead.