-
Notifications
You must be signed in to change notification settings - Fork 12
Bump CBMC submodule and prettify JSON output #118
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
Bump CBMC submodule and prettify JSON output #118
Conversation
By default, gnatcoll-json will generate 'compact' JSON - i.e. JSON that has no line breaks or indentation. This is tricky to read when debugging. This change tells gnatcoll-json not to compact the JSON output.
The 'Comment' JSON object is only needed in the JSON schema to handle naming of '#' in comment attributes. The final JSON output should contain the comment attributes as part of the 'namedSub' object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Approve assuming CI issues are resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good.
gnat2goto/driver/tree_walk.adb
Outdated
Element_Type_Ent : constant Entity_Id := Get_Array_Component_Type (N); | ||
Element_Type : constant Irep := Do_Type_Reference (Element_Type_Ent); | ||
-- Element_Type_Ent : constant Entity_Id := Get_Array_Component_Type (N); | ||
-- Element_Type : constant Irep := Do_Type_Reference (Element_Type_Ent); | ||
StrLen : constant Integer := | ||
Integer (String_Length (Strval (N))); | ||
String_Length_Expr : constant Irep := New_Irep (I_Constant_Expr); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is this used anywhere?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically not, at the moment - but I think it will be again when we finally get types for string literals sorted out. The gnat compiler is happy enough for the moment though as String_Length_Expr gets passed into Set_Type/Set_Value. Happy to comment out these as well if people prefer.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've commented out this currently unused code too.
Until we get proper types working for string literals, this change allows cbmc to at least assert equality/inequality between string literals. Even if we had proper array types for strings, until we have arrays working, we can't do much with them - so this is a reasonable halfway house for now.
78ade79
to
eeb69f5
Compare
All fine with me. |
Correction : please check the CI results; esp. the regression tests for packages. |
@martin-cs - I'm not seeing any test failures other than things that are XFAILED:
|
This is the CI build from before the submodule bump: https://travis-ci.org/diffblue/gnat2goto/builds/485435139 |
OK; these two: so I will merge. |
No description provided.