Map cells with static data for LLVM kompile#1084
Merged
automergerpr-permission-manager[bot] merged 28 commits intoMay 15, 2026
Merged
Conversation
Collaborator
Author
|
Relevant discussion on slack |
e4ad90c to
84f438d
Compare
Due to it calling loopupFunction in its boby while being no-evaluators
The other callsites are TODO.
Callsites not in [no-evaluators] functions updated. Temporary syntax-only fixes for callsites inside [no-evaluators] functions.
…ets, and #elemSize. Temporary noMap fixes for the callsites in functions with [no-evaluators]
…s fixed callsites
- test_cli_prove_add_module_*: added new cells in rule in corresponding module - test_cli_show_to_module: updated expected output (three new cells expected) - test_decode_value: the LLVM definition is now shared (not per-program), so the test could not compile a per-program definition. Updated fixture to use KMIR.definition_dir directly. Also, #decodeValue now takes MaybeMap as first argument, so the Kore template and to_pattern were updated to pass the types map built from TEST_SMIR.
84f438d to
75773fe
Compare
dkcumming
approved these changes
May 15, 2026
Collaborator
dkcumming
left a comment
There was a problem hiding this comment.
Nice I like it a lot! I went through each commit and it all makes sense. It is unfortunate there needs to be so much duplication of code for the symbolic and concrete cases. Maybe there would be some solution for that in the future, but it is not too much of a cost to bear for now for the massive performance increase. I think there is a way to remove printing the cells entirely too, not just with noMap replaced. But that is not a big deal for now either.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR introduces a dual lookup mechanism for static data, using a
MaybeMapsort, aiming to avoid per-program LLVM kompile in concrete execution. Program-specific data (functions, types, allocations) is stored inMapcells for LLVM execution, while the existingno-evaluatorsKore functions are preserved for the Haskell/booster backend.Status
Both LLVM and Haskell backends work. Zero regressions on the UI test suite with the LLVM backend (1162/1162 baseline). Zero regressions on the UI test suite with the Haskell backend as well. LLVM backend execution ~13x faster (3h vs ~38h, with with 2 workers). Haskell backend execution around the same (10.5 h vs 10 h, with 2 workers again).
Commits
MaybeMapsort (noMap | someMap(Map)) and new<functions>,<types>,<memory>cells to the configuration.lookupFunction/lookupTy/lookupAlloctolookupFunctionKore/lookupTyKore/lookupAllocKore(keeping[no-evaluators]).lookupFunctionMap,lookupTyMap,lookupAllocMap) usingorDefaultfor missing keys.lookupFunction(MaybeMap, Ty)etc. that dispatch to Kore or Map versions.kmir.mdandrt/data.mdto read the new cells and use the wrapper functions.symbol(MaybeMap::noMap)andsymbol(MaybeMap::someMap)attributes for clean Python integration._make_smir_maps) and skip LLVMkompilein concrete execution.noMapviatop_downKORE traversal).noMapin the symbolic call config to have concrete values instead of unbound Kore variables.[function]) and symbolic ([no-evaluators]) using markdown selectors. In concrete execution, dispatch to map lookups; in symbolic execution, per-program axioms bridge tolookupXKore.lookupFunction,lookupTy,lookupAlloc, and#getBlocksto delegate from the[no-evaluators]wrapper tolookupXKorein the Haskell definition.[no-evaluators]functions that calllookupTyKoredirectly to concrete/symbolic split withMaybeMapparameter:#getBlocks,readTyConstInt,#staticArrayLenBits,getTyOf,#metadataSize,#metadataSizeAux,#typeProjection,#pointeeProjection,#pointeeProjectionTarget,getArrayElemTypeInfo,#lookupMaybeTy,#sizeOf,#alignOf,#isStaticU8Array,#convertMetadata,#projectedCallTy,#extractOperandType,#decodeValue,#neededBytesForOffsets,#decodeFieldsWithOffsets,#elemSize,#decodeEnumDirectFields,#decodeArrayAllocation,#decodeArrayElements,#decodeSliceAllocation. (multiple commits)test_decode_value,test_cli_prove_add_module_*).