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

Method substitute

src/api/java/Expr.java:149–159  ·  view source on GitHub ↗

Substitute every occurrence of from[i] in the expression with to[i], for i smaller than num_exprs. Remarks: The result is the new expression. The arrays from and to must have size num_exprs. For every i smaller than num_exprs, w

(Expr<?>[] from, Expr<?>[] to)

Source from the content-addressed store, hash-verified

147 * @return an Expr
148 **/
149 public Expr<R> substitute(Expr<?>[] from, Expr<?>[] to)
150 {
151 getContext().checkContextMatch(from);
152 getContext().checkContextMatch(to);
153 if (from.length != to.length) {
154 throw new Z3Exception("Argument sizes do not match");
155 }
156 return (Expr<R>) Expr.create(getContext(), Native.substitute(getContext().nCtx(),
157 getNativeObject(), from.length, Expr.arrayToNative(from),
158 Expr.arrayToNative(to)));
159 }
160
161 /**
162 * Substitute every occurrence of {@code from} in the expression with

Callers

nothing calls this directly

Calls 7

createMethod · 0.95
checkContextMatchMethod · 0.80
getContextMethod · 0.80
nCtxMethod · 0.80
getNativeObjectMethod · 0.80
arrayToNativeMethod · 0.80
substituteMethod · 0.65

Tested by

no test coverage detected