Commit Graph

13518 Commits

Author SHA1 Message Date
Jeroen Ketema
86f425d2fc C++: Fix join-order problem after stats file update
Before the fix:
```
Pipeline standard for AVRule79::exprReleases/3#e849cdd3@f2995ebb was evaluated in 5 iterations totaling 168745ms (delta sizes total: 12583).
              85855    ~0%    {2} r1 = SCAN `AVRule79::exprReleases/3#e849cdd3#prev_delta` OUTPUT In.1, In.2

              85855    ~0%    {2} r2 = JOIN r1 WITH `AVRule79::exprOrDereference/1#c20425a1_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
             115767    ~6%    {2}    | JOIN WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
             333369   ~18%    {2}    | JOIN WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
             266264  ~204%    {2}    | JOIN WITH `Access::Access.getTarget/0#dispred#cf25c8aa` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
              16379   ~21%    {3}    | JOIN WITH `Function::Function.getParameter/1#dispred#200dcf26_201#join_rhs` ON FIRST 1 OUTPUT Rhs.2, Lhs.1, Rhs.1

        13117819221    ~0%    {4} r3 = JOIN r2 WITH `Call::Call.getArgument/1#dispred#ada436ba_102#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1, Rhs.2
              10477    ~3%    {3}    | JOIN WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5` ON FIRST 2 OUTPUT Lhs.0, Lhs.3, Lhs.2

        13117819221    ~1%    {4} r4 = JOIN r2 WITH `Call::Call.getArgument/1#dispred#ada436ba_102#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2, Rhs.2
        13022632157    ~1%    {5}    | JOIN WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5` ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1, Lhs.0, Lhs.3
               3720   ~70%    {3}    | JOIN WITH `#MemberFunction::MemberFunction.getAnOverridingFunction/0#dispred#a6e65b9ePlus` ON FIRST 2 OUTPUT Lhs.3, Lhs.4, Lhs.2

             115767    ~6%    {2} r5 = JOIN r1 WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
             333367   ~20%    {3}    | JOIN WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf` ON FIRST 1 OUTPUT Rhs.1, _, Lhs.1
             333367   ~12%    {3}    | REWRITE WITH Out.1 := 85
                  4    ~0%    {2}    | JOIN WITH exprs ON FIRST 2 OUTPUT Lhs.0, Lhs.2
                  4  ~100%    {2}    | JOIN WITH `Expr::Expr.getEnclosingFunction/0#dispred#3960f06c` ON FIRST 1 OUTPUT Rhs.1, Lhs.1

                  0    ~0%    {2} r6 = JOIN r5 WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1

                  0    ~0%    {2} r7 = JOIN r5 WITH `#MemberFunction::MemberFunction.getAnOverridingFunction/0#dispred#a6e65b9ePlus#swapped` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
                  0    ~0%    {2}    | JOIN WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1

                  0    ~0%    {2} r8 = r6 UNION r7
                  0    ~0%    {3}    | JOIN WITH `Call::Call.getQualifier/0#dispred#7d175544` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
                  0    ~0%    {3}    | JOIN WITH `AVRule79::exprOrDereference/1#c20425a1_10#join_rhs` ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1

              14197   ~18%    {3} r9 = r3 UNION r4 UNION r8
              12615    ~3%    {3}    | AND NOT `AVRule79::exprReleases/3#e849cdd3#prev`(FIRST 3)
                              return r9
```

After:
```
Pipeline standard for AVRule79::exprReleases/3#e849cdd3@13dead04 was evaluated in 5 iterations totaling 68ms (delta sizes total: 12551).
         85855    ~0%    {2} r1 = SCAN `AVRule79::exprReleases/3#e849cdd3#prev_delta` OUTPUT In.1, In.2

         85855    ~0%    {2} r2 = JOIN r1 WITH `AVRule79::exprOrDereference/1#c20425a1_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        115767    ~6%    {2}    | JOIN WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        333443   ~18%    {2}    | JOIN WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        265872  ~204%    {2}    | JOIN WITH `Access::Access.getTarget/0#dispred#cf25c8aa` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
         16399   ~27%    {3}    | JOIN WITH `Function::Function.getParameter/1#dispred#200dcf26_201#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Rhs.2

         10489    ~1%    {3} r3 = JOIN r2 WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1

          1558   ~80%    {3} r4 = JOIN r2 WITH `#MemberFunction::MemberFunction.getAnOverridingFunction/0#dispred#a6e65b9ePlus#swapped` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.2
          2196    ~7%    {3}    | JOIN WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.2, Lhs.1

         12685    ~3%    {3} r5 = r3 UNION r4
         12581    ~3%    {3}    | JOIN WITH `Call::Call.getArgument/1#dispred#ada436ba` ON FIRST 2 OUTPUT Lhs.0, Rhs.2, Lhs.2

        115767    ~6%    {2} r6 = JOIN r1 WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
        333443   ~20%    {3}    | JOIN WITH `ASTValueNumbering::GVN.getAnExpr/0#dispred#a14f45bf` ON FIRST 1 OUTPUT Rhs.1, _, Lhs.1
        333443   ~12%    {3}    | REWRITE WITH Out.1 := 85
             4    ~0%    {2}    | JOIN WITH exprs ON FIRST 2 OUTPUT Lhs.0, Lhs.2
             4  ~100%    {2}    | JOIN WITH `Expr::Expr.getEnclosingFunction/0#dispred#3960f06c` ON FIRST 1 OUTPUT Rhs.1, Lhs.1

             0    ~0%    {2} r7 = JOIN r6 WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1

             0    ~0%    {2} r8 = JOIN r6 WITH `#MemberFunction::MemberFunction.getAnOverridingFunction/0#dispred#a6e65b9ePlus#swapped` ON FIRST 1 OUTPUT Rhs.1, Lhs.1
             0    ~0%    {2}    | JOIN WITH `Call::FunctionCall.getTarget/0#dispred#935da4c5_10#join_rhs` ON FIRST 1 OUTPUT Rhs.1, Lhs.1

             0    ~0%    {2} r9 = r7 UNION r8
             0    ~0%    {3}    | JOIN WITH `Call::Call.getQualifier/0#dispred#7d175544` ON FIRST 1 OUTPUT Rhs.1, Lhs.1, Lhs.0
             0    ~0%    {3}    | JOIN WITH `AVRule79::exprOrDereference/1#c20425a1_10#join_rhs` ON FIRST 1 OUTPUT Lhs.2, Rhs.1, Lhs.1

         12581    ~3%    {3} r10 = r5 UNION r9
         12576    ~3%    {3}    | AND NOT `AVRule79::exprReleases/3#e849cdd3#prev`(FIRST 3)
                         return r10
```
2025-06-06 07:13:26 +02:00
REDMOND\brodes
98aae6a7bf Crypto: Add EVP key gen and signature operation (work in progress). Add initial signature tests (no expected files yet). Add new openssl .h stubs. Clean up of OperationBase and associated uses. Update test case stubs to be closer to the actual stubs. Fix unncessary instanceof check in signatures. 2025-06-05 16:43:58 -04:00
Mrigank Pawagi
114b46824a update test 2025-06-05 15:56:35 +00:00
Jeroen Ketema
99ef4c7b38 Merge pull request #19533 from github/idrissrio/constexpr
C++: accept new test results after changes
2025-06-05 16:53:34 +02:00
Jeroen Ketema
057d3ebfdf C++: Update stats file after changes to DCA source suite 2025-06-05 15:57:55 +02:00
Mrigank Pawagi
93c485fb13 apply proper formatting in comment 2025-06-05 13:26:38 +00:00
Mrigank Pawagi
434973f8e6 Update GlobalUseBeforeInit.ql 2025-06-05 09:48:37 +00:00
Paolo Tranquilli
fbd50583fe MaD generator: move bulk generation config files one directory up 2025-06-05 08:50:48 +02:00
Paolo Tranquilli
31d1604337 Bulk model generator: switch from json to yml configuration files 2025-06-05 08:37:43 +02:00
REDMOND\brodes
f952f901e4 Crypto: Update CtxFlow to flow from any "source ctx" which is any ctx that is an argument or a return. 2025-06-04 15:44:45 -04:00
REDMOND\brodes
33e239d667 Crypto: Collapse initializer qll's into operations. 2025-06-04 15:44:06 -04:00
REDMOND\brodes
952bc266b1 Crypto: Added Signature algorithm instance and consumer 2025-06-04 15:42:55 -04:00
REDMOND\brodes
39583abade Crypto: Update KnownAlgoirthmConstants to make a distinction between calls that return a known algorithm and calls that operate on a known algorithm. update KnownAlgorithmConstants to correct algType for signature algorithms. Update all instances and prior uses of the old mechanic to KnownAlgorithmConstants. 2025-06-04 15:41:24 -04:00
idrissrio
149c53bef6 C++: accept new test results after changes 2025-06-04 16:51:29 +02:00
Jeroen Ketema
2e6794e16c Merge pull request #18931 from jketema/frontend-upgrade
C++: Update expected test results and compiler version documentation after frontend update
2025-06-04 14:34:53 +02:00
Jeroen Ketema
0e34ee18df C++: Update expected test results after frontend update 2025-06-04 14:03:43 +02:00
GrosQuildu
60d9b6e338 update docs 2025-06-03 16:27:50 +02:00
GrosQuildu
eff6eb3cc2 remove redundant if/none 2025-06-03 16:27:50 +02:00
GrosQuildu
f04fa58c8b rm one-shot class 2025-06-03 16:27:50 +02:00
Paweł Płatek
328cf798bf Apply docs suggestions
Co-authored-by: Ben Rodes <benjaminrodes@gmail.com>
2025-06-03 16:27:50 +02:00
Paweł Płatek
f103e8be96 Update cpp/ql/lib/experimental/quantum/OpenSSL/Operations/OpenSSLOperationBase.qll
Co-authored-by: Ben Rodes <benjaminrodes@gmail.com>
2025-06-03 16:27:50 +02:00
GrosQuildu
af8702d6a8 fix openssl outputs 2025-06-03 16:27:50 +02:00
GrosQuildu
6d1b1d1a6e refactor EVP common classes
add initial work for openssl signatures

add basic C test files for ciphers and signatures

more signature classes, comments for evp base classes

more signature tests

fix super calls for input consumers

fix getOutputArtifact for tests

formatting

delete redundant test files

move algorithm methods to OpenSSLOperation

refactor ECKeyGenOperation for new EVP classes

formatting

fix getOutputArtifact

fix cipher and digest operation test results

mv openssl signature to another PR
2025-06-03 16:27:50 +02:00
Idriss Riouak
8fe2699a36 Merge pull request #19603 from github/idrissrio/comments-using
C++: Add support for getting literals in using declarations
2025-06-03 16:14:21 +02:00
idrissrio
10fb806601 C++: add change note for using declarations 2025-06-03 16:04:36 +02:00
idrissrio
4fd44e96ba C++: add test for getReferencedMember 2025-06-03 16:04:35 +02:00
idrissrio
e31f722d76 C++: Add support for getting referenced literals in using declarations 2025-06-03 16:04:30 +02:00
Jeroen Ketema
5e84c71b69 Merge pull request #19652 from jketema/down-typo
C++: Fix typo in downgrade script
2025-06-03 12:55:28 +02:00
Jeroen Ketema
41bdaa3d3c C++: Fix typo in downgrade script 2025-06-03 12:25:46 +02:00
REDMOND\brodes
8b770bfb4d Crypto: Remove old crypto stubs, now part of experimental/stubs. 2025-06-02 14:00:30 -04:00
REDMOND\brodes
23b6c78a23 Crypto: Revert CODEOWNERS change and remove redundant cast. 2025-06-02 13:07:31 -04:00
Nicolas Will
5a822462ad Merge branch 'main' into openssl_keyagreement_instances_and_consumers 2025-06-02 16:54:22 +02:00
REDMOND\brodes
a473c96a9c Crypto: Move crypto test stubs under experimental/stubs and remove special CODEOWNERS assignments for crypto stubs. 2025-06-02 16:10:35 +02:00
REDMOND\brodes
6b267479be Crypto: Update crypto stubs location under 'crypto' and associate codeowners on any test/stubs/crypto. Minor fix to HashAlgorithmValueConsumer (remove library detector logic). 2025-06-02 16:10:35 +02:00
REDMOND\brodes
a9bdcc72eb Crypto: Move openssl stubs to a shared stubs location. Include openssl apache license and a readme for future stub creation. Modify existing test case to reference stubs location. 2025-06-02 16:10:35 +02:00
REDMOND\brodes
0de6647927 Crypto: Adding initial openssl tests, fixing a bug in hash modeling found through tests, and updating CODEOWNERS for quantum tests 2025-06-02 16:10:35 +02:00
REDMOND\brodes
cf015d18f1 Crypto: Add openssl key agreement instances and consumers (KEM and KEY_EXCH). Fix for raw algorithm names in all current instances. Update constants to include key agreement algorithms, previously missing. Note added in model for the possibility of ESDH. 2025-05-30 11:29:34 -04:00
Mathias Vorreiter Pedersen
f6231a37e1 Merge pull request #19627 from MathiasVP/generalize-bulk-generation
Bulk MAD generator: Support databases from DCA runs
2025-05-30 14:46:36 +01:00
REDMOND\brodes
69e3a20e24 Crypto: Update crypto stubs location under 'crypto' and associate codeowners on any test/stubs/crypto. Minor fix to HashAlgorithmValueConsumer (remove library detector logic). 2025-05-30 09:35:33 -04:00
Mathias Vorreiter Pedersen
7cb9024cc6 Bulk generator: Flip default values for summaries, sources, and sinks. 2025-05-30 13:33:24 +01:00
Mathias Vorreiter Pedersen
3444c986ec Bulk generator: Fix field name. 2025-05-30 13:25:12 +01:00
Mathias Vorreiter Pedersen
1228080914 Bulk generator: Specify 'language' in the config file. 2025-05-30 12:40:21 +01:00
Mathias Vorreiter Pedersen
fc165db8ac Bulk generator: Specify 'with-summaries', 'with-sources', and 'with-sinks' in the config file. 2025-05-30 12:40:20 +01:00
Mathias Vorreiter Pedersen
5051790e24 Bulk generator: Add DCA support. 2025-05-29 18:14:22 +01:00
Mathias Vorreiter Pedersen
cb0b566588 C++: Put autogenerated models in the same folder structure as Rust. 2025-05-29 18:14:15 +01:00
REDMOND\brodes
b1ce44e434 Crypto: Move openssl stubs to a shared stubs location. Include openssl apache license and a readme for future stub creation. Modify existing test case to reference stubs location. 2025-05-28 12:05:18 -04:00
Jeroen Ketema
0796184573 C++: Specify GNU version on min/max test
The `<?` and `>?` operators where removed in g++ in version 4.3, and the
latest version of our our frontend enforces this through a version check.
Hence, to keep the test working, we not to explicitly specify a version.
2025-05-28 14:16:47 +02:00
REDMOND\brodes
41f008d4f3 Crypto: Adding initial openssl tests, fixing a bug in hash modeling found through tests, and updating CODEOWNERS for quantum tests 2025-05-27 15:23:53 -04:00
github-actions[bot]
d2c6875eac Post-release preparation for codeql-cli-2.21.4 2025-05-27 18:16:21 +00:00
github-actions[bot]
bfb91e95e3 Release preparation for version 2.21.4 2025-05-27 17:22:05 +00:00