de.uni_luebeck.isp.tessla.tessla_compiler
IntermediateCodeUtils
Companion class IntermediateCodeUtils
object IntermediateCodeUtils
Class containing a DSL for easy creation of ImpLanStmt-Blocks and other useful static methods for dealing ImpLan and the translation from TeSSLa
- Alphabetic
- By Inheritance
- IntermediateCodeUtils
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
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
- implicit def Addition(op1: ImpLanExpr, op2: ImpLanExpr): ImpLanExpr
Generates an addition expression
Generates an addition expression
- op1
First parameter sub-expression, must be of IntermediateCode.LongType
- op2
Second parameter sub-expression, must be of IntermediateCode.LongType
- returns
Addition expression
- implicit def And(ops: Seq[ImpLanExpr]): ImpLanExpr
Generates an and (&&) expression
Generates an and (&&) expression
- ops
parameter sub-expressions, must be of type IntermediateCode.BoolType
- returns
And expression
- implicit def BitwiseOr(ops: Seq[ImpLanExpr]): ImpLanExpr
Generates an or (||) expression
Generates an or (||) expression
- ops
parameter sub-expressions, must be of type IntermediateCode.BoolType
- returns
Or expression
- implicit def GetStruct(struct: ImpLanExpr, fieldName: String, structType: ImpLanType): ImpLanExpr
Produces an expression for accessing a structure field
Produces an expression for accessing a structure field
- struct
Expression which evaluates to a struct
- fieldName
The accessed field name
- structType
The type of the struct
- returns
Expression accessing the struct
- implicit def Greater(a: ImpLanExpr, b: ImpLanExpr): ImpLanExpr
Generates a greater expression
Generates a greater expression
- a
First parameter sub-expression, must be of IntermediateCode.LongType
- b
Second parameter sub-expression, must be of IntermediateCode.LongType
- returns
Greater expression
- implicit def GreaterEqual(a: ImpLanExpr, b: ImpLanExpr): ImpLanExpr
Generates a greater equal expression
Generates a greater equal expression
- a
First parameter sub-expression, must be of IntermediateCode.LongType
- b
Second parameter sub-expression, must be of IntermediateCode.LongType
- returns
Greater equal expression
- implicit def MkStruct(content: Seq[(String, ImpLanExpr)], targetType: ImpLanType): ImpLanExpr
Produces an expression building a struct
Produces an expression building a struct
- content
Sub expressions with field names
- targetType
The type of the struct to be generated
- returns
Expression building a struct
- implicit def Negation(a: ImpLanExpr): ImpLanExpr
Generates a negate expression
Generates a negate expression
- a
Sub-expression to be negated
- returns
Negate expression
- implicit def NotEqual(a: ImpLanExpr, b: ImpLanExpr): ImpLanExpr
Generates a not equal expression
Generates a not equal expression
- a
First parameter sub-expression
- b
Second parameter sub-expression
- returns
Not equal expression
- implicit def Subtraction(op1: ImpLanExpr, op2: ImpLanExpr): ImpLanExpr
Generates a subtraction expression
Generates a subtraction expression
- op1
First parameter sub-expression, must be of IntermediateCode.LongType
- op2
Second parameter sub-expression, must be of IntermediateCode.LongType
- returns
Subtraction expression
- implicit def Throw(e: ImpLanExpr, forType: ImpLanType): ImpLanExpr
Generates a throw expression
Generates a throw expression
- e
sub expression of the error to be thrown, must be of IntermediateCode.ErrorType
- forType
Type which should be returned inst
- returns
Expression throwing an error
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
- def defaultValueForStreamType(t: core.TesslaAST.Core.Type): ImpLanVal
Calculates a static default value for a stream type.
Calculates a static default value for a stream type. For Events[t] it is the default value of t.
- t
Type whose default value shall be determined. Must be Events[...]
- returns
Default value for given type
- def defaultValueForType(t: core.TesslaAST.Core.Type): ImpLanVal
Calculates a static default value for a non-stream type.
Calculates a static default value for a non-stream type.
- t
Type whose default value shall be determined. May not be Events[...]
- returns
Default value for given type
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def foldAST[A](stmts: Seq[ImpLanStmt], n: A, f: (A, ImpLanExpr) => A, g: (A, ImpLanStmt) => A): A
Folds a sequence of statements including all sub-expressions and sub-statements.
Folds a sequence of statements including all sub-expressions and sub-statements. Sub-statements/sub-expressions are traversed prior their parent expressions
- A
The result type of the folding operation
- stmts
The sequence of statements to be folded
- n
The start value
- f
Function executed on every expression
- g
Function executed on every statement
- returns
The result of the folding
- def foldAST[A](exp: ImpLanExpr, n: A, f: (A, ImpLanExpr) => A, g: (A, ImpLanStmt) => A): A
Folds an IntermediateCode.ImpLanExpr including all sub-expressions and sub-statements.
Folds an IntermediateCode.ImpLanExpr including all sub-expressions and sub-statements. Sub-statements/sub-expressions are traversed prior their parent expressions
- A
The result type of the folding operation
- exp
The sequence of statements to be folded
- n
The start value
- f
Function executed on every expression
- g
Function executed on every statement
- returns
The result of the folding
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- def getVariableMap(stmts: Seq[ImpLanStmt], baseMap: Map[String, (ImpLanType, Option[ImpLanExpr], Boolean)] = Map()): Map[String, (ImpLanType, Option[ImpLanExpr], Boolean)]
Builds map containing type/default/lazyness information for all variables defined in stmts.
Builds map containing type/default/lazyness information for all variables defined in stmts. If unsound information (e.g. multiple declarations) are found an error is thrown.
- stmts
The sequence of statements to be examined
- baseMap
The base map to be extended
- returns
Map containing variable information.
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @HotSpotIntrinsicCandidate()
- implicit def intermediateCodeDSLConversion(stmts: Seq[ImpLanStmt]): IntermediateCodeUtils
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def mapAST(exp: ImpLanExpr, f: (ImpLanExpr) => ImpLanExpr, g: (ImpLanStmt) => Option[ImpLanStmt]): ImpLanExpr
Maps f on all subexpressions and g on all sub-statements of an IntermediateCode.ImpLanExpr
Maps f on all subexpressions and g on all sub-statements of an IntermediateCode.ImpLanExpr
- exp
The expression to be mapped
- f
Function to map expressions
- g
Function to map statements
- returns
Mapped expression
- def mapAST(stmts: Seq[ImpLanStmt], f: (ImpLanExpr) => ImpLanExpr, g: (ImpLanStmt) => Option[ImpLanStmt]): Seq[ImpLanStmt]
Maps f on all subexpressions and g on all sub-statements of a sequence of statements
Maps f on all subexpressions and g on all sub-statements of a sequence of statements
- stmts
The sequence of statements to be mapped
- f
Function to map expressions
- g
Function to map statements
- returns
Mapped sequence of statements
- 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()
- implicit def stmtConversion(dsl: IntermediateCodeUtils): Seq[ImpLanStmt]
- implicit def stringToVariable(str: String): Variable
- def structComparison(s1: String, s2: String): Boolean
Sorting function for structs taking care of the right sorting of tuple fild names
Sorting function for structs taking care of the right sorting of tuple fild names
- s1
First param for comparison
- s2
Second param for comparison
- returns
true if s1 <= s2 with respect to the special sorting rules
- def structIsTuple(structType: StructType): Boolean
Figures out if a struct is a tuple.
Figures out if a struct is a tuple. i.e. has field names _1,_2 ...
- structType
The struct to be examined
- returns
Whether given struct is tuple
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- implicit def typeConversion(t: core.TesslaAST.Core.Type): ImpLanType
Converts TeSSLa type to corresponding IntermediateCode.ImpLanType
Converts TeSSLa type to corresponding IntermediateCode.ImpLanType
- t
Type to be converted. If type is Events[t] the result is equal to calling the function with t.
- returns
The converted type
- 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