Debugging Trait Errors as Logic Programs

09/10/2023
by   Gavin Gray, et al.
0

Rust uses traits to define units of shared behavior. Trait constraints build up an implicit set of first-order hereditary Harrop clauses which is executed by a powerful logic programming engine in the trait system. But that power comes at a cost: the number of traits in Rust libraries is increasing, which puts a growing burden on the trait system to help programmers diagnose errors. Beyond a certain size of trait constraints, compiler diagnostics fall off the edge of a complexity cliff, leading to useless error messages. Crate maintainers have created ad-hoc solutions to diagnose common domain-specific errors, but the problem of diagnosing trait errors in general is still open. We propose a trait debugger as a means of getting developers the information necessary to diagnose trait errors in any domain and at any scale. Our proposed tool will extract proof trees from the trait solver, and it will interactively visualize these proof trees to facilitate debugging of trait errors.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
02/04/2020

A reactive algorithm for deducing nodal forwarding behavior in a multihop ad-hoc wireless network in the presence of errors

novel algorithm is presented to deduce individual nodal forwarding behav...
research
09/12/2023

REVIS: An Error Visualization Tool for Rust

Rust is a programming language that uses a concept of ownership to guara...
research
02/18/2021

Fixing Errors of the Google Voice Recognizer through Phonetic Distance Metrics

Speech recognition systems for the Spanish language, such as Google's, p...
research
06/27/2019

Investigating Compilation Errors of Students Learning Haskell

While functional programming is an efficient way to express complex soft...
research
03/04/2016

Getting More Out Of Syntax with PropS

Semantic NLP applications often rely on dependency trees to recognize ma...
research
02/28/2020

Declarative Stream Runtime Verification (hLola)

Stream Runtime Verification is a formal dynamic analysis technique that ...

Please sign up or login with your details

Forgot password? Click here to reset