Nghiên cứu về đặc tả và kiểm chứng ràng buộc thời gian giữa các thành phần trong chương trình tương tranh

14 311 0
Nghiên cứu về đặc tả và kiểm chứng ràng buộc thời gian giữa các thành phần trong chương trình tương tranh

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

Thông tin tài liệu

ĐẠI HỌC QUỐC GIA HÀ NỘI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ Phạm Thanh Hải NGHIÊN CỨU VỀ ĐẶC TẢ VÀ KIỂM CHỨNG RÀNG BUỘC THỜI GIAN GIỮA CÁC THÀNH PHẦN TRONG CHƯƠNG TRÌNH TƯƠNG TRANH LUẬN VĂN THẠC SĨ CÔNG NGHỆ THÔNG TIN Hà Nội - 2015 HÀ NỘI - 2011 ĐẠI HỌC QUỐC GIA HÀ NỘI TRƯỜNG ĐẠI HỌC CÔNG NGHỆ Phạm Thanh Hải Lời Cam Đoan NGHIÊN CỨU VỀ ĐẶC TẢ VÀ KIỂM CHỨNG RÀNG BUỘC THỜI GIAN GIỮA CÁC THÀNH PHẦN TRONG CHƯƠNG TRÌNH TƯƠNG TRANH Ngành: Công nghệ thông tin Chuyên ngành : Kỹ thuật phần mềm Mã số: 60480103 LUẬN VĂN THẠC SĨ CÔNG NGHỆ THÔNG TIN NGƯỜI HƯỚNG DẪN KHOA HỌC: PGS.TS Nguyễn Việt Hà Hà Nội - 2015 i LỜI CÁM ƠN Đầu tiên xin gửi lời cảm ơn sâu sắc tới thầy giáo PGS.TS Nguyễn Việt Hà, môn công nghệ phần mềm, khoa công nghệ thông tin, trường Đại học Công nghệ – Đại học Quốc Gia Hà Nội người định hướng đề tài tận tình hướng dẫn bảo suốt trình thực luận văn tốt nghiệp Tôi xin trân trọng cảm ơn quý thầy cô Khoa Công nghệ thông tin trường Đại học Công nghệ – Đại học Quốc Gia Hà Nội tận tình giảng dạy, truyền đạt kiến thức quý báu suốt hai năm học làm tảng cho thực luận văn tốt nghiệp Tôi xin cảm ơn tác giả công trình nghiên cứu, tài liệu sử dụng, trích dẫn luận văn cung cấp nguồn tư liệu quý báu kiến thức liên quan để thực luận văn Con xin cảm ơn cha mẹ gia đình sinh nuôi dạy khôn lớn, bên cạnh động viên ủng hộ đường mà yêu thích lựa chọn Cám ơn bạn học viên cao học Khoa công nghệ thông tin khóa K19 Các bạn giúp đỡ ủng hộ nhiều đóng góp nhiều ý kiến quý báu, qua giúp hoàn thiện luận văn tốt Mặc dù nỗ lực, cố gắng hẳn luận văn nhiều thiếu sót Tôi mong nhận nhiều ý kiến đánh giá quý, phê bình quý thầy cô, anh chị bạn Một lần xin chân thành cảm ơn! Hà Nội, tháng 11 năm 2015 Phạm Thanh Hải ii LỜI CAM ĐOAN Tôi xin cam đoan luận văn tốt nghiệp “Nghiên cứu đặc tả kiểm chứng ràng buộc thời gian thành phần chương trình tương tranh” công trình nghiên cứu riêng hướng dẫn PGS.TS Nguyễn Việt Hà Các số liệu kết trình bày luận văn hoàn toàn trung thực chưa công bố công trình khác Tôi trích dẫn đầy đủ tài liệu tham khảo, công trình nghiên cứu liên quan nước quốc tế Ngoại trừ tài liệu tham khảo này, luận văn hoàn toàn công việc riêng Nếu có phát gian lận chép tài liệu, công trình nghiên cứu tác giả khác mà không ghi rõ phần tài liệu tham khảo, chịu hoàn toàn trách nhiệm kết luận văn iii MỤC LỤC LỜI CÁM ƠN i LỜI CAM ĐOAN ii MỤC LỤC iii DANH MỤC CÁC KÝ HIỆU VÀ CHỮ VIẾT TẮT .v DANH SÁCH BẢNG vi DANH SÁCH HÌNH VẼ vii Chương Giới thiệu Error! Bookmark not defined 1.1 Bối cảnh Error! Bookmark not defined 1.2 Một số nghiên cứu liên quan Error! Bookmark not defined 1.3 Nội dung nghiên cứu Error! Bookmark not defined 1.4 Cấu trúc luận văn Error! Bookmark not defined Chương Kiến thức sở Error! Bookmark not defined 2.1 Kiểm chứng phần mềm Error! Bookmark not defined 2.1.1 Kiểm chứng hình thức Error! Bookmark not defined 2.1.1.1 Kiểm chứng mô hình Error! Bookmark not defined 2.1.1.2 Chứng minh định lý Error! Bookmark not defined 2.1.2 Kiểm chứng thời điểm thực thi Error! Bookmark not defined 2.2 Một số vấn đề chương trình tương tranh Error! Bookmark not defined 2.3 Sự tương tranh Java Error! Bookmark not defined 2.4 Lập trình hướng khía cạnh Error! Bookmark not defined 2.4.1 Thực thi cắt ngang Error! Bookmark not defined 2.4.2 Điểm nối Error! Bookmark not defined 2.4.3 Hướng cắt Error! Bookmark not defined 2.4.4 Mã hành vi Error! Bookmark not defined 2.4.5 Khía cạnh Error! Bookmark not defined 2.4.6 Cơ chế hoạt động AspectJ Error! Bookmark not defined 2.5 Kết luận Error! Bookmark not defined iv Chương Ràng buộc thời gian thành phần chương trình tương tranh Error! Bookmark not defined 3.1 Giới thiệu Error! Bookmark not defined 3.2 Bài toán kiểm chứng ràng buộc thời gian thành phần tương tranh Error! Bookmark not defined 3.3 Phương pháp đặc tả kiểm chứng ràng buộc thời gianError! defined Bookmark not 3.3.1 Mô tả phương pháp Error! Bookmark not defined 3.3.2 Đặc tả ràng buộc thời gian Error! Bookmark not defined 3.3.3 Biểu thức quy thời gian Error! Bookmark not defined 3.3.4 Phương pháp sinh mã aspect Error! Bookmark not defined 3.3.4.1 Đọc phân tích biểu thức quy thời gianError! defined Bookmark not 3.3.4.2 Sinh mã aspect Error! Bookmark not defined 3.4 Kết luận Error! Bookmark not defined Chương Thực nghiệm Error! Bookmark not defined 4.1 Xây dựng công cụ TVG Error! Bookmark not defined 4.1.1 Đọc phân tích biểu thức quy thời gian Error! Bookmark not defined 4.1.2 Sinh mã aspect Error! Bookmark not defined 4.2 Kiểm chứng số chương trình Error! Bookmark not defined 4.2.1 Kiểm chứng chương trình Error! Bookmark not defined 4.2.2 Kiểm chứng chương trình tương tranh Error! Bookmark not defined Chương Kết luận Error! Bookmark not defined Phụ lục Error! Bookmark not defined Phụ lục A Công cụ sinh mã kiểm chứng TVG Error! Bookmark not defined A.1 Giới thiệu Error! Bookmark not defined A.2 Hướng dẫn sử dụng Error! Bookmark not defined A.2.1 Các yêu cầu cài đặt Error! Bookmark not defined A.2.2 Các chức Error! Bookmark not defined A.2.3 Hướng dẫn thực Error! Bookmark not defined v TÀI LIỆU THAM KHẢO .1 Tiếng Việt Tiếng Anh DANH MỤC CÁC KÝ HIỆU VÀ CHỮ VIẾT TẮT Dạng viết tắt Dạng đầy đủ Diễn giải AOP Aspect Oriented Programming Lập trình hướng khía cạnh CFG Context Free Grammar Văn phạm phi ngữ cảnh IDE Integrated Development Môi trường pháp triển tích hợp Environment MCS Method Call Sequence Tuần tự gọi phương thức OOP Object Oriented Programming Lập trình hướng đối tượng TVG Timed Verify Generator Công cụ kiểm sinh mã TC Timing constraint Ràng buộc thời gian TRE Timed Regular Expressions Biểu thức quy thời gian vi DANH SÁCH BẢNG Bảng 2.1 - Ánh xạ loại điểm nối (joinpoint) hướng cắt (pointcut) tương ứng Error! Bookmark not defined vii DANH SÁCH HÌNH VẼ Hình 1.1 – Kiểm chứng chương trình mức cài đặt sử dụng lập trình AOP Error! Bookmark not defined Hình 2.1 – Ví dụ sử dụng phương thức run Error! Bookmark not defined Hình 2.2 – Xung đột tiến trình Java Error! Bookmark not defined Hình 2.3 – Sử dụng synchoronized để giải tương tranhError! Bookmark not defined Hình 2.4 – Xử lý cắt ngang lập trình OOP Error! Bookmark not defined Hình 2.5 – Xử lý cắt ngang lập trình AOP Error! Bookmark not defined Hình 2.6 – Biểu diễn khía cạnh với mã hành vi trước sauError! not defined Bookmark Hình 2.7 – Cấu trúc khía cạnh Error! Bookmark not defined Hình 3.1 – Mã nguồn chương trình bao gồm thành phần tương tranh Error! Bookmark not defined Hình 3.2 – Mô tả trình chạy phương thức Error! Bookmark not defined Hình 3.3 – Phương pháp kiểm chứng ràng buộc thời gian.Error! defined Bookmark not Hình 3.4 – Thuật toán đọc biểu thức quy thời gian.Error! defined Bookmark not Hình 3.5 – Ví dụ mẫu aspect Error! Bookmark not defined Hình 3.6 – Thuật toán Sinh mã aspect Error! Bookmark not defined Hình 4.1 – Cài đặt công cụ TVG Netbean 7.0.1 Error! Bookmark not defined Hình 4.2 – Một đoạn mã aspect sinh từ công cụ TVG.Error! defined Bookmark not Hình 4.3 – Pattern kiểm tra thành phần TREError! defined Bookmark not Hình 4.4 – Lớp TimingMethod Error! Bookmark not defined viii Hình 4.5 – Quá trình đọc phân tích biểu thức TRE Error! Bookmark not defined Hình 4.6 – Tạo mã aspect từ mẫu định nghĩa Error! Bookmark not defined Hình 4.7 – Template aspectHead Error! Bookmark not defined Hình 4.8 – Template aspectTail Error! Bookmark not defined Hình 4.9 – Mã nguồn chương trình Error! Bookmark not defined Hình 4.10 – Kết thực nghiệm ca kiểm thử chương trình Error! Bookmark not defined Hình 4.11 – Kết thực nghiệm ca kiểm thử sai chương trình Error! Bookmark not defined Hình 4.12 – Mã nguồn chương trình tương tranh Error! Bookmark not defined Hình 4.13 – Kết thực nghiệm ca kiểm thử chương trình tương tranh Error! Bookmark not defined Hình 4.14 – Kết thực nghiệm ca kiểm thử sai chương trình tương tranh Error! Bookmark not defined Hình A.1 – Giao diện công cụ sinh mã TVG Error! Bookmark not defined Hình A.2 – Đặc tả ràng buộc thời gian thành phần TREError! not defined Bookmark Hình A.3 – Đan mã aspect với mã chương trình Java viết Eclipse Error! Bookmark not defined ix TÀI LIỆU THAM KHẢO Tiếng Việt [1] Trịnh Thanh Bình, Trương Ninh Thuận, Nguyễn Việt Hà (2010) Kiểm chứng tuân thủ ràng buộc thời gian ứng dụng phần mềm Tạp chí Tin học Điều khiển học, Số : 173-184 Tiếng Anh [2] A Colyer and A Clement., "Aspect-oriented programming with AspectJ," IBM Syst J., 44(2), 2005, p 301–308 [3] Addison-Wesley (2005), in Aspect-Oriented Software Development, R Filman, T Elrad, S Clarke and a M Ak¸sit, Eds., Boston [4] Benveniste A (September 1998), "Safety critical embedded systems design: the sacres approach," in In Formal Techniques in Real-Time and Fault Tolerant systems, FTRTFT’98 school, Lyngby, Denmark [5] B Berard, M Bidoit, A Finkel, F Laroussinie, A Petit, L Petrucci and a P Schnoebelen (1999), Systems and software verification : model-checking techniques and tools, New York, NY: Springer-Verlag New York, Inc [6] B Long, P Strooper and a L Wildman (2007), "A method for verifying concurrent Java components based on an analysis of concurrency failures: Research articles," Concurr Comput : Pract Exper.,19, p 281–294 [7] C Baier and J.-P Katoen (2008), Principles of Model Checking(Representation and Mind Series), The MIT Press [8] C Yoonsik and A Perumandla (2005), "A Specifying and checking method call sequences in JML," in In Software Engineering Research and Practice, CSREA Press [9] C Yoonsik and A Perumandla (2007), "Specifying and checking method call sequences of Java programs," in Software Quality Control [10] D Dymek and K Leszek (2008), "Estimation of system workload time characteristic using uml timing diagrams," in In Proceedings of the 2008 Third International Conference on Dependability of Computer Systems, Washington, DC, USA [11] E Asarin, Maler and P C a Oded, "Timed regular expressions," Journal of the ACM,, no 49, Journal of the ACM [12] E Bodden and K Havelund (2010), "Aspect-oriented race detection in Java," IEEE Trans Softw Eng., 36(4), p 509–527 [13] E Bodden (2004), A lightweight LTL runtime verification tool for Java, New York, NY: In Companion to the 19th annual ACM SIGPLAN conference on Object-oriented programming systems, languages, and applications, OOPSLA ’04 [14] E Bodden (2005), J-LO - A tool for runtime-checking temporal assertions, Diploma thesis [15] E Clarke, O Grumberg and a D Long (1994), "Model checking and abstraction," ACM Trans Program Lang Syst., 16(5), pp 1512–1542 [16] E Hilsdale and J Hugunin (2004), "Advice weaving in AspectJ," in In Proceedings of the 3rd international conference on Aspect-oriented software development, New York, NY, USA [17] E Hajiyev, L Hendren, O d Moor, P Avgustinov, E B.- den, O Lhotak, N Ongkingco, D Sereni, G Sittampalam, J Tibble and a M Verbaere (2006), "Aspects for Trace Monitoring," vol volume 4262 of Lecture Notes in Computer Science, Springer, In Klaus Havelund, Manuel Nunez, Grigore Rosu, and Burkhart Wolff, editors, Formal Approaches to Testing Systems and Runtime Verification (FATES/RV), p 20–39 [18] e Saddek Bensalem and Doron Peled (2009), Runtime Verification : 9th International Workshop, Grenoble: Selected Papers Springer-Verlag, Berlin, Heidelberg [19] G Andrews (1991), Concurrent Programming : Principles and Practice, AddisonWesley [20] G Hui and J Woo (2007), "Compositional verification of timing constraints for embedded real-time systems," in In Proceedings of the 6th Conference on WSEAS International Conference on Applied Computer Science, USA [21] G Holzmann (2003), Spin model checker, the : primer and reference manual, 1st ed., Addison-Wesley Professional [22] G Kiczales, E Hilsdale, J Hugunin, M Kersten, J Palm and a W G Griswold (2001), "An Overview of AspectJ," in In ECOOP ’01 : Proceedings of the 15th European Conference on Object-Oriented Programming, London, UK [23] G Kiczales, J Lamping, A Mendhekar, C Maeda, C Lopes, J m Loingtier and a J Irwin (1997), Aspect-oriented programming, SpringerVerlag: In ECOOP [24] I Sommerville (2007), Software Engineering, 9th ed., Addison-Wesley Pulishing Company, p 9780321493750 [25] J.-R Abrial (2006), "Formal methods in industry : achievements, problems, future," Swiss Federal Institute of Technology Zurich, In ICSE, p 761–768 [26] J.-R Abrial (2010), Modeling in Event-B : System and Software Engineering, New York, NY: Cambridge University Press [27] J.-R Abrial (1996), The B-book : assigning programs to meanings, New York, NY: Cambridge Uni- versity Press [28] L Yang (2008), "The Automated Translation of Integrated Formal Specifications into Concurrent Programs," PhD thesis, University of Southampton, Southampton [29] M Ben-Ari (2008), Principles of the Spin Model Checker, 1st ed [30] Nixon P and Shi L (1996), "Concurrent semantics for structured design methods," in In Proceedings of the First IFIP TC10 International Workshop on Software Engineering for Parallel and Distributed Systems, London, UK, UK [31] P Strooper and L Wildman (2007), "Testing Concurrent Java Components," in In Companion to the proceedings of the 29th International Conference on Software Engineering, Washing- ton, DC, USA [32] S Berezin (2002), Model checking and theorem proving : a unified framework, Pittsburgh, PA: PhD thesis [33] Wegener J and Grochtmann M (1998), "Verifying timing constraints of real-time systems by meansof evolutionary testing," Real-Time Syst, p 275–298 [34] W Visser, K Havelund, G Brat and a S Park (2000), "Model checking programs," in In ASE ’00 : Proceedings of the 15th IEEE international conference on Automated software engineering, Washington, DC, USA [35] Y Jin (2007), "Formal verification of protocol properties of sequential Java programs," in In Proceedings of the 31st Annual International Computer Software and Applications, Washington [...]...ix TÀI LIỆU THAM KHẢO Tiếng Việt [1] Trịnh Thanh Bình, Trương Ninh Thuận, và Nguyễn Việt Hà (2010) Kiểm chứng sự tuân thủ về ràng buộc thời gian trong các ứng dụng phần mềm Tạp chí Tin học và Điều khiển học, Số 2 : 173-184 Tiếng Anh [2] A Colyer and A Clement., "Aspect-oriented programming with AspectJ," IBM Syst J., 44(2), 2005,

Ngày đăng: 27/08/2016, 22:41

Từ khóa liên quan

Tài liệu cùng người dùng

  • Đang cập nhật ...

Tài liệu liên quan