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

Basic software, Basic Software: The basic software is also referred to...

Basic Software: The basic software is also referred to as utilities. Basic software packages are available for performing operations such as data entry and validation, sorting

Explain the working of bcd adder, Explain the working of BCD adder One ...

Explain the working of BCD adder One of the ways of adding decimal numbers in BCD is to use a 4-bit binary adder and perform arithmetic operation one digit at a time. The low-o

String, super string checker

super string checker

Quick sort , Write Quick sort non recursive program

Write Quick sort non recursive program

How 74147 series ttl can be used as a decimal-to-bcd encoder, Illustrate ho...

Illustrate how 74147 series TTL can be used as a decimal-to-BCD encoder. Ans. Available IC in 74 series is 74147 that is a priority encoder. Such IC has active low inp

What are assets in adobe premiere pro, Question: a) What is the meanin...

Question: a) What is the meaning of the term CTI in Adobe Premiere Pro? b) What are assets in Adobe Premiere Pro? c) In Adobe Premiere Pro, what is the principal diffe

Importance of decentralization, What are the importance of Decentralization...

What are the importance of Decentralization? a) Self responsibility b) Work autonomy c) Quick decisions d) Continuous involvement and e) Better control. What are the differe

Why is fragmentation needed on internet not on a typical wan, Why is fragme...

Why is fragmentation needed on Internet not on a typical WAN? TCP/IP protocol utilizes the name IP datagram to demote to an Internet packet. The amount of data carried into a d

Explain about two-pass assembler, Q. Explain about Two-pass assembler? ...

Q. Explain about Two-pass assembler? Assemblers usually make two or more passes through a source program in order to resolve forward references in a program. A forward referenc

Interconnection network in the form of a linear array, Q. Interconnection n...

Q. Interconnection network in the form of a Linear Array? The sorting problem particularly selected is bubble sort and interconnection network may be represented as n processor

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