Packages

  • package root
    Definition Classes
    root
  • package de
    Definition Classes
    root
  • package uni_luebeck
    Definition Classes
    de
  • package isp
    Definition Classes
    uni_luebeck
  • package tessla
    Definition Classes
    isp
  • package interpreter
    Definition Classes
    tessla
  • object JavaApi

    API interface for accessing the TeSSLa compiler from other Java or Scala projects.

    API interface for accessing the TeSSLa compiler from other Java or Scala projects. This API is optimized for a comfortable use from Java and Scala code.

    Usage example (in Java):

    import de.uni_luebeck.isp.tessla.interpreter.JavaApi;
    import de.uni_luebeck.isp.tessla.interpreter.JavaApi.*;
    import de.uni_luebeck.isp.tessla.interpreter.StreamEngine;
    
    class Main {
    
        public static void main(String[] args) {
    
             String spec_str = "in temperature: Events[Int]\r\n" +
             "\r\n" +
             "def low = temperature < 3\r\n" +
             "def high = temperature > 8\r\n" +
             "def unsafe = low || high\r\n" +
             "\r\n" +
             "out unsafe";
    
    
             System.out.println("Compiling...");
    
             Engine res = JavaApi.compile(spec_str ,"spec.tessla").engine();
    
             System.out.println("Ready!");
    
             res.addListener(new EngineListener(){
               public void event(String stream, scala.math.BigInt time, Object value) {
                 System.out.println("Got: " + stream + " = " + value + " at " + time);
               }
    
               public void printEvent(scala.math.BigInt time, Object value) {
                 System.out.println("Raw output: " + value + " at " + time);
               }
             });
    
             res.setTime(1);
             res.provide("temperature",2);
             res.setTime(2);
             res.provide("temperature",15);
             res.setTime(5);
             res.provide("temperature",8);
             res.step();
    
             System.out.println("Finished!");
    
         }
    
     }

    Note: This API internally uses the TeSSLa interpreter. For high performance applications it is advisable to use the TeSSLa compiler to generate a Scala API directly for a specific specification.

    Definition Classes
    interpreter
  • CompilationResult
  • Diagnostic
  • Engine
  • EngineListener
  • Result

case class Diagnostic(diagnostic: core.Diagnostic) extends Product with Serializable

Diagnostic object, carrying information about errors and warnings which occur during compilation and execution.

diagnostic

The Diagnostic object from the core API used to generate the Diagnostic object

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Diagnostic
  2. Serializable
  3. Product
  4. Equals
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new Diagnostic(diagnostic: core.Diagnostic)

    diagnostic

    The Diagnostic object from the core API used to generate the Diagnostic object

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  6. val diagnostic: core.Diagnostic
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. def fromColumn: Any

    Returns the starting column of the TeSSLa code which has lead to the error (or null if unknown)

    Returns the starting column of the TeSSLa code which has lead to the error (or null if unknown)

    returns

    The starting column of the TeSSLa code which has lead to the error

  9. def fromLine: Any

    Returns the starting line of the TeSSLa code which has lead to the error (or null if unknown)

    Returns the starting line of the TeSSLa code which has lead to the error (or null if unknown)

    returns

    The starting line of the TeSSLa code which has lead to the error

  10. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. def message: String

    Returns the message of the error or warning

    Returns the message of the error or warning

    returns

    Message of the error or warning

  13. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  14. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  15. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  16. def path: String

    Returns the path of the TeSSLa source file which has lead to the error

    Returns the path of the TeSSLa source file which has lead to the error

    returns

    The path of the TeSSLa source file which has lead to the error

  17. def productElementNames: Iterator[String]
    Definition Classes
    Product
  18. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  19. def toColumn: Any

    Returns the final column of the TeSSLa code which has lead to the error (or null if unknown)

    Returns the final column of the TeSSLa code which has lead to the error (or null if unknown)

    returns

    The final column of the TeSSLa code which has lead to the error

  20. def toLine: Any

    Returns the final line of the TeSSLa code which has lead to the error (or null if unknown)

    Returns the final line of the TeSSLa code which has lead to the error (or null if unknown)

    returns

    The final line of the TeSSLa code which has lead to the error

  21. def toString(): String

    Returns a string representation of the Diagnostic object

    Returns a string representation of the Diagnostic object

    returns

    A string representation of the Diagnostic object

    Definition Classes
    Diagnostic → AnyRef → Any
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. 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 Serializable

Inherited from Product

Inherited from Equals

Inherited from AnyRef

Inherited from Any

Ungrouped