On-the-Fly Construction of Composite Events in Scenario-Based Modeling using Constraint Solvers

Scenario-Based Programming is a methodology for modeling and constructing complex reactive systems from simple, stand-alone building blocks, called scenarios. These scenarios are designed to model different traits of the system, and can be interwoven together and executed to produce cohesive system behavior. Existing execution frameworks for scenario-based programs allow scenarios to specify their view of what the system must, may, or must not do only through very strict interfaces. This limits the methodology's expressive power and often prevents users from modeling certain complex requirements. Here, we propose to extend Scenario-Based Programming's execution mechanism to allow scenarios to specify how the system should behave using rich logical constraints. We then leverage modern constraint solvers (such as SAT or SMT solvers) to resolve these constraints at every step of running the system, towards yielding the desired overall system behavior. We provide an implementation of our approach and demonstrate its applicability to various systems that could not be easily modeled in an executable manner by existing Scenario-Based approaches.



There are no comments yet.


page 1

page 2

page 3

page 4


Scenario-based Stochastic Constraint Programming

To model combinatorial decision problems involving uncertainty and proba...

Constraint Answer Set Programming: Integrational and Translational (or SMT-based) Approaches

Constraint answer set programming or CASP, for short, is a hybrid approa...

Modeling and Solving Graph Synthesis Problems Using SAT-Encoded Reachability Constraints in Picat

Many constraint satisfaction problems involve synthesizing subgraphs tha...

On the proof complexity of MCSAT

Satisfiability Modulo Theories (SMT) and SAT solvers are critical compon...

On Dedicated CDCL Strategies for PB Solvers

Current implementations of pseudo-Boolean (PB) solvers working on native...

Towards Repairing Scenario-Based Models with Rich Events

Repairing legacy systems is a difficult and error-prone task: often, lim...

SAT Heritage: a community-driven effort for archiving, building and running more than thousand SAT solvers

SAT research has a long history of source code and binary releases, than...
This week in AI

Get the week's most popular data science and artificial intelligence research sent straight to your inbox every Saturday.

1 Introduction

Modeling complex systems is a difficult and error-prone task. The emerging Scenario-Based Programming approach (SBP[DaHa01, HaMa03, HaMaWeACM] aims to mitigate this difficulty. The key notion underlying SBP is modeling through the specification of scenarios, each of which represents a certain aspect of the system’s behavior. These scenarios may describe either desirable behaviors that the system should strive to uphold, or undesirable behaviors that the system should try to avoid. The models produced in SBP are fully executable: when composed together according to certain underlying semantics, the scenarios yield cohesive system behavior.

The SBP approach has been implemented in dedicated frameworks such as the Play-Engine and PlayGo for the visual language of Live Sequence Charts (LSC) language [HaMa03, Playgo2010] or ScenarioTools [GeGrGuKoGlMaKa17] for the Scenario Modeling Langauge (SML) textual language. Further, SBP has been implemented on top of several standard programming languages, such as Java [HaMaWe10BPJ], C++ [HaKa14], and JavsScript [BaWeRe18], and was amalgamated with the Statecharts visual formalism [morse2018SCSBP]

SBP has been successfully used in modeling complex systems, such as web-servers [HaKa14], cache coherence protocols [HaKaMaMa16], robotic controllers [GrGr18b], and as part of the Wise Computing effort aimed at turning computers into proactive members of system development teams [HaKaMaMa18IEEEComputer].

Despite the diversified adaptations of SBP for various programming languages and for various use cases, a common theme remains: in all existing frameworks, scenarios are interwoven using a very basic mechanism. Specifically, during execution the scenarios are synchronized at predetermined points, and at every synchronization point each scenario declares a set of events it would like to see triggered, and a set of events it forbids from being triggered. The execution framework then selects for triggering one event that is requested by at least one scenario and is not blocked by any of the scenarios. The event is broadcast to all scenarios, and the execution continues until the next synchronization point is reached. An example appears in Fig. LABEL:fig:watertap.