Z3
Public Member Functions | Friends
probe Class Reference
+ Inheritance diagram for probe:

Public Member Functions

 probe (context &c, char const *name)
 
 probe (context &c, double val)
 
 probe (context &c, Z3_probe s)
 
 probe (probe const &s)
 
 ~probe ()
 
 operator Z3_probe () const
 
probeoperator= (probe const &s)
 
double apply (goal const &g) const
 
double operator() (goal const &g) const
 
- Public Member Functions inherited from object
 object (context &c)
 
 object (object const &s)
 
contextctx () const
 
Z3_error_code check_error () const
 

Friends

probe operator<= (probe const &p1, probe const &p2)
 
probe operator<= (probe const &p1, double p2)
 
probe operator<= (double p1, probe const &p2)
 
probe operator>= (probe const &p1, probe const &p2)
 
probe operator>= (probe const &p1, double p2)
 
probe operator>= (double p1, probe const &p2)
 
probe operator< (probe const &p1, probe const &p2)
 
probe operator< (probe const &p1, double p2)
 
probe operator< (double p1, probe const &p2)
 
probe operator> (probe const &p1, probe const &p2)
 
probe operator> (probe const &p1, double p2)
 
probe operator> (double p1, probe const &p2)
 
probe operator== (probe const &p1, probe const &p2)
 
probe operator== (probe const &p1, double p2)
 
probe operator== (double p1, probe const &p2)
 
probe operator && (probe const &p1, probe const &p2)
 
probe operator|| (probe const &p1, probe const &p2)
 
probe operator! (probe const &p)
 

Additional Inherited Members

- Protected Attributes inherited from object
contextm_ctx
 

Detailed Description

Definition at line 2192 of file z3++.h.

Constructor & Destructor Documentation

§ probe() [1/4]

probe ( context c,
char const *  name 
)
inline

Definition at line 2199 of file z3++.h.

2199 :object(c) { Z3_probe r = Z3_mk_probe(c, name); check_error(); init(r); }
Z3_error_code check_error() const
Definition: z3++.h:365
Z3_probe Z3_API Z3_mk_probe(Z3_context c, Z3_string name)
Return a probe associated with the given name. The complete list of probes may be obtained using the ...
object(context &c)
Definition: z3++.h:362

§ probe() [2/4]

probe ( context c,
double  val 
)
inline

Definition at line 2200 of file z3++.h.

2200 :object(c) { Z3_probe r = Z3_probe_const(c, val); check_error(); init(r); }
Z3_error_code check_error() const
Definition: z3++.h:365
Z3_probe Z3_API Z3_probe_const(Z3_context x, double val)
Return a probe that always evaluates to val.
object(context &c)
Definition: z3++.h:362

§ probe() [3/4]

probe ( context c,
Z3_probe  s 
)
inline

Definition at line 2201 of file z3++.h.

2201 :object(c) { init(s); }
object(context &c)
Definition: z3++.h:362

§ probe() [4/4]

probe ( probe const &  s)
inline

Definition at line 2202 of file z3++.h.

2202 :object(s) { init(s.m_probe); }
object(context &c)
Definition: z3++.h:362

§ ~probe()

~probe ( )
inline

Definition at line 2203 of file z3++.h.

2203 { Z3_probe_dec_ref(ctx(), m_probe); }
context & ctx() const
Definition: z3++.h:364
void Z3_API Z3_probe_dec_ref(Z3_context c, Z3_probe p)
Decrement the reference counter of the given probe.

Member Function Documentation

§ apply()

double apply ( goal const &  g) const
inline

Definition at line 2212 of file z3++.h.

2212 { double r = Z3_probe_apply(ctx(), m_probe, g); check_error(); return r; }
Z3_error_code check_error() const
Definition: z3++.h:365
context & ctx() const
Definition: z3++.h:364
double Z3_API Z3_probe_apply(Z3_context c, Z3_probe p, Z3_goal g)
Execute the probe over the goal. The probe always produce a double value. "Boolean" probes return 0...

§ operator Z3_probe()

operator Z3_probe ( ) const
inline

Definition at line 2204 of file z3++.h.

2204 { return m_probe; }

§ operator()()

double operator() ( goal const &  g) const
inline

Definition at line 2213 of file z3++.h.

2213 { return apply(g); }
double apply(goal const &g) const
Definition: z3++.h:2212

§ operator=()

probe& operator= ( probe const &  s)
inline

Definition at line 2205 of file z3++.h.

2205  {
2206  Z3_probe_inc_ref(s.ctx(), s.m_probe);
2207  Z3_probe_dec_ref(ctx(), m_probe);
2208  m_ctx = s.m_ctx;
2209  m_probe = s.m_probe;
2210  return *this;
2211  }
context & ctx() const
Definition: z3++.h:364
void Z3_API Z3_probe_inc_ref(Z3_context c, Z3_probe p)
Increment the reference counter of the given probe.
void Z3_API Z3_probe_dec_ref(Z3_context c, Z3_probe p)
Decrement the reference counter of the given probe.
context * m_ctx
Definition: z3++.h:360

Friends And Related Function Documentation

§ operator &&

probe operator&& ( probe const &  p1,
probe const &  p2 
)
friend

Definition at line 2259 of file z3++.h.

2259  {
2260  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2261  }
Z3_probe Z3_API Z3_probe_and(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when p1 and p2 evaluates to true.
probe(context &c, char const *name)
Definition: z3++.h:2199
friend void check_context(object const &a, object const &b)
Definition: z3++.h:368

§ operator!

probe operator! ( probe const &  p)
friend

Definition at line 2265 of file z3++.h.

2265  {
2266  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
2267  }
probe(context &c, char const *name)
Definition: z3++.h:2199
Z3_probe Z3_API Z3_probe_not(Z3_context x, Z3_probe p)
Return a probe that evaluates to "true" when p does not evaluate to true.

§ operator< [1/3]

probe operator< ( probe const &  p1,
probe const &  p2 
)
friend

Definition at line 2244 of file z3++.h.

2244  {
2245  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2246  }
probe(context &c, char const *name)
Definition: z3++.h:2199
friend void check_context(object const &a, object const &b)
Definition: z3++.h:368
Z3_probe Z3_API Z3_probe_lt(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is less than the value returned...

§ operator< [2/3]

probe operator< ( probe const &  p1,
double  p2 
)
friend

Definition at line 2247 of file z3++.h.

2247 { return p1 < probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator< [3/3]

probe operator< ( double  p1,
probe const &  p2 
)
friend

Definition at line 2248 of file z3++.h.

2248 { return probe(p2.ctx(), p1) < p2; }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator<= [1/3]

probe operator<= ( probe const &  p1,
probe const &  p2 
)
friend

Definition at line 2234 of file z3++.h.

2234  {
2235  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2236  }
Z3_probe Z3_API Z3_probe_le(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is less than or equal to the va...
probe(context &c, char const *name)
Definition: z3++.h:2199
friend void check_context(object const &a, object const &b)
Definition: z3++.h:368

§ operator<= [2/3]

probe operator<= ( probe const &  p1,
double  p2 
)
friend

Definition at line 2237 of file z3++.h.

2237 { return p1 <= probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator<= [3/3]

probe operator<= ( double  p1,
probe const &  p2 
)
friend

Definition at line 2238 of file z3++.h.

2238 { return probe(p2.ctx(), p1) <= p2; }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator== [1/3]

probe operator== ( probe const &  p1,
probe const &  p2 
)
friend

Definition at line 2254 of file z3++.h.

2254  {
2255  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2256  }
Z3_probe Z3_API Z3_probe_eq(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is equal to the value returned ...
probe(context &c, char const *name)
Definition: z3++.h:2199
friend void check_context(object const &a, object const &b)
Definition: z3++.h:368

§ operator== [2/3]

probe operator== ( probe const &  p1,
double  p2 
)
friend

Definition at line 2257 of file z3++.h.

2257 { return p1 == probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator== [3/3]

probe operator== ( double  p1,
probe const &  p2 
)
friend

Definition at line 2258 of file z3++.h.

2258 { return probe(p2.ctx(), p1) == p2; }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator> [1/3]

probe operator> ( probe const &  p1,
probe const &  p2 
)
friend

Definition at line 2249 of file z3++.h.

2249  {
2250  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2251  }
Z3_probe Z3_API Z3_probe_gt(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is greater than the value retur...
probe(context &c, char const *name)
Definition: z3++.h:2199
friend void check_context(object const &a, object const &b)
Definition: z3++.h:368

§ operator> [2/3]

probe operator> ( probe const &  p1,
double  p2 
)
friend

Definition at line 2252 of file z3++.h.

2252 { return p1 > probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator> [3/3]

probe operator> ( double  p1,
probe const &  p2 
)
friend

Definition at line 2253 of file z3++.h.

2253 { return probe(p2.ctx(), p1) > p2; }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator>= [1/3]

probe operator>= ( probe const &  p1,
probe const &  p2 
)
friend

Definition at line 2239 of file z3++.h.

2239  {
2240  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2241  }
Z3_probe Z3_API Z3_probe_ge(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when the value returned by p1 is greater than or equal to the...
probe(context &c, char const *name)
Definition: z3++.h:2199
friend void check_context(object const &a, object const &b)
Definition: z3++.h:368

§ operator>= [2/3]

probe operator>= ( probe const &  p1,
double  p2 
)
friend

Definition at line 2242 of file z3++.h.

2242 { return p1 >= probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator>= [3/3]

probe operator>= ( double  p1,
probe const &  p2 
)
friend

Definition at line 2243 of file z3++.h.

2243 { return probe(p2.ctx(), p1) >= p2; }
probe(context &c, char const *name)
Definition: z3++.h:2199

§ operator||

probe operator|| ( probe const &  p1,
probe const &  p2 
)
friend

Definition at line 2262 of file z3++.h.

2262  {
2263  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2264  }
probe(context &c, char const *name)
Definition: z3++.h:2199
friend void check_context(object const &a, object const &b)
Definition: z3++.h:368
Z3_probe Z3_API Z3_probe_or(Z3_context x, Z3_probe p1, Z3_probe p2)
Return a probe that evaluates to "true" when p1 or p2 evaluates to true.