A formalisation of Java Strings for program specification and verification
Paper in proceeding, 2011

We present a formalisation of Java Strings tailored to specification and verification of programs (using dynamic logic). The formalism allows to specify and verify properties about the content of strings-the most common use-case-in an easy and natural manner. Each instance of type String is related to an abstract data type representing the string content as an immutable sequence of characters. This avoids serious technicalities that would arise if the specification had to resort to Java arrays to represent sequences of characters. We also discuss advanced aspects of Java Strings including string literals and the string pool and support for regular expressions. The approach has been implemented in the KeY verification system. We demonstrate its practical applicability by case studies including the verification of a string sanitization function.

Author

Richard Bubel

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

Reiner Hähnle

Chalmers, Computer Science and Engineering (Chalmers), Software Technology (Chalmers)

U. Geilmann

Karlsruhe Institute of Technology (KIT)

Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics)

03029743 (ISSN) 16113349 (eISSN)

Vol. 7041 90-105
978-364224689-0 (ISBN)

Subject Categories

Computer and Information Science

DOI

10.1007/978-3-642-24690-6_8

ISBN

978-364224689-0

More information

Latest update

4/9/2018 1