de.uni_luebeck.isp.tessla.interpreter

Members list

Concise view

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Self type
class Interpreter(val spec: Specification) extends StreamEngine

An interpreter instance for a given specification.

An interpreter instance for a given specification.

Attributes

spec

the specification

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Evaluates a core specification with a given input trace, producing a trace of events as result.

Evaluates a core specification with a given input trace, producing a trace of events as result.

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
object JavaApi

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.

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.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
JavaApi.type

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class RuntimeEvaluator(externs: Map[String, Any])

An evaluator for core expressions, given implementations for externs.

An evaluator for core expressions, given implementations for externs.

Attributes

externs

definitions of externs, as mapping from their name to their definition

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any

Performs type checking on runtime values.

Performs type checking on runtime values.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Attributes

Companion:
class
Graph
Supertypes
class Object
trait Matchable
class Any
Self type
class StreamEngine(unitValue: Any)

Evaluates a stream graph synchronously. In each evaluation cycle inputs are supplied with values. Then.input and delay nodes are triggered to initiate the propagation of values. Listeners can be registered to receive results at output streams.

Evaluates a stream graph synchronously. In each evaluation cycle inputs are supplied with values. Then.input and delay nodes are triggered to initiate the propagation of values. Listeners can be registered to receive results at output streams.

Attributes

Companion:
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object Trace

Factory for Interpreter.Traces.

Factory for Interpreter.Traces.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Trace.type

Evaluates expressions used in traces.

Evaluates expressions used in traces.

Attributes

See also:
Graph
Supertypes
class Object
trait Matchable
class Any
Self type

Provides parsing for traces in csv or standard format.

Provides parsing for traces in csv or standard format.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type