Can a JML postcondition for a class method contain a call to another method call
For example I have this class:
public class A
{
public int doA(x)
{ ... }
public int doB(int x, int y)
{ ... }
}
For the postcondition of doB can I have: ensures doA(x) = doA(y)?
Yes, provided the called method doesn’t include side effects and is declared as pure:
http://www.ibm.com/developerworks/java/library/j-jml/index.html