BitcodeTransformRegistryDsl

Project-wide registry of reusable LLVM bitcode transforms. Function rules accept originalSource as a StigRepoFile or an upstream HTTP(S) source URL. It defaults to originalCompileUnit and records the original function location for comparison. reviewStatus is shared by every activity selecting the rule.

Constructors

Link copied to clipboard
constructor()

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

The source-level return value, including aggregate returns lowered through sret.

Link copied to clipboard
Link copied to clipboard

The implicit receiver of a non-static C++ member function.

Link copied to clipboard

Functions

Link copied to clipboard
Link copied to clipboard

Bind the supplied pointer only when the selected stored pointer is null; preserve an existing binding.

Link copied to clipboard
fun byteRange(offset: Long, bytes: Long): BitcodeMemoryRange
Link copied to clipboard

Assign an exact Boolean value to a Boolean destination.

Assign a literal integer; zero can initialize all supported payload fields of a named object or array.

Link copied to clipboard

Copy fixed bytes through a named byte-pointer member, then reload and advance that stored pointer.

Link copied to clipboard
fun countedArray(offset: Long, type: BitcodeMemoryFieldType, capacity: Int, countOffset: Long, countType: BitcodeMemoryFieldType = BitcodeMemoryFieldType.INT32, tolerance: BitcodeFloatingPointTolerance? = null): BitcodeArrayField
Link copied to clipboard

Transfer corresponding elements of equal-size fixed arrays, optionally selecting a scalar field per element. Both endpoints use eachElement(); destinations require an aggregate return. Explicit zeroInitializeReturn clears unassigned scalar members; otherwise every scalar must be covered. A constant may instead initialize selected fields of a counted receiver/parameter array. The count is read once; only active elements are written, and zero or excessive counts perform no writes. Other fields remain. Compiler types provide the capacity, stride and field offsets. This preserves index correspondence.

Link copied to clipboard

Read one scalar (or scalar field) from a fixed array, selected by an integer parameter. Compiler types supply capacity, stride and member offsets. The caller must supply a valid index, as for an unchecked C++ array access; this does not reduce or merge the other elements.

Link copied to clipboard

Join dependencies of possible scalar elements of a named counted array into a scalar return or field. Emits a bounded symbolic read, with no traversal or count-to-return dependency. An empty or invalid count performs no read. NO_CHECK may merge all indices within the compiler-declared array capacity; this is a dependency abstraction, not a numerical reduction or precise active-prefix analysis.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Return the address of an existing global object identified by its exact LLVM linkage name (without @). This preserves object identity; it neither reads the object's payload nor supplies its initialization.

Link copied to clipboard
fun implementation(qualifiedFunctionName: String, source: StigRepoFile, mode: DefinitionMode = DefinitionMode.UNKNOWN, inlining: Inlining = Inlining.NEVER, mangledSymbol: String? = null, originalCompileUnit: StigRepoFile? = null, reason: String? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)

Supply C/C++ code. mode describes the original definition; source supplies the analysis body.

fun implementation(qualifiedFunctionName: String, source: String? = null, nativeCompileUnit: StigRepoFile? = null, mode: DefinitionMode = DefinitionMode.UNKNOWN, inlining: Inlining = Inlining.NEVER, mangledSymbol: String? = null, originalCompileUnit: StigRepoFile? = nativeCompileUnit, reason: String? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)

Supply exactly one analysis source or recorded native compiler input. A native input retains its own compile recipe; selecting it is an explicit analysis-scope decision.

Link copied to clipboard
fun inlining(qualifiedFunctionName: String, mode: Inlining, mangledSymbol: String? = null, originalCompileUnit: StigRepoFile? = null, reason: String? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)

Retain the original body and request a compiler policy. NEVER does not imply optnone.

Link copied to clipboard
Link copied to clipboard

A numeric, Boolean, enum, or single-scalar wrapper member of a parameter, receiver, or returned object. Dotted paths follow embedded objects and C++ reference members using compiler debug types. A reference selects its referent, never its stored pointer. Const referents reject writes; const owners can still contain mutable references. Ordinary pointer members require a separate model.

Link copied to clipboard

Read selected input bytes/active array elements as dependencies, without computing their values.

Link copied to clipboard
fun nop(qualifiedFunctionName: String, mode: DefinitionMode = DefinitionMode.UNKNOWN, mangledSymbol: String? = null, reason: String? = null, originalCompileUnit: StigRepoFile? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)

A neutral body, with no argument/global writes and a zero/null return where needed.

Link copied to clipboard
fun noreturn(qualifiedFunctionName: String, mode: DefinitionMode = DefinitionMode.UNKNOWN, mangledSymbol: String? = null, reason: String? = null, originalCompileUnit: StigRepoFile? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)

A terminating body; its compiler protection is controlled by STIG.

Link copied to clipboard
fun parameter(index: Int, field: String? = null, count: String? = null): BitcodeFunctionEndpoint

The zero-based source-level parameter, excluding hidden LLVM ABI arguments.

fun parameter(name: String, field: String? = null, count: String? = null): BitcodeFunctionEndpoint

An exact compiler-recorded parameter name; field paths follow embedded objects and C++ reference members.

Link copied to clipboard

Return the current global pointer with one sequentially consistent atomic load, preserving its alias.

Link copied to clipboard

Return a stored member pointer, using the current value of a defined global pointer when it is null.

Link copied to clipboard

The returned scalar, or a named scalar field of the returned object (including hidden sret storage).

Link copied to clipboard
fun rewriteGlobalToUnknown(globalNamePattern: String, reason: String? = null, originalCompileUnit: StigRepoFile? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)
Link copied to clipboard
fun rewriteGlobalToZero(globalNamePattern: String, reason: String? = null, originalCompileUnit: StigRepoFile? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)
Link copied to clipboard

Group possible entry-time contributors without introducing a computation or sequence.

Link copied to clipboard

Group destinations receiving every contributor of this transfer.

Link copied to clipboard
fun thisObject(field: String? = null, count: String? = null): BitcodeFunctionEndpoint

The implicit receiver, selecting a scalar field or a C++ reference member's scalar referent.

Link copied to clipboard
fun transfer(qualifiedFunctionName: String, vararg transfers: BitcodeTransferDeclaration, mode: DefinitionMode = DefinitionMode.UNKNOWN, mangledSymbol: String? = null, originalCompileUnit: StigRepoFile? = null, reason: String? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW, zeroInitializeReturn: Boolean = false)

fun transfer(qualifiedFunctionName: String, model: BitcodeFunctionModel, mode: DefinitionMode = DefinitionMode.UNKNOWN, mangledSymbol: String? = null, originalCompileUnit: StigRepoFile? = null, reason: String? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW)

Reusable value and memory operations lowered directly to LLVM, without a replacement C/C++ source file.

fun transfer(qualifiedFunctionName: String, transfers: List<BitcodeTransferDeclaration>, mode: DefinitionMode = DefinitionMode.UNKNOWN, mangledSymbol: String? = null, originalCompileUnit: StigRepoFile? = null, reason: String? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW, zeroInitializeReturn: Boolean = false)

Materialize a combined dependency summary. All sources describe entry-time values, including self-edges. Contributors to each destination are joined into one write; declaration order does not sequence assignments. Unspecified destinations remain unchanged.

fun transfer(qualifiedFunctionName: String, from: BitcodeFunctionEndpoint, to: BitcodeFunctionEndpoint, mode: DefinitionMode = DefinitionMode.UNKNOWN, mangledSymbol: String? = null, originalCompileUnit: StigRepoFile? = null, reason: String? = null, originalSource: Any? = null, reviewStatus: BitcodeTransformReviewStatus = BitcodeTransformReviewStatus.NEW, zeroInitializeReturn: Boolean = false)

One dependency edge. This overload does not compute the original numeric result.

Link copied to clipboard
fun validateIntegerFields(input: BitcodeFunctionEndpoint, vararg constraints: BitcodeIntegerConstraint, validResult: Long = 0, invalidResult: Long = 1): BitcodeFunctionModel
Link copied to clipboard