Những hạn chế và hướng nghiên cứu tiếp theo

Một phần của tài liệu Hệ thống kiểu để ước lượng tĩnh tài nguyên sử dụng của chương trình giao dịch (Trang 161 - 173)

Chương 6 KẾT LUẬN

6.2. Những hạn chế và hướng nghiên cứu tiếp theo

Vấn đề về xác định biên tài nguyên cần sử dụng của các chương trình STM là một vấn đề phức tạp, trong nghiên cứu này luận án đã đề xuất những giải pháp giải quyết bài toán mang tính cốt lõi nhất. Tuy nhiên, kết quả đạt được vẫn mang tính phương pháp, và cần tiếp tục cải tiến để áp dụng vào thực tế.

Ngôn ngữ giao dịch mà luận án đã đề xuất đang ở dạng rút gọn với mục đích thể hiện rõ ý tưởng của bài toán đặt ra. Ngôn ngữ thực tế sẽ có nhiều cấu trúc khác nữa như hàm, thủ tục, lời gọi phương thức, truyền thông điệp, kế thừa, và nhiều tính toán chi tiết hơn. Ngoài ra, một số vấn đề khác như xử lý việc thực hiện lại các giao dịch khi xảy ra xung đột hay xác định số vòng lặp tối đa đối với các câu lệnh lặp cũng chưa được giải quyết trong nghiên cứu hiện tại. Để

trở thành ngôn ngữ dùng được trong thực tế luận án cần phải cải tiến, làm mịn để ngôn ngữ chi tiết hơn.

Hiện tại, các cú pháp, ngữ nghĩa của ngôn ngữ và các định nghĩa về môi trường, trạng thái của chương trình đang được thể hiện dưới dạng trừu tượng, bán hình thức. Vì vậy để cài đặt được chúng trở thành ngôn ngữ thực tế luận án sẽ tiếp tục cải tiến để mô tả chúng dưới dạng hình thức hoàn toàn.

Tiếp theo, luận án có kế hoạch sử dụng nền tảng K để cài đặt cho ngôn ngữ [81]. Đây là một nền tảng mạnh, phù hợp để triển khai các ngôn ngữ dưới dạng hình thức, đặc biệt đối với các ngôn ngữ hoạt động theo cơ chế tương tranh. Nền tảng này đang hứa hẹn trở thành một nền tảng thành công trong việc phát triển ngôn ngữ lập trình trong công nghiệp phần mềm.

Hệ thống kiểu của luận án đưa ra đã đảm bảo tính đúng, tuy nhiên trong một số trường hợp chưa đảm bảo tính sắc của biên tìm được. Vì vậy trong các nghiên cứu tiếp theo luận án sẽ tiếp tục cải tiến chúng để đảm bảo biên bộ nhớ tìm được là sắc. Ngoài ra, luận án có kế hoạch cài đặt đầy đủ thuật toán suy diễn kiểu dựa trên hệ thống kiểu đã đề xuất để có thể tích hợp vào các trình soạn thảo, trình biên dịch của ngôn ngữ lập trình để giúp người lập trình kiểm soát chương trình của mình trong quá trình lập trình.

Trong nghiên cứu này hệ thống kiểu của luận án có mục đích chính là xác định cận trên bộ nhớ của các chương trình STM. Tuy nhiên, luận án đã cố gắng xây dựng chúng một cách tổng quát nhằm hướng đến việc có thể cải tiến chúng để xác định các tính chất khác của chương trình như xác định chi phí của tài nguyên CPU, băng thông mạng, hoặc số gas yêu cầu cho các hợp đồng thông minh trong Ethereum.

Luận án thực hiện nghiên cứu trên ngôn ngữ chung với mục đích giải quyết bài toán một cách tổng quát. Ngôn ngữ của luận án mang những đặc tính cốt lõi của các ngôn ngữ giao dịch trong thực tế. Nghiên cứu này thiên về lý thuyết và cơ sở toán học, làm nền tảng cho các nghiên cứu tiếp theo. Việc triển khai cài đặt mới chỉ thực hiện được với công cụ suy diễn kiểu. Để ứng dụng được trong các ngôn ngữ thực tế, luận án cần thêm thời gian và nhiều nguồn lực hơn nữa. Trong các nghiên cứu tiếp theo, luận án sẽ tiếp tục nghiên cứu các ngôn ngữ, thư viện cụ thể trong thực tế để xây dựng các công cụ chuyển đổi các ngôn ngữ này về ngôn ngữ của luận án để áp dụng kết quả của luận án. Khi hoàn thiện những nghiên cứu này, kết quả của luận án sẽ giải quyết được nhiều lớp ngôn ngữ trong thực tế.

DANH MỤC CÁC CÔNG TRÌNH KHOA HỌC

(1) Trương Anh Hoàng, Nguyễn Ngọc Khải (2015). "Hệ thống kiểu tính cận trên số log cho ngôn ngữ giao dịch đa luồng tối giản". Tạp chí Khoa học, Đại học Sư phạm Hà Nội, pp. 80-93.

(2) Anh-Hoang Truong, Ngoc-Khai Nguyen, Dang Van Hung and Duc-Hanh Dang (2016). "Calculating statically maximum log memory used by multi- threaded transactional programs". Theoretical Aspects of Computing - IC- TAC - 13th International Colloquium, Taipei, Taiwan, ROC, Proceedings. (3) Ngoc-Khai Nguyen, and Anh-Hoang Truong (2017). "A Compositional

Type Systems for Finding Log Memory Bounds of Transactional Programs". Proceedings of the Eighth International Symposium on Information and Communication Technology - SOICT, pp. 409-416.

(4) Nguyễn Ngọc Khải, Trương Anh Hoàng (2018). "Hệ thống kiểu để suy ra bộ nhớ log của chương trình giao dịch từ biến dùng chung". Tạp chí Khoa học và Kỹ thuật, Học viện Kỹ thuật quân sự, pp. 18-33.

(5) Ngoc-Khai Nguyen, Anh-Hoang Truong, and Duc-Hanh Dang (2021). "Estimate the memory bounds required by shared variables in software transactional memory programs". VNU Journal of Science: Computer Sci- ence and Communication Engineering.

(6) Ngoc-Khai Nguyen, Anh-Hoang Truong, and Duc-Hanh Dang (2022). "Finding memory bound of cloned objects in software transactional memory programs". Accepted by International Journal of Software Engineering and Knowledge Engineering Journal (IJSEKE).

[1] Elvira Albert, Puri Arenas, Jesús Correas Fernández, Samir Genaim, Miguel Gómez-Zamalloa, Enrique Martin-Martin, Germán Puebla, and Guillermo Román-Díez. Resource analysis: From sequential to concurrent and dis- tributed programs. In FM, 2015.

[2] Elvira Albert, Puri Arenas, Jesús Correas Fernández, Samir Genaim, Miguel Gómez-Zamalloa, Germán Puebla, and Guillermo Román-Díez. Object- sensitive cost analysis for concurrent objects. Softw. Test., Verif. Reliab., 25(3):218–271, 2015.

[3] Elvira Albert, Puri Arenas, Antonio Flores-Montoya, Samir Genaim, Miguel Gómez-Zamalloa, Enrique Martin-Martin, Germán Puebla, and Guillermo Román-Díez. Saco: Static analyzer for concurrent objects. InTACAS, 2014. [4] Elvira Albert, Puri Arenas, Samir Genaim, and Germán Puebla. Closed- form upper bounds in static cost analysis. Journal of Automated Reasoning, 46:161–203, 2010.

[5] Elvira Albert, Puri Arenas, Samir Genaim, Germán Puebla, and Damiano Zanardini. Cost analysis of object-oriented bytecode programs. Theor. Comput. Sci., 413:142–159, 2012.

[6] Elvira Albert, Jesús Correas Fernández, Einar Broch Johnsen, and Guillermo Román-Díez. Parallel cost analysis of distributed systems. In SAS, 2015.

[7] Elvira Albert, Jesús Correas Fernández, and Guillermo Román-Díez. Peak cost analysis of distributed systems. In Static Analysis - 21st International Symposium, SAS 2014, pages 18–33, 2014.

[8] Elvira Albert, Jesús Correas Fernández, and Guillermo Román-Díez. Re- source analysis of distributed systems. In Theory and Practice of Formal Methods, 2016.

[9] Elvira Albert, Samir Genaim, and Miguel Gomez-Zamalloa. Heap space analysis for Java bytecode. In Proceedings of the 6th International Sympo- sium on Memory Management, ISMM ’07, pages 105–116, New York, NY, USA, 2007. ACM.

Tài liệu tham khảo 151 [10] Elvira Albert, Samir Genaim, and Miguel Gómez-Zamalloa. Heap space analysis for garbage collected languages. Sci. Comput. Program., 78:1427– 1448, 2013.

[11] Elvira Albert, Pablo Gordillo, Albert Rubio, and Ilya Sergey. Gastap: A gas analyzer for smart contracts. ArXiv, abs/1811.10403, 2018.

[12] C. Amrein and T. Markiewicz. Software transactional memory for .net. 2015.

[13] C. Ananian, K. Asanovic, B. Kuszmaul, C. Leiserson, and S. Lie. Un- bounded transactional memory. In HPCA, 2005.

[14] David Aspinall, Robert Atkey, Kenneth MacKenzie, and Donald Sannella. Symbolic and analytic techniques for resource analysis of Java bytecode. In Proceedings of the 5th International Conference on Trustworthly Global Computing, TGC’10, pages 1–22, Berlin, Heidelberg, 2010. Springer-Verlag. [15] Alexandro Baldassin, Edson Borin, and Guido Araujo. Performance impli- cations of dynamic memory allocators on transactional memory systems. In PPOPP, 2015.

[16] Alexandro Baldassin, Felipe Klein, Guido Araujo, Rodolfo Azevedo, and Paulo Centoducatte. Characterizing the energy consumption of software transactional memory. IEEE Computer Architecture Letters, 8:56–59, 2009. [17] Luiz André Barroso and Urs H¨olzle. The case for energy-proportional com-

puting. Computer, 40, 2007.

[18] Marc Bezem, Dag Hovland, and Hoang Truong. A type system for counting instances of software components. Theor. Comput. Sci., 458:29–48, 2012. [19] Guy E. Blelloch and John Greiner. A provable time and space efficient im-

plementation of NESL. In Proceedings of the 1996 ACM SIGPLAN Inter- national Conference on Functional Programming (ICFP ’96), Philadelphia, Pennsylvania, May 24-26, 1996., pages 213–225, 1996.

[20] Guy E. Blelloch and Robert Harper. Cache and I/O efficent functional algorithms. In The 40th Annual ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’13, Rome, Italy - January 23 - 25, 2013, pages 39–50, 2013.

[21] Chandrasekhar Boyapati and M. Rinard. Safejava: a unified type system for safe programming. 2004.

[22] Victor Braberman, Diego Garbervetsky, Samuel Hym, and Sergio Yovine. Summary-based inference of quantitative bounds of live heap objects. Sci- ence of Computer Programming, 92, Part A:56 – 84, 2014. Special issue on Bytecode 2012.

[23] Víctor A. Braberman, Diego Garbervetsky, and Sergio Yovine. A static analysis for synthesizing parametric specifications of dynamic memory con- sumption. Journal of Object Technology, 5(5):31–58, 2006.

[24] ESTADUAL DE CAMPINAS, Alexandro Baldassin, Felipe Klein, Paulo Centoducatte, Guido Araujo, and Rodolfo Azevedo. A first study on char- acterizing the energy consumption of software transactional memory. 2009. [25] Luca Cardelli. Type systems, 1997.

[26] B.D. Carlstrom and Stanford University. Computer Science Department. Programming with Transactional Memory. Stanford University, 2008. [27] L. Ceze, J. Tuck, J. Torrellas, and C. Cascaval. Bulk disambiguation of

speculative threads in multiprocessors. 33rd International Symposium on Computer Architecture (ISCA’06), pages 227–238, 2006.

[28] Ting Chen, Xiaoqi Li, Xiapu Luo, and Xiaosong Zhang. Under-optimized smart contracts devour your money. 2017 IEEE 24th International Confer- ence on Software Analysis, Evolution and Reengineering (SANER), pages 442–446, 2017.

[29] Wei-Ngan Chin, Huu Hai Nguyen, Shengchao Qin, and Martin Rinard. Memory usage verification for OO programs. In Proceedings of the 12th International Conference on Static Analysis, SAS’05, pages 70–86, Berlin, Heidelberg, 2005. Springer-Verlag.

[30] Philippe Clauss. Handling memory cache policy with integer points count- ing. In Euro-Par, 1997.

[31] V. Cortier, Niklas Grimm, Joseph Lallemand, and M. Maffei. A type system for privacy properties. Proceedings of the 2017 ACM SIGSAC Conference on Computer and Communications Security, 2017.

[32] G. Coulouris. Distributed systems : concepts and design / george coulouris ... [et al.]. 2012.

Tài liệu tham khảo 153 [33] Samuel da Silva Feitosa, Rodrigo Geraldo Ribeiro, and André Rauber Du Bois. Towards an extrinsic formalization of featherweight java in agda.CLEI Electronic Journal, 2021.

[34] Peter Damron, Alexandra Fedorova, Y. Lev, Victor Luchangco, M. Moir, and D. Nussbaum. Hybrid transactional memory. In ASPLOS XII, 2006. [35] Edsger Dijkstra. Over de sequentialiteit van procesbeschrijvingen (EWD-

35). Center for American History, University of Texas at Austin, undated, 1962 or 1963.

[36] Ecma. C♯ Language Specification. ECMA, 5th edition, December 2017.

[37] Thomas Fahringer. Efficient symbolic analysis for parallelizing compilers and performance estimators. The Journal of Supercomputing, 12:227–252, 1998.

[38] Cesare Ferri, Amber Viescas, Tali Moreshet, R. Iris Bahar, and Maurice Herlihy. Energy efficient synchronization techniques for embedded architec- tures. In ACM Great Lakes Symposium on VLSI, 2008.

[39] A. Ghosh and R. Chaki. Implementing software transactional memory using stm haskell. In ACSS, 2015.

[40] Bhavishya Goel, J. Rubén Titos Gil, Anurag Negi, Sally A. McKee, and Per Stenstr¨om. Performance and energy analysis of the restricted transactional memory implementation on haswell. 2014 IEEE 28th International Parallel and Distributed Processing Symposium, pages 615–624, 2014.

[41] D. Goodman, B. Khan, Salman Khan, M. Luján, and I. Watson. Software transactional memories for scala. J. Parallel Distributed Comput., 73:150– 163, 2013.

[42] Vincent Gramoli and Rachid Guerraoui. Programming with Transactional Memory, pages 165–183. 01 2017.

[43] Peter Grun, Florin Balasa, and Nikil D. Dutt. Memory size estimation for multimedia applications. In CODES, 1998.

[44] T. Harris, J. Larus, and R. Rajwar. Transactional memory, 2nd edition. In Transactional Memory, 2010.

[45] T. Harris, S. Marlow, S. Jones, and M. Herlihy. Composable memory trans- actions. Commun. ACM, 51:91–100, 2008.

[46] Tim Harris, James Larus, and Ravi Rajwar. Transactional Memory, 2Nd Edition. Morgan and Claypool Publishers, 2nd edition, 2010.

[47] Maurice Herlihy and J. Eliot B. Moss. Transactional memory: Architectural support for lock-free data structures. In ISCA, 1993.

[48] Jan Hoffmann, Ankush Das, and Shu-Chun Weng. Towards automatic re- source bound analysis for ocaml. In POPL, 2017.

[49] Jan Hoffmann and Zhong Shao. Automatic static cost analysis for par- allel programs. In Programming Languages and Systems - 24th European Symposium on Programming, ESOP 2015, pages 132–157, 2015.

[50] Martin Hofmann and Steffen Jost. Static prediction of heap space usage for first-order functional programs. volume 38, pages 185–197, New York, NY, USA, January 2003. ACM.

[51] John Hughes and Lars Pareto. Recursion and dynamic data-structures in bounded space: Towards embedded ml programming. SIGPLAN Not., 34(9):70–81, September 1999.

[52] John Hughes, Lars Pareto, and Amr Sabry. Proving the correctness of reac- tive systems using sized types. In Proceedings of the 23rd ACM SIGPLAN- SIGACT Symposium on Principles of Programming Languages, POPL ’96, pages 410–423, New York, NY, USA, 1996. ACM.

[53] J. Hui, L. Dong, Z. Xing-yuan, and Xie Xiren. Type system in programming languages. Journal of Computer Science and Technology, 16:286–292, 2001. [54] Suresh Jagannathan, Jan Vitek, Adam Welc, and Antony Hosking. A trans- actional object calculus. Sci. Comput. Program., 57(2):164–186, August 2005.

[55] Felipe Klein, Alexandro Baldassin, Guido Araujo, Paulo Centoducatte, and Rodolfo Azevedo. On the energy-efficiency of software transactional mem- ory. In SBCCI, 2009.

[56] Felipe Klein, Alexandro Baldassin, João Moreira, Paulo Centoducatte, San- dro Rigo, and Rodolfo Azevedo. Stm versus lock-based systems: An energy consumption perspective. 2010 ACM/IEEE International Symposium on Low-Power Electronics and Design (ISLPED), pages 431–436, 2010.

Tài liệu tham khảo 155 [57] Felipe Klein, Alexandro Baldassin, Joao Moreira, Paulo Centoducatte, San- dro Rigo, and Rodolfo Azevedo. Stm versus lock-based systems: An energy consumption perspective. In Proceedings of the 16th ACM/IEEE Interna- tional Symposium on Low Power Electronics and Design, ISLPED ’10, pages 431–436, New York, NY, USA, 2010. ACM.

[58] T. F. Knight. An architecture for mostly functional languages. In LFP ’86, 1986.

[59] James R. Larus and Ravi Rajwar. Transactional memory. Commun. ACM, 51:80–88, 2006.

[60] Matthew Le, R. Yates, and M. Fluet. Revisiting software transactional memory in haskell. Proceedings of the 9th International Symposium on Haskell, 2016.

[61] Bj¨orn Lisper. Fully automatic, parametric worst-case execution time anal- ysis. In WCET, 2003.

[62] Vincent Loechner, Benoˆit Meister, and Philippe Clauss. Precise data locality optimization of nested loops. The Journal of Supercomputing, 21:37–76, 2002.

[63] A. Lumsdaine and R. Garcia. Static computation and reflection. 2008. [64] Casey Marshall. Software transactional memory. 01 2006.

[65] C. Minh, M. Trautmann, JaeWoong Chung, A. McDonald, N. Bronson, J. Casper, C. Kozyrakis, and K. Olukotun. An effective hybrid transactional memory system with strong isolation guarantees. In ISCA ’07, 2007. [66] Chi Cao Minh, JaeWoong Chung, Christoforos E. Kozyrakis, and Kunle

Olukotun. Stamp: Stanford transactional applications for multi-processing. 2008 IEEE International Symposium on Workload Characterization, pages 35–46, 2008.

[67] Mohamed Mohamedin, B. Ravindran, and R. Palmieri. Bytestm: Virtual machine-level java software transactional memory. In COORDINATION, 2013.

[68] Tali Moreshet, R. Iris Bahar, and Maurice Herlihy. Energy reduction in multiprocessor systems using transactional memory. ISLPED ’05. Proceed- ings of the 2005 International Symposium on Low Power Electronics and Design, 2005., pages 331–334, 2005.

[69] Tali Moreshet, R. Iris Bahar, and Maurice Herlihy. Energy-aware micropro- cessor synchronization: Transactional memory vs. locks. 2006.

[70] Karl Naden, R. Bocchino, J. Aldrich, and K. Bierhoff. A type system for borrowing permissions. In POPL ’12, 2012.

[71] Flemming NielsonHanne Riis Nielson. Formal Methods. Springer, Cham, 2019.

[72] K. Olukotun and L. Hammond. The future of microprocessors. Queue, 3:26 – 29, 2005.

[73] David Padua. Encyclopedia of Parallel Computing. 01 2011.

[74] Douglas Pereira Pasqualin, M. Diener, A. Bois, and M. Pilla. Thread affinity in software transactional memory. 2020 19th International Symposium on Parallel and Distributed Computing (ISPDC), pages 180–187, 2020.

[75] Tuan-Hung Pham, Anh-Hoang Truong, Ninh-Thuan Truong, and Wei-Ngan Chin. A fast algorithm to compute heap memory bounds of Java Card applets. In Antonio Cerone and Stefan Gruner, editors, Sixth IEEE Inter- national Conference on Software Engineering and Formal Methods, SEFM 2008, Cape Town, South Africa, 10-14 November 2008, pages 259–267. IEEE Computer Society, 2008.

[76] Benjamin C. Pierce. Types and Programming Languages. The MIT Press, 1st edition, 2002.

[77] Benjamin C. Pierce. Type systems, pages 293–307. Springer New York, New York, NY, 2003.

[78] Miroslav Popovic, Branislav Kordic, and Ilija Basicevic. Estimating trans- action execution times for a software transactional memory. 2016 Sixth International Conference on Information Science and Technology (ICIST), pages 137–141, 2016.

[79] Aleksandar Prokopec. Learning Concurrent Programming in Scala. 11 2014. [80] R. Rajwar, M. Herlihy, and K. Lai. Virtualizing transactional memory. 32nd International Symposium on Computer Architecture (ISCA’05), pages 494–505, 2005.

[81] G. Rosu. K: A semantic framework for programming languages and formal analysis tools. In Dependable Software Systems Engineering, 2017.

Tài liệu tham khảo 157 [82] Bratin Saha, Ali-Reza Adl-Tabatabai, R. Hudson, C. Minh, and Ben Hertzberg. Mcrt-stm: a high performance software transactional memory system for a multi-core runtime. In PPoPP ’06, 2006.

[83] Daniel J. Scales, K. Gharachorloo, and C. Thekkath. Shasta: a low over- head, software-only approach for supporting fine-grain shared memory. In ASPLOS VII, 1996.

[84] William N. Scherer and M. Scott. Advanced contention management for dynamic software transactional memory. In PODC ’05, 2005.

[85] Nir Shavit and Dan Touitou. Software transactional memory. InSymposium on Principles of Distributed Computing, pages 204–213, 1995.

[86] Arrvindh Shriraman, M. Spear, H. Hossain, V. Marathe, S. Dwarkadas, and M. Scott. An integrated hardware-software approach to flexible trans- actional memory. In ISCA ’07, 2007.

[87] Herb Sutter and James R. Larus. Software and the concurrency revolution. ACM Queue, 3:54–62, 2005.

[88] Fuad Tabba, M. Moir, J. Goodman, A. W. Hay, and C. Wang. Nztm: nonblocking zero-indirection transactional memory. In SPAA ’09, 2009. [89] Mads Tofte and Jean-Pierre Talpin. Region-based memory management.

Inf. Comput., 132(2):109–176, February 1997.

[90] Antonio J. Tomeu, Alberto G. Salguero, and M. Capel. Teaching software transactional memory in concurrency courses with clojure and java. In

Một phần của tài liệu Hệ thống kiểu để ước lượng tĩnh tài nguyên sử dụng của chương trình giao dịch (Trang 161 - 173)