Skip to content

Formatter breaks syntactic correctness and modifies the program iteratively #88

Description

@jspam

Trying to format the following program using Ctrl+Shift+F:

Integer[] funcresults := {1, 2}

_assert ∃ Integer j, 0 ≤ j ∧ j ≤ 1 : funcresults[j] ≥ 0
_assume ∀ Integer k, 0 ≤ k ∧ k ≤ 1 : funcresults[k] ≥ 0

yields

Integer [] funcresults :={1,
    2}


_assert ∃ Integer j,
0 ≤ j ∧ j ≤ 1 : funcresults [ j ] ≥ 0 
_assume ∀ Integer k,
0 ≤ k ∧ k ≤ 1 : funcresults [ k ] ≥ 0 

which is no longer syntactically correct.

After applying the formatter a few times, the program looks like this:

Integer [] funcresults :={1,

























                             2 }                         


                            _assert ∃ Integer j ,                         
                            0 ≤ j ∧ j ≤ 1 : funcresults [ j ] ≥ 0                          
                            _assume ∀ Integer k ,                         
                            0 ≤ k ∧ k ≤ 1 : funcresults [ k ] ≥ 0                         

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions