Skip to content

RangeInteger abstraction for more compact representation#1061

Draft
ehildenb wants to merge 12 commits intomasterfrom
range-abstraction
Draft

RangeInteger abstraction for more compact representation#1061
ehildenb wants to merge 12 commits intomasterfrom
range-abstraction

Conversation

@ehildenb
Copy link
Copy Markdown
Member

This PR seeks to reduce the size of KMIR configurations by packing ranges of integers into a single byte-array instead. Currently, if we ahve a list of Integer(...) of the same unsigned width each, we store it as a List(...) of all the integer instead of packing it into a single Byte array. This leads to way more AST nodes for each term than is needed, and exploded output for the same bytearray.

So this change:

  • Detects when we are building a Range of Integer, and instead builds a RangeInteger construct with the bytes packed. It only does this when the integers are byte-aligned, so that the byte-level access we get on bytes are sufficient.
  • Updates the semantisc to handle this new RangeInteger construct.
  • Adds a testing harness for testing specific lemmas/functional simplifications. This is long overdue, but it adds a way to make direct kprove ... style tests that we can execute for testing lemmas.

@ehildenb ehildenb changed the title Range abstraction RangeInteger abstraction for more compact representation Apr 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant