예제 #1
0
        /// <summary>
        /// Checks the correctness of an interpolant.
        /// </summary>
        /// <remarks>For more information on interpolation please refer
        /// too the function Z3_check_interpolant in the C/C++ API, which is
        /// well documented.</remarks>
        public int CheckInterpolant(Expr[] cnsts, uint[] parents, BoolExpr[] interps, out string error, Expr[] theory)
        {
            Contract.Requires(cnsts.Length == parents.Length);
            Contract.Requires(cnsts.Length == interps.Length + 1);
            IntPtr n_err_str;
            int    r = Native.Z3_check_interpolant(nCtx,
                                                   (uint)cnsts.Length,
                                                   Expr.ArrayToNative(cnsts),
                                                   parents,
                                                   Expr.ArrayToNative(interps),
                                                   out n_err_str,
                                                   (uint)theory.Length,
                                                   Expr.ArrayToNative(theory));

            error = Marshal.PtrToStringAnsi(n_err_str);
            return(r);
        }
예제 #2
0
 /// <summary>
 /// Writes an interpolation problem to a file.
 /// </summary>
 /// <remarks>For more information on interpolation please refer
 /// too the function Z3_write_interpolation_problem in the C/C++ API, which is
 /// well documented.</remarks>
 public void WriteInterpolationProblem(string filename, Expr[] cnsts, uint[] parents, Expr[] theory)
 {
     Contract.Requires(cnsts.Length == parents.Length);
     Native.Z3_write_interpolation_problem(nCtx, (uint)cnsts.Length, Expr.ArrayToNative(cnsts), parents, filename, (uint)theory.Length, Expr.ArrayToNative(theory));
 }