Skip to content

Type of some division expressions is ambiguous and the default interpretation is bad #745

Closed
@marcoeilers

Description

@marcoeilers

Gobra frequently generates permission amounts like 1 / 4000 / 2 for SCION code by @jcp19. These are intended to be a fractional permission 1/4000 divided by two, i.e., the permission value 1/8000. Instead, they are apparently parsed as an integer division 1 \ 4000, which is zero, which is then the numerator in the fractional permission 0 / 2. This is bad because a) it's not the intended meaning, and b) there is no way to pretty-print it so that the parser returns the intended meaning.

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