MCPcopy Create free account
hub / github.com/Z3Prover/z3 / parseSMTLIB2String

Method parseSMTLIB2String

src/api/java/Context.java:3010–3025  ·  view source on GitHub ↗

Parse the given string using the SMT-LIB2 parser. @return A conjunction of assertions. If the string contains push/pop commands, the set of assertions returned are the ones in the last scope level.

(String str, Symbol[] sortNames,
            Sort[] sorts, Symbol[] declNames, FuncDecl<?>[] decls)

Source from the content-addressed store, hash-verified

3008 * last scope level.
3009 **/
3010 public BoolExpr[] parseSMTLIB2String(String str, Symbol[] sortNames,
3011 Sort[] sorts, Symbol[] declNames, FuncDecl<?>[] decls)
3012 {
3013 int csn = Symbol.arrayLength(sortNames);
3014 int cs = Sort.arrayLength(sorts);
3015 int cdn = Symbol.arrayLength(declNames);
3016 int cd = AST.arrayLength(decls);
3017 if (csn != cs || cdn != cd) {
3018 throw new Z3Exception("Argument size mismatch");
3019 }
3020 ASTVector v = new ASTVector(this, Native.parseSmtlib2String(nCtx(),
3021 str, AST.arrayLength(sorts), Symbol.arrayToNative(sortNames),
3022 AST.arrayToNative(sorts), AST.arrayLength(decls),
3023 Symbol.arrayToNative(declNames), AST.arrayToNative(decls)));
3024 return v.ToBoolExprArray();
3025 }
3026
3027 /**
3028 * Parse the given file using the SMT-LIB2 parser.

Callers 10

commAxiomMethod · 0.80
parserExample1Method · 0.80
parserExample2Method · 0.80
parserExample3Method · 0.80
parserExample5Method · 0.80
commAxiomMethod · 0.80
parserExample1Method · 0.80
parserExample2Method · 0.80
parserExample3Method · 0.80
parserExample5Method · 0.80

Calls 4

nCtxMethod · 0.95
ToBoolExprArrayMethod · 0.95
arrayLengthMethod · 0.80
arrayToNativeMethod · 0.80

Tested by

no test coverage detected