Skip to content

Implement FloatingTypes #248

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 24, 2023
Merged

Implement FloatingTypes #248

merged 11 commits into from
Mar 24, 2023

Conversation

lcartey
Copy link
Collaborator

@lcartey lcartey commented Mar 13, 2023

Description

This PR implements the FloatingTypes package.

I made a number of assumptions when implementing this package:

  1. Floating-point types are implemented on the target platform using IEEE 754.
  2. The size of the mantissa for 4 byte and 8 byte floats are 23 bits and 52 bits, respectively.
  3. The floating-point implementation supports +/- infinity.

As I believe our supported compiler/platform combinations adhere to these requirements.

Change request type

  • Release or process automation (GitHub workflows, internal scripts)
  • Internal documentation
  • External documentation
  • Query files (.ql, .qll, .qls or unit tests)
  • External scripts (analysis report or other code shipped as part of a release)

Rules with added or modified queries

  • No rules added
  • Queries have been added for the following rules:
    • FLP32-C
    • FLP34-C
    • FLP36-C
    • FLP37-C
  • Queries have been modified for the following rules:
    • rule number here

Release change checklist

A change note (development_handbook.md#change-notes) is required for any pull request which modifies:

  • The structure or layout of the release artifacts.
  • The evaluation performance (memory, execution time) of an existing query.
  • The results of an existing query in any circumstance.

If you are only adding new rule queries, a change note is not required.

Author: Is a change note required?

  • Yes
  • No

🚨🚨🚨
Reviewer: Confirm that format of shared queries (not the .qll file, the
.ql file that imports it) is valid by running them within VS Code.

  • Confirmed

Reviewer: Confirm that either a change note is not required or the change note is required and has been added.

  • Confirmed

Query development review checklist

For PRs that add new queries or modify existing queries, the following checklist should be completed by both the author and reviewer:

Author

  • Have all the relevant rule package description files been checked in?
  • Have you verified that the metadata properties of each new query is set appropriately?
  • Do all the unit tests contain both "COMPLIANT" and "NON_COMPLIANT" cases?
  • Are the alert messages properly formatted and consistent with the style guide?
  • Have you run the queries on OpenPilot and verified that the performance and results are acceptable?
    As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
  • Does the query have an appropriate level of in-query comments/documentation?
  • Have you considered/identified possible edge cases?
  • Does the query not reinvent features in the standard library?
  • Can the query be simplified further (not golfed!)

Reviewer

  • Have all the relevant rule package description files been checked in?
  • Have you verified that the metadata properties of each new query is set appropriately?
  • Do all the unit tests contain both "COMPLIANT" and "NON_COMPLIANT" cases?
  • Are the alert messages properly formatted and consistent with the style guide?
  • Have you run the queries on OpenPilot and verified that the performance and results are acceptable?
    As a rule of thumb, predicates specific to the query should take no more than 1 minute, and for simple queries be under 10 seconds. If this is not the case, this should be highlighted and agreed in the code review process.
  • Does the query have an appropriate level of in-query comments/documentation?
  • Have you considered/identified possible edge cases?
  • Does the query not reinvent features in the standard library?
  • Can the query be simplified further (not golfed!)

lcartey added 7 commits March 13, 2023 10:21
Adds the FloatingTypes package, and make a query (A0-4-4) from
TypeRanges into a shared query.
Enable sharing with FLP32-C.
FLP32-C is a straight import of the AUTOSAR rule A0-4-4-.
Adds a query for FLP34-C which checks whether a float-to-int
conversion is within the bounds of the new type.

We check (a) for a bounded range or (b) a suitable guard on the
conversion that indicates the float has been considered against the
precision of the integer.
Add a query to detect integer to float conversions where precision may
be lost because the mantissa of the float is limited in size.

The strategy here is to assume IEEE754 and standard mantissa size, then
use range analysis to determine an upper bound on the value converted
and check if that exceeds the "safe" upper limit where all below can be
fully represented.
Add a query for finding float values compared by memcmp.
@github-actions
Copy link

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/cpp/x86_64 Matrix Testing for this PR has been completed. See below for the results!


RULE                 : A0-4-4
QUERY                : UncheckedRangeDomainPoleErrors
SUITE                : AUTOSAR
TEST_PASS            : True
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
PACKAGE              : TypeRanges


@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


QUERY                : UncheckedFloatingPointConversion
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
PACKAGE              : FloatingTypes
RULE                 : FLP34-C

QUERY                : IntToFloatPreservePrecision
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
PACKAGE              : FloatingTypes
RULE                 : FLP36-C

QUERY                : MemcmpUsedToCompareFloats
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
PACKAGE              : FloatingTypes
RULE                 : FLP37-C

QUERY                : UncheckedRangeDomainPoleErrors
TEST_DIFFERENCE      : 
COMPILE_PASS         : True
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
PACKAGE              : FloatingTypes
RULE                 : FLP32-C


@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


RULE                 : FLP34-C
SUITE                : CERT-C
QUERY                : UncheckedFloatingPointConversion
PACKAGE              : FloatingTypes
TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 

RULE                 : FLP36-C
SUITE                : CERT-C
QUERY                : IntToFloatPreservePrecision
PACKAGE              : FloatingTypes
TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 

RULE                 : FLP37-C
SUITE                : CERT-C
QUERY                : MemcmpUsedToCompareFloats
PACKAGE              : FloatingTypes
TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 

RULE                 : FLP32-C
SUITE                : CERT-C
QUERY                : UncheckedRangeDomainPoleErrors
PACKAGE              : FloatingTypes
TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 


@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/cpp/x86_64 Matrix Testing for this PR has been completed. See below for the results!


COMPILE_ERROR_OUTPUT : 
QUERY                : UncheckedRangeDomainPoleErrors
TEST_DIFFERENCE      : 
SUITE                : AUTOSAR
PACKAGE              : TypeRanges
COMPILE_PASS         : True
RULE                 : A0-4-4
TEST_PASS            : True


@jsinglet
Copy link
Contributor

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

@github-actions
Copy link

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/cpp/x86_64 Matrix Testing for this PR has been completed. See below for the results!


PACKAGE              : TypeRanges
QUERY                : UncheckedRangeDomainPoleErrors
RULE                 : A0-4-4
TEST_PASS            : True
SUITE                : AUTOSAR
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
COMPILE_PASS         : True


@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/cpp/x86_64 Matrix Testing for this PR has been completed. See below for the results!


TEST_PASS            : True
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
RULE                 : A0-4-4
PACKAGE              : TypeRanges
TEST_DIFFERENCE      : 
QUERY                : UncheckedRangeDomainPoleErrors
SUITE                : AUTOSAR


@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


RULE                 : FLP34-C
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : UncheckedFloatingPointConversion
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
COMPILE_PASS         : True

RULE                 : FLP36-C
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : IntToFloatPreservePrecision
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
COMPILE_PASS         : True

RULE                 : FLP37-C
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : MemcmpUsedToCompareFloats
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
COMPILE_PASS         : True

RULE                 : FLP32-C
TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : UncheckedRangeDomainPoleErrors
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
COMPILE_PASS         : True


@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/c/x86_64 Matrix Testing for this PR has been completed. See below for the results!


RULE                 : FLP34-C
COMPILE_PASS         : True
QUERY                : UncheckedFloatingPointConversion
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : CERT-C
TEST_PASS            : True
PACKAGE              : FloatingTypes

RULE                 : FLP36-C
COMPILE_PASS         : True
QUERY                : IntToFloatPreservePrecision
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : CERT-C
TEST_PASS            : True
PACKAGE              : FloatingTypes

RULE                 : FLP37-C
COMPILE_PASS         : True
QUERY                : MemcmpUsedToCompareFloats
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : CERT-C
TEST_PASS            : True
PACKAGE              : FloatingTypes

RULE                 : FLP32-C
COMPILE_PASS         : True
QUERY                : UncheckedRangeDomainPoleErrors
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
SUITE                : CERT-C
TEST_PASS            : True
PACKAGE              : FloatingTypes


@jsinglet
Copy link
Contributor

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

@lcartey lcartey requested a review from nicolaswill March 21, 2023 16:00
@github-actions
Copy link

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/c/X86_64 Matrix Testing for this PR has been completed. See below for the results!


TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : UncheckedFloatingPointConversion
PACKAGE              : FloatingTypes
TEST_DIFFERENCE      : 
SUITE                : CERT-C
RULE                 : FLP34-C

TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : IntToFloatPreservePrecision
PACKAGE              : FloatingTypes
TEST_DIFFERENCE      : 
SUITE                : CERT-C
RULE                 : FLP36-C

TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : MemcmpUsedToCompareFloats
PACKAGE              : FloatingTypes
TEST_DIFFERENCE      : 
SUITE                : CERT-C
RULE                 : FLP37-C

TEST_PASS            : True
COMPILE_ERROR_OUTPUT : 
COMPILE_PASS         : True
QUERY                : UncheckedRangeDomainPoleErrors
PACKAGE              : FloatingTypes
TEST_DIFFERENCE      : 
SUITE                : CERT-C
RULE                 : FLP32-C


@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/cpp/X86_64 Matrix Testing for this PR has been completed. See below for the results!


COMPILE_PASS         : True
TEST_DIFFERENCE      : 
COMPILE_ERROR_OUTPUT : 
PACKAGE              : TypeRanges
QUERY                : UncheckedRangeDomainPoleErrors
SUITE                : AUTOSAR
TEST_PASS            : True
RULE                 : A0-4-4


@jsinglet
Copy link
Contributor

🤖 Beep Boop! qcc/cpp/AARCH64LE Matrix Testing for this PR has been completed. See below for the results!


TEST_PASS            : False
TEST_DIFFERENCE      : --- expected
                       +++ actual
                       @@ -1,3 +1,9 @@
                       +| file:///opt/qcc/qnx-sdp/target/qnx7/usr/include/c++/v1/math.h:775:91:775:97 | call to acosf | Domain error in call to acosf: the argument has a range -Infinity...Infinity which is outside the domain of this function (-1.0...1.0). |
                       +| file:///opt/qcc/qnx-sdp/target/qnx7/usr/include/c++/v1/math.h:776:91:776:97 | call to acosl | Domain error in call to acosl: the argument has a range -Infinity...Infinity which is outside the domain of this function (-1.0...1.0). |
                       +| file:///opt/qcc/qnx-sdp/target/qnx7/usr/include/c++/v1/math.h:787:91:787:97 | call to asinf | Domain error in call to asinf: the argument has a range -Infinity...Infinity which is outside the domain of this function (-1.0...1.0). |
                       +| file:///opt/qcc/qnx-sdp/target/qnx7/usr/include/c++/v1/math.h:788:91:788:97 | call to asinl | Domain error in call to asinl: the argument has a range -Infinity...Infinity which is outside the domain of this function (-1.0...1.0). |
                       +| file:///opt/qcc/qnx-sdp/target/qnx7/usr/include/c++/v1/math.h:1086:92:1086:99 | call to atanhf | Domain error in call to atanhf: the argument has a range -Infinity...Infinity which is outside the domain of this function (-1.0...1.0). |
                       +| file:///opt/qcc/qnx-sdp/target/qnx7/usr/include/c++/v1/math.h:1087:92:1087:99 | call to atanhl | Domain error in call to atanhl: the argument has a range -Infinity...Infinity which is outside the domain of this function (-1.0...1.0). |
                        | test.cpp:4:3:4:6 | call to acos | Domain error in call to acos: the argument has a range -1.1...-1.1 which is outside the domain of this function (-1.0...1.0). |
                        | test.cpp:8:3:8:6 | call to acos | Domain error in call to acos: the argument has a range 1.1...1.1 which is outside the domain of this function (-1.0...1.0). |
                        | test.cpp:9:3:9:6 | call to asin | Domain error in call to asin: the argument has a range -1.1...-1.1 which is outside the domain of this function (-1.0...1.0). |
                       [1/1 comp 30.5s eval 1.2s] FAILED(RESULT) /__w/codeql-coding-standards-release-engineering/codeql-coding-standards-release-engineering/codeql-coding-standards/cpp/common/test/rules/uncheckedrangedomainpoleerrors/UncheckedRangeDomainPoleErrors.ql
                       
RULE                 : A0-4-4
COMPILE_ERROR_OUTPUT : 
SUITE                : AUTOSAR
COMPILE_PASS         : True
PACKAGE              : TypeRanges
QUERY                : UncheckedRangeDomainPoleErrors


@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/cpp/X86_64 Matrix Testing for this PR has been completed. See below for the results!


PACKAGE              : TypeRanges
SUITE                : AUTOSAR
COMPILE_PASS         : True
RULE                 : A0-4-4
COMPILE_ERROR_OUTPUT : 
TEST_DIFFERENCE      : 
QUERY                : UncheckedRangeDomainPoleErrors
TEST_PASS            : True


@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/c/X86_64 Matrix Testing for this PR has been completed. See below for the results!


QUERY                : UncheckedFloatingPointConversion
TEST_DIFFERENCE      : 
SUITE                : CERT-C
COMPILE_PASS         : True
PACKAGE              : FloatingTypes
TEST_PASS            : True
RULE                 : FLP34-C
COMPILE_ERROR_OUTPUT : 

QUERY                : IntToFloatPreservePrecision
TEST_DIFFERENCE      : 
SUITE                : CERT-C
COMPILE_PASS         : True
PACKAGE              : FloatingTypes
TEST_PASS            : True
RULE                 : FLP36-C
COMPILE_ERROR_OUTPUT : 

QUERY                : MemcmpUsedToCompareFloats
TEST_DIFFERENCE      : 
SUITE                : CERT-C
COMPILE_PASS         : True
PACKAGE              : FloatingTypes
TEST_PASS            : True
RULE                 : FLP37-C
COMPILE_ERROR_OUTPUT : 

QUERY                : UncheckedRangeDomainPoleErrors
TEST_DIFFERENCE      : 
SUITE                : CERT-C
COMPILE_PASS         : True
PACKAGE              : FloatingTypes
TEST_PASS            : True
RULE                 : FLP32-C
COMPILE_ERROR_OUTPUT : 


@jsinglet
Copy link
Contributor

🤖 Beep Boop! qcc/c/AARCH64LE Matrix Testing for this PR has been completed. See below for the results!


COMPILE_ERROR_OUTPUT : 
PACKAGE              : FloatingTypes
SUITE                : CERT-C
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : FLP34-C
QUERY                : UncheckedFloatingPointConversion
COMPILE_PASS         : True

COMPILE_ERROR_OUTPUT : 
PACKAGE              : FloatingTypes
SUITE                : CERT-C
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : FLP36-C
QUERY                : IntToFloatPreservePrecision
COMPILE_PASS         : True

COMPILE_ERROR_OUTPUT : 
PACKAGE              : FloatingTypes
SUITE                : CERT-C
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : FLP37-C
QUERY                : MemcmpUsedToCompareFloats
COMPILE_PASS         : True

COMPILE_ERROR_OUTPUT : 
PACKAGE              : FloatingTypes
SUITE                : CERT-C
TEST_DIFFERENCE      : 
TEST_PASS            : True
RULE                 : FLP32-C
QUERY                : UncheckedRangeDomainPoleErrors
COMPILE_PASS         : True


@jsinglet
Copy link
Contributor

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

Copy link
Contributor

@nicolaswill nicolaswill left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM other than one note for FLP34-C.

@github-actions
Copy link

🤖 Beep Boop! Matrix Testing for this PR has been initiated. Please check back later for results.

💡 If you do not hear back from me please check my status! I will report even if this PR does not contain files eligible for matrix testing.

@lcartey
Copy link
Collaborator Author

lcartey commented Mar 24, 2023

The new compiler test failure for qcc/cpp/AARCH64LE is an artefact of moving the A0-4-4 query to a shared implementation. We have an internal ticket tracking updating our test infrastructure to handle this case (as shared queries do not currently exclude results outside the source root).

@jsinglet
Copy link
Contributor

🤖 Beep Boop! qcc/cpp/AARCH64LE Matrix Testing for this PR won't happen because it is outside of license window!

@jsinglet
Copy link
Contributor

🤖 Beep Boop! qcc/c/AARCH64LE Matrix Testing for this PR won't happen because it is outside of license window!

@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/cpp/X86_64 Matrix Testing for this PR has been completed. See below for the results!


TEST_PASS            : True
RULE                 : A0-4-4
COMPILE_ERROR_OUTPUT : 
SUITE                : AUTOSAR
TEST_DIFFERENCE      : 
QUERY                : UncheckedRangeDomainPoleErrors
PACKAGE              : TypeRanges
COMPILE_PASS         : True


@nicolaswill nicolaswill self-requested a review March 24, 2023 13:39
@lcartey
Copy link
Collaborator Author

lcartey commented Mar 24, 2023

/test-performance

@github-actions
Copy link

🏁 Beep Boop! Performance testing for this PR has been initiated. Please check back later for results. Note that the query package generation step must complete before testing will start so it might be a minute.

💡 If you do not hear back from me please check my status! I will report even if I fail!

@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/c/X86_64 Matrix Testing for this PR has been completed. See below for the results!


TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
RULE                 : FLP34-C
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : UncheckedFloatingPointConversion

TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
RULE                 : FLP36-C
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : IntToFloatPreservePrecision

TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
RULE                 : FLP37-C
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : MemcmpUsedToCompareFloats

TEST_PASS            : True
COMPILE_PASS         : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
RULE                 : FLP32-C
COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
QUERY                : UncheckedRangeDomainPoleErrors


@jsinglet
Copy link
Contributor

🤖 Beep Boop! clang/c/X86_64 Matrix Testing for this PR has been completed. See below for the results!


COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
COMPILE_PASS         : True
RULE                 : FLP34-C
TEST_PASS            : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
QUERY                : UncheckedFloatingPointConversion

COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
COMPILE_PASS         : True
RULE                 : FLP36-C
TEST_PASS            : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
QUERY                : IntToFloatPreservePrecision

COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
COMPILE_PASS         : True
RULE                 : FLP37-C
TEST_PASS            : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
QUERY                : MemcmpUsedToCompareFloats

COMPILE_ERROR_OUTPUT : 
SUITE                : CERT-C
COMPILE_PASS         : True
RULE                 : FLP32-C
TEST_PASS            : True
TEST_DIFFERENCE      : 
PACKAGE              : FloatingTypes
QUERY                : UncheckedRangeDomainPoleErrors


@jsinglet
Copy link
Contributor

🤖 Beep Boop! gcc/cpp/X86_64 Matrix Testing for this PR has been completed. See below for the results!


QUERY                : UncheckedRangeDomainPoleErrors
COMPILE_PASS         : True
COMPILE_ERROR_OUTPUT : 
RULE                 : A0-4-4
TEST_DIFFERENCE      : 
SUITE                : AUTOSAR
PACKAGE              : TypeRanges
TEST_PASS            : True


@jsinglet
Copy link
Contributor

🤖 Beep Boop! Matrix Testing for this PR has been completed. If no reports were posted it means this PR does not contain things that need matrix testing!

@jsinglet
Copy link
Contributor

🏁 Beep Boop! Performance testing complete! See below for performance of the last 3 runs vs your PR. Times are based on predicate performance. You can find full graphs and stats in the PR that was created for this test in the release engineering repo.


Release                            : v2.14.0
Platform                           : x86-linux
Language                           : c
Total_Serialized_Execution_Time_Ms : 2886922
Mean_Predicate_Execution_Time_Ms   : 108.65344373353406
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1783.906509131339
Total_Serialized_Execution_Time_s  : 2886.922
Mean_Query_Execution_Time_s        : 0.108653443733534
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 237.0
Number_of_Predicates               : 26570

Release                            : v2.14.0
Platform                           : x86-windows
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 4498723
Mean_Predicate_Execution_Time_Ms   : 112.41186906546729
Median_Predicate_Execution_Time_Ms : 3.0
Standard_Deviation_Ms              : 1841.844021324711
Total_Serialized_Execution_Time_s  : 4498.723
Mean_Query_Execution_Time_s        : 0.1124118690654672
Median_Predicate_Execution_Time_s  : 0.003
Percentile95_Ms                    : 224.0
Number_of_Predicates               : 40020

Release                            : v2.14.0
Platform                           : x86-windows
Language                           : c
Total_Serialized_Execution_Time_Ms : 3330223
Mean_Predicate_Execution_Time_Ms   : 125.4557543793558
Median_Predicate_Execution_Time_Ms : 4.0
Standard_Deviation_Ms              : 2125.712933594389
Total_Serialized_Execution_Time_s  : 3330.223
Mean_Query_Execution_Time_s        : 0.1254557543793558
Median_Predicate_Execution_Time_s  : 0.004
Percentile95_Ms                    : 271.0
Number_of_Predicates               : 26545

Release                            : v2.14.0
Platform                           : x86-linux
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 3910243
Mean_Predicate_Execution_Time_Ms   : 97.5706906876934
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1583.9926359710646
Total_Serialized_Execution_Time_s  : 3910.243
Mean_Query_Execution_Time_s        : 0.0975706906876933
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 200.0
Number_of_Predicates               : 40076

Release                            : v2.15.1
Platform                           : x86-windows
Language                           : c
Total_Serialized_Execution_Time_Ms : 3624097
Mean_Predicate_Execution_Time_Ms   : 128.26845756353083
Median_Predicate_Execution_Time_Ms : 3.0
Standard_Deviation_Ms              : 2122.113492946546
Total_Serialized_Execution_Time_s  : 3624.097
Mean_Query_Execution_Time_s        : 0.1282684575635308
Median_Predicate_Execution_Time_s  : 0.003
Percentile95_Ms                    : 247.34999999999852
Number_of_Predicates               : 28254

Release                            : v2.15.1
Platform                           : x86-linux
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 3838315
Mean_Predicate_Execution_Time_Ms   : 93.4146608581372
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1435.040141045132
Total_Serialized_Execution_Time_s  : 3838.315
Mean_Query_Execution_Time_s        : 0.0934146608581372
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 189.0
Number_of_Predicates               : 41089

Release                            : v2.15.1
Platform                           : x86-linux
Language                           : c
Total_Serialized_Execution_Time_Ms : 3256343
Mean_Predicate_Execution_Time_Ms   : 114.97980297305888
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1853.6432397269127
Total_Serialized_Execution_Time_s  : 3256.343
Mean_Query_Execution_Time_s        : 0.1149798029730588
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 224.0
Number_of_Predicates               : 28321

Release                            : v2.15.1
Platform                           : x86-windows
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 4293575
Mean_Predicate_Execution_Time_Ms   : 105.51398309249976
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1651.868425630411
Total_Serialized_Execution_Time_s  : 4293.575
Mean_Query_Execution_Time_s        : 0.1055139830924997
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 213.0
Number_of_Predicates               : 40692

Release                            : 248
Platform                           : x86-linux
Language                           : cpp
Total_Serialized_Execution_Time_Ms : 3822880
Mean_Predicate_Execution_Time_Ms   : 93.8176106802788
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1415.5762805181696
Total_Serialized_Execution_Time_s  : 3822.88
Mean_Query_Execution_Time_s        : 0.0938176106802787
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 191.0
Number_of_Predicates               : 40748

Release                            : 248
Platform                           : x86-linux
Language                           : c
Total_Serialized_Execution_Time_Ms : 3287419
Mean_Predicate_Execution_Time_Ms   : 114.9527589341912
Median_Predicate_Execution_Time_Ms : 2.0
Standard_Deviation_Ms              : 1852.0051974444448
Total_Serialized_Execution_Time_s  : 3287.419
Mean_Query_Execution_Time_s        : 0.1149527589341912
Median_Predicate_Execution_Time_s  : 0.002
Percentile95_Ms                    : 227.0
Number_of_Predicates               : 28598


🏁 Below are the slowest predicates for the last 2 releases vs this PR.


Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : cpp
Suite             : cert-default
Predicate         : SSAConstruction#2b11997e::PhiInsertion::definitionHasRedefinition#3#fff
Execution_Time_Ms : 33622

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : SSAConstruction#2b11997e::DefUse::hasNonPhiDefinition#4#ffff
Execution_Time_Ms : 35318

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#134#fff#shared
Execution_Time_Ms : 137522

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : UnusedIncludeDirectives#574b69bc::getANonLocalDependency#1#ff
Execution_Time_Ms : 35530

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : m##DataFlowUtil#7572fbec::localFlowStep#2Plus#bf
Execution_Time_Ms : 187498

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : cpp
Suite             : autosar-default
Predicate         : Dependency#b0c9183e::dependsOnTransitive#2#ff
Execution_Time_Ms : 218676

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#ff#antijoin_rhs
Execution_Time_Ms : 214162

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : RepeatedInitializationOfAggregateObjectElement#76b22bdc::hasMultipleInitializerExprsForSameField#2#ff
Execution_Time_Ms : 66623

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : RepeatedInitializationOfAggregateObjectElement#76b22bdc::hasMultipleInitializerExprsForSameIndexInternal#4#ffff#join_rhs
Execution_Time_Ms : 68295

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#134#fff#shared
Execution_Time_Ms : 167904

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : #select#ff#antijoin_rhs
Execution_Time_Ms : 247019

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-windows
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#134#fff#antijoin_rhs
Execution_Time_Ms : 66032

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : UnusedIncludeDirectives#574b69bc::getANonLocalDependency#1#ff
Execution_Time_Ms : 30539

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : PreProcessorShallOnlyBeUsedForCertainDirectivesPatterns#32e68f1c::getAGuard#1#ff
Execution_Time_Ms : 34411

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : Dependency#b0c9183e::dependsOnTransitive#2#ff
Execution_Time_Ms : 176681

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : m##DataFlowUtil#7572fbec::localFlowStep#2Plus#bf
Execution_Time_Ms : 177379

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : RepeatedInitializationOfAggregateObjectElement#76b22bdc::hasMultipleInitializerExprsForSameIndexInternal#4#ffff#join_rhs
Execution_Time_Ms : 59007

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#134#fff#antijoin_rhs
Execution_Time_Ms : 63343

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : RepeatedInitializationOfAggregateObjectElement#76b22bdc::hasMultipleInitializerExprsForSameField#2#ff
Execution_Time_Ms : 68001

Release           : v2.15.1
Run               : 2023-03-17_19-54-48
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : UnionsUsed#8fe78116::TaggedUnion#f#count_range
Execution_Time_Ms : 29742

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#134#fff#shared
Execution_Time_Ms : 138814

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : RepeatedInitializationOfAggregateObjectElement#76b22bdc::hasMultipleInitializerExprsForSameField#2#ff
Execution_Time_Ms : 67442

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#cpe#134#fff#antijoin_rhs
Execution_Time_Ms : 64606

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : RepeatedInitializationOfAggregateObjectElement#76b22bdc::hasMultipleInitializerExprsForSameIndexInternal#4#ffff#join_rhs
Execution_Time_Ms : 57313

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : UnusedIncludeDirectives#574b69bc::getANonLocalDependency#1#ff
Execution_Time_Ms : 30669

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : m##DataFlowUtil#7572fbec::localFlowStep#2Plus#bf
Execution_Time_Ms : 172391

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : PreProcessorShallOnlyBeUsedForCertainDirectivesPatterns#32e68f1c::getAGuard#1#ff
Execution_Time_Ms : 32994

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : cpp
Suite             : cert-default
Predicate         : SSAConstruction#2b11997e::PhiInsertion::definitionHasRedefinition#3#fff
Execution_Time_Ms : 28948

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : cpp
Suite             : autosar-default
Predicate         : Dependency#b0c9183e::dependsOnTransitive#2#ff
Execution_Time_Ms : 174053

Release           : 248
Run               : 2023-03-24_13-40-06
Platform          : x86-linux
Language          : c
Suite             : misra-default
Predicate         : #select#ff#antijoin_rhs
Execution_Time_Ms : 215871


@lcartey lcartey added this pull request to the merge queue Mar 24, 2023
Merged via the queue into main with commit d4c68f6 Mar 24, 2023
@lcartey lcartey deleted the lcartey/floating-types branch March 24, 2023 16:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Development

Successfully merging this pull request may close these issues.

3 participants