---------------------------------------------------------------- jflex.error ---------------------------------------------------------------- Reading "Source/grammar/Yylex.jflex" Constructing NFA : 337 states in NFA Converting NFA to DFA : ......................................................................................................................................... 147 states before minimization, 123 states in minimized DFA Writing code to "Source/grammar/Yylex.java" ---------------------------------------------------------------- parser.cup.error ---------------------------------------------------------------- Opening files... Parsing specification from standard input... Checking specification... Building parse tables... Computing non-terminal nullability... Computing first sets... Building state machine... Filling in tables... Checking for non-reduced productions... Writing parser... Closing files... ------- CUP v0.10k Parser Generation Summary ------- 0 errors and 0 warnings 51 terminals, 43 non-terminals, and 113 productions declared, producing 205 unique parse states. 0 terminals declared but not used. 0 non-terminals declared but not used. 0 productions never reduced. 0 conflicts detected (0 expected). Code written to "parser.java", and "sym.java". ---------------------------------------------------- (v0.10k) ---------------------------------------------------------------- javac.error ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/a1.index.typecheck/program.in ---------------------------------------------------------------- int a, b, i; a = b[ i ]; ---------------------------------------------------------------- TestPrograms/a1.index.typecheck/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Error: Attempting to index a non-pointer type int at a = b[ i ]; Generate Offsets ... ---------------------------------------------------------------- TestPrograms/a1.index.typecheck/program.print ---------------------------------------------------------------- int a, b, i; a = b[ i ]; ---------------------------------------------------------------- TestPrograms/a1.index.typecheck/interp.out ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/a1.index.typecheck/sim.err ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/a1.index.typecheck/sim.out ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/a2.index.int/program.in ---------------------------------------------------------------- int i; [ 5 ]int a; for i = 0; i < 5; i = i + 1 do a[ i ] = i * i; end for i = 0; i < 5; i = i + 1 do printf ( "a[ %d ] = %d\n", i, a[ i ] ); end ---------------------------------------------------------------- TestPrograms/a2.index.int/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/a2.index.int/program.print ---------------------------------------------------------------- int i; [5 ]int a; for i = 0; i < 5; i = i + 1 do a[ i ] = i * i; end for i = 0; i < 5; i = i + 1 do printf( "a[ %d ] = %d\n", i, a[ i ] ); end ---------------------------------------------------------------- TestPrograms/a2.index.int/interp.out ---------------------------------------------------------------- a[ 0 ] = 0 a[ 1 ] = 1 a[ 2 ] = 4 a[ 3 ] = 9 a[ 4 ] = 16 ---------------------------------------------------------------- TestPrograms/a2.index.int/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/a2.index.int/sim.out ---------------------------------------------------------------- a[ 0 ] = 0 a[ 1 ] = 1 a[ 2 ] = 4 a[ 3 ] = 9 a[ 4 ] = 16 ---------------------------------------------------------------- TestPrograms/a3.index.char/program.in ---------------------------------------------------------------- int i; [ 5 ]char a; for i = 0; i < 5; i = i + 1 do a[ i ] = 'a' + i; end for i = 0; i < 5; i = i + 1 do printf ( "a[ %d ] = %c\n", i, a[ i ] ); end ---------------------------------------------------------------- TestPrograms/a3.index.char/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/a3.index.char/program.print ---------------------------------------------------------------- int i; [5 ]char a; for i = 0; i < 5; i = i + 1 do a[ i ] = 'a' + i; end for i = 0; i < 5; i = i + 1 do printf( "a[ %d ] = %c\n", i, a[ i ] ); end ---------------------------------------------------------------- TestPrograms/a3.index.char/interp.out ---------------------------------------------------------------- a[ 0 ] = a a[ 1 ] = b a[ 2 ] = c a[ 3 ] = d a[ 4 ] = e ---------------------------------------------------------------- TestPrograms/a3.index.char/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/a3.index.char/sim.out ---------------------------------------------------------------- a[ 0 ] = a a[ 1 ] = b a[ 2 ] = c a[ 3 ] = d a[ 4 ] = e ---------------------------------------------------------------- TestPrograms/b1.ptr.typecheck/program.in ---------------------------------------------------------------- [ 10 ]int a; ++a; class C begin int x, y; end C c; ++c; ---------------------------------------------------------------- TestPrograms/b1.ptr.typecheck/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Error: Operand for ++ not addressable at ++ a; Error: Operand for ++ not addressable at ++ c; Generate Offsets ... ---------------------------------------------------------------- TestPrograms/b1.ptr.typecheck/program.print ---------------------------------------------------------------- [10 ]int a; ++ a; class C begin int x, y; end C c; ++ c; ---------------------------------------------------------------- TestPrograms/b1.ptr.typecheck/interp.out ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/b1.ptr.typecheck/sim.err ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/b1.ptr.typecheck/sim.out ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/b2.char/program.in ---------------------------------------------------------------- char p = 'A'; printf( "%c", ++p ); printf( "%c", ++p ); printf( "%c", ++p ); printf( "%c", p-- ); printf( "%c", p-- ); printf( "%c", p-- ); printf( "\n" ); ---------------------------------------------------------------- TestPrograms/b2.char/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/b2.char/program.print ---------------------------------------------------------------- char p = 'A'; printf( "%c", ++ p ); printf( "%c", ++ p ); printf( "%c", ++ p ); printf( "%c", p -- ); printf( "%c", p -- ); printf( "%c", p -- ); printf( "\n" ); ---------------------------------------------------------------- TestPrograms/b2.char/interp.out ---------------------------------------------------------------- BCDDCB ---------------------------------------------------------------- TestPrograms/b2.char/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/b2.char/sim.out ---------------------------------------------------------------- BCDDCB ---------------------------------------------------------------- TestPrograms/b3.int/program.in ---------------------------------------------------------------- int p = 100; printf( "%d\n", ++p ); printf( "%d\n", ++p ); printf( "%d\n", ++p ); printf( "%d\n", p-- ); printf( "%d\n", p-- ); printf( "%d\n", p-- ); ---------------------------------------------------------------- TestPrograms/b3.int/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/b3.int/program.print ---------------------------------------------------------------- int p = 100; printf( "%d\n", ++ p ); printf( "%d\n", ++ p ); printf( "%d\n", ++ p ); printf( "%d\n", p -- ); printf( "%d\n", p -- ); printf( "%d\n", p -- ); ---------------------------------------------------------------- TestPrograms/b3.int/interp.out ---------------------------------------------------------------- 101 102 103 103 102 101 ---------------------------------------------------------------- TestPrograms/b3.int/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/b3.int/sim.out ---------------------------------------------------------------- 101 102 103 103 102 101 ---------------------------------------------------------------- TestPrograms/b4.ptr.char/program.in ---------------------------------------------------------------- [ 5 ]char a; int i; for i = 0; i < 5; i = i + 1 do a[ i ] = 'a' + i; end ^char p = a; printf( "%c", (++p)^ ); printf( "%c", (++p)^ ); printf( "%c", (++p)^ ); printf( "%c", (p--)^ ); printf( "%c", (p--)^ ); printf( "%c", (p--)^ ); printf( "\n" ); ---------------------------------------------------------------- TestPrograms/b4.ptr.char/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/b4.ptr.char/program.print ---------------------------------------------------------------- [5 ]char a; int i; for i = 0; i < 5; i = i + 1 do a[ i ] = 'a' + i; end ^char p = a; printf( "%c", ( ++ p )^ ); printf( "%c", ( ++ p )^ ); printf( "%c", ( ++ p )^ ); printf( "%c", ( p -- )^ ); printf( "%c", ( p -- )^ ); printf( "%c", ( p -- )^ ); printf( "\n" ); ---------------------------------------------------------------- TestPrograms/b4.ptr.char/interp.out ---------------------------------------------------------------- bcddcb ---------------------------------------------------------------- TestPrograms/b4.ptr.char/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/b4.ptr.char/sim.out ---------------------------------------------------------------- bcddcb ---------------------------------------------------------------- TestPrograms/b5.ptr.int/program.in ---------------------------------------------------------------- int a = 0, b = 111, c = 222, d = 333; ^int p = &a; printf( "%d\n", (++p)^ ); printf( "%d\n", (++p)^ ); printf( "%d\n", (++p)^ ); printf( "%d\n", (p--)^ ); printf( "%d\n", (p--)^ ); printf( "%d\n", (p--)^ ); ---------------------------------------------------------------- TestPrograms/b5.ptr.int/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/b5.ptr.int/program.print ---------------------------------------------------------------- int a = 0, b = 111, c = 222, d = 333; ^int p = & a; printf( "%d\n", ( ++ p )^ ); printf( "%d\n", ( ++ p )^ ); printf( "%d\n", ( ++ p )^ ); printf( "%d\n", ( p -- )^ ); printf( "%d\n", ( p -- )^ ); printf( "%d\n", ( p -- )^ ); ---------------------------------------------------------------- TestPrograms/b5.ptr.int/interp.out ---------------------------------------------------------------- 111 222 333 333 222 111 ---------------------------------------------------------------- TestPrograms/b5.ptr.int/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/b5.ptr.int/sim.out ---------------------------------------------------------------- 111 222 333 333 222 111 ---------------------------------------------------------------- TestPrograms/c1.member.typeCheck/program.in ---------------------------------------------------------------- class A begin int f() begin return 111; end int g() begin return 222; end end class B extends A begin int g() begin return 333; end end int k() begin return 444; end B b; ^A a = b; a.h(); ^int p; p.k(); ---------------------------------------------------------------- TestPrograms/c1.member.typeCheck/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Error: Undeclared method h at a.h(); Error: Selection must be from a reference to an instance of class type at p.k(); Generate Offsets ... ---------------------------------------------------------------- TestPrograms/c1.member.typeCheck/program.print ---------------------------------------------------------------- class A begin int f() begin return 111; end int g() begin return 222; end end class B extends A begin int g() begin return 333; end end int k() begin return 444; end B b; ^A a = b; a.h(); ^int p; p.k(); ---------------------------------------------------------------- TestPrograms/c1.member.typeCheck/interp.out ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/c1.member.typeCheck/sim.err ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/c1.member.typeCheck/sim.out ---------------------------------------------------------------- ---------------------------------------------------------------- TestPrograms/c2.member.invoke/program.in ---------------------------------------------------------------- class A begin int f() begin return 111; end int g() begin return 222; end end class B extends A begin int g() begin return 333; end int h() begin return 444; end end B b; ^A a = b; printf( "a.g() = %d\n", a.g() ); ---------------------------------------------------------------- TestPrograms/c2.member.invoke/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/c2.member.invoke/program.print ---------------------------------------------------------------- class A begin int f() begin return 111; end int g() begin return 222; end end class B extends A begin int g() begin return 333; end int h() begin return 444; end end B b; ^A a = b; printf( "a.g() = %d\n", a.g() ); ---------------------------------------------------------------- TestPrograms/c2.member.invoke/interp.out ---------------------------------------------------------------- a.g() = 333 ---------------------------------------------------------------- TestPrograms/c2.member.invoke/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/c2.member.invoke/sim.out ---------------------------------------------------------------- a.g() = 333 ---------------------------------------------------------------- TestPrograms/d1.class.init/program.in ---------------------------------------------------------------- class A begin ^char toString() begin return "A"; end printf( "Init A for instance of %s\n", toString() ); int x = 123, y = 456; end class B extends A begin ^char toString() begin return "B"; end printf( "Init B for instance of %s\n", toString() ); int z = 789; end B b; ^A a = b; printf( "x = %d, y = %d, z = %d\n", b.x, b.y, b.z ); printf( "a.toString() = %s\n", a.toString() ); ---------------------------------------------------------------- TestPrograms/d1.class.init/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/d1.class.init/program.print ---------------------------------------------------------------- class A begin ^char toString() begin return "A"; end printf( "Init A for instance of %s\n", toString() ); int x = 123, y = 456; end class B extends A begin ^char toString() begin return "B"; end printf( "Init B for instance of %s\n", toString() ); int z = 789; end B b; ^A a = b; printf( "x = %d, y = %d, z = %d\n", b.x, b.y, b.z ); printf( "a.toString() = %s\n", a.toString() ); ---------------------------------------------------------------- TestPrograms/d1.class.init/interp.out ---------------------------------------------------------------- Init A for instance of B Init B for instance of B x = 123, y = 456, z = 789 a.toString() = B ---------------------------------------------------------------- TestPrograms/d1.class.init/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/d1.class.init/sim.out ---------------------------------------------------------------- Init A for instance of B Init B for instance of B x = 123, y = 456, z = 789 a.toString() = B ---------------------------------------------------------------- TestPrograms/d2.array.init/program.in ---------------------------------------------------------------- void f() begin int x = 111, y = 222, z = 333; end void g() begin [ 3 ]int a; printf( "a[ 2 ] = %d\n", a[ 2 ] ); end f(); g(); ---------------------------------------------------------------- TestPrograms/d2.array.init/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/d2.array.init/program.print ---------------------------------------------------------------- void f() begin int x = 111, y = 222, z = 333; end void g() begin [3 ]int a; printf( "a[ 2 ] = %d\n", a[ 2 ] ); end f(); g(); ---------------------------------------------------------------- TestPrograms/d2.array.init/interp.out ---------------------------------------------------------------- a[ 2 ] = 0 ---------------------------------------------------------------- TestPrograms/d2.array.init/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/d2.array.init/sim.out ---------------------------------------------------------------- a[ 2 ] = 0 ---------------------------------------------------------------- TestPrograms/d3.array.class.init/program.in ---------------------------------------------------------------- int i = 0; class A begin int x = i; i = i + 1; printf( "Init A %d\n", x ); end [ 5 ]A a; for i = 0; i < 5; i = i + 1 do printf( "a[ %d ].x = %d\n", i, a[ i ].x ); end ---------------------------------------------------------------- TestPrograms/d3.array.class.init/program.err ---------------------------------------------------------------- Reprinting ... Generate Environments ... Set Types for declarations ... Check Types ... Generate Offsets ... Evaluate ... Generate Code ... ---------------------------------------------------------------- TestPrograms/d3.array.class.init/program.print ---------------------------------------------------------------- int i = 0; class A begin int x = i; i = i + 1; printf( "Init A %d\n", x ); end [5 ]A a; for i = 0; i < 5; i = i + 1 do printf( "a[ %d ].x = %d\n", i, a[ i ].x ); end ---------------------------------------------------------------- TestPrograms/d3.array.class.init/interp.out ---------------------------------------------------------------- Init A 0 Init A 1 Init A 2 Init A 3 Init A 4 a[ 0 ].x = 0 a[ 1 ].x = 1 a[ 2 ].x = 2 a[ 3 ].x = 3 a[ 4 ].x = 4 ---------------------------------------------------------------- TestPrograms/d3.array.class.init/sim.err ---------------------------------------------------------------- Welcome to the alpha simulator Alpha Simulator version 9.008 7th October 2005 Configuration file = "alpha.config" PAL code file = "../../SYSTEM/palcode.pal.s" Kernel code file = "../../SYSTEM/kernelcode.kernel.s" User code file = "usercode.user.s" Assembling pal file "../../SYSTEM/palcode.pal.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing pal file ../../SYSTEM/palcode.pal.s ... Assembling KERNEL file "../../SYSTEM/kernelcode.kernel.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing kernel file ../../SYSTEM/kernelcode.kernel.s ... Assembling USER file "usercode.user.s" ... Parsing ... Generating Declarations ... Mapping Identifiers to Declarations ... Generating Values of Declarations ... Generating Code ... Completed Generating Code ... Storing user file usercode.user.s ... ... loaded Exiting... ---------------------------------------------------------------- TestPrograms/d3.array.class.init/sim.out ---------------------------------------------------------------- Init A 0 Init A 1 Init A 2 Init A 3 Init A 4 a[ 0 ].x = 0 a[ 1 ].x = 1 a[ 2 ].x = 2 a[ 3 ].x = 3 a[ 4 ].x = 4