6 Commits

Author SHA1 Message Date
Gerwin Klein
e9c89bcac0 bfgen: add field_ptr(align) name size
Add the new block command

    field_ptr(align) name size

as an abbreviation for

    padding size - canonical + align
    field_high name canonical - align

The (align) part is optional. If left out, align is 0.

This is useful for removing #ifdefs for pointer storage that are trying
to achieve constant size over different canonical bit representations.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2026-01-09 09:00:43 +11:00
Gerwin Klein
29b63be21d bfgen: allow simple arithmetic integer expressions
Allow arithmetic integer expressions in all places where previously
only integer literals were allowed.

The operators +, -, *, / and % are supported. Additionally, in field,
field_high, and padding specifications, the constants "word_size" and
"canonical" are available.

This enables more readable bitfield specifications without changing
any of the code and proof generation. Produces identical output to
before.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2026-01-09 09:00:43 +11:00
Gerwin Klein
eb147cf006 bitfield_gen: remove manual table of contents
Remove manual table of contents for rendering on the docsite, which will
provide an automatic TOC.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2025-07-07 11:11:53 +01:00
Gerwin Klein
07a8263a9d bitfield_gen: add CLI to manual
* describe CLI
* describe pruning
* mention where in seL4 generated code and source are

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-05-03 09:05:23 +10:00
Gerwin Klein
4b18acaed9 tools: TOC for bitfield generator manual
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-04-27 13:24:37 +10:00
Gerwin Klein
13f0f035cf tools: add manual for bitfield_gen.py
Add a user manual for the bitfield generator that documents syntax,
semantics and basic concepts. Should also be able to serve as main
spec for what the tool is supposed to do.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2023-04-27 13:24:37 +10:00