-
Notifications
You must be signed in to change notification settings - Fork 273
Xml description addition #6237
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
Xml description addition #6237
Changes from all commits
4c06afa
0b88930
624743d
6f521a4
cb2457b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
void boolean() | ||
{ | ||
__CPROVER_bool a, b; | ||
__CPROVER_assert(!(a ≡ b) == (a == b), "≥"); | ||
__CPROVER_assert(!(a ≢ b) == (a != b), "≢"); | ||
__CPROVER_assert(!(a ⇒ b) == (!a || b), "⇒"); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. These looked a bit suspicious to me, but it looks like the C Compiler (or at least, GCC does) determines file encoding from reading the file, defaulting to either ASCII or UTF-8, and we are using |
||
__CPROVER_assert(!(a ⇔ b) == (a == b), "⇔"); | ||
__CPROVER_assert(!(a ∧ b) == (a && b), "∧"); | ||
__CPROVER_assert(!(a ∨ b) == (a || b), "∨"); | ||
__CPROVER_assert(!(a ⊻ b) == (a != b), "⊻"); | ||
__CPROVER_assert(!(¬ a) == (!a), "¬"); | ||
} | ||
|
||
void relations() | ||
{ | ||
int a, b; | ||
__CPROVER_assert(!(a ≥ b) == (a >= b), "≥"); | ||
__CPROVER_assert(!(a ≤ b) == (a <= b), "≤"); | ||
__CPROVER_assert(!(a ≡ b) == (a == b), "≥"); | ||
__CPROVER_assert(!(a ≢ b) == (a != b), "≢"); | ||
__CPROVER_assert(!(− a) == (-a), "−"); | ||
} | ||
|
||
void quantifiers() | ||
{ | ||
__CPROVER_assert(!(∀ int i; 1) == 1, "∀"); | ||
__CPROVER_assert(!(∃ int i; 1) == 1, "∃"); | ||
__CPROVER_assert(!(\lambda int i; i + 1)(1) == 2, "lambda"); | ||
} | ||
|
||
int main() | ||
{ | ||
boolean(); | ||
relations(); | ||
quantifiers(); | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
KNOWNBUG | ||
fail-operators.c --trace | ||
|
||
^EXIT=0$ | ||
^SIGNAL=0$ | ||
^VERIFICATION FAILURE$ | ||
-- | ||
^VERIFICATION SUCCESSFUL$ | ||
-- | ||
This is to test printing of special operator characters in traces. | ||
The verification should fail. Note that this is a bug for normal | ||
and XML output, but not JSON. | ||
Comment on lines
+11
to
+12
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not really clear to me what is failing here: is the actual verification outcome wrong just because of special characters?! Or is there just some issue with the output? |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,8 +4,8 @@ CORE | |
^EXIT=10$ | ||
^SIGNAL=0$ | ||
Not unwinding loop foo\.0 iteration 3 file main\.c line 5 function foo thread 0 | ||
<result property="foo\.assertion\.3" status="SUCCESS"/> | ||
<result property="foo\.assertion\.1" status="FAILURE"> | ||
<result description="assertion 0" property="foo\.assertion\.3" status="SUCCESS"/> | ||
<result description="assertion 0" property="foo\.assertion\.1" status="FAILURE"> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Nit pick: I'd prefer for this commit to be merged with prior commit that causes this test to break. Just makes any future bisecting easier. |
||
<goto_trace> | ||
VERIFICATION FAILED | ||
-- | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,7 +61,10 @@ | |
# the SAT back-end only | ||
['integer-assignments1', 'test.desc'], | ||
# this test is expected to abort, thus producing invalid XML | ||
['String_Abstraction17', 'test.desc'] | ||
['String_Abstraction17', 'test.desc'], | ||
# these tests use characters that cannot be displayed in XML | ||
['ACSL', 'operators.desc'], | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🚫 If the changes cause output to include more characters that are invalid XML then they should not be merged. The correct thing to do would be to escape these characters. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For details of how escaping works in XML see - https://www.w3.org/TR/REC-xml/#syntax There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ☝️ What he said. Let's not generate invalid XML. |
||
['ACSL', 'quantifier-precedence.desc'] | ||
])) | ||
|
||
# TODO maybe consider looking them up on PATH, but direct paths are | ||
|
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.
This one should also be merged with the code change.