Error Localization for Sequential Effect Systems (Extended Version)

07/28/2023
by   Colin S. Gordon, et al.
0

We describe a new concrete approach to giving predictable error locations for sequential (flow-sensitive) effect systems. Prior implementations of sequential effect systems rely on either computing a bottom-up effect and comparing it to a declaration (e.g., method annotation) or leaning on constraint-based type inference. These approaches do not necessarily report program locations that precisely indicate where a program may "go wrong" at runtime. Instead of relying on constraint solving, we draw on the notion of a residual from literature on ordered algebraic structures. Applying these to effect quantales (a large class of sequential effect systems) yields an implementation approach which accepts exactly the same program as an original effect quantale, but for effect-incorrect programs is guaranteed to fail type-checking with predictable error locations tied to evaluation order. We have implemented this idea in a generic effect system implementation framework for Java, and report on experiences applying effect systems from the literature and novel effect systems to Java programs. We find that the reported error locations with our technique are significantly closer to the program points that lead to failed effect checks.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
08/06/2018

Polymorphic Iterable Sequential Effect Systems

Effect systems are lightweight extensions to type systems that can verif...
research
05/18/2022

Global Type Inference for Featherweight Generic Java

Java's type system mostly relies on type checking augmented with local t...
research
11/29/2018

Sequential Effect Systems with Control Operators

Sequential effect systems are a class of effect system that exploits inf...
research
01/23/2018

Enforcing Programming Guidelines with Region Types and Effects

We present in this paper a new type and effect system for Java which can...
research
09/11/2018

Faster Variational Execution with Transparent Bytecode Transformation

Variational execution is a novel dynamic analysis technique for explorin...
research
02/14/2019

Sip4J: Statically inferring permission-based specifications for sequential Java programs

In mainstream programming languages such as Java, a common way to enable...
research
08/31/2023

Comparing Rapid Type Analysis with Points-To Analysis in GraalVM Native Image

Whole-program analysis is an essential technique that enables advanced c...

Please sign up or login with your details

Forgot password? Click here to reset