5 research outputs found
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.Comment: This is a preprint version of the paper that appeared at Modelsward
201
Towards Repairing Scenario-Based Models with Rich Events
Repairing legacy systems is a difficult and error-prone task: often, limited
knowledge of the intricacies of these systems could make an attempted repair
result in new errors. Consequently, it is desirable to repair such systems in
an automated and sound way. Here, we discuss our ongoing work on the automated
repair of scenario-based models: fully executable models that describe a system
using scenario objects that model its individual behaviors. We show how rich,
scenario-based models can be model-checked, and then repaired to prevent
various safety violations. The actual repair is performed by adding new
scenario objects to the model, and without altering existing ones - in a way
that is well aligned with the principles of scenario-based modeling. In order
to automate our repair approach, we leverage off-the-shelf SMT solvers. We
describe the main principles of our approach, and discuss our plans for future
work.Comment: This is a preprint version of a paper that will appear at Modelsward
202
Guarded Deep Learning using Scenario-Based Modeling
Deep neural networks (DNNs) are becoming prevalent, often outperforming
manually-created systems. Unfortunately, DNN models are opaque to humans, and
may behave in unexpected ways when deployed. One approach for allowing safer
deployment of DNN models calls for augmenting them with hand-crafted override
rules, which serve to override decisions made by the DNN model when certain
criteria are met. Here, we propose to bring together DNNs and the well-studied
scenario-based modeling paradigm, by expressing these override rules as simple
and intuitive scenarios. This approach can lead to override rules that are
comprehensible to humans, but are also sufficiently expressive and powerful to
increase the overall safety of the model. We describe how to extend and apply
scenario-based modeling to this new setting, and demonstrate our proposed
technique on multiple DNN models.Comment: This is a preprint version of the paper that appeared at Modelsward
202
Integrating Inter-Object Scenarios with Intra-object Statecharts for Developing Reactive Systems
In all software development projects, engineers face the challenge of
translating the requirements layer into a design layer, then into an
implementation-code layer, and then validating the correctness of the result.
Many methodologies, languages and tools exist for facilitating the process,
including multiple back-and-forth `refinement trips' across the requirements,
design and implementation layers, by focusing on formalizing the artifacts
involved and on automating a variety of tasks throughout. In this paper, we
introduce a novel and unique development environment, which integrates
scenario-based programming (SBP) via the LSC language and the object-oriented,
visual Statecharts formalism, for the development of reactive systems. LSC
targets creation of models and systems directly from requirement
specifications, and Statecharts is used mainly for specifying final component
behavior. Our integration enables semantically-rich joint execution, with the
sharing and interfacing of objects and events, and can be used for creating and
then gradually enhancing testable models from early in requirements elicitation
through detailed design. In some cases, it can be used for generating final
system code. We describe the technical details of the integration and its
semantics and discuss its significance for future development methodologies
Context-Oriented Behavioral Programming
Modern systems require programmers to develop code that dynamically adapts to
different contexts, leading to the evolution of new context-oriented
programming languages. These languages introduce new software-engineering
challenges, such as: how to maintain and keep the separation of concerns of the
codebase? how to model the changing behaviors? how to verify the system
behavior? and more.
This paper introduces Context-Oriented Behavioral Programming(COBP) - a novel
paradigm for developing context-aware systems, centered on natural and
incremental specification of context-dependent behaviors. As the name suggests,
we combine behavioral-programming(BP) - a scenario-based modeling paradigm -
with context idioms that explicitly specify when scenarios are relevant and
what information they need. The core idea is to connect the behavioral model
with a data model that represents the context, allowing an intuitive connection
between the models via update and select queries. Combining
behavioral-programming with context-oriented programming brings the best of the
two worlds, solving issues that arise when using each of the approaches in
separation.
We begin with providing abstract semantics for COBP, laying the foundations
for applying reasoning algorithms to context-aware behavioral programs. We then
exemplify the semantics with formal specifications of systems, including a
variant of Conway's Game of Life. Finally, we present a JavaScript-based
implementation of the paradigm and provide two case studies of real-life
context-aware systems (one in robotics and another in IoT) that were developed
using this tool. Throughout the examples and case studies, we provide design
patterns and a methodology for coping with the above challenges.Comment: Submitted to: Information and Software Technology, special issue
"Bridging the gap in the engineering of context-aware software systems