Tetral

=Setting=

Tetral is an artistic language designed to be used by cyborgs and robots in science-fiction stories. Therefore, it is also highly logical, in order to sound very computer-like. The language is designed around a base-4 numeral system.

=Phonology=

As previously said, tetral is not language based on phonemes, but rather on base-4 numeral system. So, the four digits are:

The immediate advantage is that tetral is easily encoded on a computer. Since there are many other ways to represents numbers than record it in a computer, there are many way to represent the language. It is a big advantage of tetral : you can commumicate with either speach, wrinting, smoke signals, color code, ... Any form of communication can do, as far as it is possible to represent a base-4 number with it (or even binary).

The tetral language is designed between codons. A codon is a base-4 number with three digits, precedings zeros unommited. Codon is the actual base unit of the language, something whose meaning is somwhere between a phoneme and a syllable. Codons should be made well visible in order to help the reader no to read the codons with one or two digits shifted, which is correct but wouldn't make any sense. In this document I will write codons with the first digit in bold, like this :

001321311103000032103213032133

=Basic Grammar=

Morphology
Words are successions of codons. There two types of words : meaningful words and structural words.

As their name suggests, meaningful word are words with a meaning in them, such as 302 302 (tree). Meaningful words are composed with codons that do not repeat three times the same digit. Thus 000, 111, 222, 333, are forbidden codons to write meaningful words.

On the other hand structural words carries nearly no meaning. They are only there to structure sentences and show relations between words. The blank word is to ba taken apart. It is written 000. This is the only word that contains the codon 000, absolutely no other word can contains 000. The blank word is used to separate other words. Other structural words use the codons 111, 222 and 333. The amount of structural words is very limited. Here is the list :

333111

Arboresence
The tetral language is articulated around an arborescence. Each arborescence correspond to a sentence. Computer science terminology can be reused here. The root is the topmost node, the one without parent. The depth of a node is 0 if the node is the root and the depth of its parent plus one else. The heigth of an arborescence is the maximum depth of nodes plus one (since we counted depth from 0).

Children are given as a list of nodes enclosed in a kind of brackets and placed right after their parent. Note that there is no problem in specifying nested lists of child nodes. Actually this the way to make full sentences.

Parameters list
A parameter is a node which is a complement for its parents. Parameters are enclosed between the 111333 and the 333111 structural words.

For example the following arborescence is the english nominal group for "large mountain". The parent word is mountain (033233211), and its complement, large (031) is put in the argument list.

033233211 000 111333 000 031 000 333111

Note that the blank key words can be ommitted here (see Essential grammar to know when blank words can be skipped), so the nominal group can be simplified as fellow.

033233211 111333 031 333111

Note that the arborescence on its own mean "The mounatin is small", with a "to be" verb. There no word as useful as to be in tetral. And althought there words fo equality and existence of things, to be is is generally implicit.

Arguments list
The arguments are the nodes their parents refer to in its meaning. For exemple, to say "a tree and a river", you will use "and"(213) as the parent keyword, and "tree"(302302) and "river"(200313) as its arguments.

213 000 222333 000 302302 000 200313 000 333222

Note again that some blank words can be omitted.

213 222333 302302 000 200313 333222

Affectations
The 333 words has several usage. One on wich is to specify the nature of a relation between a parameter ans its parents.

Let's take an example. Let's try to build the fellowing sentence : To go to the river. "to go" is 003330 and river is 200313. Intuitively we put go as the root and put river as one of its parameters, like this : 003330 111333 200313 333111 (with some omitted blanks)

But there a problem. "To go" is a motion and therefore, this senctence could either mean "to go to the river", or "to go from the river". How to guess ? In casual language it could be deduced from contex, but in correct tetral you must specify the nature of the relation (here, a "from" or a "to"). This is done by adding a meaningful word, called a indicator, 213 in our example (meaning "to") and to prefix it to the parameters, separed from it with the word 333 instead of 000.

003330 111333 213 333 200313 333111

To say "to go from the river", just use 123 (from) instead od 213.

003330 111333 123 333 200313 333111

There are several indicators. Here is a list :

Note that indicators are regulars meaningful words like any other and can be used as such. For example, you could use 123 as a regular word and say 003330 111333 213 333 123 333111, which simply means that you are going back to where you come from.

Variables and macros
333 has another meaning, it servers to affect variables.

Variables are regular meaningful words whom a new meaning is affected with 333. In order words, this an easy way to create new words. Actually if the word has already a meaning, then it gains a new meaning that is the merging of its old meaning and its new one. This is what was done in the above section. Note that the word that give the new meaning remains unchanged after the affectaion.

The scope of a variable is the area of arborescence within wich the new meaning of this variable is valid. In tetral the scope belongs to the siblings nodes of the node of the variable is affected and their subtrees. So if you want to affect a variable to a whole text, you have to affect it as root of an arborescence.

For example if you have to speak several times of a small river in a large mountain and a large river in a small mountain, you could affect them into an inexistant words, and therefore switch really easely unambigously from one to the other.

231220031320 333 200313 111333 112 333 033233211 111333 031 333111 330021 333111 (affect the small river in the large mountain to 231220031320)

321321220013 333 200313 111333 112 333 033233211 111333 330021 333111 031 333111 (affect the large river in the small mountain to 321321220013)

231220031320 111333 223131011 333111 (231220031320 is on the left)

321321220013 111333 200010311 333111 (321321220013 is on the rigth)

Exception and interruptions
Comming soon ...

=Esstial grammar=

Skippable blank words
To put the word 000 between every word is really a pain, and there are many cases where it canbe avoided. Actually the blank word was designed to separe words where the separation is ambigous. In every non-ambigous case it can be ommited.

Here is a list of where you must put a space:
 * Between two meaningful words
 * Between two identical structural codons (excuding 000 itself) that belongs to two distinct words.

Here is a list of where space are optional and almast always ommited Blanks words can be stack, meaning you can put several codons 000 to note a space. This is a usual strategy to underline the depth of a node.
 * between a structural word and a meaningful word.
 * between a sequence of closing 333111 and 333222.

conjonctions
There are several logical conjonction in tetral that worth the detour. In order to fully understand them you must see them as selecting from k to n elements in a set of N elements. The set of element is specified the arguments of the logical conjonction. Here is a table for particuliar value of k and n. The equivalent for english and is then 210 (k=n=N) and equivalent for english or is either 132 or 321, dependending if we allow to select several entities or only one. 003 is the equivalent for the english no, and so is used to produce negative sentences.

003330 111333 003 222333 200313 333222 333111

go(no[river])

I didn't go to the river

Conditionnal
Conditon is done with the word 300. The condition is given with the parameter list, and the action is given as the argument list.

There no way to say "else" in tetral. This is a great pitfall as it force to used another condition structure with the opposite predicat as parameter. One way to achieve esealy this is to use a variable to store the condition. With a variable you can reference the condition as many time as you wish.

P=condition, if[then-action](P), if[else-action](no[P])

Variable-length words
=Dictionary=

=Example text=