Class EffectExpressionDisplay
java.lang.Object
gov.nasa.jpl.aerie.merlin.driver.timeline.EffectExpressionDisplay
A module for representing
EffectExpressions in a textual form.
- The empty expression is rendered as the empty string.
- A sequence of expressions is rendered as
(x; y). - A concurrence of expressions is rendered as
(x | y).
Because sequential and concurrent composition are associative (see EffectTrait), unnecessary parentheses
are elided.
Because the empty effect is the identity for both kinds of composition, the empty expression is never rendered.
For instance, sequentially(empty(), atom("x")) will be rendered as x, as that graph
is observationally equivalent to atom("x").
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionstatic StringdisplayGraph(EffectExpression<?> expression) Render an event graph as a string using the event type's naturalObject.toString()implementation.static <Event> StringdisplayGraph(EffectExpression<Event> expression, Function<Event, String> stringifier) Render an event graph as a string using the given interpretation of events as strings.
-
Method Details
-
displayGraph
Render an event graph as a string using the event type's naturalObject.toString()implementation.- Parameters:
expression- The event graph to render as a string.- Returns:
- A textual representation of the graph.
-
displayGraph
public static <Event> String displayGraph(EffectExpression<Event> expression, Function<Event, String> stringifier) Render an event graph as a string using the given interpretation of events as strings.- Type Parameters:
Event- The type of event contained by the event graph.- Parameters:
expression- The event graph to render as a string.stringifier- An interpretation of atomic events as strings.- Returns:
- A textual representation of the graph.
-