From dougo@ccs.neu.edu Mon Nov 15 16:11:58 1999 X-UIDL: 3ec7b62d8bd5cd05c65308b3899710c7 Received: from vega.ccs.neu.edu (dougo@vega.ccs.neu.edu [129.10.116.206]) by amber.ccs.neu.edu (8.9.1a/8.9.1) with ESMTP id QAA14851 for ; Mon, 15 Nov 1999 16:11:57 -0500 (EST) Received: (from dougo@localhost) by vega.ccs.neu.edu (8.9.1a/8.9.1) id QAA28100; Mon, 15 Nov 1999 16:11:56 -0500 (EST) From: Doug Orleans Message-ID: <14384.30492.146940.793139@vega.ccs.neu.edu> Date: Mon, 15 Nov 1999 16:11:56 -0500 (EST) To: Karl Lieberherr Subject: Re: correct response In-Reply-To: <199911141751.MAA23434@alnitak.ccs.neu.edu> References: <199911141751.MAA23434@alnitak.ccs.neu.edu> X-Mailer: VM 6.72 under 21.1 (patch 3) "Acadia" XEmacs Lucid X-Face: (4D-osoq?}7M3\EgvbWKo Hi Doug: > > do you agree that second set of "at *" > below is correct? > > This refers to the tricky zigzag example. > > -- Karl > > /proj/adaptive/www/course/exams/m-3360-f99/q3/zigzag-special-DJ > at A > at B > at B > at X t0 > at X t1 > at B t1 > at C t1 I don't understand the question! Are you asking if your hand-generated traversal is equal to "from A via B to C"? It's not. You have: class A { public void t0( ) { x.t0(); } } class X { void t0(){ System.out.println(" at X t0"); b.t1(); } void t1(){ System.out.println(" at X t1"); b.t1(); c.t1(); } } class B { void t1(){ System.out.println(" at B t1"); } } class C { void t1(){ System.out.println(" at C t1"); } } but I think it should be something like: class A { public void t0( ) { x.t0(); } } class X { void t0(){ super.t0_bef(); System.out.println(" at X t0"); super.t0(); // this is essentially what's missing in the // Demeter/Java-generated code } void t1(){ super.t1_bef(); System.out.println(" at X t1"); b.t1(); // actually we're calling t0 and t1 in parallel on b, // because the nodeset models non-deterministically // going down both paths c.t1(); } } class B { void t0_bef() { System.out.println(" at B t0"); } void t0() { this.t1(); } void t1_bef(){ System.out.println(" at B t1"); } void t1() { // do nothing; premature termination // (to catch t1() on an E-object) } } class C { void t1(){ System.out.println(" at C t1"); } }