Skip to content

Incorrect objects transformation inside of TsBinaryOperator #281

Open

Description

@CaelmBleidd

Current state (2026-10-14)

Audited against usvm main at 19866c959d.

Mixed/fake runtime values now have dedicated packets and storage helpers, but the reference-to-primitive/coercion gap is not completed by those representation changes.

Remaining acceptance boundary

Replace the remaining unsupported/incorrect reference operand branches with sound operation-specific coercion. Preserve feasible alternatives and validate primitive/nullish/object mixtures; coordinate with #280/#430.

Original report and acceptance context, retained for traceability

Some binary operations are supported only for simple cases. For example, if we have two fakeObjects (such objects that can represent values of multiple sorts at the same time), we should implement application of a binary operator for reference OP bool, etc.

In the code they are marked as 'fake(ref)' == 'bool'. Since it is not yet implemented, we should remove such combinations from the processing. Previously it was made using assert instruction which it incorrect, since it removes the possibility for the fake object to represent some types in all the following branches.

Therefore, I've replaced it with temporary incorrect implementation:

    conjuncts += ExprWithTypeConstraint(
        constraint = lhsType.refTypeExpr,
        expr = mkFalse() // TODO mistake, we should coerce the ref object
    )

The correct implementation is required.

Activity

  1. self-assigned this
    on May 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions