Closing the Gap -- Formally Verifying Dynamically Typed Programs like Statically Typed Ones Using Hoare Logic -- Extended Version --
Bj\"orn Engelmann, Ernst-R\"udiger Olderog, Nils Erik Flick

TL;DR
This paper introduces a formal verification approach for dynamically typed programs using Hoare logic, creating an abstraction layer that simulates static typing and integrating type inference for semi-automatic proof development.
Contribution
It presents a novel method combining Hoare logic with type inference to verify dynamically typed programs as if they were statically typed, reducing verification overhead.
Findings
Type inference can be integrated into Hoare logic for dynamic languages.
The approach simplifies verification by hiding dynamic typing complexity.
It provides a formal proof method as an alternative to static typing or runtime checks.
Abstract
Dynamically typed object-oriented languages enable programmers to write elegant, reusable and extensible programs. However, with the current methodology for program verification, the absence of static type information creates significant overhead. Our proposal is two-fold: First, we propose a layer of abstraction hiding the complexity of dynamic typing when provided with sufficient type information. Since this essentially creates the illusion of verifying a statically-typed program, the effort required is equivalent to the statically-typed case. Second, we show how the required type information can be efficiently derived for all type-safe programs by integrating a type inference algorithm into Hoare logic, yielding a semi-automatic procedure allowing the user to focus on those typing problems really requiring his attention. While applying type inference to dynamically typed programs…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware Testing and Debugging Techniques · Software Engineering Research · Advanced Malware Detection Techniques
