From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: * X-Spam-Status: No, score=1.2 required=5.0 tests=BAYES_00,FROM_DOMAIN_NOVOWEL, INVALID_DATE,MSGID_SHORT,REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.3 4.3bsd-beta 6/6/85; site sdcrdcf.UUCP Path: utzoo!watmath!clyde!cbosgd!ihnp4!hplabs!sdcrdcf!markb From: markb@sdcrdcf.UUCP (Mark Biggar) Newsgroups: net.lang.ada,net.lang Subject: Re: Annual Obfuscated Ada Code Contest Message-ID: <2738@sdcrdcf.UUCP> Date: Fri, 4-Apr-86 15:35:24 EST Article-I.D.: sdcrdcf.2738 Posted: Fri Apr 4 15:35:24 1986 Date-Received: Tue, 8-Apr-86 04:43:49 EST References: <2425@burdvax.UUCP> Reply-To: markb@sdcrdcf.UUCP (Mark Biggar) Organization: System Development Corporation R&D, Santa Monica Keywords: Ugly, Code, Ada, Contest, Hints Xref: watmath net.lang.ada:747 net.lang:2309 List-Id: As a possible aid to those entering this contest, I am posting the specification of an Ada ugly-printer program. This proposal is brought to you by Larry Wall, Mark and Jon Biggar (the western branch of REAL men at SDC). We wrote this about 2 years ago. ------------------------------- PROPOSAL FOR UGLY-PRINTER APSE TOOL Purpose: To render an Ada program unreadable by anything except a compiler. Function: The Ada ugly-printer should do the following: -- remove all unnecessary spaces. -- remove or displace meaningful comments, and insert spurious comments, preferably containing Ada code or text which appears to be meaningful. -- insert spurious pragmas which will be ignored by the compiler. -- insert lots of null statements. -- say "with UNCHECKED_CONVERSION, UNCHECKED_DEALLOCATION" in front of all program units, whether used or not. -- fill up lines most of the time, but occasionally do a section with newlines between every token. -- make lines longer than a screen width, if the compiler will handle it. -- most of the time, replace " with %, # with :, and | with !. -- for numeric literals, use based, exponential notation with random bases, preferably not base 2, 8, 10, or 16. Whenever possible use fractions rather than negative exponents. -- insert underlines randomly in numeric literals. -- insert one or more extra sets of parentheses around most literals, whether numeric, string, or aggragate. -- randomly intermix upper and lower case in identifiers and keywords. -- write all strings as concatenations and/or aggragates (in random, named notation). If the ugly-printer is capable of parsing and maintaining a symbol table, the following may also be done: -- change all infix operators to functional notation, with named operands in reverse order, especially for non-symmetrical operators. -- scramble named notations, perhaps making some positional. -- rename items to meaningless names, and use those names. -- throw in unused labels. Mark Biggar {allegra,burdvax,cbosgd,hplabs,ihnp4,akgua,sdcsvax}!sdcrdcf!markb