Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions .github/extra/hosts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
116.205.2.91 gitcode.com
116.205.2.91 www.gitcode.com
116.205.6.139 ai.gitcode.com
120.46.215.171 ai-ide.gitcode.com
116.205.2.91 aihub-run.gitcode.com
116.205.6.218 api.gitcode.com
114.116.253.149 blog.gitcode.com
90.84.160.24 cdn-img.gitcode.com
221.194.141.163 cdn-news.gitcode.com
90.84.161.29 cdn-static.gitcode.com
116.205.2.45 chat-api.gitcode.com
116.205.6.139 competition.gitcode.com
116.205.2.91 copilot-app.gitcode.com
116.205.2.45 desktop-api.gitcode.com
36.41.168.170 desktop.gitcode.com
221.194.141.170 docs.gitcode.com
90.84.160.17 file-cdn.gitcode.com
116.205.2.91 file.gitcode.com
116.205.2.91 gitcodechat-app.gitcode.com
116.205.2.91 gosim.gitcode.com
116.205.2.91 homepage-app.gitcode.com
116.205.2.91 idea.gitcode.com
90.84.161.17 lfs-cdn.gitcode.com
116.205.6.30 lfs-ai.gitcode.com
90.84.161.18 lfs-ai-cdn.gitcode.com
116.205.6.213 lfs.gitcode.com
116.205.2.91 link.gitcode.com
120.233.178.92 matechat.gitcode.com
116.205.2.91 news.gitcode.com
90.84.160.17 raw-cdn.gitcode.com
113.44.227.73 raw.gitcode.com
116.205.6.153 tianqi-api.gitcode.com
116.205.6.153 tianqi.gitcode.com
116.205.2.91 usercenter-app.gitcode.com
116.205.2.45 web-api.gitcode.com
1.92.135.79 wechat-api.gitcode.com
116.205.2.91 weixin.gitcode.com
3 changes: 3 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,9 @@ jobs:
with:
node-version: 22

- name: Configure /etc/hosts
run: cat .github/extra/hosts | sudo tee -a /etc/hosts

- name: Set up ArkAnalyzer
run: |
REPO_URL="https://gitcode.com/Lipen/arkanalyzer.git"
Expand Down
2 changes: 1 addition & 1 deletion buildSrc/src/main/kotlin/Dependencies.kt
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ object Versions {
const val clikt = "5.0.0"
const val detekt = "1.23.7"
const val ini4j = "0.5.4"
const val jacodb = "5889d3c784"
const val jacodb = "da338ffc83"
const val juliet = "1.3.2"
const val junit = "5.9.3"
const val kotlin = "2.1.0"
Expand Down
37 changes: 27 additions & 10 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,5 +1,32 @@
rootProject.name = "usvm"

pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.name == "rdgen") {
useModule("com.jetbrains.rd:rd-gen:${requested.version}")
}
}
}
}

plugins {
// https://plugins.gradle.org/plugin/com.gradle.develocity
id("com.gradle.develocity") version("4.0.2")
}

develocity {
buildScan {
// Accept the term of use for the build scan plugin:
termsOfUseUrl.set("https://gradle.com/help/legal-terms-of-use")
termsOfUseAgree.set("yes")

// In CI, publish build scans automatically.
// Locally, publish build scans on-demand, when `--scan` option is provided:
publishing.onlyIf { System.getenv("CI") != null }
}
}

include("usvm-core")
include("usvm-jvm")
include("usvm-jvm:usvm-jvm-api")
Expand Down Expand Up @@ -29,13 +56,3 @@ findProject(":usvm-python:usvm-python-commons")?.name = "usvm-python-commons"
// As a workaround, we convert it to a real absolute path.
// See IDEA bug: https://youtrack.jetbrains.com/issue/IDEA-329756
// includeBuild(file("../jacodb").toPath().toRealPath().toAbsolutePath())

pluginManagement {
resolutionStrategy {
eachPlugin {
if (requested.id.name == "rdgen") {
useModule("com.jetbrains.rd:rd-gen:${requested.version}")
}
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,8 @@ class ExprTypeAnnotator(
private val valueAnnotator: ValueTypeAnnotator,
) : EtsExpr.Visitor<EtsExpr> {

private fun annotate(local: EtsLocal) = valueAnnotator.visit(local)

private fun annotate(value: EtsValue) = value.accept(valueAnnotator)

private fun annotate(expr: EtsExpr) = expr.accept(this)
Expand Down Expand Up @@ -267,8 +269,8 @@ class ExprTypeAnnotator(
)

override fun visit(expr: EtsInstanceCallExpr): EtsExpr {
val baseInferred = annotate(expr.instance) as EtsLocal // safe cast
val argsInferred = expr.args.map { annotate(it) as EtsLocal } // safe cast
val baseInferred = annotate(expr.instance)
val argsInferred = expr.args.map { annotate(it) }
val methodInferred = when (val baseType = baseInferred.type) {
is EtsClassType -> {
val etsClass = scene.projectAndSdkClasses.find { it.signature == baseType.signature }
Expand All @@ -284,13 +286,13 @@ class ExprTypeAnnotator(
}

override fun visit(expr: EtsStaticCallExpr): EtsExpr {
val argsInferred = expr.args.map { annotate(it) as EtsLocal } // safe cast
val argsInferred = expr.args.map { annotate(it) }
return expr.copy(args = argsInferred)
}

override fun visit(expr: EtsPtrCallExpr): EtsExpr {
val ptrInferred = annotate(expr.ptr) as EtsLocal // safe cast
val argsInferred = expr.args.map { annotate(it) as EtsLocal } // safe cast
val ptrInferred = annotate(expr.ptr)
val argsInferred = expr.args.map { annotate(it) }
return expr.copy(ptr = ptrInferred, args = argsInferred)
}
}
11 changes: 4 additions & 7 deletions usvm-ts/src/main/kotlin/org/usvm/machine/TsContext.kt
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@ import org.usvm.machine.expr.TsUndefinedSort
import org.usvm.machine.expr.TsUnresolvedSort
import org.usvm.machine.expr.TsVoidSort
import org.usvm.machine.expr.TsVoidValue
import org.usvm.machine.expr.tctx
import org.usvm.machine.interpreter.TsStepScope
import org.usvm.machine.types.EtsFakeType
import org.usvm.memory.UReadOnlyMemory
Expand Down Expand Up @@ -173,13 +172,12 @@ class TsContext(
return this
}

fun UHeapRef.unwrapRefWithPathConstraint(scope: TsStepScope): UHeapRef = with(tctx) {
if (this@unwrapRefWithPathConstraint.isFakeObject()) {
fun UHeapRef.unwrapRefWithPathConstraint(scope: TsStepScope): UHeapRef {
if (isFakeObject()) {
scope.assert(getFakeType(scope).refTypeExpr)
extractRef(scope)
} else {
asExpr(addressSort)
return extractRef(scope)
}
return this
}

fun createFakeObjectRef(): UConcreteHeapRef {
Expand Down Expand Up @@ -274,7 +272,6 @@ class Constants {
}
}


enum class IntermediateLValueField {
BOOL, FP, REF
}
Loading