-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Evaluate gnatpp #20
Comments
Using Gnatpp, it still will not match the ada-style guide. Using the tool results in the following code style where there is no option to specify how the lines should be aligned: Pre => (for all P in GPIO.Pin => GPIO.Valid (P)) and then (for all P of Pins => GPIO.Configured (P))
and then (for all P of Pins => GPIO.Pin_Mode (P) = GPIO.Port_Out),
Post => (for all P in GPIO.Pin => GPIO.Valid (P))
and then (for all P of Pins => GPIO.Pin_Mode (P) = GPIO.Port_Out)
and then (for all P in GPIO.Pin => GPIO.Pin_Modes (P) = GPIO.Pin_Modes'Old (P))
and then (for all P in GPIO.Pin => GPIO.Pins_Configured (P) = GPIO.Pins_Configured'Old (P)),
Global => (In_Out => GPIO.GPIO_State, Proof_In => GPIO.Shadow_Configuration_State); And as discussed in Issue #19 this style is not desirable as the distinction between the different parts of the contract is not clear enough. |
@isaahzorgh Which version of |
We used GNATPP Community 2019 (20190517). |
Can you please try with Pro 21. IMHO the contract layout would qualify for a bug report. Are there other things where the tool deviates significantly from our desired style? |
For clarification, we used the following commands for
|
After a separate discussion, we discovered that Pro 21 has the same problems. |
Maybe we might take a look into https://github.com/reznikmm/ada-pretty.git. It seems to be for generating code only now but maybe one could create a front end that reads Ada code and uses this project as a back end. |
A tool for automated formatting is desirable. Gnatpp seems to be the only tool available for Ada however it doesn't exactly create our desired code style. We should check if the gnatpp style is viable and how we could adapt it for our needs.
The text was updated successfully, but these errors were encountered: