Simon Friis Vindum
ac6715fb3a
Rust: Avoid mixing up type parameters and associated types in path resolution
2025-07-21 10:07:41 +02:00
Simon Friis Vindum
27e5251285
Rust: Add resolveRootType predicate instead of using resolveType recursively
2025-07-19 13:57:31 +02:00
Simon Friis Vindum
804ffdb682
Rust: Split PathTypeMention into an alias and a non-alias subclass
2025-07-19 13:43:56 +02:00
Simon Friis Vindum
0e8c137a98
Rust: Only include paths as type mentions when they're used as such
...
On databend this changes the number of `PathTypeMention`s from 3,777,464 to 3,330,024. Not a huge difference, but there's also downstream predicates that are reduced as well.
2025-07-19 11:57:13 +02:00
Simon Friis Vindum
620d228ffa
Rust: Factor out getTypeMentionForTypeParameter
2025-07-19 08:41:38 +02:00
Geoffrey White
c2ddf25f11
Merge branch 'main' into constcrypto
2025-07-17 16:13:58 +01:00
Jeroen Ketema
acc66c7b58
Merge pull request #19984 from jketema/jketema/sec-shared
...
Make a proper shared library out of the concept related libraries
2025-07-17 13:25:33 +02:00
Geoffrey White
69064b7f7f
Rust: Update the model.
2025-07-17 12:20:34 +01:00
Geoffrey White
62b7d84638
Rust: Add Sqlx as MaD sinks instead.
2025-07-16 16:36:42 +01:00
Geoffrey White
87deab861f
Rust: Remove Sqlx.qll.
2025-07-16 16:23:50 +01:00
Geoffrey White
6f5e4ef5b9
Merge branch 'main' into sqlx
2025-07-16 15:59:42 +01:00
Simon Friis Vindum
a508089df8
Rust: Improvements to tuple type inference based on PR feedback
2025-07-16 09:38:29 +02:00
Paolo Tranquilli
c5afc65491
Rust: run codegen again
2025-07-15 14:32:13 +02:00
Simon Friis Vindum
7c04c9f969
Rust: Store arity in tuple type parameters
...
Type parameters are required to belong to a single type only. Since we store the arity for tuple types, we need to store the arity in tuple type parameters as well such that we can associate them to the tuple type of the same arity.
2025-07-15 09:50:15 +02:00
Simon Friis Vindum
03a9a1688e
Rust: Add type inference for tuples
2025-07-14 16:37:05 +02:00
Jeroen Ketema
cbde11ddc9
Properly share ConceptsShared.qll
2025-07-14 16:30:45 +02:00
Simon Friis Vindum
72854537f4
Merge branch 'main' into rust/type-inference-rename-expectations
2025-07-14 14:15:59 +02:00
Geoffrey White
918700ff6f
Merge branch 'main' into moresensitive2
2025-07-14 11:58:08 +01:00
Geoffrey White
9f59a3501c
Rust: Revert ipaddr and fingerprint terms (too many FPs).
2025-07-14 11:17:09 +01:00
Jeroen Ketema
f07d8ee493
Remove duplicate copies of CryptoAlgorithms and CryptoAlgorithmNames
2025-07-14 11:39:06 +02:00
Jeroen Ketema
f4ba2e1fd0
Properly share CryptoAlgorithms and CryptoAlgorithmNames
2025-07-14 11:39:00 +02:00
Jeroen Ketema
c582a9ccd6
Remove duplicate copies of SensitiveDataHeuristics
2025-07-14 11:38:52 +02:00
Jeroen Ketema
8b828cecf1
Use shared SensitiveDataHeuristics
2025-07-14 11:38:47 +02:00
Simon Friis Vindum
1f2e0683e7
Rust: Rename type inference test inline expectation tag
2025-07-14 11:02:22 +02:00
Geoffrey White
e20ae48699
Merge branch 'main' into models3b
2025-07-11 17:37:52 +01:00
Tom Hvitved
655b3de6bb
Rust: Remove Resolvable.resolvesAsItem
...
Removes one more use of extractor-based resolution.
2025-07-11 14:41:41 +02:00
Geoffrey White
8f6f9f4359
Add change notes.
2025-07-11 11:54:59 +01:00
Tom Hvitved
edf6c7fbd6
Rust: Handle (Enum::)Variant::<TypeArg> type mentions
2025-07-11 12:44:47 +02:00
Tom Hvitved
ac13f408e4
Add change note
2025-07-11 10:42:50 +02:00
Tom Hvitved
4ab2977358
Rust: Type inference for pattern matching
2025-07-11 10:37:40 +02:00
Tom Hvitved
8cd357a8a0
Rust: Fix type inference for library parameters
2025-07-10 19:40:37 +02:00
Tom Hvitved
1e9520c737
Merge pull request #19995 from hvitved/rust/disambiguate-assoc-function-calls
...
Rust: Disambiguate associated function calls
2025-07-10 19:38:06 +02:00
Geoffrey White
7ba18fa5d0
Merge branch 'main' into models3b
2025-07-10 14:53:09 +01:00
Geoffrey White
0c075abe3f
Rust: Fix merge (I picked the wrong version).
2025-07-10 13:59:10 +01:00
Geoffrey White
a6b4a18d51
Rust: Add negative patterns.
2025-07-10 13:56:14 +01:00
Geoffrey White
8f95e26ed6
Rust: Combine regexs where possible (likely better performance).
2025-07-10 13:56:12 +01:00
Geoffrey White
99e62d66e5
Rust: Add sensitive data patterns.
2025-07-10 13:56:11 +01:00
Geoffrey White
117e330d53
Merge branch 'main' into models1
2025-07-10 13:52:48 +01:00
Geoffrey White
3debd1ada9
Merge pull request #19948 from geoffw0/models5
...
Rust: Update legacy MaD models 4
2025-07-10 13:50:54 +01:00
Tom Hvitved
70476c0e14
Add change note
2025-07-10 14:50:00 +02:00
Tom Hvitved
ebde0bdc47
Rust: Disambiguate calls to associated functions
2025-07-10 13:52:17 +02:00
Tom Hvitved
d4de56c157
Rust: Fix bad join
...
Before
```
Evaluated relational algebra for predicate TypeInference::getRangeType/1#b4219ae9@c15c3f0b with tuple counts:
1 ~0% {1} r1 = CONSTANT(unique string)[".."]
692 ~0% {1} | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1
453 ~0% {1} r2 = JOIN r1 WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0
266 ~1% {1} r3 = JOIN r2 WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
10684422 ~0% {3} | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
10684422 ~0% {3} | REWRITE WITH Out.1 := "core::ops::range::Range"
266 ~0% {2} | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0
363 ~3% {1} r4 = JOIN r1 WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
97 ~2% {1} | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)
3896199 ~0% {3} | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
3896199 ~0% {3} | REWRITE WITH Out.1 := "core::ops::range::RangeTo"
97 ~1% {2} | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0
187 ~0% {1} r5 = r2 AND NOT `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa_0#antijoin_rhs`(FIRST 1)
7511229 ~2% {3} | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
7511229 ~0% {3} | REWRITE WITH Out.1 := "core::ops::range::RangeFrom"
187 ~1% {2} | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0
1 ~0% {1} r6 = CONSTANT(unique string)["..="]
138 ~0% {1} | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1
131 ~0% {1} r7 = JOIN r6 WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0
131 ~0% {1} | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
5261877 ~0% {3} | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
5261877 ~0% {3} | REWRITE WITH Out.1 := "core::ops::range::RangeInclusive"
131 ~3% {2} | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0
138 ~0% {1} r8 = JOIN r6 WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0
7 ~0% {1} | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)
281169 ~0% {3} | JOIN WITH cached_Synth::Synth::TStruct#c298e97c CARTESIAN PRODUCT OUTPUT Rhs.1, _, Lhs.0
281169 ~2% {3} | REWRITE WITH Out.1 := "core::ops::range::RangeToInclusive"
7 ~0% {2} | JOIN WITH `Addressable::Addressable.getCanonicalPath/0#dispred#6044348f#bb` ON FIRST 2 OUTPUT Lhs.2, Lhs.0
688 ~0% {2} r9 = r3 UNION r4 UNION r5 UNION r7 UNION r8
return r9
```
After
```
Evaluated relational algebra for predicate TypeInference::getRangeType/1#b4219ae9@7d06d41t with tuple counts:
1 ~0% {2} r1 = SCAN Stdlib::RangeToStruct#236b6b84 OUTPUT _, In.0
1 ~0% {2} | REWRITE WITH Out.0 := ".."
692 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
363 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
97 ~0% {2} | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)
1 ~0% {2} r2 = SCAN Stdlib::RangeFromStruct#8edcefe7 OUTPUT _, In.0
1 ~0% {2} | REWRITE WITH Out.0 := ".."
692 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
453 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
187 ~0% {2} | AND NOT `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa_0#antijoin_rhs`(FIRST 1)
1 ~0% {2} r3 = SCAN Stdlib::RangeToInclusiveStruct#fe43a433 OUTPUT _, In.0
1 ~0% {2} | REWRITE WITH Out.0 := "..="
138 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
138 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
7 ~0% {2} | AND NOT `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207_0#antijoin_rhs`(FIRST 1)
1 ~0% {2} r4 = SCAN Stdlib::RangeStruct#0fabc810 OUTPUT _, In.0
1 ~0% {2} | REWRITE WITH Out.0 := ".."
692 ~3% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
453 ~4% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
266 ~2% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
1 ~0% {2} r5 = SCAN Stdlib::RangeInclusiveStruct#a869750a OUTPUT _, In.0
1 ~0% {2} | REWRITE WITH Out.0 := "..="
138 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getOperatorName/0#dispred#7c90645c_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
131 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getStart/0#dispred#914c8207` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
131 ~0% {2} | JOIN WITH `RangeExpr::Generated::RangeExpr.getEnd/0#dispred#6c692cfa` ON FIRST 1 OUTPUT Lhs.0, Lhs.1
688 ~7% {2} r6 = r1 UNION r2 UNION r3 UNION r4 UNION r5
return r6
```
2025-07-10 12:34:08 +02:00
Geoffrey White
4dea5eef70
Rust: Fix futures_io models.
2025-07-10 10:41:09 +01:00
Arthur Baars
7c5cdd9a9b
Merge pull request #20001 from github/aibaars/trait-impl-int
...
Rust: fix missing canonical paths for trait impls on builtin numeric types
2025-07-10 10:53:01 +02:00
Geoffrey White
8177b0938d
Merge branch 'main' into models5
2025-07-10 09:41:48 +01:00
Arthur Baars
d20bc98363
Rust: fix missing canonical paths
2025-07-09 21:42:53 +02:00
Geoffrey White
47a4ba33a4
Rust: Fix typo in models (also fixed in another open PR).
2025-07-09 16:00:35 +01:00
Geoffrey White
8d0c14ca4e
Merge branch 'main' into models3b
2025-07-09 15:25:16 +01:00
Geoffrey White
597f678978
Merge branch 'main' into models1
2025-07-09 14:48:32 +01:00
Geoffrey White
7211f4ace3
Update rust/ql/lib/codeql/rust/frameworks/rustcrypto/rustcrypto.model.yml
...
Co-authored-by: Arthur Baars <aibaars@github.com >
2025-07-08 15:01:43 +01:00