Skip to content

Conversation

@joehendrix
Copy link
Contributor

@joehendrix joehendrix commented Sep 5, 2025

This is a large PR that adds the ability to attach annotations to DDM subterms. This is used for source location information. This is inherently a large change since many operators need an additional argument and type level parameters are needed.

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

@joehendrix joehendrix changed the title Add position info to DDM. WIP: Add position info to DDM. Sep 5, 2025
@joehendrix joehendrix force-pushed the jhx/position_info branch 9 times, most recently from ea232b3 to 338c03d Compare September 24, 2025 16:58
@joehendrix joehendrix force-pushed the jhx/position_info branch 5 times, most recently from f8f0277 to 18af9f2 Compare September 26, 2025 08:29
@joehendrix joehendrix force-pushed the jhx/position_info branch 2 times, most recently from 39fa709 to 8fabcd1 Compare September 26, 2025 23:29
@joehendrix joehendrix force-pushed the jhx/position_info branch 2 times, most recently from 6fb9ea4 to 9c54839 Compare September 30, 2025 21:20
github-merge-queue bot pushed a commit that referenced this pull request Oct 6, 2025
This introduces a datatype for a range of characters in a source file.
It will be used for embedding source information in the AST for #112 ,
but is currently only being added to info trees.

This PR also removes the extra syntax elements from error handling as
messages contain source information.


By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
@joehendrix joehendrix force-pushed the jhx/position_info branch 2 times, most recently from b29241e to 898ec58 Compare October 7, 2025 05:09
github-merge-queue bot pushed a commit that referenced this pull request Oct 21, 2025
This is a large PR that makes DDM changes to support source location
information in #112.

* Updates SyntaxCat to use a structure instead of algebraic data type.
This improves efficiency of accessing head.
* ArgDecls is a singleton structure instead of type abbreviation and
coercisions with array no longer allowed. This will allow additional
invariants to be added such as uniqueness of names.
* There is additional checking for undefined names to reduce spurious
errors when module imports cannot be found.

By submitting this pull request, I confirm that you can use, modify,
copy, and redistribute this contribution, under the terms of your
choice.
@joehendrix joehendrix changed the title WIP: Add position info to DDM. Add position info to DDM. Oct 21, 2025
@joehendrix joehendrix marked this pull request as ready for review October 21, 2025 23:11
Copy link
Contributor

@aqjune-aws aqjune-aws left a comment

Choose a reason for hiding this comment

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

  • I checked that byteIdx is correctly appearing by probing a random example, specifically by running #eval Command.ofAst example1.commands[0] at StrataTest/DDM/Comment.lean . However, I found that the byteIdx is counted from the beginning of the .lean file, not from the beginning of #strata. Which option should we choose?

  • I found that Examples/Lean/BoogieLite.lean was breaking again. Should we add lake build StrataExamples..? On my Mac, this command seems to fail for other reasons as well, however.

@aqjune-aws aqjune-aws requested a review from a team as a code owner October 27, 2025 20:43
@aqjune-aws aqjune-aws enabled auto-merge October 27, 2025 20:47
@aqjune-aws aqjune-aws added this pull request to the merge queue Oct 27, 2025
Merged via the queue into main with commit 900a401 Oct 27, 2025
14 of 15 checks passed
@aqjune-aws aqjune-aws deleted the jhx/position_info branch October 27, 2025 22:43
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