Java: Deprecate experimental model activation.

This commit is contained in:
Michael Nebel
2024-12-17 11:35:06 +01:00
parent e3997f65ed
commit cc48cec1c7
6 changed files with 17 additions and 9 deletions

View File

@@ -104,9 +104,9 @@ private import codeql.mad.ModelValidation as SharedModelVal
* Extend this class to include experimental model rows with `this` name
* in data flow analysis.
*/
abstract class ActiveExperimentalModels extends string {
abstract private class ActiveExperimentalModelsInternal extends string {
bindingset[this]
ActiveExperimentalModels() { any() }
ActiveExperimentalModelsInternal() { any() }
/**
* Holds if an experimental source model exists for the given parameters.
@@ -142,6 +142,8 @@ abstract class ActiveExperimentalModels extends string {
}
}
deprecated class ActiveExperimentalModels = ActiveExperimentalModelsInternal;
/** Holds if a source model exists for the given parameters. */
predicate sourceModel(
string package, string type, boolean subtypes, string name, string signature, string ext,
@@ -151,7 +153,7 @@ predicate sourceModel(
Extensions::sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance,
madId)
or
any(ActiveExperimentalModels q)
any(ActiveExperimentalModelsInternal q)
.sourceModel(package, type, subtypes, name, signature, ext, output, kind, provenance, madId)
)
}
@@ -165,7 +167,7 @@ predicate sinkModel(
Extensions::sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance,
madId)
or
any(ActiveExperimentalModels q)
any(ActiveExperimentalModelsInternal q)
.sinkModel(package, type, subtypes, name, signature, ext, input, kind, provenance, madId)
)
}
@@ -179,7 +181,7 @@ predicate summaryModel(
Extensions::summaryModel(package, type, subtypes, name, signature, ext, input, output, kind,
provenance, madId)
or
any(ActiveExperimentalModels q)
any(ActiveExperimentalModelsInternal q)
.summaryModel(package, type, subtypes, name, signature, ext, input, output, kind,
provenance, madId)
)

View File

@@ -34,6 +34,8 @@ extensible predicate neutralModel(
);
/**
* DEPRECATED: Do not use.
*
* Holds if an experimental source model exists for the given parameters.
* This is only for experimental queries.
*/
@@ -43,6 +45,8 @@ extensible predicate experimentalSourceModel(
);
/**
* DEPRECATED: Do not use.
*
* Holds if an experimental sink model exists for the given parameters.
* This is only for experimental queries.
*/
@@ -52,6 +56,8 @@ extensible predicate experimentalSinkModel(
);
/**
* DEPRECATED: Do not use.
*
* Holds if an experimental summary model exists for the given parameters.
* This is only for experimental queries.
*/