Skip to content

[herd] Clarify interface and implementation of the -restrict option #1867

Description

@fsestini

Some behaviours of herd7 resulting from enabling the -restrict option can be a bit obscure, and we might want to do something to improve the situation.

-restrict observed is the only variant that actually filters candidate executions during simulation. Then, if the filtering results in 0 candidate executions, the final stdout stats are suppressed. I think this is a bit surprising, since with -restrict none herd7 will print the normal stats block even when there are 0 executions.

The other variants -restrict nonambiguous and -restrict condone do not seem to filter candidate executions at all. Instead, they just suppress the final stdout stats if their characterising condition is not satisfied.

I do not have the full historical context for these options, but from a UX point of view, I do find it somewhat non-obvious that an option named "restrict" would sometimes filter executions and sometimes only suppress output. It might be worth splitting these functionalities into different CLI options that make this separation of concern more explicit. On the stats printing, I think it might be clearer to always print stats, and perhaps print additional diagnostic lines such as "executions are ambiguous" or "no observed executions" when the relevant conditions are (not) met.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions