Skip to content

Commit d4774d3

Browse files
authored
Bump JacoDB (#284)
* Bump jacodb * Use AA branch 'neo/2025-05-30b' * Support EnumValueType
1 parent b02da29 commit d4774d3

File tree

4 files changed

+29
-20
lines changed

4 files changed

+29
-20
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ jobs:
127127
DEST_DIR="arkanalyzer"
128128
MAX_RETRIES=10
129129
RETRY_DELAY=3 # Delay between retries in seconds
130-
BRANCH="neo/2025-05-12"
130+
BRANCH="neo/2025-05-30b"
131131
132132
for ((i=1; i<=MAX_RETRIES; i++)); do
133133
git clone --depth=1 --branch $BRANCH $REPO_URL $DEST_DIR && break

buildSrc/src/main/kotlin/Dependencies.kt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ object Versions {
66
const val clikt = "5.0.0"
77
const val detekt = "1.23.7"
88
const val ini4j = "0.5.4"
9-
const val jacodb = "3b6a17f000"
9+
const val jacodb = "4ca8d08f1d"
1010
const val juliet = "1.3.2"
1111
const val junit = "5.9.3"
1212
const val kotlin = "2.1.0"

usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/dto/EtsTypeToDto.kt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@ import org.jacodb.ets.dto.AnyTypeDto
2121
import org.jacodb.ets.dto.ArrayTypeDto
2222
import org.jacodb.ets.dto.BooleanTypeDto
2323
import org.jacodb.ets.dto.ClassTypeDto
24+
import org.jacodb.ets.dto.EnumValueTypeDto
2425
import org.jacodb.ets.dto.FunctionTypeDto
2526
import org.jacodb.ets.dto.GenericTypeDto
2627
import org.jacodb.ets.dto.IntersectionTypeDto
@@ -43,6 +44,7 @@ import org.jacodb.ets.model.EtsAnyType
4344
import org.jacodb.ets.model.EtsArrayType
4445
import org.jacodb.ets.model.EtsBooleanType
4546
import org.jacodb.ets.model.EtsClassType
47+
import org.jacodb.ets.model.EtsEnumValueType
4648
import org.jacodb.ets.model.EtsFunctionType
4749
import org.jacodb.ets.model.EtsGenericType
4850
import org.jacodb.ets.model.EtsIntersectionType
@@ -97,6 +99,13 @@ private object EtsTypeToDto : EtsType.Visitor<TypeDto> {
9799
)
98100
}
99101

102+
override fun visit(type: EtsEnumValueType): TypeDto {
103+
return EnumValueTypeDto(
104+
signature = type.signature.toDto(),
105+
constant = type.constant?.toDto(),
106+
)
107+
}
108+
100109
override fun visit(type: EtsBooleanType): TypeDto {
101110
return BooleanTypeDto
102111
}

usvm-ts-dataflow/src/main/kotlin/org/usvm/dataflow/ts/infer/dto/EtsValueToDto.kt

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -40,43 +40,43 @@ import org.jacodb.ets.model.EtsValue
4040

4141
fun EtsValue.toDto(): ValueDto = accept(EtsValueToDto)
4242

43-
private object EtsValueToDto : EtsValue.Visitor<ValueDto> {
44-
override fun visit(value: EtsLocal): ValueDto {
45-
return LocalDto(
46-
name = value.name,
47-
type = value.type.toDto(),
48-
)
49-
}
43+
fun EtsLocal.toDto(): LocalDto = LocalDto(
44+
name = name,
45+
type = type.toDto(),
46+
)
5047

51-
private fun visitConstant(value: EtsConstant): ValueDto {
52-
return ConstantDto(
53-
value = value.toString(),
54-
type = value.type.toDto(),
55-
)
48+
fun EtsConstant.toDto(): ConstantDto = ConstantDto(
49+
value = toString(),
50+
type = type.toDto(),
51+
)
52+
53+
private object EtsValueToDto : EtsValue.Visitor<ValueDto> {
54+
override fun visit(value: EtsLocal): LocalDto {
55+
return value.toDto()
5656
}
5757

5858
override fun visit(value: EtsConstant): ValueDto {
59-
return visitConstant(value)
59+
return value.toDto()
6060
}
6161

6262
override fun visit(value: EtsStringConstant): ValueDto {
63-
return visitConstant(value)
63+
return value.toDto()
6464
}
6565

6666
override fun visit(value: EtsBooleanConstant): ValueDto {
67-
return visitConstant(value)
67+
return value.toDto()
6868
}
6969

7070
override fun visit(value: EtsNumberConstant): ValueDto {
71-
return visitConstant(value)
71+
return value.toDto()
7272
}
7373

7474
override fun visit(value: EtsNullConstant): ValueDto {
75-
return visitConstant(value)
75+
return value.toDto()
7676
}
7777

7878
override fun visit(value: EtsUndefinedConstant): ValueDto {
79-
return visitConstant(value)
79+
return value.toDto()
8080
}
8181

8282
override fun visit(value: EtsThis): ValueDto {

0 commit comments

Comments
 (0)