Stream: Archive Mirror: Isabelle Users Mailing List

Topic: [isabelle] Isabelle as an SML environment and IDE


view this post on Zulip Email Gateway (Aug 19 2022 at 16:52):

From: Aleks Kissinger <aleks0@gmail.com>
It recently came up on the Poly/ML mailing list that Isabelle/jEdit
makes a pretty efficient SML IDE these days. I manage a fairly large
SML project called Quantomatic, so I thought I'd have a go at getting
a setup to work. I've got a setup now that I am pretty happy with, so
I thought I'd share my results. Hopefully other people will find this
helpful.

Quantomatic is fairly unique in that it is designed to run inside of
Isabelle or as a standalone project. As a result, the whole codebase
is implemented on top of an Isabelle/ML-like environment, obtained by
importing chunks of the ML code in Pure. This can be done by copying
src/Pure from Isabelle 2014 into an SML project and using this file:

https://github.com/Quantomatic/quantomatic/blob/integration/core/isabelle_env.ML

In the past, we used a slightly hacked-up version of Pure, but for the
sake of maintainability, we now use an exact copy.

The project itself is loaded with special "thy" files that only
contain comments and "ML_file" commands. These can be run from inside
Isabelle/jEdit (in the "real" Isabelle/ML environment), or they can be
imported in poly/ML with the function "use_thy":

https://github.com/Quantomatic/quantomatic/blob/integration/core/use_thy.ML

This implements a baby version of the outer syntax parser, which
ignores imports and translates the ML_file commands into use
statements. This makes the external ROOT.ML tiny and easy to maintain:

https://github.com/Quantomatic/quantomatic/blob/integration/core/ROOT.ML

This can be executed with, e.g. "poly --use ROOT.ML"

view this post on Zulip Email Gateway (Aug 19 2022 at 16:53):

From: Omar Montano Rivas <omarmrivas@gmail.com>
Really useful. Thanks for sharing.

Best,
Omar.


Last updated: May 01 2024 at 20:18 UTC