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

What are attributes, What are Attributes?  Attributes are declarative ...

What are Attributes?  Attributes are declarative tags in code that insert additional metadata into an assembly. There exist two types of attributes in the .NET Framework: Pred

Describe real and protected mode, Describe Real and protected mode: Op...

Describe Real and protected mode: Operation of Real mode interrupt:   When microprocessor completes executing the current instruction, it concludes whether an interrupt is act

Explain types of assembly programs, Q. Explain types of assembly programs? ...

Q. Explain types of assembly programs? Assembly language programs can be written in two manners: COM Program: Having all segments as part of one segment EXE Program: that hav

Explain the design procedure for flip flop, Explain the Design Procedure fo...

Explain the Design Procedure for Flip Flop? The design procedure as follows. 1) Acquire the clear description of the desired flip flop X. 2) Acquire the present state- next

Write a program to read in a positive integer, Write a program to read in a...

Write a program to read in a positive integer and check whether it is prime or not? /* Program to check whether a given number is prime or not*/] # include # include

What are the four linq providers that .net framework ships, 1. LINQ to Obje...

1. LINQ to Objects - Implements a LINQ query against a collection of objects 2. LINQ to XML - Implements an XPATH query against XML documents 3. LINQ to SQL - Implements LINQ

What is basic time division switching, What is Basic Time Division Switch...

What is Basic Time Division Switching? Basic Time Division Switching: The functional blocks of a memory based time division switching switch is demonstrated in figure and i

What is processor time of a program, What is processor time of a program? ...

What is processor time of a program? The periods during which the processor is active is known as processor time of a program it depends on the hardware included in the executi

What is input - output commands, Q. What is Input - Output commands? Th...

Q. What is Input - Output commands? There are four kinds of I/O commands which an I/O interface can receive when it's addressed by a processor: Control : This type of c

Divide two binary numbers, Divide (101110) 2   by (101) 2 Ans. Qu...

Divide (101110) 2   by (101) 2 Ans. Quotient is = -1001 Remainder is = -001

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