2 public class Parameter {
11 public Parameter() {} // a = 0; b = 0; f = null; g = null; }
13 //public void bar() { foo(); }
14 //public void foo() { bar(); }
16 static public void proof( Fooz p0, Fooz p1 ) {
32 public class Penguin {
37 public Penguin() { x = 0; y = 0; }
39 public void bar() { x = 1; }
43 flag f; int x; Baw b; Baw bb;
47 static Voo getAVoo( Voo bogus ) {
66 public void doTheBaw( Voo v ) { v = new Voo(); }
80 public Foo getAFoo() {
84 public Foo newFooChain( Foo a ) {
90 public void ruinSomeFoos( Foo a, Foo b ) {
94 static public void aStaticMethod( Foo p0, Foo p1 ) {
105 static public void m1_( Foo p0 ) {
113 static public void m2_( Foo p0 ) {
120 static public void m3_( Foo p0 ) {
127 static public void m4_( Foo p0 ) {
131 static public void m5_( Foo p0 ) {
137 static public void m6_( Foo p0, Foo p1 ) {
152 static public void m7_( Foo p0, Foo p1 ) {
168 static public void m8_( Foo p0, Foo p1 ) {
187 // this empty task should still create a non-empty
188 // ownership graph showing parameter allocation
189 // look for the parameter s as a label referencing
190 // a heap region that is multi-object, flagged, not summary
191 task Startup( StartupObject s{ initialstate } ) {
193 //Parameter p0 = new Parameter();
197 Parameter.proof( null, null );
208 taskexit( s{ !initialstate } );
213 task NewObjectA( Foo a{ f }, Foo b{ f } ) {
221 taskexit( a{ !f }, b{ !f } );
225 task NewObjectB( Foo a{ f }, Foo b{ f } ) {
233 taskexit( a{ !f }, b{ !f } );
237 task NewObjectC( Foo a{ f }, Foo b{ f } ) {
252 taskexit( a{ !f }, b{ !f } );
256 task forMethod( Foo p0{ f } ) {
273 taskexit( p0{ !f } );
277 // this task allocates a new object, so there should
278 // be a heap region for the parameter, and several
279 // heap regions for the allocation site, but the label
280 // merely points to the newest region
281 task NewObjectInMethod( Voo v{ f } ) {
290 task ClobberInitParamReflex( Voo v{ f }, Voo w{ f } ) {
293 taskexit( v{ !f }, w{ !f } );
297 task BackToItself( Parameter p0{ w } ) {
299 Penguin p = new Penguin();
304 Parameter p1 = new Parameter();
306 Penguin q = new Penguin();
311 taskexit( p0{ !w } );
315 task SummaryNodeTokens( Foo p0{ f } ) {
330 taskexit( p0{ !f } );
334 task strongUpdates( Foo p0{ f } ) {
347 // this should effect a strong update
359 // p0 points to a multiple-object heap region
360 // so this should not make a strong update
363 taskexit( p0{ !f } );
367 task ObjectChainByMethodCalls( Foo a{ f } ) {
370 Foo g = a.newFooChain( f );
377 task arrayAssignments( Foo a{ f } ) {
379 Foo f[] = new Foo[3];
396 public static void FooToBaw( Baw x, Foo y ) {
401 task showPrunedEdgesInMethodCall( Foo a{ f } ) {
412 Zool.FooToBaw( c, b );
417 task showStringIsImmutable( Foo a{ f } ) {
423 String s = new String();
435 task methodTest( Foo p0{ f } ) {
448 //Foo temp = new Foo();
463 // Foo.test( a0, a1 );
465 taskexit( p0{ !f } );
469 task getNewFromMethod( Foo p0{ f } ) {
470 Voo g = Voo.getAVoo( null );
472 taskexit( p0{ !f } );
477 task methodTest01_( Foo p0{ f }, Foo p1{ f } ) {
479 Foo a0before = new Foo();
481 a0before.x = new Foo();
483 a0before.x = new Foo();
486 Foo a0after = new Foo();
488 a0after.x = new Foo();
490 a0after.x = new Foo();
496 taskexit( p0{ !f }, p1{ !f } );
501 task methodTest02_( Foo p0{ f }, Foo p1{ f } ) {
503 Foo a0before = new Foo();
505 a0before.x = new Foo();
507 a0before.x = new Foo();
510 Foo a0after = new Foo();
512 a0after.x = new Foo();
514 a0after.x = new Foo();
520 taskexit( p0{ !f }, p1{ !f } );
524 task methodTest03_( Foo p0{ f }, Foo p1{ f } ) {
526 Foo a0before = new Foo();
528 a0before.x = new Foo();
530 a0before.x = new Foo();
533 Foo a0after = new Foo();
535 a0after.x = new Foo();
537 a0after.x = new Foo();
543 taskexit( p0{ !f }, p1{ !f } );
547 task methodTest04_( Foo p0{ f }, Foo p1{ f } ) {
549 Foo a0before = new Foo();
551 a0before.x = new Foo();
553 a0before.x = new Foo();
556 Foo a0after = new Foo();
558 a0after.x = new Foo();
560 a0after.x = new Foo();
566 taskexit( p0{ !f }, p1{ !f } );
570 task methodTest05_( Foo p0{ f }, Foo p1{ f } ) {
572 Foo a0before = new Foo();
574 a0before.x = new Foo();
576 a0before.x = new Foo();
579 Foo a0after = new Foo();
581 a0after.x = new Foo();
583 a0after.x = new Foo();
589 taskexit( p0{ !f }, p1{ !f } );
593 task methodTest06_( Foo p0{ f }, Foo p1{ f } ) {
595 Foo a0before = new Foo();
597 a0before.x = new Foo();
599 a0before.x = new Foo();
602 Foo a0after = new Foo();
604 a0after.x = new Foo();
606 a0after.x = new Foo();
609 Foo a1before = new Foo();
611 a1before.x = new Foo();
613 a1before.x = new Foo();
616 Foo a1after = new Foo();
618 a1after.x = new Foo();
620 a1after.x = new Foo();
623 Foo.m6_( a0after, a1after );
626 taskexit( p0{ !f }, p1{ !f } );
630 task methodTest07_( Foo p0{ f }, Foo p1{ f } ) {
632 Foo a0before = new Foo();
634 a0before.x = new Foo();
636 a0before.x = new Foo();
639 Foo a0after = new Foo();
641 a0after.x = new Foo();
643 a0after.x = new Foo();
646 Foo a1before = new Foo();
648 a1before.x = new Foo();
650 a1before.x = new Foo();
653 Foo a1after = new Foo();
655 a1after.x = new Foo();
657 a1after.x = new Foo();
660 Foo.m7_( a0after, a1after );
663 taskexit( p0{ !f }, p1{ !f } );
667 task methodTest08_( Foo p0{ f }, Foo p1{ f } ) {
669 Foo a0before = new Foo();
671 a0before.x = new Foo();
673 a0before.x = new Foo();
676 Foo a0after = new Foo();
678 a0after.x = new Foo();
680 a0after.x = new Foo();
683 Foo a1before = new Foo();
685 a1before.x = new Foo();
687 a1before.x = new Foo();
690 Foo a1after = new Foo();
692 a1after.x = new Foo();
694 a1after.x = new Foo();
697 Foo.m8_( a0after, a1after );
700 taskexit( p0{ !f }, p1{ !f } );