Packages

c

edu.cmu.cs.ls.keymaerax.parser

KeYmaeraXPrinter

class KeYmaeraXPrinter extends BasePrettyPrinter

Vanilla: KeYmaera X Printer formats differential dynamic logic expressions in KeYmaera X notation according to the concrete syntax of differential dynamic logic with explicit statement end ; operator.

Example:
  1. Printing formulas to strings is straightforward using edu.cmu.cs.ls.keymaerax.parser.KeYmaeraXPrettyPrinter.apply:

    val pp = KeYmaeraXPrettyPrinter
    // "x < -y"
    val fml0 = Less(Variable("x"),Neg(Variable("y")))
    val fml0str = pp(fml0)
    // "true -> [x:=1;]x>=0"
    val fml1 = Imply(True, Box(Assign(Variable("x"), Number(1)), GreaterEqual(Variable("x"), Number(0))))
    val fml1str = pp(fml1)
See also

edu.cmu.cs.ls.keymaerax.parser

Grammar

Wiki

Linear Supertypes
BasePrettyPrinter, PrettyPrinter, (Expression) ⇒ String, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. KeYmaeraXPrinter
  2. BasePrettyPrinter
  3. PrettyPrinter
  4. Function1
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new KeYmaeraXPrinter()

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 andThen[A](g: (String) ⇒ A): (Expression) ⇒ A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  5. def apply(seq: Sequent): String

    Pretty-print sequent to a string

    Pretty-print sequent to a string

    Definition Classes
    BasePrettyPrinterPrettyPrinter
  6. def apply(expr: Expression): String

    Pretty-print term to a string

    Pretty-print term to a string

    Definition Classes
    BasePrettyPrinterPrettyPrinter → Function1
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  9. def compose[A](g: (A) ⇒ Expression): (A) ⇒ String
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  10. def emit(q: PosInExpr, s: String): String

    Emit the string s as a result of the pretty-printer for the expression at position q

    Emit the string s as a result of the pretty-printer for the expression at position q

    Attributes
    protected
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  13. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. val fullPrinter: (Expression) ⇒ String

    The corresponding full-form pretty printer producing full parentheses.

    The corresponding full-form pretty printer producing full parentheses.

    Definition Classes
    KeYmaeraXPrinterPrettyPrinter
  15. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  17. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  18. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  19. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  21. lazy val parser: Parser

    A parser that can read the input that this pretty-printer produces

    A parser that can read the input that this pretty-printer produces

    Definition Classes
    KeYmaeraXPrinterPrettyPrinter
  22. def pp(q: PosInExpr, program: Program): String
    Attributes
    protected
  23. def pp(q: PosInExpr, formula: Formula): String
    Attributes
    protected
  24. def pp(q: PosInExpr, term: Term): String
    Attributes
    protected
  25. def ppODE(q: PosInExpr, program: DifferentialProgram): String
    Attributes
    protected
  26. def ppOp(expr: Expression): String

    Pretty-print the operator of a term

    Pretty-print the operator of a term

    Attributes
    protected
  27. def pwrapLeft(t: BinaryComposite, leftPrint: String): String

    Wrap leftPrint for t.left in program parentheses if they are not implicit.

    Wrap leftPrint for t.left in program parentheses if they are not implicit.

    Attributes
    protected
  28. def pwrapRight(t: BinaryComposite, rightPrint: String): String

    Wrap rightPrint for t.right in program parentheses if they are not implicit.

    Wrap rightPrint for t.right in program parentheses if they are not implicit.

    Attributes
    protected
  29. def reparse(expr: Expression, print: String): Expression

    Reparse the string print as the same kind as expr has

    Reparse the string print as the same kind as expr has

    Attributes
    protected[edu.cmu.cs.ls.keymaerax]
    Definition Classes
    BasePrettyPrinter
  30. def statement(s: String): String

    Formatting the atomic statement s

    Formatting the atomic statement s

    Attributes
    protected
  31. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  32. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  33. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  34. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  35. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  36. def wrap(text: String, expr: Expression): String

    Pretty-print enclosing parentheses, braces, brackets etc.

    Pretty-print enclosing parentheses, braces, brackets etc.

    Attributes
    protected
  37. def wrapChild(t: Modal, childPrint: String): String

    Wrap childPrint for t.child in parentheses if they are not implicit.

    Wrap childPrint for t.child in parentheses if they are not implicit.

    Attributes
    protected
  38. def wrapChild(t: Quantified, childPrint: String): String

    Wrap childPrint for t.child in parentheses if they are not implicit.

    Wrap childPrint for t.child in parentheses if they are not implicit.

    Attributes
    protected
  39. def wrapChild(t: UnaryComposite, childPrint: String): String

    Wrap childPrint for t.child in parentheses if they are not implicit.

    Wrap childPrint for t.child in parentheses if they are not implicit.

    Attributes
    protected
  40. def wrapLeft(t: BinaryComposite, leftPrint: String): String

    Wrap leftPrint for t.left in parentheses if they are not implicit.

    Wrap leftPrint for t.left in parentheses if they are not implicit.

    Attributes
    protected
  41. def wrapRight(t: BinaryComposite, rightPrint: String): String

    Wrap rightPrint for t.right in parentheses if they are not implicit.

    Wrap rightPrint for t.right in parentheses if they are not implicit.

    Attributes
    protected

Inherited from BasePrettyPrinter

Inherited from PrettyPrinter

Inherited from (Expression) ⇒ String

Inherited from AnyRef

Inherited from Any

Ungrouped