// ----------------------------------------------------------------------------- // Required includes for using a vivio 'SimpleButton'. // #include "standard.vin" // // Vivio standard.vin // // Copyright (C) 1996-2003 jones@cs.tcd.ie // // // standard colours // const int black = rgb( 0, 0, 0); const int white = rgb(255, 255, 255); const int red = rgb(255, 0, 0); const int green = rgb( 0, 255, 0); const int blue = rgb( 0, 0, 255); const int yellow = rgb(255, 255, 0); const int magenta = rgb(255, 0, 255); const int cyan = rgb( 0, 255, 255); const int gray32 = rgb( 32, 32, 32); const int gray64 = rgb( 64, 64, 64); const int gray96 = rgb( 96, 96, 96); const int gray128 = rgb(128, 128, 128); const int gray160 = rgb(160, 160, 160); const int gray192 = rgb(192, 192, 192); const int gray224 = rgb(224, 224, 224); const int vellum = rgb(255, 255, 192); // // standard pens // Pen blackpen = SolidPen(0, 0, black); !! 00000000 07cb LDZx7 0, 0, 0, 0, 0, 0, 0 !! 00000001 0efc SOLIDPEN !! 00000002 0017 ST G[0] Pen whitepen = SolidPen(0, 0, white); !! 00000003 04cb LDZx4 0, 0, 0, 0 !! 00000004 ffd4 ffff PL 0x00ffffff !! 00000006 02d1 PLZx2 0, 0 !! 00000007 0efc SOLIDPEN !! 00000008 0117 ST G[1] Pen redpen = SolidPen(0, 0, red); !! 00000009 04cb LDZx4 0, 0, 0, 0 !! 0000000a 00d4 ff00 PL 0x00ff0000 !! 0000000c 02d1 PLZx2 0, 0 !! 0000000d 0efc SOLIDPEN !! 0000000e 0217 ST G[2] Pen greenpen = SolidPen(0, 0, green); !! 0000000f 04cb LDZx4 0, 0, 0, 0 !! 00000010 00d4 00ff PL 0x0000ff00 !! 00000012 02d1 PLZx2 0, 0 !! 00000013 0efc SOLIDPEN !! 00000014 0317 ST G[3] Pen bluepen = SolidPen(0, 0, blue); !! 00000015 04cb LDZx4 0, 0, 0, 0 !! 00000016 08fe 00ff PL 255 !! 00000018 02d1 PLZx2 0, 0 !! 00000019 0efc SOLIDPEN !! 0000001a 0417 ST G[4] Pen yellowpen = SolidPen(0, 0, yellow); !! 0000001b 04cb LDZx4 0, 0, 0, 0 !! 0000001c 00d4 ffff PL 0x00ffff00 !! 0000001e 02d1 PLZx2 0, 0 !! 0000001f 0efc SOLIDPEN !! 00000020 0517 ST G[5] Pen magentapen = SolidPen(0, 0, magenta); !! 00000021 04cb LDZx4 0, 0, 0, 0 !! 00000022 ffd4 ff00 PL 0x00ff00ff !! 00000024 02d1 PLZx2 0, 0 !! 00000025 0efc SOLIDPEN !! 00000026 0617 ST G[6] Pen cyanpen = SolidPen(0, 0, cyan); !! 00000027 04cb LDZx4 0, 0, 0, 0 !! 00000028 ffd4 00ff PL 0x0000ffff !! 0000002a 02d1 PLZx2 0, 0 !! 0000002b 0efc SOLIDPEN !! 0000002c 0717 ST G[7] // // standard brushes // Brush blackbrush = SolidBrush(black); !! 0000002d 0004 LD 0 !! 0000002e 04fc SOLIDBRUSH !! 0000002f 0817 ST G[8] Brush whitebrush = SolidBrush(white); !! 00000030 ffce ffff LD 0x00ffffff !! 00000032 04fc SOLIDBRUSH !! 00000033 0917 ST G[9] Brush redbrush = SolidBrush(red); !! 00000034 00ce ff00 LD 0x00ff0000 !! 00000036 04fc SOLIDBRUSH !! 00000037 0a17 ST G[10] Brush greenbrush = SolidBrush(green); !! 00000038 00ce 00ff LD 0x0000ff00 !! 0000003a 04fc SOLIDBRUSH !! 0000003b 0b17 ST G[11] Brush bluebrush = SolidBrush(blue); !! 0000003c 04fe 00ff LD 255 !! 0000003e 04fc SOLIDBRUSH !! 0000003f 0c17 ST G[12] Brush yellowbrush = SolidBrush(yellow); !! 00000040 00ce ffff LD 0x00ffff00 !! 00000042 04fc SOLIDBRUSH !! 00000043 0d17 ST G[13] Brush magentabrush = SolidBrush(magenta); !! 00000044 ffce ff00 LD 0x00ff00ff !! 00000046 04fc SOLIDBRUSH !! 00000047 0e17 ST G[14] Brush cyanbrush = SolidBrush(cyan); !! 00000048 ffce 00ff LD 0x0000ffff !! 0000004a 04fc SOLIDBRUSH !! 0000004b 0f17 ST G[15] Brush gray32brush = SolidBrush(gray32); !! 0000004c 20ce 2020 LD 0x00202020 !! 0000004e 04fc SOLIDBRUSH !! 0000004f 1017 ST G[16] Brush gray64brush = SolidBrush(gray64); !! 00000050 40ce 4040 LD 0x00404040 !! 00000052 04fc SOLIDBRUSH !! 00000053 1117 ST G[17] Brush gray96brush = SolidBrush(gray96); !! 00000054 60ce 6060 LD 0x00606060 !! 00000056 04fc SOLIDBRUSH !! 00000057 1217 ST G[18] Brush gray128brush = SolidBrush(gray128); !! 00000058 80ce 8080 LD 0x00808080 !! 0000005a 04fc SOLIDBRUSH !! 0000005b 1317 ST G[19] Brush gray160brush = SolidBrush(gray160); !! 0000005c a0ce a0a0 LD 0x00a0a0a0 !! 0000005e 04fc SOLIDBRUSH !! 0000005f 1417 ST G[20] Brush gray192brush = SolidBrush(gray192); !! 00000060 c0ce c0c0 LD 0x00c0c0c0 !! 00000062 04fc SOLIDBRUSH !! 00000063 1517 ST G[21] Brush gray224brush = SolidBrush(gray224); !! 00000064 e0ce e0e0 LD 0x00e0e0e0 !! 00000066 04fc SOLIDBRUSH !! 00000067 1617 ST G[22] #include "simplebutton.vin" // // Vivio SimpleButton // // Copyright (c) 1996 - 2003 jones@cs.tcd.ie // // 03/06/97 first version // 10/08/02 vivio v2.0 // class SimpleButton(int x, int y, int w, int h, Brush b0, Brush b1, Brush txtbrush, Font font, string txt) !! 00000068 88b3 0001 JMP 0x0001f0 !! 0000006a 0100 090b PENTRY np=9, nl=11, new int enabled = 1; !! 0000006c 0104 LD 1 !! 0000006d 0918 ST this[9] Rectangle button = Rectangle(0, 0, 0, blackpen, b0, x, y, w-2, h-2, txtbrush, font, txt); !! 0000006e 089d LDOS this[8] !! 0000006f 070a PL this[7] !! 00000070 060a PL this[6] !! 00000071 030a PL this[3] !! 00000072 0225 SUB 2 !! 00000073 6efc CVIF !! 00000074 020a PL this[2] !! 00000075 0225 SUB 2 !! 00000076 6efc CVIF !! 00000077 010a PL this[1] !! 00000078 6efc CVIF !! 00000079 000a PL this[0] !! 0000007a 6efc CVIF !! 0000007b 040a PL this[4] !! 0000007c 0009 PL G[0] !! 0000007d 03d1 PLZx3 0, 0, 0 !! 0000007e 1ffc RECTANGLE !! 0000007f 0a18 ST this[10] function down() !! 00000080 21b3 0000 JMP 0x0000a1 !! 00000082 0200 0000 PENTRY np=0, nl=0, obj button.setpos(x+2, y+2); !! 00000084 03cb LDZx3 0, 0, 0 !! 00000085 010a PL this[1] !! 00000086 021f ADD 2 !! 00000087 6efc CVIF !! 00000088 000a PL this[0] !! 00000089 021f ADD 2 !! 0000008a 6efc CVIF !! 0000008b 0a0a PL this[10] !! 0000008c 39fc SETPOS end; !! 0000008d 00bb RET function up() !! 0000008e 0200 0000 PENTRY np=0, nl=0, obj button.setpos(x, y); !! 00000090 03cb LDZx3 0, 0, 0 !! 00000091 010a PL this[1] !! 00000092 6efc CVIF !! 00000093 000a PL this[0] !! 00000094 6efc CVIF !! 00000095 0a0a PL this[10] !! 00000096 39fc SETPOS button.setbrush(b0); !! 00000097 0406 LD this[4] !! 00000098 0a0a PL this[10] !! 00000099 2efc SETBRUSH end; !! 0000009a 00bb RET function setborderpen(Pen pen) !! 0000009b 0200 0100 PENTRY np=1, nl=0, obj button.setpen(pen); !! 0000009d 0007 LD L[0] !! 0000009e 0a0a PL this[10] !! 0000009f 34fc SETPEN end; !! 000000a0 00bb RET when button.eventEE(int enter, int xx, int yy) !! 000000a1 0104 LD 1 !! 000000a2 0a0a PL this[10] !! 000000a3 1102 0000 0300 ADDEVENTH 0x0000b4, np=3, nl=0 if (enabled) if (enter) !! 000000a6 0906 LD this[9] !! 000000a7 0cb4 0000 JF 0x0000b3 button.setbrush(b1); !! 000000a9 0207 LD L[2] !! 000000aa 07b4 0000 JF 0x0000b1 !! 000000ac 0506 LD this[5] !! 000000ad 0a0a PL this[10] !! 000000ae 2efc SETBRUSH else !! 000000af 04b3 0000 JMP 0x0000b3 up(); !! 000000b1 ddb8 ffff CALLT 0x00008e end; end; end; !! 000000b3 00c2 EXIT0 when button.eventLB(int downx, int xx, int yy) !! 000000b4 0204 LD 2 !! 000000b5 0a0a PL this[10] !! 000000b6 1002 0000 0300 ADDEVENTH 0x0000c6, np=3, nl=0 if (enabled) if (downx) !! 000000b9 0906 LD this[9] !! 000000ba 0bb4 0000 JF 0x0000c5 down(); !! 000000bc 0207 LD L[2] !! 000000bd 06b4 0000 JF 0x0000c3 !! 000000bf c3b8 ffff CALLT 0x000082 else !! 000000c1 04b3 0000 JMP 0x0000c5 up(); !! 000000c3 cbb8 ffff CALLT 0x00008e end; end; end; !! 000000c5 00c2 EXIT0 when button.eventRB(int downx, int xx, int yy) !! 000000c6 0304 LD 3 !! 000000c7 0a0a PL this[10] !! 000000c8 1002 0000 0300 ADDEVENTH 0x0000d8, np=3, nl=0 if (enabled) if (downx) !! 000000cb 0906 LD this[9] !! 000000cc 0bb4 0000 JF 0x0000d7 down(); !! 000000ce 0207 LD L[2] !! 000000cf 06b4 0000 JF 0x0000d5 !! 000000d1 b1b8 ffff CALLT 0x000082 else !! 000000d3 04b3 0000 JMP 0x0000d7 up(); !! 000000d5 b9b8 ffff CALLT 0x00008e end; end; end; !! 000000d7 00c2 EXIT0 end; !! 000000d8 00bc RNEWOBJ // eof // ----------------------------------------------------------------------------- // Quadruple {op_type, dest, left_operand, right_operand} // : initially {_,_,_,_} where '_' denotes 'unused' or n/a // // operand types const int ot_value = 0; const int ot_name = 1; const int ot_unused = 2; // operand indexes const int left_op = 0; const int right_op = 1; // class to represent a quadruple class Quadruple() !! 000000d9 0100 0006 PENTRY np=0, nl=6, new operator_type = "_"; !! 000000db 009b LDCS 0 !! 000000dc 00a4 STOS this[0] dest_name = "_"; !! 000000dd 009b LDCS 0 !! 000000de 01a4 STOS this[1] operand_name[0] = "_"; !! 000000df 020d LDA this[2] !! 000000e0 0008 PL 0 !! 000000e1 01c1 AIX 1 !! 000000e2 009f PLCS 0 !! 000000e3 00a6 STAAS operand_name[1] = "_"; !! 000000e4 020d LDA this[2] !! 000000e5 0108 PL 1 !! 000000e6 01c1 AIX 1 !! 000000e7 009f PLCS 0 !! 000000e8 00a6 STAAS operand_value[0] = 0; !! 000000e9 030d LDA this[3] !! 000000ea 0008 PL 0 !! 000000eb 01c1 AIX 1 !! 000000ec 001b STAA 0 operand_value[1] = 0; !! 000000ed 030d LDA this[3] !! 000000ee 0108 PL 1 !! 000000ef 01c1 AIX 1 !! 000000f0 001b STAA 0 operand_type[0] = ot_unused; !! 000000f1 040d LDA this[4] !! 000000f2 0008 PL 0 !! 000000f3 01c1 AIX 1 !! 000000f4 021b STAA 2 operand_type[1] = ot_unused; !! 000000f5 040d LDA this[4] !! 000000f6 0108 PL 1 !! 000000f7 01c1 AIX 1 !! 000000f8 021b STAA 2 string visual_ref = ""; !! 000000f9 019b LDCS 1 !! 000000fa 05a4 STOS this[5] // determine the type of an operand int function get_type(int index) !! 000000fb f4b3 0000 JMP 0x0001ef !! 000000fd 0200 0100 PENTRY np=1, nl=0, obj return operand_type[index]; !! 000000ff 040d LDA this[4] !! 00000100 000b PL L[0] !! 00000101 01c1 AIX 1 !! 00000102 0012 LFA 0 !! 00000103 00bb RET end; !! 00000104 0200 0200 PENTRY np=2, nl=0, obj // set the type and name of an operand function set_name(int index, string name) operand_name[index] = name; !! 00000106 020d LDA this[2] !! 00000107 010b PL L[1] !! 00000108 01c1 AIX 1 !! 00000109 00a2 PLS L[0] !! 0000010a 00a6 STAAS operand_type[index] = ot_name; !! 0000010b 040d LDA this[4] !! 0000010c 010b PL L[1] !! 0000010d 01c1 AIX 1 !! 0000010e 011b STAA 1 end; !! 0000010f 00bb RET string function get_name(int index) !! 00000110 0200 0100 PENTRY np=1, nl=0, obj return operand_name[index]; !! 00000112 020d LDA this[2] !! 00000113 000b PL L[0] !! 00000114 01c1 AIX 1 !! 00000115 0012 LFA 0 !! 00000116 00bb RET end; !! 00000117 0200 0200 PENTRY np=2, nl=0, obj // set the type and value of an operand function set_value(int index, int value) operand_value[index] = value; !! 00000119 030d LDA this[3] !! 0000011a 010b PL L[1] !! 0000011b 01c1 AIX 1 !! 0000011c 000b PL L[0] !! 0000011d 001a STAA operand_type[index] = ot_value; !! 0000011e 040d LDA this[4] !! 0000011f 010b PL L[1] !! 00000120 01c1 AIX 1 !! 00000121 001b STAA 0 end; !! 00000122 00bb RET int function get_value(int index) !! 00000123 0200 0100 PENTRY np=1, nl=0, obj return operand_value[index]; !! 00000125 030d LDA this[3] !! 00000126 000b PL L[0] !! 00000127 01c1 AIX 1 !! 00000128 0012 LFA 0 !! 00000129 00bb RET end; !! 0000012a 0200 0100 PENTRY np=1, nl=0, obj function set_dest(string name) dest_name = name; !! 0000012c 009e LDLS L[0] !! 0000012d 01a4 STOS this[1] end; !! 0000012e 00bb RET string function get_dest() !! 0000012f 0200 0000 PENTRY np=0, nl=0, obj return dest_name; !! 00000131 019d LDOS this[1] !! 00000132 00bb RET end; !! 00000133 0200 0100 PENTRY np=1, nl=0, obj function set_operator(string type) operator_type = type; !! 00000135 009e LDLS L[0] !! 00000136 00a4 STOS this[0] end; !! 00000137 00bb RET string function get_operator() !! 00000138 0200 0000 PENTRY np=0, nl=0, obj return operator_type; !! 0000013a 009d LDOS this[0] !! 0000013b 00bb RET end; !! 0000013c 0200 0000 PENTRY np=0, nl=0, obj // determine the number of operands used by the quadruple int function num_operands() if((operand_type[0] != ot_unused) && (operand_type[1] != ot_unused)) !! 0000013e 040d LDA this[4] !! 0000013f 0008 PL 0 !! 00000140 01c1 AIX 1 !! 00000141 0012 LFA 0 !! 00000142 0260 NEQ 2 !! 00000143 0bb4 0000 JF 0x00014e !! 00000145 040d LDA this[4] !! 00000146 0108 PL 1 !! 00000147 01c1 AIX 1 !! 00000148 0012 LFA 0 !! 00000149 0260 NEQ 2 return 2; !! 0000014a 04b4 0000 JF 0x00014e !! 0000014c 0204 LD 2 !! 0000014d 00bb RET end; if((operand_type[0] != ot_unused) || (operand_type[1] != ot_unused)) !! 0000014e 040d LDA this[4] !! 0000014f 0008 PL 0 !! 00000150 01c1 AIX 1 !! 00000151 0012 LFA 0 !! 00000152 0260 NEQ 2 !! 00000153 09b5 0000 JT 0x00015c !! 00000155 040d LDA this[4] !! 00000156 0108 PL 1 !! 00000157 01c1 AIX 1 !! 00000158 0012 LFA 0 !! 00000159 0260 NEQ 2 return 1; !! 0000015a 04b4 0000 JF 0x00015e !! 0000015c 0104 LD 1 !! 0000015d 00bb RET end; return 0; !! 0000015e 0004 LD 0 !! 0000015f 00bb RET end; !! 00000160 0200 0001 PENTRY np=0, nl=1, obj // format the quadruple for printing on-screen string function as_string() // need to make this more robust and take into account // the operator. no = num_operands(); !! 00000162 dab8 ffff CALLT 0x00013c !! 00000164 0019 ST L[0] if(no == 1) !! 00000165 015b EQ 1 if(operand_type[0] == ot_name) !! 00000166 22b4 0000 JF 0x000188 !! 00000168 040d LDA this[4] !! 00000169 0008 PL 0 !! 0000016a 01c1 AIX 1 !! 0000016b 0012 LFA 0 !! 0000016c 015b EQ 1 visual_ref.format("%s := %s", dest_name, operand_name[0]); !! 0000016d 0fb4 0000 JF 0x00017c !! 0000016f 020d LDA this[2] !! 00000170 0008 PL 0 !! 00000171 01c1 AIX 1 !! 00000172 0012 LFA 0 !! 00000173 7bfc CVSC !! 00000174 01a1 PLS this[1] !! 00000175 7bfc CVSC !! 00000176 029f PLCS 2 !! 00000177 05a1 PLS this[5] !! 00000178 62fd 0002 FORMAT 2 else !! 0000017a 0cb3 0000 JMP 0x000186 visual_ref.format("%s := %d", dest_name, operand_value[0]); !! 0000017c 030d LDA this[3] !! 0000017d 0008 PL 0 !! 0000017e 01c1 AIX 1 !! 0000017f 0012 LFA 0 !! 00000180 01a1 PLS this[1] !! 00000181 7bfc CVSC !! 00000182 059f PLCS 5 !! 00000183 05a1 PLS this[5] !! 00000184 62fd 0002 FORMAT 2 end; return visual_ref; !! 00000186 059d LDOS this[5] !! 00000187 00bb RET end; if(no == 2) !! 00000188 0007 LD L[0] !! 00000189 025b EQ 2 if(operand_type[0] == ot_name) !! 0000018a 63b4 0000 JF 0x0001ed !! 0000018c 040d LDA this[4] !! 0000018d 0008 PL 0 !! 0000018e 01c1 AIX 1 !! 0000018f 0012 LFA 0 !! 00000190 015b EQ 1 if(operand_type[1] == ot_name) !! 00000191 30b4 0000 JF 0x0001c1 !! 00000193 040d LDA this[4] !! 00000194 0108 PL 1 !! 00000195 01c1 AIX 1 !! 00000196 0012 LFA 0 !! 00000197 015b EQ 1 visual_ref.format("%s := %s %s %s", dest_name, operand_name[0], operator_type, operand_name[1]); !! 00000198 16b4 0000 JF 0x0001ae !! 0000019a 020d LDA this[2] !! 0000019b 0108 PL 1 !! 0000019c 01c1 AIX 1 !! 0000019d 0012 LFA 0 !! 0000019e 7bfc CVSC !! 0000019f 00a1 PLS this[0] !! 000001a0 7bfc CVSC !! 000001a1 0210 PLA this[2] !! 000001a2 0008 PL 0 !! 000001a3 01c1 AIX 1 !! 000001a4 0012 LFA 0 !! 000001a5 7bfc CVSC !! 000001a6 01a1 PLS this[1] !! 000001a7 7bfc CVSC !! 000001a8 089f PLCS 8 !! 000001a9 05a1 PLS this[5] !! 000001aa 62fd 0004 FORMAT 4 else !! 000001ac 3fb3 0000 JMP 0x0001eb visual_ref.format("%s := %s %s %d", dest_name, operand_name[0], operator_type, operand_value[1]); !! 000001ae 030d LDA this[3] !! 000001af 0108 PL 1 !! 000001b0 01c1 AIX 1 !! 000001b1 0012 LFA 0 !! 000001b2 00a1 PLS this[0] !! 000001b3 7bfc CVSC !! 000001b4 0210 PLA this[2] !! 000001b5 0008 PL 0 !! 000001b6 01c1 AIX 1 !! 000001b7 0012 LFA 0 !! 000001b8 7bfc CVSC !! 000001b9 01a1 PLS this[1] !! 000001ba 7bfc CVSC !! 000001bb 0c9f PLCS 12 !! 000001bc 05a1 PLS this[5] !! 000001bd 62fd 0004 FORMAT 4 end; else !! 000001bf 2cb3 0000 JMP 0x0001eb if(operand_type[1] == ot_name) !! 000001c1 040d LDA this[4] !! 000001c2 0108 PL 1 !! 000001c3 01c1 AIX 1 !! 000001c4 0012 LFA 0 !! 000001c5 015b EQ 1 visual_ref.format("%s := %d %s %s", dest_name, operand_value[0], operator_type, operand_name[1]); !! 000001c6 15b4 0000 JF 0x0001db !! 000001c8 020d LDA this[2] !! 000001c9 0108 PL 1 !! 000001ca 01c1 AIX 1 !! 000001cb 0012 LFA 0 !! 000001cc 7bfc CVSC !! 000001cd 00a1 PLS this[0] !! 000001ce 7bfc CVSC !! 000001cf 0310 PLA this[3] !! 000001d0 0008 PL 0 !! 000001d1 01c1 AIX 1 !! 000001d2 0012 LFA 0 !! 000001d3 01a1 PLS this[1] !! 000001d4 7bfc CVSC !! 000001d5 109f PLCS 16 !! 000001d6 05a1 PLS this[5] !! 000001d7 62fd 0004 FORMAT 4 else !! 000001d9 12b3 0000 JMP 0x0001eb visual_ref.format("%s := %d %s %d", dest_name, operand_value[0], operator_type, operand_value[1]); !! 000001db 030d LDA this[3] !! 000001dc 0108 PL 1 !! 000001dd 01c1 AIX 1 !! 000001de 0012 LFA 0 !! 000001df 00a1 PLS this[0] !! 000001e0 7bfc CVSC !! 000001e1 0310 PLA this[3] !! 000001e2 0008 PL 0 !! 000001e3 01c1 AIX 1 !! 000001e4 0012 LFA 0 !! 000001e5 01a1 PLS this[1] !! 000001e6 7bfc CVSC !! 000001e7 149f PLCS 20 !! 000001e8 05a1 PLS this[5] !! 000001e9 62fd 0004 FORMAT 4 end; end; return visual_ref; !! 000001eb 059d LDOS this[5] !! 000001ec 00bb RET end; return "[? No operands ?]"; !! 000001ed 189b LDCS 24 !! 000001ee 00bb RET end; !! 000001ef 00bc RNEWOBJ end; // ----------------------------------------------------------------------------- // IR of a flow graph, upon which analysis will be performed. Changing this // will require 'tweeking' of the layout code for the GUI, to property position // basic blocks onscreen. // // number of blocks in the flow graph const int num_blocks = 4; // number of tuples in each block of the graph num_tuples[0] = 5; !! 000001f0 170c LDA G[23] !! 000001f1 0008 PL 0 !! 000001f2 01c1 AIX 1 !! 000001f3 051b STAA 5 num_tuples[1] = 2; !! 000001f4 170c LDA G[23] !! 000001f5 0108 PL 1 !! 000001f6 01c1 AIX 1 !! 000001f7 021b STAA 2 num_tuples[2] = 1; !! 000001f8 170c LDA G[23] !! 000001f9 0208 PL 2 !! 000001fa 01c1 AIX 1 !! 000001fb 011b STAA 1 num_tuples[3] = 1; !! 000001fc 170c LDA G[23] !! 000001fd 0308 PL 3 !! 000001fe 01c1 AIX 1 !! 000001ff 011b STAA 1 // how the blocks are connected together // [out, in] = 0 states that there is no connection from block_out to block_in // [out, in] = 1 states that there is a connection from block_out to block_in graph[0,0] = 0; !! 00000200 180c LDA G[24] !! 00000201 02d1 PLZx2 0, 0 !! 00000202 02c1 AIX 2 !! 00000203 001b STAA 0 graph[0,1] = 1; !! 00000204 180c LDA G[24] !! 00000205 0008 PL 0 !! 00000206 0108 PL 1 !! 00000207 02c1 AIX 2 !! 00000208 011b STAA 1 graph[0,2] = 1; !! 00000209 180c LDA G[24] !! 0000020a 0008 PL 0 !! 0000020b 0208 PL 2 !! 0000020c 02c1 AIX 2 !! 0000020d 011b STAA 1 graph[0,3] = 0; !! 0000020e 180c LDA G[24] !! 0000020f 0008 PL 0 !! 00000210 0308 PL 3 !! 00000211 02c1 AIX 2 !! 00000212 001b STAA 0 graph[1,0] = 0; !! 00000213 180c LDA G[24] !! 00000214 0108 PL 1 !! 00000215 0008 PL 0 !! 00000216 02c1 AIX 2 !! 00000217 001b STAA 0 graph[1,1] = 0; !! 00000218 180c LDA G[24] !! 00000219 0108 PL 1 !! 0000021a 0108 PL 1 !! 0000021b 02c1 AIX 2 !! 0000021c 001b STAA 0 graph[1,2] = 0; !! 0000021d 180c LDA G[24] !! 0000021e 0108 PL 1 !! 0000021f 0208 PL 2 !! 00000220 02c1 AIX 2 !! 00000221 001b STAA 0 graph[1,3] = 1; !! 00000222 180c LDA G[24] !! 00000223 0108 PL 1 !! 00000224 0308 PL 3 !! 00000225 02c1 AIX 2 !! 00000226 011b STAA 1 graph[2,0] = 0; !! 00000227 180c LDA G[24] !! 00000228 0208 PL 2 !! 00000229 0008 PL 0 !! 0000022a 02c1 AIX 2 !! 0000022b 001b STAA 0 graph[2,1] = 0; !! 0000022c 180c LDA G[24] !! 0000022d 0208 PL 2 !! 0000022e 0108 PL 1 !! 0000022f 02c1 AIX 2 !! 00000230 001b STAA 0 graph[2,2] = 0; !! 00000231 180c LDA G[24] !! 00000232 0208 PL 2 !! 00000233 0208 PL 2 !! 00000234 02c1 AIX 2 !! 00000235 001b STAA 0 graph[2,3] = 1; !! 00000236 180c LDA G[24] !! 00000237 0208 PL 2 !! 00000238 0308 PL 3 !! 00000239 02c1 AIX 2 !! 0000023a 011b STAA 1 graph[3,0] = 0; !! 0000023b 180c LDA G[24] !! 0000023c 0308 PL 3 !! 0000023d 0008 PL 0 !! 0000023e 02c1 AIX 2 !! 0000023f 001b STAA 0 graph[3,1] = 0; !! 00000240 180c LDA G[24] !! 00000241 0308 PL 3 !! 00000242 0108 PL 1 !! 00000243 02c1 AIX 2 !! 00000244 001b STAA 0 graph[3,2] = 0; !! 00000245 180c LDA G[24] !! 00000246 0308 PL 3 !! 00000247 0208 PL 2 !! 00000248 02c1 AIX 2 !! 00000249 001b STAA 0 graph[3,3] = 0; !! 0000024a 180c LDA G[24] !! 0000024b 0308 PL 3 !! 0000024c 0308 PL 3 !! 0000024d 02c1 AIX 2 !! 0000024e 001b STAA 0 // A := 1 flow_graph[0,0] = Quadruple(); !! 0000024f 190c LDA G[25] !! 00000250 02d1 PLZx2 0, 0 !! 00000251 02c1 AIX 2 !! 00000252 87c4 fffe PNEWOBJ 0x0000d9 !! 00000254 001a STAA flow_graph[0,0].set_dest("A"); !! 00000255 1d9b LDCS 29 !! 00000256 190f PLA G[25] !! 00000257 02d1 PLZx2 0, 0 !! 00000258 02c1 AIX 2 !! 00000259 0012 LFA 0 !! 0000025a d0b6 fffe CALL 0x00012a flow_graph[0,0].set_value(left_op, 1); !! 0000025c 0104 LD 1 !! 0000025d 0008 PL 0 !! 0000025e 190f PLA G[25] !! 0000025f 02d1 PLZx2 0, 0 !! 00000260 02c1 AIX 2 !! 00000261 0012 LFA 0 !! 00000262 b5b6 fffe CALL 0x000117 // B := 2 flow_graph[0,1] = Quadruple(); !! 00000264 190c LDA G[25] !! 00000265 0008 PL 0 !! 00000266 0108 PL 1 !! 00000267 02c1 AIX 2 !! 00000268 71c4 fffe PNEWOBJ 0x0000d9 !! 0000026a 001a STAA flow_graph[0,1].set_dest("B"); !! 0000026b 1e9b LDCS 30 !! 0000026c 190f PLA G[25] !! 0000026d 0008 PL 0 !! 0000026e 0108 PL 1 !! 0000026f 02c1 AIX 2 !! 00000270 0012 LFA 0 !! 00000271 b9b6 fffe CALL 0x00012a flow_graph[0,1].set_value(left_op, 2); !! 00000273 0204 LD 2 !! 00000274 0008 PL 0 !! 00000275 190f PLA G[25] !! 00000276 0008 PL 0 !! 00000277 0108 PL 1 !! 00000278 02c1 AIX 2 !! 00000279 0012 LFA 0 !! 0000027a 9db6 fffe CALL 0x000117 // C := A + B flow_graph[0,2] = Quadruple(); !! 0000027c 190c LDA G[25] !! 0000027d 0008 PL 0 !! 0000027e 0208 PL 2 !! 0000027f 02c1 AIX 2 !! 00000280 59c4 fffe PNEWOBJ 0x0000d9 !! 00000282 001a STAA flow_graph[0,2].set_dest("C"); !! 00000283 1f9b LDCS 31 !! 00000284 190f PLA G[25] !! 00000285 0008 PL 0 !! 00000286 0208 PL 2 !! 00000287 02c1 AIX 2 !! 00000288 0012 LFA 0 !! 00000289 a1b6 fffe CALL 0x00012a flow_graph[0,2].set_operator("+"); !! 0000028b 209b LDCS 32 !! 0000028c 190f PLA G[25] !! 0000028d 0008 PL 0 !! 0000028e 0208 PL 2 !! 0000028f 02c1 AIX 2 !! 00000290 0012 LFA 0 !! 00000291 a2b6 fffe CALL 0x000133 flow_graph[0,2].set_name(left_op, "A"); !! 00000293 1d9b LDCS 29 !! 00000294 0008 PL 0 !! 00000295 190f PLA G[25] !! 00000296 0008 PL 0 !! 00000297 0208 PL 2 !! 00000298 02c1 AIX 2 !! 00000299 0012 LFA 0 !! 0000029a 6ab6 fffe CALL 0x000104 flow_graph[0,2].set_name(right_op, "B"); !! 0000029c 1e9b LDCS 30 !! 0000029d 0108 PL 1 !! 0000029e 190f PLA G[25] !! 0000029f 0008 PL 0 !! 000002a0 0208 PL 2 !! 000002a1 02c1 AIX 2 !! 000002a2 0012 LFA 0 !! 000002a3 61b6 fffe CALL 0x000104 // A := 2 flow_graph[0,3] = Quadruple(); !! 000002a5 190c LDA G[25] !! 000002a6 0008 PL 0 !! 000002a7 0308 PL 3 !! 000002a8 02c1 AIX 2 !! 000002a9 30c4 fffe PNEWOBJ 0x0000d9 !! 000002ab 001a STAA flow_graph[0,3].set_dest("A"); !! 000002ac 1d9b LDCS 29 !! 000002ad 190f PLA G[25] !! 000002ae 0008 PL 0 !! 000002af 0308 PL 3 !! 000002b0 02c1 AIX 2 !! 000002b1 0012 LFA 0 !! 000002b2 78b6 fffe CALL 0x00012a flow_graph[0,3].set_value(left_op, 2); !! 000002b4 0204 LD 2 !! 000002b5 0008 PL 0 !! 000002b6 190f PLA G[25] !! 000002b7 0008 PL 0 !! 000002b8 0308 PL 3 !! 000002b9 02c1 AIX 2 !! 000002ba 0012 LFA 0 !! 000002bb 5cb6 fffe CALL 0x000117 // D := A + A flow_graph[0,4] = Quadruple(); !! 000002bd 190c LDA G[25] !! 000002be 0008 PL 0 !! 000002bf 0408 PL 4 !! 000002c0 02c1 AIX 2 !! 000002c1 18c4 fffe PNEWOBJ 0x0000d9 !! 000002c3 001a STAA flow_graph[0,4].set_dest("D"); !! 000002c4 219b LDCS 33 !! 000002c5 190f PLA G[25] !! 000002c6 0008 PL 0 !! 000002c7 0408 PL 4 !! 000002c8 02c1 AIX 2 !! 000002c9 0012 LFA 0 !! 000002ca 60b6 fffe CALL 0x00012a flow_graph[0,4].set_operator("+"); !! 000002cc 209b LDCS 32 !! 000002cd 190f PLA G[25] !! 000002ce 0008 PL 0 !! 000002cf 0408 PL 4 !! 000002d0 02c1 AIX 2 !! 000002d1 0012 LFA 0 !! 000002d2 61b6 fffe CALL 0x000133 flow_graph[0,4].set_name(left_op, "A"); !! 000002d4 1d9b LDCS 29 !! 000002d5 0008 PL 0 !! 000002d6 190f PLA G[25] !! 000002d7 0008 PL 0 !! 000002d8 0408 PL 4 !! 000002d9 02c1 AIX 2 !! 000002da 0012 LFA 0 !! 000002db 29b6 fffe CALL 0x000104 flow_graph[0,4].set_name(right_op, "A"); !! 000002dd 1d9b LDCS 29 !! 000002de 0108 PL 1 !! 000002df 190f PLA G[25] !! 000002e0 0008 PL 0 !! 000002e1 0408 PL 4 !! 000002e2 02c1 AIX 2 !! 000002e3 0012 LFA 0 !! 000002e4 20b6 fffe CALL 0x000104 // D := A + A flow_graph[1,0] = Quadruple(); !! 000002e6 190c LDA G[25] !! 000002e7 0108 PL 1 !! 000002e8 0008 PL 0 !! 000002e9 02c1 AIX 2 !! 000002ea efc4 fffd PNEWOBJ 0x0000d9 !! 000002ec 001a STAA flow_graph[1,0].set_dest("D"); !! 000002ed 219b LDCS 33 !! 000002ee 190f PLA G[25] !! 000002ef 0108 PL 1 !! 000002f0 0008 PL 0 !! 000002f1 02c1 AIX 2 !! 000002f2 0012 LFA 0 !! 000002f3 37b6 fffe CALL 0x00012a flow_graph[1,0].set_operator("+"); !! 000002f5 209b LDCS 32 !! 000002f6 190f PLA G[25] !! 000002f7 0108 PL 1 !! 000002f8 0008 PL 0 !! 000002f9 02c1 AIX 2 !! 000002fa 0012 LFA 0 !! 000002fb 38b6 fffe CALL 0x000133 flow_graph[1,0].set_name(left_op, "A"); !! 000002fd 1d9b LDCS 29 !! 000002fe 0008 PL 0 !! 000002ff 190f PLA G[25] !! 00000300 0108 PL 1 !! 00000301 0008 PL 0 !! 00000302 02c1 AIX 2 !! 00000303 0012 LFA 0 !! 00000304 00b6 fffe CALL 0x000104 flow_graph[1,0].set_name(right_op, "A"); !! 00000306 1d9b LDCS 29 !! 00000307 0108 PL 1 !! 00000308 190f PLA G[25] !! 00000309 0108 PL 1 !! 0000030a 0008 PL 0 !! 0000030b 02c1 AIX 2 !! 0000030c 0012 LFA 0 !! 0000030d f7b6 fffd CALL 0x000104 // Z := 10 flow_graph[1,1] = Quadruple(); !! 0000030f 190c LDA G[25] !! 00000310 0108 PL 1 !! 00000311 0108 PL 1 !! 00000312 02c1 AIX 2 !! 00000313 c6c4 fffd PNEWOBJ 0x0000d9 !! 00000315 001a STAA flow_graph[1,1].set_dest("Z"); !! 00000316 229b LDCS 34 !! 00000317 190f PLA G[25] !! 00000318 0108 PL 1 !! 00000319 0108 PL 1 !! 0000031a 02c1 AIX 2 !! 0000031b 0012 LFA 0 !! 0000031c 0eb6 fffe CALL 0x00012a flow_graph[1,1].set_value(left_op, 10); !! 0000031e 0a04 LD 10 !! 0000031f 0008 PL 0 !! 00000320 190f PLA G[25] !! 00000321 0108 PL 1 !! 00000322 0108 PL 1 !! 00000323 02c1 AIX 2 !! 00000324 0012 LFA 0 !! 00000325 f2b6 fffd CALL 0x000117 // C := 10 flow_graph[2,0] = Quadruple(); !! 00000327 190c LDA G[25] !! 00000328 0208 PL 2 !! 00000329 0008 PL 0 !! 0000032a 02c1 AIX 2 !! 0000032b aec4 fffd PNEWOBJ 0x0000d9 !! 0000032d 001a STAA flow_graph[2,0].set_dest("C"); !! 0000032e 1f9b LDCS 31 !! 0000032f 190f PLA G[25] !! 00000330 0208 PL 2 !! 00000331 0008 PL 0 !! 00000332 02c1 AIX 2 !! 00000333 0012 LFA 0 !! 00000334 f6b6 fffd CALL 0x00012a flow_graph[2,0].set_value(left_op, 10); !! 00000336 0a04 LD 10 !! 00000337 0008 PL 0 !! 00000338 190f PLA G[25] !! 00000339 0208 PL 2 !! 0000033a 0008 PL 0 !! 0000033b 02c1 AIX 2 !! 0000033c 0012 LFA 0 !! 0000033d dab6 fffd CALL 0x000117 // E := D + A flow_graph[3,0] = Quadruple(); !! 0000033f 190c LDA G[25] !! 00000340 0308 PL 3 !! 00000341 0008 PL 0 !! 00000342 02c1 AIX 2 !! 00000343 96c4 fffd PNEWOBJ 0x0000d9 !! 00000345 001a STAA flow_graph[3,0].set_dest("E"); !! 00000346 239b LDCS 35 !! 00000347 190f PLA G[25] !! 00000348 0308 PL 3 !! 00000349 0008 PL 0 !! 0000034a 02c1 AIX 2 !! 0000034b 0012 LFA 0 !! 0000034c deb6 fffd CALL 0x00012a flow_graph[3,0].set_operator("+"); !! 0000034e 209b LDCS 32 !! 0000034f 190f PLA G[25] !! 00000350 0308 PL 3 !! 00000351 0008 PL 0 !! 00000352 02c1 AIX 2 !! 00000353 0012 LFA 0 !! 00000354 dfb6 fffd CALL 0x000133 flow_graph[3,0].set_name(left_op, "D"); !! 00000356 219b LDCS 33 !! 00000357 0008 PL 0 !! 00000358 190f PLA G[25] !! 00000359 0308 PL 3 !! 0000035a 0008 PL 0 !! 0000035b 02c1 AIX 2 !! 0000035c 0012 LFA 0 !! 0000035d a7b6 fffd CALL 0x000104 flow_graph[3,0].set_name(right_op, "A"); !! 0000035f 1d9b LDCS 29 !! 00000360 0108 PL 1 !! 00000361 190f PLA G[25] !! 00000362 0308 PL 3 !! 00000363 0008 PL 0 !! 00000364 02c1 AIX 2 !! 00000365 0012 LFA 0 !! 00000366 9eb6 fffd CALL 0x000104 // ----------------------------------------------------------------------------- // Declarations of objects which will be used in the vivio animation GUI // // Font style declarations const int bold = 1; const int italic = 2; const int underline = 4; const int strike_through = 8; // Size of the vivio animation const int width = 800; const int height = 600; setviewport(0, 0, width, height, 0); !! 00000368 0004 LD 0 !! 00000369 00d5 4416 PLH3 0x44160000 !! 0000036b 00d5 4448 PLH3 0x44480000 !! 0000036d 02d1 PLZx2 0, 0 !! 0000036e 7dfc SETVIEWPORT // Brush declarations graybrush = SolidBrush(rgb(192, 192, 192)); !! 0000036f c0ce c0c0 LD 0x00c0c0c0 !! 00000371 04fc SOLIDBRUSH !! 00000372 1a17 ST G[26] blackbrush = SolidBrush(rgb(0, 0, 0)); !! 00000373 0004 LD 0 !! 00000374 04fc SOLIDBRUSH !! 00000375 0817 ST G[8] lightyellowbrush = SolidBrush(rgb(250, 252, 224)); !! 00000376 e0ce fafc LD 0x00fafce0 !! 00000378 04fc SOLIDBRUSH !! 00000379 1b17 ST G[27] lightredbrush = SolidBrush(rgb(255, 155, 117)); !! 0000037a 75ce ff9b LD 0x00ff9b75 !! 0000037c 04fc SOLIDBRUSH !! 0000037d 1c17 ST G[28] darkredbrush = SolidBrush(rgb(121, 6, 10)); !! 0000037e 0ace 7906 LD 0x0079060a !! 00000380 04fc SOLIDBRUSH !! 00000381 1d17 ST G[29] whitebrush = SolidBrush(rgb(255, 255, 255)); !! 00000382 ffce ffff LD 0x00ffffff !! 00000384 04fc SOLIDBRUSH !! 00000385 0917 ST G[9] bgbrush = SolidBrush( rgb( 255, 255, 192 ) ); !! 00000386 c0ce ffff LD 0x00ffffc0 !! 00000388 04fc SOLIDBRUSH !! 00000389 1e17 ST G[30] // Pens declarations thickblackpen = SolidPen(0, 2, rgb(0,0,0)); !! 0000038a 05cb LDZx5 0, 0, 0, 0, 0 !! 0000038b 0208 PL 2 !! 0000038c 0008 PL 0 !! 0000038d 0efc SOLIDPEN !! 0000038e 1f17 ST G[31] blackpen = SolidPen(1, 1, rgb(0,0,0)); !! 0000038f 05cb LDZx5 0, 0, 0, 0, 0 !! 00000390 0108 PL 1 !! 00000391 0108 PL 1 !! 00000392 0efc SOLIDPEN !! 00000393 0017 ST G[0] graypen = SolidPen(1, 1, rgb(192, 192, 192)); !! 00000394 04cb LDZx4 0, 0, 0, 0 !! 00000395 c0d4 c0c0 PL 0x00c0c0c0 !! 00000397 0108 PL 1 !! 00000398 0108 PL 1 !! 00000399 0efc SOLIDPEN !! 0000039a 2017 ST G[32] darkredpen = SolidPen(1, 1, rgb(121, 6, 10)); !! 0000039b 04cb LDZx4 0, 0, 0, 0 !! 0000039c 0ad4 7906 PL 0x0079060a !! 0000039e 0108 PL 1 !! 0000039f 0108 PL 1 !! 000003a0 0efc SOLIDPEN !! 000003a1 2117 ST G[33] // Font declarations arial = Font("Arial", 12); !! 000003a2 0004 LD 0 !! 000003a3 0c08 PL 12 !! 000003a4 249f PLCS 36 !! 000003a5 16fc FONT !! 000003a6 2217 ST G[34] arial_italic = Font("Arial", 12, italic); !! 000003a7 0204 LD 2 !! 000003a8 0c08 PL 12 !! 000003a9 249f PLCS 36 !! 000003aa 16fc FONT !! 000003ab 2317 ST G[35] arial_bold = Font("Arial", 12, bold); !! 000003ac 0104 LD 1 !! 000003ad 0c08 PL 12 !! 000003ae 249f PLCS 36 !! 000003af 16fc FONT !! 000003b0 2417 ST G[36] arial_sthrough = Font("Arial", 12, strike_through + bold); !! 000003b1 0904 LD 9 !! 000003b2 0c08 PL 12 !! 000003b3 249f PLCS 36 !! 000003b4 16fc FONT !! 000003b5 2517 ST G[37] arial_bold_small = Font("Arial", 9, bold); !! 000003b6 0104 LD 1 !! 000003b7 0908 PL 9 !! 000003b8 249f PLCS 36 !! 000003b9 16fc FONT !! 000003ba 2617 ST G[38] arial_bold_hdr = Font("Arial", 30, bold); !! 000003bb 0104 LD 1 !! 000003bc 1e08 PL 30 !! 000003bd 249f PLCS 36 !! 000003be 16fc FONT !! 000003bf 2717 ST G[39] arial_bold_italic = Font("Arial", 12, bold + italic); !! 000003c0 0304 LD 3 !! 000003c1 0c08 PL 12 !! 000003c2 249f PLCS 36 !! 000003c3 16fc FONT !! 000003c4 2817 ST G[40] arial_bold_italic_underline = Font("Arial", 12, bold + italic + underline); !! 000003c5 0704 LD 7 !! 000003c6 0c08 PL 12 !! 000003c7 249f PLCS 36 !! 000003c8 16fc FONT !! 000003c9 2917 ST G[41] // Basic UI (heading, status, background colour) const int bblock_width_ui = 150; // width of a basic block on the GUI Text(0, 0, 3, 5, 5, blackbrush, arial_bold_hdr, "Dataflow Analysis"); !! 000003ca 269b LDCS 38 !! 000003cb 2709 PL G[39] !! 000003cc 0809 PL G[8] !! 000003cd 00d5 40a0 PLH3 0x40a00000 !! 000003cf 00d5 40a0 PLH3 0x40a00000 !! 000003d1 03d2 0000 PL1x3 3, 0, 0 !! 000003d3 22fc TEXT Line(0, 0, 1, thickblackpen, 5, 40, 790, 40); !! 000003d4 00cf 4220 LDH3 0x42200000 !! 000003d6 80d5 4445 PLH3 0x44458000 !! 000003d8 00d5 4220 PLH3 0x42200000 !! 000003da 00d5 40a0 PLH3 0x40a00000 !! 000003dc 1f09 PL G[31] !! 000003dd 01d2 0000 PL1x3 1, 0, 0 !! 000003df 1cfd 0004 LINE 4 Line(0, 0, 1, thickblackpen, 5, height - 35, 790, height - 35); !! 000003e1 40cf 440d LDH3 0x440d4000 !! 000003e3 80d5 4445 PLH3 0x44458000 !! 000003e5 40d5 440d PLH3 0x440d4000 !! 000003e7 00d5 40a0 PLH3 0x40a00000 !! 000003e9 1f09 PL G[31] !! 000003ea 01d2 0000 PL1x3 1, 0, 0 !! 000003ec 1cfd 0004 LINE 4 current_operation = Text(0, 0, 3, width/4, height - 30, blackbrush, arial_bold, ""); !! 000003ee 019b LDCS 1 !! 000003ef 2409 PL G[36] !! 000003f0 0809 PL G[8] !! 000003f1 80d5 440e PLH3 0x440e8000 !! 000003f3 00d5 4348 PLH3 0x43480000 !! 000003f5 03d2 0000 PL1x3 3, 0, 0 !! 000003f7 22fc TEXT !! 000003f8 2a17 ST G[42] setbackground(bgbrush); !! 000003f9 1e05 LD G[30] !! 000003fa 7efc SETBKGND // ----------------------------------------------------------------------------- // Table of properties which will display results of local scanning // for properties, aswell as those computed globally. While hard-coded for the // number of properties used in this animation, it will scale if new // basic blocks are added. // table_of_properties = Group(); !! 000003fb 0004 LD 0 !! 000003fc 5bfc GROUP !! 000003fd 2b17 ST G[43] const int box_x = 0; const int box_y = 0; const int indent = 100; const int num_properties = 12; prop_title[0] = "Block"; !! 000003fe 2c0c LDA G[44] !! 000003ff 0008 PL 0 !! 00000400 01c1 AIX 1 !! 00000401 2b9f PLCS 43 !! 00000402 00a6 STAAS prop_title[1] = "Live use"; !! 00000403 2c0c LDA G[44] !! 00000404 0108 PL 1 !! 00000405 01c1 AIX 1 !! 00000406 2d9f PLCS 45 !! 00000407 00a6 STAAS prop_title[2] = "Definition"; !! 00000408 2c0c LDA G[44] !! 00000409 0208 PL 2 !! 0000040a 01c1 AIX 1 !! 0000040b 309f PLCS 48 !! 0000040c 00a6 STAAS prop_title[3] = "Live[in]"; !! 0000040d 2c0c LDA G[44] !! 0000040e 0308 PL 3 !! 0000040f 01c1 AIX 1 !! 00000410 339f PLCS 51 !! 00000411 00a6 STAAS prop_title[4] = "Live[out]"; !! 00000412 2c0c LDA G[44] !! 00000413 0408 PL 4 !! 00000414 01c1 AIX 1 !! 00000415 369f PLCS 54 !! 00000416 00a6 STAAS prop_title[5] = "/Transp"; !! 00000417 2c0c LDA G[44] !! 00000418 0508 PL 5 !! 00000419 01c1 AIX 1 !! 0000041a 399f PLCS 57 !! 0000041b 00a6 STAAS prop_title[6] = "Comp"; !! 0000041c 2c0c LDA G[44] !! 0000041d 0608 PL 6 !! 0000041e 01c1 AIX 1 !! 0000041f 3b9f PLCS 59 !! 00000420 00a6 STAAS prop_title[7] = "Available[in]"; !! 00000421 2c0c LDA G[44] !! 00000422 0708 PL 7 !! 00000423 01c1 AIX 1 !! 00000424 3d9f PLCS 61 !! 00000425 00a6 STAAS prop_title[8] = "Available[out]"; !! 00000426 2c0c LDA G[44] !! 00000427 0808 PL 8 !! 00000428 01c1 AIX 1 !! 00000429 419f PLCS 65 !! 0000042a 00a6 STAAS prop_title[9] = "Antloc"; !! 0000042b 2c0c LDA G[44] !! 0000042c 0908 PL 9 !! 0000042d 01c1 AIX 1 !! 0000042e 459f PLCS 69 !! 0000042f 00a6 STAAS prop_title[10] = "Anticipable[in]"; !! 00000430 2c0c LDA G[44] !! 00000431 0a08 PL 10 !! 00000432 01c1 AIX 1 !! 00000433 479f PLCS 71 !! 00000434 00a6 STAAS prop_title[11] = "Anticipable[out]"; !! 00000435 2c0c LDA G[44] !! 00000436 0b08 PL 11 !! 00000437 01c1 AIX 1 !! 00000438 4b9f PLCS 75 !! 00000439 00a6 STAAS prop_table = Rectangle(0, table_of_properties, 0, blackpen, whitebrush, box_x, box_y, indent + (15 * num_blocks), 20 * num_properties); !! 0000043a 03cb LDZx3 0, 0, 0 !! 0000043b 00d5 4370 PLH3 0x43700000 !! 0000043d 00d5 4320 PLH3 0x43200000 !! 0000043f 02d1 PLZx2 0, 0 !! 00000440 0909 PL G[9] !! 00000441 0009 PL G[0] !! 00000442 0008 PL 0 !! 00000443 2b09 PL G[43] !! 00000444 0008 PL 0 !! 00000445 1ffc RECTANGLE !! 00000446 2d17 ST G[45] divider_line = Line(0, table_of_properties, 0, blackpen, box_x, box_y + 15, box_x + indent + (15 * num_blocks), box_y + 15); !! 00000447 00cf 4170 LDH3 0x41700000 !! 00000449 00d5 4320 PLH3 0x43200000 !! 0000044b 00d5 4170 PLH3 0x41700000 !! 0000044d 0008 PL 0 !! 0000044e 0009 PL G[0] !! 0000044f 0008 PL 0 !! 00000450 2b09 PL G[43] !! 00000451 0008 PL 0 !! 00000452 1cfd 0004 LINE 4 !! 00000454 2e17 ST G[46] // property names for(i = 0; i < num_properties; i++) !! 00000455 0004 LD 0 !! 00000456 2f17 ST G[47] !! 00000457 12b3 0000 JMP 0x000469 Text(0, table_of_properties, 0, box_x, box_y + (20 * i), blackbrush, arial_bold, prop_title[i]); !! 00000459 2c0c LDA G[44] !! 0000045a 2f09 PL G[47] !! 0000045b 01c1 AIX 1 !! 0000045c 0012 LFA 0 !! 0000045d 2409 PL G[36] !! 0000045e 0809 PL G[8] !! 0000045f 0008 PL 0 !! 00000460 1408 PL 20 !! 00000461 2f2c MUL G[47] !! 00000462 0023 ADD !! 00000463 6efc CVIF !! 00000464 02d1 PLZx2 0, 0 !! 00000465 2b09 PL G[43] !! 00000466 0008 PL 0 !! 00000467 22fc TEXT end; !! 00000468 2f7b INC1 G[47] !! 00000469 0c65 LT 12 !! 0000046a efb5 ffff JT 0x000459 // block numbers for(i = 0; i < num_blocks; i++) !! 0000046c 0004 LD 0 !! 0000046d 2f17 ST G[47] !! 0000046e 11b3 0000 JMP 0x00047f Text(0, table_of_properties, 0, box_x + indent + (15*i), box_y, blackbrush, arial_bold, "%d", i); !! 00000470 2f05 LD G[47] !! 00000471 509f PLCS 80 !! 00000472 2409 PL G[36] !! 00000473 0809 PL G[8] !! 00000474 00d2 0f64 PL1x3 0, 100, 15 !! 00000476 2f2c MUL G[47] !! 00000477 0023 ADD !! 00000478 6efc CVIF !! 00000479 0008 PL 0 !! 0000047a 2b09 PL G[43] !! 0000047b 0008 PL 0 !! 0000047c 22fd 0001 TEXT 1 end; !! 0000047e 2f7b INC1 G[47] !! 0000047f 0465 LT 4 !! 00000480 f0b5 ffff JT 0x000470 // default values for(i = 0; i < num_properties - 1; i++) !! 00000482 0004 LD 0 !! 00000483 2f17 ST G[47] !! 00000484 28b3 0000 JMP 0x0004ac for(j = 0; j < num_blocks; j++) !! 00000486 0004 LD 0 !! 00000487 3017 ST G[48] !! 00000488 20b3 0000 JMP 0x0004a8 // set to '-' in the box. prop_table_ui[i, j] = Text(0, table_of_properties, 0, box_x + indent + 15 * j, box_y + 20 * (i + 1), blackbrush, arial, "-"); !! 0000048a 310c LDA G[49] !! 0000048b 2f09 PL G[47] !! 0000048c 3009 PL G[48] !! 0000048d 02c1 AIX 2 !! 0000048e 519f PLCS 81 !! 0000048f 2209 PL G[34] !! 00000490 0809 PL G[8] !! 00000491 0008 PL 0 !! 00000492 1408 PL 20 !! 00000493 2f09 PL G[47] !! 00000494 011f ADD 1 !! 00000495 002f MUL !! 00000496 0023 ADD !! 00000497 6efc CVIF !! 00000498 6408 PL 100 !! 00000499 0f08 PL 15 !! 0000049a 302c MUL G[48] !! 0000049b 0023 ADD !! 0000049c 6efc CVIF !! 0000049d 0008 PL 0 !! 0000049e 2b09 PL G[43] !! 0000049f 0008 PL 0 !! 000004a0 22fc TEXT !! 000004a1 001a STAA // initialize a 2d array for storing the results as INTs. this is ONLY valid for // results computed inside dfa_iterative, and is required for redundant code detection // as me must later verryify where antloc[in] * available[in] is true. dfa_results[i, j] = 0; !! 000004a2 320c LDA G[50] !! 000004a3 2f09 PL G[47] !! 000004a4 3009 PL G[48] !! 000004a5 02c1 AIX 2 !! 000004a6 001b STAA 0 end; !! 000004a7 307b INC1 G[48] !! 000004a8 0465 LT 4 !! 000004a9 e1b5 ffff JT 0x00048a end; !! 000004ab 2f7b INC1 G[47] !! 000004ac 0b65 LT 11 !! 000004ad d9b5 ffff JT 0x000486 table_of_properties.setpos(width - indent - (num_blocks * 20), height - num_properties * 20 - 50); !! 000004af 03cb LDZx3 0, 0, 0 !! 000004b0 00d5 439b PLH3 0x439b0000 !! 000004b2 00d5 441b PLH3 0x441b0000 !! 000004b4 2b09 PL G[43] !! 000004b5 39fc SETPOS // ----------------------------------------------------------------------------- // 'Finished' indicator for the iterative algorithm. Only shown while running // fbox = Text(0, 0, 0, width - indent - (num_blocks * 20), height - num_properties * 20 - 70, blackbrush, arial_bold, ""); !! 000004b6 019b LDCS 1 !! 000004b7 2409 PL G[36] !! 000004b8 0809 PL G[8] !! 000004b9 00d5 4391 PLH3 0x43910000 !! 000004bb 00d5 441b PLH3 0x441b0000 !! 000004bd 03d1 PLZx3 0, 0, 0 !! 000004be 22fc TEXT !! 000004bf 3317 ST G[51] // ----------------------------------------------------------------------------- // Basic GUI -- build a manipulatable UI for the flow graph // // create a group for each basic block for(i = 0; i < num_blocks; i++) !! 000004c0 0004 LD 0 !! 000004c1 2f17 ST G[47] !! 000004c2 71b3 0000 JMP 0x000533 flow_layout[i] = Group(); !! 000004c4 340c LDA G[52] !! 000004c5 2f09 PL G[47] !! 000004c6 01c1 AIX 1 !! 000004c7 0008 PL 0 !! 000004c8 5bfc GROUP !! 000004c9 001a STAA line_num = 0; !! 000004ca 0004 LD 0 !! 000004cb 3517 ST G[53] flow_graph_ui_boxes[i] = Rectangle(0, flow_layout[i], 0, blackpen, whitebrush, 0, 0, bblock_width_ui, 15 * num_tuples[i]); !! 000004cc 360c LDA G[54] !! 000004cd 2f09 PL G[47] !! 000004ce 01c1 AIX 1 !! 000004cf 03d1 PLZx3 0, 0, 0 !! 000004d0 0f08 PL 15 !! 000004d1 170f PLA G[23] !! 000004d2 2f09 PL G[47] !! 000004d3 01c1 AIX 1 !! 000004d4 0012 LFA 0 !! 000004d5 002f MUL !! 000004d6 6efc CVIF !! 000004d7 00d5 4316 PLH3 0x43160000 !! 000004d9 02d1 PLZx2 0, 0 !! 000004da 0909 PL G[9] !! 000004db 0009 PL G[0] !! 000004dc 0008 PL 0 !! 000004dd 340f PLA G[52] !! 000004de 2f09 PL G[47] !! 000004df 01c1 AIX 1 !! 000004e0 0012 LFA 0 !! 000004e1 0008 PL 0 !! 000004e2 1ffc RECTANGLE !! 000004e3 001a STAA str_prop_in[i] = Text(0, flow_layout[i], 0, 0, -15, blackbrush, arial_bold_small, ""); !! 000004e4 370c LDA G[55] !! 000004e5 2f09 PL G[47] !! 000004e6 01c1 AIX 1 !! 000004e7 019f PLCS 1 !! 000004e8 2609 PL G[38] !! 000004e9 0809 PL G[8] !! 000004ea 00d5 c170 PLH3 0xc1700000 !! 000004ec 02d1 PLZx2 0, 0 !! 000004ed 340f PLA G[52] !! 000004ee 2f09 PL G[47] !! 000004ef 01c1 AIX 1 !! 000004f0 0012 LFA 0 !! 000004f1 0008 PL 0 !! 000004f2 22fc TEXT !! 000004f3 001a STAA str_prop_out[i] = Text(0, flow_layout[i], 0, 0 , 15 * num_tuples[i] + 3, blackbrush, arial_bold_small, ""); !! 000004f4 380c LDA G[56] !! 000004f5 2f09 PL G[47] !! 000004f6 01c1 AIX 1 !! 000004f7 019f PLCS 1 !! 000004f8 2609 PL G[38] !! 000004f9 0809 PL G[8] !! 000004fa 0f08 PL 15 !! 000004fb 170f PLA G[23] !! 000004fc 2f09 PL G[47] !! 000004fd 01c1 AIX 1 !! 000004fe 0012 LFA 0 !! 000004ff 002f MUL !! 00000500 031f ADD 3 !! 00000501 6efc CVIF !! 00000502 02d1 PLZx2 0, 0 !! 00000503 340f PLA G[52] !! 00000504 2f09 PL G[47] !! 00000505 01c1 AIX 1 !! 00000506 0012 LFA 0 !! 00000507 0008 PL 0 !! 00000508 22fc TEXT !! 00000509 001a STAA for(j = 0; j < num_tuples[i]; j++) !! 0000050a 0004 LD 0 !! 0000050b 3017 ST G[48] !! 0000050c 1fb3 0000 JMP 0x00052b flow_graph_ui[i, j] = Text(0, flow_layout[i], 0, 10, line_num, blackbrush, arial, flow_graph[i, j].as_string()); !! 0000050e 390c LDA G[57] !! 0000050f 2f09 PL G[47] !! 00000510 3009 PL G[48] !! 00000511 02c1 AIX 2 !! 00000512 190f PLA G[25] !! 00000513 2f09 PL G[47] !! 00000514 3009 PL G[48] !! 00000515 02c1 AIX 2 !! 00000516 0012 LFA 0 !! 00000517 49b6 fffc CALL 0x000160 !! 00000519 2209 PL G[34] !! 0000051a 0809 PL G[8] !! 0000051b 3509 PL G[53] !! 0000051c 6efc CVIF !! 0000051d 00d5 4120 PLH3 0x41200000 !! 0000051f 0008 PL 0 !! 00000520 340f PLA G[52] !! 00000521 2f09 PL G[47] !! 00000522 01c1 AIX 1 !! 00000523 0012 LFA 0 !! 00000524 0008 PL 0 !! 00000525 22fc TEXT !! 00000526 001a STAA line_num = line_num + 15; !! 00000527 3505 LD G[53] !! 00000528 0f1f ADD 15 !! 00000529 3517 ST G[53] end; !! 0000052a 307b INC1 G[48] !! 0000052b 170f PLA G[23] !! 0000052c 2f09 PL G[47] !! 0000052d 01c1 AIX 1 !! 0000052e 0012 LFA 0 !! 0000052f 0069 LT !! 00000530 deb5 ffff JT 0x00050e end; !! 00000532 2f7b INC1 G[47] !! 00000533 0465 LT 4 !! 00000534 90b5 ffff JT 0x0004c4 // position the basic blocks on the screen. // -- until we have a graph layout algorithm we have to do it by hand :-( left = 290; !! 00000536 04fe 0122 LD 290 !! 00000538 3a17 ST G[58] flow_layout[0].setpos(left, 180); !! 00000539 03cb LDZx3 0, 0, 0 !! 0000053a 00d5 4334 PLH3 0x43340000 !! 0000053c 3a09 PL G[58] !! 0000053d 6efc CVIF !! 0000053e 340f PLA G[52] !! 0000053f 0008 PL 0 !! 00000540 01c1 AIX 1 !! 00000541 0012 LFA 0 !! 00000542 39fc SETPOS flow_layout[1].setpos(left - 80, 345); !! 00000543 03cb LDZx3 0, 0, 0 !! 00000544 80d5 43ac PLH3 0x43ac8000 !! 00000546 3a09 PL G[58] !! 00000547 5025 SUB 80 !! 00000548 6efc CVIF !! 00000549 340f PLA G[52] !! 0000054a 0108 PL 1 !! 0000054b 01c1 AIX 1 !! 0000054c 0012 LFA 0 !! 0000054d 39fc SETPOS flow_layout[2].setpos(left + 80, 345); !! 0000054e 03cb LDZx3 0, 0, 0 !! 0000054f 80d5 43ac PLH3 0x43ac8000 !! 00000551 3a09 PL G[58] !! 00000552 501f ADD 80 !! 00000553 6efc CVIF !! 00000554 340f PLA G[52] !! 00000555 0208 PL 2 !! 00000556 01c1 AIX 1 !! 00000557 0012 LFA 0 !! 00000558 39fc SETPOS flow_layout[3].setpos(left, 470); !! 00000559 03cb LDZx3 0, 0, 0 !! 0000055a 00d5 43eb PLH3 0x43eb0000 !! 0000055c 3a09 PL G[58] !! 0000055d 6efc CVIF !! 0000055e 340f PLA G[52] !! 0000055f 0308 PL 3 !! 00000560 01c1 AIX 1 !! 00000561 0012 LFA 0 !! 00000562 39fc SETPOS // connect the basic blocks with lines to indicate flow for(i = 0; i < num_blocks; i++) !! 00000563 0004 LD 0 !! 00000564 2f17 ST G[47] !! 00000565 4cb3 0000 JMP 0x0005b1 bottom_x = flow_layout[i].getx() + (bblock_width_ui / 2); !! 00000567 340c LDA G[52] !! 00000568 2f09 PL G[47] !! 00000569 01c1 AIX 1 !! 0000056a 0012 LFA 0 !! 0000056b 23fc GETX !! 0000056c 86ff 0000 4296 ADDR 0x42960000 !! 0000056f 3b17 ST G[59] bottom_y = flow_layout[i].gety() + flow_graph_ui_boxes[i].geth(); !! 00000570 340c LDA G[52] !! 00000571 2f09 PL G[47] !! 00000572 01c1 AIX 1 !! 00000573 0012 LFA 0 !! 00000574 24fc GETY !! 00000575 360f PLA G[54] !! 00000576 2f09 PL G[47] !! 00000577 01c1 AIX 1 !! 00000578 0012 LFA 0 !! 00000579 26fc GETH !! 0000057a 008a ADDR !! 0000057b 3c17 ST G[60] for(j = 0; j < num_blocks; j++) !! 0000057c 0004 LD 0 !! 0000057d 3017 ST G[48] !! 0000057e 2fb3 0000 JMP 0x0005ad if(graph[i,j] == 1) !! 00000580 180c LDA G[24] !! 00000581 2f09 PL G[47] !! 00000582 3009 PL G[48] !! 00000583 02c1 AIX 2 !! 00000584 0012 LFA 0 !! 00000585 015b EQ 1 // for the moment we assume there are no back links (for layout) top_x = flow_layout[j].getx() + (bblock_width_ui / 2); !! 00000586 26b4 0000 JF 0x0005ac !! 00000588 340c LDA G[52] !! 00000589 3009 PL G[48] !! 0000058a 01c1 AIX 1 !! 0000058b 0012 LFA 0 !! 0000058c 23fc GETX !! 0000058d 86ff 0000 4296 ADDR 0x42960000 !! 00000590 3d17 ST G[61] top_y = flow_layout[j].gety(); !! 00000591 340c LDA G[52] !! 00000592 3009 PL G[48] !! 00000593 01c1 AIX 1 !! 00000594 0012 LFA 0 !! 00000595 24fc GETY !! 00000596 3e17 ST G[62] flow_graph_ui_lines[i, j] = Line(0, 0, 1, graypen, bottom_x, bottom_y, top_x, top_y); !! 00000597 3f0c LDA G[63] !! 00000598 2f09 PL G[47] !! 00000599 3009 PL G[48] !! 0000059a 02c1 AIX 2 !! 0000059b 3e09 PL G[62] !! 0000059c 3d09 PL G[61] !! 0000059d 3c09 PL G[60] !! 0000059e 3b09 PL G[59] !! 0000059f 2009 PL G[32] !! 000005a0 01d2 0000 PL1x3 1, 0, 0 !! 000005a2 1cfd 0004 LINE 4 !! 000005a4 001a STAA flow_graph_ui_lines[i,j].setfont(arial_bold_small); !! 000005a5 2605 LD G[38] !! 000005a6 3f0f PLA G[63] !! 000005a7 2f09 PL G[47] !! 000005a8 3009 PL G[48] !! 000005a9 02c1 AIX 2 !! 000005aa 0012 LFA 0 !! 000005ab 32fc SETFONT else !! 000005ac 307b INC1 G[48] !! 000005ad 0465 LT 4 !! 000005ae d2b5 ffff JT 0x000580 // need to deal with backlinks (or no links!) here. end; end; end; !! 000005b0 2f7b INC1 G[47] !! 000005b1 0465 LT 4 !! 000005b2 b5b5 ffff JT 0x000567 // ----------------------------------------------------------------------------- // Local Use: determines if variable_name is used live in block[basic_block] // int function live_use(string variable_name, int basic_block) !! 000005b4 dbb3 0000 JMP 0x00068f !! 000005b6 0000 0201 PENTRY np=2, nl=1 for(int tuple = 0; tuple < num_tuples[basic_block]; tuple++) !! 000005b8 0004 LD 0 !! 000005b9 0219 ST L[2] !! 000005ba 6cb3 0000 JMP 0x000626 // are either of the right or left operands used before being // defined in this quadruple (nb. must be of correct type for // comparison!) ? if(flow_graph[basic_block, tuple].get_type(left_op) == ot_name) !! 000005bc 0004 LD 0 !! 000005bd 190f PLA G[25] !! 000005be 000b PL L[0] !! 000005bf 020b PL L[2] !! 000005c0 02c1 AIX 2 !! 000005c1 0012 LFA 0 !! 000005c2 3bb6 fffb CALL 0x0000fd !! 000005c4 015b EQ 1 if(flow_graph[basic_block, tuple].get_name(left_op) == variable_name) !! 000005c5 25b4 0000 JF 0x0005ea !! 000005c7 0004 LD 0 !! 000005c8 190f PLA G[25] !! 000005c9 000b PL L[0] !! 000005ca 020b PL L[2] !! 000005cb 02c1 AIX 2 !! 000005cc 0012 LFA 0 !! 000005cd 43b6 fffb CALL 0x000110 !! 000005cf 01a2 PLS L[1] !! 000005d0 00ad EQS flow_graph_ui[basic_block, tuple].settext(flow_graph[basic_block, tuple].as_string() + " (Live use)"); !! 000005d1 19b4 0000 JF 0x0005ea !! 000005d3 190c LDA G[25] !! 000005d4 000b PL L[0] !! 000005d5 020b PL L[2] !! 000005d6 02c1 AIX 2 !! 000005d7 0012 LFA 0 !! 000005d8 88b6 fffb CALL 0x000160 !! 000005da 52a7 ADDS 82 !! 000005db 390f PLA G[57] !! 000005dc 000b PL L[0] !! 000005dd 020b PL L[2] !! 000005de 02c1 AIX 2 !! 000005df 0012 LFA 0 !! 000005e0 43fc SETTEXT flow_graph_ui[basic_block, tuple].setfont(arial_bold); !! 000005e1 2405 LD G[36] !! 000005e2 390f PLA G[57] !! 000005e3 000b PL L[0] !! 000005e4 020b PL L[2] !! 000005e5 02c1 AIX 2 !! 000005e6 0012 LFA 0 !! 000005e7 32fc SETFONT return 1; !! 000005e8 0104 LD 1 !! 000005e9 00bb RET end; end; if(flow_graph[basic_block, tuple].get_type(right_op) == ot_name) !! 000005ea 0104 LD 1 !! 000005eb 190f PLA G[25] !! 000005ec 000b PL L[0] !! 000005ed 020b PL L[2] !! 000005ee 02c1 AIX 2 !! 000005ef 0012 LFA 0 !! 000005f0 0db6 fffb CALL 0x0000fd !! 000005f2 015b EQ 1 if(flow_graph[basic_block, tuple].get_name(right_op) == variable_name) !! 000005f3 25b4 0000 JF 0x000618 !! 000005f5 0104 LD 1 !! 000005f6 190f PLA G[25] !! 000005f7 000b PL L[0] !! 000005f8 020b PL L[2] !! 000005f9 02c1 AIX 2 !! 000005fa 0012 LFA 0 !! 000005fb 15b6 fffb CALL 0x000110 !! 000005fd 01a2 PLS L[1] !! 000005fe 00ad EQS flow_graph_ui[basic_block, tuple].settext(flow_graph[basic_block, tuple].as_string() + " (Live use)"); !! 000005ff 19b4 0000 JF 0x000618 !! 00000601 190c LDA G[25] !! 00000602 000b PL L[0] !! 00000603 020b PL L[2] !! 00000604 02c1 AIX 2 !! 00000605 0012 LFA 0 !! 00000606 5ab6 fffb CALL 0x000160 !! 00000608 52a7 ADDS 82 !! 00000609 390f PLA G[57] !! 0000060a 000b PL L[0] !! 0000060b 020b PL L[2] !! 0000060c 02c1 AIX 2 !! 0000060d 0012 LFA 0 !! 0000060e 43fc SETTEXT flow_graph_ui[basic_block, tuple].setfont(arial_bold); !! 0000060f 2405 LD G[36] !! 00000610 390f PLA G[57] !! 00000611 000b PL L[0] !! 00000612 020b PL L[2] !! 00000613 02c1 AIX 2 !! 00000614 0012 LFA 0 !! 00000615 32fc SETFONT return 1; !! 00000616 0104 LD 1 !! 00000617 00bb RET end; end; // if theres an assignment to the variable in this quadruple // then theres no live use in the block (would have returned 1 if // either operands of this quad were the variable being used-live) if(flow_graph[basic_block, tuple].get_dest() == variable_name) !! 00000618 190c LDA G[25] !! 00000619 000b PL L[0] !! 0000061a 020b PL L[2] !! 0000061b 02c1 AIX 2 !! 0000061c 0012 LFA 0 !! 0000061d 12b6 fffb CALL 0x00012f !! 0000061f 01a2 PLS L[1] !! 00000620 00ad EQS return 0; !! 00000621 04b4 0000 JF 0x000625 !! 00000623 0004 LD 0 !! 00000624 00bb RET end; end; !! 00000625 027d INC1 L[2] !! 00000626 170f PLA G[23] !! 00000627 000b PL L[0] !! 00000628 01c1 AIX 1 !! 00000629 0012 LFA 0 !! 0000062a 0069 LT !! 0000062b 91b5 ffff JT 0x0005bc // if no reference was made then there is no live use here. return 0; !! 0000062d 0004 LD 0 !! 0000062e 00bb RET end; !! 0000062f 0000 0201 PENTRY np=2, nl=1 // ----------------------------------------------------------------------------- // Def: determines if a definition of a variable takes place in block[basic_block] // int function def(string variable_name, int basic_block) // if the variable is the destination for any quadruple // then the variable has a definition in this basic block for(int tuple = 0; tuple < num_tuples[basic_block]; tuple++) !! 00000631 0004 LD 0 !! 00000632 0219 ST L[2] !! 00000633 25b3 0000 JMP 0x000658 if(flow_graph[basic_block, tuple].get_dest() == variable_name) !! 00000635 190c LDA G[25] !! 00000636 000b PL L[0] !! 00000637 020b PL L[2] !! 00000638 02c1 AIX 2 !! 00000639 0012 LFA 0 !! 0000063a f5b6 fffa CALL 0x00012f !! 0000063c 01a2 PLS L[1] !! 0000063d 00ad EQS flow_graph_ui[basic_block, tuple].setfont(arial_bold); !! 0000063e 19b4 0000 JF 0x000657 !! 00000640 2405 LD G[36] !! 00000641 390f PLA G[57] !! 00000642 000b PL L[0] !! 00000643 020b PL L[2] !! 00000644 02c1 AIX 2 !! 00000645 0012 LFA 0 !! 00000646 32fc SETFONT flow_graph_ui[basic_block, tuple].settext(flow_graph[basic_block, tuple].as_string() + " (Definition)"); !! 00000647 190c LDA G[25] !! 00000648 000b PL L[0] !! 00000649 020b PL L[2] !! 0000064a 02c1 AIX 2 !! 0000064b 0012 LFA 0 !! 0000064c 14b6 fffb CALL 0x000160 !! 0000064e 55a7 ADDS 85 !! 0000064f 390f PLA G[57] !! 00000650 000b PL L[0] !! 00000651 020b PL L[2] !! 00000652 02c1 AIX 2 !! 00000653 0012 LFA 0 !! 00000654 43fc SETTEXT return 1; !! 00000655 0104 LD 1 !! 00000656 00bb RET end; end; !! 00000657 027d INC1 L[2] !! 00000658 170f PLA G[23] !! 00000659 000b PL L[0] !! 0000065a 01c1 AIX 1 !! 0000065b 0012 LFA 0 !! 0000065c 0069 LT !! 0000065d d8b5 ffff JT 0x000635 // if nothing assigns to variable_name in this block return false return 0; !! 0000065f 0004 LD 0 !! 00000660 00bb RET end; !! 00000661 0000 0201 PENTRY np=2, nl=1 // ----------------------------------------------------------------------------- // Transp: determines if an expression (quadruple) is transparent in // block[basic_block]. An expression is transparent in a block if its operands // are not modified by exectuion of the commands in the block/ // int function transp(Quadruple expr, int basic_block) // for each operand, if the operand is a variable name, // if there is an assignment to the operand then the block // is not transparent for the expression. for(int i = 0; i < expr.num_operands(); i++) !! 00000663 0004 LD 0 !! 00000664 0219 ST L[2] !! 00000665 16b3 0000 JMP 0x00067b if(expr.get_type(i) == ot_name) !! 00000667 0207 LD L[2] !! 00000668 010b PL L[1] !! 00000669 94b6 fffa CALL 0x0000fd !! 0000066b 015b EQ 1 if(def(expr.get_name(i), basic_block) == 1) !! 0000066c 0eb4 0000 JF 0x00067a !! 0000066e 0007 LD L[0] !! 0000066f 020b PL L[2] !! 00000670 010b PL L[1] !! 00000671 9fb6 fffa CALL 0x000110 !! 00000673 bcb7 ffff PCALL 0x00062f !! 00000675 015b EQ 1 return 0; !! 00000676 04b4 0000 JF 0x00067a !! 00000678 0004 LD 0 !! 00000679 00bb RET end; end; end; !! 0000067a 027d INC1 L[2] !! 0000067b 010b PL L[1] !! 0000067c c0b6 fffa CALL 0x00013c !! 0000067e 0069 LT !! 0000067f e8b5 ffff JT 0x000667 // otherwise it is. return 1; !! 00000681 0104 LD 1 !! 00000682 00bb RET end; !! 00000683 0000 0200 PENTRY np=2, nl=0 // handy helper method int function not_transp(Quadruple expr, int basic_block) if(transp(expr, basic_block)) !! 00000685 0007 LD L[0] !! 00000686 010b PL L[1] !! 00000687 dab7 ffff PCALL 0x000661 return 0; !! 00000689 04b4 0000 JF 0x00068d !! 0000068b 0004 LD 0 !! 0000068c 00bb RET end; return 1; !! 0000068d 0104 LD 1 !! 0000068e 00bb RET end; !! 0000068f 019b LDCS 1 !! 00000690 40a3 STGS G[64] !! 00000691 019b LDCS 1 !! 00000692 41a3 STGS G[65] !! 00000693 019b LDCS 1 !! 00000694 42a3 STGS G[66] !! 00000695 019b LDCS 1 !! 00000696 43a3 STGS G[67] // ----------------------------------------------------------------------------- // Comp: determines if an expression is locally available in a block. An expr // is locally available in a block if there is at least one computation of the // expr in the block, and if its operands are not modified by the commands // appearing after its last computation in a block. // // need these temps otherwise vivio goes mad. string t1 = "", t2 = "", t3 = "", t4 = ""; int function locally_available(Quadruple expr, int basic_block) !! 00000697 02b3 0003 JMP 0x000999 !! 00000699 0000 0202 PENTRY np=2, nl=2 // starting with the last tuple in the block, search backwards up the // block until we hit a computation of the expression, or the first tuple. // if a definition occurs of any of the expressions operands before we hit // the computation, it is not locally available! for(int i = 0; i < num_tuples[basic_block]; i++) !! 0000069b 0004 LD 0 !! 0000069c 0219 ST L[2] !! 0000069d 48b3 0000 JMP 0x0006e5 // two expressions are equal if they have the same string representation t1 = expr.as_string(); !! 0000069f 0107 LD L[1] !! 000006a0 c0b6 fffa CALL 0x000160 !! 000006a2 40a3 STGS G[64] t2 = flow_graph[basic_block, num_tuples[basic_block] - (1 + i)].as_string(); !! 000006a3 190c LDA G[25] !! 000006a4 000b PL L[0] !! 000006a5 170f PLA G[23] !! 000006a6 000b PL L[0] !! 000006a7 01c1 AIX 1 !! 000006a8 0012 LFA 0 !! 000006a9 0108 PL 1 !! 000006aa 0222 ADD L[2] !! 000006ab 0029 SUB !! 000006ac 02c1 AIX 2 !! 000006ad 0012 LFA 0 !! 000006ae b2b6 fffa CALL 0x000160 !! 000006b0 41a3 STGS G[65] if(t1 == t2) !! 000006b1 409c LDGS G[64] !! 000006b2 41a0 PLS G[65] !! 000006b3 00ad EQS return 1; !! 000006b4 04b4 0000 JF 0x0006b8 !! 000006b6 0104 LD 1 !! 000006b7 00bb RET end; // if an operand is modified, the computation is not locally available. for(int j = 0; j < expr.num_operands(); j++) !! 000006b8 0004 LD 0 !! 000006b9 0319 ST L[3] !! 000006ba 24b3 0000 JMP 0x0006de if(expr.get_type(j) == ot_name) !! 000006bc 0307 LD L[3] !! 000006bd 010b PL L[1] !! 000006be 3fb6 fffa CALL 0x0000fd !! 000006c0 015b EQ 1 t3 = flow_graph[basic_block, num_tuples[basic_block] - (1 + i)].get_dest(); !! 000006c1 1cb4 0000 JF 0x0006dd !! 000006c3 190c LDA G[25] !! 000006c4 000b PL L[0] !! 000006c5 170f PLA G[23] !! 000006c6 000b PL L[0] !! 000006c7 01c1 AIX 1 !! 000006c8 0012 LFA 0 !! 000006c9 0108 PL 1 !! 000006ca 0222 ADD L[2] !! 000006cb 0029 SUB !! 000006cc 02c1 AIX 2 !! 000006cd 0012 LFA 0 !! 000006ce 61b6 fffa CALL 0x00012f !! 000006d0 42a3 STGS G[66] t4 = expr.get_name(j); !! 000006d1 0307 LD L[3] !! 000006d2 010b PL L[1] !! 000006d3 3db6 fffa CALL 0x000110 !! 000006d5 43a3 STGS G[67] if(t3 == t4) !! 000006d6 429c LDGS G[66] !! 000006d7 43a0 PLS G[67] !! 000006d8 00ad EQS return 0; !! 000006d9 04b4 0000 JF 0x0006dd !! 000006db 0004 LD 0 !! 000006dc 00bb RET end; end; end; !! 000006dd 037d INC1 L[3] !! 000006de 010b PL L[1] !! 000006df 5db6 fffa CALL 0x00013c !! 000006e1 0069 LT !! 000006e2 dab5 ffff JT 0x0006bc end; !! 000006e4 027d INC1 L[2] !! 000006e5 170f PLA G[23] !! 000006e6 000b PL L[0] !! 000006e7 01c1 AIX 1 !! 000006e8 0012 LFA 0 !! 000006e9 0069 LT !! 000006ea b5b5 ffff JT 0x00069f // if no computation, nor any modification ==> not comp. return 0; !! 000006ec 0004 LD 0 !! 000006ed 00bb RET end; !! 000006ee 0000 0202 PENTRY np=2, nl=2 // ----------------------------------------------------------------------------- // Antloc: Locally Anticipability.. // An expression is locally anticipable if there is a computation of the // expr within the basic block, and if the commands appearing in the block before // the first computation of the expression do not modify its operands. // int function locally_anticipable(Quadruple expr, int basic_block) for(int i = 0; i < num_tuples[basic_block]; i++) !! 000006f0 0004 LD 0 !! 000006f1 0219 ST L[2] !! 000006f2 3cb3 0000 JMP 0x00072e // two expressions are equal if they have the same string representation t1 = expr.as_string(); !! 000006f4 0107 LD L[1] !! 000006f5 6bb6 fffa CALL 0x000160 !! 000006f7 40a3 STGS G[64] t2 = flow_graph[basic_block, i].as_string(); !! 000006f8 190c LDA G[25] !! 000006f9 000b PL L[0] !! 000006fa 020b PL L[2] !! 000006fb 02c1 AIX 2 !! 000006fc 0012 LFA 0 !! 000006fd 63b6 fffa CALL 0x000160 !! 000006ff 41a3 STGS G[65] if(t1 == t2) !! 00000700 409c LDGS G[64] !! 00000701 41a0 PLS G[65] !! 00000702 00ad EQS return 1; !! 00000703 04b4 0000 JF 0x000707 !! 00000705 0104 LD 1 !! 00000706 00bb RET end; // if an operand is modified, the computation is not locally available. for(int j = 0; j < expr.num_operands(); j++) !! 00000707 0004 LD 0 !! 00000708 0319 ST L[3] !! 00000709 1eb3 0000 JMP 0x000727 if(expr.get_type(j) == ot_name) !! 0000070b 0307 LD L[3] !! 0000070c 010b PL L[1] !! 0000070d f0b6 fff9 CALL 0x0000fd !! 0000070f 015b EQ 1 t3 = flow_graph[basic_block, i].get_dest(); !! 00000710 16b4 0000 JF 0x000726 !! 00000712 190c LDA G[25] !! 00000713 000b PL L[0] !! 00000714 020b PL L[2] !! 00000715 02c1 AIX 2 !! 00000716 0012 LFA 0 !! 00000717 18b6 fffa CALL 0x00012f !! 00000719 42a3 STGS G[66] t4 = expr.get_name(j); !! 0000071a 0307 LD L[3] !! 0000071b 010b PL L[1] !! 0000071c f4b6 fff9 CALL 0x000110 !! 0000071e 43a3 STGS G[67] if(t3 == t4) !! 0000071f 429c LDGS G[66] !! 00000720 43a0 PLS G[67] !! 00000721 00ad EQS return 0; !! 00000722 04b4 0000 JF 0x000726 !! 00000724 0004 LD 0 !! 00000725 00bb RET end; end; end; !! 00000726 037d INC1 L[3] !! 00000727 010b PL L[1] !! 00000728 14b6 fffa CALL 0x00013c !! 0000072a 0069 LT !! 0000072b e0b5 ffff JT 0x00070b end; !! 0000072d 027d INC1 L[2] !! 0000072e 170f PLA G[23] !! 0000072f 000b PL L[0] !! 00000730 01c1 AIX 1 !! 00000731 0012 LFA 0 !! 00000732 0069 LT !! 00000733 c1b5 ffff JT 0x0006f4 // if no computation, nor any modification ==> not antloc. return 0; !! 00000735 0004 LD 0 !! 00000736 00bb RET end; !! 00000737 0000 0509 PENTRY np=5, nl=9 // ----------------------------------------------------------------------------- // Iterative Data Flow Analysis // // e[*] -- event takes place in block * // ae[*] -- anti event takes place in block * // x[*] -- property present at the input of block * // x_o[*] -- property present at the output of block * // prop_index -- base index into the property table for this result. // int x[*]; int x_o[*]; function dfa_iterative(int e[*], int ae[*], int forth, int one, int prop_index) // initialize the Xi // true for all problems // false for one problems int finished = 1; !! 00000739 0104 LD 1 !! 0000073a 0519 ST L[5] fbox.settext("Finished = true"); !! 0000073b 599b LDCS 89 !! 0000073c 3309 PL G[51] !! 0000073d 43fc SETTEXT for(int k = 0; k < num_blocks; k++) !! 0000073e 0004 LD 0 !! 0000073f 0619 ST L[6] !! 00000740 5fb3 0000 JMP 0x00079f if(one == 1) !! 00000742 0107 LD L[1] !! 00000743 015b EQ 1 x[k] = x_o[k] = 0; !! 00000744 19b4 0000 JF 0x00075d !! 00000746 440c LDA G[68] !! 00000747 060b PL L[6] !! 00000748 01c1 AIX 1 !! 00000749 450f PLA G[69] !! 0000074a 060b PL L[6] !! 0000074b 01c1 AIX 1 !! 0000074c 001b STAA 0 !! 0000074d 0012 LFA 0 !! 0000074e 001a STAA str_prop_in[k].settext("[Property absent]"); !! 0000074f 5d9b LDCS 93 !! 00000750 370f PLA G[55] !! 00000751 060b PL L[6] !! 00000752 01c1 AIX 1 !! 00000753 0012 LFA 0 !! 00000754 43fc SETTEXT str_prop_out[k].settext("[Property absent]"); !! 00000755 5d9b LDCS 93 !! 00000756 380f PLA G[56] !! 00000757 060b PL L[6] !! 00000758 01c1 AIX 1 !! 00000759 0012 LFA 0 !! 0000075a 43fc SETTEXT else !! 0000075b 17b3 0000 JMP 0x000772 x[k] = x_o[k] = 1; !! 0000075d 440c LDA G[68] !! 0000075e 060b PL L[6] !! 0000075f 01c1 AIX 1 !! 00000760 450f PLA G[69] !! 00000761 060b PL L[6] !! 00000762 01c1 AIX 1 !! 00000763 011b STAA 1 !! 00000764 0012 LFA 0 !! 00000765 001a STAA str_prop_in[k].settext("[Property present]"); !! 00000766 629b LDCS 98 !! 00000767 370f PLA G[55] !! 00000768 060b PL L[6] !! 00000769 01c1 AIX 1 !! 0000076a 0012 LFA 0 !! 0000076b 43fc SETTEXT str_prop_out[k].settext("[Property present]"); !! 0000076c 629b LDCS 98 !! 0000076d 380f PLA G[56] !! 0000076e 060b PL L[6] !! 0000076f 01c1 AIX 1 !! 00000770 0012 LFA 0 !! 00000771 43fc SETTEXT end; prop_table_ui[prop_index, k].settext("%d", x[k]); !! 00000772 440c LDA G[68] !! 00000773 060b PL L[6] !! 00000774 01c1 AIX 1 !! 00000775 0012 LFA 0 !! 00000776 509f PLCS 80 !! 00000777 310f PLA G[49] !! 00000778 000b PL L[0] !! 00000779 060b PL L[6] !! 0000077a 02c1 AIX 2 !! 0000077b 0012 LFA 0 !! 0000077c 43fd 0001 SETTEXT 1 prop_table_ui[prop_index + 1, k].settext("%d", x_o[k]); !! 0000077e 450c LDA G[69] !! 0000077f 060b PL L[6] !! 00000780 01c1 AIX 1 !! 00000781 0012 LFA 0 !! 00000782 509f PLCS 80 !! 00000783 310f PLA G[49] !! 00000784 000b PL L[0] !! 00000785 011f ADD 1 !! 00000786 060b PL L[6] !! 00000787 02c1 AIX 2 !! 00000788 0012 LFA 0 !! 00000789 43fd 0001 SETTEXT 1 dfa_results[prop_index, k] = x[k]; !! 0000078b 320c LDA G[50] !! 0000078c 000b PL L[0] !! 0000078d 060b PL L[6] !! 0000078e 02c1 AIX 2 !! 0000078f 440f PLA G[68] !! 00000790 060b PL L[6] !! 00000791 01c1 AIX 1 !! 00000792 0012 LFA 0 !! 00000793 001a STAA dfa_results[prop_index + 1, k] = x_o[k]; !! 00000794 320c LDA G[50] !! 00000795 000b PL L[0] !! 00000796 011f ADD 1 !! 00000797 060b PL L[6] !! 00000798 02c1 AIX 2 !! 00000799 450f PLA G[69] !! 0000079a 060b PL L[6] !! 0000079b 01c1 AIX 1 !! 0000079c 0012 LFA 0 !! 0000079d 001a STAA end; !! 0000079e 067d INC1 L[6] !! 0000079f 0465 LT 4 !! 000007a0 a2b5 ffff JT 0x000742 wait(5); !! 000007a2 0504 LD 5 !! 000007a3 96fc WAIT // solve the DFA equations iteratively repeat finished = 1; !! 000007a4 0104 LD 1 !! 000007a5 0519 ST L[5] fbox.settext("Finished = true"); !! 000007a6 599b LDCS 89 !! 000007a7 3309 PL G[51] !! 000007a8 43fc SETTEXT for(int i = 0; i < num_blocks; i++) !! 000007a9 0004 LD 0 !! 000007aa 0719 ST L[7] !! 000007ab cdb3 0001 JMP 0x000978 int new_xi = e[i]; !! 000007ad 040e LDA L[4] !! 000007ae 070b PL L[7] !! 000007af 01c1 AIX 1 !! 000007b0 0012 LFA 0 !! 000007b1 0819 ST L[8] int yi = 0; !! 000007b2 0004 LD 0 !! 000007b3 0919 ST L[9] int first_pass = 1; !! 000007b4 0104 LD 1 !! 000007b5 0a19 ST L[10] // in represents a sucessor of i if graph[i][in] AND its a forth problem , // else it represents a predecessor if graph[in][i] AND its a back problem. // yi calculates the presence of the property after/before this point for(int in = 0; in < num_blocks; in++) !! 000007b6 0004 LD 0 !! 000007b7 0b19 ST L[11] !! 000007b8 cbb3 0000 JMP 0x000883 if( (graph[i, in] == 1 && forth == 1) || (graph[in, i] == 1 && forth != 1) ) !! 000007ba 180c LDA G[24] !! 000007bb 070b PL L[7] !! 000007bc 0b0b PL L[11] !! 000007bd 02c1 AIX 2 !! 000007be 0012 LFA 0 !! 000007bf 015b EQ 1 !! 000007c0 06b4 0000 JF 0x0007c6 !! 000007c2 0207 LD L[2] !! 000007c3 015b EQ 1 !! 000007c4 0eb5 0000 JT 0x0007d2 !! 000007c6 180c LDA G[24] !! 000007c7 0b0b PL L[11] !! 000007c8 070b PL L[7] !! 000007c9 02c1 AIX 2 !! 000007ca 0012 LFA 0 !! 000007cb 015b EQ 1 !! 000007cc b6b4 0000 JF 0x000882 !! 000007ce 0207 LD L[2] !! 000007cf 0160 NEQ 1 if(forth == 1) !! 000007d0 b2b4 0000 JF 0x000882 !! 000007d2 0207 LD L[2] !! 000007d3 015b EQ 1 flow_graph_ui_lines[i, in].setpen(darkredpen); !! 000007d4 15b4 0000 JF 0x0007e9 !! 000007d6 2105 LD G[33] !! 000007d7 3f0f PLA G[63] !! 000007d8 070b PL L[7] !! 000007d9 0b0b PL L[11] !! 000007da 02c1 AIX 2 !! 000007db 0012 LFA 0 !! 000007dc 34fc SETPEN flow_graph_ui_lines[i, in].settext("Property occurs after block %d, at input of block %d?", i, in); !! 000007dd 0b07 LD L[11] !! 000007de 070b PL L[7] !! 000007df 679f PLCS 103 !! 000007e0 3f0f PLA G[63] !! 000007e1 070b PL L[7] !! 000007e2 0b0b PL L[11] !! 000007e3 02c1 AIX 2 !! 000007e4 0012 LFA 0 !! 000007e5 43fd 0002 SETTEXT 2 else !! 000007e7 13b3 0000 JMP 0x0007fa flow_graph_ui_lines[in, i].setpen(darkredpen); !! 000007e9 2105 LD G[33] !! 000007ea 3f0f PLA G[63] !! 000007eb 0b0b PL L[11] !! 000007ec 070b PL L[7] !! 000007ed 02c1 AIX 2 !! 000007ee 0012 LFA 0 !! 000007ef 34fc SETPEN flow_graph_ui_lines[in, i].settext("Property occurs before block %d, at output of block %d?", i, in); !! 000007f0 0b07 LD L[11] !! 000007f1 070b PL L[7] !! 000007f2 759f PLCS 117 !! 000007f3 3f0f PLA G[63] !! 000007f4 0b0b PL L[11] !! 000007f5 070b PL L[7] !! 000007f6 02c1 AIX 2 !! 000007f7 0012 LFA 0 !! 000007f8 43fd 0002 SETTEXT 2 end; int correct_x_val = -1; !! 000007fa ff04 LD 255 !! 000007fb 0c19 ST L[12] if(forth == 1) !! 000007fc 0207 LD L[2] !! 000007fd 015b EQ 1 correct_x_val = x[in]; !! 000007fe 09b4 0000 JF 0x000807 !! 00000800 440c LDA G[68] !! 00000801 0b0b PL L[11] !! 00000802 01c1 AIX 1 !! 00000803 0012 LFA 0 !! 00000804 0c19 ST L[12] else !! 00000805 07b3 0000 JMP 0x00080c correct_x_val = x_o[in]; !! 00000807 450c LDA G[69] !! 00000808 0b0b PL L[11] !! 00000809 01c1 AIX 1 !! 0000080a 0012 LFA 0 !! 0000080b 0c19 ST L[12] end; if(first_pass == 1) !! 0000080c 0a07 LD L[10] !! 0000080d 015b EQ 1 first_pass = 0; !! 0000080e 08b4 0000 JF 0x000816 !! 00000810 0004 LD 0 !! 00000811 0a19 ST L[10] yi = correct_x_val; !! 00000812 0c07 LD L[12] !! 00000813 0919 ST L[9] else !! 00000814 0eb3 0000 JMP 0x000822 // operator is and for all problems, or for one if(one == 1) !! 00000816 0107 LD L[1] !! 00000817 015b EQ 1 yi = yi | correct_x_val; !! 00000818 07b4 0000 JF 0x00081f !! 0000081a 0907 LD L[9] !! 0000081b 0c52 OR L[12] !! 0000081c 0919 ST L[9] else !! 0000081d 05b3 0000 JMP 0x000822 yi = yi & correct_x_val; !! 0000081f 0907 LD L[9] !! 00000820 0c4c AND L[12] !! 00000821 0919 ST L[9] end; end; wait(3); !! 00000822 0304 LD 3 !! 00000823 96fc WAIT if(correct_x_val == 1) !! 00000824 0c07 LD L[12] !! 00000825 015b EQ 1 if(forth == 1) !! 00000826 1eb4 0000 JF 0x000844 !! 00000828 0207 LD L[2] !! 00000829 015b EQ 1 flow_graph_ui_lines[i, in].settext("Property occurs after block %d, at input of block %d? Yes", i, in); !! 0000082a 0eb4 0000 JF 0x000838 !! 0000082c 0b07 LD L[11] !! 0000082d 070b PL L[7] !! 0000082e 839f PLCS 131 !! 0000082f 3f0f PLA G[63] !! 00000830 070b PL L[7] !! 00000831 0b0b PL L[11] !! 00000832 02c1 AIX 2 !! 00000833 0012 LFA 0 !! 00000834 43fd 0002 SETTEXT 2 else !! 00000836 28b3 0000 JMP 0x00085e flow_graph_ui_lines[in, i].settext("Property occurs before block %d, at output of block %d? Yes", i, in); !! 00000838 0b07 LD L[11] !! 00000839 070b PL L[7] !! 0000083a 929f PLCS 146 !! 0000083b 3f0f PLA G[63] !! 0000083c 0b0b PL L[11] !! 0000083d 070b PL L[7] !! 0000083e 02c1 AIX 2 !! 0000083f 0012 LFA 0 !! 00000840 43fd 0002 SETTEXT 2 end; else !! 00000842 1cb3 0000 JMP 0x00085e if(forth == 1) !! 00000844 0207 LD L[2] !! 00000845 015b EQ 1 flow_graph_ui_lines[i, in].settext("Property occurs after block %d, at input of block %d? No", i, in); !! 00000846 0eb4 0000 JF 0x000854 !! 00000848 0b07 LD L[11] !! 00000849 070b PL L[7] !! 0000084a a19f PLCS 161 !! 0000084b 3f0f PLA G[63] !! 0000084c 070b PL L[7] !! 0000084d 0b0b PL L[11] !! 0000084e 02c1 AIX 2 !! 0000084f 0012 LFA 0 !! 00000850 43fd 0002 SETTEXT 2 else !! 00000852 0cb3 0000 JMP 0x00085e flow_graph_ui_lines[in, i].settext("Property occurs before block %d, at output of block %d? No", i, in); !! 00000854 0b07 LD L[11] !! 00000855 070b PL L[7] !! 00000856 b09f PLCS 176 !! 00000857 3f0f PLA G[63] !! 00000858 0b0b PL L[11] !! 00000859 070b PL L[7] !! 0000085a 02c1 AIX 2 !! 0000085b 0012 LFA 0 !! 0000085c 43fd 0002 SETTEXT 2 end; end; wait(3); !! 0000085e 0304 LD 3 !! 0000085f 96fc WAIT if(forth == 1) !! 00000860 0207 LD L[2] !! 00000861 015b EQ 1 flow_graph_ui_lines[i, in].settext(""); !! 00000862 12b4 0000 JF 0x000874 !! 00000864 019b LDCS 1 !! 00000865 3f0f PLA G[63] !! 00000866 070b PL L[7] !! 00000867 0b0b PL L[11] !! 00000868 02c1 AIX 2 !! 00000869 0012 LFA 0 !! 0000086a 43fc SETTEXT flow_graph_ui_lines[i, in].setpen(graypen); !! 0000086b 2005 LD G[32] !! 0000086c 3f0f PLA G[63] !! 0000086d 070b PL L[7] !! 0000086e 0b0b PL L[11] !! 0000086f 02c1 AIX 2 !! 00000870 0012 LFA 0 !! 00000871 34fc SETPEN else !! 00000872 10b3 0000 JMP 0x000882 flow_graph_ui_lines[in, i].settext(""); !! 00000874 019b LDCS 1 !! 00000875 3f0f PLA G[63] !! 00000876 0b0b PL L[11] !! 00000877 070b PL L[7] !! 00000878 02c1 AIX 2 !! 00000879 0012 LFA 0 !! 0000087a 43fc SETTEXT flow_graph_ui_lines[in, i].setpen(graypen); !! 0000087b 2005 LD G[32] !! 0000087c 3f0f PLA G[63] !! 0000087d 0b0b PL L[11] !! 0000087e 070b PL L[7] !! 0000087f 02c1 AIX 2 !! 00000880 0012 LFA 0 !! 00000881 34fc SETPEN end; end; end; !! 00000882 0b7d INC1 L[11] !! 00000883 0465 LT 4 !! 00000884 36b5 ffff JT 0x0007ba // update ui based on the yi result if(forth == 1) !! 00000886 0207 LD L[2] !! 00000887 015b EQ 1 x_o[i] = yi; !! 00000888 32b4 0000 JF 0x0008ba !! 0000088a 450c LDA G[69] !! 0000088b 070b PL L[7] !! 0000088c 01c1 AIX 1 !! 0000088d 090b PL L[9] !! 0000088e 001a STAA prop_table_ui[prop_index + 1, i].settext("%d", x_o[i]); !! 0000088f 450c LDA G[69] !! 00000890 070b PL L[7] !! 00000891 01c1 AIX 1 !! 00000892 0012 LFA 0 !! 00000893 509f PLCS 80 !! 00000894 310f PLA G[49] !! 00000895 000b PL L[0] !! 00000896 011f ADD 1 !! 00000897 070b PL L[7] !! 00000898 02c1 AIX 2 !! 00000899 0012 LFA 0 !! 0000089a 43fd 0001 SETTEXT 1 dfa_results[prop_index + 1, i] = x_o[i]; !! 0000089c 320c LDA G[50] !! 0000089d 000b PL L[0] !! 0000089e 011f ADD 1 !! 0000089f 070b PL L[7] !! 000008a0 02c1 AIX 2 !! 000008a1 450f PLA G[69] !! 000008a2 070b PL L[7] !! 000008a3 01c1 AIX 1 !! 000008a4 0012 LFA 0 !! 000008a5 001a STAA if(yi == 1) !! 000008a6 0907 LD L[9] !! 000008a7 015b EQ 1 str_prop_out[i].settext("[Property present]"); !! 000008a8 0ab4 0000 JF 0x0008b2 !! 000008aa 629b LDCS 98 !! 000008ab 380f PLA G[56] !! 000008ac 070b PL L[7] !! 000008ad 01c1 AIX 1 !! 000008ae 0012 LFA 0 !! 000008af 43fc SETTEXT else !! 000008b0 36b3 0000 JMP 0x0008e6 str_prop_out[i].settext("[Property absent]"); !! 000008b2 5d9b LDCS 93 !! 000008b3 380f PLA G[56] !! 000008b4 070b PL L[7] !! 000008b5 01c1 AIX 1 !! 000008b6 0012 LFA 0 !! 000008b7 43fc SETTEXT end; else !! 000008b8 2eb3 0000 JMP 0x0008e6 x[i] = yi; !! 000008ba 440c LDA G[68] !! 000008bb 070b PL L[7] !! 000008bc 01c1 AIX 1 !! 000008bd 090b PL L[9] !! 000008be 001a STAA prop_table_ui[prop_index, i].settext("%d", x[i]); !! 000008bf 440c LDA G[68] !! 000008c0 070b PL L[7] !! 000008c1 01c1 AIX 1 !! 000008c2 0012 LFA 0 !! 000008c3 509f PLCS 80 !! 000008c4 310f PLA G[49] !! 000008c5 000b PL L[0] !! 000008c6 070b PL L[7] !! 000008c7 02c1 AIX 2 !! 000008c8 0012 LFA 0 !! 000008c9 43fd 0001 SETTEXT 1 dfa_results[prop_index, i] = x[i]; !! 000008cb 320c LDA G[50] !! 000008cc 000b PL L[0] !! 000008cd 070b PL L[7] !! 000008ce 02c1 AIX 2 !! 000008cf 440f PLA G[68] !! 000008d0 070b PL L[7] !! 000008d1 01c1 AIX 1 !! 000008d2 0012 LFA 0 !! 000008d3 001a STAA if(yi == 1) !! 000008d4 0907 LD L[9] !! 000008d5 015b EQ 1 str_prop_in[i].settext("[Property present]"); !! 000008d6 0ab4 0000 JF 0x0008e0 !! 000008d8 629b LDCS 98 !! 000008d9 370f PLA G[55] !! 000008da 070b PL L[7] !! 000008db 01c1 AIX 1 !! 000008dc 0012 LFA 0 !! 000008dd 43fc SETTEXT else !! 000008de 08b3 0000 JMP 0x0008e6 str_prop_in[i].settext("[Property absent]"); !! 000008e0 5d9b LDCS 93 !! 000008e1 370f PLA G[55] !! 000008e2 070b PL L[7] !! 000008e3 01c1 AIX 1 !! 000008e4 0012 LFA 0 !! 000008e5 43fc SETTEXT end; end; // if the anti-event does not occur, and the property is present // after this point, then its present at this point. // (t_la = transparent, live-after) int t_la = 0; !! 000008e6 0004 LD 0 !! 000008e7 0d19 ST L[13] if((ae[i] == 0) && (yi != 0)) !! 000008e8 030e LDA L[3] !! 000008e9 070b PL L[7] !! 000008ea 01c1 AIX 1 !! 000008eb 0012 LFA 0 !! 000008ec 07b5 0000 JT 0x0008f3 !! 000008ee 0907 LD L[9] !! 000008ef 04b4 0000 JF 0x0008f3 t_la = 1; !! 000008f1 0104 LD 1 !! 000008f2 0d19 ST L[13] end; new_xi = new_xi | t_la; !! 000008f3 0807 LD L[8] !! 000008f4 0d52 OR L[13] !! 000008f5 0819 ST L[8] if(new_xi == 1) !! 000008f6 015b EQ 1 if(forth == 1) !! 000008f7 16b4 0000 JF 0x00090d !! 000008f9 0207 LD L[2] !! 000008fa 015b EQ 1 str_prop_in[i].settext("[Property present]"); !! 000008fb 0ab4 0000 JF 0x000905 !! 000008fd 629b LDCS 98 !! 000008fe 370f PLA G[55] !! 000008ff 070b PL L[7] !! 00000900 01c1 AIX 1 !! 00000901 0012 LFA 0 !! 00000902 43fc SETTEXT else !! 00000903 1cb3 0000 JMP 0x00091f str_prop_out[i].settext("[Property present]"); !! 00000905 629b LDCS 98 !! 00000906 380f PLA G[56] !! 00000907 070b PL L[7] !! 00000908 01c1 AIX 1 !! 00000909 0012 LFA 0 !! 0000090a 43fc SETTEXT end; else !! 0000090b 14b3 0000 JMP 0x00091f if(forth == 1) !! 0000090d 0207 LD L[2] !! 0000090e 015b EQ 1 str_prop_in[i].settext("[Property absent]"); !! 0000090f 0ab4 0000 JF 0x000919 !! 00000911 5d9b LDCS 93 !! 00000912 370f PLA G[55] !! 00000913 070b PL L[7] !! 00000914 01c1 AIX 1 !! 00000915 0012 LFA 0 !! 00000916 43fc SETTEXT else !! 00000917 08b3 0000 JMP 0x00091f str_prop_out[i].settext("[Property absent]"); !! 00000919 5d9b LDCS 93 !! 0000091a 380f PLA G[56] !! 0000091b 070b PL L[7] !! 0000091c 01c1 AIX 1 !! 0000091d 0012 LFA 0 !! 0000091e 43fc SETTEXT end; end; if(forth == 1) !! 0000091f 0207 LD L[2] !! 00000920 015b EQ 1 if(new_xi != x[i]) !! 00000921 2bb4 0000 JF 0x00094c !! 00000923 0807 LD L[8] !! 00000924 440f PLA G[68] !! 00000925 070b PL L[7] !! 00000926 01c1 AIX 1 !! 00000927 0012 LFA 0 !! 00000928 0064 NEQ finished = 0; !! 00000929 4cb4 0000 JF 0x000975 !! 0000092b 0004 LD 0 !! 0000092c 0519 ST L[5] fbox.settext("Finished = false"); !! 0000092d bf9b LDCS 191 !! 0000092e 3309 PL G[51] !! 0000092f 43fc SETTEXT x[i] = new_xi; !! 00000930 440c LDA G[68] !! 00000931 070b PL L[7] !! 00000932 01c1 AIX 1 !! 00000933 080b PL L[8] !! 00000934 001a STAA prop_table_ui[prop_index, i].settext("%d", x[i]); !! 00000935 440c LDA G[68] !! 00000936 070b PL L[7] !! 00000937 01c1 AIX 1 !! 00000938 0012 LFA 0 !! 00000939 509f PLCS 80 !! 0000093a 310f PLA G[49] !! 0000093b 000b PL L[0] !! 0000093c 070b PL L[7] !! 0000093d 02c1 AIX 2 !! 0000093e 0012 LFA 0 !! 0000093f 43fd 0001 SETTEXT 1 dfa_results[prop_index, i] = x[i]; !! 00000941 320c LDA G[50] !! 00000942 000b PL L[0] !! 00000943 070b PL L[7] !! 00000944 02c1 AIX 2 !! 00000945 440f PLA G[68] !! 00000946 070b PL L[7] !! 00000947 01c1 AIX 1 !! 00000948 0012 LFA 0 !! 00000949 001a STAA end; else !! 0000094a 2bb3 0000 JMP 0x000975 if(new_xi != x_o[i]) !! 0000094c 0807 LD L[8] !! 0000094d 450f PLA G[69] !! 0000094e 070b PL L[7] !! 0000094f 01c1 AIX 1 !! 00000950 0012 LFA 0 !! 00000951 0064 NEQ finished = 0; !! 00000952 23b4 0000 JF 0x000975 !! 00000954 0004 LD 0 !! 00000955 0519 ST L[5] fbox.settext("Finished = false"); !! 00000956 bf9b LDCS 191 !! 00000957 3309 PL G[51] !! 00000958 43fc SETTEXT x_o[i] = new_xi; !! 00000959 450c LDA G[69] !! 0000095a 070b PL L[7] !! 0000095b 01c1 AIX 1 !! 0000095c 080b PL L[8] !! 0000095d 001a STAA prop_table_ui[prop_index + 1, i].settext("%d", x_o[i]); !! 0000095e 450c LDA G[69] !! 0000095f 070b PL L[7] !! 00000960 01c1 AIX 1 !! 00000961 0012 LFA 0 !! 00000962 509f PLCS 80 !! 00000963 310f PLA G[49] !! 00000964 000b PL L[0] !! 00000965 011f ADD 1 !! 00000966 070b PL L[7] !! 00000967 02c1 AIX 2 !! 00000968 0012 LFA 0 !! 00000969 43fd 0001 SETTEXT 1 dfa_results[prop_index + 1, i] = x_o[i]; !! 0000096b 320c LDA G[50] !! 0000096c 000b PL L[0] !! 0000096d 011f ADD 1 !! 0000096e 070b PL L[7] !! 0000096f 02c1 AIX 2 !! 00000970 450f PLA G[69] !! 00000971 070b