Packages

abstract class BackendInterface extends TranslationPhase[SourceListing, String]

Abstract base class for the translation from intermediate code to real source code

Linear Supertypes
TranslationPhase[SourceListing, String], (SourceListing) => Result[String], AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BackendInterface
  2. TranslationPhase
  3. Function1
  4. AnyRef
  5. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BackendInterface(sourceTemplate: String, userIncludes: String)

    sourceTemplate

    Resource path of the template code, where generated code is inserted

    userIncludes

    Additional user-specific code which is inserted at the //USERINCLUDES comment in the source template. Can be used e.g. for additional includes.

Abstract Value Members

  1. abstract def generateChunkCode(stmts: Seq[ImpLanStmt]): (String, String)

    Translates a sequence of IntermediateCode.ImpLanStmt to the corresponding code in the target language.

    Translates a sequence of IntermediateCode.ImpLanStmt to the corresponding code in the target language. In difference to generateCode it splits the statements into groups of size chunkSize and creates an own method for each of them. This is useful for the generation of Scala code to give the JIT compiler better opportunities to optimize.

    stmts

    The sequence of statements to be translated.

    returns

    Tuple with the chunk methods as first parameter and chunk method calls as second parameter.

  2. abstract def generateCode(stmts: Seq[ImpLanStmt]): String

    Translates a sequence of IntermediateCode.ImpLanStmt to the corresponding code in the target language.

    Translates a sequence of IntermediateCode.ImpLanStmt to the corresponding code in the target language. Has to be implemented by Backend-Implementations.

    stmts

    The sequence of statements to be translated.

    returns

    The generated code in the target language

  3. abstract def generateVariableDeclarations(vars: Seq[(String, (ImpLanType, Option[ImpLanExpr], DeclarationType))]): Seq[String]

    Translates a set of variables with base information (type, default value, declaration type) to corresponding variable declarations in the target source code.

    Translates a set of variables with base information (type, default value, declaration type) to corresponding variable declarations in the target source code. Has to be implemented by Backend-Implementations.

    vars

    Sequence of variables to be translated: Name -> (Type x Default value x Declaration type)

    returns

    Sequence of variable definitions

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 andThen[V](other: TranslationPhase[String, V]): TranslationPhase[SourceListing, V]
    Definition Classes
    TranslationPhase
  5. def andThen[A](g: (Result[String]) => A): (SourceListing) => A
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  6. def apply(spec: SourceListing): Result[String]
    Definition Classes
    TranslationPhase → Function1
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. val chunkSize: Int
    Attributes
    protected
  9. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  10. def compose[A](g: (A) => SourceListing): (A) => Result[String]
    Definition Classes
    Function1
    Annotations
    @unspecialized()
  11. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  13. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  14. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  18. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  19. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  20. def toString(): String
    Definition Classes
    Function1 → AnyRef → Any
  21. def translate(orgListing: SourceListing): Result[String]

    Function triggering the translation from a IntermediateCode.SourceListing to real-world source code as String.

    Function triggering the translation from a IntermediateCode.SourceListing to real-world source code as String. Therefore the sections of the IntermediateCode.SourceListing are translated to code and included at special places of the template code by replacing

    - //VARDEF by a section where all used variables are defined - //TRIGGER by the translation of tsGenSource - //STEP by the translation of stepSource - //TAIL by the translation of tailSource - //INPUTPROCESSING by the translation of inputProcessing - //STATIC by the translation of staticSource

    For more details on the requirements of the template see the markdown documents in doc

    orgListing

    The source listing to be translated

    returns

    The source code of the generated monitor program

    Definition Classes
    BackendInterface → TranslationPhase
  22. var variables: Seq[(String, (ImpLanType, Option[ImpLanExpr], DeclarationType))]
    Attributes
    protected
  23. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  24. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  25. 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 TranslationPhase[SourceListing, String]

Inherited from (SourceListing) => Result[String]

Inherited from AnyRef

Inherited from Any

Ungrouped