class ScalaBackend extends BackendInterface
BackendInterface implementation for the translation to Scala code
- Alphabetic
- By Inheritance
- ScalaBackend
- BackendInterface
- TranslationPhase
- Function1
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ScalaBackend(ioInterface: Boolean, userIncludes: String = "")
- userIncludes
Additional user-specific code which is included on top of the generated scala source. Can be used e.g. for additional includes
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def andThen[V](other: TranslationPhase[String, V]): TranslationPhase[SourceListing, V]
- Definition Classes
- TranslationPhase
- def andThen[A](g: (Result[String]) => A): (SourceListing) => A
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- def apply(spec: SourceListing): Result[String]
- Definition Classes
- TranslationPhase → Function1
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val chunkSize: Int
- Definition Classes
- ScalaBackend → BackendInterface
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def compose[A](g: (A) => SourceListing): (A) => Result[String]
- Definition Classes
- Function1
- Annotations
- @unspecialized()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- 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.
- stmts
The sequence of statements to be translated.
- returns
Tuple with the chunk methods as first parameter and chunk method calls as second parameter.
- Definition Classes
- ScalaBackend → BackendInterface
- def generateCode(stmts: Seq[ImpLanStmt]): String
Translates a sequence of IntermediateCode.ImpLanStmt to the corresponding code in Scala.
Translates a sequence of IntermediateCode.ImpLanStmt to the corresponding code in Scala.
- stmts
The sequence of statements to be translated.
- returns
The generated code in Scala
- Definition Classes
- ScalaBackend → BackendInterface
- def generateVariableDeclarations(vars: Seq[(String, (ImpLanType, Option[ImpLanExpr], DeclarationType))]): Seq[String]
Translates a map of variables with base information (type, default value, lazy assignment) to corresponding variable declarations in Scala.
Translates a map of variables with base information (type, default value, lazy assignment) to corresponding variable declarations in Scala.
- vars
Map of variables to be translated: Name -> (Type x Default value x Lazy assignment)
- returns
Sequence of variable definitions in Scala
- Definition Classes
- ScalaBackend → BackendInterface
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- Function1 → AnyRef → Any
- 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
- var variables: Seq[(String, (ImpLanType, Option[ImpLanExpr], DeclarationType))]
- Attributes
- protected
- Definition Classes
- BackendInterface
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated