Algebraic Specification and Abstract Data Types. An abstract data type is typically characterized by a set of operations that construct structured data from primitive data extract primitive data from a data structure modify the contents of a data structure
Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.
type complex imports realoperations: +:complex Χ complex → complex -: complex Χ complex → complex *: complex Χ complex → complex /: complex Χ complex → complex -: complex → complex makecomplex: real Χ real → complex realpart: complex → real imaginarypart: complex → realvariables: x,y,z: complex; r,s: realaxioms: realpart(makecomplex(r,s)) = rimaginarypart(makecomplex(r,s)) = s realpart(x+y) = realpart(x) + realpart(y) ...
type queue(element) imports booleanoperations: createq: queue enqueue: queue Χ element → queue dequeue: queue → queue frontq: queue → element emptyq: queue → booleanvariables: q: queue, x: elementaxioms: emptyq(createq) = true emptyq(enqueue(q,x)) = false frontq(createq) = error frontq(enqueue(q,x)) = if emptyq(q) then x else frontq(q) dequeue(createq) = error dequeue(enqueue(q,x)) = if emptyq(q) then q else enqueue(dequeue(q),x)
If our algebra is F and our equivalence relationis ≡, the quotient algebra is denoted F/≡.