Skip to content

[WIP][gen] memory tag diy7 configuration file#1836

Draft
ShaleXIONG wants to merge 17 commits into
herd:masterfrom
ShaleXIONG:memtag-conf
Draft

[WIP][gen] memory tag diy7 configuration file#1836
ShaleXIONG wants to merge 17 commits into
herd:masterfrom
ShaleXIONG:memtag-conf

Conversation

@ShaleXIONG
Copy link
Copy Markdown
Collaborator

No description provided.

ShaleXIONG and others added 17 commits May 14, 2026 10:59
Extend the relax AST with a predicate node and teach the lexer/parser to
recognise predicate applications such as `@before(...)` and `@after(...)`.

Add `map_predicate` support to the AST so predicate names can be
converted before expansion. Parse `before` and `after` into edge predicates,
then attach the parsed predicate to every edge produced by the decorated
relax expression.
Extend `diy7` cycle searching to recognise predicate-decorated boundary edges.
`@after(...)` predicates at the end of a candidate edge sequence and
`@before(...)` predicates at the start of the existing suffix are matched
against the adjacent concrete edge before the search continues.
Once predicates have been checked, remove them from candidate cycles before
handing them to the normal test generator.
Add a `diy7 -unfold-only` option that parses and expands `-relax`,
`-safe`, and `-reject` inputs without running cycle generation.
Move invalid-relax filtering after the relax set definition so expanded
relaxations can be normalised through `Set`.
…tests.

For `...;po` and `...;po;[M]` in cat, we append the external
communication edges `Obs` in the translation. Similarly for `po;...` and
`[M];po;...`, we prefix `Obs`.
Add back `Amo.StAdd` and `Amo.LdAdd` as the representation for all other
atomic operation. We also remove `[Q Amo.* ***]` as `Q` cannot apply to
`Amo.*`
Split DumpAll's check/dump path into explicit and clear stages: atom variation,
edge resolution, normalisation, duplicate detection, test construction, and
final dumping.  This makes the ordering clearer and avoids rebuilding the same
test separately for each scope/name variant. It also massively simply error
handling.

minor:
- Change `mk_info` from a function over the normalised edge list into prepared
  metadata passed with the candidate.
- Make `Edge.varatom` return the list of atomic variations directly, leaving
  edge resolution to the DumpAll pipeline. This keeps varatom focused on atom
  enumeration and makes resolve_edges placement explicit.
Add earlier candidate checks in alt.ml before calling into DumpAll/test
construction
- It rejects candidates that already exceed the configured process or
  per-procedure instruction limit
- It checks both (1) the immediate adjacent boundary and (2) the effective
  non-pseudo memory-access boundary when concatenating relaxation.
- Rework on rejecting cycle or cycle segment.
  Replace the old reject substring/span helpers with direct cycle/list
  matching helpers used by both partial generation and last-minute checking.
  For the final check, we apply a simpler and more readable algorithm
  by checking if the `cycle @ cycle` contains any reject edge lists, which
  is much more efficient and readable compated to previous `cut` based.
Store -rejectlist arguments as a list and parse them with the same
unfolding path used by relax and safe lists. This lets repeated
-rejectlist options accumulate and deduplicate after expansion.

Add unfold-only tests covering reject-list choice, optional edges,
sequences, annotations, duplicate removal, and repeated -rejectlist
arguments.
Add more consecutive none fault check. This rule out undesired situations
where a memory access does not fault but the consecutive one faults.
Add gen/libdir/memtag.conf for generating forbidden tests for memory
tags.
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