pub struct RtLolaHir<M: HirMode> { /* private fields */ }
Expand description

This struct constitutes the Mid-Level Intermediate Representation (MIR) of an RTLola specification.

The RtLolaHir is specifically designed to allow for convenient manipulation and analysis. Hence, it is perfect for working on the specification rather than work with it.

Most Notable Structs and Enums

  • RtLolaMir is the root data structure representing the specification.
  • Output represents a single output stream. The data structure is enriched with information regarding streams accessing it or accessed by it and much more. For input streams confer Input.
  • StreamReference used for referencing streams within the Mir.
  • Expression represents an expression. It contains its ExpressionKind and its type. The latter contains all information specific to a certain kind of expression such as sub-expressions of operators.

Type-State

The Hir follows a type-state pattern. To this end, it has a type parameter, its HirMode. The Hir starts in the BaseMode and progresses through different stages until reaching CompleteMode.
Each stage constitutes another level of refinement and adds functionality. The functionality can be accesses by importing the respective trait and requiring the mode of the Hir to implement the trait. The following traits exist.

Progression through different stages is managed by the HirStage trait, in particular HirStage::progress.

See Also

Implementations

Creates a StreamSelector to query the HIR for different classes of output streams.

Provides access to an iterator over all input streams.

Provides access to an iterator over all output streams.

Provides access to an iterator over all triggers.

Yields the number of input streams present in the Hir. Not necessarily equal to the number of input streams in the specification.

Yields the number of output streams present in the Hir. Not necessarily equal to the number of output streams in the specification.

Yields the number of triggers present in the Hir. Not necessarily equal to the number of triggers in the specification.

Provides access to an iterator over all streams, i.e., inputs, outputs, and triggers.

Retrieves an input stream based on its name. Fails if no such input stream exists.

Retrieves an output stream based on its name. Fails if no such output stream exists.

Retrieves an output stream based on a stream reference. Fails if no such stream exists or sref is a StreamReference::In.

Retrieves an input stream based on a stream reference. Fails if no such stream exists or sref is a StreamReference::Out.

Provides access to a collection of references for all windows occurring in the Hir.

Provides access to a collection of references for all sliding windows occurring in the Hir.

Provides access to a collection of references for all discrete windows occurring in the Hir.

Retrieves an expression for a given expression id.

Panic

Panics if the expression does not exist.

Retrieves a function declaration for a given function name.

Panic

Panics if the declaration does not exist.

Retrieves a single sliding window for a given reference.

Panic

Panics if no such window exists.

Retrieves a single discrete window for a given reference.

Panic

Panics if no such window exists.

Retrieves the stream expression of a particular output stream or trigger.

Panic

Panics if the reference is a StreamReference::In or the stream does not exist.

Retrieves the expression representing the activation condition of a particular output stream or trigger or None for input references.

Panic

Panics if the stream does not exist.

Retrieves the spawn definition of a particular output stream or trigger or None for input references.

Panic

Panics if the stream does not exist.

Retrieves the expression representing the filter condition of a particular output stream or trigger or None for input references.

Panic

Panics if the stream does not exist.

Retrieves the expression representing the close condition of a particular output stream or trigger or None for input references.

Panic

Panics if the stream does not exist.

Generates a map from a StreamReference to the name of the corresponding stream.

Returns the RtLolaHir with the type information for each stream and expression

The function returns the RtLolaHir after the type analysis. The new mode implements the same functionality as the BaseMode and additionally holds for each stream and expression its StreamType. The function moves the information of the previous mode to the new one and therefore destroys the current mode.

Fails

The function fails if the type checker finds a type error in the specification and returns a string with a detailed description.

Returns the RtLolaHir with additional information about the dependencies between streams

The function returns the RtLolaHir after the dependency analysis. The new mode implements the same functionality as the TypedMode and additionally contains the dependencies between streams in the specification. The function moves the information of the previous mode to the new one and therefore destroys the current mode.

Fails

The function returns a RtLolaError if the specification is not well-formed.

Returns the RtLolaHir with the spawn and evaluation layer of each stream

Fails

The function fails if the evaluation order cannot be determined.

Returns the RtLolaHir with the memory-bound for each stream

Fails

The function fails if the memory cannot be determined.

Returns the RtLolaHir in the last mode

The function returns the RtLolaHir in the CompleteMode. This mode indicates that the RtLolaHir has passed all analyzes and now contains all information. The function moves the information of the previous mode to the new one and therefore destroys the current mode.

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

Defines the next mode that is produced by the progress function

Returns an RtLolaHir with additional functionality

Defines the next mode that is produced by the progress function

Returns an RtLolaHir with additional functionality

Defines the next mode that is produced by the progress function

Returns an RtLolaHir with additional functionality

Defines the next mode that is produced by the progress function

Returns an RtLolaHir with additional functionality

Defines the next mode that is produced by the progress function

Returns an RtLolaHir with additional functionality

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Should always be Self

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. Read more

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.