@@ -47,27 +47,27 @@ open Factory Batteries
4747
4848namespace Decimal
4949
50- def lessThan (t₁ t₂ : Term) : Term :=
50+ public def lessThan (t₁ t₂ : Term) : Term :=
5151 bvslt (ext.decimal.val t₁) (ext.decimal.val t₂)
5252
53- def lessThanOrEqual (t₁ t₂ : Term) : Term :=
53+ public def lessThanOrEqual (t₁ t₂ : Term) : Term :=
5454 bvsle (ext.decimal.val t₁) (ext.decimal.val t₂)
5555
56- def greaterThan (t₁ t₂ : Term) : Term :=
56+ public def greaterThan (t₁ t₂ : Term) : Term :=
5757 lessThan t₂ t₁
5858
59- def greaterThanOrEqual (t₁ t₂ : Term) : Term :=
59+ public def greaterThanOrEqual (t₁ t₂ : Term) : Term :=
6060 lessThanOrEqual t₂ t₁
6161
6262end Decimal
6363
6464namespace IPAddr
6565open BitVec
6666
67- def isIpv4 (t : Term) : Term :=
67+ public def isIpv4 (t : Term) : Term :=
6868 ext.ipaddr.isV4 t
6969
70- def isIpv6 (t : Term) : Term :=
70+ public def isIpv6 (t : Term) : Term :=
7171 not (ext.ipaddr.isV4 t)
7272
7373def subnetWidth (w : Nat) (ipPre : Term) : Term :=
@@ -100,7 +100,7 @@ def inRangeV (isIp : Term → Term) (range : Term → Term × Term) (t₁ t₂ :
100100 (and (isIp t₁) (isIp t₂))
101101 (inRange range t₁ t₂))
102102
103- def isInRange (t₁ t₂ : Term) : Term :=
103+ public def isInRange (t₁ t₂ : Term) : Term :=
104104 (or
105105 (inRangeV isIpv4 rangeV4 t₁ t₂)
106106 (inRangeV isIpv6 rangeV6 t₁ t₂))
@@ -113,45 +113,45 @@ def inRangeLit (t : Term) (cidr₄ : Ext.IPAddr.CIDR Ext.IPAddr.V4_WIDTH) (cidr
113113 (inRange rangeV4 t (ipTerm (Ext.IPAddr.IPNet.V4 cidr₄)))
114114 (inRange rangeV6 t (ipTerm (Ext.IPAddr.IPNet.V6 cidr₆))))
115115
116- def isLoopback (t : Term) : Term :=
116+ public def isLoopback (t : Term) : Term :=
117117 inRangeLit t Ext.IPAddr.LOOP_BACK_CIDR_V4 Ext.IPAddr.LOOP_BACK_CIDR_V6
118118
119- def isMulticast (t : Term) : Term :=
119+ public def isMulticast (t : Term) : Term :=
120120 inRangeLit t Ext.IPAddr.MULTICAST_CIDR_V4 Ext.IPAddr.MULTICAST_CIDR_V6
121121
122122end IPAddr
123123
124124namespace Duration
125125
126- def toMilliseconds (t : Term) : Term := ext.duration.val t
126+ public def toMilliseconds (t : Term) : Term := ext.duration.val t
127127
128- def toSeconds (t : Term) : Term :=
128+ public def toSeconds (t : Term) : Term :=
129129 bvsdiv (toMilliseconds t) (.prim (.bitvec (Int64.toBitVec 1000 )))
130130
131- def toMinutes (t : Term) : Term :=
131+ public def toMinutes (t : Term) : Term :=
132132 bvsdiv (toSeconds t) (.prim (.bitvec (Int64.toBitVec 60 )))
133133
134- def toHours (t : Term) : Term :=
134+ public def toHours (t : Term) : Term :=
135135 bvsdiv (toMinutes t) (.prim (.bitvec (Int64.toBitVec 60 )))
136136
137- def toDays (t : Term) : Term :=
137+ public def toDays (t : Term) : Term :=
138138 bvsdiv (toHours t) (.prim (.bitvec (Int64.toBitVec 24 )))
139139
140140end Duration
141141
142142namespace Datetime
143143
144- def offset (dt dur : Term) : Term :=
144+ public def offset (dt dur : Term) : Term :=
145145 let dt_val := ext.datetime.val dt
146146 let dur_val := ext.duration.val dur
147147 ifFalse (bvsaddo dt_val dur_val) (ext.datetime.ofBitVec (bvadd dt_val dur_val))
148148
149- def durationSince (dt₁ dt₂ : Term) : Term :=
149+ public def durationSince (dt₁ dt₂ : Term) : Term :=
150150 let dt₁_val := ext.datetime.val dt₁
151151 let dt₂_val := ext.datetime.val dt₂
152152 ifFalse (bvssubo dt₁_val dt₂_val) (ext.duration.ofBitVec (bvsub dt₁_val dt₂_val))
153153
154- def toDate (dt : Term) : Term :=
154+ public def toDate (dt : Term) : Term :=
155155 let zero := .prim (.bitvec (Int64.toBitVec 0 ))
156156 let one := .prim (.bitvec (Int64.toBitVec 1 ))
157157 let ms_per_day := .prim (.bitvec (Int64.toBitVec 86400000 ))
@@ -166,7 +166,7 @@ def toDate (dt : Term) : Term :=
166166 )
167167 )
168168
169- def toTime (dt : Term) : Term :=
169+ public def toTime (dt : Term) : Term :=
170170 let zero := .prim (.bitvec (Int64.toBitVec 0 ))
171171 let ms_per_day := .prim (.bitvec (Int64.toBitVec 86400000 ))
172172 let dt_val := ext.datetime.val dt
0 commit comments