3
0
Fork 0
mirror of https://github.com/Z3Prover/z3 synced 2025-04-24 01:25:31 +00:00

prepare release notes

Signed-off-by: Nikolaj Bjorner <nbjorner@microsoft.com>
This commit is contained in:
Nikolaj Bjorner 2018-10-28 17:42:16 -05:00
parent 43d9159a74
commit 0f0287d129
21 changed files with 144 additions and 67 deletions

View file

@ -63,7 +63,7 @@ namespace api {
datalog::dl_decl_util m_datalog_util;
fpa_util m_fpa_util;
seq_util m_sutil;
recfun_util m_recfun;
recfun::util m_recfun;
// Support for old solver API
smt_params m_fparams;
@ -130,7 +130,7 @@ namespace api {
fpa_util & fpautil() { return m_fpa_util; }
datatype_util& dtutil() { return m_dt_plugin->u(); }
seq_util& sutil() { return m_sutil; }
recfun_util& recfun() { return m_recfun; }
recfun::util& recfun() { return m_recfun; }
family_id get_basic_fid() const { return m_basic_fid; }
family_id get_array_fid() const { return m_array_fid; }
family_id get_arith_fid() const { return m_arith_fid; }

View file

@ -532,6 +532,34 @@ namespace Microsoft.Z3
return new FuncDecl(this, MkSymbol(name), domain, range);
}
/// <summary>
/// Creates a new recursive function declaration.
/// </summary>
public FuncDecl MkRecFuncDecl(string name, Sort[] domain, Sort range)
{
Debug.Assert(range != null);
Debug.Assert(domain.All(d => d != null));
CheckContextMatch<Sort>(domain);
CheckContextMatch(range);
return new FuncDecl(this, MkSymbol(name), domain, range, true);
}
/// <summary>
/// Bind a definition to a recursive function declaration.
/// The function must have previously been created using
/// MkRecFuncDecl. The body may contain recursive uses of the function or
/// other mutually recursive functions.
/// </summary>
public void AddRecDef(FuncDecl f, Expr[] args, Expr body)
{
CheckContextMatch(f);
CheckContextMatch<Expr>(args);
CheckContextMatch(body);
IntPtr[] argsNative = AST.ArrayToNative(args);
Native.Z3_add_rec_def(nCtx, f.NativeObject, (uint)args.Length, argsNative, body.NativeObject);
}
/// <summary>
/// Creates a new function declaration.
/// </summary>

View file

@ -302,6 +302,15 @@ namespace Microsoft.Z3
Debug.Assert(range != null);
}
internal FuncDecl(Context ctx, Symbol name, Sort[] domain, Sort range, bool is_rec)
: base(ctx, Native.Z3_mk_rec_func_decl(ctx.nCtx, name.NativeObject, AST.ArrayLength(domain), AST.ArrayToNative(domain), range.NativeObject))
{
Debug.Assert(ctx != null);
Debug.Assert(name != null);
Debug.Assert(range != null);
}
#if DEBUG
internal override void CheckNativeObject(IntPtr obj)
{