Packages

package mlvalue

This package contains classes for type safe manipulation of values stored in a running Isabelle process (managed by an instance of control.Isabelle). See MLValue for an introduction.

Source
package.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. mlvalue
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Type Members

  1. abstract class AdHocConverter extends OperationCollection

    This class allows to add support for Isabelle ML types in Scala in a quick ad-hoc way.

    This class allows to add support for Isabelle ML types in Scala in a quick ad-hoc way.

    Let something be an ML type. To support values of ML type type in Scala, write

    object Something extends AdHocConverter("something")

    (Here Something is an arbitrary identifier that should preferably remind of the ML type something.) Then ML values of type something stored in the Isabelle process can be used in Scala as objects of type Something.T. That is, an Something.T is a thin wrapper around an MLValue that references values of type something. The actual ML value is never transferred from Isabelle.

    An MLValueConverter is automatically available for type Something.T, thus, e.g., MLValue.apply and MLValue.retrieveNow and related functions work properly to translate between Something.T and MLValue[Something.T].

    Note: This is only intended for local use. That is, if some Scala code needs to handle ML values for which there is no proper support, and that just need to be passed around between different ML functions, then it is possible to use this class for supporting them with minimal boilerplate. However, if the Scala types representing the ML values are supposed to be used on a larger scale or exported from a library, or are supposed to be extended, then it is recommended to use a more flexible mechanism such as MLValueWrapper for creating wrapper classes for ML values.

    Note: object ... extends AdHocConverter(...) creates a new exception type in ML when it is created. Thus this declaration should only be used in a static context (toplevel/inside an object) or in classes that are instantiated very rarely (or in OperationCollection.Ops in a static object).

    Usage example: Say we want to use the ML function Simplifier.pretty_simpset: bool -> Proof.context -> Pretty.T. This function returns a Pretty.T which is not (currently) directly supported by this library. But we simply want to pass it on to Pretty.unformatted_string_of: Pretty.T -> string. So we can declare

    object Pretty extends AdHocConverter("Pretty.T")
    val pretty_simpset = MLValue.compileFunction[Boolean, Context, Pretty.T]("Simplifier.pretty_simpset")
    val unformatted_string_of = MLValue.compileFunction[Pretty.T, String]("Pretty.unformatted_string_of")

    and then pretty print the simpset of a context ctxt by

    val string : String = unformatted_string_of(pretty_simpset(false, ctxt).retrieveNow).retrieveNow

    (Or without the first .retrieveNow.)

  2. final class FunctionConverter[D, R] extends Converter[(D) => R]

    MLValue.Converter for type D => R.

    MLValue.Converter for type D => R.

    • ML type: d -> r (if d,r are the ML types corresponding to D,R).
    • Encoding of a function f as an exception: E_Function (DObject o val2exnR o f o exn2valD o (fn DObject e => e)) where exn2valD is a function that converts an exception back to a value of type d, and val2exnR is a function that converts a value of type r to an exception (as specified by the converters for types d,r).

    Note that store is not supported by this converter. That means that MLValue(f) for a Scala function f will fail (since a Scala function cannot be transferred to the Isabelle process). However, retrieve works, thus mlF.retrieveNow for mlF : MLValue[D=>R] will return a function (that calls back to the Isabelle process whenever executed). But the preferred way to invoke mlF is to convert it into an MLFunction by mlF.function and invoke the resulting MLFunction. Another way to generate an MLValue[D=>R] is using MLValue.compileFunction to compile the function from ML source code.

    While the existence of this conversion makes it possible to use functions as arguments to other functions (and thus do arbitrary higher order computations), we suspect that the presence of nested conversions (the composition with val2exnR and exn2valD above) can make this slow in more complex cases. (We have not benchmarked this, though.)

    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

  3. final class ListConverter[A] extends Converter[List[A]]

    MLValue.Converter for type List[A].

    MLValue.Converter for type List[A].

    • ML type: a list (if a is the ML type corresponding to A).
    • Encoding of a list [x_1,...,x_n] as an exception: E_List [e_1,...,e_n] where e_i is the encoding of x_i as an exception (according to the converter for A).
    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

  4. class MLFunction[D, R] extends MLValue[(D) => R]

    An MLValue that refers to an ML function in the Isabelle process.

    An MLValue that refers to an ML function in the Isabelle process. This class extends MLValue[D => R] (which by definition refers to an ML function) but provides additional methods for invoking the function. Given an MLValue[D => R], you can convert it to an MLFunction using MLValue.function.

  5. class MLFunction0[R] extends MLFunction[Unit, R]

    A refinement of MLFunction (see there).

    A refinement of MLFunction (see there). If the function takes a unit-value as an argument, then we can treat it as a function with no arguments. Thus this class adds additional method for invoking the function with no arguments instead of expecting a dummy unit-value. An MLValue (or MLFunction) can be converted into an MLFunction0 using MLValue.function0.

  6. class MLFunction2[D1, D2, R] extends MLFunction[(D1, D2), R]

    A refinement of MLFunction (see there).

    A refinement of MLFunction (see there). If the function takes a pair (d1,d2) as an argument, then we can treat it as a function with two arguments d1 and d2. Thus this class adds additional method for invoking the function with two arguments instead of a tuple. An MLValue (or MLFunction) can be converted into an MLFunction2 using MLValue.function2.

  7. class MLFunction3[D1, D2, D3, R] extends MLFunction[(D1, D2, D3), R]

    Analogue to MLFunction2 but for three arguments.

    Analogue to MLFunction2 but for three arguments. See MLFunction2.

  8. class MLFunction4[D1, D2, D3, D4, R] extends MLFunction[(D1, D2, D3, D4), R]

    Analogue to MLFunction2 but for four arguments.

    Analogue to MLFunction2 but for four arguments. See MLFunction2.

  9. class MLFunction5[D1, D2, D3, D4, D5, R] extends MLFunction[(D1, D2, D3, D4, D5), R]

    Analogue to MLFunction2 but for five arguments.

    Analogue to MLFunction2 but for five arguments. See MLFunction2.

  10. class MLFunction6[D1, D2, D3, D4, D5, D6, R] extends MLFunction[(D1, D2, D3, D4, D5, D6), R]

    Analogue to MLFunction2 but for six arguments.

    Analogue to MLFunction2 but for six arguments. See MLFunction2.

  11. class MLFunction7[D1, D2, D3, D4, D5, D6, D7, R] extends MLFunction[(D1, D2, D3, D4, D5, D6, D7), R]

    Analogue to MLFunction2 but for seven arguments.

    Analogue to MLFunction2 but for seven arguments. See MLFunction2.

  12. class MLRetrieveFunction[A] extends AnyRef

    A compiled ML function specifically transmitting values from Isabelle to Scala.

    A compiled ML function specifically transmitting values from Isabelle to Scala.

    The function is created by val f = MLRetrieveFunction(ml) where ml is ML code of type a -> data, and a is the ML type corresponding to A.

    When f(mlVal : MLValue[A]) is invoked in Scala, the compiled ML function ml is applied to the ML value of type a referenced by mlVal in the object store in the Isabelle process. The result (of ML type data) is then transferred back to Scala and returned (in a Future).

    An MLRetrieveFunction is particularly useful for writing retrieve methods when writing an MLValue.Converter.

    The behavior of an MLRetrieveFunction[A] is very similar to an MLFunction[A,Data] but more efficient. And the MLRetrieveFunction additionally does not access the store and retrieve functions of the converter that is passed as an implicit argument. This is important because we use the MLRetrieveFunction for writing those functions in the first place.

  13. class MLStoreFunction[A] extends AnyRef

    A compiled ML function specifically transmitting values from Scala to Isabelle.

    A compiled ML function specifically transmitting values from Scala to Isabelle.

    The function is created by val f = MLStoreFunction(ml) where ml is ML code of type data -> a, and a is the ML type corresponding to A.

    When f(data) is invoked in Scala (with data of type Data), the compiled ML function ml is applied to data (in the Isabelle process), and the resulting value is stored in the object store, and an MLValue containing the ID is returned.

    An MLStoreFunction is particularly useful for writing store methods when writing an MLValue.Converter.

    The behavior of an MLStoreFunction[A] is very similar to an MLFunction[Data,A] but more efficient. And the MLStoreFunction additionally does not access the store and retrieve functions of the converter that is passed as an implicit argument. This is important because we use the MLStoreFunction for writing those functions in the first place.

  14. class MLValue[A] extends FutureValue

    A type safe wrapper for values stored in the Isabelle process managed by Isabelle.

    A type safe wrapper for values stored in the Isabelle process managed by Isabelle.

    As explained in the documentation of Isabelle, the Isabelle process has an object store of values, and the class Isabelle.ID is a reference to an object in that object store. However, values of different types share the same object store. Thus Isabelle.ID is not type safe: there are compile time guarantees that the value referenced by that ID has a specific type.

    MLValue[A] is a thin wrapper around an ID id (more precisely, a future holding an ID). It is guaranteed that id references a value in the Isabelle process of an ML type corresponding to A (or throw an exception). (It is possible to violate this guarantee by type-casting the MLValue though.) For supported types A, it is possible to automatically translate a Scala value x of type A into an MLValue[A] (which behind the scenes means that x is transferred to the Isabelle process and added to the object store) and also to automatically translate an MLValue[A] back to a Scala value of type A. Supported types are Int, Long, Boolean, Unit, String, and lists and tuples (max. 7 elements) of supported types. (It is also possible for A to be the type MLValue[...], see MLValueConverter for explanations.) It is possible to add support for other types, see MLValue.Converter for instructions. Using this mechanism, support for the terms, types, theories, contexts, and theorems has been added in package de.unruh.isabelle.pure.

    In more detail:

    • For any supported Scala type A there should be a unique corresponding ML type a. (This is not enforced if we add support for new types, but if we violate this, we loose type safety.)
    • Several Scala types A are allowed to correspond to the same ML type a. (E.g., both Long and Int correspond to the unbounded int in ML.)
    • For each supported type A, the following must be specified (via an implicit MLValue.Converter):
      • an encoding of a as an exception (to be able to store it in the object store)
      • ML functions to translate between a and exceptions and back
      • retrieve function: how to retrieve an exception encoding an ML value of type a and translate it into an A in Scala
      • store function: how to translate an A in Scala into an an exception encoding an ML value of type a and store it in the object store.
    • MLValue(x) automatically translates x:A into a value of type a (using the retrieve function) and returns an MLValue[A].
    • If m : MLValue[A], then m.retrieve (asynchronous) and m.retrieveNow (synchronous) decode the ML value in the object store and return a Scala value of type A.
    • ML code that operates on values in the Isabelle process can be specified using MLValue.compileValue and MLValue.compileFunction. This ML code directly operates on the corresponding ML type a and does not need to consider the encoding of ML values as exceptions or how ML types are serialized to be transferred to Scala (all this is handled automatically behind the scenes using the information provided by the implicit MLValue.Converter).
    • To be able to use the automatic conversions etc., converters need to be imported for supported types. The converters provided by this package can be imported by import de.unruh.isabelle.mlvalue.Implicits._.
    • MLValues are asynchronous, i.e., they may finish the computation of the contained value after creation of the MLValue object. (Like a Future.) In particular, exception thrown during the computation are not thrown during object creation. The value inside an MLValue can be retrieved using retrieveNow (or retrieve), this may wait for the computation to finish and force the exceptions to be thrown. However, instead the value returned by retrieveNow may also be an asynchronous value in the sense that it is created before the computation defining it has finished. Thus exceptions thrown in the computation of the MLValue may be delayed even further and only show upon later computations with the returned object. To make sure that the computation of the MLValue has completed, use the methods of FutureValue (which MLValue inherits), such as force.
    • We have the convention that if A is not a subtype of FutureValue, then retrieveNow must throw the exceptions raised during the computation of the MLValue, and retrieve must return a future that holds those exceptions. (That is, in this case the considerations of the preceding bullet point do not apply.) For example, if MLValue[Unit].retrieveNow or MLValue[Int].retrieveNow guarantee that all exceptions are thrown (i.e., if those function calls complete without exception, the underlying computation is guaranteed to be have completed without exception). If MLValue[Term].retrieveNow completes without exception, this is not guaranteed (because Term is a subtype of FutureValue). But MLValue[Term].force.retrieveNow and MLValue[Term].retrieveNow.force both guarantee that all exceptions are thrown.

    Note: Some operations take an Isabelle instance as an implicit argument. It is required that this instance the same as the one relative to which the MLValue was created.

    A full example:

    implicit val isabelle: Isabelle = new Isabelle(...)
    import scala.concurrent.ExecutionContext.Implicits._
    
    // Create an MLValue containing an integer
    val intML : MLValue[Int] = MLValue(123)
    // 123 is now stored in the object store
    
    // Fetching the integer back
    val int : Int = intML.retrieveNow
    assert(int == 123)
    
    // The type parameter of MLValue ensures that the following does not compile:
    // val string : String = intML.retrieveNow
    
    // We write an ML function that squares an integer and converts it into a string
    val mlFunction : MLFunction[Int, String] =
      MLValue.compileFunction[Int, String]("fn i => string_of_int (i*i)")
    
    // We can apply the function to an integer stored in the Isabelle process
    val result : MLValue[String] = mlFunction(intML)
    // The result is still stored in the Isabelle process, but we can retrieve it:
    val resultHere : String = result.retrieveNow
    assert(resultHere == "15129")

    Not that the type annotations in this example are all optional, the compiler infers them automatically. We have included them for clarity only.

    A

    the Scala type corresponding to the ML type of the value referenced by id

  15. final class MLValueConverter[A] extends Converter[MLValue[A]]

    A special MLValue.Converter that allows us to create MLValues that contain MLValues.

    A special MLValue.Converter that allows us to create MLValues that contain MLValues.

    • MLType: exn.
    • Constraint on the values: only exn's that are the encoding of a value of type a as an exception are allowed. (a is the type associated with A)
    • Encoding of exn as an exception: itself

    The benefit of this special converter is probably best illustrated by an example. Say Huge is an Scala type corresponding to an ML type huge. And assume transferring huge between the Isabelle process and Scala is expensive (or maybe even impossible). And say we have an myValue : MLValue[List[Huge]] which contains a long list of huge in the Isabelle process. We can get a List[Huge] by calling myValue.retrieveNow, but this might be too expensive, especially if we do not need the whole list. Instead, we can do:

    val myValue2 : MLValue[List[MLValue[Huge]]] = myValue.asInstanceOf[MLValue[List[MLValue[Huge]]]]
    val myList : List[MLValue[Huge]] = myValue2.retrieveNow

    myList now is a list of MLValue[Huge] and is constructed efficiently (because an MLValue[Huge] just references an object in the Isabelle process's object store). And then one can retrieve individual Huge objects in that list with additional calls .retrieveNow (or just use the values without ever retrieving them as arguments to other functions that reside in the ML process).

    An instance of MLValueConverter can be constructed without using a Converter for A. This means the above approach (except for retrieving values of type huge) can even be used if no converter for A has not actually been implemented. (As long as we consistently imagine a specific ML type and encoding for A.)

    Annotations
    @inline()
  16. trait MLValueWrapper[A <: MLValueWrapper[A]] extends FutureValue

    Base trait to simplify creating classes that contain a reference to a value in the Isabelle process.

    Base trait to simplify creating classes that contain a reference to a value in the Isabelle process. Classes inheriting from this trait contain an MLValue that refers to a value in the Isabelle process. (That is, unless the inheriting class specifies further fields, this is the only data carried by the class. In particular, the class will not transfer data from the Isabelle process.)

    Examples of classes based on MLValueWrapper are pure.Context, pure.Thm, pure.Position.

    The minimal implementation of a class based on MLValueWrapper is as follows:

    final class Something private (val mlValue: MLValue[Something]) extends MLValueWrapper[Something]
    
    object Something extends MLValueWrapper.Companion[Something] {
      override protected val mlType: String = "Something"
      override protected def instantiate(mlValue: MLValue[Something]): Something = new Something(mlValue)
    }

    Here Something is the name of the Scala class that we want to implement, and something is the ML type of the corresponding values in the Isabelle process.

    After importing Something.converter, the type Something can be transparently used to refer to something in the Isabelle process. E.g., MLValue.compileFunction[String,Something] or MLValue(st) for st of type Something or mlst.retrieveNow for mlst of type MLValue[Something].

    The class Something may be customized in several ways:

    • By default, an ML value st : something is encoded as an exception (see the description of MLValue) as EXN st where EXN is an ML exception whose name is returned by Something.exceptionName. The name EXN is automatically chosen and the exception declared. If this is not desired, a different exception name can be provided by defining predefinedException in the companion object Something.
    • Arbitrary additional methods and fields can be added to the definition of the class Something or the companion object Something. However, it should be noted that the constructor of Something can only have arguments mlValue : MLValue[Something] and optionally an Isabelle instance and an ExecutionContext and not other user defined values. (This is because the constructor needs to be invoked by Something.instantiate which does not have access to other data.)
    • To implement functions that invoke ML code in the Isabelle process, it is recommended to place the compiled values inside an Ops class (see OperationCollection) in the companion object Something. Since the base trait MLValueWrapper.Companion already defines Ops, this needs to be done as follows:
    override protected def newOps(implicit isabelle: Isabelle, ec: ExecutionContext): Ops = new Ops
    protected class Ops(implicit isabelle: Isabelle, ec: ExecutionContext) extends super.Ops {
      // Example:
      lazy val test: MLFunction[Something,String] = compileFunction[Something,String]("... : something -> string")
    }

    The class Something represents an asynchronous value. That is, it is possible to have get an instance of Something even if the computation computing the corresponding ML value is still ongoing or has failed. To wait for that computation to terminate successfully, use the methods from FutureValue which Something inherits.

    Note: Another possibility for defining wrapper classes for MLValues is AdHocConverter. Classes derived using AdHocConverter cannot be customized but only minimal boilerplate is needed.

  17. final class OptionConverter[A] extends Converter[Option[A]]

    MLValue.Converter for type Option[A].

    MLValue.Converter for type Option[A].

    • ML type: a option (if a is the ML type corresponding to A).
    • Encoding of Some(x) and None as an exception: E_Option (SOME e) and E_Option NONE e is the encoding of x as an exception (according to the converter for A).
    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

  18. final class Tuple2Converter[A, B] extends Converter[(A, B)]

    MLValue.Converter for type (A,B).

    MLValue.Converter for type (A,B).

    • ML type: a * b (if a,b are the ML types corresponding to A,B).
    • Encoding of a pair (x_A,x_B) as an exception: E_Pair e_A e_B where e_T is the encoding of x_T as an exception (according to the converter for type T).
    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

  19. final class Tuple3Converter[A, B, C] extends Converter[(A, B, C)]

    MLValue.Converter for type (A,B,C).

    MLValue.Converter for type (A,B,C).

    • ML type: a * b * c (if a,b,c are the ML types corresponding to A,B,C).
    • Encoding of a pair (x_A,x_B,x_C) as an exception: E_Pair e_A (E_Pair e_B e_C) where e_T is the encoding of x_T as an exception (according to the converter for type T).
    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

  20. final class Tuple4Converter[A, B, C, D] extends Converter[(A, B, C, D)]

    MLValue.Converter for type (A,B,C,D).

    MLValue.Converter for type (A,B,C,D).

    • ML type: a * b * c * d (if a,b,c,d are the ML types corresponding to A,B,C,D).
    • Encoding of a pair (x_A,x_B,x_C,x_D) as an exception: E_Pair e_A (E_Pair e_B (E_Pair e_C e_D)) where e_T is the encoding of x_T as an exception (according to the converter for type T).
    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

  21. final class Tuple5Converter[A, B, C, D, E] extends Converter[(A, B, C, D, E)]

    MLValue.Converter for type (A,B,C,D,E).

    MLValue.Converter for type (A,B,C,D,E).

    • ML type: a * b * c * d * e (if a,b,c,d,e are the ML types corresponding to A,B,C,D,E).
    • Encoding of a pair (x_A,x_B,x_C,x_D,x_E) as an exception: E_Pair e_A (E_Pair e_B (E_Pair e_C (E_Pair e_D e_E))) where e_T is the encoding of x_T as an exception (according to the converter for type T).
    See also

    MLValue.Converter for explanations what Converters are for.

  22. final class Tuple6Converter[A, B, C, D, E, F] extends Converter[(A, B, C, D, E, F)]

    MLValue.Converter for type (A,B,C,D,E,F).

    MLValue.Converter for type (A,B,C,D,E,F).

    • ML type: a * b * c * d * e * f (if a,b,c,d,e,f are the ML types corresponding to A,B,C,D,E,F).
    • Encoding of a pair (x_A,x_B,x_C,x_D,x_E,x_F) as an exception: E_Pair e_A (E_Pair e_B (E_Pair e_C (E_Pair e_D (E_Pair e_E e_F)))) where e_T is the encoding of x_T as an exception (according to the converter for type T).
    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

  23. final class Tuple7Converter[A, B, C, D, E, F, G] extends Converter[(A, B, C, D, E, F, G)]

    MLValue.Converter for type (A,B,C,D,E,F,G).

    MLValue.Converter for type (A,B,C,D,E,F,G).

    • ML type: a * b * c * d * e * f * g (if a,b,c,d,e,f,g are the ML types corresponding to A,B,C,D,E,F,G).
    • Encoding of a pair (x_A,x_B,x_C,x_D,x_E,x_F,x_G) as an exception: E_Pair e_A (E_Pair e_B (E_Pair e_C (E_Pair e_D (E_Pair e_E (E_Pair e_F e_G))))) where e_T is the encoding of x_T as an exception (according to the converter for type T).
    Annotations
    @inline()
    See also

    MLValue.Converter for explanations what Converters are for.

Value Members

  1. object BigIntConverter extends Converter[BigInt]

    MLValue.Converter for BigInts.

    MLValue.Converter for BigInts.

    • ML type: int
    • Encoding of an integer i as an exception: E_Int i

    Note that IntConverter, LongConverter, BigIntConverter are different Converters for the same ML type int. They have compatible representations as exceptions, they can safely be typecast into each other.

    See also

    MLValue.Converter for explanations what Converters are for.

  2. object BooleanConverter extends Converter[Boolean]

    MLValue.Converter for Booleans.

    MLValue.Converter for Booleans.

    • ML type: bool
    • Encoding of a bool b as an exception: E_Bool b
    See also

    MLValue.Converter for explanations what Converters are for.

  3. object DataConverter extends Converter[Data]

    MLValue.Converter for Isabelle.Datas.

    MLValue.Converter for Isabelle.Datas.

    • ML type: data
    • Encoding of an d : data as an exception: E_Data d
    See also

    MLValue.Converter for explanations what Converters are for.

  4. object Implicits
  5. object IntConverter extends Converter[Int]

    MLValue.Converter for Ints.

    MLValue.Converter for Ints.

    • ML type: int
    • Encoding of an integer i as an exception: E_Int i

    Note that there is an incompatibility between ML int and Scala Int. The former is unbounded while the latter is a 32-bit integer. ML ints that do not fit are truncated upon retrieval (that is, no overflow exception is thrown!) Use BigIntConverter if arbitrary length integers should be handled.

    Note that IntConverter, LongConverter, BigIntConverter are different Converters for the same ML type int. They have compatible representations as exceptions, they can safely be typecast into each other.

    See also

    MLValue.Converter for explanations what Converters are for.

  6. object LongConverter extends Converter[Long]

    MLValue.Converter for Longs.

    MLValue.Converter for Longs.

    • ML type: int
    • Encoding of an integer i as an exception: E_Int i

    Note that there is an incompatibility between ML int and Scala Long. The former is unbounded while the latter is a 64-bit integer. ML ints that do not fit are truncated upon retrieval (that is, no overflow exception is thrown!) Use BigIntConverter if arbitrary length integers should be handled.

    Note that IntConverter, LongConverter, BigIntConverter are different Converters for the same ML type int. They have compatible representations as exceptions, they can safely be typecast into each other.

    See also

    MLValue.Converter for explanations what Converters are for.

  7. object MLFunction
  8. object MLFunction0
  9. object MLFunction2
  10. object MLFunction3
  11. object MLFunction4
  12. object MLFunction5
  13. object MLFunction6
  14. object MLFunction7
  15. object MLRetrieveFunction

    Creates an MLRetrieveFunction from ML code ml.

    Creates an MLRetrieveFunction from ML code ml.

    The ML code ml should have type a -> data where a is the ML type associated with A by the implicit Converter.

    This method will not invoke converter.store or converter.retrieve.

  16. object MLStoreFunction
  17. object MLValue extends OperationCollection
  18. object MLValueWrapper
  19. object StringConverter extends Converter[String]

    MLValue.Converter for Strings.

    MLValue.Converter for Strings.

    • ML type: string
    • Encoding of a string s as an exception: E_String s

    Note that there is an incompatibility between ML string and Scala String. The former is restricted to characters with codepoints 0...255 (with no specified character set interpretation for characters over 128) and can be at most 67.108.856 characters long (String.maxSize in ML). The latter has 16-bit Unicode characters and no length limit. This converter will work correctly for ASCII strings of the maximum ML-length, but throw exceptions when storing longer strings, and replace non-ASCII characters in unspecified ways.

    See also

    MLValue.Converter for explanations what Converters are for.

  20. object UnitConverter extends Converter[Unit]

    MLValue.Converter for Units.

    MLValue.Converter for Units.

    • ML type: unit
    • Encoding of the unit value as an exception: E_Int 0
    See also

    MLValue.Converter for explanations what Converters are for.

  21. object Version extends OperationCollection

    Version information for the Isabelle process.

    Version information for the Isabelle process.

    All methods take the Isabelle process as an implicit parameter. The integers year, step, rc are chosen such that (year,step,rc) is increasing lexicographically if the version increases. (Development releases are currently not supported and may break this ordering.)

Inherited from AnyRef

Inherited from Any

Ungrouped