Skip to main content

Isabelle REPL

Unofficial support for Isabelle's Read-Eval-Print-Loop.

Features

  • Python Client, easy for Machine Learning.
  • Full support for all Isabelle commands
  • Tracing the proof state and the output panel for each step of evaluation.
    • Plugin: collecting data from Isabelle's internal representations by plugins written in Isabelle/ML (example).
  • Socket based remote communication
  • Socket based Concurrency
  • State rollback (example)
  • Parsing terms & Retrival of lemmas (example)
  • Sledgehammer (example)
  • Retrivial of contextual information including assumptions, local facts, fixed terms, fixed types, and goals, in either the pretty-printed form or S expression (example).
  • Convertion between Isabelle's ASCII and Unicode (example)

Installation

We only support Isabelle2024. Since Isabelle2025 is going to release, the support for Isabelle2023 will not be updated any more.

Ensuring <ISABELLE-BASE-DIRECTORY>/bin is in your $PATH environment

git clone https://github.com/xqyww123/Isa-REPL.git
cd Isa-REPL
git checkout $(isabelle version) # Error can raise if you are using an unsupported version of Isabelle
isabelle components -u .
pip install IsaREPL

Start up the REPL server

# merely an example:
./repl_server.sh 127.0.0.1:6666 HOL ./tmp -o threads=16
# Note, you must explicitly indicate the number of cpu cores that you want to use,
# otherwise, Isabelle only takes 8 core by default

Run ./repl_server.sh to see the full explanation of the arguments and options.

Example Clients

Every interface of our client is will documented (it is highly recommended to read our source). Some examples are given in the example folder.

# Run an example
./examples/example_eval.py 127.0.0.1:6666

To evaluate a whole theory file

./examples/eval_file.py 127.0.0.1:6666 $(isabelle getenv -b ISABELLE_HOME)/src/HOL/List.thy

Notes

Known Issues

The REPL server (or the Isabelle system) becomes unstable when the number of parallel threads exceeds 100. We suggest to launch multiple servers if your machine has more than 64 cpu cores, and give every server at most 64 cores by setting option -o threads=64

Documents

All documents are given as docstrings attaching to Python client interfaces, see the source.

Concurrency

This REPL supports concurrent evaluation of multiple files. However, to ensure proper error tracking and result tracing, it disables Isabelle's concurrency between commands within a single theory file. While Isabelle typically executes by commands asynchronously (continuing to the next command before completion), this REPL enforces synchronous evaluation. Each command must complete before the next begins, allowing for accurate capture and reporting of any failures.

Sledgehammer (via our auto_sledgehamemr wrapper, see example) is still concurrent.

Communication Protocol

It is possible to implement a client in other languages. However, the document for the communication protocol is not provided and I refer you to read our source code, as it should be simple enough.

Contribution

Feel free to open any GitHub issue if you have any feature requests.

I am not a professional python developer, so contribution is highly welcome to enrich the client's features.

Release files for IsaREPL 0.14.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for IsaREPL 0.14.1
File Size Uploaded
isarepl-0.14.1.tar.gz 30.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for IsaREPL 0.14.1
File Interpreter ABI Platform
isarepl-0.14.1-py3-none-any.whl Python 3 none any Details

Total release size: 65.0 kB

Release files / isarepl-0.14.1.tar.gz

Download URL isarepl-0.14.1.tar.gz
Size 30.0 kB
Tags Source
SHA-256 checksum
How to use checksums
be5456f4dde1852aeb32eb2ee64b64480d79304c72538698b5eba7ad4dcec333
BLAKE2b-256 checksum
How to use checksums
4e4b2f4aea93811a77074526227503f38e3f57c3684b27b8ca3e86bb6d4cfe0e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release files / isarepl-0.14.1-py3-none-any.whl

Download URL isarepl-0.14.1-py3-none-any.whl
Size 35.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
fd8c2d96420cc6f1760daaa9ba79dd5d285ff6596cc40f1448731604c61570e8
BLAKE2b-256 checksum
How to use checksums
a3ebc0bac0669be4baec306cf90b1b3ca10f58ef49605343d87aa3a2f267f58b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.13.11

Release history Release notifications | RSS feed

This release

0.14.1 This release

2 release files

0.11.2

2 release files

0.10.0

2 release files

0.9.11

2 release files

0.9.9

2 release files

0.9.8

2 release files

0.9.7

2 release files

0.9.4

2 release files

0.9.2

2 release files

0.9.0

2 release files

0.8.1

2 release files

0.8.0

2 release files

0.7.1

2 release files

0.6.1

2 release files

0.6.0

2 release files

0.5.1

1 release file

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page