Skip to content

Commit 8fabd68

Browse files
authored
release: v2.2.3+0.1.8+8.19
Merge pull request #32 from JetBrains-Research/v2.2.3-dev
2 parents bb642df + 9ad83c4 commit 8fabd68

File tree

15 files changed

+809
-1120
lines changed

15 files changed

+809
-1120
lines changed

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
build-and-test:
2828
strategy:
2929
matrix:
30-
os: [ubuntu-latest]
30+
os: [ubuntu-latest, macos-latest]
3131
ocaml-compiler: [4.14]
3232

3333
runs-on: ${{ matrix.os }}
@@ -111,6 +111,7 @@ jobs:
111111
dryRun: true
112112

113113
- name: Upload Extension Package as Artifact
114+
if: matrix.os == 'ubuntu-latest'
114115
id: upload-artifact
115116
uses: actions/upload-artifact@v4
116117
with:
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
name: Deploy Jekyll with GitHub Pages dependencies preinstalled
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
9+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
16+
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
17+
concurrency:
18+
group: "pages"
19+
cancel-in-progress: false
20+
21+
jobs:
22+
# Build job
23+
build:
24+
runs-on: ubuntu-latest
25+
steps:
26+
- name: Checkout
27+
uses: actions/checkout@v4
28+
- name: Setup Pages
29+
uses: actions/configure-pages@v5
30+
- name: Build with Jekyll
31+
uses: actions/jekyll-build-pages@v1
32+
with:
33+
source: ./
34+
destination: ./_site
35+
- name: Upload artifact
36+
uses: actions/upload-pages-artifact@v3
37+
38+
# Deployment job
39+
deploy:
40+
environment:
41+
name: github-pages
42+
url: ${{ steps.deployment.outputs.page_url }}
43+
runs-on: ubuntu-latest
44+
needs: build
45+
steps:
46+
- name: Deploy to GitHub Pages
47+
id: deployment
48+
uses: actions/deploy-pages@v4

.gitmodules

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[submodule "dataset/imm"]
22
path = dataset/imm
33
url = https://github.com/weakmemory/imm.git
4-
branch = coq819
54
ignore = dirty

.vscode/settings.json

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,19 @@
11
// Place your settings in this file to overwrite default and user settings.
22
{
33
"files.exclude": {
4-
"**/*.vo": true,
5-
"**/*.vok": true,
6-
"**/*.vos": true,
7-
"**/*.aux": true,
8-
"**/*.glob": true,
94
"**/.git": true,
105
"**/.svn": true,
116
"**/.hg": true,
127
"**/CVS": true,
138
"**/.DS_Store": true,
149
"**/Thumbs.db": true,
15-
"out": false
10+
"**/*.vo": true,
11+
"**/*.vok": true,
12+
"**/*.vos": true,
13+
"**/*.aux": true,
14+
"**/*.glob": true,
15+
"out": false,
16+
"**/*_cp_aux.v": true
1617
},
1718
"search.exclude": {
1819
"out": true // set this to false to include "out" folder in search results

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# Changelog
22

3+
## 2.2.3
4+
5+
- Fix critical issue with proof checking. Before, when the choices parameter was high, sometimes the wrong proof could be generated and not identified as incorrect.
6+
- Updated CI with a build for MacOS.
7+
- Deploy the README to gh-pages from CI using jekyll.
8+
- Fix and extend README, benchmarking report.
9+
310
## 2.2.2
411

512
- Fix and refactor CI. Publishing a new release is now a manual process.

README.md

Lines changed: 62 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
1-
# coqpilot
1+
# CoqPilot
22

33
*Authors:* Andrei Kozyrev, Gleb Solovev, Nikita Khramov, and Anton Podkopaev, [Programming Languages and Tools Lab](https://lp.jetbrains.com/research/plt_lab/) at JetBrains Research.
44

5-
`Coqpilot` is a [Visual Studio Code](https://code.visualstudio.com/) extension that is designed to help automate writing of Coq proofs. It uses Large Language Models to generate multiple potential proofs and then uses [coq-lsp](https://github.com/ejgallego/coq-lsp) to typecheck them. It substitutes the proof in the editor only if a valid proof is found.
5+
`CoqPilot` is a [Visual Studio Code](https://code.visualstudio.com/) extension that is designed to help automate writing of Coq proofs. It uses Large Language Models to generate multiple potential proofs and then uses [coq-lsp](https://github.com/ejgallego/coq-lsp) to typecheck them. It substitutes the proof in the editor only if a valid proof is found.
66

77
# Table of Contents
88

9-
- 🚀 [Coqpilot Overview](#coqpilot)
9+
- 🚀 [CoqPilot Overview](#coqpilot)
1010
- 📋 [Requirements](#requirements)
1111
- 🔍 [Brief Technical Overview](#brief-technical-overview)
1212
- 💡 [Example Usage](#example-usage)
@@ -16,10 +16,13 @@
1616
- ⚠️ [Important Information](#important)
1717
- ⚙️ [Extension Settings](#extension-settings)
1818
- 📐 [Guide to Model Configuration](#guide-to-model-configuration)
19-
- 🎛 [How VsCode settings work](#how-vscode-settings-work)
19+
- 🎛 [How VSCode settings work](#how-vscode-settings-work)
2020
- 🧰 [Model Configuration](#model-configuration)
2121
- 📌 [Contributed Commands](#contributed-commands)
2222
- 📊 [Benchmark](#benchmark)
23+
- 🧩 [Integrating other solutions](#integrating-other-solutions)
24+
- 🧠 [Tactician](#tactician)
25+
- 🔨 [CoqHammer](#coqhammer)
2326
- 🔜 [Future Plans](#future-plans)
2427
- 📜 [Release Notes](#release-notes)
2528

@@ -29,9 +32,9 @@
2932

3033
## Brief technical overview
3134

32-
`Coqpilot` fetches proofs from multiple completion services. Now we support:
35+
`CoqPilot` fetches proofs from multiple completion services. Now we support:
3336
- a service that always returns a list of pre-defined in the settings tactics/coq sentances.
34-
- an [open-ai](https://openai.com) gpt service.
37+
- an [OpenAI](https://openai.com) gpt service.
3538
- a service that fetches completions from the model, running locally in LM Studio.
3639
- a service that uses Grazie platform (only for JetBrains employees for now).
3740

@@ -43,19 +46,19 @@ For each `admit.` present in the file, an independent completion process is issu
4346

4447
As soon as at least one valid proof is found, it is substituted in the editor and the process is finished.
4548

46-
**Notice:** By default, coqpilot sets only `predefinedProofs` and `open-ai` services. The first one tries `auto.` tactic and the second one has one model -- `gpt-3.5`. By default the `apiKey` for open-ai is not set, i.e. set to `None`. Do not forget to change that in the settings before using this service.
49+
**Notice:** By default, CoqPilot sets only `PredefinedProofs` and `OpenAI` services. The first one tries `auto.` tactic and the second one has one model -- `gpt-3.5`. By default the `apiKey` for OpenAI is not set, i.e. set to `None`. Do not forget to change that in the settings before using this service.
4750

48-
**Notice:** File `settings.json` declares not all the settings, but those that are overriden from the defaults. Keep that in mind, if you want, for example, to turn off the `open-ai` service. For that, you would need to override the corresponding setting with an empty array, but not delete this property from the file.
51+
**Notice:** File `settings.json` declares not all the settings, but those that are overriden from the defaults. Keep that in mind, if you want, for example, to turn off the `OpenAI` service. For that, you would need to override the corresponding setting with an empty array, but not delete this property from the file.
4952

5053
## Example usage
5154

52-
`Coqpilot` only runs on an opened `coq` file. User can:
53-
- Run `coqpilot` with some chosen selection to try substitute all admits in this selection.
55+
`CoqPilot` only runs on an opened `coq` file. User can:
56+
- Run `CoqPilot` with some chosen selection to try substitute all admits in this selection.
5457

5558
<img src="./etc/gif/solve-in-selection.gif"/>
5659

57-
- Run `coqpilot` to try substitute all admits in the file.
58-
- Run `coqpilot` to substitute the proof for the admit if there is one under the cursor.
60+
- Run `CoqPilot` to try substitute all admits in the file.
61+
- Run `CoqPilot` to substitute the proof for the admit if there is one under the cursor.
5962

6063
## Installation
6164

@@ -72,13 +75,13 @@ With coq-lsp, extension should have everything it needs to run.
7275

7376
### Building locally
7477

75-
First, clone the Coqpilot repository and navigate into its directory.
78+
First, clone the CoqPilot repository and navigate into its directory.
7679
```bash
7780
git clone https://github.com/JetBrains-Research/coqpilot.git
7881
cd coqpilot
7982
```
8083

81-
To build the extension locally, you'll need Node.js installed. The recommended way to manage Node.js versions is by using `nvm`. From the Coqpilot root directory, execute:
84+
To build the extension locally, you'll need Node.js installed. The recommended way to manage Node.js versions is by using `nvm`. From the CoqPilot root directory, execute:
8285
```bash
8386
nvm use
8487
```
@@ -105,15 +108,15 @@ The extension's architecture overview is stored in the [ARCHITECTURE.md](https:/
105108

106109
## Important
107110

108-
Coqpilot generates aux files with `_cp_aux.v` suffix. Sometimes when generation fails with exception, it is possible that such file will not be deleted. When a project is open, extension shall show a window that asks if you want to add such files to the local project gitignore.
111+
CoqPilot generates aux files with `_cp_aux.v` suffix. Sometimes when generation fails with exception, it is possible that such file will not be deleted. When a project is open, extension shall show a window that asks if you want to add such files to the local project gitignore.
109112

110113
Moreover, this repository contains a script for your convenience that adds the format of such files to the global gitignore file on your system.
111114
- Copy the [`set_gitignore.sh`](https://github.com/K-dizzled/coqpilot/blob/main/set_gitignore.sh) file to your computer. Then:
112115
```bash
113116
chmod +x set_gitignore.sh
114117
./set_gitignore.sh
115118
```
116-
It will add the format of coqpilot aux files to your global gitignore file on the system, so that even if coqpilot forgets to clean files up, they will not be marked as new files in git.
119+
It will add the format of CoqPilot aux files to your global gitignore file on the system, so that even if CoqPilot forgets to clean files up, they will not be marked as new files in git.
117120
Comment: Such files are not visible in the vscode explorer, because plugin adds them to the `files.exclude` setting on startup.
118121

119122
## Extension Settings
@@ -125,11 +128,11 @@ This extension contributes the following settings:
125128

126129
* `coqpilot.predefinedProofsModelsParameters`, `coqpilot.openAiModelsParameters`, `coqpilot.grazieModelsParameters` and `coqpilot.lmStudioModelsParameters`:
127130

128-
Each of these settings are modified in `settings.json` and contain an array of models from this service. Each model will be used for generation independantly. Multiple models for a single service could be defined. For example, you can define parameters for two open-ai gpt models. One would be using `gpt-3.5` and the other one `gpt-4`. CoqPilot will first try to generate proofs using the first model, and if it doesn't succeed, it will try the second one. This way coqpilot iterates over all services (currently 4 of them) and for each service it iterates over all models.
131+
Each of these settings are modified in `settings.json` and contain an array of models from this service. Each model will be used for generation independantly. Multiple models for a single service could be defined. For example, you can define parameters for two OpenAI gpt models. One would be using `gpt-3.5` and the other one `gpt-4`. CoqPilot will first try to generate proofs using the first model, and if it doesn't succeed, it will try the second one. This way CoqPilot iterates over all services (currently 4 of them) and for each service it iterates over all models.
129132

130133
## Guide to Model Configuration
131134

132-
### How VsCode settings work
135+
### How VSCode settings work
133136

134137
A common way to change the settings, contributed by the extension, is to open the `settings.json` file, or click `Edit in settings.json` on some field in settings UI. Say, by default extension contributes field (setting) `A` with default state `a'`. When you click edit, this field is being copied to the `settings.json` file with the value `a'`:
135138
```json
@@ -143,11 +146,11 @@ From that moment and until you completely remove this field from the `settings.j
143146

144147
As mentioned in the previous section, at the moment, four services are supported.
145148

146-
By default, only `predefinedProofs` and `open-ai` services are enabled. The first one tries `auto.` tactic and the second one has one model -- `gpt-3.5`. Models for other services are defaulted with empty arrays. That denotes that we do not create any models from these services.
149+
By default, only `PredefinedProofs` and `OpenAI` services are enabled. The first one tries `auto.` tactic and the second one has one model -- `gpt-3.5`. Models for other services are defaulted with empty arrays. That denotes that we do not create any models from these services.
147150

148151
Each and every service is configured with an array of independent models. This was made to easily experiment with different models and their parameters.
149152

150-
The simplest service to configure is `predefinedProofs`:
153+
The simplest service to configure is `PredefinedProofs`:
151154
```json
152155
{
153156
"coqpilot.predefinedProofsModelsParameters": [
@@ -164,7 +167,7 @@ The simplest service to configure is `predefinedProofs`:
164167
```
165168
The `modelId` property may be any string you like, but it should be unique for each model. This way, CoqPilot will be able to correctly tell you which model might have configuration issues.
166169

167-
The most commonly used service is `open-ai` (`grazie` and `lmStudio` are configured very similarly).
170+
The most commonly used service is `OpenAI` (`Grazie` and `LmStudio` are configured very similarly).
168171
```json
169172
{
170173
"coqpilot.openAiModelsParameters": [
@@ -186,7 +189,7 @@ The most commonly used service is `open-ai` (`grazie` and `lmStudio` are configu
186189
],
187190
}
188191
```
189-
Don't forget to set up the `apiKey` field, by default it is set to `None`. Moreover, make sure that your open-ai key is valid and has enough credits to run the models. If you create a free version of the key, it will not work (it has some weird limitations like 5 requests per inf). You can check you key here: https://platform.openai.com/playground/chat. If the playground works, the key is probably valid.
192+
Don't forget to set up the `apiKey` field, by default it is set to `None`. Moreover, make sure that your OpenAI key is valid and has enough credits to run the models. If you create a free version of the key, it will not work (it has some weird limitations like 5 requests per inf). You can check you key here: https://platform.openai.com/playground/chat. If the playground works, the key is probably valid.
190193

191194
Multi-round profile setting configures the number of attempts to fix the proof if it is incorrect. If the proof is incorrect, the compiler message is sent to the LLM with a request to repair it. The number of round attempts for one proof is set by `maxRoundsNumber`. The number of choices for the proof fixing is set by `proofFixChoices`. By default, values are set to 1 and that means that **NO** attempts to fix the proof are made. That means that proof is only being generated once. That's equivalent to say that multi-round fixing is turned off. 0 is not a valid value for `maxRoundsNumber` nor for `proofFixChoices`.
192195

@@ -236,6 +239,42 @@ First things first, the process of running the benchmark is not perfectly automa
236239
npm run benchmark
237240
```
238241

242+
## Integrating other solutions
243+
244+
As CoqPilot supports adding predefined commands to try as completion both in the plugin and the benchmark, you can integrate `Coq` generation methods, that contribute a specific tactic and are triggered from OCaml.
245+
246+
### Tactician
247+
248+
[Tactician](https://coq-tactician.github.io) is a tactic learner and prover for the Coq Proof Assistant. To install:
249+
```bash
250+
opam pin coq-tactician https://github.com/coq-tactician/coq-tactician.git#coq8.19
251+
opam install coq-tactician
252+
tactician enable
253+
```
254+
255+
To use completion tactics from `Tactician` you need to add an import:
256+
```coq
257+
From Tactician Require Import Ltac1.
258+
```
259+
260+
After that, add the `synth.` tactic to the predefined tactics in the settings.
261+
262+
Neural `Graph2Tac` completion unfortunately requires `coq < 8.12~`.
263+
264+
### CoqHammer
265+
266+
[CoqHammer](https://coqhammer.github.io) is an automated reasoning tool for Coq. To install:
267+
```bash
268+
opam install coq-hammer
269+
```
270+
271+
Import the tactics:
272+
```coq
273+
From Hammer Require Import Hammer.
274+
```
275+
276+
Then add the `hammer.`, `sauto.` or any other tactic from `CoqHammer` to the predefined tactics in the settings.
277+
239278
## Future plans
240279

241280
- Currently the user needs to manually enter the nix shell to get the correct environment for the benchmarks. We are working on automating this process.
@@ -244,4 +283,4 @@ First things first, the process of running the benchmark is not perfectly automa
244283

245284
## Release Notes
246285

247-
Release notes could be found in the [CHANGELOG.md](https://github.com/JetBrains-Research/coqpilot/blob/refactor/CHANGELOG.md) file.
286+
Release notes could be found in the [CHANGELOG.md](https://github.com/JetBrains-Research/coqpilot/blob/main/CHANGELOG.md) file.

_config.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
remote_theme: pages-themes/[email protected]
2+
plugins:
3+
- jekyll-remote-theme
4+
5+
title: CoqPilot

0 commit comments

Comments
 (0)