Packages

  • package root
    Definition Classes
    root
  • package de
    Definition Classes
    root
  • package unruh
    Definition Classes
    de
  • package isabelle

    This library allows to control an Isabelle process from a Scala application.

    This library allows to control an Isabelle process from a Scala application. For first steps and pointers, see the README.

    In case of missing/incorrect documentation, create an issue.

    Definition Classes
    unruh
  • package pure

    This package contains classes for operating on Isabelle theories (Theory), contexts (Context), typs (Typ), term (Term), theorems (Thm).

    This package contains classes for operating on Isabelle theories (Theory), contexts (Context), typs (Typ), term (Term), theorems (Thm). (Only things that are independent of a specific object logic, i.e., only things in Isabelle/Pure.)

    Definition Classes
    isabelle
  • object StringInterpolators extends OperationCollection

    Provides string interpolators for conveniently creating Isabelle terms and types.

    Provides string interpolators for conveniently creating Isabelle terms and types.

    It allows us to write, e.g., term"x+y" to parse the term x+y. Or typ"nat" to parse the type nat

    In addition, subterms of terms can refer to already existing Term objects, e.g., term"x+$term" for a Scala variable term of type Term.

    We can also refer to existing Typ objects, both in terms and types. E.g., term"x :: $typ or typ"$typ => $typ" for a Scala variable of type Typ.

    The support for the interpolators is activated by importing the implicits import de.unruh.isabelle.pure.Implicits._.

    To use the interpolators, an implicit Isabelle instance, an implicit ExecutionContext, and an implicit Context must be given. (The latter provides the theory context in which to parse the terms/types.)

    Parsing happens at runtime, there is no compile-time validation of the terms/types.

    An example how to use type and term interpolators:

    import de.unruh.isabelle.pure.Implicits._
    import scala.concurrent.ExecutionContext.Implicits.global
    implicit isabelle = new Isabelle(...)
    implicit context = Context("Main") // Parsing w.r.t. Isabelle theory Main
    val typ1 = typ"nat"               // type nat
    val typ2 = typ"$typ1 => $typ1"    // type nat => nat
    val term1 = term"f :: $typ2"      // term f :: nat => nat
    val term2 = term"$term1 1"        // term (f :: nat => nat) (1 :: nat)  (by type inference)

    The interpolators can also be used for pattern matching. That is, term"..." and typ"..." can appear in the pattern in a Scala pattern match. Example:

    // implicits as above
    val term = term"1 + (2::nat)"
    term match {
      case term"$t + (_::$u::plus)" => (t,u)  // t : Term is "1::nat", u : Typ is "nat"
    }
    val typ = typ"nat => nat"
    typ match {
      case typ"$t => $dummy" => t    // t : Typ is "nat"
    }

    (Note: A subtlety is that we write $u::plus instad of just $u in the pattern above. This is because Isabelle otherwise refuses to parse the term: a schematic type variable (into which $u is converted for parsing purposes) needs to be annotated with a sort that makes the overall term well-typed.)

    (Note: Another subtlety is that we use $dummy instead of _ to indicate a wildcard in typ"$t => $dummy". This is because Isabelle does not support _ in pattern matches for types. We could also write $_ instead of $dummy here because then _ is a Scala-wildcard, not an Isabelle wildcard.)

    Invalid (i.e., unparseable) strings raise an IsabelleException. This also applied if ... in patterns term"..." or typ"..." cannot be parsed.

    Definition Classes
    pure
  • object PrivateImplementation

    This object should be considered private.

    This object should be considered private. (It is only visible to be accessible in macro code.)

    Definition Classes
    StringInterpolators
  • TypExtractorImplRuntime

final class TypExtractorImplRuntime extends AnyRef

This class should be considered private. (It is only visible to be accessible in macro code.)

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

Instance Constructors

  1. new TypExtractorImplRuntime(uniqueId: Long, context: Context, string: String, varNames: List[String])(implicit isabelle: Isabelle, executionContext: ExecutionContext)

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @IntrinsicCandidate()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @IntrinsicCandidate()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @IntrinsicCandidate()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. def unapplySeq(typ: Typ): Option[Seq[Typ]]
  17. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  18. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  19. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

Inherited from AnyRef

Inherited from Any

Ungrouped