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
Give the sequence of procedure calls for both server and client for connect ion-oriented application.   In connection oriented communication the order of Procedure call

Q. Basic Architecture of computer system? Replacing the ALU and CU (i.e., CPU) of Figure by a microprocessor, and storing instructions and data in the same memory, one arrives

What is a parallel port? A parallel port transfers data in the form a number of bits, typically 8 to 16, concurrently to or from the device.

Boolean algebra. Boolean algebra mathematical method based on human reasoning. In Boolean algebra only two states exist; true and false which are written as 1 (true) and 0 (fa

Q. What is Synchronous message passing? In Synchronous message passing is executed on synchronous communication network.  In that case sender and receiver processes should be

Q. What are the main functions of sound cards? Sound card (The card is frequently directly built into motherboards these days) is a board that has digital to analog sound conve


Determine the simulation factor- Weather Illustration of simulation is predicting weather (i.e. a weather forecaster). In this case we will consider what/how data is collected,

Explain the stack in digital computers The stack in digital computers is fundamentally a memory unit with an address register which can count only (after first value is loaded