Skip to content

Formatter breaks syntactic correctness and modifies the program iteratively #88

@jspam

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                         

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions