System Behaviour Description Language
Codifying Models and More




Capturing the essence of system composition and behaviour in a simple yet powerful domain-specific language, allowing that essence to be placed close to where it matters.

SBDL.dev
The Challenge
Keeping Light-Weight System Models Up-to-date


‣ Models often described within bespoke (heavyweight) tools

‣ Models and their realisations tend to drift apart

‣ Updating and extending models is cumbersome during development


Particularly in software intensive systems:

‣ Coupling of system models to software is difficult (model-driven approaches notwithstanding)

‣ Models live outside of typical software environments

What is SBDL?
An Introduction
SBDL Venn Diagram
SBDL models system behaviour as a set of related, typed elements, where each element describes a particular facet of system design and the specified relationships between those elements constitute overall system behaviour.
What is SBDL?
Overview

‣ A Domain-Specific Language (DSL) which captures the fundamentals of a system design

‣ Built around a basic but extensible SysML-like metamodel

‣ Includes elements of formal methods; including design rule specification

‣ Designed to be a minimalist and as simple to use as possible; not a just a tool for coders

‣ Interoperability is a basic assumption; plays nice with other MBSE tools, IDEs and revision control systems


⦿ A compiler that aggregates and verifies the described system, and produces diagrams, templates documents ...

What is SBDL?
Basic Semantics: Elements and Relations
SBDL Semantic Model

‣ System is comprises a set of elements

‣ Elements are named and typed

‣ Elements have typed relations with oneanother

‣ Combinations of elements, types and relations defines the system

Model Structure
Foundational Metamodel

SBDL Domain Model

A simplified, extensible metamodel comprising several foundational views provides base types
System Description as Code
SBDL Syntax

‣ Language captures elements, types and relations in a simple syntax

‣ Basic SBDL statement defines a named element of a given type and its properties

‣ Type is taken from the metamodel (and custom types)

‣ Properties can define relations to other elements or attributes of element itself

‣ Type determines permitted and mandatory properties, and their semantics

sbdl_id is sbdl_type  {
	description is "something";
	some_other_property is a,b,c;
}
example_requirement_01 is requirement {
	description is "This is a requirement"
	parent      is another_requirementd_id
	aspect      is example_arch_block
	risk_level  is 8
}
example_arch_block is aspect {
	description is "Architectural Block"
	parent      is another_arch_block
}
Example: Rocket Launch System
Requirements
system_requirement_1   is requirement {
  description is "The rocket shall launch..."
  aspect is rocket_system
}
booster_requirement_1  is requirement {
  description is "The rocket boster shall fire ..."
  aspect is rocket_booster
  parent is system_requirement_1
}
steering_requirement_1 is requirement {
  description is "The rocket shall be steerable ..."
  aspect is rocket_steering
  parent is system_requirement_1
}

SBDL model defines (compiles to) ↦ diagram on right
Example: Rocket Launch System
Architecture
rocket_system   is aspect  {
  description is "Rocket Launch System"
}
rocket_booster  is aspect  {
  description is "Booster Sub-System"
  parent      is rocket_system
}
rocket_steering is aspect  {
  description is "Steering Sub-System";
  parent      is rocket_system;
  related     is rocket_booster^controls
}
steering_firmware^software is aspect  {
  description is "Steering control software"
  parent      is rocket_steering
}

SBDL model defines (compiles to) ↦ diagram on right
Example: Rocket Launch System
Function
launch_protocol  is  function  {
  description is "Launch Sequence"
  aspect is rocket_system
  event  is fire_booster,correct_course
}
fire_booster     is  event     {
  description is "Fire boosters"
  aspect is rocket_booster
}
correct_course   is  event     {
  description is "Correct course trajectory"
  aspect is rocket_steering
  child is SteeringFirmware::correctCourse
}

SBDL model defines (compiles to) ↦ diagram on right
Example: Rocket Launch System
Function (embedded event)
...
CourseStatus SteeringFirmware::correctCourse ( ... )
{
   // Correct the course based on the firmware algorithm output ...
   // @sbdl [@CFUNC]  is  event  { description is "[@-LINE]"; aspect is steering_firmware }
   ...
}
...
Statements can be distributed and embedded in different files (of almost any language)
Example: Rocket Launch System
State
using { aspect is rocket_system }
rocket_ready     is state {
  description is "Rocket ready for launch"
}
rocket_in_motion is state {
  description is "Rocket is in motion"
}
rocket_launch    is transition {
  description is "Rocket Launch"
  state is rocket_ready,rocket_in_motion
  event is fire_booster
}

SBDL model defines (compiles to) ↦ diagram on right
Example: Rocket Launch System
Observations


‣ Although potentially separate, distributed and/or embedded, SBDL definitions constitue a single, verifiable model

‣ ... Ideal for separate teams working towards a single concept

‣ Standalone but also highly amenable to placement within other materials

‣ Diagrams are inferred, not explicity specified

‣ Different rendering backends (PlantUML by default)

‣ Variety of structured output formats can be generated


⦿ Powerful but parsimonious syntax features - see SBDL website

Example Outputs
Document Generation & Templating

‣ Integrated support for document templating

‣ Plays nicely with PanDoc for exotic document formats (PDF, Docx, ...)

‣ Write documents in, for example, Markdown

‣ Including templated queries for SBDL information

‣ Include text, diagrams, tables, matrices ...

⦿ Immediate compiler support for CSV matrices, JSON & YAML trees (no templating required)

Custom Types
Extend the Metamodel


‣ Base metamodel can be easily extended with new types

‣ New types specify required and optional relations and attributes

‣ New types similar to the concept of 'profiles' in SysML

‣ New types inherit the semantics and compiler capabilities of parent type

customtype FunctionalElement is aspect  {
    link_type             is requirement;
    required_property     is UID;
    optional_property     is Rationale;
    some_default_property is "Default text here";
}
new_functional_element is FunctionalElement  {
  requirement is System_Requirement1
  UID is "XXXX:YYYY"
}
Risk Management
FMEA as a First-Class Citizen
using { aspect is a_subsystem }
a_failure is failure-mode {
  description   is "Some failure"
  requirement   is violated_requirement
  detectability is 10
}
||
an_effect is failure-effect {
  description is "Some consequence"
  severity    is 8
}
~|
a_cause is failure-cause {
  description is "Some underlying cause"
  occurrence  is 3
}
~|
another_cause is failure-cause {
  description is "Another underlying cause"
  occurrence  is 3
}

‣ Convenient Syntax for defining FMEA

‣ Requirements, FMs, Causes ... can be distributed in different locations

‣ Immediate Interoperability with FMEA.dev (OpenFMEA format)

Design Rules
Using Prolog Facts

‣ Prolog is a mature language for knowledge representation and interrogation

‣ SBDL model is compiled and exposed to Prolog as a set of facts

‣ Assertions can then be made against these facts

‣ Such assertions may express design rules and assumptions

‣ Test your design - and ensure large models remain compliant

base_element is aspect  {
  description is "base aspect"
  child_element is aspect {
	description is "child aspect"
  }
}
test_requirement is requirement  {
  aspect is child_element
  description is "Test Requirement"
}
# assert that element named 'child_element' must exist
[@PL_ASSERT:TestAspectExists,aspect(identifier(child_element),_,_,_,_,_,_)]
Overview
Models, Materials, Documents

SBDL Overview

Models expressed in SBDL can be distributed in and built from diverse materials
Practical Notes
Supporting Tools

‣ Easy to install compiler with Python Pip

‣ Compiler adheres to compilation norms (calling conventions)

‣ Plays nice with CMake

‣ Open to user extension (new compilation modes, language directives)

‣ VSCode extension with syntax highlighting

Visual Studio Code Extension
Summary
Benefits of SBDL

‣ Easy to learn DSL for expressing System Design

‣ Extensible with custom types, design rules...

‣ Strong tooling support: compiler, IDE extension, export formats ...

‣ Interoperable with other modelling environments (e.g. Cameo Systems Modeler)


⦿ Enables design artefacts to stay close to where they matter most; be it in code, documents ...


Try the SBDL Quickstart today!