Skip to content

Document temporal dominance rule semantics in effect system#1869

Open
arnaudgelas wants to merge 1 commit intoinformalsystems:mainfrom
arnaudgelas:fix-temporal-dominance
Open

Document temporal dominance rule semantics in effect system#1869
arnaudgelas wants to merge 1 commit intoinformalsystems:mainfrom
arnaudgelas:fix-temporal-dominance

Conversation

@arnaudgelas
Copy link
Contributor

Add comprehensive documentation to the effect unification code explaining the semantic rationale behind the Update/Temporal dominance rule.

The isDominant function enforces that actions (Read & Update effects) and temporal formulas (Read & Temporal effects) are mutually exclusive by design:

  • Actions are state transition relations that modify state variables
  • Temporal formulas express properties about execution traces without modifying state

When unifying effects where one has Update and another has Temporal:

  • Concrete entities on both sides (e.g., Update['x'] vs Temporal['y']) correctly fail with an error
  • Entity variables get constrained to empty (nullified)

This is intentional behavior, not information loss. To use actions in temporal contexts, explicit conversion operators like orKeep, weakFair, etc. must be used, which transform the effect signature from Read[r] & Update[u] to Temporal[r, u, ...].

The documentation clarifies:

  • Why ['update', 'temporal'] is not in compatibleComponentKinds
  • The purpose and behavior of the isDominant function
  • Practical implications during effect unification
  • How to properly compose actions with temporal operators
  • I have read and I understand the Note on AI-assisted contributions
  • Changes manually tested locally and confirmed to work as described
    (including screenshots is helpful)
  • Tests added for any new code
  • Documentation added for any new functionality
  • Entries added to the respective CHANGELOG.md for any new functionality

Add comprehensive documentation to the effect unification code explaining
the semantic rationale behind the Update/Temporal dominance rule.

The `isDominant` function enforces that actions (Read & Update effects)
and temporal formulas (Read & Temporal effects) are mutually exclusive
by design:

- Actions are state transition relations that modify state variables
- Temporal formulas express properties about execution traces without
  modifying state

When unifying effects where one has Update and another has Temporal:
- Concrete entities on both sides (e.g., Update['x'] vs Temporal['y'])
  correctly fail with an error
- Entity variables get constrained to empty (nullified)

This is intentional behavior, not information loss. To use actions in
temporal contexts, explicit conversion operators like `orKeep`, `weakFair`,
etc. must be used, which transform the effect signature from
`Read[r] & Update[u]` to `Temporal[r, u, ...]`.

The documentation clarifies:
- Why ['update', 'temporal'] is not in compatibleComponentKinds
- The purpose and behavior of the isDominant function
- Practical implications during effect unification
- How to properly compose actions with temporal operators

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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