Damon Decantes Interpreter

After recent interception of a Void fleet by the Marshalship, a boarding team was able to commandeer The Eye of Multiplicity. This vessel, the ship of Damon Decantes, has given us plenty of insight into the workings of his creations and technology. Given his ability not only to multiply, but for each multiple to make full use of an individual’s productivity, it’s likely that focusing on deciphering such technology will extremely productive in turn, simply from frequency of exposure.

That thought in mind, I’ve been working to create an interpreter for the primary language used on his ship. From what I’ve been able to deduce, it’s design is meant to be implemented as a simple but efficient functional language, and have been able to create an interpreter within one of our own in turn.

Basic Values thus far have been defined by the following.

i, j, k ∈ INT ::= ...|-2|-1|0|1|2|...
b       ∈ BOOL::= True|False
V, W    ∈ VAL ::= ()| [] | i | b | V : W | (V1, ..., Vn) | \ (x1, ..., xn) -> M

And Expression syntax has been given below.

x, y, z ∈ VAR ::= ...| x | y | z | ... | temp | ...
M, N, P ∈ EXP ::= V | x
                | not M | M&&N | M || N
                | M==N | M+N | M*N |
                | nil? M | head M | tail M | M : N
                | MN | (M1, ..., Mn)
                | if M then N else P
                | let (x1, ..., xn) = M in N

Given this expression syntax, there must also be some semblance of constraint rules, otherwise we can come up with garbage expressions (a head or tail operator on something other than a list type, for example).  Said constraints are upheld within the interpreter with an error wrapper. I’ll be looking to further this until I’ve encompassed the full language. Here is the working application thus far.

Interpreter Source

Filed under: General | Posted on November 19th, 2009 by Crono

Leave a Reply

Categories

Archive

Links

Meta

Copyright © 2024 CoRe Technology Initiative. All rights reserved.

Tech Blue designed by Hive Designs • Ported by Free WordPress Themes and Online Marketing