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 Engine(spec: Interpreter) extends Product with Serializable

Class for a TeSSLa monitor.

Intended usage is not to directly instantiate an Engine but to use the compile function instead. See usage example of JavaApi for details.

An Engine object can be used to receive events from input streams (see provide) and to attach listeners for output streams (see addListener)

spec

The interpreter of the base specification

Linear Supertypes
Serializable, Product, Equals, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. Engine
  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 Engine(spec: Interpreter)

    spec

    The interpreter of the base specification

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 addListener(listener: EngineListener): Unit

    Add a listener for all output events.

    Add a listener for all output events. See EngineListener for details. Previously added listeners remain active.

    listener

    The listener to be added

  5. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  6. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @native() @HotSpotIntrinsicCandidate()
  7. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  9. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  10. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  11. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  12. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @HotSpotIntrinsicCandidate()
  13. def productElementNames: Iterator[String]
    Definition Classes
    Product
  14. def provide(stream: String, value: Any): Boolean

    Provide an input event for an input stream of any type.

    Provide an input event for an input stream of any type.

    stream

    Name of the input stream

    value

    The value of the input event

    returns

    Boolean indicating if the event generation succeeded or if an error occurred.

  15. def provide(stream: String): Boolean

    Provide an input event for an input stream of type Unit.

    Provide an input event for an input stream of type Unit.

    stream

    Name of the input stream

    returns

    Boolean indicating if the event generation succeeded or if an error occurred.

  16. def provide(stream: String, value: String): Boolean

    Provide an input event for an input stream of type String.

    Provide an input event for an input stream of type String.

    stream

    Name of the input stream

    value

    The value of the input event

    returns

    Boolean indicating if the event generation succeeded or if an error occurred.

  17. def provide(stream: String, value: Boolean): Boolean

    Provide an input event for an input stream of type Bool.

    Provide an input event for an input stream of type Bool.

    stream

    Name of the input stream

    value

    The value of the input event

    returns

    Boolean indicating if the event generation succeeded or if an error occurred.

  18. def provide(stream: String, value: BigInt): Boolean

    Provide an input event for an input stream of type Int.

    Provide an input event for an input stream of type Int. Use this variation if you want to pass a BigInt value.

    stream

    Name of the input stream

    value

    The value of the input event

    returns

    Boolean indicating if the event generation succeeded or if an error occurred.

  19. def provide(stream: String, value: Int): Boolean

    Provide an input event for an input stream of type Int.

    Provide an input event for an input stream of type Int.

    stream

    Name of the input stream

    value

    The value of the input event

    returns

    Boolean indicating if the event generation succeeded or if an error occurred.

  20. def setTime(time: Time): Unit

    Propagates all inputs and progresses time to the given timestamp.

    Propagates all inputs and progresses time to the given timestamp. After calling this function all outputs until time will be generated and printed. All subsequent calls provide will then rely to this timestamp.

    Note: Only call this function with strictly increasing arguments.

    Use this variant of the method if you require BigInt to represent your timestamps.

    time

    The timestamp until which all outputs shall be processed.

  21. def setTime(time: Int): Unit

    Propagates all inputs and progresses time to the given timestamp.

    Propagates all inputs and progresses time to the given timestamp. After calling this function all outputs until time will be generated and printed. All subsequent calls provide will then rely to this timestamp.

    Note: Only call this function with strictly increasing arguments.

    time

    The timestamp until which all outputs shall be processed.

  22. val spec: Interpreter
  23. def step(): Unit

    Propagates all inputs without progressing time.

    Propagates all inputs without progressing time. Can only be called once per point in time. No more input values can be provided for the current time afterwards.

  24. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  25. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  26. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  27. 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