Skip to content

Duolab continued - #2111

Open
maranget wants to merge 2 commits into
masterfrom
duolab-continued
Open

maranget wants to merge 2 commits into
masterfrom
duolab-continued

Conversation

@maranget

@maranget maranget commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Follow-up to PR #2094.

  1. A more abstract data structure to preserve label order during litmus7 operations.
  2. A compiled fault_label function for the mapping from code offsets to label indices.

None of this was strictly necessary beyond improving code robustness and the aspect of produced C code.

Notice that it was not a problem for get_label to return an index different from the one of other tables. However, synchronizing all indices should imporove robustness.

@maranget
maranget marked this pull request as draft November 13, 2026 17:18
@maranget
maranget force-pushed the duolab-continued branch 2 times, most recently from c32639a to af072fc Compare November 13, 2026 19:44
@maranget
maranget marked this pull request as ready for review November 13, 2026 20:10
@maranget
maranget requested review from psafont and relokin November 13, 2026 20:10
Comment thread litmus/skelUtil.ml Outdated
T.get_init_labels test |> Label.Full.Set.elements in
if Misc.consp lbls then begin
T.get_init_labels test in
if ByProc.is_empty lbls then begin

@psafont psafont Nov 19, 2026 •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does this mean the condition is now reversed? (consp -> is_empty). The if is needed to decide whether to output an empty line, consider changing the if to enclose only that empty line, Byproc.iter will do the right thing regardless the size of lbls.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi @psafont. Thanks for your sharp eye. I believed I had fixed this, apparently not. Fixing.

For now, the new structure `'item ByProc.t` is
used by **litmus7** to group labels by thread.

The main benefit is keeping all labels in the same order
everywhere for a small code complexity and a decent
level of abstraction.
We replace a linear scan by two nested C switch constructs.

More a matter of style than of efficiency...

This branch has not been deployed

No deployments
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.

2 participants