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 the term web service with example. A web service is an application that operate over a network-typically, over the Internet. Most typically, a web service is an API that

What are the steps in a BDC session? The first step in a BDC session is to recognize the screens of the transaction that the program will process.  Next step is to write a pro

Artificial Neural Networks - Artificial intelligence: Decision trees, while strong, are a easy representation method. While graphical on the surface, they may be seen as disjun

Read only memory (ROM) ROM holds the instructions for starting up the computer. This sort of memory can only be read and can't be altered (that implies deleted or written to) a

First Order Predicate Logic : This is a more expressive logic because it is mostly builds on propositional logic by allowing us to needs as constants, variables, predicates,

Vector reduction Instructions When operations on vector are being decreased to scalar items as a result then these are vector reduction instructions. These instructions are ref

What is sensitivity list? A list of signals which trigger execution of the block when they change value. Sensitivity list  indicates that when a change occurs to any one of

Probelm: (a) Show the attributes used by Regular Expression Pattern in a WSDL document. (b) Describe the three standard wire formats for transmitting Web Service requests a

Q. Describe about Pascaline? Blaise Pascal made very first attempt in the direction of automatic computing. He invented a device that comprised lots of gears and chains that us

What is the means of communications between R/3 and external applications? The means of communication among R/2,R/3 and external applications is by the CPI-C handler or SAP Gat