@@ -8,6 +8,7 @@ private import codeql.rust.dataflow.internal.DataFlowImpl
88private import codeql.rust.dataflow.internal.TaintTrackingImpl
99private import codeql.rust.internal.AstConsistency as AstConsistency
1010private import codeql.rust.internal.PathResolutionConsistency as PathResolutionConsistency
11+ private import codeql.rust.internal.TypeInferenceConsistency as TypeInferenceConsistency
1112private import codeql.rust.controlflow.internal.CfgConsistency as CfgConsistency
1213private import codeql.rust.dataflow.internal.DataFlowConsistency as DataFlowConsistency
1314private import codeql.rust.dataflow.internal.SsaImpl:: Consistency as SsaConsistency
@@ -52,6 +53,13 @@ int getTotalPathResolutionInconsistencies() {
5253 sum ( string type | | PathResolutionConsistency:: getPathResolutionInconsistencyCounts ( type ) )
5354}
5455
56+ /**
57+ * Gets a count of the total number of type inference inconsistencies in the database.
58+ */
59+ int getTotalTypeInferenceInconsistencies ( ) {
60+ result = sum ( string type | | TypeInferenceConsistency:: getTypeInferenceInconsistencyCounts ( type ) )
61+ }
62+
5563/**
5664 * Gets a count of the total number of control flow graph inconsistencies in the database.
5765 */
@@ -156,7 +164,14 @@ predicate inconsistencyStats(string key, int value) {
156164 or
157165 key = "Inconsistencies - SSA" and value = getTotalSsaInconsistencies ( )
158166 or
159- key = "Inconsistencies - data flow" and value = getTotalDataFlowInconsistencies ( )
167+ key = "Inconsistencies - Data flow" and value = getTotalDataFlowInconsistencies ( )
168+ }
169+
170+ /**
171+ * Gets summary statistics about inconsistencies related to type inference.
172+ */
173+ predicate typeInferenceInconsistencyStats ( string key , int value ) {
174+ key = "Inconsistencies - Type inference" and value = getTotalTypeInferenceInconsistencies ( )
160175}
161176
162177/**
0 commit comments