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
Define asynchronous bus. Asynchronous buses are the ones in which every item being transferred is accompanied by a control signal that shows its presence to the destination uni

Question: (a) Briefly explain how the functionality of the WWW has been enhanced, after its birth at CERN site. Use examples to illustrate your answer. (b) Many modern com

Q. What is Input-output processors? let's briefly summarize the development in area of input/output functions. These can be briefed as below: 1. CPU directly controls a peri

State Disadvantages of object oriented analysis design You know that OO methods only create functional models within objects. There is no place in methodology to design a compl

Define Random scan/Raster scan displays?  Random scan is a method in which the display is made by the electronic beam which is directed only to the points or part of the screen

Question : (a) What are the main aspects that should be considered when dealing with green screen? (b) Explain clearly how these video effects alters a video using an illust

Write a recursive algorithm to delete the leaves of a binary tree. Programming Requirements You must use the binary search tree code provided.  Each algorithm must be impleme

CIH, also known  as Chernobyl or Spacefiller, is a Microsoft Windows computer virus which first emerged in 1998. It is one of the most damaging viruses, overwriting critical inform

Using D-Flip flops and waveforms explain the working of a 4-bit SISO shift register. Ans. Serial In-Serail Out Shift Register: Fig.(a) demonstrates a 4 bit serial in-serial out

A school district has I neighbourhoods, J schools and G grades at every school. Every school j has a capacity of C jg for grade g. In every neighbourhood i, the student population