Implementation for the prime machine, Computer Engineering

Assignment Help:

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.


Related Discussions:- Implementation for the prime machine

Block diagram of a microcomputer system, Q. Block Diagram of a Microcompute...

Q. Block Diagram of a Microcomputer System? Before going on to consider the I/O sub/systems of a computer, let's discuss how a digital computer system can be realized by a micr

Explain the importance of computer architecture, Explain the importance of ...

Explain the importance of computer architecture Studying the architecture implies working on machine language programs. However, this isn't practical when we design a computer

How a java program compiles, How a Java program compiles? First sou...

How a Java program compiles? First source file name should be extended with .java extension. For example Myprog.java Execute javac compiler. javac compiler creates

Processor-memory interconnection network (pmin), Processor-Memory Interconn...

Processor-Memory Interconnection Network (PMIN) This is a switch that joined various processors to different memory modules. Connecting every processor to each memory module in

Ida* search - artificial intelligence, IDA* Search - artificial intelligenc...

IDA* Search - artificial intelligence: A* search is a sophisticated and successful search strategy. In fact, a problem with A* search is that it must keep all states in its me

Is the address bus unidirectional, The address bus is unidirectional due to...

The address bus is unidirectional due to the address information is always given by the Micro Processor to address a memory location of an input or output devices.

What is a size category, What is a Size Category? The Size category ve...

What is a Size Category? The Size category verifies the probable space needs of the table in the database.

Show the reset and submit buttons in html, Reset and Submit are special typ...

Reset and Submit are special types of input buttons. Submit is used to send data to the server and Reset resets/clears the form.

Linux, Explain about unix file system architecture

Explain about unix file system architecture

Objectives-classification of parallel computers , Objectives After goi...

Objectives After going through this unit, you should be able to: Describe the diffrent criteria on which classification of parallel computers are based; Examine the

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd