Conversation
usvm-ts/src/main/kotlin/org/usvm/machine/interpreter/TsInterpreter.kt
Dismissed
Show dismissed
Hide dismissed
There was a problem hiding this comment.
Pull Request Overview
This PR adds new TypeScript operators and refactors existing operator implementations to improve test structure and maintainability. The changes primarily focus on expanding operator coverage, improving naming consistency, and restructuring test organization.
Key changes include:
- Addition of new operators: VoidOperator, UnaryPlus, NullishCoalescing, InOperator, DeleteOperator, and Bitwise operators
- Refactoring of existing operator tests to use more consistent naming patterns and utility functions
- Movement of Truthy and Strings classes from root samples to lang package
- Introduction of utility functions for test comparisons and DSL method building
Reviewed Changes
Copilot reviewed 82 out of 92 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| VoidOperator.ts | New operator test covering void operator behavior |
| UnaryPlus.ts | New operator test for unary plus conversion |
| NullishCoalescing.ts | New operator test for nullish coalescing (??) |
| InOperator.ts | New operator test for 'in' operator |
| DeleteOperator.ts | New operator test for delete operator |
| Bitwise.ts | New operator tests for bitwise operations |
| Remainder.ts | Refactored remainder operator tests with cleaner structure |
| Or.ts | Simplified logical OR operator tests |
| Neg.ts | Enhanced negation operator tests with additional cases |
| And.ts | Comprehensive refactor with manual DSL method building |
| Equality.ts | Expanded equality tests with new comparison cases |
| TypeOf.ts | Moved and renamed from Strings to proper location |
| Less.ts | Minor formatting and utility function updates |
| Util.kt | New utility functions for number comparisons |
| TsMethodTestRunner.kt | Enhanced test runner with better method resolution |
| Multiple test files | Consistent adoption of new utility functions and naming patterns |
Comments suppressed due to low confidence (1)
usvm-ts/src/test/kotlin/org/usvm/samples/operators/And.kt:144
- [nitpick] This TODO comment appears multiple times in the file. Consider either implementing the missing falsy value handling or creating a more specific issue reference to track this work.
ret(const(5))
CaelmBleidd
requested changes
Aug 7, 2025
usvm-ts/src/main/kotlin/org/usvm/machine/expr/TsExprResolver.kt
Outdated
Show resolved
Hide resolved
usvm-ts/src/main/kotlin/org/usvm/machine/expr/TsExprResolver.kt
Outdated
Show resolved
Hide resolved
usvm-ts/src/main/kotlin/org/usvm/machine/expr/TsExprResolver.kt
Outdated
Show resolved
Hide resolved
Member
Author
|
Rebased and fixed according to review comments. |
CaelmBleidd
approved these changes
Aug 13, 2025
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.
This PR adds new operators and refactor existing ones.