RUS  ENG
Full version
JOURNALS // Proceedings of the Institute for System Programming of the RAS // Archive

Proceedings of ISP RAS, 2016 Volume 28, Issue 2, Pages 33–44 (Mi tisp18)

This article is cited in 5 papers

Refinement types in jolie

Alexander Tchitchigin, Larisa Safina, Mohamed Elwakil, Manuel Mazzara, Fabrizio Montesi, Victor Rivera

Innopolis University, Software Engineering Lab

Abstract: Jolie is the first language for microservices and it is currently dynamically type checked. This paper considers the opportunity to integrate dynamic and static type checking with the introduction of refinement types, verified via an SMT solver. The integration of the two aspects allows a scenario where the static verification of internal services and the dynamic verification of (potentially malicious) external services cooperate in order to reduce testing effort and enhance security.
Refinement types are well-known technique for numeric, array and algebraic data types. They rely on corresponding SMT-theories. Recently SMT solvers got support for a theory of strings and regular expressions. In the paper, we describe possible application of the theory to string refinement types. We use Jolie programming language to illustrate feasibility and usefulness of such extension. First, because Jolie already has syntax extension to support string refinements. We build on top of that extension to provide static type checking. Second, because in the realm of microservices the need for improved checking of string data is much higher as most of external communication goes through text-based protocols.
We present simplified but real-world example from the domain of web-development. We intentionally introduce a bug in the example demonstrating how easily it can slip a conventional type system. Proposed solution is feasible, as it do not accept program with the bug. Complete solution will need enhancements in precision and error reporting.

Keywords: Microservices, Jolie, Refinement Types, SMT, SAT, Z3.

Language: English

DOI: 10.15514/ISPRAS-2016-28(2)-2



Bibliographic databases:


© Steklov Math. Inst. of RAS, 2024