# Author: Paul Fitzpatrick, paulfitz@ai.mit.edu # Copyright (c) 2004 Paul Fitzpatrick # # This file is part of CosmicOS. # # CosmicOS is free software; you can redistribute it and / or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # CosmicOS is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with CosmicOS; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # MATH introduce numbers (in unary notation) # Here we count up, then count down, then go through primes, etc. # There is a bunch of syntax around the numbers, but that # can just be treated as noise at this point - it doesn't matter. # Any 'words' written here are converted to arbitrary integers # in the actual message. Any word ending in -in-unary will be given # in unary rather than the binary code used in the main body # of the message - this is simpler to start with. 010 010; 010 0110; 010 01110; 010 011110; 010 0111110; 010 01111110; 010 011111110; 010 0111111110; 010 01111111110; 010 011111111110; 010 0111111111110; 010 01111111111110; 010 011111111111110; 010 0111111111111110; 010 01111111111111110; 010 011111111111111110; 010 0111111111111111110; 010 01111111111111111110; 010 011111111111111111110; 010 0111111111111111111110; 010 01111111111111111111110; 010 011111111111111111111110; 010 0111111111111111111111110; 010 01111111111111111111111110; 010 011111111111111111111111110; 010 0111111111111111111111111110; 010 01111111111111111111111111110; 010 0111111111111111111111111110; 010 011111111111111111111111110; 010 01111111111111111111111110; 010 0111111111111111111111110; 010 011111111111111111111110; 010 01111111111111111111110; 010 0111111111111111111110; 010 011111111111111111110; 010 01111111111111111110; 010 0111111111111111110; 010 011111111111111110; 010 01111111111111110; 010 0111111111111110; 010 011111111111110; 010 01111111111110; 010 0111111111110; 010 011111111110; 010 01111111110; 010 0111111110; 010 011111110; 010 01111110; 010 0111110; 010 011110; 010 01110; 010 0110; 010 010; 010 0110; 010 01110; 010 0111110; 010 011111110; 010 0111111111110; 010 011111111111110; 010 0111111111111111110; 010 011111111111111111110; 010 0111111111111111111111110; 010 010; 010 011110; 010 01111111110; 010 011111111111111110; 010 011111111111111111111111110; 010 010; 010 0111111110; 010 01111111111111111111111111110; # MATH introduce equality for unary numbers # The intro operator does nothing essential, and could be # omitted - it just tags the first use of a new operator. # The = operator is introduced alongside a duplication of # unary numbers. The meaning will not quite by nailed down # until we see other relational operators. 0110 010 010; 0110 0110 0110; 0110 01110 01110; 0110 011110 011110; 0110 0111110 0111110; 0110 01111110 01111110; 0110 011111110 011111110; 0110 0111111110 0111111110; 0110 010 010; 0110 01111110 01111110; 0110 0110 0110; # MATH now introduce other relational operators # After this lesson, it should be clear what contexts # < > and = are appropriate in. 01110 01111110 0110; 01110 0110 00; 01110 010 00; 01110 01110 010; 01110 010 00; 01110 011110 00; 01110 010 00; 01110 0110 00; 01110 010 00; 01110 01111110 00; 01110 0110 00; 011110 0110 011110; 011110 00 01111110; 011110 01110 01111110; 011110 00 01110; 011110 0110 011110; 011110 00 0110; 011110 0110 011110; 011110 010 01110; 011110 0110 01111110; 011110 0110 0111110; 011110 00 0111110; # drive the lesson home 0110 00 00; 011110 00 010; 011110 00 0110; 01110 010 00; 0110 010 010; 011110 010 0110; 01110 0110 00; 01110 0110 010; 0110 0110 0110; # switch to binary labelling 2 00 00; 4 00 010; 4 00 0110; 3 010 00; 2 010 010; 4 010 0110; 3 0110 00; 3 0110 010; 2 0110 0110; # a few more random examples 3 0111110 010; 3 0111110 0110; 3 0111110 010; 3 011110 00; 4 0110 011110; 4 0110 01110; 4 010 01110; 4 011110 0111110; 4 00 0111110; 4 01110 011110; 4 010 01110; # MATH introduce the NOT logical operator 1 8; 2 01110 01110; 8 -1 4 01110 01110; 8 -1 3 01110 01110; 2 010 010; 8 -1 4 010 010; 8 -1 3 010 010; 2 0110 0110; 8 -1 4 0110 0110; 8 -1 3 0110 0110; 2 011110 011110; 8 -1 4 011110 011110; 8 -1 3 011110 011110; 2 01110 01110; 8 -1 4 01110 01110; 8 -1 3 01110 01110; 2 0110 0110; 8 -1 4 0110 0110; 8 -1 3 0110 0110; 8 -1 2 01110 011110; 4 01110 011110; 8 -1 3 01110 011110; 8 -1 2 0111110 0111111110; 4 0111110 0111111110; 8 -1 3 0111110 0111111110; 8 -1 2 0110 011110; 4 0110 011110; 8 -1 3 0110 011110; 8 -1 2 00 010; 4 00 010; 8 -1 3 00 010; 8 -1 2 00 01110; 4 00 01110; 8 -1 3 00 01110; 8 -1 2 00 0110; 4 00 0110; 8 -1 3 00 0110; 8 -1 2 0110 00; 3 0110 00; 8 -1 4 0110 00; 8 -1 2 0111110 01110; 3 0111110 01110; 8 -1 4 0111110 01110; 8 -1 2 01111110 011110; 3 01111110 011110; 8 -1 4 01111110 011110; 8 -1 2 011110 01110; 3 011110 01110; 8 -1 4 011110 01110; 8 -1 2 011111110 0111110; 3 011111110 0111110; 8 -1 4 011111110 0111110; 8 -1 2 0111111110 0111110; 3 0111111110 0111110; 8 -1 4 0111111110 0111110; # MATH introduce the AND logical operator 1 13; 13 (2 0110 0110) (2 01110 01110); 13 (3 0111110 0110) (3 0111110 011110); 13 (2 0111110 0111110) (2 011110 011110); 13 (4 00 010) (2 0111110 0111110); 13 (3 011110 01110) (2 011110 011110); 13 (4 0111110 0111111110) (4 010 01110); 13 (3 01111110 0111110) (3 011111110 0111110); 13 (3 0111110 01110) (3 011111110 011110); 13 (4 01110 011110) (2 010 010); 13 (4 0111110 01111110) (2 00 00); 8 -1 13 (3 011110 010) (3 010 011110); 8 -1 13 (4 0110 011110) (2 0110 0111110); 8 -1 13 (4 0111110 011111110) (2 010 00); 8 -1 13 (3 011110 01110) (4 0111110 0110); 8 -1 13 (2 0110 0110) (3 010 010); 8 -1 13 (4 0111110 01110) (3 011111110 011110); 8 -1 13 (3 00 010) (4 01110 0111110); 8 -1 13 (4 0111110 0110) (3 0111110 01110); 8 -1 13 (4 01111110 011110) (2 011110 011110); 8 -1 13 (4 01110 0110) (3 01111110 011110); 8 -1 13 (4 0110 010) (2 0110 00); 8 -1 13 (3 010 010) (4 011110 00); 8 -1 13 (4 01111110 0110) (3 011110 0111110); 8 -1 13 (4 0111110 0110) (2 0111110 00); 8 -1 13 (3 01110 01110) (3 010 0111110); 13 (4 01110 0111110) (4 010 01110); 13 (3 01110 010) (4 0110 011110); 8 -1 13 (4 00 01110) (2 011110 00); 8 -1 13 (2 00 0111110) (3 010 010); 8 -1 13 (4 01111110 010) (3 01110 00); 8 -1 13 (2 011110 011110) (3 0110 0110); 13 (4 0111110 011111110) (2 011110 011110); 8 -1 13 (3 011110 0110) (3 00 01111110); 8 -1 13 (3 01110 00) (2 011110 0110); 8 -1 13 (2 011110 0110) (2 011110 01110); # MATH introduce the OR logical operator 1 14; 14 (4 011110 0111110) (3 011111110 0111110); 14 (2 01110 01110) (4 0111110 011111110); 14 (4 00 010) (3 011110 010); 14 (2 00 00) (4 011110 0111110); 14 (2 0111110 0111110) (2 0110 0110); 14 (2 00 00) (2 00 00); 14 (4 010 01110) (3 01111110 0111110); 14 (2 010 010) (3 01111110 011110); 14 (3 01110 00) (3 011111110 011110); 14 (4 010 0110) (3 01110 0110); 14 (3 0111110 0110) (2 00 010); 14 (4 01110 01111110) (2 0110 010); 14 (2 0111110 0111110) (2 01110 0110); 14 (4 011110 011111110) (4 0111110 011110); 14 (2 01110 01110) (3 00 011110); 14 (2 0111110 00) (4 011110 01111110); 14 (4 011110 01110) (2 0110 0110); 14 (4 011110 00) (4 00 0110); 14 (4 0111110 01110) (2 00 00); 14 (2 0111110 011110) (3 010 00); 8 -1 14 (3 0110 01111110) (2 01110 010); 8 -1 14 (2 01110 011110) (4 01111110 011110); 8 -1 14 (3 00 0111110) (3 01111110 01111110); 8 -1 14 (3 010 0111110) (2 011110 01110); 8 -1 14 (2 0110 010) (3 01110 011110); 14 (2 011110 011110) (2 0111110 0111110); 14 (4 01111110 00) (3 0111110 0110); 8 -1 14 (3 010 01110) (4 0111110 00); 14 (4 01111110 011110) (2 010 010); 14 (3 0110 01111110) (2 0111110 0111110); 8 -1 14 (3 0110 0110) (3 010 0110); 14 (3 011110 0111110) (4 0111110 01111110); 14 (2 01110 01110) (4 0111110 0111111110); 14 (4 01110 010) (2 01110 01110); 14 (4 010 00) (2 011110 011110); # MATH use equality for truth values 2 (2 00 00) (2 011110 011110); 2 (2 0110 0110) (3 0111110 01110); 2 (2 0111110 0111110) (4 0110 0111110); 2 (3 0111110 0110) (2 011110 011110); 2 (4 0110 01110) (3 01110 010); 2 (3 00 00) (2 0110 01110); 2 (4 0111110 01110) (4 01110 00); 2 (2 01110 00) (2 01110 0110); 2 (2 0110 010) (4 01110 010); 2 (3 010 01110) (4 01111110 00); 8 -1 2 (3 0111110 01111110) (3 011110 0110); 8 -1 2 (2 010 0110) (4 010 01110); 8 -1 2 (3 0110 0111110) (3 0111110 011110); 8 -1 2 (3 011110 0111110) (4 011110 01111110); 8 -1 2 (4 0111110 01110) (4 010 01110); 8 -1 2 (2 011110 011110) (3 0110 011110); 8 -1 2 (4 00 0110) (3 00 011110); 8 -1 2 (4 010 01110) (4 0111110 010); 8 -1 2 (4 00 01110) (2 0110 01110); 8 -1 2 (3 0111110 01110) (2 0110 0111110); 1 16; 1 15; 2 (16) (3 010 00); 2 (16) (4 01110 01111110); 2 (16) (4 0110 0111110); 2 (16) (3 01110 00); 2 (16) (3 011111110 011110); 2 (2 010 010) (16); 2 (4 01110 011110) (16); 2 (3 01111110 0111110) (16); 2 (4 011110 011111110) (16); 2 (4 0111110 0111111110) (16); 2 (15) (3 01110 0111110); 2 (15) (2 011110 010); 2 (15) (4 01110 010); 2 (15) (2 01110 011110); 2 (15) (3 00 00); 2 (4 010 00) (15); 2 (2 01110 0110) (15); 2 (3 010 011110) (15); 2 (2 0110 010) (15); 2 (2 0110 0111110) (15); 2 (16) (16); 2 (15) (15); 8 -1 2 (16) (15); 8 -1 2 (15) (16); # MATH introduce addition 1 5; 2 0110 -1 5 010 010; 2 01110 -1 5 010 0110; 2 010 -1 5 010 00; 2 011110 -1 5 010 01110; 2 011110 -1 5 011110 00; 2 0110 -1 5 0110 00; 2 011110 -1 5 00 011110; 2 01110 -1 5 010 0110; 2 0110 -1 5 00 0110; 2 010 -1 5 00 010; # MATH introduce subtraction 1 7; 2 010 -1 7 010 00; 2 010 -1 7 011110 01110; 2 0110 -1 7 011110 0110; 2 00 -1 7 011110 011110; 2 011110 -1 7 0111110 010; 2 010 -1 7 0110 010; 2 010 -1 7 01110 0110; 2 011110 -1 7 0111111110 011110; 2 011110 -1 7 011111110 01110; 2 010 -1 7 01110 0110; # MATH introduce multiplication 1 6; 2 00 -1 6 00 00; 2 00 -1 6 00 010; 2 00 -1 6 00 0110; 2 00 -1 6 00 01110; 2 00 -1 6 010 00; 2 010 -1 6 010 010; 2 0110 -1 6 010 0110; 2 01110 -1 6 010 01110; 2 00 -1 6 0110 00; 2 0110 -1 6 0110 010; 2 011110 -1 6 0110 0110; 2 01111110 -1 6 0110 01110; 2 00 -1 6 01110 00; 2 01110 -1 6 01110 010; 2 01111110 -1 6 01110 0110; 2 01111111110 -1 6 01110 01110; 2 011110 -1 6 0110 0110; 2 01111111110 -1 6 01110 01110; 2 01111111110 -1 6 01110 01110; 2 01110 -1 6 010 01110; 2 00 -1 6 010 00; 2 011110 -1 6 0110 0110; 2 00 -1 6 00 010; 2 00 -1 6 01110 00; 2 0110 -1 6 010 0110; 2 00 -1 6 01110 00; # MATH introduce a simple form of binary notation # After this lesson, in the higher-level version of the message, # will expand decimal to stand for the binary notation given. # It wouldn't be hard to accompany this lesson with a more # formal definition once functions are introduced (below) # so maybe the transition to binary shouldbe delayed? 2 00 (.); 2 010 (:); 2 0110 (:.); 2 01110 (::); 2 011110 (:..); 2 0111110 (:.:); 2 01111110 (::.); 2 011111110 (:::); 2 0111111110 (:...); 2 01111111110 (:..:); 2 011111111110 (:.:.); 2 0111111111110 (:.::); 2 01111111111110 (::..); 2 011111111111110 (::.:); 2 0111111111111110 (:::.); 2 01111111111111110 (::::); 2 (::.) 01111110; 2 (:::) 011111110; 2 (:::.) 0111111111111110; 2 (.) 00; 2 (:) 010; 2 (:..) 011110; 2 (:) 010; 2 (::..) 01111111111110; 2 (:::) 011111110; 2 (::::) 01111111111111110; 2 (:::) 011111110; 2 (:...) 0111111110; 2 (::::) 01111111111111110; 2 (::.) 01111110; 2 (:.:) 0111110; 2 (:...) 0111111110; 2 (:...) -1 5 (:...) (.); 2 (:.::) -1 5 (::) (:...); 2 (:::) -1 5 (:::) (.); 2 (:..::) -1 5 (:.:.) (:..:); 2 (:..:) -1 5 (:) (:...); 2 (:.::.) -1 5 (::..) (:.:.); 2 (:..::) -1 5 (:.::) (:...); 2 (::..) -1 5 (:..:) (::); 2 (::::.) -1 6 (:.:) (::.); 2 (::.:.) -1 6 (::.:) (:.); 2 (::::..) -1 6 (::.) (:.:.); 2 (::::::) -1 6 (:::) (:..:); 2 (:....:) -1 6 (::) (:.::); 2 (::..:) -1 6 (:.:) (:.:); 2 (:...) -1 6 (:..) (:.); 2 (:.::.:.) -1 6 (::.) (::::); # MATH show local assignment 11 20 0 -1 2 (20) 0; 11 20 1 -1 2 (20) 1; 11 20 2 -1 2 (20) 2; 11 21 0 -1 2 (21) 0; 11 21 1 -1 2 (21) 1; 11 21 2 -1 2 (21) 2; 11 22 0 -1 2 (22) 0; 11 22 1 -1 2 (22) 1; 11 22 2 -1 2 (22) 2; 2 0 (11 20 0 (20)); 2 0 (11 20 0 -1 20); 2 0 -1 11 20 0 -1 20; 2 20 -1 11 20 0 20; 2 5 -1 11 20 0 5; 2 5 -1 11 20 0 -1 11 23 5 -1 23; 2 23 -1 11 20 0 -1 11 23 5 23; 2 1 (11 20 1 (20)); 2 1 (11 20 1 -1 20); 2 1 -1 11 20 1 -1 20; 2 20 -1 11 20 1 20; 2 5 -1 11 20 1 5; 2 5 -1 11 20 1 -1 11 23 5 -1 23; 2 23 -1 11 20 1 -1 11 23 5 23; 2 2 (11 20 2 (20)); 2 2 (11 20 2 -1 20); 2 2 -1 11 20 2 -1 20; 2 20 -1 11 20 2 20; 2 5 -1 11 20 2 5; 2 5 -1 11 20 2 -1 11 23 5 -1 23; 2 23 -1 11 20 2 -1 11 23 5 23; 2 0 (11 21 0 (21)); 2 0 (11 21 0 -1 21); 2 0 -1 11 21 0 -1 21; 2 21 -1 11 21 0 21; 2 5 -1 11 21 0 5; 2 5 -1 11 21 0 -1 11 23 5 -1 23; 2 23 -1 11 21 0 -1 11 23 5 23; 2 1 (11 21 1 (21)); 2 1 (11 21 1 -1 21); 2 1 -1 11 21 1 -1 21; 2 21 -1 11 21 1 21; 2 5 -1 11 21 1 5; 2 5 -1 11 21 1 -1 11 23 5 -1 23; 2 23 -1 11 21 1 -1 11 23 5 23; 2 2 (11 21 2 (21)); 2 2 (11 21 2 -1 21); 2 2 -1 11 21 2 -1 21; 2 21 -1 11 21 2 21; 2 5 -1 11 21 2 5; 2 5 -1 11 21 2 -1 11 23 5 -1 23; 2 23 -1 11 21 2 -1 11 23 5 23; 2 0 (11 22 0 (22)); 2 0 (11 22 0 -1 22); 2 0 -1 11 22 0 -1 22; 2 22 -1 11 22 0 22; 2 5 -1 11 22 0 5; 2 5 -1 11 22 0 -1 11 23 5 -1 23; 2 23 -1 11 22 0 -1 11 23 5 23; 2 1 (11 22 1 (22)); 2 1 (11 22 1 -1 22); 2 1 -1 11 22 1 -1 22; 2 22 -1 11 22 1 22; 2 5 -1 11 22 1 5; 2 5 -1 11 22 1 -1 11 23 5 -1 23; 2 23 -1 11 22 1 -1 11 23 5 23; 2 2 (11 22 2 (22)); 2 2 (11 22 2 -1 22); 2 2 -1 11 22 2 -1 22; 2 22 -1 11 22 2 22; 2 5 -1 11 22 2 5; 2 5 -1 11 22 2 -1 11 23 5 -1 23; 2 23 -1 11 22 2 -1 11 23 5 23; # Now for functions. 11 33 (0 28 5) -1 2 5 (33 2); 11 26 (0 24 5) -1 2 5 (26 3); 11 20 (0 21 6) -1 2 6 (20 2); 11 32 (0 31 6) -1 2 6 (32 3); 11 23 (0 21 (21)) -1 2 2 (23 2); 11 28 (0 35 (35)) -1 2 3 (28 3); 11 21 (0 37 (37)) -1 2 2 (21 2); 11 32 (0 27 (27)) -1 2 3 (32 3); 11 28 (0 37 -1 5 (37) 1) -1 2 3 (28 2); 11 35 (0 23 -1 5 (23) 1) -1 2 4 (35 3); 11 31 (0 25 -1 5 (25) 1) -1 2 3 (31 2); 11 31 (0 21 -1 5 (21) 1) -1 2 4 (31 3); 11 36 (0 37 -1 5 (37) 8) -1 2 (36 15) 23; 2 ((0 37 -1 5 (37) 8) 15) 23; 11 36 (0 37 -1 5 (37) 4) -1 2 (36 15) 19; 2 ((0 37 -1 5 (37) 4) 15) 19; 11 36 (0 37 -1 5 (37) 2) -1 2 (36 2) 4; 2 ((0 37 -1 5 (37) 2) 2) 4; 11 36 (0 37 -1 5 (37) 15) -1 2 (36 5) 20; 2 ((0 37 -1 5 (37) 15) 5) 20; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 (38 15 10) 151; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 ((38 15) 10) 151; 2 ((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 15 10) 151; 2 (((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 15) 10) 151; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 (38 5 12) 61; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 ((38 5) 12) 61; 2 ((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 5 12) 61; 2 (((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 5) 12) 61; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 (38 9 3) 28; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 ((38 9) 3) 28; 2 ((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 9 3) 28; 2 (((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 9) 3) 28; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 (38 12 12) 145; 11 38 (0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) -1 2 ((38 12) 12) 145; 2 ((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 12 12) 145; 2 (((0 37 -1 0 36 -1 5 1 -1 6 (37) (36)) 12) 12) 145; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 14 10 24; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 5 11 16; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 1 3 4; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 7 9 16; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 15 7 22; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 12 7 19; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 8 4 12; 11 39 (0 37 -1 0 36 -1 0 38 -1 2 (38) -1 5 (37) (36)) -1 39 12 4 16; # MATH demonstrate existence of memory 17 40 42; 2 42 (40); # now introduce a function 11 41 (0 37 -1 6 (37) (37)) -1 2 25 (41 5); 11 41 (0 37 -1 6 (37) (37)) -1 2 0 (41 0); 11 41 (0 37 -1 6 (37) (37)) -1 2 25 (41 5); 11 41 (0 37 -1 6 (37) (37)) -1 2 9 (41 3); # show that functions can be remembered across statements 17 41 -1 0 37 -1 6 (37) (37); 2 (41 5) 25; 2 (41 4) 16; 2 (41 9) 81; 2 (41 3) 9; 17 42 -1 0 37 -1 5 (37) 1; 2 (42 4) 5; 2 (42 9) 10; 2 (42 4) 5; 2 (42 3) 4; # MATH show mechanisms for branching 1 18; 2 (18 (3 4 1) 29 22) 29; 2 (18 (3 5 4) 24 28) 24; 2 (18 (3 4 4) 20 20) 20; 2 (18 (3 6 3) 28 28) 28; 2 (18 (4 5 6) 22 23) 22; 2 (18 (2 3 3) 25 20) 25; 2 (18 (4 1 2) 27 21) 27; 2 (18 (2 3 3) 25 25) 25; 17 43 -1 0 37 -1 0 36 -1 18 (3 (37) (36)) (37) (36); 17 44 -1 0 37 -1 0 36 -1 18 (4 (37) (36)) (37) (36); 2 0 (43 0 0); 2 0 (44 0 0); 2 1 (43 0 1); 2 0 (44 0 1); 2 2 (43 0 2); 2 0 (44 0 2); 2 1 (43 1 0); 2 0 (44 1 0); 2 1 (43 1 1); 2 1 (44 1 1); 2 2 (43 1 2); 2 1 (44 1 2); 2 2 (43 2 0); 2 0 (44 2 0); 2 2 (43 2 1); 2 1 (44 2 1); 2 2 (43 2 2); 2 2 (44 2 2); 17 45 -1 0 46 -1 18 (9 (46) 1) 1 -1 6 (46) -1 45 -1 7 (46) 1; 2 1 -1 45 1; 2 2 -1 45 2; 2 6 -1 45 3; 2 24 -1 45 4; 2 120 -1 45 5; # MATH illustrate pairs 11 37 (21 3 4) -1 2 (22 -1 37) 3; 11 37 (21 3 4) -1 2 (23 -1 37) 4; 11 37 (21 9 1) -1 2 (22 -1 37) 9; 11 37 (21 9 1) -1 2 (23 -1 37) 1; 11 37 (21 7 8) -1 2 (22 -1 37) 7; 11 37 (21 7 8) -1 2 (23 -1 37) 8; 11 37 (21 16 -1 21 6 13) -1 2 (22 -1 37) 16; 11 37 (21 16 -1 21 6 13) -1 2 (22 -1 23 -1 37) 6; 11 37 (21 16 -1 21 6 13) -1 2 (23 -1 23 -1 37) 13; 11 37 (21 14 -1 21 11 5) -1 2 (22 -1 37) 14; 11 37 (21 14 -1 21 11 5) -1 2 (22 -1 23 -1 37) 11; 11 37 (21 14 -1 21 11 5) -1 2 (23 -1 23 -1 37) 5; 11 37 (21 2 -1 21 9 7) -1 2 (22 -1 37) 2; 11 37 (21 2 -1 21 9 7) -1 2 (22 -1 23 -1 37) 9; 11 37 (21 2 -1 21 9 7) -1 2 (23 -1 23 -1 37) 7; 11 37 (21 1 -1 21 4 -1 21 3 -1 21 0 2) -1 13 (2 1 -1 22 -1 37) -1 13 (2 4 -1 22 -1 23 -1 37) -1 13 (2 3 -1 22 -1 23 -1 23 -1 37) -1 13 (2 0 -1 22 -1 23 -1 23 -1 23 -1 37) (2 2 -1 23 -1 23 -1 23 -1 23 -1 37); # MATH introduce mutable objects, and side-effects 1 27; 1 28; 1 29; 17 47 -1 27 0; 28 (47) 15; 2 (29 -1 47) 15; 28 (47) 5; 28 (47) 7; 2 (29 -1 47) 7; 17 48 -1 27 11; 2 (29 -1 48) 11; 28 (48) 22; 2 (29 -1 48) 22; 2 (29 -1 47) 7; 2 (5 (29 -1 47) (29 -1 48)) 29; 18 (2 (29 -1 47) 7) (28 (47) 88) (28 (47) 99); 2 (29 -1 47) 88; 18 (2 (29 -1 47) 7) (28 (47) 88) (28 (47) 99); 2 (29 -1 47) 99; # MATH illustrate lists and some list operators # to make list describable as a function, need to preceed lists # ... with an argument count # Lists keep an explicit record of their length # this is to avoid the need for using a special 'nil' symbol # ... which cannot itself be placed in the list. # # missing - intro to cons, car, cdr # used to be pure-cons pure-car pure-cdr but changed for better interface to scheme # also should introduce number? check function # 17 49 -1 0 46 -1 0 50 -1 18 (3 (46) 1) (0 37 -1 49 (7 (46) 1) (0 36 -1 0 38 -1 50 (5 1 (36)) (21 (37) (38)))) (0 37 -1 50 1 (37)); 17 51 -1 0 46 -1 18 (2 (46) 0) (21 0 0) (49 (46) (0 36 -1 0 38 -1 21 (36) (38))); 17 52 -1 0 53 -1 18 (2 (22 -1 53) 0) (32) (18 (2 (22 -1 53) 1) (23 -1 53) (22 -1 23 -1 53)); 17 54 -1 0 53 -1 18 (2 (22 -1 53) 0) (32) (18 (2 (22 -1 53) 1) (21 0 0) (21 (7 (22 -1 53) 1) (23 -1 23 -1 53))); 17 55 -1 0 53 -1 22 -1 53; 17 56 -1 0 53 -1 0 46 -1 18 (2 (56 -1 53) 0) (32) (18 (2 (46) 0) (52 -1 53) (56 (54 -1 53) (7 (46) 1))); 17 57 -1 0 37 -1 0 53 -1 18 (2 (55 -1 53) 0) (21 1 (37)) (21 (5 (55 -1 53) 1) (21 (37) (23 -1 53))); 17 58 -1 0 37 -1 0 36 -1 18 (2 (24 (37)) (24 (36))) (18 (24 (37)) (2 (37) (36)) (59 (37) (36))) (15); 17 59 -1 0 37 -1 0 36 -1 18 (2 (55 -1 37) (55 -1 36)) (18 (3 (55 -1 37) 0) (13 (58 (52 -1 37) (52 -1 36)) (59 (54 -1 37) (54 -1 36))) (16)) (15); 2 (55 -1 (51 5) 8 5 9 2 3) 5; 2 (55 -1 (51 0)) 0; 2 (55 -1 (51 4) 6 5 8 4) 4; 2 (55 -1 (51 8) 8 3 1 6 0 2 7 4) 8; 2 (55 -1 (51 1) 3) 1; 2 (52 -1 (51 8) 2 4 7 5 14 14 16 1) 2; 59 (54 -1 (51 8) 2 4 7 5 14 14 16 1) ((51 7) 4 7 5 14 14 16 1); 2 (52 -1 (51 9) 6 15 18 17 2 12 12 16 8) 6; 59 (54 -1 (51 9) 6 15 18 17 2 12 12 16 8) ((51 8) 15 18 17 2 12 12 16 8); 2 (52 -1 (51 2) 16 13) 16; 59 (54 -1 (51 2) 16 13) ((51 1) 13); 2 (52 -1 (51 8) 18 9 10 15 2 12 15 17) 18; 59 (54 -1 (51 8) 18 9 10 15 2 12 15 17) ((51 7) 9 10 15 2 12 15 17); 2 (52 -1 (51 2) 1 15) 1; 59 (54 -1 (51 2) 1 15) ((51 1) 15); 2 (52 -1 (51 10) 1 14 7 3 5 11 1 17 13 15) 1; 59 (54 -1 (51 10) 1 14 7 3 5 11 1 17 13 15) ((51 9) 14 7 3 5 11 1 17 13 15); 2 (52 -1 (51 4) 10 19 16 4) 10; 59 (54 -1 (51 4) 10 19 16 4) ((51 3) 19 16 4); 2 (52 -1 (51 1) 15) 15; 59 (54 -1 (51 1) 15) ((51 0)); 2 (52 -1 (51 8) 11 5 11 8 5 8 3 14) 11; 59 (54 -1 (51 8) 11 5 11 8 5 8 3 14) ((51 7) 5 11 8 5 8 3 14); 2 (52 -1 (51 5) 6 2 13 5 1) 6; 59 (54 -1 (51 5) 6 2 13 5 1) ((51 4) 2 13 5 1); 2 (56 ((51 1) 18) 0) 18; 2 (56 ((51 3) 3 15 16) 2) 16; 2 (56 ((51 5) 12 0 0 0 8) 0) 12; 2 (56 ((51 1) 3) 0) 3; 2 (56 ((51 2) 16 16) 0) 16; 2 (56 ((51 1) 0) 0) 0; 2 (56 ((51 2) 9 0) 1) 0; 2 (56 ((51 7) 11 5 7 19 9 18 2) 2) 7; 2 (56 ((51 3) 18 9 12) 1) 9; 2 (56 ((51 1) 0) 0) 0; 59 ((51 0)) ((51 0)); 59 ((51 1) 10) ((51 1) 10); 59 ((51 2) 12 8) ((51 2) 12 8); 59 ((51 3) 5 5 0) ((51 3) 5 5 0); 59 ((51 4) 4 10 12 11) ((51 4) 4 10 12 11); # this next batch of examples are a bit misleading, should streamline 8 -1 59 ((51 0)) ((51 1) 4); 8 -1 59 ((51 0)) ((51 1) 4); 8 -1 59 ((51 1) 5) ((51 2) 8 5); 8 -1 59 ((51 1) 5) ((51 2) 5 3); 8 -1 59 ((51 2) 11 15) ((51 3) 4 11 15); 8 -1 59 ((51 2) 11 15) ((51 3) 11 15 3); 8 -1 59 ((51 3) 11 19 16) ((51 4) 4 11 19 16); 8 -1 59 ((51 3) 11 19 16) ((51 4) 11 19 16 1); 8 -1 59 ((51 4) 14 18 5 11) ((51 5) 6 14 18 5 11); 8 -1 59 ((51 4) 14 18 5 11) ((51 5) 14 18 5 11 9); # some helpful functions 59 (57 6 ((51 0))) ((51 1) 6); 59 (57 6 ((51 1) 11)) ((51 2) 6 11); 59 (57 17 ((51 2) 11 4)) ((51 3) 17 11 4); 59 (57 18 ((51 3) 6 17 4)) ((51 4) 18 6 17 4); 59 (57 3 ((51 4) 8 11 1 10)) ((51 5) 3 8 11 1 10); 59 (57 7 ((51 5) 8 3 2 8 0)) ((51 6) 7 8 3 2 8 0); 59 (57 17 ((51 6) 14 15 14 19 9 3)) ((51 7) 17 14 15 14 19 9 3); 59 (57 17 ((51 7) 10 19 8 2 7 4 1)) ((51 8) 17 10 19 8 2 7 4 1); 17 60 -1 0 37 -1 0 36 -1 (51 2) (37) (36); 17 61 -1 0 53 -1 52 -1 53; 17 62 -1 0 53 -1 52 -1 54 -1 53; 59 (60 2 8) ((51 2) 2 8); 2 (61 -1 60 2 8) 2; 2 (62 -1 60 2 8) 8; 59 (60 6 0) ((51 2) 6 0); 2 (61 -1 60 6 0) 6; 2 (62 -1 60 6 0) 0; 59 (60 9 3) ((51 2) 9 3); 2 (61 -1 60 9 3) 9; 2 (62 -1 60 9 3) 3; 17 63 -1 0 53 -1 0 64 -1 0 65 -1 0 66 -1 18 (2 (55 -1 53) 0) (65 0) (18 (58 (52 -1 53) (64)) (66) (63 (54 -1 53) (64) (65) (5 (66) 1))); 17 67 -1 0 53 -1 0 64 -1 0 65 -1 63 (53) (64) (65) 0; 17 68 -1 0 37 100; 2 (67 ((51 1) 13) 13 (68)) 0; 2 (67 ((51 9) 15 17 16 12 3 15 2 4 13) 15 (68)) 0; 2 (67 ((51 9) 19 0 14 18 9 11 12 5 19) 11 (68)) 5; 2 (67 ((51 2) 15 1) 15 (68)) 0; 2 (67 ((51 4) 0 7 19 1) 7 (68)) 1; 2 (67 ((51 6) 9 9 1 10 5 19) 10 (68)) 3; 2 (67 ((51 2) 17 1) 1 (68)) 1; 2 (67 ((51 8) 0 3 16 13 19 13 18 11) 13 (68)) 3; 2 (67 ((51 4) 15 6 2 1) 1 (68)) 3; 2 (67 ((51 1) 3) 3 (68)) 0; 2 (67 ((51 4) 4 6 0 10) 1 (68)) 100; 2 (67 ((51 6) 5 7 8 16 1 0) 13 (68)) 100; 2 (67 ((51 8) 13 17 16 0 7 10 11 3) 15 (68)) 100; # HACK describe changes to the implicit interpreter to allow new special forms 17 69 -1 25; 17 25 -1 0 37 -1 18 (2 (37) 10) 15 (69 -1 37); 2 10 15; 2 (5 10 15) 30; 17 25 -1 69; 8 -1 2 10 15; 2 (5 10 15) 25; # now can create a special form for lists 17 25 -1 0 37 -1 18 (24 -1 37) (69 -1 37) (18 (2 (52 -1 37) 70) (25 -1 57 ((51 2) 51 (55 -1 54 -1 37)) (54 -1 37)) (69 -1 37)); 2 (70 1 2 3) ((51 3) 1 2 3); # now to desugar let expressions 17 71 -1 25; 17 72 -1 0 37 -1 0 73 -1 18 (2 (55 -1 37) 0) (25 -1 73) (72 (54 -1 37) (70 (70 0 (52 -1 52 -1 37) (73)) (52 -1 54 -1 52 -1 37))); 17 25 -1 0 37 -1 18 (24 -1 37) (71 -1 37) (18 (2 (52 -1 37) 74) (72 (52 -1 54 -1 37) (52 -1 54 -1 54 -1 37)) (71 -1 37)); 74 ((37 20)) (2 (37) 20); 74 ((37 50) (36 20)) (2 (7 (37) (36)) 30); # the is-list function is now on dubious ground # this stuff will be replaced with typing ASAP 17 75 -1 0 37 -1 8 -1 24 -1 37; 75 -1 (51 2) 1 3; 75 -1 (51 0); 8 -1 75 23; 75 -1 (51 3) ((51 2) 2 3) 1 (0 37 -1 5 (37) 10); # MATH introduce sugar for let # if would be good to introduce desugarings more rigorously, but for now... # ... just a very vague sketch 1 74; 2 (74 ((37 10)) (5 (37) 5)) ((0 37 -1 5 (37) 5) 10); 2 (74 ((37 10) (36 5)) (5 (37) (36))) (((0 37 -1 0 36 -1 5 (37) (36)) 10) 5); # MATH build up functions of several variables 2 ((0 37 -1 0 36 -1 7 (37) (36)) 7 4) 3; 2 ((0 37 -1 0 36 -1 7 (37) (36)) 12 8) 4; 2 ((0 37 -1 0 36 -1 7 (37) (36)) 12 8) 4; 2 ((0 37 -1 0 36 -1 7 (37) (36)) 8 2) 6; 2 ((0 37 -1 0 36 -1 7 (37) (36)) 14 5) 9; 17 76 -1 0 37 -1 56 (37) (7 (55 -1 37) 1); 17 77 -1 0 37 -1 18 (3 (55 -1 37) 1) (57 (52 -1 37) (77 -1 54 -1 37)) (70); # test last and except-last 2 15 (76 -1 70 4 5 15); 59 (70 4 5) (77 -1 70 4 5 15); 1 26; 17 78 -1 25; 17 25 -1 74 ((79 (78))) (0 37 -1 18 (24 -1 37) (79 -1 37) (18 (2 (52 -1 37) 26) (74 ((80 (52 -1 54 -1 37)) (73 (52 -1 54 -1 54 -1 37))) (18 (3 (55 -1 80) 0) (25 (70 26 (77 -1 80) (70 0 (76 -1 80) (73)))) (25 (73)))) (79 -1 37))); # test lambda 2 ((26 (37 36) (7 (37) (36))) 3 2) 1; 2 ((26 (37 36) (7 (37) (36))) 6 6) 0; 2 ((26 (37 36) (7 (37) (36))) 14 8) 6; 2 ((26 (37 36) (7 (37) (36))) 10 8) 2; 2 ((26 (37 36) (7 (37) (36))) 11 5) 6; 17 81 -1 26 (37 36) (18 (59 (36) (70)) (37) (81 ((37) (52 -1 36)) (54 -1 36))); 2 (81 (26 (37 36) (7 (37) (36))) (70 14 9)) 5; 2 (81 (26 (37 36) (7 (37) (36))) (70 3 3)) 0; 2 (81 (26 (37 36) (7 (37) (36))) (70 7 1)) 6; 2 (81 (26 (37 36) (7 (37) (36))) (70 9 4)) 5; 2 (81 (26 (37 36) (7 (37) (36))) (70 5 5)) 0; # MATH show map function for applying a function across the elements of a list 17 82 -1 26 (83 53) (18 (3 (55 -1 53) 0) (57 (83 (52 -1 53)) (82 (83) (54 -1 53))) (70)); 2 (82 (0 37 -1 6 (37) 2) (70 12 4 13)) (70 24 8 26); 2 (82 (0 37 -1 6 (37) 2) (70 7 15 19 14)) (70 14 30 38 28); 2 (82 (0 37 -1 6 (37) 2) (70 2 4 17 6 8)) (70 4 8 34 12 16); 2 (82 (0 37 -1 6 (37) 2) (70 15 18 17 10 16 4)) (70 30 36 34 20 32 8); 2 (82 (0 37 42) (70 1 19 5)) (70 42 42 42); 2 (82 (0 37 42) (70 8 9 10 3)) (70 42 42 42 42); 2 (82 (0 37 42) (70 6 12 11 13 8)) (70 42 42 42 42 42); 2 (82 (0 37 42) (70 1 7 10 0 18 9)) (70 42 42 42 42 42 42); 17 84 -1 26 (83 53) (18 (10 (55 -1 53) 2) (83 (52 -1 53) (84 (83) (54 -1 53))) (18 (2 (55 -1 53) 1) (52 -1 53) (32))); 2 (84 (5) (70 13 9 14)) 36; 2 (84 (5) (70 14 8 6 19)) 47; 2 (84 (5) (70 17 10 4 16 15)) 62; 2 (84 (5) (70 18 15 4 3 8 10)) 58; # NOTE end of part 1, start of part 2 # The following parts of the message are experimental, and not # carefully integrated with the main body 1 85; # MATH show an example of recursive evaluation # skipping over a lot of definitions and desugarings 17 86 -1 0 87 -1 0 37 -1 18 (3 (37) 0) (6 (37) -1 87 (87) (7 (37) 1)) 1; 17 45 -1 0 37 -1 18 (3 (37) 0) (6 (37) -1 45 -1 7 (37) 1) 1; 2 (86 (86) 0) 1; 2 (86 (86) 1) 1; 2 (86 (86) 2) 2; 2 (86 (86) 3) 6; 2 (86 (86) 4) 24; 2 (86 (86) 5) 120; 2 (45 0) 1; 2 (45 1) 1; 2 (45 2) 2; 2 (45 3) 6; 2 (45 4) 24; 2 (45 5) 120; # MATH some pure lambda calculus definitions - optional # these definitions are not quite what we want # since thinking of everything as a function requires headscratching # it would be better to use these as a parallel means of evaluation # ... for expressions 17 88 -1 0 37 -1 0 36 -1 0 38 -1 37 (36) (38); 17 89 -1 0 36 -1 0 38 -1 36; 17 90 -1 0 36 -1 0 38 -1 38; 17 91 -1 0 37 -1 0 36 -1 0 38 -1 88 (38) (37) (36); 17 92 -1 0 37 -1 37 (89); 17 93 -1 0 37 -1 37 (90); 17 94 -1 0 87 -1 0 37 -1 37; 17 95 -1 0 87 -1 0 37 -1 87 (37); 17 96 -1 0 87 -1 0 37 -1 87 (87 (37)); 17 97 -1 0 46 -1 0 87 -1 0 37 -1 87 ((46 (87)) (37)); 17 98 -1 0 99 -1 0 100 -1 (99 (97)) (100); 17 101 -1 0 99 -1 0 100 -1 (99 (98 -1 100)) (94); 17 102 -1 0 46 -1 93 -1 (46 (0 83 -1 91 (97 -1 92 -1 83) (92 -1 83))) (91 (94) (94)); 17 103 -1 0 46 -1 (46 (0 104 -1 90) (89)); 17 105 -1 0 87 -1 (0 37 -1 87 (37 (37))) (0 37 -1 87 (37 (37))); # .. but for rest of message will assume that define does fixed-point for us # now build a link between numbers and church number functions 17 106 -1 0 107 -1 107 (0 37 -1 5 (37) 1) 0; 2 0 (106 -1 94); 2 1 (106 -1 95); 2 2 (106 -1 96); 17 108 -1 0 37 -1 18 (2 0 (37)) (94) (97 -1 108 -1 7 (37) 1); # MATH introduce universal quantifier # really need to link with sets for true correctness # and the examples here are REALLY sparse, need much more 1 19; 4 5 (5 5 1); 4 4 (5 4 1); 4 3 (5 3 1); 4 2 (5 2 1); 4 1 (5 1 1); 4 0 (5 0 1); 19 (0 37 -1 4 (37) (5 (37) 1)); 4 5 (6 5 2); 4 4 (6 4 2); 4 3 (6 3 2); 4 2 (6 2 2); 4 1 (6 1 2); 8 -1 4 0 (6 0 2); 8 -1 19 (0 37 -1 4 (37) (6 (37) 2)); # MATH introduce existential quantifier # really need to link with sets for true correctness # and the examples here are REALLY sparse, need much more 8 -1 2 5 (6 2 2); 2 4 (6 2 2); 8 -1 2 3 (6 2 2); 8 -1 2 2 (6 2 2); 8 -1 2 1 (6 2 2); 8 -1 2 0 (6 2 2); 1 20; 20 (0 37 -1 2 (37) (6 2 2)); 8 -1 2 5 (5 5 2); 8 -1 2 4 (5 4 2); 8 -1 2 3 (5 3 2); 8 -1 2 2 (5 2 2); 8 -1 2 1 (5 1 2); 8 -1 2 0 (5 0 2); 8 (20 (0 37 -1 2 (37) (5 (37) 2))); # MATH introduce logical implication 1 109; 17 109 -1 0 37 -1 0 36 -1 8 -1 13 (37) (8 -1 36); 109 (16) (16); 8 -1 109 (16) (15); 109 (15) (16); 109 (15) (15); 19 (0 37 -1 19 (0 36 -1 109 (109 (37) (36)) (109 (8 -1 36) (8 -1 37)))); # MATH introduce sets and set membership 1 110; 17 110 -1 0 37 -1 0 53 -1 8 -1 2 (63 (53) (37) (0 36 0) 1) 0; 110 2 (70 8 9 2); 110 8 (70 8 9 2); 110 9 (70 8 9 2); 110 4 (70 6 1 4 9); 110 1 (70 6 1 4 9); 110 6 (70 6 1 4 9); 110 1 (70 8 1 0 3 5); 110 3 (70 8 1 0 3 5); 110 0 (70 8 1 0 3 5); 110 3 (70 4 0 3 7 9); 110 0 (70 4 0 3 7 9); 110 9 (70 4 0 3 7 9); 110 3 (70 4 1 3 9); 110 9 (70 4 1 3 9); 110 4 (70 4 1 3 9); 8 -1 110 8 (70 4 1 0 9); 8 -1 110 8 (70 6 4 0 7 5); 8 -1 110 1 (70 0 7); 8 -1 110 4 (70 1 3 2 5); 8 -1 110 8 (70 3 7 2 5); # rules for set equality 17 111 -1 0 37 -1 0 36 -1 18 (3 (55 -1 37) 0) (13 (110 (52 -1 37) (36)) (111 (54 -1 37) (36))) (16); 17 112 -1 0 37 -1 0 36 -1 13 (111 (37) (36)) (111 (36) (37)); 112 (70 1 5 9) (70 5 1 9); 112 (70 1 5 9) (70 9 1 5); 8 -1 112 (70 1 5 9) (70 1 5); # let's go leave ourselves wide open to Russell's paradox # ... by using characteristic functions # ... since it doesn't really matter for communication purposes # ... and so far this is just used / tested with sets of integers really 110 5 (30 (0 37 -1 2 (5 (37) 10) 15)); 110 3 (30 (0 37 -1 2 (6 (37) 3) (5 (37) 6))); 17 113 -1 70; 110 0 (31); 19 (0 37 -1 109 (110 (37) (31)) (110 (5 (37) 1) (31))); 110 1 (31); 110 2 (31); 110 3 (31); 110 4 (31); 110 5 (31); 110 6 (31); 110 7 (31); 110 8 (31); 110 9 (31); 17 114 -1 70 (16) (15); 110 (16) (114); 110 (15) (114); # actually, to simplify semantics elsewhere, true and false # are now just 0 and 1 so they are not distinct from ints 17 115 -1 30 -1 0 37 -1 20 -1 0 36 -1 13 (110 (36) (31)) (2 (6 2 (36)) (37)); 110 0 (31); 110 0 (115); 110 1 (31); 8 -1 110 1 (115); 110 2 (31); 110 2 (115); 110 3 (31); 8 -1 110 3 (115); 110 4 (31); 110 4 (115); 110 5 (31); 8 -1 110 5 (115); 110 6 (31); 110 6 (115); # MATH introduce graph structures 17 116 -1 26 (117 118) (60 (117) (118)); 17 119 -1 116 (70 1 2 3 4) (70 (70 1 2) (70 2 3) (70 1 4)); 17 120 -1 26 (121 122 123) (20 -1 0 66 -1 18 (13 (10 (66) 0) (4 (66) (55 -1 56 (121) 1))) (59 (56 (56 (121) 1) (66)) (70 (122) (123))) (15)); 2 (120 (119) 1 2) (16); 2 (120 (119) 1 3) (15); 2 (120 (119) 2 4) (15); # 'if' is used a lot in the next definition in place of and / or # this is because I haven't established lazy evaluation forms for and / or # so this very inefficient algorithm completely bogs down when combined # ... during testing with a dumb implementation for 'exists'. 17 124 -1 26 (121 122 123) (18 (2 (122) (123)) (16) (18 (120 (121) (122) (123)) (16) (20 (0 125 -1 18 (120 (121) (122) (125)) (124 (121) (125) (123)) (15))))); 2 (124 (119) 1 2) (16); 2 (124 (119) 1 3) (16); 2 (124 (119) 2 4) (15); # MATH show how to execute a sequence of instructions 1 126; 17 78 -1 25; 17 127 -1 0 37 -1 18 (10 (55 -1 37) 1) (57 (76 -1 37) (127 -1 77 -1 37)) (37); # test reverse 59 (70 1 2 3) (127 -1 70 3 2 1); 17 25 -1 74 ((79 (78))) (0 37 -1 18 (24 -1 37) (79 -1 37) (18 (2 (52 -1 37) 126) (25 (70 (70 0 37 (70 52 (70 37))) (57 70 (127 -1 54 -1 37)))) (79 -1 37))); 2 (126 1 7 2 4) 4; 2 (126 (28 (47) 88) (28 (47) 6) (29 -1 47)) 6; 2 (126 (28 (48) 88) (28 (47) 6) (29 -1 48)) 88; 2 (126 (28 (47) 88) (28 (47) 6) (29 -1 47) 4) 4; # MATH introduce environment / hashmap structure # this section needs a LOT more examples :-) # note that at the time of writing (h 1 2) is same as ((h) 1 2) 17 128 -1 26 (129 37 36 38) (18 (58 (38) (37)) (36) (129 (38))); 17 130 -1 26 (129 37) (129 (37)); 17 131 -1 0 37 -1 32; 17 132 -1 0 133 -1 0 37 -1 133; 17 134 -1 128 (128 (131) 3 2) 4 9; 2 (130 (134) 4) 9; 2 (130 (134) 3) 2; 2 (130 (134) 8) (32); 2 (130 (134) 15) (32); 2 (130 (128 (134) 15 33) 15) 33; 2 (130 (134) 15) (32); 17 135 -1 0 37 -1 18 (59 (37) (70)) (131) (128 (135 (54 -1 37)) (61 -1 52 -1 37) (62 -1 52 -1 37)); 2 (130 (135 -1 70 (60 3 10) (60 2 20) (60 1 30)) 3) 10; 2 (130 (135 -1 70 (60 3 10) (60 2 20) (60 1 30)) 1) 30; # OBJECT introduce simple mutable structures 17 136 -1 0 53 -1 74 ((137 (82 (0 37 -1 27 0) (53)))) (0 64 -1 56 (137) (67 (53) (64) (0 37 0))); 17 138 -1 136 -1 70 139 140 141; 28 (138 139) 15; 2 (29 -1 138 139) 15; # OBJECT introduce method handler wrappers 17 142 -1 26 (143 144 145) (128 (143) (144) (0 104 -1 145 -1 143)); 17 146 -1 0 37 -1 37 0; 17 147 -1 136 -1 70 37 36; 28 (147 37) 10; 28 (147 36) 20; 2 (29 -1 147 37) 10; 2 (29 -1 147 36) 20; 17 148 -1 142 (147) 149 (0 150 -1 5 (29 -1 150 37) (29 -1 150 36)); 2 (29 -1 148 37) 10; 2 (29 -1 148 36) 20; 2 (146 -1 148 149) 30; 28 (148 36) 10; 2 (146 -1 148 149) 20; 28 (147 36) 5; 2 (146 -1 148 149) 15; # TURING introduce turing machine model # just for fun! 17 151 -1 0 37 -1 18 (3 (55 -1 37) 0) (18 (3 (55 -1 37) 1) (54 -1 37) (70 -1 70)) (0 70 -1 70); 17 152 -1 0 37 -1 18 (3 (55 -1 37) 0) (52 -1 37) (70); 17 153 -1 0 154 -1 74 ((37 (62 -1 154))) (18 (3 (55 -1 37) 0) (52 -1 37) (70)); 17 155 -1 26 (154 156 157) (18 (2 (156) 1) (60 (57 (157) (61 -1 154)) (151 -1 62 -1 154)) (18 (2 (156) 0) (60 (151 -1 61 -1 154) (57 (152 -1 61 -1 154) (57 (157) (151 -1 62 -1 154)))) (60 (61 -1 154) (57 (157) (151 -1 62 -1 154))))); 17 158 -1 26 (159 160 76 154) (18 (2 (160) (76)) (154) (74 ((161 (159 (160) (153 -1 154)))) (158 (159) (56 (161) 0) (76) (155 (154) (56 (161) 1) (56 (161) 2))))); 17 162 -1 0 37 -1 60 (70) (37); 17 163 -1 0 37 -1 0 53 -1 18 (3 (55 -1 53) 0) (18 (2 (76 -1 53) (37)) (163 (37) (77 -1 53)) (53)) (53); 17 164 -1 0 37 -1 163 (70) (62 -1 37); 17 165 -1 135 -1 70 (60 166 (135 -1 70 (60 0 (70 166 1 0)) (60 1 (70 166 1 1)) (60 (70) (70 167 0 (70))))) (60 167 (135 -1 70 (60 0 (70 168 0 1)) (60 1 (70 167 0 0)) (60 (70) (70 169 2 1)))) (60 168 (135 -1 70 (60 0 (70 168 0 0)) (60 1 (70 168 0 1)) (60 (70) (70 169 1 (70))))) (60 169 (135 -1 70)); 2 (164 -1 158 (165) 166 169 (162 -1 70 1 0 0 1)) (70 1 0 1 0); 2 (164 -1 158 (165) 166 169 (162 -1 70 1 1 1)) (70 1 0 0 0); 2 (164 -1 158 (165) 166 169 (162 -1 70 1 1 1 0 0 0 1 1 1)) (70 1 1 1 0 0 1 0 0 0); # OBJECT introduce simple form of typing, for ease of documentation. # An object is simply a function that takes an argument. # The argument is the method to call on the object. # Types are here taken to be just the existence of a particular method, # with that method returning an object of the appropriate type. 17 170 (26 (171) (26 (37) (18 (2 (37) 172) (171) 0))); 17 173 (0 37 (18 (24 (37)) (170 (37)) (37))); 17 174 (26 (175 176) (18 (24 (176)) (2 (175) 172) (8 (24 ((173 (176)) (175)))))); # add version of lambda that allows types to be declared 17 78 (25); 17 25 (74 ((79 (78))) (0 37 (18 (24 (37)) (79 (37)) (18 (2 (52 (37)) 26) (74 ((80 (52 (54 (37)))) (73 (52 (54 (54 (37)))))) (18 (3 (55 (80)) 0) (18 (24 (76 (80))) (25 (70 26 (77 (80)) (70 0 (76 (80)) (73)))) (74 ((177 (61 (76 (80)))) (178 (62 (76 (80))))) (25 (70 26 (77 (80)) (70 0 (177) (70 74 (70 (70 (177) (70 (70 173 (70 (177))) (178)))) (73))))))) (25 (73)))) (79 (37)))))); # add conditional form 17 78 (25); 17 25 (74 ((79 (78))) (0 37 (18 (24 (37)) (79 (37)) (18 (2 (52 (37)) 179) (74 ((180 (52 (54 (37)))) (181 (54 (54 (37))))) (18 (3 (55 (181)) 0) (25 (70 18 (61 (180)) (62 (180)) (57 179 (181)))) (25 (180)))) (79 (37)))))); 2 99 (179 99); 2 8 (179 ((16) 8) 11); 2 11 (179 ((15) 8) 11); 2 7 (179 ((15) 3) ((16) 7) 11); 2 3 (179 ((16) 3) ((16) 7) 11); 2 11 (179 ((15) 3) ((15) 7) 11); 17 182 (26 (183 53) (18 (3 (55 (53)) 0) (18 (183 (52 (53))) (182 (183) (54 (53))) (57 (52 (53)) (182 (183) (54 (53))))) (53))); 17 184 (26 (37) (182 (26 (36) (2 (36) (37))))); 59 (70 1 2 3 5) (184 4 (70 1 2 3 4 5)); 59 (70 1 2 3 5) (184 4 (70 1 4 2 4 3 4 5)); 17 185 (26 (175 176) (74 ((186 (173 (176)))) (186 (175)))); 17 187 (26 ((37 172) (36 172)) (185 172 (5 (37) (36)))); 2 42 (187 (170 10) (170 32)); 2 42 (187 10 32); 17 188 (26 (87) ((26 (37) (87 (26 (36) ((37 (37)) (36))))) (26 (37) (87 (26 (36) ((37 (37)) (36))))))); # OBJECT an example object -- a 2D point 17 189 (26 (37 36) (188 (26 (150 190) (179 ((2 (190) 37) (37)) ((2 (190) 36) (36)) ((2 (190) 189) (150)) ((2 (190) 5) (26 ((83 189)) (189 (5 (37) (83 37)) (5 (36) (83 36))))) ((2 (190) 2) (26 ((83 189)) (13 (2 (37) (83 37)) (2 (36) (83 36))))) 0)))); 17 191 (189 1 11); 17 192 (189 2 22); 2 1 (191 37); 2 22 (192 36); 2 11 ((189 11 12) 37); 2 11 (((189 11 12) 189) 37); 2 16 (((189 16 17) 189) 37); 2 33 (191 5 (192) 36); 191 5 (192) 2 (189 3 33); 192 5 (191) 2 (189 3 33); (189 100 200) 5 (189 200 100) 2 (189 300 300); 174 189 (191); 8 (174 172 (191)); 174 172 5; 8 (174 189 5); # OBJECT an example object -- a container 17 193 (26 (37) (74 ((194 (27 (70)))) (188 (26 (150 190) (179 ((2 (190) 193) (150)) ((2 (190) 195) (29 (194))) ((2 (190) 98) (26 (37) (18 (8 (110 (37) (29 (194)))) (28 (194) (57 (37) (29 (194)))) (15)))) ((2 (190) 196) (26 (37) (28 (194) (184 (37) (29 (194)))))) ((2 (190) 2) (26 ((107 193)) (112 (150 195) (107 195)))) 0))))); # Can pass anything to container function to create an object # Should eventually use a consistent protocol for all objects, # but all this stuff is still in flux 17 197 (193 198); 197 98 77; 197 98 88; 197 98 99; 112 (197 195) (70 77 88 99); 197 196 88; 112 (197 195) (70 77 99); 17 199 (193 198); 199 98 77; 199 98 99; 199 2 (197); # OBJECT expressing inheritance # counter-container adds one method to container: count 17 200 (26 (37) (74 ((201 (193 198))) (188 (26 (150 190) (179 ((2 (190) 200) (150)) ((2 (190) 202) (55 (201 195))) (201 (190))))))); 17 203 (200 198); 2 0 (203 202); 203 98 4; 2 1 (203 202); 203 98 5; 2 2 (203 202); # OBJECT adding a special form for classes # need a bunch of extra machinery first, will push this # back into previous sections eventually, and simplify 17 204 (26 (205 206) (18 (3 (55 (205)) 0) (204 (77 (205)) (57 (76 (205)) (206))) (206))); 2 (204 (70 1 2 3) (70 4 5 6)) (70 1 2 3 4 5 6); 17 207 (0 37 (0 53 (18 (3 (55 (53)) 0) (57 (52 (53)) (207 (37) (54 (53)))) (70 (37))))); 2 (207 5 (70 1 2)) (70 1 2 5); 17 208 (26 (183 53) (18 (3 (55 (53)) 0) (18 (183 (52 (53))) (57 (52 (53)) (208 (183) (54 (53)))) (208 (183) (54 (53)))) (53))); 17 209 (74 ((210 (27 0))) (26 (37) (74 ((211 (29 (210)))) (126 (28 (210) (5 (211) 1)) (211))))); 2 (209 198) 0; 2 (209 198) 1; 2 (209 198) 2; 8 (2 (209 198) (209 198)); # okay, here it comes. don't panic! # I need to split this up into helpers, and simplify. # It basically just writes code for classes like we saw in # a previous section. 17 78 (25); 17 25 (74 ((79 (78))) (0 37 (18 (24 (37)) (79 (37)) (18 (2 (52 (37)) 212) (74 ((144 (56 (37) 1)) (213 (56 (37) 2)) (214 (54 (54 (54 (37)))))) (25 (70 17 (144) (70 26 (57 145 (213)) (70 74 (207 (70 215 (70 209 198)) (82 (54) (208 (0 37 (2 (61 (37)) 216)) (214)))) (70 74 (70 (70 150 (70 188 (70 26 (70 150 145) (204 (57 179 (204 (82 (0 37 (70 (70 2 (70 145) (61 (37))) (62 (37)))) (82 (54) (208 (0 37 (2 (61 (37)) 145)) (214)))) (82 (0 37 (70 (70 2 (70 145) (37)) (70 (37)))) (82 (62) (208 (0 37 (2 (61 (37)) 216)) (214)))))) (70 (70 (70 2 (70 145) 150) (70 150)) (70 (70 2 (70 145) (144)) (70 150 150)) (70 (70 2 (70 145) 217) (70 26 (70 37) 0)) (70 (70 2 (70 145) 198) 0) (70 (70 2 (70 145) 215) (70 215)) (70 (70 2 (70 145) 218) (70 26 (70 37) (70 2 (70 215) (70 37 215)))) (70 150 217 (70 145)))))))) (70 126 (70 150 (70 145)) (70 150)))))))) (79 (37)))))); # revisit the point class example 212 189 (37 36) (145 37 (37)) (145 36 (36)) (145 5 (26 ((83 189)) (189 198 (5 (37) (83 37)) (5 (36) (83 36))))) (145 2 (26 ((83 189)) (13 (2 (37) (83 37)) (2 (36) (83 36))))); # note the appearance of new in the next line -- # this is the only difference to previous version 17 191 (189 198 1 11); 17 192 (189 198 2 22); 2 1 (191 37); 2 22 (192 36); 2 11 ((189 198 11 12) 37); 2 11 (((189 198 11 12) 189) 37); 2 16 (((189 198 16 17) 189) 37); 2 33 (191 5 (192) 36); 191 5 (192) 2 (189 198 3 33); 192 5 (191) 2 (189 198 3 33); (189 198 100 200) 5 (189 198 200 100) 2 (189 198 300 300); 174 189 (191); 8 (174 172 (191)); # OBJECT wrapper class for cells 212 219 (220) (216 221 (27 (220))) (145 222 (29 (221))) (145 223 (26 (224) (28 (221) (224)))) (145 225 (150 223 (220))) (145 217 (26 (37) ((173 (150 222)) (37)))); 17 226 (219 198 15); 2 15 (226 222); 226 223 82; 2 82 (226 222); 17 227 (219 198 (189 198 120 150)); 17 228 (219 198 (189 198 300 300)); 227 5 (228) 2 (189 198 420 450); 8 (227 2 (228)); 228 223 (227); 227 2 (228); # MUD playing around with doors and rooms 212 229 ((230 231) (232 231)) (145 198 (126 (230 98 (150)) (232 98 (150)))) (145 233 (26 ((160 231)) (179 ((160 218 (230)) (232)) ((160 218 (232)) (230)) 0))) (145 234 (26 ((160 231)) (179 ((160 218 (230)) (16)) ((160 218 (232)) (16)) (15)))); 212 231 () (216 221 (193 198)) (145 217 (26 (37) (221 (37)))); # need to fix up containers to use object equality 17 235 (26 (46 53) (3 (55 (208 (26 (37) (37 218 (46))) (53))) 0)); 212 193 () (216 194 (219 198 (70))) (145 195 (194 222)) (145 98 (26 (37) (18 (8 (235 (37) (194 222))) (194 223 (57 (37) (194 222))) (15)))); 17 236 (231 198); 17 237 (231 198); 17 238 (229 198 (236) (237)); (61 (236 195)) 218 (238); (61 (237 195)) 218 (238); 238 233 (236) 218 (237); 8 (238 233 (236) 218 (236)); 238 233 (237) 218 (236); 17 239 (231 198); 17 240 (231 198); 17 241 (231 198); 17 242 (231 198); 17 243 (229 198 (236) (239)); 17 244 (229 198 (236) (240)); 17 245 (229 198 (240) (241)); 212 246 () (216 247 (219 198 (242))) (145 248 (26 ((249 231)) (247 223 (249)))) (145 250 (247 222)) (145 251 0); 17 252 (26 (183 43 66 46 53) (18 (3 (55 (53)) 0) (18 (3 (183 (52 (53))) (43)) (252 (183) (183 (52 (53))) (46) (5 (46) 1) (54 (53))) (252 (183) (43) (66) (5 (46) 1) (54 (53)))) (66))); 17 253 (26 (183 53) (252 (183) (183 (52 (53))) 0 0 (53))); 17 254 (26 (183 43 66 46 53) (18 (3 (55 (53)) 0) (18 (4 (183 (52 (53))) (43)) (254 (183) (183 (52 (53))) (46) (5 (46) 1) (54 (53))) (254 (183) (43) (66) (5 (46) 1) (54 (53)))) (66))); 17 255 (26 (183 53) (254 (183) (183 (52 (53))) 0 0 (53))); 2 2 (253 (26 (37) (37)) (70 3 4 5 0)); 2 1 (253 (26 (37) (37)) (70 3 5 4 0)); 2 0 (253 (26 (37) (37)) (70 5 3 4 0)); # the robo class makes a character that patrols from room to room 212 256 () (216 201 (246 198)) (216 257 (219 198 0)) (216 258 (219 198 (26 (37) 0))) (145 217 (26 (37) (201 (37)))) (145 251 (74 ((259 (208 (26 (37) (174 229 (37))) (150 247 195)))) (74 ((260 (82 (26 (37) (258 222 (37))) (259)))) (74 ((261 (56 (259) (255 (26 (37) (37)) (260)))) (262 (258 222)) (263 (257 222))) (126 (150 247 223 (261 233 (150 247 222))) (258 223 (26 ((264 229)) (18 (264 218 (261)) (263) (262 (264))))) (257 223 (5 (257 222) 1))))))); 17 265 (256 198); 265 248 (240); 17 266 (26 ((267 256)) (253 (26 ((249 231)) (18 (249 218 (267 250)) 1 0)) (70 (236) (237) (240) (239) (241)))); 17 268 (26 (46 160 53) (18 (4 (160) (46)) (126 (265 251) (268 (46) (5 (160) 1) (207 (266 (265)) (53)))) (53))); # here is a list of the first 30 rooms the robot character visits # 0=hall, 1=kitchen, 2=stairs, 3=lawn, 4=bedroom 59 (268 30 0 (70)) (70 4 2 0 3 0 1 0 2 4 2 0 3 0 1 0 2 4 2 0 3 0 1 0 2 4 2 0 3 0 1); # Now should start to introduce a language to talk about what is # going on in the simulated world, and start to move away from # detailed mechanism # JAVA some preparatory work for integrating with Java code 212 269 () (145 270 (26 (37) (5 (37) 1))) (145 271 (16)); 212 272 () (216 201 (269 198)) (145 217 (26 (37) (201 (37)))); # will need to install class hierarchy, just hardcode a few things for now 17 273 (0 37 -1 0 36 -1 (179 ((2 (36) 274) (272)) ((2 (36) 275) (269)) (269))); (273 276 274) 198 271; 2 ((273 276 274) 198 270 15) 16; 212 277 () (216 201 (269 198)) (145 217 (26 (37) (201 (37)))) (216 278 (219 198 0)) (145 222 (278 222)) (145 279 (26 (171) (126 (150 223 (171)) (150)))) (145 223 (26 (171) (278 223 (171)))); 17 280 (277); 17 281 (277); 17 282 (277); 17 283 (277); 17 172 (277); 17 284 (277); 17 285 (277); 17 286 (277); 17 287 (277); 17 288 (172 198); 288 223 15; 2 15 (288 222); 17 289 (172 198 279 17); 2 17 (289 222); 17 290 (0 37 (179 ((2 (37) 1) 20) ((2 (37) 2) 40) ((2 (37) 3) 60) 0)); 2 (290 3) 60; # really ought to go back and be clear about eager/laziness issues 17 291 (0 37 (179 ((2 (37) 1) (288 223 20)) ((2 (37) 2) (288 223 40)) ((2 (37) 3) (288 223 60)) 0)); 291 2; 2 (288 222) 40; 17 292 (26 (293 294 295 50) (0 296 (126 (295 223 (5 (295 222) 1)) -1 179 ((2 (296) 198) (26 (297) (298 (294) ((297) 198)))) ((2 (296) 299) (298 (294) (300 (294)))) ((14 (2 (296) 301) (2 (296) 302)) (26 (303) (293 223 (128 (293 222) (303) (304 (294)))))) ((14 (2 (296) 305) (2 (296) 306)) (26 (303) (298 (294) (130 (293 222) (303))))) ((2 (296) 307) (26 (308) (298 (294) (308)))) ((2 (296) 309) (26 (64 310) (298 (294) ((304 (294)) (64) 222)))) ((2 (296) 311) (26 (64 310) (74 ((308 (304 (294)))) ((304 (294)) (64) 223 (308))))) ((2 (296) 312) (74 ((313 (304 (294)))) (74 ((314 (304 (294)))) (298 (294) (6 (314) (313)))))) ((2 (296) 315) (74 ((313 (304 (294)))) (74 ((314 (304 (294)))) (298 (294) (5 (314) (313)))))) ((2 (296) 316) (74 ((313 (304 (294)))) (74 ((314 (304 (294)))) (298 (294) (7 (314) (313)))))) ((2 (296) 317) (26 (37) (295 223 (37)))) ((2 (296) 318) (26 (37) (18 (4 (304 (294)) 0) (295 223 (37)) 0))) ((2 (296) 319) (26 (37) (18 (4 (304 (294)) 1) (295 223 (37)) 0))) ((2 (296) 320) (26 (37) (18 (3 (304 (294)) 0) (295 223 (37)) 0))) ((2 (296) 321) (26 (37) (18 (10 (304 (294)) 0) (295 223 (37)) 0))) ((2 (296) 322) (26 (37) (18 (8 (2 (304 (294)) 0)) (295 223 (37)) 0))) ((2 (296) 185) (295 223 323)) ((2 (296) 324) (126 (50 223 (304 (294))) (295 223 323))) ((2 (296) 325) (126 (50 223 (304 (294))) (295 223 323))) ((2 (296) 317) (26 (326) (295 223 (326)))) ((2 (296) 327) (26 (326 328 46) (74 ((329 (330 (294) (326) (328)))) (18 (2 (46) 1) (298 (294) (329)) 0)))) 0))); 17 330 (26 (294 326 331) (18 (2 (331) 0) ((304 (294)) (326)) (74 ((332 (304 (294)))) ((330 (294) (326) (7 (331) 1)) (332))))); 17 298 (26 (294 37) (294 223 (57 (37) (294 222)))); 17 304 (26 (294) (74 ((171 (52 (294 222)))) (126 (294 223 (54 (294 222))) (171)))); 17 300 (26 (294) (52 (294 222))); 17 333 (219 198 (70 5 3 1)); 2 (304 (333)) 5; 2 (300 (333)) 3; 2 (304 (333)) 3; 298 (333) 7; 2 (304 (333)) 7; 17 334 (219 198 (131)); 17 335 (219 198 0); 17 336 (219 198 0); 17 337 (292 (334) (333) (335) (336)); 298 (333) 4; 337 299; 2 (304 (333)) 4; 2 (304 (333)) 4; 298 (333) 66; 298 (333) 77; 337 301 3; 2 (304 (333)) 66; 337 305 3; 2 (304 (333)) 77; 212 338 () (216 37 ((172) 198)) (216 36 ((172) 198)); 17 339 (338 198); 339 37 223 5; 2 (339 37 222) 5; 298 (333) (339); 2 ((304 (333)) 37 222) 5; 298 (333) (339); 337 301 0; 337 305 0; 337 309 37 (172); 2 (304 (333)) 5; 337 305 0; 337 307 15; 337 311 36 (172); 2 (339 36 222) 15; 298 (333) 7; 298 (333) 10; 337 312; 337 324; 2 (336 222) 70; 17 340 -1 0 341 -1 26 (293 294 159) -1 74 ((295 (219 198 (341))) (50 (219 198 (16)))) -1 74 ((342 (292 (293) (294) (295) (50)))) -1 (126 (159 (342) (295 222)) (18 (2 (295 222) 323) (50 222) (340 (295 222) (293) (294) (159)))); 17 343 (340 0); 298 (333) 10; 298 (333) 33; 2 (343 (334) (333) -1 0 342 -1 0 37 -1 (179 ((2 (37) 0) (342 302 4)) ((2 (37) 1) (342 306 4)) (342 324))) 33; 298 (333) 10; 17 344 (26 (345 346) -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 0) (60 1 (345)) (60 2 (346))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 306 1)) ((2 (37) 1) (342 306 2)) ((2 (37) 2) (342 312)) ((2 (37) 3) (342 324)) (342 185)); 2 (344 5 9) 45; # JAVA class translation 'COS_JavaTest' # Sun Jan 23 22:17:30 EST 2005 # Produced by Fritzifier, based on JasminVisitor # Using BCEL library to read Java bytecode # Here is the original code: # public class COS_JavaTest { # private int q = 0; # public int add(int x, int y) { # return x+y; # } # public int sub(int x, int y) { # return x-y; # } # public int mult(int x, int y) { # return x*y; # } # public int addmult(int x, int y, int z) { # return add(x,mult(y,z)); # } # public void set(int x) { # q = x; # } # public int get() { # return q; # } # public int fact(int x) { # return (x>0)?(x*fact(sub(x,1))):1; # } # } # 212 347 () (216 201 ((273 348 275) 198)) (145 217 (26 (37) (201 (37)))) (216 349 ((172) 198)) (145 350 (26 () -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 305 0)) ((2 (37) 1) (342 351 350 0 0)) ((2 (37) 2) (342 305 0)) ((2 (37) 3) (342 307 0)) ((2 (37) 4) (342 311 349 (172))) ((2 (37) 5) (342 185)) (342 185)) ) (145 98 (26 (345 346) -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150)) (60 1 (345)) (60 2 (346))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 306 1)) ((2 (37) 1) (342 306 2)) ((2 (37) 2) (342 315)) ((2 (37) 3) (342 324)) (342 185)) ) (145 352 (26 (345 346) -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150)) (60 1 (345)) (60 2 (346))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 306 1)) ((2 (37) 1) (342 306 2)) ((2 (37) 2) (342 316)) ((2 (37) 3) (342 324)) (342 185)) ) (145 101 (26 (345 346) -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150)) (60 1 (345)) (60 2 (346))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 306 1)) ((2 (37) 1) (342 306 2)) ((2 (37) 2) (342 312)) ((2 (37) 3) (342 324)) (342 185)) ) (145 353 (26 (345 346 354) -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150)) (60 1 (345)) (60 2 (346)) (60 3 (354))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 305 0)) ((2 (37) 1) (342 306 1)) ((2 (37) 2) (342 305 0)) ((2 (37) 3) (342 306 2)) ((2 (37) 4) (342 306 3)) ((2 (37) 5) (342 327 101 2 1)) ((2 (37) 6) (342 327 98 2 1)) ((2 (37) 7) (342 324)) (342 185)) ) (145 223 (26 (345) -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150)) (60 1 (345))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 305 0)) ((2 (37) 1) (342 306 1)) ((2 (37) 2) (342 311 349 (172))) ((2 (37) 3) (342 185)) (342 185)) ) (145 222 (26 () -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 305 0)) ((2 (37) 1) (342 309 349 (172))) ((2 (37) 2) (342 324)) (342 185)) ) (145 355 (26 (345) -1 74 ((293 -1 219 198 -1 135 -1 70 (60 0 (150)) (60 1 (345))) (294 -1 219 198 -1 70)) -1 343 (293) (294) -1 0 342 -1 0 37 -1 179 ((2 (37) 0) (342 306 1)) ((2 (37) 1) (342 319 11)) ((2 (37) 2) (342 306 1)) ((2 (37) 3) (342 305 0)) ((2 (37) 4) (342 305 0)) ((2 (37) 5) (342 306 1)) ((2 (37) 6) (342 307 1)) ((2 (37) 7) (342 327 352 2 1)) ((2 (37) 8) (342 327 355 1 1)) ((2 (37) 9) (342 312)) ((2 (37) 10) (342 317 12)) ((2 (37) 11) (342 307 1)) ((2 (37) 12) (342 324)) (342 185)) ) ; # JAVA check that automatic conversion is workable 17 356 (347 198); 2 (356 101 15 10) 150; 2 (356 353 4 15 10) 154; 126 (356 223 87) (2 (356 222) 87); 2 (356 355 0) 1; 2 (356 355 1) 1; 2 (356 355 5) 120; # Yay! testing says this works. # So structure for bytecode interpretation is in place. # Very few opcodes actually implemented yet though. # NOTE end of part 2, start of part 3 # The following parts of the message are the beginnings # of embedding an alternate visual primer 1 357; # GATE simulating unless gates # for embedded image-and-logic-based primer # practice with pure logic gate # X unless Y = (X if Y=0, otherwise 0) 17 358 -1 0 37 -1 0 36 -1 13 (37) (8 (36)); # if second input is true, output is blocked (false) # if second input is false, output copies first input 2 (15) (358 (15) (15)); 2 (16) (358 (16) (15)); 2 (15) (358 (15) (16)); 2 (15) (358 (16) (16)); # To do: add a simple simulator for non-grid-based # logic -- much simpler to understand than # grid-based # On to a grid-based logic simulation # first, need unbounded, mutable matrices 17 359 -1 0 133 -1 (27 (132 (133))); 17 360 -1 0 328 -1 0 37 -1 0 361 -1 28 (328) -1 128 (29 (328)) (361) (37); 17 362 -1 0 328 -1 0 361 -1 130 (29 (328)) (361); 17 363 (359 0); 2 0 -1 362 (363) -1 70 1 2 3; 360 (363) 10 -1 70 1 2 3; 2 10 -1 362 (363) -1 70 1 2 3; # go through a circuit of unless gates and analyze data flow 17 364 -1 0 365 -1 11 366 (359 (15)) (126 (82 (0 367 -1 11 368 (56 (367) 0) -1 11 369 (56 (367) 1) -1 11 370 (56 (367) 2) -1 11 371 (56 (367) 3) -1 11 171 (56 (367) 4) -1 (18 (2 (368) (370)) (126 (360 (366) (171) -1 70 (370) (371) 372) (360 (366) (16) -1 70 (370) (371) 373) (360 (366) (16) -1 70 (368) (369) 374) (367)) (126 (360 (366) (171) -1 70 (370) (371) 375) (360 (366) (16) -1 70 (370) (371) 376) (360 (366) (16) -1 70 (368) (369) 377) (367)))) (365)) (366)); # move forward one simulation step 17 378 -1 0 365 -1 0 366 (82 (0 367 -1 11 368 (56 (367) 0) -1 11 369 (56 (367) 1) -1 11 370 (56 (367) 2) -1 11 371 (56 (367) 3) -1 11 171 (56 (367) 4) -1 11 379 (18 (2 (368) (370)) (18 (362 (366) -1 70 (368) (369) 373) (13 (362 (366) -1 70 (368) (369) 372) (8 (13 (362 (366) -1 70 (368) (369) 375) (8 (362 (366) -1 70 (368) (369) 377))))) (18 (362 (366) -1 70 (368) (369) 376) (362 (366) -1 70 (368) (369) 375) (16))) (18 (362 (366) -1 70 (368) (369) 376) (13 (362 (366) -1 70 (368) (369) 375) (8 (13 (362 (366) -1 70 (368) (369) 372) (8 (362 (366) -1 70 (368) (369) 374))))) (18 (362 (366) -1 70 (368) (369) 373) (362 (366) -1 70 (368) (369) 372) (16)))) -1 70 (368) (369) (370) (371) (379)) (365)); # wrap up both phases of simulation 17 380 -1 0 365 -1 11 366 (364 (365)) -1 378 (365) (366); # A circuit is a list of gates # Each gate is a list (x1 y1 x2 y2 v) # where the coordinates (x1,y1) and (x2,y2) represent # start and end points of a wire on a plane, carrying a # logic value v. # Wires copy values from their start point. # | # | (A) # V # -->--> # (B)(C) # # Wire C here copies from wire B. # If wire A is on, it blocks (sets to 0) C. 11 381 (70 (70 2 2 4 2 (16)) (70 4 2 6 2 (16)) (70 6 2 8 2 (16)) (70 6 4 6 2 (16))) -1 11 382 (70 (70 2 2 4 2 (16)) (70 4 2 6 2 (16)) (70 6 2 8 2 (15)) (70 6 4 6 2 (16))) -1 58 (380 (381)) (382); # okay, now let us make a simple image class # we are going to encode each row as a single binary number, # rather than a vector, so that images will be pretty # obvious in the raw, uninterpreted message 17 383 -1 26 (46 384) -1 11 385 (34 (46) 2) (18 (2 0 -1 384) (8 -1 2 (46) -1 6 2 -1 385) (383 (385) -1 7 (384) 1)); 2 0 -1 383 (::.) 0; 2 1 -1 383 (::.) 1; 2 1 -1 383 (::.) 2; 2 0 -1 383 (::.) 3; 2 0 -1 383 (::.) 4; 2 0 -1 383 8 0; 2 0 -1 383 8 1; 2 0 -1 383 8 2; 2 1 -1 383 8 3; 17 386 -1 26 (129 39 53) -1 70 (129) (39) (53); 17 387 -1 26 (388 389 390) -1 11 129 (56 (388) 0) -1 11 39 (56 (388) 1) -1 11 53 (56 (388) 2) -1 11 391 (56 (53) (389)) -1 383 (391) (7 (7 (39) (390)) 1); 17 392 -1 0 388 -1 56 (388) 0; 17 393 -1 0 388 -1 56 (388) 1; 17 394 -1 386 3 5 -1 70 (.....) (....:) (:....); 2 3 (392 -1 394); 2 5 (393 -1 394); 2 (15) (387 (394) 0 0); 2 (15) (387 (394) 0 4); 2 (15) (387 (394) 1 0); 2 (16) (387 (394) 1 4); 2 (16) (387 (394) 2 0); 2 (15) (387 (394) 2 4); # need a way to join two lists 17 395 -1 0 205 -1 0 206 -1 (18 (3 (55 -1 205) 0) (57 (52 -1 205) (395 (54 -1 205) (206))) (206)); 17 396 -1 0 53 -1 (18 (3 (55 -1 53) 2) (395 (52 -1 53) (396 -1 54 -1 53)) (18 (2 (55 -1 53) 2) (395 (52 -1 53) -1 (52 -1 54 -1 53)) (18 (2 (55 -1 53) 1) (52 -1 53) (70)))); 58 (70 1 2 3 4) (395 (70 1 2) (70 3 4)); 58 (70 1 2 3 4) (396 (70 (70 1 2) (70 3) (70 4))); # helper for pairing 17 397 -1 0 37 -1 0 53 -1 82 (0 36 (70 (37) (36))) (53); 58 (70 (70 1 10) (70 1 11)) (397 1 (70 10 11)); # need a way to take product of domains 17 398 -1 0 205 -1 0 206 (18 (3 (55 -1 205) 0) (395 (397 (52 -1 205) (206)) (398 (54 -1 205) (206))) (70)); 58 (70 (70 1 10) (70 1 11) (70 2 10) (70 2 11)) (398 (70 1 2) (70 10 11)); # need a way to make counting sets 17 202 -1 0 399 -1 0 400 (18 (9 (399) (400)) (57 (399) (202 (5 (399) 1) (400))) (70)); 58 (70 0 1 2 3 4) (202 0 4); # given an image of a circuit, extract a model. # wire elements are centered on multiples of 8 # individual element... 17 401 -1 0 388 -1 0 402 -1 0 403 -1 0 404 -1 0 405 (18 (387 (388) (405) (404)) (11 406 (387 (388) (5 (405) 4) (404)) -1 11 407 (18 (406) 0 1) -1 11 408 (18 (406) 1 0) -1 11 409 (387 (388) (5 (405) -1 5 (6 4 -1 408) (6 2 -1 407)) (5 (404) -1 7 (6 4 -1 407) (6 2 -1 408))) -1 11 410 (18 (409) 1 (7 0 1)) -1 11 407 (6 (410) (407)) -1 11 408 (6 (410) (408)) -1 11 411 (387 (388) (5 (405) (407)) (7 (404) (408))) -1 (70 (70 (7 (402) (407)) (7 (403) (408)) (5 (402) (407)) (5 (403) (408)) (411)))) (70)); # full circuit... 17 412 -1 0 388 -1 11 129 (34 (392 -1 388) 8) -1 11 39 (34 (393 -1 388) 8) (396 (82 (0 171 -1 11 402 (56 (171) 0) -1 11 403 (56 (171) 1) -1 11 404 (6 8 -1 402) -1 11 405 (6 8 -1 403) -1 401 (388) (402) (403) (404) (405)) (398 (202 0 (7 (39) 1)) (202 0 (7 (129) 1))))); # GATE testing alternate primer based on gates: COS_NOT circuit # This section contains one or more representations of a circuit # constructed using UNLESS gates. Needs elaboration... # graphic representation : IMAGE_SRC=COS_NOT.gif # 17 413 -1 70 (70 0 6 2 6 (16)) (70 2 6 4 6 (16)) (70 4 6 6 6 (16)) (70 6 6 8 6 (16)) (70 8 4 8 6 (16)) (70 8 6 8 8 (15)) (70 8 8 10 8 (15)) (70 10 8 12 8 (15)) (70 12 8 12 6 (15)) (70 12 6 14 6 (15)) (70 14 6 16 6 (15)) (70 16 6 18 6 (15)) (70 18 6 20 6 (15)); 17 414 -1 386 109 169 -1 70 (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (..............................................................:::::......................................................................................................) (...............................................................:::.......................................................................................................) (............:...............:...............:...............:...:...........................................:...............:...............:...............:............) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::..............................................::..............::..............::..............::...........) (...::::::::::::....::::::::::::....::::::::::::....::::::::::::....................................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::..............................................::..............::..............::..............::...........) (............:...............:...............:...............:...................................:...........:...............:...............:...............:............) (................................................................:..............................:::.......................................................................) (................................................................:.............................:::::......................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (..............................................................:::::.............................:........................................................................) (...............................................................:::..............................:........................................................................) (................................................................:...........:...............:............................................................................) (............................................................................::..............::...........................................................................) (...................................................................::::::::::::....::::::::::::..........................................................................) (............................................................................::..............::...........................................................................) (............................................................................:...............:............................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................); 58 (413) (412 (414)); # GATE testing alternate primer based on gates: COS_AND circuit # This section contains one or more representations of a circuit # constructed using UNLESS gates. Needs elaboration... # graphic representation : IMAGE_SRC=COS_AND.gif # 17 415 -1 70 (70 0 2 2 2 (16)) (70 0 8 2 8 (16)) (70 2 2 4 2 (16)) (70 2 4 4 4 (16)) (70 2 6 4 6 (16)) (70 2 8 4 8 (16)) (70 4 2 4 4 (16)) (70 4 8 4 6 (16)) (70 4 4 6 4 (15)) (70 4 6 6 6 (15)) (70 6 4 8 4 (15)) (70 6 6 8 6 (15)) (70 8 4 10 4 (15)) (70 8 6 10 6 (15)) (70 10 2 10 4 (16)) (70 10 4 10 6 (16)) (70 10 6 10 8 (16)) (70 10 8 12 8 (16)) (70 12 8 14 8 (16)) (70 14 8 16 8 (16)) (70 16 8 18 8 (16)); 17 416 -1 386 88 153 -1 70 (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (............:...............:............................................................................................................................) (...:::::::::::.....:::::::::::...........................................................................................................................) (...::::::::::::....::::::::::::..........................................................................................................................) (...:::::::::::.....:::::::::::...........................................................................................................................) (............:...............:............................................................................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (..............................:::::...........................................:::::......................................................................) (...............................:::.............................................:::.......................................................................) (............................:...:...........:...............:...............:...:........................................................................) (...................:::::::::::..............::..............::..............::...........................................................................) (...................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................) (...................:::::::::::..............::..............::..............::...........................................................................) (............................:...............:...............:...............:............................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (...............................................................................:::.......................................................................) (..............................................................................:::::......................................................................) (...............................................................................:::.......................................................................) (............................:...............:...............:...............:...:........................................................................) (...................:::::::::::..............::..............::..............::...........................................................................) (...................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................) (...................:::::::::::..............::..............::..............::...........................................................................) (............................:...:...........:...............:...............:............................................................................) (...............................:::.............................................:::.......................................................................) (..............................:::::............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::.............................................:::.......................................................................) (...............................:::............................................:::::......................................................................) (...............................:::.............................................:::.......................................................................) (............:...............:...................................................:...........:...............:...............:...............:............) (...:::::::::::.....:::::::::::.....................................................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........) (...::::::::::::....::::::::::::....................................................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........) (...:::::::::::.....:::::::::::.....................................................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........) (............:...............:...............................................................:...............:...............:...............:............) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................) (.........................................................................................................................................................); 58 (415) (412 (416)); # GATE testing alternate primer based on gates: COS_OR circuit # This section contains one or more representations of a circuit # constructed using UNLESS gates. Needs elaboration... # graphic representation : IMAGE_SRC=COS_OR.gif # 17 417 -1 70 (70 2 4 4 4 (16)) (70 2 6 4 6 (16)) (70 4 4 6 4 (16)) (70 4 6 6 6 (16)) (70 6 4 8 4 (16)) (70 6 6 8 6 (16)) (70 8 4 10 4 (16)) (70 8 6 10 6 (16)) (70 8 8 10 8 (16)) (70 10 2 10 4 (16)) (70 10 4 10 6 (15)) (70 10 6 10 8 (15)) (70 10 8 12 8 (16)) (70 12 8 14 8 (16)) (70 14 8 16 8 (16)) (70 16 8 18 8 (16)); 17 418 -1 386 93 169 -1 70 (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (...............................................................................:::.......................................................................................) (..............................................................................:::::......................................................................................) (...............................................................................:::.......................................................................................) (............................:...............:...............:...............:...:........................................................................................) (...................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................) (...................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................................) (...................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................) (............................:...............:...............:...............:............................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (..............................................................................:::::......................................................................................) (...............................................................................:::.......................................................................................) (............................:...............:...............:...............:...:........................................................................................) (...................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................) (...................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................................) (...................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................) (............................:...............:...............:...............:............................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (................................................................................:........................................................................................) (..............................................................................:::::......................................................................................) (...............................................................................:::.......................................................................................) (............................................................................:...:...........:...............:...............:...............:............................) (...................................................................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................) (...................................................................::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................) (...................................................................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................) (............................................................................:...............:...............:...............:...............:............................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................); 58 (417) (412 (418)); # GATE testing alternate primer based on gates: COS_NOR circuit # This section contains one or more representations of a circuit # constructed using UNLESS gates. Needs elaboration... # graphic representation : IMAGE_SRC=COS_NOR.gif # 17 419 -1 70 (70 0 6 2 6 (16)) (70 0 8 2 8 (16)) (70 2 6 4 6 (16)) (70 2 8 4 8 (16)) (70 4 6 6 6 (16)) (70 4 8 6 8 (16)) (70 6 6 8 6 (16)) (70 6 8 8 8 (16)) (70 8 4 8 6 (16)) (70 8 6 8 8 (15)) (70 8 8 8 10 (15)) (70 8 10 10 10 (15)) (70 10 10 12 10 (15)) (70 12 10 14 10 (15)) (70 14 10 16 10 (15)) (70 16 10 18 10 (15)) (70 18 10 20 10 (15)); 17 420 -1 386 125 169 -1 70 (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (...............................................................:::.......................................................................................................) (..............................................................:::::......................................................................................................) (...............................................................:::.......................................................................................................) (............:...............:...............:...............:...:........................................................................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................................) (...::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................................) (............:...............:...............:...............:............................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (..............................................................:::::......................................................................................................) (...............................................................:::.......................................................................................................) (............:...............:...............:...............:...:........................................................................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................................) (...::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................................................) (............:...............:...............:...............:............................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (................................................................:........................................................................................................) (..............................................................:::::......................................................................................................) (...............................................................:::.......................................................................................................) (................................................................:...........:...............:...............:...............:...............:...............:............) (............................................................................::..............::..............::..............::..............::..............::...........) (...................................................................::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::..........) (............................................................................::..............::..............::..............::..............::..............::...........) (............................................................................:...............:...............:...............:...............:...............:............) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................); 58 (419) (412 (420)); # GATE testing alternate primer based on gates: COS_OSC circuit # This section contains one or more representations of a circuit # constructed using UNLESS gates. Needs elaboration... # graphic representation : IMAGE_SRC=COS_OSC.gif # 17 421 -1 70 (70 4 8 6 8 (16)) (70 6 8 8 8 (16)) (70 8 6 8 8 (16)) (70 10 6 8 6 (16)) (70 8 8 10 8 (15)) (70 12 6 10 6 (15)) (70 10 8 12 8 (15)) (70 12 8 12 6 (15)) (70 12 8 14 8 (15)) (70 14 8 16 8 (15)); 17 422 -1 386 120 169 -1 70 (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (....................................................................:...............:....................................................................................) (...................................................................:::::::::::.....::....................................................................................) (..................................................................::::::::::::....::::::::::::...........................................................................) (...................................................................:::::::::::.....::....................................................................................) (....................................................................:...............:...........:........................................................................) (...............................................................:::.............................:::.......................................................................) (...............................................................:::............................:::::......................................................................) (...............................................................:::..............................:........................................................................) (...............................................................:::..............................:........................................................................) (...............................................................:::..............................:........................................................................) (...............................................................:::..............................:........................................................................) (...............................................................:::..............................:........................................................................) (...............................................................:::..............................:........................................................................) (...............................................................:::..............................:........................................................................) (..............................................................:::::.............................:........................................................................) (...............................................................:::..............................:........................................................................) (............................................:...............:...:...........:...............:...............:...............:............................................) (...................................:::::::::::.....:::::::::::..............::..............::..............::..............::...........................................) (...................................::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................) (...................................:::::::::::.....:::::::::::..............::..............::..............::..............::...........................................) (............................................:...............:...............:...............:...............:...............:............................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................); 58 (421) (412 (422)); # GATE testing alternate primer based on gates: COS_SR circuit # This section contains one or more representations of a circuit # constructed using UNLESS gates. Needs elaboration... # graphic representation : IMAGE_SRC=COS_SR.gif # 17 423 -1 70 (70 0 2 2 2 (16)) (70 0 8 2 8 (16)) (70 2 2 4 2 (16)) (70 2 8 4 8 (16)) (70 4 2 6 2 (16)) (70 4 6 6 6 (16)) (70 4 8 6 8 (16)) (70 6 8 6 6 (16)) (70 6 2 8 2 (16)) (70 6 6 8 6 (15)) (70 8 4 8 6 (15)) (70 8 2 10 2 (16)) (70 10 4 8 4 (15)) (70 8 6 10 6 (15)) (70 10 6 10 8 (15)) (70 10 2 12 2 (16)) (70 12 4 10 4 (15)) (70 10 6 12 6 (15)) (70 10 8 12 8 (15)) (70 12 6 12 4 (15)) (70 12 2 14 2 (16)) (70 14 4 12 4 (15)) (70 12 8 14 8 (15)) (70 14 2 14 4 (16)) (70 16 4 14 4 (16)) (70 14 8 16 8 (15)) (70 16 8 18 8 (15)) (70 18 8 20 8 (15)); 17 424 -1 386 88 169 -1 70 (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (............:...............:...............:...............:...............:...............:...............:............................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................) (...::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................) (............:...............:...............:...............:...............:...............:...............:............................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (...............................................................................................................:::.......................................................) (..............................................................................................................:::::......................................................) (...............................................................................................................:::.......................................................) (....................................................................:...............:...............:...........:...:....................................................) (...................................................................::..............::..............::..............:::::::::::...........................................) (..................................................................::::::::::::....::::::::::::....::::::::::::....::::::::::::...........................................) (...................................................................::..............::..............::..............:::::::::::...........................................) (....................................................................:...............:...........:...:...............:....................................................) (................................................................:..............................:::.......................................................................) (................................................................:.............................:::::......................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (................................................................:...............................:........................................................................) (..............................................................:::::.............................:........................................................................) (...............................................................:::..............................:........................................................................) (............................................:...............:...:...........:...............:............................................................................) (...................................:::::::::::..............::..............::..............::...........................................................................) (...................................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................) (...................................:::::::::::..............::..............::..............::...........................................................................) (............................................:...:...........:...............:...............:............................................................................) (...............................................:::..............................:........................................................................................) (..............................................:::::.............................:........................................................................................) (...............................................:::..............................:........................................................................................) (...............................................:::..............................:........................................................................................) (...............................................:::..............................:........................................................................................) (...............................................:::..............................:........................................................................................) (...............................................:::..............................:........................................................................................) (...............................................:::..............................:........................................................................................) (...............................................:::..............................:........................................................................................) (...............................................:::............................:::::......................................................................................) (...............................................:::.............................:::.......................................................................................) (............:...............:...............:...................................:...........:...............:...............:...............:...............:............) (...:::::::::::.....:::::::::::.....:::::::::::..............................................::..............::..............::..............::..............::...........) (...::::::::::::....::::::::::::....::::::::::::....................................::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::..........) (...:::::::::::.....:::::::::::.....:::::::::::..............................................::..............::..............::..............::..............::...........) (............:...............:...............:...............................................:...............:...............:...............:...............:............) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................); 58 (423) (412 (424)); # GATE testing alternate primer based on gates: COS_D circuit # This section contains one or more representations of a circuit # constructed using UNLESS gates. Needs elaboration... # graphic representation : IMAGE_SRC=COS_D.gif # 17 425 -1 70 (70 0 2 2 2 (16)) (70 0 6 2 6 (16)) (70 2 2 4 2 (16)) (70 2 6 4 6 (16)) (70 4 2 6 2 (16)) (70 4 6 6 6 (16)) (70 6 2 8 2 (16)) (70 6 6 8 6 (16)) (70 8 2 10 2 (16)) (70 8 6 10 6 (16)) (70 10 6 10 4 (16)) (70 10 10 10 8 (16)) (70 10 2 12 2 (16)) (70 10 4 12 4 (16)) (70 10 6 12 6 (16)) (70 10 8 12 8 (16)) (70 12 10 10 10 (16)) (70 12 0 12 2 (16)) (70 12 2 12 4 (15)) (70 12 6 12 8 (16)) (70 12 10 12 12 (16)) (70 12 4 14 4 (16)) (70 12 8 14 8 (15)) (70 14 10 12 10 (16)) (70 12 12 14 12 (16)) (70 14 0 14 2 (16)) (70 14 2 14 4 (16)) (70 14 4 14 6 (15)) (70 14 6 14 8 (15)) (70 14 8 14 10 (15)) (70 16 10 14 10 (16)) (70 14 12 16 12 (16)) (70 16 12 18 12 (16)) (70 18 12 20 12 (16)); 17 426 -1 386 109 169 -1 70 (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (...............................................................................................:::.............:::.......................................................) (..............................................................................................:::::...........:::::......................................................) (...............................................................................................:::.............:::.......................................................) (............:...............:...............:...............:...............:...............:...:...............:........................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................) (...::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................) (............:...............:...............:...............:...............:...............:............................................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (................................................................................................:..............:::.......................................................) (..............................................................................................:::::...........:::::......................................................) (...............................................................................................:::.............:::.......................................................) (............................................................................................:...:...........:...:........................................................) (...................................................................................:::::::::::.....:::::::::::...........................................................) (...................................................................................::::::::::::....::::::::::::..........................................................) (...................................................................................:::::::::::.....:::::::::::...........................................................) (................................................................................:...........:...............:............................................................) (...............................................................................:::..............................:........................................................) (..............................................................................:::::.............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::............................:::::......................................................) (...............................................................................:::.............................:::.......................................................) (............:...............:...............:...............:...............:...............:...................:........................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................) (...::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::....::::::::::::..........................................................................) (...:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........................................................................) (............:...............:...............:...............:...............:...............:............................................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (...............................................................................................:::..............:........................................................) (..............................................................................................:::::...........:::::......................................................) (...............................................................................................:::.............:::.......................................................) (............................................................................................:...:...........:...:........................................................) (...................................................................................:::::::::::..............::...........................................................) (...................................................................................::::::::::::....::::::::::::..........................................................) (...................................................................................:::::::::::..............::...........................................................) (................................................................................:...........:...............:............................................................) (...............................................................................:::..............................:........................................................) (..............................................................................:::::.............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::..............................:........................................................) (...............................................................................:::............................:::::......................................................) (...............................................................................:::.............................:::.......................................................) (....................................................................................:...............:...........:...:....................................................) (...................................................................................:::::::::::.....:::::::::::.....:::::::::::...........................................) (..................................................................................::::::::::::....::::::::::::....::::::::::::...........................................) (...................................................................................:::::::::::.....:::::::::::.....:::::::::::...........................................) (....................................................................................:...............:...............:....................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (...............................................................................................:::.......................................................................) (..............................................................................................:::::......................................................................) (...............................................................................................:::.......................................................................) (................................................................................................:...........:...............:...............:...............:............) (...................................................................................................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........) (...................................................................................................::::::::::::....::::::::::::....::::::::::::....::::::::::::..........) (...................................................................................................:::::::::::.....:::::::::::.....:::::::::::.....:::::::::::...........) (............................................................................................................:...............:...............:...............:............) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................) (.........................................................................................................................................................................); 58 (425) (412 (426)); # GATE probing networks of unless gates 17 427 -1 0 365 -1 0 303 -1 0 157 -1 11 428 (56 (365) (303)) (82 (0 39 (18 (58 (39) (428)) (70 (56 (39) 0) (56 (39) 1) (56 (39) 2) (56 (39) 3) (157)) (39))) (365)); 17 429 -1 0 365 -1 0 303 -1 11 430 (55 -1 365) -1 11 428 (56 (365) -1 7 (7 (430) 1) (303)) -1 56 (428) 4; 17 431 -1 0 365 -1 0 432 -1 0 433 (18 (3 (432) 0) (431 (380 (433 -1 365)) (7 (432) 1) (433)) (365)); 17 434 -1 0 365 -1 0 433 -1 431 (365) (55 -1 365) (433); # test cos_not gate 17 435 -1 0 37 -1 11 107 (413) -1 11 107 (434 (107) (0 107 (427 (107) 0 (37)))) -1 429 (107) 0; 2 (15) -1 435 -1 16; 2 (16) -1 435 -1 15; # test cos_and gate 17 436 -1 0 37 -1 0 36 -1 11 107 (415) -1 11 107 (434 (107) (0 107 (427 (427 (107) 0 (37)) 1 (36)))) -1 429 (107) 0; 2 (15) -1 436 (15) (15); 2 (15) -1 436 (15) (16); 2 (15) -1 436 (16) (15); 2 (16) -1 436 (16) (16); # this code is more awkward than it needs to be - # should make circuits mutable # NOTE end of part 3, start of part 4 # The following parts of the message start # to introduce some self-reference into the message 1 437; # SELF a mechanism for referring to parts of the message # Many choices for how to do this. # Could do it without special machinery by using the # standard A-B trick for giving e.g. a Turing machine # access to its own description. # Instead, will simply introduce a "primer" function # that gives access to every statement made so far # (question: should future statements be included? # tentatively assume YES: will simplify # discussion of creating modified copies of the # complete message). # For now, assume primer is a list of statements, # with each statement being a list in the same # form as "translate" functions expect. # This means that there is, for now, no # distinction between unary or binary, # and the "/" structure is expanded. 1 35; # this line is referred to later - change/move carefully 58 (56 (35) 0) (70 1 1); 58 (56 (35) 1) (70 1 2); 58 (56 (35) 2) (70 1 3); 11 66 (67 (35) (70 1 35) (0 37 0)) (58 (56 (35) (5 (66) 1)) (70 58 (70 56 (70 35) 0) (70 70 1 1))); # Now, we could return to the MUD, simulate an agent A # transferring a copy of the primer to another agent B, # and then show B making a modified copy of that primer # and passing it back to A. # We could also show agents experimenting with the # primer in various ways.