@@ -3,9 +3,21 @@ package io.ksmt.expr
33import io.ksmt.KContext
44import io.ksmt.cache.hash
55import io.ksmt.cache.structurallyEqual
6- import io.ksmt.decl.*
6+ import io.ksmt.decl.KDecl
7+ import io.ksmt.decl.KStringLenDecl
8+ import io.ksmt.decl.KStringLiteralDecl
9+ import io.ksmt.decl.KStringLtDecl
10+ import io.ksmt.decl.KStringLeDecl
11+ import io.ksmt.decl.KStringGtDecl
12+ import io.ksmt.decl.KStringGeDecl
13+ import io.ksmt.decl.KStringToRegexDecl
14+ import io.ksmt.decl.KStringInRegexDecl
715import io.ksmt.expr.transformer.KTransformerBase
8- import io.ksmt.sort.*
16+ import io.ksmt.sort.KSort
17+ import io.ksmt.sort.KBoolSort
18+ import io.ksmt.sort.KIntSort
19+ import io.ksmt.sort.KRegexSort
20+ import io.ksmt.sort.KStringSort
921import io.ksmt.utils.cast
1022
1123class KStringLiteralExpr internal constructor(
@@ -97,7 +109,7 @@ class KStringInRegexExpr internal constructor(
97109 override val args: List <KExpr <KSort >>
98110 get() = listOf (arg0.cast(), arg1.cast())
99111
100- override val decl: KDecl < KBoolSort >
112+ override val decl: KStringInRegexDecl
101113 get() = ctx.mkStringInRegexDecl()
102114
103115 override fun accept (transformer : KTransformerBase ): KExpr <KBoolSort > {
@@ -149,3 +161,87 @@ class KPrefixOfExpr internal constructor(
149161 override fun internHashCode (): Int = hash(arg0, arg1)
150162 override fun internEquals (other : Any ): Boolean = structurallyEqual(other, { arg0 }, { arg1 })
151163}
164+
165+ class KStringLtExpr internal constructor(
166+ ctx : KContext ,
167+ val lhs : KExpr <KStringSort >,
168+ val rhs : KExpr <KStringSort >
169+ ) : KApp<KBoolSort, KStringSort>(ctx) {
170+ override val sort: KBoolSort = ctx.boolSort
171+
172+ override val decl: KStringLtDecl
173+ get() = ctx.mkStringLtDecl()
174+
175+ override val args: List <KExpr <KStringSort >>
176+ get() = listOf (lhs, rhs)
177+
178+ override fun accept (transformer : KTransformerBase ): KExpr <KBoolSort > {
179+ TODO (" Not yet implemented" )
180+ }
181+
182+ override fun internHashCode (): Int = hash(lhs, rhs)
183+ override fun internEquals (other : Any ): Boolean = structurallyEqual(other, { lhs }, { rhs })
184+ }
185+
186+ class KStringLeExpr internal constructor(
187+ ctx : KContext ,
188+ val lhs : KExpr <KStringSort >,
189+ val rhs : KExpr <KStringSort >
190+ ) : KApp<KBoolSort, KStringSort>(ctx) {
191+ override val sort: KBoolSort = ctx.boolSort
192+
193+ override val decl: KStringLeDecl
194+ get() = ctx.mkStringLeDecl()
195+
196+ override val args: List <KExpr <KStringSort >>
197+ get() = listOf (lhs, rhs)
198+
199+ override fun accept (transformer : KTransformerBase ): KExpr <KBoolSort > {
200+ TODO (" Not yet implemented" )
201+ }
202+
203+ override fun internHashCode (): Int = hash(lhs, rhs)
204+ override fun internEquals (other : Any ): Boolean = structurallyEqual(other, { lhs }, { rhs })
205+ }
206+
207+ class KStringGtExpr internal constructor(
208+ ctx : KContext ,
209+ val lhs : KExpr <KStringSort >,
210+ val rhs : KExpr <KStringSort >
211+ ) : KApp<KBoolSort, KStringSort>(ctx) {
212+ override val sort: KBoolSort = ctx.boolSort
213+
214+ override val decl: KStringGtDecl
215+ get() = ctx.mkStringGtDecl()
216+
217+ override val args: List <KExpr <KStringSort >>
218+ get() = listOf (lhs, rhs)
219+
220+ override fun accept (transformer : KTransformerBase ): KExpr <KBoolSort > {
221+ TODO (" Not yet implemented" )
222+ }
223+
224+ override fun internHashCode (): Int = hash(lhs, rhs)
225+ override fun internEquals (other : Any ): Boolean = structurallyEqual(other, { lhs }, { rhs })
226+ }
227+
228+ class KStringGeExpr internal constructor(
229+ ctx : KContext ,
230+ val lhs : KExpr <KStringSort >,
231+ val rhs : KExpr <KStringSort >
232+ ) : KApp<KBoolSort, KStringSort>(ctx) {
233+ override val sort: KBoolSort = ctx.boolSort
234+
235+ override val decl: KStringGeDecl
236+ get() = ctx.mkStringGeDecl()
237+
238+ override val args: List <KExpr <KStringSort >>
239+ get() = listOf (lhs, rhs)
240+
241+ override fun accept (transformer : KTransformerBase ): KExpr <KBoolSort > {
242+ TODO (" Not yet implemented" )
243+ }
244+
245+ override fun internHashCode (): Int = hash(lhs, rhs)
246+ override fun internEquals (other : Any ): Boolean = structurallyEqual(other, { lhs }, { rhs })
247+ }
0 commit comments