Adding native specifications to JML

In the specification language JML we can see pure methods as a way to express user-defined predicates that will simplify the annotations. We take this idea a step further in allowing to only declare these predicates in JML without giving an explicit definition. The explicit definition is done directly in the language to which the Java program and the specifications are translated. To this end we introduce a new keyword to JML, the keyword native. To facilitate these definitions we have enabled the user to define also native types in the same way. In this paper we will describe these new constructs as well as their implementation in Jack, and their application to JML’s libraries and model fields.