Main Page   Packages   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

Unit.java

00001 public class Unit {
00002     public static void main(String[] args) {
00003         int x;
00004         A a = new ImpA();
00005         x = a.foo(0);
00006         B b = new ImpB();
00007         x = b.foo(0);
00008         C c = new ImpC();
00009         x = c.foo(0);
00010         D d = new ImpD();
00011         x = d.foo(0);
00012         E e = new ImpE();
00013         x = e.foo(0);
00014         F f = new ImpF();
00015         x = f.foo(0);
00016         G g = new ImpG();
00017         x = g.foo(0);
00018     }
00019 }
00020 
00021 interface A {
00022     /**
00023      * @observable
00024      *   INVOKE XEq0(this): x == 0;
00025      *   RETURN XEq1(this): $ret == 0;
00026      */
00027     public int foo(int x);
00028 }
00029 
00030 interface B extends A {
00031 }
00032 
00033 interface C extends A {
00034 }
00035 
00036 interface D extends B {
00037 }
00038 
00039 interface E extends B {
00040 }
00041 
00042 interface F extends C {
00043 }
00044 
00045 interface G extends C {
00046 }
00047 
00048 /**
00049  *
00050  * @observable
00051  *   EXP XEq0or1(this): x == 0 || x == 1;
00052  */
00053 class ImpA implements A {
00054     int x;
00055     public int foo(int x) {
00056         this.x = x + 1;
00057         return this.x;
00058     }
00059 }
00060 
00061 class ImpB extends ImpA implements B {
00062     int x;
00063     public int foo(int x) {
00064         if (x != 0) {
00065             this.x = 0;
00066         } else {
00067             this.x = 1;
00068         }
00069         return this.x;
00070     }
00071 }
00072 
00073 class ImpC extends ImpA implements C {
00074 }
00075 
00076 class ImpD extends ImpB implements D {
00077 }
00078 
00079 class ImpE extends ImpB implements E {
00080 }
00081 
00082 class ImpF extends ImpC implements F {
00083 }
00084 
00085 class ImpG extends ImpC implements G {
00086 }
00087 

Generated at Thu Feb 7 06:58:57 2002 for Bandera by doxygen1.2.10 written by Dimitri van Heesch, © 1997-2001