Packages

object Context

Context management, position splitting, and extraction tools. Useful for splitting a formula at a position into the subexpression at that position and the remaining context around it. Or for replacing a subexpression by another subexpression at all cost. Or for splitting a position into a formula position and a term position.

Example:
  1. Split a formula at a position into subformula and its context

    val parser = KeYmaeraXParser
    val f = parser("x^2>=0 & x<44 -> [x:=2;{x'=1&x<=10}]x>=1")
    // split f into context ctx and subformula g such that f is ctx{g}
    val (ctx,g) = Context.at(f, PosInExpr(1::1::Nil))
    // x^2>=0 & x<44 -> [x:=2;{x'=1&x<=10}]_
    println(ctx)
    // x>=1
    println(f)
    println(f + " is the same as " + ctx(g))
See also

PosInExpr

Augmentors

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Context
  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. val DotDiffProgram: DifferentialProgramConst

    Placeholder for differential programs.

    Placeholder for differential programs. Reserved predicational symbol _ for substitutions are unlike ordinary predicational symbols

  5. val DotProgram: ProgramConst

    Placeholder for programs.

    Placeholder for programs. Reserved predicational symbol _ for substitutions are unlike ordinary predicational symbols

  6. def apply[T <: Expression](ctx: T): Context[T]

    Make a context for expression ctx guarded by the protection of uniform substitutions.

  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def at(a: Program, pos: PosInExpr): (Context[Program], Expression)

    Split C{e}=a(pos) program a at position pos into the expression e at that position and the context C within which that expression occurs.

    Split C{e}=a(pos) program a at position pos into the expression e at that position and the context C within which that expression occurs. Thus C{e} will equal the original a and e occurs at position pos in a. (provided that back-substitution is admissible, otherwise a direct replacement in C at pos to e will equal t).

  9. def at(f: Formula, pos: PosInExpr): (Context[Formula], Expression)

    Split C{e}=f(pos) formula f at position pos into the expression e at that position and the context C within which that expression occurs.

    Split C{e}=f(pos) formula f at position pos into the expression e at that position and the context C within which that expression occurs. Thus C{e} will equal the original f and e occurs at position pos in f (provided that back-substitution is admissible, otherwise a direct replacement in C at pos to e will equal t).

  10. def at(t: Term, pos: PosInExpr): (Context[Term], Expression)

    Split C{e}=t(pos) term t at position pos into the expression e at that position and the context C within which that expression occurs.

    Split C{e}=t(pos) term t at position pos into the expression e at that position and the context C within which that expression occurs. Thus C{e} will equal the original t and e occurs at position pos in t (provided that back-substitution is admissible, otherwise a direct replacement in C at pos to e will equal t).

  11. def at(t: Expression, pos: PosInExpr): (Context[Expression], Expression)

    Split C{e}=t(pos) expression t at position pos into the expression e at that position and the context C within which that expression occurs.

    Split C{e}=t(pos) expression t at position pos into the expression e at that position and the context C within which that expression occurs. Thus C{e} will equal the original t and e occurs at position pos in t (provided that back-substitution is admissible, otherwise a direct replacement in C at pos to e will equal t).

  12. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  13. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  15. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  20. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  22. def replaceAt(program: Program, pos: PosInExpr, repl: Expression): Program

    Replace within program at position pos by repl @see StaticSemanticsTools.boundAt() for same positions

  23. def replaceAt(formula: Formula, pos: PosInExpr, repl: Expression): Formula

    Replace within formula at position pos by repl @see StaticSemanticsTools.boundAt() for same positions

  24. def replaceAt(term: Term, pos: PosInExpr, repl: Expression): Term

    Replace within term at position pos by repl @see StaticSemanticsTools.boundAt() for same positions

  25. def replaceAt(expr: Expression, pos: PosInExpr, repl: Expression): Expression

    Replace within term at position pos by repl

    Replace within term at position pos by repl

    See also

    edu.cmu.cs.ls.keymaerax.infrastruct.StaticSemanticsTools.boundAt() for same positions

  26. def splitPos(f: Formula, pos: PosInExpr): (PosInExpr, PosInExpr)

    Split the given position into formula position and term position within that formula.

    Split the given position into formula position and term position within that formula.

    returns

    ._1 will be the formula position of the atomic formula around pos and ._2 will be the term position that pos refers to within that atomic formula.

    To do

    horribly slow implementation by marching from the right and researching from the left. Trigger at transition to split(Term) would be much faster.

  27. def sub(t: Expression, pos: PosInExpr): Expression

    Subexpression of t at the indicated position pos or exception if ill-defined position.

  28. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  29. def toString(): String
    Definition Classes
    AnyRef → Any
  30. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped