More Powerful Constant Value Checking with SMT Solving
Jonas Mittnacht, Florian Lanzinger
Abstract
Pluggable type systems extend the basic type system of a programming language by introducing additional type hierarchies to specify more complex properties and dependencies between variables. We consider the Constant Value Checker, a pluggable type checker for Java implemented using the Checker Framework, which provides various pluggable type systems and corresponding checkers. The Constant Value Checker lets users specify restrictions on the values a primitive integer or boolean variable can hold using a set or range of constant values. However, the current implementation of the Value Checker makes use of a limited set of syntactic typing rules that, in practice, often fail to verify well-typedness of more complex code. In this paper, we introduce an extension to the Checker Framework using Satisfiability Modulo Theories (SMT) solvers to address these limitations by creating corresponding first-order logic formulas for expressions whose type checks fail with the current syntactic typing rules and determining their well-typedness based on the satisfiability of these formulas. Furthermore, we introduce new dependent types for specifying allowed values with expressions that can depend on other variables in the program.
Create a lesson
Related papers
Model Checking Probabilistic Multiparty Session Types
Shared title terminology · Aleksander Junge, Leo Seojun Lee, Joseph Paulus et al.
Verified Implementation of the Next-gen Borrow Checking Algorithm for Rust via Abstract Interpretation
Shared title terminology · Jinhua Wu, Yuting Wang, Zhemin Chen
On the Expressive Power of Hook-Indexed State: Comprehending State in the React UI Library (Extended Version)
Shared title terminology · Toby Ueno, Ezra Cooper, Simon Fowler et al.
Typechecking without Minimum Types: Finite Bases and Backward Checking for F<:^
Shared title terminology · Mingkun Xiao, Yixuan Sun
Function Contracts and Beyond: Machine-Checked Assurance Cases for Conformance of C Libraries to Their Requirements
Shared title terminology · Haokun Li, Zhongyi Wang, Mingshuai Chen et al.
A Trust Ledger and an Execution Check for CPG-Based C-to-Lean 4 Autoformalization: Separating Declined from Silently Incorrect Translations
Shared title terminology · Ishan K Singavarapu, Manish Bhatt