Fix stale and incorrect inline docs across the rewriting/saturation packages#24
Merged
jonathanvdc merged 2 commits intomainfrom Mar 27, 2026
Merged
Fix stale and incorrect inline docs across the rewriting/saturation packages#24jonathanvdc merged 2 commits intomainfrom
jonathanvdc merged 2 commits intomainfrom
Conversation
…GraphWithRecordedApplications package, Rewrite.apply doc, CommandSchedule.applyImmutable spurious param, EGraph.scala formatting, purely-functional claim, StochasticRuleApplication.withoutCaching, and random bug" Agent-Logs-Url: https://github.com/jonathanvdc/foresight/sessions/b1a9817e-2398-4f10-959c-e417b3ed5e6d Co-authored-by: jonathanvdc <9839946+jonathanvdc@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Update inline documentation to sync with repo changes
Fix stale and incorrect inline docs across the rewriting/saturation packages
Mar 27, 2026
jonathanvdc
requested changes
Mar 27, 2026
Owner
jonathanvdc
left a comment
There was a problem hiding this comment.
Good work so far. I notice that this sentence in eqsat/package.scala is still out of date.
All core data types are persistent values: applying a command, running a rule, or performing extraction yields a new e-graph or analysis result without modifying the original
JMH comparison (baseline vs PR)
Note: < 1.0× means faster on PR; > 1.0× means slower. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Several inline docs had drifted out of sync with the codebase: renamed types, removed APIs, wrong package paths, and incorrect behavioral descriptions.
Stale API references
CommandQueue→CommandSchedule/CommandScheduleBuilder:CommandQueueno longer exists. Updated all references inRewrite.scala,Rule.scala,Applier.scala,rewriting/package.scala, andeqsat/package.scala. Example inRule.scalanow shows the real batching pattern viaCommandScheduleBuilder.EGraphWithRecordedApplicationswrong package: Was referenced asforesight.eqsat.saturation.*inrewriting/package.scalaandPortableMatch.scala; actual location isforesight.eqsat.immutable.*.SearchAndApply.withoutCaching/.withCaching: Neither exists. Fixed toSearchAndApply.immutable/.immutableWithCachinginStochasticRuleApplication.scalaandrewriting/package.scala.Incorrect behavioral descriptions
Rewrite.apply: Doc claimed "returned without mutating the e-graph" — the method operates onmutable.EGraphand mutates in place.@returnalso incorrectly said it returned the e-graph instead ofBoolean.CommandSchedule.applyImmutable: Had a spurious@param reificationwith no corresponding parameter.eqsat/package.scala: Claimed all e-graphs are "purely functional"; corrected to acknowledge both the immutable and mutable variants.Formatting
immutable/EGraph.scala: Removed extraneous* *double-asterisk artifacts in the class Scaladoc.Bug fix (surfaced by doc review)
StochasticRuleApplication.apply: The overload accepting arandom: Randomparameter documented and accepted it but silently discarded it, always constructing withRandom(0). Fixed to passrandomthrough to the constructor.⚡ Quickly spin up Copilot coding agent tasks from anywhere on your macOS or Windows machine with Raycast.