What is Scenario-Based Modeling and SMLK?
SMLK (Scenario Modeling Language for Kotlin) is a framework that supports scenario-based modeling / programming in the programming language Kotlin.
Scenario-based modeling is a technique to model or program the behavior of a software (-controlled) system in close alignment with its (functional) requirements, which describe how the software system must or must not react to external events. The behavioral requirements or behavioral aspects of the system can each be modeled as separate scenarios, which are threads of behavior that can each extend as well as constrain the behavior of other scenarios.
The advantage of and motivation for scenario-based modeling, and for scenario-based programming with SMLK, is to write code that is easy to understand and to maintain, since the code is in close alignment with the requirements. Especially, scenario-based programming makes it easy to incrementally extend the code when new requirements arise: it is often possible to extend as well as constrain the behavior by only adding scenarios. But, this is of course not always possible, because the new requirements are in conflict with or add exceptions to existing requirements. Then, however, the code changes are closely aligned with the conflict resolution in the requirements.
- A technique to model or program the behavior of a software system or software module in close alignment with its requirements.
- Individual behavioral requirements or behavioral aspects of the system can be modeled as separate scenarios, which can be executed in conjunction.
- A scenario is a thread of behavior that can extend as well as constrain the behavior of other scenarios.
- The advantage of scenario-based modeling is twofold:
- Easier maintainability through
- Incremental extensibility
- Scenario-based programming, LSCs, inspired by BPJ and SML… in Kotlin, exploiting coroutines… etc. to create a convenient and intuitive scenario-based modeling/programming framework.
- What kinds of applications is it for?
- Reactive Systems
- Interactive Programs with complex use cases / a complex business process
- If it is important or convenient to program their behavior in close alignment with the requirements.