titzer / virgil

A fast and lightweight native programming language
1.23k stars 44 forks source link

[packing] [WIP] Implementation of #packing annotations #239

Open btwj opened 5 months ago

btwj commented 5 months ago

This PR adds support for #packing annotations, including support for concatenation and packing applications, but no support for #solve annotations.

The idea is that packing expressions are flattened into a FlattenedExpr form, containing a bit pattern and assignments. These FlattenedExpr's can be concatenated or applied to obtain scalar assignments, interval assignments and bit patterns for each variant. These pre-existing constraints are fed into the original solver.

Issues: