Packages

abstract class SemanticType extends SemanticObject

A Scala-level type to be used in a RealizedType

See also SemanticOperator

SemanticType's are closed under subtypes and quotients by using valid and normalform. In other words, the triple (U, valid, normalform) forms a partial equivalence relation on a Scala type U.

For technical reasons, U is fixed as the type Any (Scala cannot type check enough to make the overhead worthwhile.) Instead, type-safety-supporting syntax is offered wherever reasonable, see also RSemanticType.

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

Instance Constructors

  1. new SemanticType()

Abstract Value Members

  1. abstract def asString: String

    string representation of this type (should be toString, but we want to force people to implement this)

  2. abstract def fromString(s: String): Any

    converts strings into values; pre: s == toString(u) for some u with valid(u) == true

  3. abstract def toString(u: Any): String

    converts values into strings; pre: valid(u) == true

Concrete 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 =>:(args: List[SemanticType]): SemOpType
  5. def =>:(arg: SemanticType): SemOpType

    enables the notation (a,b) =>: c for function types

  6. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  7. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  8. def embed(into: SemanticType): Option[Unary]

    returns a canonical embedding from this type into some other type only the identity of this type by default, override as needed

  9. def enumerate: Option[Iterator[Any]]

    returns

    a fresh iterator over values of this type

  10. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  12. def escapedLiteral(begin: String, end: String): Some[AsymmetricEscapeLexer]

    convenience method to construct a lexer for this type

  13. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  14. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  15. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  16. def id: Unary

    the identify function of this type

  17. def init: Unit

    errors in Java initializers are hard to debug; therefore, objects should put initialization code here, which will be called by MMT empty by default, may throw errors

    errors in Java initializers are hard to debug; therefore, objects should put initialization code here, which will be called by MMT empty by default, may throw errors

    Definition Classes
    SemanticObject
  18. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  19. def lex: Option[LexFunction]

    returns

    a LexerExtension that is to be used when this type is in scope

  20. lazy val mpath: MPath

    the MMT URI of this object, derived from its Scala name: scala://package?name

    the MMT URI of this object, derived from its Scala name: scala://package?name

    Definition Classes
    SemanticObject
  21. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  22. def normalform(u: Any): Any

    the equivalence relation (given as a normal form conversion) on the semantic type used to obtain quotient types pre: valid(u) == true identity by default

  23. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  24. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  25. def quotedLiteral(key: String): Some[AsymmetricEscapeLexer]

    convenience method to construct a lexer for this type

  26. def subtype(of: SemanticType): Boolean

    subtype relation only reflexivity by default, override as needed invariant: if true, embed must return identity

  27. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  28. def toString(): String
    Definition Classes
    SemanticType → AnyRef → Any
  29. def valid(u: Any): Boolean

    the predicate on the semantic type used to obtain subtypes

    the predicate on the semantic type used to obtain subtypes

    true by default

  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
    @throws( ... ) @native()

Inherited from SemanticObject

Inherited from AnyRef

Inherited from Any

Ungrouped