Skip to content

Optisyntax#42

Merged
Bastacyclop merged 18 commits into
mainfrom
optisyntax
Jun 18, 2026
Merged

Optisyntax#42
Bastacyclop merged 18 commits into
mainfrom
optisyntax

Conversation

@Ultra-MG

@Ultra-MG Ultra-MG commented Jun 5, 2026

Copy link
Copy Markdown
Collaborator

Summary

This PR completes the optisyntax branch work.

Main changes:

  • Added three OptiLambda representations: Surface, Internal, and Fully-Typed Internal.
  • Integrated these representations into the printer, framework styles, and CLI flags.
  • Added trace/diff support for switching between C/C++ and the three OptiLambda views.
  • Updated the shared webviews with representation selectors.
  • Included an OptiLambda syntax documentation.

Notes:

  1. C/C++ remains the default output.
  2. The OptiLambda parser is still future work.

@Ultra-MG Ultra-MG requested review from Bastacyclop and charguer June 5, 2026 15:22
Comment thread lib/framework/show.ml
Comment thread lib/framework/runtime/trace.ml Outdated
Comment thread lib/optilambda/optilambda_syntax.md
Comment thread lib/optilambda/optilambda_syntax.md Outdated
downward loop, for example:

```optilambda
for<seq> i in n..0:-1

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Didn't we decide that it was better to use range(n, 0, -1) when the step was not trivial? Or was it for contracts?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

that was the plan. @Ultra-MG did you take inspiration from a specific language with this syntax ?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

i did not take inspiration from any language i just thought it made sense to have it this was but if you prefer the range one i can change it, it is a simple change. Just let me know if it is a necessary change

Comment thread tests_infra/optilambda/printcpp.ml
Comment thread tests_infra/optilambda/printer_basic.ml

@yannilefki yannilefki left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I don't see any issue with the code itself. I did not try to use it, but it seemed to work well when I came to check it out.
Overall, I would recommand 3~ish lines headers for every new file, describing what the file is doing, its interactions with the framework, and what problem it is solving.

Comment thread tests_infra/optilambda/printcpp_exp.cpp
Comment thread tools/open_diff.sh

@Bastacyclop Bastacyclop left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Thanks for the PR @Ultra-MG !

This looks good to me. We can merge once you address the minor comments that were raised. I think Arthur also requested some tweaks, so let me know if you want to integrate the tweaks in this PR or in a follow-up one.

@Bastacyclop Bastacyclop merged commit c2271dd into main Jun 18, 2026
1 check passed
@Bastacyclop Bastacyclop deleted the optisyntax branch June 18, 2026 08:01
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