Off-campus UNL users: To download campus access dissertations, please use the following link to log into our proxy server with your NU ID and password. When you are done browsing please remember to return to this page and log out.

Non-UNL users: Please talk to your librarian about requesting this dissertation through interlibrary loan.

Ensure Correctness for Imperative and Declarative Programs

Guolong Zheng, University of Nebraska - Lincoln


There are two different types of programs: imperative programs that describe how to solve a problem, like C or Java, and declarative programs that describe how to recognize that the problem is solved, like SQL or Alloy. The inherent difference between them leads to different analysis techniques. Despite the large number of debugging techniques and tools developed for imperative programs, there is a dearth of tools for declarative programs. In this dissertation, we develop tools to ensure correctness and improve reliability for both imperative and declarative programs. For imperative programs, we focus on automatically inferring program invariant. Program invariant, which describes program states or behaviors as mathematical formulas, is one main approach to verifying and debugging imperative programs. However, the current invariant generation techniques focus on numerical invariants described by Hoare Logic, lacking support for memory-related properties. We present SLING, a dynamic analysis tool to automatically infer program invariant described by Separation Logic, an extension of Hoare logic with a compact description for memory properties. The empirical results show that SLING can efficiently discover invariants for pointers and data structures and the generated invariant can be used automatically to repair corrupted data structures. For declarative programs, we focus on automatically debugging Alloy specifications. Alloy is a declarative specification language widely used in various software problems. However, unlike imperative programs, there is a dearth of techniques to help to debug Alloy specifications. We present FLACK to automatically locate Alloy bugs and ATR to repair them. Experimental results show that FLACK can accurately locate buggy expressions and ATR can effectively repair different types of bugs.

Subject Area

Computer science

Recommended Citation

Zheng, Guolong, "Ensure Correctness for Imperative and Declarative Programs" (2022). ETD collection for University of Nebraska - Lincoln. AAI29164589.