{"id":{"repo_id":"byu","oai_identifier":"oai:scholarsarchive.byu.edu:etd-6721"},"canonical_url":"https://search.ndltd.org/etd/byu/oai:scholarsarchive.byu.edu:etd-6721","repository":{"repo_id":"byu","name":"Brigham Young University","base_url":"https://scholarsarchive.byu.edu/do/oai/"},"display":{"title":"Enabling Optimizations Through Demodularization","abstract":"Programmers want to write modular programs to increase maintainability and create abstractions, but modularity hampers optimizations, especially when modules are compiled separately or written in different languages. In languages with syntactic extension capabilities, each module in a program can be written in a separate language, and the module system must ensure that the modules interoperate correctly. In Racket, the module system ensures this by separating module code into phases for runtime and compile-time and allowing phased imports and exports inside modules. We present an algorithm, called demodularization, that combines all executable code from a phased modular program into a single module that can then be optimized as a whole program. The demodularized programs have the same behavior as their modular counterparts but are easier to optimize. We show that programs maintain their meaning through an operational semantics of the demodularization process and verify that performance increases by comparing modular Racket programs to the equivalent demodularized and optimized programs. We use the existing Racket optimizer to optimize the demodularized programs by decompiling them into an intermediate form that the optimizer uses. We also demonstrate a dead code elimination optimization that dramatically reduces the file size of demodularized Racket programs.","abstract_html":"Programmers want to write modular programs to increase maintainability and create abstractions, but modularity hampers optimizations, especially when modules are compiled separately or written in different languages. In languages with syntactic extension capabilities, each module in a program can be written in a separate language, and the module system must ensure that the modules interoperate correctly. In Racket, the module system ensures this by separating module code into phases for runtime and compile-time and allowing phased imports and exports inside modules. We present an algorithm, called demodularization, that combines all executable code from a phased modular program into a single module that can then be optimized as a whole program. The demodularized programs have the same behavior as their modular counterparts but are easier to optimize. We show that programs maintain their meaning through an operational semantics of the demodularization process and verify that performance increases by comparing modular Racket programs to the equivalent demodularized and optimized programs. We use the existing Racket optimizer to optimize the demodularized programs by decompiling them into an intermediate form that the optimizer uses. We also demonstrate a dead code elimination optimization that dramatically reduces the file size of demodularized Racket programs.","abstract_has_math":false,"creators":["Johnson, Blake Dennis"],"institution":"Brigham Young University - Provo","degree_name":"MS","degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2016,"date_issued":"2016-03-01T08:00:00Z","date_published":"2016-03-01T08:00:00Z","updated_at":"2026-11-27T02:26:11Z","subjects":["macros","Racket","modules","optimization","Computer Sciences"],"languages":["english"],"rights":[],"rights_urls":["http://lib.byu.edu/about/copyright/"],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://scholarsarchive.byu.edu/etd/5722","outbound_label":"Repository record","outbound_source":"dc:identifier","record_url":"https://scholarsarchive.byu.edu/etd/5722","record_label":"Repository record","record_kind":"record","record_source":"dc:identifier","access_status":null,"embargo_until":null,"access_note":null},"oai_pmh_record":{"url":"https://union.ndltd.org/oai-pmh/?verb=GetRecord&metadataPrefix=oai_dc&identifier=oai%3Aunion.ndltd.org%3Arepo%3Abyu%3Aoai%3Ascholarsarchive.byu.edu%3Aetd-6721","prefix":"oai_dc"},"source_record":{"url":"https://scholarsarchive.byu.edu/do/oai/?verb=GetRecord&metadataPrefix=oai_etdms&identifier=oai%3Ascholarsarchive.byu.edu%3Aetd-6721","prefix":"oai_etdms"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:creator","label":"Author","values":["Johnson, Blake Dennis"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date","label":"Dc Date","values":["2016-03-01T08:00:00Z"]},{"key":"dc:publisher","label":"Institution","values":["Brigham Young University - Provo"]},{"key":"dc:type","label":"Dc Type","values":["Thesis"]},{"key":"thesis:degree_name","label":"Degree Name","values":["MS"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["macros","Racket","modules","optimization","Computer Sciences"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language","label":"Dc Language","values":["english"]},{"key":"dc:rights.license","label":"Dc Rights License","values":["http://lib.byu.edu/about/copyright/"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier","label":"Identifier","values":["https://scholarsarchive.byu.edu/etd/5722"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description","label":"Description","values":["Physical and Mathematical Sciences","Computer Science"]},{"key":"dc:description.abstract","label":"Abstract","values":["Programmers want to write modular programs to increase maintainability and create abstractions, but modularity hampers optimizations, especially when modules are compiled separately or written in different languages. In languages with syntactic extension capabilities, each module in a program can be written in a separate language, and the module system must ensure that the modules interoperate correctly. In Racket, the module system ensures this by separating module code into phases for runtime and compile-time and allowing phased imports and exports inside modules. We present an algorithm, called demodularization, that combines all executable code from a phased modular program into a single module that can then be optimized as a whole program. The demodularized programs have the same behavior as their modular counterparts but are easier to optimize. We show that programs maintain their meaning through an operational semantics of the demodularization process and verify that performance increases by comparing modular Racket programs to the equivalent demodularized and optimized programs. We use the existing Racket optimizer to optimize the demodularized programs by decompiling them into an intermediate form that the optimizer uses. We also demonstrate a dead code elimination optimization that dramatically reduces the file size of demodularized Racket programs."]},{"key":"dc:format","label":"Dc Format","values":["application:pdf"]},{"key":"dc:source","label":"Dc Source","values":["Brigham Young University - Provo"]},{"key":"dc:title","label":"Title","values":["Enabling Optimizations Through Demodularization"]}]}],"canonical_facts":{"dc:creator":["Johnson, Blake Dennis"],"dc:date":["2016-03-01T08:00:00Z"],"dc:description":["Physical and Mathematical Sciences","Computer Science"],"dc:description.abstract":["Programmers want to write modular programs to increase maintainability and create abstractions, but modularity hampers optimizations, especially when modules are compiled separately or written in different languages. In languages with syntactic extension capabilities, each module in a program can be written in a separate language, and the module system must ensure that the modules interoperate correctly. In Racket, the module system ensures this by separating module code into phases for runtime and compile-time and allowing phased imports and exports inside modules. We present an algorithm, called demodularization, that combines all executable code from a phased modular program into a single module that can then be optimized as a whole program. The demodularized programs have the same behavior as their modular counterparts but are easier to optimize. We show that programs maintain their meaning through an operational semantics of the demodularization process and verify that performance increases by comparing modular Racket programs to the equivalent demodularized and optimized programs. We use the existing Racket optimizer to optimize the demodularized programs by decompiling them into an intermediate form that the optimizer uses. We also demonstrate a dead code elimination optimization that dramatically reduces the file size of demodularized Racket programs."],"dc:format":["application:pdf"],"dc:identifier":["https://scholarsarchive.byu.edu/etd/5722"],"dc:language":["english"],"dc:publisher":["Brigham Young University - Provo"],"dc:rights.license":["http://lib.byu.edu/about/copyright/"],"dc:source":["Brigham Young University - Provo"],"dc:subject":["macros","Racket","modules","optimization","Computer Sciences"],"dc:title":["Enabling Optimizations Through Demodularization"],"dc:type":["Thesis"],"thesis:degree_name":["MS"]},"updated_at":"2026-11-27T02:26:11Z"}