Simon Friis Vindum
8eed18a8ff
C++: Fix typo
...
Co-authored-by: Jeroen Ketema <93738568+jketema@users.noreply.github.com >
2026-02-20 16:24:19 +01:00
Simon Friis Vindum
fdbd49a843
C++: Improve clarity in comment
...
Co-authored-by: Mathias Vorreiter Pedersen <mathiasvp@github.com >
2026-02-20 13:38:24 +01:00
Simon Friis Vindum
d0681c6ffb
C++: Divide nr of bounds between branches for phi nodes
2026-02-16 14:36:09 +01:00
Simon Friis Vindum
032c7ea034
C++: Include the actual number of lower/upper bounds for added context in expected files
2026-02-16 14:36:08 +01:00
Mathias Vorreiter Pedersen
84be8517bb
Update cpp/ql/lib/semmle/code/cpp/rangeanalysis/SimpleRangeAnalysis.qll
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2026-02-16 09:30:56 +00:00
Mathias Vorreiter Pedersen
2dc91a56eb
C++: Lower the treshold for max number of bounds to 2^29.
2026-02-12 09:44:20 +00:00
Mathias Vorreiter Pedersen
a4dd4f91d4
C++: Also compute type bounds for accesses of an enum type.
2026-02-12 09:44:14 +00:00
Simon Friis Vindum
3a135888c7
C++: Improve bounds from inequalities on integers
2026-01-09 10:26:36 +01:00
Simon Friis Vindum
f5ddb1d51d
C++: Remove safeFloor in simple range analysis
2026-01-07 12:49:09 +01:00
Simon Friis Vindum
792ac7a772
C++: Fix typo
...
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com >
2025-11-14 12:59:41 +01:00
Simon Friis Vindum
5da73f3232
C++: Make sure that nrOfBoundsNEPhi is functional
2025-11-14 12:26:23 +01:00
Simon Friis Vindum
69e70d7cbc
Reapply "Merge pull request #20645 from paldepind/cpp/range-analysis-measure"
...
This reverts commit e7c029ae7d .
2025-11-14 12:26:21 +01:00
Enrico Steffinlongo
e7c029ae7d
Revert "Merge pull request #20645 from paldepind/cpp/range-analysis-measure"
...
This reverts commit a0a6f288b5 , reversing
changes made to 32f21d6d49 .
2025-11-07 16:49:47 +00:00
Simon Friis Vindum
d1ea1af945
C++: Make small trivial tweaks
2025-10-24 16:16:57 +02:00
Simon Friis Vindum
5709964fbf
C++: Simplify boundFromGuard
...
The last disjunct in `boundFromGuard` is moved into `linearBoundFromGuard`. This avoids repeating the calculation for `boundValue`.
`getBounds` and `getExprTypeBounds` are turned into predicates with result. Their middle argument was the "output" which was confusing.
2025-10-24 16:12:05 +02:00
Simon Friis Vindum
383e6a44aa
C++: Use or instead of if
...
The proposition in the true branch implied the condition, so `or` is more appropriate. Also eliminated an existentially quantified variable.
2025-10-24 16:08:35 +02:00
Simon Friis Vindum
17e0dec08a
C++: Add toString for RelationStrictness
...
This helps for debugging.
2025-10-24 16:01:38 +02:00
Simon Friis Vindum
0badcfd663
C++: Address review comments
2025-10-21 09:47:58 +02:00
Simon Friis Vindum
979b05cc1a
C++: Apply suggested fixes from review
2025-10-17 09:50:36 +02:00
Simon Friis Vindum
9502d83f2c
C++: Add debug predicates
2025-10-16 15:05:48 +02:00
Simon Friis Vindum
c1f0f3da96
C++: Handle guard phi nodes differently
2025-10-16 15:05:46 +02:00
Simon Friis Vindum
8896a7210b
C++: Add number of bounds test to simple range analysis
2025-10-16 15:05:44 +02:00
Simon Friis Vindum
7eacd87343
C++: Apply widening based on number of bounds measure
2025-10-16 15:05:42 +02:00
Simon Friis Vindum
8aaf9f696a
C++: Factor out widening of bounds
2025-10-15 11:11:45 +02:00
Mathias Vorreiter Pedersen
d8f34dba17
C++: Do not use the deprecated predicate in queries.
2025-09-18 12:16:23 +01:00
Michael Nebel
83d53baf82
C++: Fix some Ql4Ql violations.
2025-09-03 08:19:18 +02:00
Jeroen Ketema
b4caba7c0e
C++: Merge the location tables
2025-06-27 14:42:08 +02:00
Anders Schack-Mulligen
62000319fe
Rangeanalysis: Simplify Guards integration.
2025-05-23 13:39:53 +02:00
Anders Schack-Mulligen
db01828717
Java: Deprecate redundant basic block predicates.
2025-05-21 09:01:46 +02:00
Mathias Vorreiter Pedersen
9d2eb3d9b8
C++: Filter out instructions with incomplete SSA in range analysis.
2025-05-13 10:54:22 +01:00
Simon Friis Vindum
7196892867
Merge pull request #18461 from paldepind/cpp-conditional-expr-range-analysis
...
C++: Only propagate smallest/largest range bound in conditional expressions
2025-01-14 12:31:21 +01:00
Geoffrey White
96008469d4
C++: QLDoc correction.
2025-01-14 09:19:50 +00:00
Simon Friis Vindum
dcdc43933b
C++: Minor refactor and documentation tweak to simple range analysis
2025-01-13 12:15:09 +01:00
Simon Friis Vindum
0c9ee4d029
C++: Only propagate smallest/largest bound in conditional expressions
2025-01-13 12:11:45 +01:00
yoff
21e7a0e828
Merge branch 'main' into shared/locations-in-range-analysis
2025-01-08 16:40:59 +01:00
Mathias Vorreiter Pedersen
4ffe70dd3b
C++: Respond to review comments.
2024-12-18 11:26:41 +00:00
Mathias Vorreiter Pedersen
0b2b341283
C++: Work around suboptimal codegen for recursive 'forex'.
2024-12-17 23:58:57 +00:00
Rasmus Lerchedahl Petersen
065f3d1d7a
cpp: locations in range analysis
2024-11-15 14:10:51 +01:00
Mathias Vorreiter Pedersen
f7392d6498
C++: Range analysis of 'getc'.
2024-10-08 10:08:13 +01:00
Mathias Vorreiter Pedersen
f5e1e49761
C++: Fix QLDoc on 'cmpWithLinearBound' as a response to #15248 .
2024-01-09 10:07:22 +00:00
Anders Schack-Mulligen
6b178fb64a
Rangeanalysis: Preparatory refactor for bounds sharing.
2023-12-11 14:07:10 +01:00
Anders Schack-Mulligen
bf6cfd3bef
Rangeanalysis: Simplify api.
2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
30aefabb2a
Rangeanalysis: Rename predicate.
2023-11-13 10:35:44 +01:00
Anders Schack-Mulligen
27e6173bb7
C++: Remove SemSsaExplicitUpdate.getSourceExpr.
2023-11-13 10:35:43 +01:00
Anders Schack-Mulligen
3a73faf061
Rangeanalysis: Remove unused getAlternateType predicates.
2023-11-13 10:35:43 +01:00
Anders Schack-Mulligen
657c29f409
Java/C++: Share valueFlowStep.
2023-11-09 20:24:28 +01:00
Anders Schack-Mulligen
b8e7e1d15e
Java/C++: Share ssaUpdateStep.
2023-11-09 16:02:44 +01:00
Anders Schack-Mulligen
daffae020b
Java/C++: Share eqFlowCond.
2023-11-09 16:00:46 +01:00
Anders Schack-Mulligen
abe0bb70ac
C++: Fix operand ssa variables for range analysis.
2023-11-09 12:26:53 +01:00
Anders Schack-Mulligen
1f4cd74a1c
Java/C++: Move SsaReadPosition to shared qlpack.
2023-11-08 12:11:17 +01:00