Finalizing the beta version of the implementation for Groovy extension in JPF: JPF...
[jpf-core.git] / examples / Rand.groovy
1 class Rand {
2         static void main (String[] args) {
3                 println("Groovy model-checking")
4                 Random random = new Random(42);
5         
6                 int a = random.nextInt(2)
7                 int b = random.nextInt(3)
8                 println("a=" + a)
9                 println("  b=" + b)
10
11                 int c = a/(b+a -2)
12                 println("    c=" + c)
13         }
14 }
15