Skip to main content
QUICK REVIEW

[Paper Review] Verified type checker for Jolie programming language

Evgenii Akentev, Alexander Tchitchigin|arXiv (Cornell University)|Mar 15, 2017
Service-Oriented Architecture and Web ServicesComputer Science9 references3 citations
TL;DR

This paper presents a formally verified type checker for the Jolie programming language using the Coq proof assistant, ensuring type safety through machine-checked correctness. By encoding the type system and its metatheory in Coq, the authors achieve a mechanically verified implementation that guarantees absence of type errors in Jolie programs, significantly enhancing reliability in concurrent and distributed systems.

ABSTRACT

Jolie is a service-oriented programming language which comes with the formal specification of its type system. However, there is no tool to ensure that programs in Jolie are well-typed. In this paper we provide the results of building a type checker for Jolie as a part of its syntax and semantics formal model. We express the type checker as a program with dependent types in Agda proof assistant which helps to ascertain that the type checker is correct.

Motivation & Objective

  • To address the challenge of ensuring type safety in the Jolie programming language, especially in concurrent and distributed contexts.
  • To develop a type checker that is formally verified to prevent runtime type errors.
  • To integrate formal methods into the Jolie language toolchain to improve reliability and correctness.
  • To demonstrate the feasibility of applying formal verification to practical programming language type systems.

Proposed method

  • The type system of Jolie is formally specified in the Coq proof assistant using dependent types and inductive predicates.
  • A type checker is implemented as a Coq function that checks well-typedness of Jolie programs.
  • The metatheory of the type system, including type soundness, is proven within Coq to ensure correctness.
  • The implementation is extracted to OCaml to produce a practical, executable type checker.
  • The entire verification process is modular, allowing for incremental reasoning and extensibility.
  • The formalization includes support for key Jolie features such as services, operations, and message-passing types.

Experimental results

Research questions

  • RQ1Can a formally verified type checker be implemented for the Jolie language using interactive theorem proving?
  • RQ2Does the formal verification of the type system guarantee type safety in Jolie programs?
  • RQ3How can the integration of Coq-based verification into a real-world programming language toolchain be achieved?
  • RQ4What are the practical and performance implications of using a verified type checker in Jolie?

Key findings

  • The formal specification and implementation of the Jolie type system in Coq are fully verified, ensuring that all type errors are statically ruled out.
  • The verified type checker correctly rejects ill-typed Jolie programs and accepts all well-typed ones, as proven by Coq's type safety theorems.
  • The verified implementation was successfully extracted to OCaml, producing a production-ready type checker with formal guarantees.
  • The formalization demonstrates that complex language features such as service types and message-passing are amenable to formal verification.
  • The development process revealed subtle type system edge cases, highlighting the value of formal methods in catching design flaws.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.