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)
 
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 3004 of file z3++.h.

Constructor & Destructor Documentation

probe ( context c,
char const *  name 
)
inline

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

3011 :object(c) { Z3_probe r = Z3_mk_probe(c, name); check_error(); init(r); }
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 ...
Z3_error_code check_error() const
Definition: z3++.h:429
object(context &c)
Definition: z3++.h:427
probe ( context c,
double  val 
)
inline

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

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

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

3013 :object(c) { init(s); }
object(context &c)
Definition: z3++.h:427
probe ( probe const &  s)
inline

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

3014 :object(s) { init(s.m_probe); }
object(context &c)
Definition: z3++.h:427
~probe ( )
inline

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

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

Member Function Documentation

double apply ( goal const &  g) const
inline

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

Referenced by probe::operator()().

3024 { double r = Z3_probe_apply(ctx(), m_probe, g); check_error(); return r; }
Z3_error_code check_error() const
Definition: z3++.h:429
context & ctx() const
Definition: z3++.h:428
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 ( ) const
inline

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

3016 { return m_probe; }
double operator() ( goal const &  g) const
inline

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

3025 { return apply(g); }
double apply(goal const &g) const
Definition: z3++.h:3024
probe& operator= ( probe const &  s)
inline

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

3017  {
3018  Z3_probe_inc_ref(s.ctx(), s.m_probe);
3019  Z3_probe_dec_ref(ctx(), m_probe);
3020  object::operator=(s);
3021  m_probe = s.m_probe;
3022  return *this;
3023  }
void Z3_API Z3_probe_inc_ref(Z3_context c, Z3_probe p)
Increment the reference counter of the given probe.
context & ctx() const
Definition: z3++.h:428
void Z3_API Z3_probe_dec_ref(Z3_context c, Z3_probe p)
Decrement the reference counter of the given probe.

Friends And Related Function Documentation

probe operator! ( probe const &  p)
friend

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

3077  {
3078  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
3079  }
probe(context &c, char const *name)
Definition: z3++.h:3011
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.
probe operator&& ( probe const &  p1,
probe const &  p2 
)
friend

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

3071  {
3072  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3073  }
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:3011
friend void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe operator< ( probe const &  p1,
probe const &  p2 
)
friend

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

3056  {
3057  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3058  }
probe(context &c, char const *name)
Definition: z3++.h:3011
friend void check_context(object const &a, object const &b)
Definition: z3++.h:432
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...
probe operator< ( probe const &  p1,
double  p2 
)
friend

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

3059 { return p1 < probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:3011
probe operator< ( double  p1,
probe const &  p2 
)
friend

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

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

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

3046  {
3047  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3048  }
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:3011
friend void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe operator<= ( probe const &  p1,
double  p2 
)
friend

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

3049 { return p1 <= probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:3011
probe operator<= ( double  p1,
probe const &  p2 
)
friend

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

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

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

3066  {
3067  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3068  }
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:3011
friend void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe operator== ( probe const &  p1,
double  p2 
)
friend

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

3069 { return p1 == probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:3011
probe operator== ( double  p1,
probe const &  p2 
)
friend

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

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

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

3061  {
3062  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3063  }
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:3011
friend void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe operator> ( probe const &  p1,
double  p2 
)
friend

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

3064 { return p1 > probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:3011
probe operator> ( double  p1,
probe const &  p2 
)
friend

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

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

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

3051  {
3052  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3053  }
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:3011
friend void check_context(object const &a, object const &b)
Definition: z3++.h:432
probe operator>= ( probe const &  p1,
double  p2 
)
friend

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

3054 { return p1 >= probe(p1.ctx(), p2); }
probe(context &c, char const *name)
Definition: z3++.h:3011
probe operator>= ( double  p1,
probe const &  p2 
)
friend

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

3055 { return probe(p2.ctx(), p1) >= p2; }
probe(context &c, char const *name)
Definition: z3++.h:3011
probe operator|| ( probe const &  p1,
probe const &  p2 
)
friend

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

3074  {
3075  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
3076  }
probe(context &c, char const *name)
Definition: z3++.h:3011
friend void check_context(object const &a, object const &b)
Definition: z3++.h:432
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.