git @ Cat's Eye Technologies GraNoLa-M / 928ccfa
Add some (very) failing tests. Cat's Eye Technologies 8 years ago
4 changed file(s) with 52 addition(s) and 19 deletion(s). Raw diff Collapse all Expand all
00 *.beam
1 erl_crash.dump
00 syntax: glob
11
22 *.beam
3 erl_crash.dump
55
66 GraNoLa/M is a programming language that owes much of its heritage to
77 Tamerlane and Q-BAL, but hints of BASIC, LISP, FORTH, SETL, Muriel, and
8 Aardappel can be detected in faint outline. It widely believed to be a
8 Aardappel can be detected in faint outline. It is widely believed to be a
99 subset of a much larger, PL/I-like language called 'GraNoLa/88800'.
1010
1111 Data Types
5757 ---------
5858
5959 All GraNoLa/M operations work on graphs. Actually they work on an
60 internal stack of graphs - actually the stack is nothing more than a
60 internal stack of graphs — actually the stack is nothing more than a
6161 graph, but to avoid (and cause) confusion, we will call it a stack,
6262 because mainly we are concerned with putting things into it and getting
6363 things off of it.
100100 Operations
101101 ----------
102102
103 * #label - push a nub onto the stack
104 * 0label - push an empty graph (node) onto the stack
105 * 1label - copy node with label from program onto stack
106 * @label - set the cursor to label
107 * whebong - push current (sub)program onto stack
108 * duronilt - pop graph and replace current (sub)program with it
109 * chehy - pop graph off of stack and use it as new stack
110 * taug - push stack onto stack embedded into a new node
111 * soduv - pop a graph, set execution order to first if it is empty, last if not
112 * rehohur - pop and discard graph
113 * bimodang - pop label and jump to it as subroutine in current program graph
114 * ubewic - return from current subroutine (jump back to last bimodang)
115 * chuwakagathaz - switch to nondeterministic execution order (default)
116 * sajalom - deterministic execution order - use first edge
117 * grangnum - deterministic execution order - use last edge
118 * uwaming - pop a graph off the stack and print it
119 * bejadoz - input a graph (in GraNoLa/M syntax) and push it on the stack
103 * `#`label - push a nub onto the stack
104 * `0`label - push an empty graph (node) onto the stack
105 * `1`label - copy node with label from program onto stack
106 * `@`label - set the cursor to label
107 * `whebong` - push current (sub)program onto stack
108 * `duronilt` - pop graph and replace current (sub)program with it
109 * `chehy` - pop graph off of stack and use it as new stack
110 * `taug` - push stack onto stack embedded into a new node
111 * `soduv` - pop a graph, set execution order to first if it is empty, last if not
112 * `rehohur` - pop and discard graph
113 * `bimodang` - pop label and jump to it as subroutine in current program graph
114 * `ubewic` - return from current subroutine (jump back to last bimodang)
115 * `chuwakagathaz` - switch to nondeterministic execution order (default)
116 * `sajalom` - deterministic execution order - use first edge
117 * `grangnum` - deterministic execution order - use last edge
118 * `uwaming` - pop a graph off the stack and print it
119 * `bejadoz` - input a graph (in GraNoLa/M syntax) and push it on the stack
120120
121 Tests
122
123 -> Functionality "Interpret GraNoLa/M Program" is implemented by
124 -> shell command "bin/granolam %(test-body-file)"
125
126 -> Tests for functionality "Interpret GraNoLa/M Program"
127
128 | a=^#cthulhu(b=^uwaming(^a))
129 = ??
130
131 | a=^whebong(b=^uwaming(^a))
132 = ??
133
134 | a=^0hello(b=^@hello(c=^taug(d=^uwaming(^a))))
135 = ??
136
137 | a=^1hello(b=^uwaming(end=() hello=(world())))
138 = ??
139
140 | a=^sajalom(b=^#d(c=^bimodang(^a))
141 = ??
142
143 | d(e=^#sakura(f=^uwaming(g=^ubewic()))))
144 = ??
145
146 | a=^sajalom(b=^bejadoz(c=^soduv(^a d())))
147 = ??
0 #!/bin/sh
1
2 ./make.sh
3 falderal doc/GraNoLa-M.markdown