















Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!
















Software Engineering
[BOOK, COPY, PERSON, AUTHOR, SUBJECT, REPORT]
ParaLibrary instance of : COPY → 7 BOOK written by : BOOK → 7 IP AUTHOR about : BOOK → 7 IP SUBJECT dom written by ⊆ ran instance of dom about ⊆ ran instance of
LibraryDB borrower, staff : IP PERSON available, out : IP COPY borrowed by : COPY → 7 PERSON borrower ∩ staff = ∅ available ∩ out = ∅ dom borrowed by = out ran borrowed by ⊆ borrower ∀p : borrower • #borrowed by∼(|{p}|) ≤ MaxCopies
Library ParaLibrary LibraryDB dom instance of = available ∪ out
CheckOut ∆Library n? : PERSON c? : COPY n? ∈ borrower c? ∈ available #borrowed by∼(|{n?}|) < MaxCopies available′^ = available \ {c?} out′^ = out ∪ {c?} borrowed by′^ = borrowed by∪ {c? 7 → n?}
Return ∆Library c? : COPY c? ∈ out available′^ = available ∪ {c?} out′^ = out \ {c?} borrowed by = {c?} − borrowed by
borrowed by = {b 01 7 → mjw, b 02 7 → en, b 03 7 → mjw} {b 01 } − borrowed by = {b 02 7 → en, b 03 7 → mjw}
AddNewBook ∆Library c? : COPY b? : BOOK a? : IP AUTHOR s? : IP SUBJECT
b? 6 ∈ ran instance of c? 6 ∈ available ∪ out
available′^ = available ∪ {c?} instance of ′^ = instance of ∪ {c? 7 → b?} written by′^ = written by ∪ {b? 7 → a?} about′^ = about ∪ {b? 7 → s?}
AddAnotherCopy ∆Library c? : COPY b? : BOOK
c? 6 ∈ available ∪ out b? ∈ ran instance of
available′^ = available ∪ {c?} instance of ′^ = instance of ∪ {c? 7 → b?}
RemoveOther ∆Library c? : COPY c? ∈ available #(instance of ∼(|{instance of (c?)}|)) > 1 available′^ = available \ {c?}
RemoveLast ∆Library c? : COPY
c? ∈ available #(instance of ∼(|{instance of (c?)}|)) = 1
available′^ = available \ {c?} instance of ′^ = {c?} − instance of written by′^ = {instance of (c?)}− instance of about′^ = {instance of (c?)} − about