Skip to content

Comments

Add documentation to Core.Procedure#433

Open
tautschnig wants to merge 10 commits intomainfrom
tautschnig/procedure-docs
Open

Add documentation to Core.Procedure#433
tautschnig wants to merge 10 commits intomainfrom
tautschnig/procedure-docs

Conversation

@tautschnig
Copy link
Contributor

Module-level documentation covering:

  • Concrete syntax of procedure declarations
  • Parameter modes (input vs output) and their semantics
  • Specification: modifies, requires, ensures
  • Free specifications (free requires, free ensures)
  • Labels on specification clauses
  • The old(expr) expression and its semantics (distribution, idempotence, global-only)
  • Call semantics (assert preconditions → havoc → assume postconditions)
  • Body verification
  • Type parameters (polymorphism)
  • A concrete example from the repository

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Module-level documentation (/-! ... -/) covering:
- Concrete syntax of procedure declarations
- Parameter modes (input vs output) and their semantics
- Specification: modifies, requires, ensures
- Free specifications (free requires, free ensures)
- Labels on specification clauses
- The old(expr) expression and its semantics (distribution, idempotence, global-only)
- Call semantics (assert preconditions → havoc → assume postconditions)
- Body verification
- Type parameters (polymorphism)
- A concrete example from the repository
Copilot AI review requested due to automatic review settings February 17, 2026 11:55
@tautschnig tautschnig requested a review from a team as a code owner February 17, 2026 11:55
@tautschnig
Copy link
Contributor Author

It may be best to review this as rendered at docs/verso/_out/api/Strata/Languages/Core/Procedure.html.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds comprehensive module-level documentation to Core.Procedure, describing Strata Core procedures as the main verification unit and documenting their syntax, specification constructs (modifies/requires/ensures), free clauses, labels, old(expr), call semantics, and polymorphic type parameters.

Changes:

  • Added a large module doc comment explaining procedure syntax and verification semantics.
  • Added/expanded docstrings on Procedure.Header, Procedure.CheckAttr, Procedure.Check, Procedure.Spec, and Procedure.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

atomb
atomb previously approved these changes Feb 17, 2026
Copy link
Contributor

@atomb atomb left a comment

Choose a reason for hiding this comment

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

It'd be good to address the Copilot suggestions, but otherwise I think this is good.

One question I have, and this might be for a future PR, is how much of this text should be in the Core language definition document.

andrewmwells-amazon and others added 2 commits February 17, 2026 10:44
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@tautschnig tautschnig dismissed stale reviews from andrewmwells-amazon and atomb via 63fb685 February 18, 2026 10:46
@tautschnig
Copy link
Contributor Author

One question I have, and this might be for a future PR, is how much of this text should be in the Core language definition document.

Added as further commit.

atomb
atomb previously approved these changes Feb 18, 2026
@atomb
Copy link
Contributor

atomb commented Feb 18, 2026

Now that the Core.Procedure module is imported into the Verso docs, there are a few errors building it:

  • Core.Procedure.CheckAttr.Free doesn't have a docstring
  • Core.Procedure.CheckAttr.Default doesn't have a docstring
  • Factory is ambiguous

@shigoel shigoel enabled auto-merge February 18, 2026 16:58
@tautschnig
Copy link
Contributor Author

Now that the Core.Procedure module is imported into the Verso docs, there are a few errors building it:

* `Core.Procedure.CheckAttr.Free` doesn't have a docstring

* `Core.Procedure.CheckAttr.Default` doesn't have a docstring

* `Factory` is ambiguous

Fixed in f8c433f.

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.

3 participants