儘管近年來先進程式語言已提供豐富的科學計算支援,在許多科學領域裡仍無法順利改寫以Fortran等傳統程式語言撰寫傳承至今的程式。如今對許多科學家而言,事實上並沒有執著於傳統程式語言的理由。先進程式語言像是Python提供了越來越多的新特性,讓程式開發者得以更簡潔且具有抽象性的原始碼撰寫程式,使開發者的意圖明確並有助於程式碼的維護與使用。許多先進程式語言也提供高效能的底層二進位函式庫,大幅減低了其編譯器最佳化不足的疑慮。然而,即便新生代的科學家偏好先進程式語言,但考量到改寫的門檻與困難,仍不得不沿用傳統程式語言。不幸地,隨著科學計算程式的功能擴充、架構修改、效能調校、及資料量增加等,修改程式碼的需求顯得日漸急迫但卻日益困難。舊有的傳統語言程式碼不僅往往缺乏註解,語言先天上的抽象性不足也阻礙了開發者的理解與維護。本研究進行一連串的步驟,與有著計算程式改寫需求的科學家合作,以兩個科學計算程式作為範例,研發改寫科學計算程式時所需的規範與工具,提供科學計算開發者改寫舊有程式時可參考的依據,以降低改寫門檻並減輕開發負擔,期使科學計算程式可因應更大資料量、更高計算量,並進而發展特定領域函式庫,兼顧高效能與後端處理的銜接。 ;Although recently modern programming languages have provided rich support for scientific computing, to programmers in scientific domain, there are still many difficulties in rewriting their programs that have been written with traditional programming languages such as Fortran for a long time. In fact, there is no strong motivation for many scientists nowadays to use traditional programming languages. Modern programming languages like Python support more and more new features that help programmers to write clear code with better abstraction, which can clearly show programmers’ intention and is easier to use and maintain. Several modern programming languages also come along with high-performance underlying libraries, which greatly allay the concern for performance. However, even though younger generation scientists prefer modern programming languages, they are forced to maintain the code in traditional programming languages due to the threshold and difficulties in rewriting. Unfortunately, the need for rewriting is getting urgent, while the cost of rewriting becomes more and more expensive. Scientific programmers have to modify their computing applications to extend the functionality, optimize the performance, and handle huge data. The code written in traditional programming languages usually lack not only comments but also abstraction inherently, which stop scientific programmers from understanding and maintaining the code. This project targets at developing guidelines and utilities for rewriting scientific computing applications by executing a series of research processes. We are co-working with scientist groups to induce rewriting guidelines, and further develop supporting utilities. Our research result can be an example of approaches for scientific programmers to rewrite computing applications for logic refining, high-performance computing, large data handling, domain-specific libraries constructing, and further processing.