mirror of
https://github.com/Z3Prover/z3
synced 2025-04-13 12:28:44 +00:00
Added ParamDescr.ToString()
Formatting Signed-off-by: Christoph M. Wintersteiger <cwinter@microsoft.com>
This commit is contained in:
parent
4d70722769
commit
42c27b7a46
|
@ -50,7 +50,7 @@ namespace Microsoft.Z3
|
|||
Contract.Requires(settings != null);
|
||||
|
||||
IntPtr cfg = Native.Z3_mk_config();
|
||||
foreach(KeyValuePair<string,string> kv in settings)
|
||||
foreach (KeyValuePair<string, string> kv in settings)
|
||||
Native.Z3_set_param_value(cfg, kv.Key, kv.Value);
|
||||
m_ctx = Native.Z3_mk_context_rc(cfg);
|
||||
Native.Z3_del_config(cfg);
|
||||
|
@ -3478,14 +3478,10 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Retrieves parameter descriptions for simplifier.
|
||||
/// </summary>
|
||||
public ParamDescrs SimplifyParameterDescriptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ParamDescrs(this, Native.Z3_simplify_get_param_descrs(nCtx));
|
||||
}
|
||||
}
|
||||
|
||||
public ParamDescrs SimplifyParameterDescriptions
|
||||
{
|
||||
get { return new ParamDescrs(this, Native.Z3_simplify_get_param_descrs(nCtx)); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Enable/disable printing of warning messages to the console.
|
||||
|
|
|
@ -34,10 +34,11 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public string Help
|
||||
{
|
||||
get {
|
||||
get
|
||||
{
|
||||
Contract.Ensures(Contract.Result<string>() != null);
|
||||
return Native.Z3_fixedpoint_get_help(Context.nCtx, NativeObject);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -56,13 +57,10 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Retrieves parameter descriptions for Fixedpoint solver.
|
||||
/// </summary>
|
||||
public ParamDescrs ParameterDescriptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ParamDescrs(Context, Native.Z3_fixedpoint_get_param_descrs(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
public ParamDescrs ParameterDescriptions
|
||||
{
|
||||
get { return new ParamDescrs(Context, Native.Z3_fixedpoint_get_param_descrs(Context.nCtx, NativeObject)); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -179,7 +177,7 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Update named rule into in the fixedpoint solver.
|
||||
/// </summary>
|
||||
public void UpdateRule(BoolExpr rule, Symbol name)
|
||||
public void UpdateRule(BoolExpr rule, Symbol name)
|
||||
{
|
||||
Contract.Requires(rule != null);
|
||||
|
||||
|
@ -210,18 +208,18 @@ namespace Microsoft.Z3
|
|||
/// <summary>
|
||||
/// Retrieve the number of levels explored for a given predicate.
|
||||
/// </summary>
|
||||
public uint GetNumLevels(FuncDecl predicate)
|
||||
{
|
||||
return Native.Z3_fixedpoint_get_num_levels(Context.nCtx, NativeObject, predicate.NativeObject);
|
||||
}
|
||||
public uint GetNumLevels(FuncDecl predicate)
|
||||
{
|
||||
return Native.Z3_fixedpoint_get_num_levels(Context.nCtx, NativeObject, predicate.NativeObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieve the cover of a predicate.
|
||||
/// </summary>
|
||||
public Expr GetCoverDelta(int level, FuncDecl predicate)
|
||||
{
|
||||
IntPtr res = Native.Z3_fixedpoint_get_cover_delta(Context.nCtx, NativeObject, level, predicate.NativeObject);
|
||||
return (res == IntPtr.Zero) ? null : Expr.Create(Context, res);
|
||||
IntPtr res = Native.Z3_fixedpoint_get_cover_delta(Context.nCtx, NativeObject, level, predicate.NativeObject);
|
||||
return (res == IntPtr.Zero) ? null : Expr.Create(Context, res);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
@ -230,7 +228,7 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public void AddCover(int level, FuncDecl predicate, Expr property)
|
||||
{
|
||||
Native.Z3_fixedpoint_add_cover(Context.nCtx, NativeObject, level, predicate.NativeObject, property.NativeObject);
|
||||
Native.Z3_fixedpoint_add_cover(Context.nCtx, NativeObject, level, predicate.NativeObject, property.NativeObject);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -23,7 +23,7 @@ using System.Diagnostics.Contracts;
|
|||
namespace Microsoft.Z3
|
||||
{
|
||||
/// <summary>
|
||||
/// A ParameterSet represents a configuration in the form of Symbol/value pairs.
|
||||
/// A ParamDescrs describes a set of parameters.
|
||||
/// </summary>
|
||||
[ContractVerification(true)]
|
||||
public class ParamDescrs : Z3Object
|
||||
|
@ -62,6 +62,27 @@ namespace Microsoft.Z3
|
|||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// The size of the ParamDescrs.
|
||||
/// </summary>
|
||||
public uint Size
|
||||
{
|
||||
get { return Native.Z3_param_descrs_size(Context.nCtx, NativeObject); }
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves a string representation of the ParamDescrs.
|
||||
/// </summary>
|
||||
public override string ToString()
|
||||
{
|
||||
String res = "";
|
||||
Symbol[] n = Names;
|
||||
if (n.Length > 0) res = n[0].ToString();
|
||||
for (uint i = 1; i < n.Length; i++)
|
||||
res += " " + n[i].ToString();
|
||||
return res;
|
||||
}
|
||||
|
||||
#region Internal
|
||||
internal ParamDescrs(Context ctx, IntPtr obj)
|
||||
: base(ctx, obj)
|
||||
|
|
|
@ -60,10 +60,7 @@ namespace Microsoft.Z3
|
|||
/// </summary>
|
||||
public ParamDescrs ParameterDescriptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ParamDescrs(Context, Native.Z3_solver_get_param_descrs(Context.nCtx, NativeObject));
|
||||
}
|
||||
get { return new ParamDescrs(Context, Native.Z3_solver_get_param_descrs(Context.nCtx, NativeObject)); }
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -40,20 +40,18 @@ namespace Microsoft.Z3
|
|||
{
|
||||
Contract.Ensures(Contract.Result<string>() != null);
|
||||
|
||||
return Native.Z3_tactic_get_help(Context.nCtx, NativeObject); }
|
||||
return Native.Z3_tactic_get_help(Context.nCtx, NativeObject);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Retrieves parameter descriptions for Tactics.
|
||||
/// </summary>
|
||||
public ParamDescrs ParameterDescriptions
|
||||
{
|
||||
get
|
||||
{
|
||||
return new ParamDescrs(Context, Native.Z3_tactic_get_param_descrs(Context.nCtx, NativeObject));
|
||||
}
|
||||
}
|
||||
public ParamDescrs ParameterDescriptions
|
||||
{
|
||||
get { return new ParamDescrs(Context, Native.Z3_tactic_get_param_descrs(Context.nCtx, NativeObject)); }
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
|
@ -103,11 +101,13 @@ namespace Microsoft.Z3
|
|||
}
|
||||
|
||||
#region Internal
|
||||
internal Tactic(Context ctx, IntPtr obj) : base(ctx, obj)
|
||||
internal Tactic(Context ctx, IntPtr obj)
|
||||
: base(ctx, obj)
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
}
|
||||
internal Tactic(Context ctx, string name) : base(ctx, Native.Z3_mk_tactic(ctx.nCtx, name))
|
||||
internal Tactic(Context ctx, string name)
|
||||
: base(ctx, Native.Z3_mk_tactic(ctx.nCtx, name))
|
||||
{
|
||||
Contract.Requires(ctx != null);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue