de.uni_luebeck.isp.tessla.interpreter

Members list

Type members

Classlikes

case object BuildInfo

This object was generated by sbt-buildinfo.

This object was generated by sbt-buildinfo.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
Self type
BuildInfo.type
class CtfEventIterator(reader: CTFTraceReader, abortAt: Option[BigInt]) extends Trace

An Interpreter.Trace generated from a CTF trace.

An Interpreter.Trace generated from a CTF trace.

Value parameters

abortAt

the amount of events after which the trace should stop

reader

the reader providing the trace data

Attributes

Supertypes
trait Iterator[Event]
trait IterableOnceOps[Event, Iterator, Iterator[Event]]
trait IterableOnce[Event]
class Object
trait Matchable
class Any
Show all
class EventIterator(events: Iterator[Event], abortAt: Option[BigInt]) extends Iterator[Event]

Value parameters

abortAt

the amount of events after which the trace should stop

events

the parsed input events

Attributes

Supertypes
trait Iterator[Event]
trait IterableOnceOps[Event, Iterator, Iterator[Event]]
trait IterableOnce[Event]
class Object
trait Matchable
class Any
Show all
class Interpreter(val spec: Specification) extends StreamEngine

An interpreter instance for a given specification.

An interpreter instance for a given specification.

Value parameters

spec

the specification

Attributes

Companion
object
Supertypes
class StreamEngine
class Object
trait Matchable
class Any
object Interpreter

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
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

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

Attributes

Companion
class
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.

Value parameters

externs

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

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any

Performs type checking on runtime values.

Performs type checking on runtime values.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
object StreamEngine

Attributes

Companion
class
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
Supertypes
class Object
trait Matchable
class Any
Known subtypes
class Interpreter
object Trace

Factory for Interpreter.Traces.

Factory for Interpreter.Traces.

Attributes

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

Evaluates expressions used in traces.

Evaluates expressions used in traces.

Attributes

See also
Supertypes
class Object
trait Matchable
class Any
Self type
object TraceParser

Provides parsing for traces in csv or standard format.

Provides parsing for traces in csv or standard format.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type