Treffer: Writing JML Specifications Using Java 8 Streams
Title:
Writing JML Specifications Using Java 8 Streams
Authors:
Source:
Departmental Technical Reports (CS)
Publisher Information:
ScholarWorks@UTEP
Publication Year:
2016
Collection:
University of Texas at El Paso: Digital Commons@UTEP
Subject Terms:
Document Type:
Fachzeitschrift
text
File Description:
application/pdf
Language:
unknown
Relation:
Availability:
Accession Number:
edsbas.481D5D5B
Database:
BASE
Weitere Informationen
JML is a formal behavioral interface specification language for Java to document Java program modules such as classes and interfaces. When composing JML specifications, one frequently writes assertions involving a collection of values. In this paper we propose to use Java 8 streams for writing more concise and cleaner assertions on a collection. The use of streams in JML can be minimal and non-invasive in the conventional style of writing assertions. It can also be holistic to write all assertions in the abstract state defined by streams. We perform a small case study to illustrate our approach and show its effectiveness as well. We then summarize our findings and the lessons that we learned from the case study.