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
Question: (a) Explain clearly, from pre-production to post production how you would carry out the scene with multi-camera. (b) What are the there main aspects that should be

Why does FTP use two standard ports whereas other protocols, in general use only one port? Justify. File transfer protocol uses a control connection just to send commands and r


basic purpose of cookies

Single Instruction and Multiple Data stream (SIMD) In this organisation, multiple processing elements are working under the control of a one control unit. It has multiple data

WLS8 handles JMX but it uses weblogic execution of JMX server. It does not supports generalise sun javax API which can be used with any JVM. There are some patches available which

Propositional versions of resolution: Just because of so far we've only looked at propositional versions of resolution. However in first-order logic we require to also deal wi

Problem 1 (a) List and describe the characteristics of mainframes, minicomputers and microcomputers. (b) Briefly describe what is meant by electronic commerce and what b

Nonvolatile BIOS memory refers to a small memory on PC motherboards that is used to kept BIOS settings. It was traditionally known as CMOS RAM because it used a volatile, low-power

The             electro mechanical switch (developed in 1938) had fewer moving parts than earlier switches. (A)  No. 1ESS                                 (B)  Strowger (