Skip to content

Add goal printing flags (-upto, -lastgoals) and LLM agent guide#944

Merged
strub merged 1 commit intoEasyCrypt:mainfrom
namasikanam:main
Apr 11, 2026
Merged

Add goal printing flags (-upto, -lastgoals) and LLM agent guide#944
strub merged 1 commit intoEasyCrypt:mainfrom
namasikanam:main

Conversation

@namasikanam
Copy link
Copy Markdown
Collaborator

@namasikanam namasikanam commented Mar 20, 2026

Add two new flags for the easycrypt CLI to support LLM coding agents:

  • -upto <pos>: compile up to a given position and print goals there
  • -lastgoals: print the last unproven goals

Also add a dedicated llm command mode and an LLM agent guide
(doc/llm/CLAUDE.md) documenting EasyCrypt tactics and workflow for
use with AI coding assistants.

@fdupress
Copy link
Copy Markdown
Member

Extend and use LSP instead.

@strub
Copy link
Copy Markdown
Member

strub commented Apr 7, 2026

Reopening (I changed my mind). I will review it. I don't think these are the exact options that we want and this will allow LLM to have a rough interface to EasyCrypt when the (to come) MCP is not in used.

@strub
Copy link
Copy Markdown
Member

strub commented Apr 7, 2026

@namasikanam Can you explain what instructions you give to an LLM to use these options? Maybe you could document?

@namasikanam
Copy link
Copy Markdown
Collaborator Author

@strub These are the instructions I gave. They simply explain the option and the tactic.

* The command for easycrypt is `easycrypt compile -no-eco -lastgoals -script blabla.ec`, where the option `-lastgoals` are for printing the last unproven goals when printing.
* You can use `-upto LINE` or `-upto LINE:COL` to compile up to a position and print proof goals there. If the compilation fails, the last unproven goals should be printed.

I can document them. I think they are already documented in the help message. If they need better documenting, do you think where is the best place? Maybe the main readme?

For an MCP of EC, I think it's better to have two modes. 1. compilation mode, which are on the top of easycrypt compile with some options, where coding agent can edit files and compile and see where it gets stuck. 2. interaction mode, which is based on LSP, where coding agent can derive proofs step by step.

My design of the usage of these two modes follows how human deals with EC proofs. The compilation mode is used globally to check whether a file is finished or quickly jump to the sticking point, while the interaction mode is used locally to figure out how to close a proof.

@strub strub force-pushed the main branch 2 times, most recently from 5bd4450 to 9ecad21 Compare April 9, 2026 12:27
Add two new flags for the `easycrypt` CLI to support LLM coding agents:
- `-upto <pos>`: compile up to a given position and print goals there
- `-lastgoals`: print the last unproven goals

Also add a dedicated `llm` command mode and an LLM agent guide
(doc/llm/CLAUDE.md) documenting EasyCrypt tactics and workflow for
use with AI coding assistants.
@strub strub changed the title Two flags for printing goals: -upto and -lastgoals Add goal printing flags (-upto, -lastgoals) and LLM agent guide Apr 11, 2026
@strub strub enabled auto-merge April 11, 2026 07:14
@strub strub added this pull request to the merge queue Apr 11, 2026
Merged via the queue into EasyCrypt:main with commit fe9fba3 Apr 11, 2026
16 checks passed
@namasikanam
Copy link
Copy Markdown
Collaborator Author

namasikanam commented Apr 11, 2026

It seems that the last four commits in the main branch may have been unintentionally reverted by the merged commit of this PR :)

Maybe we can revert this PR, and re-do a clean PR which does not touch other modifications?

@alleystoughton
Copy link
Copy Markdown
Member

It seems that the last four commits in the main branch may have been unintentionally reverted by the merged commit of this PR :)

Maybe we can revert this PR, and re-do a clean PR which does not touch other modifications?

Just making sure @strub saw this.

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.

4 participants