Z3
 
Loading...
Searching...
No Matches
Simplifier.java
Go to the documentation of this file.
1/*++
2Copyright (c) 2012 Microsoft Corporation
3
4Module Name:
5
6 Simplifiers.cs
7
8Abstract:
9
10 Z3 Managed API: Simplifiers
11
12Author:
13
14 Christoph Wintersteiger (cwinter) 2012-03-21
15
16--*/
17
18package com.microsoft.z3;
19
20
21import java.lang.ref.ReferenceQueue;
22
23public class Simplifier extends Z3Object {
24 /*
25 * A string containing a description of parameters accepted by the simplifier.
26 */
27
28 public String getHelp()
29 {
30 return Native.simplifierGetHelp(getContext().nCtx(), getNativeObject());
31 }
32
33 /*
34 * Retrieves parameter descriptions for Simplifiers.
35 */
37 return new ParamDescrs(getContext(), Native.simplifierGetParamDescrs(getContext().nCtx(), getNativeObject()));
38 }
39
40 Simplifier(Context ctx, long obj)
41 {
42 super(ctx, obj);
43 }
44
45 Simplifier(Context ctx, String name)
46 {
47 super(ctx, Native.mkSimplifier(ctx.nCtx(), name));
48 }
49
50 @Override
51 void incRef()
52 {
53 Native.simplifierIncRef(getContext().nCtx(), getNativeObject());
54 }
55
56 @Override
57 void addToReferenceQueue() {
58 getContext().getReferenceQueue().storeReference(this, SimplifierRef::new);
59 }
60
61 private static class SimplifierRef extends Z3ReferenceQueue.Reference<Simplifier> {
62
63 private SimplifierRef(Simplifier referent, ReferenceQueue<Z3Object> q) {
64 super(referent, q);
65 }
66
67 @Override
68 void decRef(Context ctx, long z3Obj) {
69 Native.simplifierDecRef(ctx.nCtx(), z3Obj);
70 }
71 }
72}
ParamDescrs getParameterDescriptions()