Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new TypeScript sample for < comparisons across several types, adds corresponding Kotlin tests, refactors the binary-operator backend to unify fake-object logic, renames a generic parameter for clarity, and updates a demo test target.
- Added
Less.tswithlessNumbers,lessBooleans,lessMixed,lessRefs, andlessUnknown. - Added Kotlin
Less.kttests to exercise the new TS methods. - Refactored
TsBinaryOperatorimplementations to usecommonResolveFakeObject. - Renamed generic parameter in
EtsFakeType.ktand updated theDemoPhotostest to targetonCreate.
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| usvm-ts/src/test/resources/samples/operators/Less.ts | New TS sample for < operator on numbers, booleans, mixed, refs, unknown |
| usvm-ts/src/test/kotlin/org/usvm/samples/operators/Less.kt | Kotlin tests added for each lessX method |
| usvm-ts/src/test/kotlin/org/usvm/project/DemoPhotos.kt | Updated test selection from onSelect/AlbumSetPage to onCreate/EntryAbility |
| usvm-ts/src/main/kotlin/org/usvm/machine/types/EtsFakeType.kt | Renamed type-parameter from Sort to T in ExprWithTypeConstraint |
| usvm-ts/src/main/kotlin/org/usvm/machine/operator/TsBinaryOperator.kt | Consolidated fake-object resolution into commonResolveFakeObject |
Comments suppressed due to low confidence (4)
usvm-ts/src/test/kotlin/org/usvm/project/DemoPhotos.kt:108
- [nitpick] The test function name (
test on particular method) no longer matches the updated target (onCreate/EntryAbility); consider renaming the test or updating its comment to reflect the new behavior.
.single { it.name == "onCreate" && it.enclosingClass?.name == "EntryAbility" }
usvm-ts/src/main/kotlin/org/usvm/machine/operator/TsBinaryOperator.kt:102
- [nitpick] Add KDoc for
commonResolveFakeObjectexplaining the purpose ofbottomValueSortand thereducelambda to improve maintainability.
fun <R : USort> TsBinaryOperator.commonResolveFakeObject(
usvm-ts/src/main/kotlin/org/usvm/machine/types/EtsFakeType.kt:46
- [nitpick] The generic parameter
Tis less descriptive than the previousSort; consider using a more meaningful name (e.g.,Sort) for clarity.
data class ExprWithTypeConstraint<T : USort>(
usvm-ts/src/test/kotlin/org/usvm/samples/operators/Less.kt:50
- The
testLessRefsandtestLessUnknowncalls have no property assertions; add expected-result lambdas to verify behavior for reference and unknown comparisons.
discoverProperties<TsTestValue.TsClass, TsTestValue.TsClass, TsTestValue.TsBoolean>(
Lipen
requested changes
Jul 9, 2025
Member
Lipen
left a comment
There was a problem hiding this comment.
Good, but some style changes are necessary! 🦀
Lipen
approved these changes
Jul 11, 2025
3cada77 to
dd67fdc
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
<and>operators extended support