The primary goal of this project is to tackle two major shortcomings currently present in the API economy:
- the lack of rigour in documentation practices of APIs and
- the lack of support for provably correct methodologies in the round-trip engineering of APIs.
We advocate b-APIs to extend APIs with precise descriptions of their behaviour so as to validate and test applications built by gluing together components. Idiomatically,
b-APIs = behavioural interfaces + APIs
The use of interfaces featuring behavioural models will enable more effective SDLCs for software production in the API economy. In fact, APIs are both a great opportunity and a source of new challenges. Traditional approaches to software development show their limits in this context and do not cope well with the development of open, and scalable communication-centric systems. In particular,
- software is traditionally built in a top-down fashion, from requirements and specifications to code;
- current bottom-up approaches that distill abstract views of software from low-level artifacts (such as source code or executable) are very limited and not linked to the documentation of software;
- the continuous evolution of APIs makes the adoption of round-trip software engineering an indispensable requirement for SDLCs as opposed to more traditional top-down approaches;
- developing team(s) assume context boundaries (e.g., resources, access policies) for subsystems, which may create duplication of work or impose conflicting requirements.
Recent research demonstrated how domain specific languages (DSLs) and behavioural models can be very effective in providing interoperable, correct-by construction, systems. We believe this research is now mature to start making its way into the software industry. Indeed, we envisage behavioural specifications as lightweight yet effective instruments. For instance, they can be employed to automatically obtain documentation by “projecting” global models, which are the “blueprint” of the system (top-down). Such specifications can be used to precisely and (semi-)automatically document components and characterise their behaviour. Behavioural interfaces will facilitate a number of software engineering activities such as the upgrading of components, their dynamic composition, the evaluation of their compatibility, etc.
Results have shown that such top-down engineering methodologies can be fruitfully complemented with bottom-up approaches, for which compositionality is crucial. This, in turn, requires support for developing “open” protocols (with compatibility testing). Bottom-up approaches allow different teams (often different companies) to develop different parts of systems, or even make their components available to be used in other projects. Moreover, bottom-up approaches allow to deal with legacy code, (semi-) automatically inferring from it behavioural descriptions.
BehAPI will enable the definition of techniques and tools for designing, testing, and deploying APIs and API-based software while reducing the time-to-market of software production. We will extend existing prototypes developed in academia, and integrate them with industrial platforms and languages used by practitioners. Concretely, the consortium will target the provision of techniques and tools for round-trip development in the context of the API economy and tackles the following challenges:
- How to formally document the behaviour of existing API, extending existing descriptions which only specify parameter type signature.
- How to identify the often “hidden” communication at different layers of abstraction in order to attain scalability.
- How to ensure a smooth integration of third-party APIs with the system/app being developed.
- How to cope with upgrades while minimising disruptions to running (live) systems.
BehAPI will support developers by easing the API documentation process. We propose to develop methodologies based on behavioural models. In particular, we will consider automata, types, DSLs, and graphs, to enrich interfaces with behavioural information be used as verifiable and lightweight documentation. More concretely,
- we will provide models and tools for the analysis, construction, and validation of API-based software.
- we will integrate said models together, provide algorithms and tools based on them, and embed them within existing industrial development frameworks and SDLCs.
- we will enhance testing for APIs (e.g., by generalising to b-APIs the approach in that reconstructs the source code corresponding to states and transitions of automata models of sequential programs) and provide methodologies and tools for supporting traceability among the different artefacts.
- we will extend industry-strength programming languages with primitives for programming b-APIs.
- we will define specification and verification techniques for (non-)functional properties, resilience, and dependability (scalable synthesis of controllers for reconfigurable, dynamically composable, and self-adaptive systems, together with structured debugging and testing of software).
In fact, behavioural models of interfaces can be (semi-)automatically generated so as to alleviate the burden of producing and maintaining documentation, thus reducing costs and time-to-market while increasing the software quality. A precise behavioural description is paramount not only to facilitate the specification and usage of APIs, but crucially to support composition, verification, and testing. b APIs will allow the automatic detection of the subtle defects emerging when composing APIs (e.g., a message not sent to a waiting component), very much like a precise description of API signatures allows the automatic checking of defects due to data mismatches (e.g., a string is returned where a boolean is expected).
The project will address and solve several concrete problems presently faced by API developers
- How can we empower API-ready code, apps, systems with behavioural dimension?
- How can we migrate legacy systems into the API space?
- How to embed behavioural models in software production while, at the same time, making most of the theoretical underpinnings transparent to practitioners?
- How to extend current practices in the SDLCs with our approaches?
To answer such questions, the participants of the consortium will ensure that the solutions produced will be appropriate and familiar to developers.
Formal linguistic abstractions will be identified to support developers in the realisation of correct-by-design software. A key requirement will be the effectiveness of the solutions. The results of BehAPI will be validated against recurring problems identified in use-cases obtained from the application domains of the industrial partners in the consortium. The use-case evaluations will concentrate on the shortcomings of traditional SDLCs when specifying, integrating, developing and testing API applications in terms of qualitative measures such as time-to-market, reliability, performance predictability, adaptability to context evolution, and interoperability. The consortium will aim to demonstrate that the proposed development techniques and tools based on behavioural models improve SDLCs in all of the above measures.
The consortium is composed of partners from academia, industry, and the public sector. In particular, it gathers groups of researchers that are internationally renown for their work in verification of software behavioural properties. In collaboration with the industrial partners, said research groups will combine top-down and bottom-up approaches based on behavioural models in order to harness SDLCs with effective round-trip software engineering. The synergy of top-down and bottom-up approaches yields a promising framework for enhancing software engineering. Our approach will foster collaborations amongst the participant software companies whom will be encouraged to adopt one another’s API offering when validating our software tools. Researchers will in turn also familiarise themselves with industrial solutions. This will engender collaboration and provide the complementary set of expertise needed to attack such problems.