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 java

    This package provides methods for making access to scala-isabelle possible from Java (or other non-Scala JVM languages).

    This package provides methods for making access to scala-isabelle possible from Java (or other non-Scala JVM languages).

    It does not provide any new functionality but only various wrapper methods for cases where some of the methods in this library are hard to access from Java. (E.g., when a method expects Scala collections as input.)

    For Scala methods that need but lack a wrapper, please file an issue.

    Definition Classes
    isabelle
  • JIsabelle
  • JPatterns
o

de.unruh.isabelle.java

JPatterns

object JPatterns

Java support for pattern matching terms and types using the java-patterns library.

E.g., the following Java code will assign the name of the constant/free variable/schematic variable term to name:

import de.unruh.javapatterns.Capture;
import static de.unruh.javapatterns.Pattern.capture;
import static de.unruh.javapatterns.Patterns.Any;
import static de.unruh.javapatterns.Match.match;
import static de.unruh.isabelle.java.JPatterns.*;

Capture<String> x = capture("x");
String name = match(term,
  Const(x,Any), () -> x,
  Free(x,Any), () -> x,
  Var(x,Any,Any), () -> x);

See de.unruh.javapatterns.Match for general instructions how to do pattern matching using the java-patterns library.

Patterns for terms are Const, App, Free, Var, Abs, Bound. Patterns for types are Type, TFree, TVar.

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

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. def Abs(name: Pattern[_ >: String], typ: Pattern[_ >: Typ], body: Pattern[_ >: Term]): Pattern[Term]

    Pattern matching a lambda abstraction (Abs) a.

    Pattern matching a lambda abstraction (Abs) a. Subpattern name will be applied to a.name, typ will be applied to a.typ, and body will be applied to a.body.

    Annotations
    @NotNull()
  5. def App(fun: Pattern[_ >: Term], arg: Pattern[_ >: Term]): Pattern[Term]

    Pattern matching a function application term (App) a.

    Pattern matching a function application term (App) a. Subpattern fun will be applied to a.fun, and arg will be applied to a.arg.

    Annotations
    @NotNull()
  6. def Bound(index: Int): Pattern[Term]

    Short for Bound(Is(index)).

    Short for Bound(Is(index)). That is, matches a constant with index index.

    Annotations
    @NotNull()
  7. def Bound(index: Pattern[_ >: Int]): Pattern[Term]

    Pattern matching a bound (de Bruijn) variable (Bound) v.

    Pattern matching a bound (de Bruijn) variable (Bound) v. Subpattern index will be applied to v.index.

    Annotations
    @NotNull()
  8. def Const(name: String, typ: Pattern[_ >: Typ]): Pattern[Term]

    Short for Const(Is(name),typ).

    Short for Const(Is(name),typ). That is, matches a constant with name name.

    Annotations
    @NotNull()
  9. def Const(name: Pattern[_ >: String], typ: Pattern[_ >: Typ]): Pattern[Term]

    Pattern matching a constant (Const) c.

    Pattern matching a constant (Const) c. Subpattern name will be applied to c.name, and typ will be applied to c.typ.

    Annotations
    @NotNull()
  10. def Free(name: String, typ: Pattern[_ >: Typ]): Pattern[Term]

    Short for Free(Is(name),typ).

    Short for Free(Is(name),typ). That is, matches a free variable with name name.

    Annotations
    @NotNull()
  11. def Free(name: Pattern[_ >: String], typ: Pattern[_ >: Typ]): Pattern[Term]

    Pattern matching a free variable (Free) v.

    Pattern matching a free variable (Free) v. Subpattern name will be applied to v.name, and typ will be applied to v.typ.

    Annotations
    @NotNull()
  12. def TFree(name: String, sort: Pattern[_ >: Array[String]]): Pattern[Typ]

    Short for TFree(Is(name),sort).

    Short for TFree(Is(name),sort). That is, matches a free type variable with name name.

    Annotations
    @NotNull()
  13. def TFree(name: Pattern[_ >: String], sort: Pattern[_ >: Array[String]]): Pattern[Typ]

    Pattern matching a free type variable (TFree) v.

    Pattern matching a free type variable (TFree) v. Subpattern name will be applied to v.name, and sort will be applied to v.sort

    Annotations
    @NotNull()
  14. def TVar(name: String, index: Int, sort: Pattern[_ >: Array[String]]): Pattern[Typ]

    Short for Var(Is(name),Is(index),typ).

    Short for Var(Is(name),Is(index),typ). That is, matches a schematic variable with name name and index index.

    Annotations
    @NotNull()
  15. def TVar(name: Pattern[_ >: String], index: Pattern[_ >: Int], sort: Pattern[_ >: Array[String]]): Pattern[Typ]

    Pattern matching a schematic type variable (TVar) v.

    Pattern matching a schematic type variable (TVar) v. Subpattern name will be applied to v.name, index will be applied to v.index, and sort will be applied to v.sort

    Annotations
    @NotNull()
  16. def Type(name: Pattern[_ >: String], args: Pattern[_ >: Array[Typ]]): Pattern[Typ]

    Pattern matching a type constructor (Type) t.

    Pattern matching a type constructor (Type) t. Subpattern name will be applied to t.name, and args will be applied to t.args.

    Annotations
    @NotNull()
  17. def Type(name: String, args: Pattern[_ >: Typ]*): Pattern[Typ]

    Short for Type(Is(name),args).

    Short for Type(Is(name),args). That is, matches a type with type constructor name and exactly args.length type arguments.

    Annotations
    @NotNull() @varargs()
  18. def Type(name: Pattern[_ >: String], args: Pattern[_ >: Typ]*): Pattern[Typ]

    Pattern matching a type constructor (Type) t.

    Pattern matching a type constructor (Type) t. Subpattern name will be applied to t.name, and the n subpatterns args will be applied to the n type arguments t.pure.Type.args. (If t does not have n type arguments, the pattern does not match.)

    Annotations
    @NotNull() @varargs()
  19. def Var(name: String, index: Int, typ: Pattern[_ >: Typ]): Pattern[Term]

    Short for Var(Is(name),Is(index),typ).

    Short for Var(Is(name),Is(index),typ). That is, matches a schematic variable with name name and index index.

    Annotations
    @NotNull()
  20. def Var(name: Pattern[_ >: String], index: Pattern[_ >: Int], typ: Pattern[_ >: Typ]): Pattern[Term]

    Pattern matching a schematic variable (Var) v.

    Pattern matching a schematic variable (Var) v. Subpattern name will be applied to v.name, index will be applied to v.index, and typ will be applied to v.typ.

    Annotations
    @NotNull()
  21. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  22. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native() @HotSpotIntrinsicCandidate()
  23. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  25. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  26. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  27. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  28. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  29. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  30. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    AnyRef → Any
  33. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  35. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

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