Implementation for the prime machine, Computer Engineering

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.

Posted Date: 3/8/2013 1:25:36 AM | Location : United States







Related Discussions:- Implementation for the prime machine, Assignment Help, Ask Question on Implementation for the prime machine, Get Answer, Expert's Help, Implementation for the prime machine Discussions

Write discussion on Implementation for the prime machine
Your posts are moderated
Related Questions
Texture Texture is how artists show what an object would feel like to touch. This can have a dramatic effect on how an image is perceived. Imagine for instance an image that h

How and what data is gathered- Simulation To make this as realistic as possible, data is required to be gathered over a long period of time. This can be done by sensors near/i

Write an AWK program which takes the following input file and processes it. $cat data.txt John Do 111-1111 English 90 Maths 80 Alice Do 222-2222 English 90 Maths 90 Chemistry 93

Does the minimum spanning tree of a graph give the shortest distance between any 2 specified nodes? No. The Minimal spanning tree makes sure that the total weight of the tree i

minimum number of shelves

#all type of memory

Name the appliances which are controlled by micro-processor Many household appliances which are microprocessor-controlled do not have operating systems (for example microwave o

It is not possible to use ABAP/4 Dictionary Structures without an underlying database using LDB. True.  You can use additionally related tables, along with the tables explaine

How many bits must be decoded for chip select? What is the size of decoder when 128 × 8 RAM chips are required to provide a memory capacity of 2048 bytes? Ans. All higher order l

Define the Programmable logic devices (PLD)? In the world of digital electronic systems there are three essential kinds of devices 1.memory, 2.microprocessors, and 3.logic. The