1 <rpc-reply xmlns="urn:ietf:params:xml:ns:netconf:base:1.0" message-id="m-1">
2 <data xmlns="urn:ietf:params:xml:ns:yang:ietf-netconf-monitoring"><?xml version="1.0" encoding="UTF-8"?>
3 <module name="turing-machine"
4 xmlns="urn:ietf:params:xml:ns:yang:yin:1"
5 xmlns:tm="http://example.net/turing-machine">
6 <namespace uri="http://example.net/turing-machine"/>
7 <prefix value="tm"/>
9 <text>Data model for the Turing Machine.</text>
11 <revision date="2013-12-27">
13 <text>Initial revision.</text>
16 <typedef name="tape-symbol">
17 <type name="string">
18 <length value="0..1"/>
21 <text>Type of symbols appearing in tape cells.
23 A blank is represented as an empty string where necessary.</text>
26 <typedef name="cell-index">
27 <type name="int64"/>
29 <text>Type for indexing tape cells.</text>
32 <typedef name="state-index">
33 <type name="uint16"/>
35 <text>Type for indexing states of the control unit.</text>
38 <typedef name="head-dir">
39 <type name="enumeration">
40 <enum name="left"/>
41 <enum name="right"/>
43 <default value="right"/>
45 <text>Possible directions for moving the read/write head, one cell
46 to the left or right (default).</text>
49 <grouping name="tape-cells">
51 <text>The tape of the Turing Machine is represented as a sparse
54 <list name="cell">
55 <key value="coord"/>
57 <text>List of non-blank cells.</text>
59 <leaf name="coord">
60 <type name="cell-index"/>
62 <text>Coordinate (index) of the tape cell.</text>
65 <leaf name="symbol">
66 <type name="tape-symbol">
67 <length value="1"/>
70 <text>Symbol appearing in the tape cell.
72 Blank (empty string) is not allowed here because the
73 'cell' list only contains non-blank cells.</text>
78 <container name="turing-machine">
80 <text>State data and configuration of a Turing Machine.</text>
82 <leaf name="state">
83 <type name="state-index"/>
84 <config value="false"/>
85 <mandatory value="true"/>
87 <text>Current state of the control unit.
89 The initial state is 0.</text>
92 <leaf name="head-position">
93 <type name="cell-index"/>
94 <config value="false"/>
95 <mandatory value="true"/>
97 <text>Position of tape read/write head.</text>
100 <container name="tape">
101 <config value="false"/>
103 <text>The contents of the tape.</text>
105 <uses name="tape-cells"/>
107 <container name="transition-function">
109 <text>The Turing Machine is configured by specifying the
110 transition function.</text>
112 <list name="delta">
113 <key value="label"/>
114 <unique tag="input/state input/symbol"/>
116 <text>The list of transition rules.</text>
118 <leaf name="label">
119 <type name="string"/>
121 <text>An arbitrary label of the transition rule.</text>
124 <container name="input">
126 <text>Input parameters (arguments) of the transition rule.</text>
128 <leaf name="state">
129 <type name="state-index"/>
130 <mandatory value="true"/>
132 <text>Current state of the control unit.</text>
135 <leaf name="symbol">
136 <type name="tape-symbol"/>
137 <mandatory value="true"/>
139 <text>Symbol read from the tape cell.</text>
143 <container name="output">
145 <text>Output values of the transition rule.</text>
147 <leaf name="state">
148 <type name="state-index"/>
150 <text>New state of the control unit. If this leaf is not
151 present, the state doesn't change.</text>
154 <leaf name="symbol">
155 <type name="tape-symbol"/>
157 <text>Symbol to be written to the tape cell. If this leaf is
158 not present, the symbol doesn't change.</text>
161 <leaf name="head-move">
162 <type name="head-dir"/>
164 <text>Move the head one cell to the left or right</text>
171 <rpc name="initialize">
173 <text>Initialize the Turing Machine as follows:
175 1. Put the control unit into the initial state (0).
177 2. Move the read/write head to the tape cell with coordinate
180 3. Write the string from the 'tape-content' input parameter to
181 the tape, character by character, starting at cell 0. The
182 tape is othewise empty.</text>
185 <leaf name="tape-content">
186 <type name="string"/>
187 <default value=""/>
189 <text>The string with which the tape shall be initialized. The
190 leftmost symbol will be at tape coordinate 0.</text>
195 <rpc name="run">
197 <text>Start the Turing Machine operation.</text>
200 <rpc name="run-until">
202 <text>Start the Turing Machine operation and let it run until it is halted
203 or ALL the defined breakpoint conditions are satisfied.</text>
206 <leaf name="state">
207 <type name="state-index"/>
209 <text>What state the control unit has to be at for the execution to be paused.</text>
212 <leaf name="head-position">
213 <type name="cell-index"/>
215 <text>Position of tape read/write head for which the breakpoint applies.</text>
218 <container name="tape">
220 <text>What content the tape has to have for the breakpoint to apply.</text>
222 <uses name="tape-cells"/>
226 <leaf name="step-count">
227 <type name="uint64"/>
229 <text>The number of steps executed since the last 'run-until' call.</text>
232 <leaf name="halted">
233 <type name="boolean"/>
235 <text>'True' if the Turing machine is halted, 'false' if it is only paused.</text>
240 <notification name="halted">
242 <text>The Turing Machine has halted. This means that there is no
243 transition rule for the current state and tape symbol.</text>
245 <leaf name="state">
246 <type name="state-index"/>
247 <mandatory value="true"/>
249 <text>The state of the control unit in which the machine has
253 </notification>
254 <notification name="paused">
256 <text>The Turing machine has reached a breakpoint and was paused.</text>
258 <leaf name="state">
259 <type name="state-index"/>
260 <mandatory value="true"/>
262 <text>State of the control unit in which the machine was paused.</text>
265 <leaf name="head-position">
266 <type name="cell-index"/>
267 <mandatory value="true"/>
269 <text>Position of tape read/write head when the machine was paused.</text>
272 <container name="tape">
274 <text>Content of the tape when the machine was paused.</text>
276 <uses name="tape-cells"/>
278 </notification>