Questions tagged [jml]

Java Modeling Language (jml) - specification language for Java

The Java Modeling Language (JML) is a behavioral interface specification language that can be used to specify the behavior of Java modules. It combines the design by contract approach of Eiffel and the model-based specification approach of the Larch family of interface specification languages, with some elements of the refinement calculus.

44 questions
0
votes
1 answer

Validate basic set operations in JML

How do I verify basic set operations such as intersect, union and difference in JML tool like OpenJML in which keywords like "\intersect \set_minus \set_union" are not supported? The Java interfaces on which I want to do validation on looks like…
user1095332
  • 403
  • 6
  • 17
0
votes
1 answer

Use OpenJML in Eclipse project that uses JDK different from OpenJDK 1.8

OpenJML is available as Eclipse Plugin (install site http://jmlspecs.sourceforge.net/openjml-updatesite ) and it seems to get installed OK in Eclipse Photon. But docs say it shall run only on OpenJDK 1.8 and it cannot be any other JDK (say, Oracle…
Code Complete
  • 3,146
  • 1
  • 15
  • 38
0
votes
1 answer

How to set http proxy in JML Messenger Library

I'm developing a simple msn client using java, but i don't know how to set the http proxy parameters using the JML library. Apparently it isn't native on the library =/
elias
  • 15,010
  • 4
  • 40
  • 65
0
votes
2 answers

android: jml library for msn don't work on android 2.1?

I have managed to connect to msn through jml library on android by adding the getpropertyaction class in my project. On android 2.2 works just fine, I can login, get the contacts, send and receive messages and other.. On android 2.1 when I press…
Cata
  • 11,133
  • 11
  • 65
  • 86
0
votes
1 answer

Java sort method in JML

I need a sort method for JML I tried Insertion Sort but I don't know what requires and ensures or maintaingins I need. Please help. I need //@requires, //@ensures and //@maintaining. public class InsertionSort { void sort(int arr[]) { int n =…
Razvan
  • 1
  • 1
0
votes
1 answer

Need a sort Method in JML with references and ensures

I need a sort method for JML I tried bubblesort but I don't know what requires and ensures or maintaingins I need. I'm new with this language. public class BubbleSortExample { //@ references static void bubbleSort(int[] arr) { …
0
votes
1 answer

JML, accurate definition for invariants

Could someone give accurate meaning to the following invariants in Java Modelling Language pointing out the main difference between these? public invariant abstract function (private invariant) representation invariant (private invariant)
user7794336
0
votes
1 answer

What is the postcondition for the java PriorityQueue.remove(Object) method?

I am looking into creating JML specifications for the java.util.PriorityQueue.remove(Object object) method. So far I have thought of the following precondition: //@ requires object != null; //@ requires this.size() > 0; I am now trying to figure…
0
votes
1 answer

How is 'decreases' in JML defined?

The statement after decreases has to get strictly smaller in each loop and always be non-zero. But does it have to reach 0? Does it have to get smaller by one?
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
0
votes
2 answers

OpenJML with generics?

I have a class Edge.java. When I run it through OpenJML, this happens: error: An internal JML error occurred, possibly recoverable. Please report the bug with as much information as you can. Reason: com.sun.tools.javac.code.Symbol$TypeSymbol…
Edwin
  • 886
  • 2
  • 13
  • 32
0
votes
1 answer

How do I set up my environment for ESC/Java2 in Windows and build/run with ESC/Java2?

How do I set up my execution environment for ESC/Java2 in WindowsXP? And furthermore, how do I build and run, in WindowsXP, projects with ESC/Java2. It is hard to tell from their specifications/readme and documentation, specially considering the…
acostache
  • 2,177
  • 7
  • 23
  • 48
0
votes
1 answer

Problems w/ OpenJML Update Site

When I try to install the openJML plugin from the update site at http://jmlspecs.sourceforge.net/openjml-updatesite I get the following error: An error occurred while collecting items to be installed session context was:(profile=epp.package.java,…
Tom K.
  • 3
  • 4
0
votes
1 answer

JML Evaluation of \old(Expression[Id])

I would like to know how a JML expression of the form \old(Expression[Id]) is evaluated, i.e. if I have the \old(vector[value-1]) expression, does the \old also refer to "value" or just the to the value of the vector[value-1]. Thanks in advance!
acostache
  • 2,177
  • 7
  • 23
  • 48
-1
votes
1 answer

JML specification in the interface and the implementing class

I am a bit new to java and so while programming i have noticed that i have to give JML annotations to my subroutines. As i was working with object-oriented programming i have noticed the use of interfaces and that i have to declare the method there…
Anasacia
  • 25
  • 5
1 2
3