170 likes | 181 Vues
Formal Specification of the Subversion Version Control System in Z. Zhongbo Huang (Jerry) 41184963 Supervisor: Annabelle McIver. Workshop Presentation Outline. 1. Introduction -- Subversion
E N D
Formal Specification of the Subversion Version Control System in Z Zhongbo Huang (Jerry) 41184963 Supervisor: Annabelle McIver
Workshop Presentation Outline • 1. Introduction -- Subversion • 2. Formal Specification --Z notation • 3. Case Study -- Case scenario • 4. Outcome of Project • 5. Conclusion and Limitation ITEC810 Workshop Presentation
1. Introduction --VCS • Version Control System ( Revision Control System) • Version Tracking • Coordinating Teams • Every change made to the source is tracked, along with who made the change, why they made it, and references to problems fixed, or enhancements introduced, by the change. • an excellent way to combat the problem of sharing files between workers. ITEC810 Workshop Presentation
1.Introduction--Subversion Subversion Control system: a centralized system for sharing information. Allow many users to share but work independently on the same document. The repository remember every change to every file and directory tree itself. It will also merge users files to produce a single merged copy recording all their modifications. The key feature operation: Update Operation Commit Operation Share Merge ITEC810 Workshop Presentation
2. Formal specification – Z notation • Formal specification is the use of mathematical principles to describe precisely the desired behavior of computer systems. • Z notation • Base on simple set theory, predicate logic, relation and function. • Specify the requirements or behavior of systems. • Analyze that behavior via proof, animation, test generation ITEC810 Workshop Presentation
2.Z notation - example • SVNFILE : String • f, f ’ : SVNFILE • af ?, bf ! : SVNFILE • SVNFILE: FileName x FileNo Z notation ITEC810 Workshop Presentation
2. Z notation- Schema example Schema Name f represent before operation, f’ represent after operation. Declaration By convention names in the declarations ending in ‘?’ are input and names ending in ‘!’ are outputs. Read operation doesn’t change file Predicate fna! and fno! as the output equal to the first and second pair set of f’ ITEC810 41184963
Repository Alice Bob Figure. A typical Subversion system share with Alice and Bob 3. Case Study – Case Scenario • Alice and her collaborator, Bob, are working together on a small project (recipe), and using Subversion repository to share their work. ITEC810 Workshop Presentation
repository/ conf/ recipe/ dav/ db/ A collection of database files list.txt format hooks/ Create a recipe project in repository locks/ Alice and Bob’s working copy get from repository README.txt Alice’s working copy of recipe Bob’s working copy of recipe Firgure. The repository’s file system. ITEC810 Workshop Presentation
Repository R0 R1 R2 R3 R4 Milk Milk Egg Milk Juice Milk Soup 1 2 1 9 4 3 5 6 8 7 Alice Bob Figure . Revision Number Change in Recipe Repository ITEC810 Workshop Presentation
repository/ recipe/ milk list.txt Alice’s working copy of recipe Bob’s working copy of recipe list.txt list.txt Case Scenario 2 Case Scenario 1 .SVN .SVN R0 R0 R1 R1 R0 R0 R1 R1 + milk + milk Firgure 6. Case Scenario 2 3. Case Scenario – Update and Commit Operation ITEC810 Workshop Presentation
repository/ recipe/ milk juice soup list.txt Alice’s working copy of recipe Bob’s working copy of recipe list.txt Case Scenario 1: commit list.txt Case Scenario 2: update .SVN .SVN/ R0 R0 R1 R1 R0 R0 R1 R1 + milk + milk R2 R2 Case Scenario 4:update R1 R1 + milk Case Scenario 3: Commit + milk R2 R2 + egg + egg R3 R3 R1 R1 Case Scenario 5: commit + milk + milk R3 R3 Case Scenario 7: update + juice + juice R4 R4 R1 R1 + milk + milk R3 R3 + juice + juice R4 R4 Case Scenario 9: update Case Scenario 8: commit + soup + soup ITEC810 Workshop Presentation
4.Outcome of Project • Report detailing the enough specification of the key of features of Subversion using Z language, together with a commentary on the design • The goal of this project was to understand and clarify Subversion’s behavior and what user can expect when he/her uses it. ITEC810 Workshop Presentation
4.Outcome -- Update Operation af, af’ represent Alice working copy from project repository rf? as input from project repository Alice’s working copy update to project repository the output f! and arn! represent the latest of File and SVNRevisionNo in the SVNFile repository. ITEC810 Workshop Presentation
4.Outcome – Commit Operation rf, af represent the state before the operation.rf’,af’ represent the state after the operation. af? as input from project repository Bob’s working copy commit to project repository This line notation address the revision number in rf’ and bf’ increment after commit operation successfully. ITEC810 Workshop Presentation
5.Conclusion and Limitation Conclusion • Lead to a well-though-out, well-structured program • Provides an unambiguous statement of intent • Act as documentation for the finished program, helping those who have to maintain and update the program in the future. Limitation • Do not include all the details involved • Some formal specification in this project may not be carefully considered or even wrong explanation because of limitation of personal capability and scheduled time. ITEC810 Workshop Presentation
The End of Presentation Question ? ITEC810 Workshop Presentation