DO-178C In Plain Text – Part 1

Nov 29, 2023 | AI, DO-178C

“Simplicity is the ultimate sophistication”

✨Greetings fellow humans 👫 (+ 🛸 👽 💻 🤖), and a very warm welcome to my first video. Thanks for showing up. 🙏

In this video I would like to present to you a rather radical, some would say game-changing, system for safety-critical software development, that involves nothing more than plain text and open-source software.

First, a little introduction. My name is Ed Liversidge, and I am the Managing Director and CTO of Harmonic Software Systems https://harmonicss.co.uk, a software engineering company based in the U.K.

I have had my company for the past 24 years, specialising in embedded systems, Real Time Operating Systems and for the past 8 years, testing and certifying safety-critical aerospace systems.

I have been programming since I was 11 years old, and have been using the Emacs text editor since 1995. In my company, all my engineers use a variant of Emacs called Spacemacs.

Overview

What is DO-178C? 🛬 🚁

Answered by our “Virtual DER” AI, trained on the DO-178C standard:

Answer: DO-178C, titled “Software Considerations in Airborne Systems and Equipment Certification,” is a document that provides guidance for the aviation community on how to ensure that the software aspects of airborne systems and equipment comply with airworthiness requirements.

Key here is that it provides guidance, it does not define a process (that is left to us).

It does define objectives to be met (e.g. HLRs are developed) and outputs to be produced (e.g. Software Requirements Data).

In this short video we will:

  • Look at the current DO-178C tool-set and address shortcomings
  • Explore why using plain text for DO-178C is so powerful
  • Give a brief demo

DO-178C Current Tool-set

The certification process for DO-178C (in my experience) usually employs a mix of tools to manage the process e.g:

  • DOORS (an industry standard) or Polarion for requirements management
  • Microsoft Word for all the documents (PSAC, SDP, SVCP etc)
  • Microsoft Excel to track review process and traceability
    (Polarion is better)
  • Perforce and/or Git for version control
  • Jira or Polarion for Problem Reports
  • Email threads for discussions

Current Limitations

  • DOORS needs a server, change control difficult, just tracks requirements
  • Polarion needs a server, exports as pdf but broken links without the VPN
  • Change control (specifically diffs) difficult with Word and Excel
    • Can turn tracking on, generates a huge list of changes and “red line”
    • Diffs are possible if you have two versions saved, but it is tedious
  • Emails get lost, 12 month retention policy
  • None of these tools integrate or communicate with each other very well

Harmonic Software Systems can offer two solutions

✅ Small-Medium : Plain Text + Spacemacs + Git

Solution looks to work best with smaller teams (2-12 people)

✅ Large-Enterprise : IBM’s ELM Suite

ELM : Enterprise Lifecycle Management

DOORS, Rhapsody, Workflow and Test management

In this video we will focus on the use of Plain Text within the DO-178C process, and aim to show you how this presents a much more powerful solution.

Advantages of Plain Text

✅ Timeless

ASCII Text has no reliance on format that will be phased out, or software that will become outdated.

✅ Always readable

By both human and AI. No web server involved and can be read using (ugh) notepad if required. The big advantage, which we will see in later videos, is the benefit of having a LLM/AI easily read all the DO-178C documents.

✅ Searchable with multiple tools (grep, ag, rg, find)

Powerful command line tools allow engineers to quickly find information within documents. Compare with a Ctrl-f in Word to find something, which only works if you have the correct document.

✅ Parse-able by Python and AI

Python allows further processing, e.g. extracting expected results out of the SVCP, and comparing to actual test runs for test PASS or FAIL.

Plain Text + Git ✨

By far, the most widely used modern version control system in the world today is Git. Git is a mature, actively maintained open source project originally developed in 2005 by Linus Torvalds, the famous creator of the Linux operating system kernel.

✅ Track every change, update, review etc

✅ Distributed

✅ Powerful integration with Spacemacs using Magit

✨Plain Text + Git + Spacemacs✨

Spacemacs is a fork of the mighty Emacs editor that has over 40 years of development behind it, and is still going stronger than ever.

It is powered by the LISP (LISt Processor) programming language which allows for powerful customisation and packages to be developed, two of which we make extensive use of:

📑 Org Mode:

✅ Powerful markup language
✅ Task and time management
✅ Executable code – dynamic updates

📑 Org Roam:

✅ Powerful deep linking between all documents
✅ Visualisation for traceability

Demo Intro

I would just like to point out, that this is WIP, and there are still kinks to iron out and more learning to be done to refine the process.

Still, I hope it will become obvious what a powerful process this is.

Demo 1 : Spacemacs + Org Mode

Quick run though of Spacemacs, Org Mode and Traceability.

Note: Spelchecker is runnikng on every word we write!

This presentation is delivered in Org Mode!

First I will open the Plan for Software Aspects of Certification (PSAC) document for our current project, a certified boot loader written in Rust.

Example Plain Text PSAC in Spacemacs Org Mode

Figure 1: Example Plain Text PSAC

This was all generated by our ✨Multi Agent AI✨, from a single prompt, after we had trained it on DO-178. We will speak more of this in a future video.

In Emacs Org Mode, I can TAB open these headings, called drawers in Emacs speak, move them around, promote and demote them etc.

I can also very easily export any org document to pdf, html, latex, odf etc with:

, e e h o

Next, I will open the Software Requirements Document:

Example Plain Text SRD in Spacemacs Org Mode

Figure 2: Example Plain Text SRD

You can see that all the requirements are listed, with a unique id (I have some LISP code to keep track of these numbers).

Demo 2 : Progress Tracking

The task tagging of Org Mode allows me to set each requirement into any (customisable) state.

Shift-RightCursor
TODO -> TODO-AI -> TODO-AI-REVIEW -> OPEN -> WAITING -> DELETED -> REVIEWED-AI -> REVIEWED -> DONE
Note the timestamp when WAITING/DELETED/REVIEWED/DONE 
Note TODO-AI is a marker to allow the AI to modify the data

Also note the unique ID – more on that later, and the tag :bob: of the person that has been assigned the OPEN state to.

I can open up the Agenda TODO view using , a t , press F for follow mode and investigate all the tasks that need attention.

Demo 3 : Links and HLR/LLR Traceability

Links are a very powerful feature found in many documentation systems, and they work very well in Org Mode.

Note I can toggle the display of the full link using 'T l' (that is a capital 'T' followed by a 'l') 
Note the unique id again. I will talk more about this in a future video.

The High Level Requirement HLR009 is linked to the Low Level Requirement LLR001 labelled as “implemented by”, and given a FILE tag, signifying that we are defining the contents of a file, called start.s

Click to follow and it opens up the LLR, going to different .org file. We are now down in the design.

Note the link back to the HLR 'implements', establishing bi-directional tracability (essential for DO-178C)

Now I open the LLR001 ‘drawer’ with the TAB key, exposing the FUNC (Function) LLR _start

Note I have chosen to implement multiple levels of linked LLRs, because this is easy in Org Mode
     Format is LLRXXX.YY.ZZ  FILE/FUNC/IMP

HLR To LLR Linkage Example

Figure 3: HLR to LLR Linkage Example

TAB open to see the IMPLementation LLRs (LLR002 to LLR012) as children of the FUNCtion LLR (LLR035), which are children of the FILE LLR (LLR001).

This ties everything together very nicely 👌😎

Demo 4 : Dynamic Update of Design Diagrams using Graphviz

TAB open LLR001.01.04 to see the design details to disable the interrupts on an ARM A53 processor.

Note all these design details were written by our ✨ AI ✨, trained on the A53

Dynamic Regeneration of Design Document

TAB open the “Sequence Diagram” drawer.

Note the Sequence Diagram was generated by the AI from the requirements (LLR.01-LLR.11)

I have witnessed engineers spend countless hours moving boxes around, squeezing them in, changing labels etc in Word, due to a requirements change.

Those days are over!

I will change the diagram, moving LLR.06+ down

{rank=same LLR01 LLR06}
to
{rank=same LLR02 LLR06}

I can dynamically regenerate the diagrams at will using C-c C-c

Still here?

  • Let me say a big “thank you” to you for sticking with me to the end of the video.
  • Also a big thank you to David Wilson at https://systemcrafters.net/, who’s fantastic in-depth videos on Emacs, Org Mode and Org Roam have really helped me to produce this content. I’ve bought a hoodie to say thanks. 😃
  • For more information or to arrange a more in depth demo please go to https://harmonicss.co.uk/contact and book an appointment where I will be more than happy to explain how this system is going to massively cut your certification costs.
  • Also have a look at our white paper Fix, Develop and Test Embedded Software In A Game Changing Way – A DO-178C Software Blueprint, for further info on all the tools we use for DO-178C certification.
  • We use this system for our customers – please get in touch.

What’s Next?

The next video will focus upon applying the Zettelkasten note taking system to DO-178C using Org Roam.

Subsequent videos will move onto showcasing our Large Language Models to do the heavy, tedious lifting that is in the DO-178C process.

Browse Category

Join our DO-178C group on LinkedIn

Got A Project In Mind?

We fix, develop and test embedded software for the aerospace & defence industry specialising in DO-178C safety-critical testing. Speak to us. We have laser focus, unprecedented attention-to-detail and provide phenomenal value.