Skip to main content

Behavioural Application Program Interfaces

Periodic Reporting for period 1 - BEHAPI (Behavioural Application Program Interfaces)

Reporting period: 2018-03-01 to 2020-02-29

The primary goal of this project is to tackle two major shortcomings currently present in the API economy:
(i) the lack of rigour in documentation practices of APIs and
(ii) 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 glueing together components. The use of interfaces featuring behavioural models will enable more effective Software Development Life-Cycles (SDLCs) for software production in the API economy. 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 distil abstract views of software from low-level artefacts 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.

We envisage behavioural specifications as lightweight yet effective instruments. 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. This, in turn, requires support for developing “open” protocols. Bottom-up approaches allow different teams to develop different parts of systems, or even make their components available to be used in other projects. Moreover, bottom-up approaches allow the handling of 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 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 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.
We have surveyed the state-of-the-art and assembled portfolios containing theories, tools and prototypes for API-based software development using behavioural information (WP2, Task T2.1 WP3 Task T3.1 WP4, Task T4.1). We have also engaged in disseminating these results with the public via workshops, exhibitions, boot camps and summer schools (WP5 Tasks T5.2-8). Concretely, the results achieved up to this point are:

1. The following channels for internal and external communication have been established (Task 5.6):
(i) two mailing lists to communicate within the consortium.
(ii) a web portal, www.um.edu.mt/projects/behapi/ hosting repositories and information that can be accessed by the general public.
(iii) two social media channels: www.facebook.com/behapi.rise and www.twitter.com/behapi_rise used for communication and dissemination purposes.

2. Courses for graduate researchers interested in the area of communication-based concurrency supported by behavioural types were developed, used at summer schools and as tutorials at top peer-reviewed conferences (Tasks T5.4).

3. Various workshops and one BehAPI Summer School/Boot Camp were organised offering courses from both academia and industry concerning both the foundations and practice of API-based software development. (Tasks T5.2 T5.3)

4. State-of-the-art reports and portfolios were compiled on the following areas of API software development:
(i) current practices of API provision (Task T2.1)
(ii) current practices of API consumption (Task T3.1)
(iii) tools, prototypes and platforms for API-based software development. (Task T4.1)

5. Ongoing development of languages and models to specify and extract behavioural API information for existing software. (Tasks T2.2 T3.2)

6. Ongoing study of dynamic and static analysis techniques to assist the development of new API-based software and the integration of existing software (Tasks T2.4 T2.5 T3.4 T3.5).

7. Ongoing development of tools and platforms realising the aforementioned models and verification techniques to form part of existing software development life-cycles (Tasks T4.2 T4.3 T4.4).

8. 20 publications were produced by members of the consortium reporting on the above findings.
Progress beyond the state of the art:
1. New results regarding the behavioural type subtyping for APIs in an asynchronous setting.
2. New results on incorporating probabilistic information to API behavioural descriptions.
3. New results on the hierarchical classification on the monitorability of linear-time properties.
4. New toolchain development bringing together existing and newly improved tools.

Expected results until the end of the project:
1. The adaptation of existing behavioural type theory to the realities of API provision and consumption.
2. The development of tools manifesting these adaptations.
3. The integration of these tools in an API Software Development Life-cycle process.

Potential impacts:
1. (Short term) Adoption of our tools and methods by the software development community.
2. (Medium term) The qualitative improvement of API-based software in terms of aspects such as reliability and security.
3. (Long term) Further lowering of barriers to entry to the API Economy and fairer markets with increased competition potential
4. (Long term) The proliferation of more API-based software into everyday life, improving the well-being of EU citizens in terms of information access, healthcare, etc