@@ -3063,6 +3063,149 @@ def Gt(a, b):
30633063 return a > b
30643064
30653065
3066+ #########################################
3067+ #
3068+ # Transcendentals
3069+ #
3070+ #########################################
3071+
3072+
3073+ def Pi (ctx = None ):
3074+ """ Create the constant pi
3075+
3076+ >>> Pi()
3077+ Pi
3078+ """
3079+ ctx = get_ctx (ctx )
3080+ return _to_expr_ref (ctx .solver .mkTerm (Kind .PI ), ctx )
3081+
3082+
3083+ def Exponential (x ):
3084+ """ Create an exponential function
3085+
3086+ >>> x = Real('x')
3087+ >>> solve(Exponential(x) == 1)
3088+ [x = 0]
3089+ """
3090+ return _nary_kind_builder (Kind .EXPONENTIAL , RealSort ().cast (x ))
3091+
3092+
3093+ def Sine (x ):
3094+ """ Create a sine function
3095+
3096+ >>> x = Real('x')
3097+ >>> i = Int('i')
3098+ >>> prove(Sine(x) < 2)
3099+ proved
3100+ >>> prove(Sine(i) < 2)
3101+ proved
3102+ """
3103+ return _nary_kind_builder (Kind .SINE , RealSort ().cast (x ))
3104+
3105+
3106+ def Cosine (x ):
3107+ """ Create a cosine function
3108+
3109+ >>> x = Real('x')
3110+ >>> i = Int('i')
3111+ >>> prove(Cosine(x) < 2)
3112+ proved
3113+ >>> prove(Cosine(i) < 2)
3114+ proved
3115+ """
3116+ return _nary_kind_builder (Kind .COSINE , RealSort ().cast (x ))
3117+
3118+
3119+ def Tangent (x ):
3120+ """ Create a tangent function
3121+
3122+ >>> Tangent(Real('x'))
3123+ Tangent(x)
3124+ """
3125+ return _nary_kind_builder (Kind .TANGENT , RealSort ().cast (x ))
3126+
3127+
3128+ def Arcsine (x ):
3129+ """ Create an arcsine function
3130+
3131+ >>> Arcsine(Real('x'))
3132+ Arcsine(x)
3133+ """
3134+ return _nary_kind_builder (Kind .ARCSINE , RealSort ().cast (x ))
3135+
3136+
3137+ def Arccosine (x ):
3138+ """ Create an arccosine function
3139+
3140+ >>> Arccosine(Real('x'))
3141+ Arccosine(x)
3142+ """
3143+ return _nary_kind_builder (Kind .ARCCOSINE , RealSort ().cast (x ))
3144+
3145+
3146+ def Arctangent (x ):
3147+ """ Create an arctangent function
3148+
3149+ >>> Arctangent(Real('x'))
3150+ Arctangent(x)
3151+ """
3152+ return _nary_kind_builder (Kind .ARCTANGENT , RealSort ().cast (x ))
3153+
3154+
3155+ def Secant (x ):
3156+ """ Create a secant function
3157+
3158+ >>> Secant(Real('x'))
3159+ Secant(x)
3160+ """
3161+ return _nary_kind_builder (Kind .SECANT , RealSort ().cast (x ))
3162+
3163+
3164+ def Cosecant (x ):
3165+ """ Create a cosecant function
3166+
3167+ >>> Cosecant(Real('x'))
3168+ Cosecant(x)
3169+ """
3170+ return _nary_kind_builder (Kind .COSECANT , RealSort ().cast (x ))
3171+
3172+
3173+ def Cotangent (x ):
3174+ """ Create a cotangent function
3175+
3176+ >>> Cotangent(Real('x'))
3177+ Cotangent(x)
3178+ """
3179+ return _nary_kind_builder (Kind .COTANGENT , RealSort ().cast (x ))
3180+
3181+
3182+ def Arcsecant (x ):
3183+ """ Create an arcsecant function
3184+
3185+ >>> Arcsecant(Real('x'))
3186+ Arcsecant(x)
3187+ """
3188+ return _nary_kind_builder (Kind .ARCSECANT , RealSort ().cast (x ))
3189+
3190+
3191+ def Arccosecant (x ):
3192+ """ Create an arccosecant function
3193+
3194+ >>> Arccosecant(Real('x'))
3195+ Arccosecant(x)
3196+ """
3197+ return _nary_kind_builder (Kind .ARCCOSECANT , RealSort ().cast (x ))
3198+
3199+
3200+ def Arccotangent (x ):
3201+ """ Create an arccotangent function
3202+
3203+ >>> Arccotangent(Real('x'))
3204+ Arccotangent(x)
3205+ """
3206+ return _nary_kind_builder (Kind .ARCCOTANGENT , RealSort ().cast (x ))
3207+
3208+
30663209#########################################
30673210#
30683211# Bit-Vectors
@@ -6892,19 +7035,19 @@ def fpIsInf(a, ctx=None):
68927035def fpIsZero (a , ctx = None ):
68937036 """Create a SMT floating-point isZero expression.
68947037 """
6895- return _mk_fp_unary_pred (Kind .FPIsZ , a , ctx )
7038+ return _mk_fp_unary_pred (Kind .FLOATINGPOINT_IS_ZERO , a , ctx )
68967039
68977040
68987041def fpIsNormal (a , ctx = None ):
68997042 """Create a SMT floating-point isNormal expression.
69007043 """
6901- return _mk_fp_unary_pred (Kind .FPIsN , a , ctx )
7044+ return _mk_fp_unary_pred (Kind .FLOATINGPOINT_IS_NORMAL , a , ctx )
69027045
69037046
69047047def fpIsSubnormal (a , ctx = None ):
69057048 """Create a SMT floating-point isSubnormal expression.
69067049 """
6907- return _mk_fp_unary_pred (Kind .FPIsSn , a , ctx )
7050+ return _mk_fp_unary_pred (Kind .FLOATINGPOINT_IS_SUBNORMAL , a , ctx )
69087051
69097052
69107053def fpIsNegative (a , ctx = None ):
@@ -7538,7 +7681,7 @@ def accessor(self, i, j):
75387681
75397682class DatatypeConstructorRef (FuncDeclRef ):
75407683 def __init__ (self , datatype , ctx = None , r = False ):
7541- super ().__init__ (datatype .getConstructorTerm (), ctx , r )
7684+ super ().__init__ (datatype .getTerm (), ctx , r )
75427685 self .dt = datatype
75437686
75447687 def arity (self ):
@@ -7611,7 +7754,7 @@ def __call__(self, *args):
76117754
76127755class DatatypeSelectorRef (FuncDeclRef ):
76137756 def __init__ (self , datatype , ctx = None , r = False ):
7614- super ().__init__ (datatype .getSelectorTerm (), ctx , r )
7757+ super ().__init__ (datatype .getTerm (), ctx , r )
76157758 self .dt = datatype
76167759
76177760 def arity (self ):
0 commit comments