Thank you for Subscribing to CIO Applications Weekly Brief
A featured contribution from Leadership Perspectives, a curated forum for enterprise technology leaders, nominated by our subscribers and vetted by the CIOApplications Editorial Board.

Lendmark Financial Services
Dibyendu Baksi, PhD Vice President, Enterprise Architecture
Need For Formal Methods In Software Design


Architecture/design: Any software product starts with its specification followed by design, development and testing phases irrespective of development methodologies or tools. Despite great advancements in software technology in recent decades, there appear to be some widespread misconceptions and a lack of appreciation of the importance of architecture and design phases in the Software Development Lifecycle (SDLC). Architecture is fundamentally about choice and options to assemble appropriate components and configure and connect them to achieve the goals of the specification. The complexity management in the evolution toward a digital transformation of enterprise roadmaps, in the backdrop of a reference architecture, mandates some level of concrete design before any development begins, even in iterative and agile methodologies. Elimination of risk is the major reason for high-level architecture followed by more detailed design, due to the cost of fixing bugs late. As Edsger W. Dijkstra said,“ Program testing can be used to show the presence of bugs, but never to show their absence!”; hence, enter formal methods.
Requirements are typically stated in some natural language and implementation is done using programming languages. The main design challenge was to bridge the gap between specification and implementation for traceability and assurance. The need was for a precise language amenable to automated analysis so that the expected run-time behaviour of the implementation conforms to the specification. Mathematical logic and new efficient state-space search algorithms led to the development of techniques and tools that came to the rescue where such guarantees are demanded. The techniques range from fully automated property checking (known as ‘model checking’) using a kind of mathematical logic known as temporal logic that goes beyond traditional predicate logic (i.e., ‘and’, ‘or’, ‘for all’ etc.) with new logical operators such as ‘eventually’, ‘always’ to human-assisted or automated theorem provers.
Tools usage: A wide range of tools have been developed to support formal specification and verification of software. The biggest challenge to the adoption of these tools in commercial application software is the lack of skilled architects and software engineers. In certain domains such as cyber-physical systems, security, device drivers etc., there is enough motivation to apply formal specification and design cycles, thanks to recent headlines such as ‘Spectre’ and ‘Meltdown’ bugs. In areas such as security, the European ITSEC recommended the use of strict formal design from its fifth security level and required the use of formal verification techniques at the seventh level. With the widescale prevalence of distributed cloud-based tools and new methodologies of software construction, the importance of proper design has become more vital. For some new categories of entrants, e.g., real-time machine learning applications, lack of safety could be fatal. Model checkers such as Spin, NuSMV, UPPAL or Alloy have already proven their worth by uncovering critical design flaws. In the commercial sector, Amazon used TLA+ to verify designs of widely popular AWS components such as S3 and DynamoDB. Theorem provers such as Isabelle/HOL or Coq are being used in blockchain designs.
Conclusions: Software is part of our daily life and it is not hard to spot bugs resulting in endless frustration among consumers and corporations. The emergence of automated model checking and theorem prover tools is a response to address that core design verification issue. The pressure on corporations to deploy software quicker with more features in an environment of faster hardware, network and distributed systems demands a dire need to use formal methods when appropriate. It is imperative for CIOs to recognize the critical role of formal architecture and design in commercial mission-critical software today, given the high cost of failures.

