Z3
 
Loading...
Searching...
No Matches
Tactic.java
Go to the documentation of this file.
1
18package com.microsoft.z3;
19
20import java.lang.ref.ReferenceQueue;
21
29public class Tactic extends Z3Object {
33 public String getHelp()
34 {
35 return Native.tacticGetHelp(getContext().nCtx(), getNativeObject());
36 }
37
43 {
44 return new ParamDescrs(getContext(), Native.tacticGetParamDescrs(getContext()
45 .nCtx(), getNativeObject()));
46 }
47
53 {
54 return apply(g, null);
55 }
56
62 {
63 getContext().checkContextMatch(g);
64 if (p == null)
65 return new ApplyResult(getContext(), Native.tacticApply(getContext()
66 .nCtx(), getNativeObject(), g.getNativeObject()));
67 else
68 {
69 getContext().checkContextMatch(p);
70 return new ApplyResult(getContext(),
71 Native.tacticApplyEx(getContext().nCtx(), getNativeObject(),
72 g.getNativeObject(), p.getNativeObject()));
73 }
74 }
75
82 {
83 return getContext().mkSolver(this);
84 }
85
86 Tactic(Context ctx, long obj)
87 {
88 super(ctx, obj);
89 }
90
91 Tactic(Context ctx, String name)
92 {
93 super(ctx, Native.mkTactic(ctx.nCtx(), name));
94 }
95
96 @Override
97 void incRef() {
98 Native.tacticIncRef(getContext().nCtx(), getNativeObject());
99 }
100
101 @Override
102 void addToReferenceQueue() {
103 //getContext().getTacticDRQ().storeReference(getContext(), this);
104 getContext().getReferenceQueue().storeReference(this, TacticRef::new);
105 }
106
107 private static class TacticRef extends Z3ReferenceQueue.Reference<Tactic> {
108
109 private TacticRef(Tactic referent, ReferenceQueue<Z3Object> q) {
110 super(referent, q);
111 }
112
113 @Override
114 void decRef(Context ctx, long z3Obj) {
115 Native.tacticDecRef(ctx.nCtx(), z3Obj);
116 }
117 }
118}
ParamDescrs getParameterDescriptions()
Definition Tactic.java:42
ApplyResult apply(Goal g)
Definition Tactic.java:52
ApplyResult apply(Goal g, Params p)
Definition Tactic.java:61