vehicle-lang / vehicle

A toolkit for enforcing logical specifications on neural networks
https://vehicle-lang.readthedocs.io/
Other
81 stars 7 forks source link

BNFC printing bug with layout braces #39

Open MatthewDaggitt opened 3 years ago

MatthewDaggitt commented 3 years ago

Switching back to the BNFC printing code has revealed that BNFC does not determine between layout braces and non-layout braces. Printing anything with implicit arguments results in the following mess:

(Tensor Real) ((([((5 {
                      ?2
                    }
                    ) {{ ?3 }})] {
                      ?5
                    }
                    ) {
                      ?4
                    }
                    ) {{ ?6 }});

instead of

(Tensor Real) ((([((5 {?2}) {{ ?3 }})] {?5}) {?4}) {{ ?6 }});

TODO: submit an upstream issue to BNFC

MatthewDaggitt commented 2 years ago

Closed with 0fa728d

MatthewDaggitt commented 2 years ago

Not fixed. Apparently this BNFC issue is independent of having layout keywords or not.