Thinkstock
Electronicdesign 15317 Adopting Spark 3

Helpful Hints for Adopting SPARK

May 9, 2017
Adacore and Thales have created a white paper addressing the incremental utilization of SPARK’s provability for high assurance applications.

>> Website Resources
.. >> Library: TechXchange
.. .. >> TechXchange: Embedded Software
.. .. .. >> Topic: Ada and SPARK

Download this article as a .PDF

Developing safe and secure systems can be a challenging task, but one can be made easier with the right tools. Many such tools, like static analysis, can be applied to languages like C and C++ that inherently lack this support, versus languages like SPARK and RUST that incorporate these techniques as part of their definition—making them available to all programmers who use the language.

SPARK, a subset of Ada 2012, goes the extra mile with provable static analysis, but utilizing all of its advantages can be daunting. Still, incremental use of these features can provide significant benefits, and using a subset of them may be suitable in many instances. This is similar to the MISRA support for C and C++ that are a collection of rules that can be selectively applied for many projects. MISRA C and other coding standards provide a way to improve the quality of the code created by programmers.

The white paper, "Implementation Guidance for the Adoption of SPARK," was developed by Adacore and Thales, two companies involved in high assurance systems. It presents a multilevel approach to using SPARK in high assurance development environments. The levels spelled out in the paper include:

  1. Stone – Valid SPARK code
  2. Bronze – Initialization and correct dataflow
  3. Silver – Absence of run-time errors
  4. Gold – Proof of key integrity properties

This isn’t the first system to utilize this type of naming convention. Intel’s latest processor line has gone down this road, as well.

Check out the paper for details, as the description and examples are more extensive that can be covered here. These examples are written in Ada/SPARK, for obvious reasons, but they can also be instructive to those using different platforms to highlight issues common to the creation of high-assurance applications.

There are many myths about Ada, and even less is known of SPARK by most embedded programmers where C and C++ dominate. Using good tools and coding standards can significantly decrease the number of bugs generated over the course of a development program without significantly increasing the amount of time taken to create applications. In fact, the time to develop a safe and secure application can actually be less that that needed to create the application using a less structured approach.

Sponsored Recommendations

The Importance of PCB Design in Consumer Products

April 25, 2024
Explore the importance of PCB design and how Fusion 360 can help your team react to evolving consumer demands.

PCB Design Mastery for Assembly & Fabrication

April 25, 2024
This guide explores PCB circuit board design, focusing on both Design For Assembly (DFA) and Design For Fabrication (DFab) perspectives.

What is Design Rule Checking in PCBs?

April 25, 2024
Explore the importance of Design Rule Checking (DRC) in manufacturing and how Autodesk Fusion 360 enhances the process.

Unlocking the Power of IoT Integration for Elevated PCB Designs

April 25, 2024
What does it take to add IoT into your product? What advantages does IoT have in PCB related projects? Read to find answers to your IoT design questions.

Comments

To join the conversation, and become an exclusive member of Electronic Design, create an account today!