The Boston Diaries

The ongoing saga of a programmer who doesn't live in Boston, nor does he even like Boston, but yet named his weblog/journal “The Boston Diaries.”

Go figure.

Wednesday, Debtember 30, 2015

So how do you determine undefined behavior in a language you are reverse engineering?

I generated a list of all possible commands in INRAC. That was easy enough to do as everything is pretty much separated by spaces. I also resorted to writing my own INRAC programs to play around with some of the odder parts of the language. By doing those things, I'm able to see what various constructs do in order to reverse engineer this bizarre language.

For instance, *6.2&N. That's a call to section 6, lines that have two letter labels where the second letter is “N”. So, any of the following lines:

AN boredom 8 bored 7 bore 7 gloom 8 gloomy 8 empty 8 hollow
BN stupidity 8 stupid 7 idiot 7 folly 8 silly 7 fool 7 jerk
CN feeling 12 feel 7 emotion 7 passion 8 passionate 8 hysterical
DN craziness 8 crazy 8 bananas 8 random 8 strange 8 weird
DN humor 7 joke 7 jokes
EN doubt
GN junk 12 stinks 8 cruel 8 useless 8 lousy 8 bad 7 garbage 
HN idleness 8 lazy 7 loafer 8 easy
JN art 8 creative 7 artist 7 life 8 alive
...
MP pray 8 holy
...

Assuming it picks “EN”, *6.2&N will return “doubt”. But if you change it to *6.4&N, and it still picks line “EN” you'll get “doubting”. Change the second number and you'll get “doubted”, “doubter” and even “doubtingness”. In looking at the section header, this has a (what I'm calling) “parsing value” of 2, which I think means “this is a list of verbs, conjugate depending upon second number.”

In the above code snippet, the numbers apply to the word following and inform INRAC of what to return for that part of speech (say for irregular verbs). There also appears to be synonyms thrown in. For instance, I wrote:

X *6MP *6.1MP *6.2MP *6.3MP *6.4MP *6.5MP *6.6MP *6.7MP *6.8MP *6.0MP

And got the following output:

prayes prayes pray prayed praying prayed prayer holiness holy pray

So it appears that the word defined for “.8” also affects the word defined for “.7”. Interesting.

I'm not sure what >31*6.2()47 fully does (examples from yesterday). It does set variable 31 to a random conjugated verb in section 6 but I can't determine what else it does. The parenthesis don't seem to do anything, nor does the extra number at the end.

I also figured out what !2*11&npr does. It sets variable 2 to the output of calling section 11, lines labeled with a term endig in “npr”. But it also outputs the section; >2*11&npr would just do an assignment with no output. This bit of weirdness: !2'3'4*11&npr, does the same as !2*11&npr but clears variables 3 and 4. Go figure.

Obligatory Picture

[It's the most wonderful time of the year!]

Obligatory Links

Obligatory Miscellaneous

You have my permission to link freely to any entry here. Go ahead, I won't bite. I promise.

The dates are the permanent links to that day's entries (or entry, if there is only one entry). The titles are the permanent links to that entry only. The format for the links are simple: Start with the base link for this site: http://boston.conman.org/, then add the date you are interested in, say 2000/08/01, so that would make the final URL:

http://boston.conman.org/2000/08/01

You can also specify the entire month by leaving off the day portion. You can even select an arbitrary portion of time.

You may also note subtle shading of the links and that's intentional: the “closer” the link is (relative to the page) the “brighter” it appears. It's an experiment in using color shading to denote the distance a link is from here. If you don't notice it, don't worry; it's not all that important.

It is assumed that every brand name, slogan, corporate name, symbol, design element, et cetera mentioned in these pages is a protected and/or trademarked entity, the sole property of its owner(s), and acknowledgement of this status is implied.

Copyright © 1999-2018 by Sean Conner. All Rights Reserved.