Implementation for the prime machine, Computer Engineering

Assignment Help:

Write an implementation for the Prime machine (de?ned at the end of the assignment sheet). Provide a suitable invariant and variant for any loop you use. Provide comments in your machine stating the precondition and postcondition which the initialised loop meets.

An abstract machine, Bu?er is de?ned at the end of this assignment sheet. Provide a re?nement of this machine which stores the queue in an array:

aa : 1 . . qlen → ELEM

When elements are removed from the front of the queue, the array itself is not altered but the positions become available for overwriting. When adding elements, once the end of aa is reached, wrap-around can occur if positions at the front of aa are available. Thus forexample, if the capacity is 8, the sequence [a, b, c, d] may correspond to:

938_implementation for the Prime machine.png

etc (where * indicates any element).

To do this you will need to introduce some further state variables to keep track of the situation in the array and to enable you to relate the state of aa to the state of bu? . Provide the linking invariant which captures this invariant and incorporate it in a re?nement machine BufferR.


Related Discussions:- Implementation for the prime machine

Illustrate function of 4-input multiplexer using basic gates, Illustrate fu...

Illustrate functional diagram of digital multiplexer . Write the scheme of a 4- input multiplexer using basic gates (AND/OR/NOT) and explain its operation. Ans: Multiple

explain compiler, Compiler is used to change the high-level language progr...

Compiler is used to change the high-level language program into machine code at a time. It doesn't needs special instruction to store in a memory, it keeps automatically. The imple

Dynamic address translation - computer architecture, Dynamic address transl...

Dynamic address translation :  If, when executing an instruction, a CPU fetches an instruction located at a specific virtual address, or fetches data from a particular virtual

Micrography technology, Micrography: Micrographic technology is an out...

Micrography: Micrographic technology is an outgrowth of photographic technology. Since this technology is being increasingly used to supplement computer systems, strong electr

How many voice channel have a master group, A Master group consists of? ...

A Master group consists of? A master group have 300 voice channels.

What is the function of alu, What is the function of ALU? Most of the c...

What is the function of ALU? Most of the computer operations (arithmetic and logic) are performed in ALU. The data needed for the operation is brought by the processor and the

Program for interchanging the values of two memory locations, Q. Program fo...

Q. Program for interchanging the values of two Memory locations? Program for interchanging the values of two Memory locations  ; input: Two memory variables of same size:

What is exact and approximation algorithm, What is Exact and Approximation ...

What is Exact and Approximation algorithm? The principal decision to choose solving the problem exactly is called exact algorithm. The   principal decision to choose solving th

Dynamic configuration of parallel virtual machine, Q. Dynamic Configuration...

Q. Dynamic Configuration of parallel virtual machine? int pvm_addhosts( char **hosts, int nhost, int *infos ) Add hosts to virtual machine. hosts is an arra

What is data hazard, What is data hazard? Any condition that causes the...

What is data hazard? Any condition that causes the pipeline to stall is known as a hazard. A data hazard is any condition in which either the source or destination operands of

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd