Skip to content

goto_check treats ID_and / and_exprt in a non-commutative way #6423

@martin-cs

Description

@martin-cs

While reviewing #6399 I wondered what is documented about it.

/// produce canonical ordering for associative and commutative binary operators

suggests that ID_and it is associative and commutative. However the handling of logical operations in goto_check is asymmetric:

/// Check a logical operation: check each operand in separation while

void goto_checkt::check_rec_logical_op(const exprt &expr, guardt &guard)

These were refactoring made in https://github.com/diffblue/cbmc/pull/4611/files .

This seems a bit risky as a simplify in a pass before goto_check (for example in goto-analyzer --simplify) can alter / break the conditions that are generated.

Metadata

Metadata

Assignees

No one assigned

    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