Jonas Jensen
b1c0e6f626
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-mul-constant
2020-08-20 08:20:31 +02:00
Jonas Jensen
21d16d13fc
Merge remote-tracking branch 'upstream/main' into SimpleRangeAnalysis-AssignMulExpr
2020-08-19 14:50:40 +02:00
Jonas Jensen
83884c0dc5
Merge pull request #4089 from jbj/jbj/printFloat-precise
...
C++: Accept float.toString changes in tests
2020-08-19 12:58:27 +02:00
Jonas Jensen
b316644ac2
C++: SimpleRangeAnalysis for *= by constant
2020-08-18 15:07:20 +02:00
Jonas Jensen
b6b72729f6
C++: SimpleRangeAnalysis for MulExpr by constant
2020-08-18 11:37:59 +02:00
Jonas Jensen
2e2f99cabf
C++: Correctly classify the MulExpr rounding bugs
2020-08-18 10:39:57 +02:00
Jonas Jensen
e03fe81ce7
C++: Accept float.toString changes in tests
2020-08-17 15:07:00 +02:00
Jonas Jensen
fe72b559d3
C++: Range analysis for unsigned AssignMulExpr
...
This is essentially a copy-paste job of `AssignAddExpr`, together with
the math from the `UnsignedMulExpr` support.
2020-08-14 14:19:54 +02:00
Jonas Jensen
f90d779122
C++: Fix SimpleRangeAnalysis for AssignOperation
...
The range analysis wasn't producing useful bounds for `AssignOperation`s
(`+=`, `-=`) unless their RHS involved a variable. This is because a
shortcut was made in the `analyzableDef` predicate, which used to
specify that an analyzable definition was one for which we'd specified
the dependencies. But we can't distinguish between having _no
dependencies_ and having _no specification of the dependencies_.
The fix is to be more explicit about which definitions are analyzable.
To avoid too much repetition I'm still calling out to `analyzableExpr`
in the new code.
2020-08-14 14:15:58 +02:00
Jonas Jensen
93d8d8eb1d
C++: Demonstrate range analysis MulExpr bugs
...
Unless these issues can be reproduced in far less contrived code, I
don't think they will cause problems in practice.
2020-08-12 12:10:23 +02:00
Jonas Jensen
1ee96a4b4f
C++: SimpleRangeAnalysis: unsigned multiplication
2020-08-12 10:03:04 +02:00
Jonas Jensen
2ea25b9d90
C++: Precise printing of integer bounds
...
The pretty-printing of a QL `float` didn't include enough digits to tell
whether a large number had accurate bounds. The `toString` value of a
float appears to be more precise.
2020-08-11 16:48:01 +02:00
Mathias Vorreiter Pedersen
174b30461a
C++: Fix syntax error in testfile
2020-07-14 19:47:21 +02:00
Mathias Vorreiter Pedersen
834ad92453
C++: Add test cases for unsigned multiplication and fix missing return value in existing tests
2020-07-14 16:57:47 +02:00
Geoffrey White
574a1d8501
Merge pull request #1037 from kevinbackhouse/RangeAnalysisAssignAddOverflow
...
Better overflow detection for AssignAdd/AssignSub
2019-05-29 09:54:06 +01:00
Geoffrey White
170691b467
CPP: Comment as suggested.
2019-05-24 16:16:45 +01:00
Geoffrey White
d2f386ccb7
CPP: Effect of changes on tests.
2019-05-01 15:56:44 +01:00
Geoffrey White
19e6b238b7
CPP: Add test cases.
2019-05-01 15:43:06 +01:00
Jonas Jensen
b827e7a1ea
C++: Fix use-after-cast bug in SimpleRangeAnalysis
...
Like everywhere else in the range analysis, operands to comparison
operators must be considered in their fully-converted form.
2019-03-27 10:48:34 +01:00
Jonas Jensen
ad61b4f55e
C++: Add test to demonstrate use-after-cast bugs
2019-03-27 10:48:34 +01:00
Robert Marsh
a06a20dbab
C++: move SimpleRangeAnalysis tests
2019-01-08 09:34:23 -08:00