本文是嵌入Softwareseries:嵌入式C开发人员的ADA
技术移民从C到广告的好处a are usually relatively straightforward to demonstrate. Hopefully, this article series provides a good basis for it. However, when faced with having to make an actual business decision, additional considerations need to be considered, such as return on investment, perennity of the solution, tool support, etc. This section will cover a number of the usual questions and provide elements of answers.
What's the Expected ROI of a C to Ada Transition?
从定性的角度来看,在软件开发生命周期中可以在不同时间发现缺陷:
- 在开发人员的桌子上
- During component testing
- 在集成测试期间
- 部署后
- During maintenance
来自研究的数字在这些阶段中发现的缺陷的相对成本差异很大,但是它们之间有明确的顺序。例如,发现在开发时发现的缺陷是固定的数量级比在集成时间的缺陷要便宜的数量级要便宜,这可能涉及昂贵的调试会话并减慢整个系统的接受度。
ADA和SPARK的全部目的是将缺陷检测尽可能多地推向开发人员的桌子。至少对于所有可以在该级别识别的缺陷。尽管由于所有额外的保障措施,严格的编写软件行为可能会付出更多的努力,但这应该在线产生重大和积极的影响,并有助于控制成本。这可能会转化为业务的确切价值。
从定量的角度来看,已经进行了将近25年的两项研究,并提供了类似的见解:
- Rational Software in 1995 found that the overall cost of developing software in Ada was half as much as the cost of developing software in C.
- VDC在2018年进行了一项研究,发现ADA超过C的成本节省的成本从6%到38%的节省不等。
从定性的角度来看,特别是从正式的证明角度来看,两位研究人员在2017年进行了有趣的演讲。他们试图在同一件中应用正式证明,并在ADA/Spark在一端开发另一方面是C/Frama-C。他们的结果表明,ADA/SPARK技术确实更有利于正式的方法。
ADA工具集完成了吗?
一种语言本身对开发安全至关重要的软件几乎没有用。需要完整的工具集来伴随开发过程,尤其是用于版本,测试,静态分析等的工具。
AdaCoreprovides a number of these tools either through its core or add-on package. They include (as of 2019):
- IDE (GNAT Studio)
- Eclipse插件(gnatbench)
- Debugger (GDB)
- 测试工具(gnattest)
- 结构代码覆盖工具(GNATCOVERAGE)
- Metric computation tool (GNATmetric)
- Coding standard checker (GNATcheck)
- 静态分析工具(Codepeer,Spark Pro)
- Simulink代码生成器(QGEN)
- ADA解析器开发自定义工具(Libadalang)
但是,ADA是一种国际标准化的语言,许多公司正在提供第三方解决方案来完成工具集。总体而言,该语言可以并且可以与与等效的C对应物相同的工具使用。
Where Can I Find Ada or SPARK Developers?
在选择ADA和SPARK的边缘,团队的一个普遍问题是如何管理开发商团队的成长和营业额。尽管全球越来越多的大学教授ADA和SPARK,但雇用具有ADA经验的新员工可能仍然具有挑战性。
Fortunately, Ada's base semantics are very close to those of C/C++. Therefore, a good embedded-software developer should be able to learn it relatively easily. This article series is a resource available to get started. Online training material also is available, together with on-site in-person training.
In general, getting an engineer operational in Ada and SPARK shouldn't take more than a few weeks of time.
如何在现有代码库中引入ADA和SPARK?
将ADA和SPARK引入项目或团队的最常见情况是在预先存在的C代码库中进行此操作,该代码基础已经可以分布在数十万(甚至不是数百万行的代码)中。当然,将此软件重写为ADA或SPARK不是实用和适得其反的。
Most teams select either a small piece of existing code that deserves particular attention, or new modules to develop, and then concentrate on it. Developing this module or part of the application also will help develop the coding patterns to be used for the particular project and company. This effort typically involves a few people focused on a few thousand lines of code. The resulting code may be linked to the rest of the C application. From there, the newly established practices and their benefit can slowly spread through the rest of the environment.
Establishing this initial core in Ada and SPARK is critical. While learning the language isn't a particularly difficult task, applying it to its full capacity may require some expertise. One possibility to help accelerate this initial process is to use AdaCore指导服务。
从嵌入SoftwareSeries:嵌入式C开发人员的ADA