13.12.2012 Views

Theoretical and Experimental DNA Computation (Natural ...

Theoretical and Experimental DNA Computation (Natural ...

Theoretical and Experimental DNA Computation (Natural ...

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

4.10 The Translation Process 95<br />

program are dependent only on the number of inputs, this transformation can<br />

always be carried out from just the value of n.<br />

Recall that instk(x), the program instantiated on processor Px by instruction<br />

Ak of the (modified) control program, is a sequence of numbered<br />

instructions drawn from Table 4.4. Furthermore, instk(x) <strong>and</strong>instk(y) are<br />

identical except for specific references to memory locations. It follows that in<br />

describing the translation to a combinational circuit, it suffices to describe the<br />

process for a single processor: an identical translation will then apply for all<br />

other processors working in parallel.<br />

The simulation of the program running on a single processor lies at the<br />

core of the combinational circuit translation, <strong>and</strong> requires some initial transformation<br />

of the given program. To assist with this we employ the concept of<br />

a program control graph.<br />

Definition 2. Let P =< p1,p2,...,pt > be an ordered sequence of numbered<br />

instructions from the set described in Table 4.4. The control graph, G(V,E)<br />

of P is the directed graph with vertex set {1, 2,...,t} <strong>and</strong> edge set defined as<br />

follows: there is an edge (v, w) directed from v to w if instruction pw immediately<br />

follows instruction pv (note, “immediately follows” means w = v +1<br />

<strong>and</strong> pv is not an unconditional jump) or pv has the form JUMP w or JEQ<br />

x, w. Notice that each vertex in G has either exactly one edge directed out of it<br />

or, if the vertex corresponds to a conditional jump, exactly two edges directed<br />

out of it. In the latter case, each vertex on a directed path from the source of<br />

the branch corresponds to an instruction which would be executed only if the<br />

condition determining the branch indicates so.<br />

We impose one restriction on programs concerning the structure of their corresponding<br />

control graphs.<br />

Definition 3. Let G(V,E) be the control graph of a program P . G is well<br />

formed if, for any pair of directed cycles C =< c1,...,cr > <strong>and</strong> D =<<br />

d1,...,ds > in G, it holds that {c1,...,cr} ⊂{d1,...,ds}, {d1,...,ds} ⊂<br />

{c1,...,cr}, or{c1,...,cr}∩{d1,...,ds} = ∅.<br />

It is required of the control graphs resulting from programs that they be<br />

well formed. Notice that the main property of well-formed graphs is that any<br />

two loop structures are either completely disjoint or properly nested. The<br />

next stage is to transform the control graph into a directed acyclic graph<br />

which represents the same computation as the original graph. This can be<br />

accomplished by unwinding loop structures in the same way as was done for<br />

the main control program.<br />

Let HP be the control graph that results after this process has been completed.<br />

Clearly HP is acyclic. Furthermore, if the program corresponding to<br />

HP is executed, the changes made to the memory, M, are identical to those<br />

that would be made by P . Finally, the number of vertices (corresponding to<br />

the number of instructions in the equivalent program) is O(t), where t is the<br />

worst case number of steps executed by P .

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!