Skip to content

Commit 3adb961

Browse files
committed
fixing imports in new files
1 parent 18e58b7 commit 3adb961

File tree

8 files changed

+33
-47
lines changed

8 files changed

+33
-47
lines changed

subprojects/common/analysis/src/main/java/hu/bme/mit/theta/analysis/algorithm/bounded/AbstractMonolithicExpr.kt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ import hu.bme.mit.theta.core.type.booltype.BoolExprs
2727
import hu.bme.mit.theta.core.type.booltype.BoolLitExpr
2828
import hu.bme.mit.theta.core.type.booltype.BoolType
2929
import hu.bme.mit.theta.core.type.booltype.IffExpr
30-
import hu.bme.mit.theta.core.type.booltype.SmartBoolExprs.*
30+
import hu.bme.mit.theta.core.type.booltype.SmartBoolExprs.And
31+
import hu.bme.mit.theta.core.type.booltype.SmartBoolExprs.Not
32+
import hu.bme.mit.theta.core.type.booltype.SmartBoolExprs.Or
3133
import hu.bme.mit.theta.core.utils.ExprUtils
3234
import hu.bme.mit.theta.core.utils.indexings.VarIndexingFactory
33-
import java.util.HashMap
3435

3536
fun MonolithicExpr.createAbstract(prec: PredPrec): MonolithicExpr {
3637
// TODO: handle initOffsetIndex in abstract initExpr

subprojects/common/core/src/main/kotlin/hu/bme/mit/theta/core/decl/BasicConstDecl.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,7 @@ package hu.bme.mit.theta.core.decl
1717

1818
import hu.bme.mit.theta.core.type.Type
1919
import hu.bme.mit.theta.core.utils.UniqueIdProvider
20-
import kotlinx.serialization.KSerializer
21-
import kotlinx.serialization.PolymorphicSerializer
22-
import kotlinx.serialization.SerialName
23-
import kotlinx.serialization.Serializable
20+
import kotlinx.serialization.*
2421
import kotlinx.serialization.descriptors.SerialDescriptor
2522
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
2623
import kotlinx.serialization.descriptors.element
@@ -71,14 +68,14 @@ data class BasicConstDecl<DeclType : Type>(
7168
1 -> type = decodeSerializableElement(descriptor, 1, PolymorphicSerializer(Type::class))
7269
2 -> id = decodeIntElement(descriptor, 2)
7370
CompositeDecoder.DECODE_DONE -> break
74-
else -> error("Unexpected index: $index")
71+
else -> throw SerializationException("Unexpected index: $index")
7572
}
7673
}
7774

7875
BasicConstDecl(
79-
name = name ?: error("Missing name"),
80-
type = type ?: error("Missing type"),
81-
id = id ?: error("Missing id"),
76+
name = name ?: throw SerializationException("Missing name"),
77+
type = type ?: throw SerializationException("Missing type"),
78+
id = id ?: throw SerializationException("Missing id"),
8279
)
8380
}
8481
}

subprojects/common/core/src/main/kotlin/hu/bme/mit/theta/core/decl/IndexedConstDecl.kt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ data class IndexedConstDecl<DeclType : Type>(
8484
}
8585

8686
IndexedConstDecl(
87-
varDecl = varDecl ?: error("Missing varDecl"),
88-
index = index ?: error("Missing index"),
89-
id = id ?: error("Missing id"),
87+
varDecl = varDecl ?: throw SerializationException("Missing varDecl"),
88+
index = index ?: throw SerializationException("Missing index"),
89+
id = id ?: throw SerializationException("Missing id"),
9090
)
9191
}
9292
}

subprojects/common/core/src/main/kotlin/hu/bme/mit/theta/core/decl/ParamDecl.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ package hu.bme.mit.theta.core.decl
1818
import hu.bme.mit.theta.common.Utils
1919
import hu.bme.mit.theta.core.type.Type
2020
import hu.bme.mit.theta.core.utils.UniqueIdProvider
21-
import kotlinx.serialization.KSerializer
22-
import kotlinx.serialization.PolymorphicSerializer
23-
import kotlinx.serialization.SerialName
24-
import kotlinx.serialization.Serializable
21+
import kotlinx.serialization.*
2522
import kotlinx.serialization.descriptors.SerialDescriptor
2623
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
2724
import kotlinx.serialization.descriptors.element
@@ -73,14 +70,14 @@ data class ParamDecl<DeclType : Type>(
7370
1 -> type = decodeSerializableElement(descriptor, 1, PolymorphicSerializer(Type::class))
7471
2 -> id = decodeIntElement(descriptor, 2)
7572
CompositeDecoder.DECODE_DONE -> break
76-
else -> error("Unexpected index: $index")
73+
else -> throw SerializationException("Unexpected index: $index")
7774
}
7875
}
7976

8077
ParamDecl(
81-
name = name ?: error("Missing name"),
82-
type = type ?: error("Missing type"),
83-
id = id ?: error("Missing id"),
78+
name = name ?: throw SerializationException("Missing name"),
79+
type = type ?: throw SerializationException("Missing type"),
80+
id = id ?: throw SerializationException("Missing id"),
8481
)
8582
}
8683
}

subprojects/common/core/src/main/kotlin/hu/bme/mit/theta/core/decl/VarDecl.kt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -86,14 +86,14 @@ data class VarDecl<DeclType : Type>(
8686
1 -> type = decodeSerializableElement(descriptor, 1, PolymorphicSerializer(Type::class))
8787
2 -> id = decodeIntElement(descriptor, 2)
8888
CompositeDecoder.DECODE_DONE -> break
89-
else -> error("Unexpected index: $index")
89+
else -> throw SerializationException("Unexpected index: $index")
9090
}
9191
}
9292

9393
VarDecl(
94-
name = name ?: error("Missing name"),
95-
type = type ?: error("Missing type"),
96-
id = id ?: error("Missing id"),
94+
name = name ?: throw SerializationException("Missing name"),
95+
type = type ?: throw SerializationException("Missing type"),
96+
id = id ?: throw SerializationException("Missing id"),
9797
)
9898
}
9999
}

subprojects/common/core/src/main/kotlin/hu/bme/mit/theta/core/type/arraytype/ArrayLitExpr.kt

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,7 @@ import hu.bme.mit.theta.core.type.LitExpr
2323
import hu.bme.mit.theta.core.type.NullaryExpr
2424
import hu.bme.mit.theta.core.type.Type
2525
import hu.bme.mit.theta.core.utils.ExprSimplifier
26-
import kotlinx.serialization.KSerializer
27-
import kotlinx.serialization.PolymorphicSerializer
28-
import kotlinx.serialization.SerialName
29-
import kotlinx.serialization.Serializable
26+
import kotlinx.serialization.*
3027
import kotlinx.serialization.builtins.ListSerializer
3128
import kotlinx.serialization.builtins.PairSerializer
3229
import kotlinx.serialization.descriptors.SerialDescriptor
@@ -131,14 +128,14 @@ data class ArrayLitExpr<IndexType : Type, ElemType : Type>(
131128
decodeSerializableElement(descriptor, 2, PolymorphicSerializer(Type::class))
132129
as ArrayType<Type, Type>
133130
CompositeDecoder.DECODE_DONE -> break
134-
else -> error("Unexpected index: $index")
131+
else -> throw SerializationException("Unexpected index: $index")
135132
}
136133
}
137134

138135
ArrayLitExpr(
139-
elements = elements ?: error("Missing elements"),
140-
elseElem = elseElem ?: error("Missing elseElem"),
141-
type = type ?: error("Missing type"),
136+
elements = elements ?: throw SerializationException("Missing elements"),
137+
elseElem = elseElem ?: throw SerializationException("Missing elseElem"),
138+
type = type ?: throw SerializationException("Missing type"),
142139
)
143140
}
144141
}

subprojects/common/core/src/main/kotlin/hu/bme/mit/theta/core/type/arraytype/ArrayType.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,7 @@ import hu.bme.mit.theta.core.type.Type
2222
import hu.bme.mit.theta.core.type.abstracttype.EqExpr
2323
import hu.bme.mit.theta.core.type.abstracttype.Equational
2424
import hu.bme.mit.theta.core.type.abstracttype.NeqExpr
25-
import kotlinx.serialization.KSerializer
26-
import kotlinx.serialization.PolymorphicSerializer
27-
import kotlinx.serialization.SerialName
28-
import kotlinx.serialization.Serializable
25+
import kotlinx.serialization.*
2926
import kotlinx.serialization.descriptors.SerialDescriptor
3027
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
3128
import kotlinx.serialization.descriptors.element
@@ -98,13 +95,13 @@ data class ArrayType<IndexType : Type, ElemType : Type>(
9895
elemType =
9996
decodeSerializableElement(descriptor, 1, PolymorphicSerializer(Type::class))
10097
CompositeDecoder.DECODE_DONE -> break
101-
else -> error("Unexpected index: $index")
98+
else -> throw SerializationException("Unexpected index: $index")
10299
}
103100
}
104101

105102
ArrayType(
106-
indexType = indexType ?: error("Missing indexType"),
107-
elemType = elemType ?: error("Missing elemType"),
103+
indexType = indexType ?: throw SerializationException("Missing indexType"),
104+
elemType = elemType ?: throw SerializationException("Missing elemType"),
108105
)
109106
}
110107
}

subprojects/common/core/src/main/kotlin/hu/bme/mit/theta/core/type/functype/FuncType.kt

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,7 @@ package hu.bme.mit.theta.core.type.functype
1818
import hu.bme.mit.theta.common.Utils
1919
import hu.bme.mit.theta.core.type.DomainSize
2020
import hu.bme.mit.theta.core.type.Type
21-
import kotlinx.serialization.KSerializer
22-
import kotlinx.serialization.PolymorphicSerializer
23-
import kotlinx.serialization.SerialName
24-
import kotlinx.serialization.Serializable
21+
import kotlinx.serialization.*
2522
import kotlinx.serialization.descriptors.SerialDescriptor
2623
import kotlinx.serialization.descriptors.buildClassSerialDescriptor
2724
import kotlinx.serialization.descriptors.element
@@ -87,13 +84,13 @@ data class FuncType<ParamType : Type, ResultType : Type>(
8784
resultType =
8885
decodeSerializableElement(descriptor, 1, PolymorphicSerializer(Type::class))
8986
CompositeDecoder.DECODE_DONE -> break
90-
else -> error("Unexpected index: $index")
87+
else -> throw SerializationException("Unexpected index: $index")
9188
}
9289
}
9390

9491
FuncType(
95-
paramType = paramType ?: error("Missing paramType"),
96-
resultType = resultType ?: error("Missing resultType"),
92+
paramType = paramType ?: throw SerializationException("Missing paramType"),
93+
resultType = resultType ?: throw SerializationException("Missing resultType"),
9794
)
9895
}
9996
}

0 commit comments

Comments
 (0)