%YAML 1.2
---
# Check indicators of imminent time travel
#
# (Actually test support for subclauses, arithmetic, and boolean expressions)
#
# We start the process by unconditionally emitting a signal for part of the
# checked states below
emit:
    signal: movement.speed
    value: 100

# In parallel, evaluate two sets of conditions to emit two different signals
parallel:
    # Check for the condition the driver is approaching but not over the speed
    # required to time travel (in km/h); also check for what should be a
    # corresponding measurement (flux capacitor energy near 1.21 GW)
    - condition: >
        (
        movement.speed >= (88 - 10) * 1.6 &&
        movement.speed <  88 * 1.6
        ) ||
        (
        flux_capacitor.energy_generated >= 1.21 * 0.9 &&
        flux_capacitor.energy_generated < 1.21
        )

      emit:
          signal: lights.internal.time_travel_imminent
          value: true

    # check the same second half of the above conditions expressed using a
    # boolean NOT
    - condition: >
        flux_capacitor.energy_generated >= 1.21 * 0.9 &&
        !(flux_capacitor.energy_generated >= 1.21)

      # Emit (different) signal for external time travel lights
      emit:
          signal: lights.external.time_travel_imminent
          value: true

Add config file for additional complex features
Add config file for additional complex features

This config file requires support for:
* subclauses
* arithmetic
* boolean expressions
