• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In
Build has been canceled!

Scala-Robotics-Simulator / PPS-22-srs / #387

26 Aug 2025 06:11PM UTC coverage: 45.024% (-0.6%) from 45.667%
#387

Pull #63

github

davidcohenDC
feat(simulation): add TimePanel for displaying simulation timing information
Pull Request #63: refactor: enhance simulation gui

13 of 69 new or added lines in 8 files covered. (18.84%)

3 existing lines in 3 files now uncovered.

1113 of 2472 relevant lines covered (45.02%)

6.22 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/main/scala/io/github/srs/model/entity/dynamicentity/behavior/BehaviorTypes.scala
1
package io.github.srs.model.entity.dynamicentity.behavior
2

3
import cats.Id
4
import cats.data.Kleisli
5
import io.github.srs.model.entity.dynamicentity.*
6

7
/**
8
 * Core types for the Behavior DSL
9
 *
10
 *   - [[Behavior]] — total, pure decision (`I => A` via `Kleisli[Id, I, A]`)
11
 *   - [[PartialBehavior]] — partial decision (`I => Option[A]` via `Kleisli[Option, I, A]`)
12
 *   - [[Condition]] — boolean predicate on the input
13
 *
14
 * Partial behaviors compose left-biased (first `Some` wins) and are finalized into total behaviors via the DSL’s
15
 * orElse.
16
 */
17
object BehaviorTypes:
18

×
19
  /**
20
   * Total, pure decision (Reader specialized to `Id`).
21
   *
22
   * @param I
23
   *   input type
24
   * @param A
25
   *   output type
26
   */
27
  type Behavior[I, A] = Kleisli[Id, I, A]
28

29
  /**
30
   * Partial decision: returns `Some(a)` if it fires, otherwise `None`.
31
   *
32
   * @param I
33
   *   input type
34
   * @param A
35
   *   output type
36
   */
37
  type PartialBehavior[I, A] = Kleisli[Option, I, A]
38

39
  /**
40
   * Boolean predicate on the input.
41
   *
42
   * @param I
43
   *   input type
44
   */
45
  type Condition[I] = I => Boolean
46

47
  /**
48
   * Constant predicate that always evaluates to `true`.
49
   *
50
   * @return
51
   *   a condition that ignores its input and returns `true`
52
   */
53
  val always: Condition[Any] = _ => true
UNCOV
54
end BehaviorTypes
×
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc