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

Constructor & Destructor Documentation

◆ probe() [1/4]

probe ( context c,
char const *  name 
)
inline

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

2732 :object(c) { Z3_probe r = Z3_mk_probe(c, name); check_error(); init(r); }

◆ probe() [2/4]

probe ( context c,
double  val 
)
inline

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

2733 :object(c) { Z3_probe r = Z3_probe_const(c, val); check_error(); init(r); }

◆ probe() [3/4]

probe ( context c,
Z3_probe  s 
)
inline

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

2734 :object(c) { init(s); }

◆ probe() [4/4]

probe ( probe const &  s)
inline

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

2735 :object(s) { init(s.m_probe); }

◆ ~probe()

~probe ( )
inline

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

2736 { Z3_probe_dec_ref(ctx(), m_probe); }

Member Function Documentation

◆ apply()

double apply ( goal const &  g) const
inline

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

2745 { double r = Z3_probe_apply(ctx(), m_probe, g); check_error(); return r; }

Referenced by probe::operator()().

◆ operator Z3_probe()

operator Z3_probe ( ) const
inline

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

2737 { return m_probe; }

◆ operator()()

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

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

2746 { return apply(g); }

◆ operator=()

probe& operator= ( probe const &  s)
inline

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

2738  {
2739  Z3_probe_inc_ref(s.ctx(), s.m_probe);
2740  Z3_probe_dec_ref(ctx(), m_probe);
2741  m_ctx = s.m_ctx;
2742  m_probe = s.m_probe;
2743  return *this;
2744  }

Friends And Related Function Documentation

◆ operator!

probe operator! ( probe const &  p)
friend

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

2798  {
2799  Z3_probe r = Z3_probe_not(p.ctx(), p); p.check_error(); return probe(p.ctx(), r);
2800  }

◆ operator&&

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

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

2792  {
2793  check_context(p1, p2); Z3_probe r = Z3_probe_and(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2794  }

◆ operator< [1/3]

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

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

2781 { return probe(p2.ctx(), p1) < p2; }

◆ operator< [2/3]

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

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

2780 { return p1 < probe(p1.ctx(), p2); }

◆ operator< [3/3]

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

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

2777  {
2778  check_context(p1, p2); Z3_probe r = Z3_probe_lt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2779  }

◆ operator<= [1/3]

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

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

2771 { return probe(p2.ctx(), p1) <= p2; }

◆ operator<= [2/3]

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

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

2770 { return p1 <= probe(p1.ctx(), p2); }

◆ operator<= [3/3]

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

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

2767  {
2768  check_context(p1, p2); Z3_probe r = Z3_probe_le(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2769  }

◆ operator== [1/3]

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

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

2791 { return probe(p2.ctx(), p1) == p2; }

◆ operator== [2/3]

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

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

2790 { return p1 == probe(p1.ctx(), p2); }

◆ operator== [3/3]

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

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

2787  {
2788  check_context(p1, p2); Z3_probe r = Z3_probe_eq(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2789  }

◆ operator> [1/3]

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

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

2786 { return probe(p2.ctx(), p1) > p2; }

◆ operator> [2/3]

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

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

2785 { return p1 > probe(p1.ctx(), p2); }

◆ operator> [3/3]

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

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

2782  {
2783  check_context(p1, p2); Z3_probe r = Z3_probe_gt(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2784  }

◆ operator>= [1/3]

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

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

2776 { return probe(p2.ctx(), p1) >= p2; }

◆ operator>= [2/3]

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

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

2775 { return p1 >= probe(p1.ctx(), p2); }

◆ operator>= [3/3]

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

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

2772  {
2773  check_context(p1, p2); Z3_probe r = Z3_probe_ge(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2774  }

◆ operator||

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

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

2795  {
2796  check_context(p1, p2); Z3_probe r = Z3_probe_or(p1.ctx(), p1, p2); p1.check_error(); return probe(p1.ctx(), r);
2797  }
Z3_probe_dec_ref
void Z3_API Z3_probe_dec_ref(Z3_context c, Z3_probe p)
Decrement the reference counter of the given probe.
Z3_probe_le
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...
Z3_probe_and
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.
Z3_probe_const
Z3_probe Z3_API Z3_probe_const(Z3_context x, double val)
Return a probe that always evaluates to val.
Z3_probe_or
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.
z3::probe::probe
probe(context &c, char const *name)
Definition: z3++.h:2732
z3::object::object
object(context &c)
Definition: z3++.h:407
z3::object::m_ctx
context * m_ctx
Definition: z3++.h:405
Z3_probe_inc_ref
void Z3_API Z3_probe_inc_ref(Z3_context c, Z3_probe p)
Increment the reference counter of the given probe.
Z3_probe_ge
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...
Z3_probe_eq
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 ...
Z3_probe_apply
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....
Z3_probe_lt
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...
Z3_mk_probe
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_probe_not
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.
z3::object::check_context
friend void check_context(object const &a, object const &b)
Definition: z3++.h:413
Z3_probe_gt
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...
z3::probe::apply
double apply(goal const &g) const
Definition: z3++.h:2745
z3::object::check_error
Z3_error_code check_error() const
Definition: z3++.h:410
z3::object::ctx
context & ctx() const
Definition: z3++.h:409