Commit Graph

1848 Commits

Author SHA1 Message Date
Geoffrey White
b4b444de48 Merge pull request #20746 from geoffw0/mv3
Rust: Clean up some models
2025-11-06 10:07:43 +00:00
Tom Hvitved
f8cde74eac Merge pull request #20736 from github/copilot/add-constaccess-class
Rust: Add ConstAccess class with getConst() predicate
2025-11-06 10:25:06 +01:00
Geoffrey White
1ce787a185 Merge branch 'main' into mv3 2025-11-06 09:23:01 +00:00
Tom Hvitved
c80301d58a Rust: Handle variables introduced in if-let guards 2025-11-05 19:46:54 +01:00
Geoffrey White
1e7acc5e1a Merge branch 'main' into copilot/add-secure-cookie-test-cases 2025-11-05 17:53:02 +00:00
Geoffrey White
62e77687ca Rust: Move async_std::io models. 2025-11-05 15:09:39 +00:00
Geoffrey White
e78018769b Rust: Add the model file (missed on previous commits). 2025-11-05 12:50:26 +00:00
Geoffrey White
6e35cb9748 Rust: Change note. 2025-11-05 11:36:04 +00:00
Michael B. Gale
046db0419f Merge pull request #20758 from github/post-release-prep/codeql-cli-2.23.4
Post-release preparation for codeql-cli-2.23.4
2025-11-05 10:45:51 +00:00
github-actions[bot]
4014df9a6e Post-release preparation for codeql-cli-2.23.4 2025-11-04 17:57:52 +00:00
Tom Hvitved
50552da4d8 Rust: Handle unqualified UseTrees in path resolution 2025-11-04 13:57:33 +01:00
Geoffrey White
077bcf6b92 Merge pull request #20740 from geoffw0/rustbarriers
Rust: Add numeric type barriers for three queries
2025-11-04 10:08:46 +00:00
Geoffrey White
687cc6f544 Rust: Re-arrange models slightly. 2025-11-03 14:54:13 +00:00
github-actions[bot]
64fcdd1f2f Release preparation for version 2.23.4 2025-11-03 14:52:23 +00:00
Geoffrey White
5af83787d8 Rust: Move a few more models. 2025-11-03 13:35:27 +00:00
Geoffrey White
144fa7dd39 Rust: Deduplicate some models. 2025-11-03 13:33:37 +00:00
Geoffrey White
8a2c117a0e Rust: Move models between core.model.yml and alloc.model.yml. 2025-11-03 13:31:25 +00:00
Geoffrey White
1b435ed07d Rust: Move another model file into subdirectory. 2025-11-03 13:26:37 +00:00
Geoffrey White
4b3a1c5abb Rust: Move a model file into subdirectory. 2025-11-03 13:24:28 +00:00
Tom Hvitved
0ca62ca5b6 Fix copilot implementation 2025-11-03 14:15:16 +01:00
Geoffrey White
c381153125 Apply suggestions from code review
Co-authored-by: Tom Hvitved <hvitved@github.com>
2025-11-03 09:38:43 +00:00
Geoffrey White
8548c167be Rust: Autoformat. 2025-10-31 17:30:04 +00:00
Geoffrey White
33efed92b8 Rust: Add integral type barrier for Regex injection. 2025-10-31 16:37:10 +00:00
Geoffrey White
2d4369ac6c Rust: Add numeric type barrier for log injection. 2025-10-31 16:32:32 +00:00
Geoffrey White
52397f0ce0 Rust: Add numeric type barrier for SQL injection. 2025-10-31 16:25:44 +00:00
Geoffrey White
47019f7f24 Rust: Define NumericType, IntegralType and FloatingPointType in Builtins.qll. 2025-10-31 16:24:39 +00:00
copilot-swe-agent[bot]
ad51b61a2b Fix trailing whitespace in documentation comments
Co-authored-by: hvitved <3667920+hvitved@users.noreply.github.com>
2025-10-31 13:07:04 +00:00
copilot-swe-agent[bot]
6011ecbef4 Add ConstAccess class with getConst() predicate and test cases
Co-authored-by: hvitved <3667920+hvitved@users.noreply.github.com>
2025-10-31 13:01:25 +00:00
Tom Hvitved
95e60ad4a7 Merge pull request #20705 from hvitved/rust/type-inference-unit
Rust: Infer more `()` types
2025-10-31 13:43:10 +01:00
Geoffrey White
d8fff44048 Merge pull request #20712 from geoffw0/macrometric2
Rust: Exclude skipped files in rust/diagnostic/database-quality
2025-10-31 11:25:41 +00:00
Tom Hvitved
f672f6b731 Merge pull request #20727 from hvitved/rust/variable-overlap-fix
Rust: Fix variable access overlap
2025-10-31 11:07:30 +01:00
Tom Hvitved
6d64800e85 Rust: Move variable consistency check into AstConsistency.qll 2025-10-31 10:42:51 +01:00
Tom Hvitved
7d5664f2a8 Address review comment 2025-10-31 09:43:18 +01:00
Tom Hvitved
5a2467414c Rust: Fix variable access overlap 2025-10-30 21:52:36 +01:00
Tom Hvitved
3d7b60a439 Rust: Add variable consistency query 2025-10-30 21:40:37 +01:00
Simon Friis Vindum
c648aa69b8 Rust: Rename predicates 2025-10-30 14:35:17 +01:00
Tom Hvitved
cca458c2ac Rust: Address review comments and handle ! types in type inference 2025-10-30 13:30:42 +01:00
Geoffrey White
0e7d410163 Merge branch 'main' into macrometric2 2025-10-30 10:19:11 +00:00
Simon Friis Vindum
b189f1fe3f Rust: Refactor using shared constraint satisfaction 2025-10-30 08:18:12 +01:00
Tom Hvitved
bc53fee1c5 Rust: Infer more () types 2025-10-29 15:43:00 +01:00
Tom Hvitved
f395162afd Rust: More type inference tests 2025-10-29 15:41:23 +01:00
Tom Hvitved
e5f1238e26 Merge pull request #20707 from paldepind/rust/ti-self-trait
Rust: Improve handling of `Self` type parameter
2025-10-29 13:17:14 +01:00
Geoffrey White
558ca74e9c Merge pull request #20702 from geoffw0/gen2
Rust: Generalize more models
2025-10-29 11:32:00 +00:00
Simon Friis Vindum
ce8cffc331 Rust: Address comments 2025-10-29 11:18:02 +01:00
Tom Hvitved
b7293541cd Merge pull request #20704 from hvitved/rust/fix-bad-joins
Rust: Fix two bad joins
2025-10-29 11:11:54 +01:00
Simon Friis Vindum
9022f996e8 Rust: Improve handling of occurrences of the Self type parameter 2025-10-29 10:41:46 +01:00
Geoffrey White
6f1eca8be1 Rust: Make the QLDoc for fromSource a bit more precise. 2025-10-28 16:22:25 +00:00
Tom Hvitved
104ba0e291 Rust: Fix bad join
Before
```
Pipeline standard for TypeInference::MethodCallMatching::AccessConstraint::RelevantAccess.getTypeAt/1#dispred#e8abf748@ada3a07w was evaluated in 801 iterations totaling 31ms (delta sizes total: 182871).
           50151   ~1%    {4} r1 = SCAN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev_delta OUTPUT In.0, In.2, In.3, In.4
           39574   ~0%    {5}    | JOIN WITH `TypeInference::MethodCallMatchingInput::Access.getInferredNonSelfType/2#dispred#b181cb0a#prev` ON FIRST 2 OUTPUT Lhs.3, Rhs.3, _, Lhs.2, Rhs.2
                          {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
           36996   ~0%    {3}    | SCAN OUTPUT In.0, In.2, In.1

        36102333   ~0%    {4} r2 = SCAN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev OUTPUT In.0, In.2, In.3, In.4
           90175   ~1%    {5}    | JOIN WITH `TypeInference::MethodCallMatchingInput::Access.getInferredNonSelfType/2#dispred#b181cb0a#prev_delta` ON FIRST 2 OUTPUT Lhs.3, Rhs.3, _, Lhs.2, Rhs.2
                          {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
           65014   ~1%    {3}    | SCAN OUTPUT In.0, In.2, In.1

           50151   ~1%    {5} r3 = SCAN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev_delta OUTPUT In.2, In.0, In.1, In.3, In.4
           24208   ~1%    {4}    | JOIN WITH `FunctionType::FunctionPosition.isSelf/0#dispred#9e84d302` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4
           95022   ~0%    {9}    | JOIN WITH `TypeInference::MethodCallMatchingInput::Access.getInferredSelfType/3#dispred#45b2f893#prev` ON FIRST 1 OUTPUT Lhs.2, Lhs.3, Rhs.2, Rhs.3, Rhs.4, _, Rhs.1, Lhs.1, _
                          {6}    | REWRITE WITH Tmp.5 := ";", Tmp.5 := (In.6 ++ Tmp.5), Tmp.8 := "", Out.5 := InverseAppend(Tmp.5,Tmp.8,In.7) KEEPING 6
           93919   ~1%    {7}    | SCAN OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, _
                          {6}    | REWRITE WITH NOT [NOT [Tmp.6 := "borrow", TEST InOut.5 = Tmp.6, Tmp.6 := true, TEST InOut.2 = Tmp.6], NOT [Tmp.6 := "", TEST InOut.5 = Tmp.6, Tmp.6 := true, TEST InOut.2 != Tmp.6]] KEEPING 6
           81298   ~1%    {5}    | SCAN OUTPUT In.1, In.4, _, In.0, In.3
                          {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
           64110   ~1%    {3}    | SCAN OUTPUT In.0, In.2, In.1

        36102333   ~0%    {5} r4 = SCAN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev OUTPUT In.2, In.0, In.1, In.3, In.4
        17473531   ~0%    {4}    | JOIN WITH `FunctionType::FunctionPosition.isSelf/0#dispred#9e84d302` ON FIRST 1 OUTPUT Lhs.1, Lhs.2, Lhs.3, Lhs.4
           47409   ~1%    {9}    | JOIN WITH `TypeInference::MethodCallMatchingInput::Access.getInferredSelfType/3#dispred#45b2f893#prev_delta` ON FIRST 1 OUTPUT Lhs.2, Lhs.3, Rhs.2, Rhs.3, Rhs.4, _, Rhs.1, Lhs.1, _
                          {6}    | REWRITE WITH Tmp.5 := ";", Tmp.5 := (In.6 ++ Tmp.5), Tmp.8 := "", Out.5 := InverseAppend(Tmp.5,Tmp.8,In.7) KEEPING 6
           29885   ~0%    {7}    | SCAN OUTPUT In.0, In.1, In.2, In.3, In.4, In.5, _
                          {6}    | REWRITE WITH NOT [NOT [Tmp.6 := "borrow", TEST InOut.5 = Tmp.6, Tmp.6 := true, TEST InOut.2 = Tmp.6], NOT [Tmp.6 := "", TEST InOut.5 = Tmp.6, Tmp.6 := true, TEST InOut.2 != Tmp.6]] KEEPING 6
           16952   ~1%    {5}    | SCAN OUTPUT In.1, In.4, _, In.0, In.3
                          {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
           16829   ~0%    {3}    | SCAN OUTPUT In.0, In.2, In.1

          182949   ~1%    {3} r5 = r1 UNION r2 UNION r3 UNION r4
          182949   ~1%    {3}    | AND NOT `TypeInference::MethodCallMatching::AccessConstraint::RelevantAccess.getTypeAt/1#dispred#e8abf748#prev`(FIRST 3)
                          return r5
```

After
```
Pipeline standard for TypeInference::MethodCallMatching::AccessConstraint::RelevantAccess.getTypeAt/1#dispred#e8abf748@31ee547w was evaluated in 801 iterations totaling 19ms (delta sizes total: 182946).
         81298   ~0%    {5} r1 = JOIN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev_delta WITH `TypeInference::MethodCallMatchingInput::Access.getInferredSelfType/3#dispred#45b2f893#prev` ON FIRST 3 OUTPUT Lhs.4, Rhs.4, _, Lhs.3, Rhs.3
                        {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
         64110   ~1%    {3}    | SCAN OUTPUT In.0, In.2, In.1

         39574   ~0%    {5} r2 = JOIN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev_delta WITH `TypeInference::MethodCallMatchingInput::Access.getInferredNonSelfType/2#dispred#b181cb0a#prev` ON FIRST 2 OUTPUT Lhs.4, Rhs.3, _, Lhs.3, Rhs.2
                        {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
         36996   ~0%    {3}    | SCAN OUTPUT In.0, In.2, In.1

         16952   ~0%    {5} r3 = JOIN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev WITH `TypeInference::MethodCallMatchingInput::Access.getInferredSelfType/3#dispred#45b2f893#prev_delta` ON FIRST 3 OUTPUT Lhs.4, Rhs.4, _, Lhs.3, Rhs.3
                        {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
         16829   ~0%    {3}    | SCAN OUTPUT In.0, In.2, In.1

         90175   ~0%    {5} r4 = JOIN TypeInference::MethodCallMatching::AccessConstraint::MkRelevantAccess#7a01048b#prev WITH `TypeInference::MethodCallMatchingInput::Access.getInferredNonSelfType/2#dispred#b181cb0a#prev_delta` ON FIRST 2 OUTPUT Lhs.4, Rhs.3, _, Lhs.3, Rhs.2
                        {3}    | REWRITE WITH Tmp.2 := "", Out.2 := InverseAppend(In.3,Tmp.2,In.4) KEEPING 3
         65014   ~0%    {3}    | SCAN OUTPUT In.0, In.2, In.1

        182949   ~1%    {3} r5 = r1 UNION r2 UNION r3 UNION r4
        182949   ~1%    {3}    | AND NOT `TypeInference::MethodCallMatching::AccessConstraint::RelevantAccess.getTypeAt/1#dispred#e8abf748#prev`(FIRST 3)
                        return r5
```
2025-10-28 13:09:32 +01:00
Tom Hvitved
409f7fb743 Address review comments 2025-10-28 11:48:45 +01:00
Geoffrey White
abcc1712d5 Rust: Remove more redundant models. 2025-10-28 09:26:11 +00:00