0.4.3 - 2024-???
The main change is support for Isabelle2024.
- Support for Isabelle2024.
Implicits.javaBooleanConverter
,.javaIntConverter
,.javaLongConverter
: MLValue converters for the Java types Boolean, Integer, and Long. The Scala versions of these converters do not have the right types for use in Java.
- Methods of
Version
did output some bogus error messages in Isabelle2021 and earlier.
0.4.2 - 2023-09-25
The main change is support for Isabelle2023.
- Support for Isabelle2023.
Position
: New methodsline
,offset
,endOffset
,file
,id
to access the corresponding fields in the ML-type.extract
,extractUntil
to extract text from a string given position(s).TheoryHeader
: New methodname
to get the name of the theory.read
to parse a theory from a string.ToplevelState
: New methodsproofLevel
,mode
,isProofMode
etc.,proofStateDescription
,localTheoryDescription
.ToplevelState()
creates a toplevel based onPure
.Transition
: New Scala class. Represents A toplevel transition (roughly speaking one command in a theory file).JIsabelle
: New methodssetupSetVerbose
,setupSetUserDir
,setupSetWorkingDirectory
,setupSetSessionRoots
,setupSetLogic
to set the corresponding fields in aSetup
object from Java.
Isabelle
: Execution context is stored insideIsabelle
instance, and configured via[Setup](https://javadoc.io/doc/de.unruh/scala-isabelle_2.13/0.4.2/de/unruh/isabelle/control/Isabelle$$Setup.html).executionContext
. Mostscala-isabelle
methods now use that execution context.
None.
0.4.1 – 2022-11-27
Main changes are support for Isabelle2022 and improved support for handling of ML exceptions.
- Support for Isabelle2022.
Isabelle
: Can configure a differentExceptionManager
for handling exceptions in ML code (instead of raisingIsabelleMLException
s). SeeMLException.ExceptionManager
for an alternative to the default.- Added an ML value converter for
IsabelleMLException
s, seeMLException.simpleIsabelleMLExceptionConverter
andMLException.distinguishingIsabelleMLExceptionConverter
. Symbols
: Supporting Unicode subscript symbols when converting between Isabelle symbols and Unicode. (See constructor argumentprocessSubSuper
.)Symbols
: Specify fallback translations for symbols (only used if the symbols table has no translation). (See constructor argumentextraSymbolsLowPri
.)Version.versionFromIsabelleDirectory
: Guesses the version of an Isabelle distribution by looking at the Isabelle distribution directory (without initializing the Isabelle process).
IsabelleException
was renamed toIsabelleMLException
. It is only used raised when exceptions occur in ML code. UseIsabelleMiscException
for other purposes.IsabelleMLException
contains the actual ML exception objectIsabelleMLException
: The exception message contains the associated data of the exception (e.g., aTERM
exception will contain the terms in the message). This message is lazily computed when needed.- Isabelle is initialized with
quick_and_dirty
flagtrue
, this means imported theories can usesorry
.
None
0.4.0 – 2021-12-27
The main changes are support up to Isabelle2021-1, and better invocation of the Isabelle process (takes into account ROOT
files etc.).
- String interpolators for creating Isabelle terms/types (see
StringInterpolators
) - Support for up to Isabelle2021-1
- Added methods:
Term.fastType
returns the type of a term (without type checking).Context.setMode
sets the syntax mode (pattern/schematic/abbrev) for parsing terms/types.Theory.context
returns a context for this theory.Term.concreteRecursive
/Typ.concreteRecursive
converts a term/type recursively into a concrete term/type (i.e., represented fully inside the Scala process).ToplevelState.apply
initializes a new toplevel state based on a theory.ToplevelState.context
returns the proof context corresponding to a toplevel state.
- Debugging support:
- Environment variable
SCALA_ISABELLE_NO_CLEANUP
: If set (valuestrue
or1
), the temporary directory created by scala-isabelle are not removed on exit. - Environment variable
SCALA_ISABELLE_LOG_QUERIES
: If set, all queries from scala-isabelle to the Isabelle are logged (see header comment incontrol_isabelle_logged.ml
).
- Environment variable
- In ML, exception
Control_Isabelle.E_Data
added to wrap ML typeControl_Isabelle.data
as an exception (for storing in the object store).
- The Isabelle process is invoked with full PIDE context. In particular, this means that sessions are properly initialized the same way as when running Isabelle directly, and theory files can be found without needing to register directories using
Theory.registerSessionDirectories
. - Declarations in ML (e.g., via
Isabelle.executeMLCode
) do not affect the global Isabelle/ML namespace anymore but a separate namespace. Cterm.apply
/Ctyp.apply
avoid re-typechecking a term/typ that is already a cterm/ctyp when converting it to a cterm, when possible (optimization).IsabelleException
decodes Isabelle symbols in error messages to Unicode for better printing.Term.apply
/Typ.apply
now support Unicode strings when parsing terms/types from strings.
Setup.build
is currently ignored. (Isabelle will always check all theory files whether a build is needed.)
0.3.0 – 2020-11-05
The biggest changes include support for Windows, multi-threaded execution in the Isabelle process, as well as support for more ML types.
- Support for Windows (now runs on Linux, OS/X, Windows)
MLValueWrapper
: Utility class for adding support for new ML types (with corresponding Scala classes that simply reference them).AdHocConverter
: Utility class for adding support for new ML types very quickly (likeMLValueWrapper
but with less boilerplate but also less customizability).- Support for further ML types:
Position.T
(classPosition
)Thy_Header.header
(classTheoryHeader
)Thy_Header.keywords
(classKeywords
)Toplevel.state
(classToplevelState
)Path.T
(Java'sPath
viaPathConverter
)Mutex.mutex
(classMutex
)Proofterm.proof
(experimental support, classProofterm
)
- Support for commands sent from Isabelle to Scala (via
Control_Isabelle.sendToScala
, handled by custom handlerisabelleCommandHandler
). - Support for connecting to an already running Isabelle instance (experimental, no library support for establishin that connection,
see
SetupRunning
). - Class
Isabelle
supports to check/wait for successful initialization (by inheriting fromFutureValue
). - Class
Isabelle
cleans resources (Isabelle process) after garbage collection (calling.destroy
is optional). - Java support:
- Class
JPatterns
to allow pattern matching of terms/types in Java (based on java-patterns library). JIsabelle.setupSetBuild
to toggle thebuild
flag of an IsabelleSetup
.
- Class
- Added methods:
Utils.freshName
for generating fresh (randomized) names.Theory.mutex
returns a mutex for synchronizing theory operations.Thm.theoryOf
andContext.theoryOf
return theory behind a theorem/context.Isabelle.checkDestroyed
to assert that the Isabelle process is still available.Theory.mergeTheories
merges several theories into one.
- Supertrait
PrettyPrintable
for all classes that can invoke Isabelle for prettyprinting themselves.
- Execution of ML code in the Isabelle process is now multi-threaded.
(Several operations triggered from the Scala side are automatically executed concurrently.
Use
Mutex
if locking is needed.) - Method
pretty
in classesTerm
,Typ
,Thm
return Unicode (instead of Isabelle's internal encoding with\<...>
sequences). Use methodprettyRaw
if the old behavior is required. - Class
FutureValue
was moved from packagede.unruh.isabelle.mlvalue
tode.unruh.isabelle.misc
. - Class
Isabelle
does not take constructor parameterbuild
any more. Set this flag inSetup
instead. - Methods
MLValue.Converter.exnToValue
,.valueToExn
,.mlType
,MLStoreFunction
,MLRetrieveFunction
take additional implicit arguments of typesIsabelle
andExecutionContext
.
None
0.2.0 – 2020-10-01
The biggest changes include completed API documentation as well as improved support for loading theory files that are not in the session image.
- API documentation completed.
BigIntConverter
andDataConverter
: support forMLValue[BigInt]
,MLValue[Isabelle.Data]
Theory.apply(Path)
: Allows to load Isabelle theories from a file.Theory.registerSessionDirectories
,Theory.registerSessionDirectoriesNow
: Register directories containing theory files. Required to find imports of theories.mlvalue.Version
: Provides information about current Isabelle version.MLvalue.function0
,MLValue.compileFunction0
,MLFunction0
: Support forMLFunction
s withunit
input.Term
,Typ
have methodconcreteComputed
: Check whetherconcrete
has already been computed (before, onlyMLValueTerm
,MLValueTyp
has this).MLFunction0
...MLFunction7
now haveunsafeFromId(ID)
. Before, they only hasunsafeFromId(Future[ID])
.MLValue.removeFuture
: ConvertsFuture[MLValue[A]]
intoMLValue[A]
by moving the future inside theMLValue
.- Object
JIsabelle
with helper functions for accessingscala-isabelle
from Java. (Not much in there yet.)
Symbols.symbolsToUnicode
,Symbols.unicodeToSymbols
take additional optional argumentfailUnknown
: Controls whether to silently ignore conversion errors.MLStoreFunction.apply
: Removed implicitMLValue.Converter
argument.MLValue.compileFunction
: Implicit arguments renamed.Thm.cterm
renamed toThm.proposition
: Returns the proposition of the theorem.TFree.apply
,TVar.apply
: Thesort
argument is now aSeq[String]
instead ofString*
Type.unapply
replaced byType.unapplySeq
: Usecase Type(name, arg1, arg2, ...)
instead ofcase Type(name, Seq(arg1, arg2, ...)
now.Theory.importMLStructure
takes only one argument now. ThenewName
argument is gone, instead the new name of the imported structure is returned. (Two-argument version ofTheory.importMLStructure
is still available but deprecated.)- Constructor argument of
Isabelle.Setup
have a different order. (Invocation using named arguments preferred.)
MLRetrieveFunction.apply(ID)
,MLRetrieveFunction.apply(Future(ID))
: Prefer the type-safe variantMLRetrieveFunction.apply(MLValue[A])
. If the behavior of the removed functions is required, useMLRetrieveFunction.apply(MLValue.unsafeFromId(id))
.MLValue.compileFunctionRaw
:MLValue.compileFunction
is type-safe and preferred. For low-level (unsafe) compilation, useMLValue.compileValueRaw
instead.Cterm.mlValueTerm
,Ctyp.mlValueTyp
removed.