中大機構典藏-NCU Institutional Repository-提供博碩士論文、考古題、期刊論文、研究計畫等下載:Item 987654321/93351
English  |  正體中文  |  简体中文  |  Items with full text/Total items : 80990/80990 (100%)
Visitors : 41648645      Online Users : 1562
RC Version 7.0 © Powered By DSPACE, MIT. Enhanced by NTU Library IR team.
Scope Tips:
  • please add "double quotation mark" for query phrases to get precise results
  • please goto advance search for comprehansive author search
  • Adv. Search
    HomeLoginUploadHelpAboutAdminister Goto mobile version


    Please use this identifier to cite or link to this item: http://ir.lib.ncu.edu.tw/handle/987654321/93351


    Title: 基於 Python 型別提示檢查不可變性;Checking Immutability using Python Type Hints
    Authors: 林右展;Lin, You-Zhan
    Contributors: 資訊工程學系
    Keywords: 不可變性;型別提示;靜態分析;Python;Immutability;Type Hints;Static Analysis;Python
    Date: 2023-07-28
    Issue Date: 2024-09-19 16:55:20 (UTC+8)
    Publisher: 國立中央大學
    Abstract: 程式語言在不可變性的支援對程式開發流程相當有幫助,特別是對指令式的物件導向程式語言來說。
    透過不可變性限制物件的狀態,不僅能更容易理解程式的執行流程,若使用適當,更能減少程式開發過程中尋找與去除程式錯誤的時間。
    對於不可變性支援程度較低的程式語言,過去有許多研究在該語言的型別或注釋系統上加入新的型別或注釋,藉此標記變數、函式、類別等結構的不可變性。
    Python 雖已支援部分不可變類別的建立方式與不可變型別提示的使用,但仍存在一些使用上的不容易。

    因此本研究在 Python 中加入一個新的型別提示 Frozen。
    透過將 Frozen 標記在變數、參數、屬性等名稱上,便可以使用靜態檢查工具來檢測這些變數是否被用於修改其對應的物件。
    這樣做可以提升程式的正確性、加速錯誤的排除,從而使程式開發流程更加順暢。;Language supports for immutability in programming languages can benefit the software development process,
    especially in imperative object-oriented programming languages.
    By enforcing immutability and restricting the modification of objects′ states,
    it becomes easier to understand the program′s execution flow.
    When used appropriately, immutability can also reduce the time spent on finding and fixing program errors.
    For programming languages with limited support for immutability,
    there has been research in the past on introducing new types or annotations within the language′s type or annotation system.
    These additions aim to mark the immutability of variables, functions, classes, and other structures.
    Although Python already supports the creation of immutable classes and the type hints of partial immutable types,
    there are still some challenges in practice that make it less straightforward.

    Therefore, this research introduces a new type hint in Python called "Frozen."
    By applying the "Frozen" to variables, parameters, attributes, and other identifiers, static analysis tools can be used to detect
    if these variables are used to modify their corresponding objects.
    This approach makes the software development process smoother.
    Appears in Collections:[Graduate Institute of Computer Science and Information Engineering] Electronic Thesis & Dissertation

    Files in This Item:

    File Description SizeFormat
    index.html0KbHTML11View/Open


    All items in NCUIR are protected by copyright, with all rights reserved.

    社群 sharing

    ::: Copyright National Central University. | 國立中央大學圖書館版權所有 | 收藏本站 | 設為首頁 | 最佳瀏覽畫面: 1024*768 | 建站日期:8-24-2009 :::
    DSpace Software Copyright © 2002-2004  MIT &  Hewlett-Packard  /   Enhanced by   NTU Library IR team Copyright ©   - 隱私權政策聲明