A formalisation of Java Strings for program specification and verification
Paper i 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.

Författare

Richard Bubel

Chalmers, Data- och informationsteknik, Programvaruteknik

Reiner Hähnle

Chalmers, Data- och informationsteknik, Programvaruteknik

U. Geilmann

Karlsruher Institut für Technologie (KIT)

Lecture Notes in Computer Science

0302-9743 (ISSN)

Vol. 7041 90-105

Ämneskategorier

Data- och informationsvetenskap

DOI

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

ISBN

978-364224689-0