Class/Object

edu.tum.cs.isabelle.api

Environment

Related Docs: object Environment | package api

Permalink

abstract class Environment extends AnyRef

Abstract interface for an Isabelle environment of a particular version in a path with an underlying PIDE machinery.

As opposed to a mere logic-less Setup, an environment knows how to manage Isabelle processes. It can also manage multiple running processes at the same time.

A subclass of this class is called implementation througout libisabelle. The Implementations class serves as a registry of those, although using it is not required.

Users may instantiate implementations manually, although there is a caveat: After one implementation has been instantiated, the behaviour of subsequent instantiations with a different path or instantiations of a different implementation is undefined. For most applications, this is not a significant restriction, because they only deal with a single setup.

For multi-home or multi-version scenarios, it is highly recommended that users create environments through the appropriate function of a registry. See its documentation for an explanation.

If in doubt, users should prefer the direct (manual) instantiation.

While implementations may be created freely by users, it is recommended to only use the bundled implementations for the supported Isabelle versions. By convention, they live in the package edu.tum.cs.isabelle.impl and their class name is also Environment.

Contract

Footnote

Due to name clashes in the underlying PIDE machinery (which is provided by Isabelle itself and is not under control of libisabelle), it is impossible to have multiple environments for different versions in the same class loader. This is the primary reason why this class exists in the first place, to enable seamless abstraction over multiple PIDEs.

As the caveat above states, not even multi-home scenarios are supported without going through a registry. The user has to ensure that this happens, since this class does not attempt to detect such a situation. While in principle it could do so, it would require the introduction of even more global mutable state. It might do so in the future.

Self Type
Environment
Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. Environment
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Instance Constructors

  1. new Environment(home: Path)

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]

Type Members

  1. case class Configuration(path: Option[Path], session: String) extends Product with Serializable

    Permalink

    Represents the location and name of a session (Isabelle terminology).

    Represents the location and name of a session (Isabelle terminology).

    Refer to the Isabelle system manual for details about sessions. libisabelle assumes that users are familiar with the session handling of Isabelle.

    Creation of configurations is completely unchecked. Errors such as non-existing paths will only manifest themselves when attempting to build a configuration or create a system. Nonetheless, users should go through one of the constructors in the companion object.

  2. sealed abstract class Observer[T] extends AnyRef

    Permalink

    An iteratee-like structure consuming XML trees and eventually producing an output of type T, or an error.

    An iteratee-like structure consuming XML trees and eventually producing an output of type T, or an error.

    On a high level, this can be imagined like a function taking a list of trees as an argument. In most cases, user code does not care about the intermediate results. For that, combinators exist in the companion object and Operation.

    See also

    edu.tum.cs.isabelle.Operation

    edu.tum.cs.isabelle.System#invoke

  3. abstract type Session

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  4. type XMLBody = List[XMLTree]

    Permalink
  5. abstract type XMLTree

    Permalink

Abstract Value Members

  1. abstract def build(config: Configuration): Int

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  2. abstract def create(config: Configuration, consumer: (Markup, XMLBody) ⇒ Unit): Session

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  3. abstract def destTree(tree: XMLTree): Either[String, (Markup, XMLBody)]

    Permalink
  4. abstract def dispose(session: Session): Unit

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  5. abstract def elem(markup: Markup, body: XMLBody): XMLTree

    Permalink
  6. implicit abstract val executionContext: ExecutionContext

    Permalink

    The execution context internally used by the underlying PIDE implementation.

    The execution context internally used by the underlying PIDE implementation.

    It is allowed to override the execution context of internal PIDE implementation during initialization, but it must remain fixed afterwards. This field must be set to that execution context.

    Implementations should ensure that the underlying thread pool consists of daemon threads, rendering disposing of running systems unnecessary. (The secondary reason is to avoid a hanging JVM when user code did not handle an exception, the main thread gets terminated, but worker threads are keeping the JVM alive.)

    This is exposed to the user via System#executionContext.

  7. abstract val exitTag: String

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  8. abstract def fromYXML(source: String): XMLTree

    Permalink
  9. abstract val functionTag: String

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  10. abstract val initTag: String

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  11. abstract val protocolTag: String

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  12. abstract def sendCommand(session: Session, name: String, args: List[String]): Unit

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  13. abstract def sendOptions(session: Session): Unit

    Permalink
    Attributes
    protected[edu.tum.cs.isabelle]
  14. abstract def text(content: String): XMLTree

    Permalink
  15. abstract def toYXML(tree: XMLTree): String

    Permalink

Concrete Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. object Configuration extends Serializable

    Permalink

    Convenience constructors for configurations.

  5. object Observer

    Permalink

    Cases of observers and combinators.

  6. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  7. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. def foldTree[A](text: (String) ⇒ A, elem: (Markup, List[A]) ⇒ A)(tree: XMLTree): A

    Permalink
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  15. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  18. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  19. def toString(): String

    Permalink
    Definition Classes
    Environment → AnyRef → Any
  20. final val version: Version

    Permalink
  21. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped