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

Sorting algorithms, Two way merge sort for 84,83,78,90,23,123,98,159,8,200

Two way merge sort for 84,83,78,90,23,123,98,159,8,200

Prove using boolean algebra, Q.Prove using Boolean Algebra 1. X (X+Y) = ...

Q.Prove using Boolean Algebra 1. X (X+Y) = X 2. AB + AC + BC' = AC + BC' 3. (A+B+C) (A+B'+C') (A+B+C') (A+B'+C)=A 4. (A+B'+C) (AB+A'C) = (A+C) (A'+B) 5. XY + XZ + YZ

Differentiate between http and ftp, Differentiate between http and ftp. ...

Differentiate between http and ftp. HTTP and FTP were developed to make Internet transmission better. FTP is utilized to exchange files among computer accounts, to transfer

Show the categories of web browser, Q. Show the categories of Web browser? ...

Q. Show the categories of Web browser? The two basic categories of Web browser are: • Text-only browsers: A text-only browser like Lynx allows you to view Web pag

Process of minimax algorithm, Process of Minimax algorithm: Our aim is...

Process of Minimax algorithm: Our aim is just to write the best of best score on the top branches of the tree that player one can guarantee to score if he chooses that move.

Describe the working of CRT in detail, Describe the Working of CRT The ...

Describe the Working of CRT The electron beam produces a tiny, bright visible spot when it strikes the phosphor-coated screen. A colour CRT monitor has three different coloured

Power and energy, Ask questiPower and EnergyQuestion 4Consider a processor ...

Ask questiPower and EnergyQuestion 4Consider a processor that runs at 2.5 GHz and 1 Volt. When running a given CPU-bound program,the processor consumes 100 W, of which 20 W is leak

Illustrate about 8259, Illustrate about 8259 8259A adds 8 vectored pri...

Illustrate about 8259 8259A adds 8 vectored priority encoded interrupts to the microprocessor. We can expand it to 64 interrupt requests by using one master 8259A and 8 slave

Implementation for the prime machine, Write an implementation for the Prime...

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 m

A full binary tree with ''n'' non-leaf nodes, A full binary tree with 'n' n...

A full binary tree with 'n' non-leaf nodes have  2n+l nodes.

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