{"id":{"repo_id":"chalmers","oai_identifier":"oai:odr.chalmers.se:20.500.12380/238552"},"canonical_url":"https://search.ndltd.org/etd/chalmers/oai:odr.chalmers.se:20.500.12380/238552","repository":{"repo_id":"chalmers","name":"Chalmers University of Technology","base_url":"https://odr.chalmers.se/oai/request"},"display":{"title":"Monadic Intermediate Language for Modular and Generic Compilers","abstract":"Most modern compilers perform a number of sophisticated program analyses and transformations, with their correctness and safety being of extreme importance. Intermediate representations used in compilers play a crucial role in defining how these procedures will be performed: what is possible to express and a level of effort required. A variety of computational effects present in modern programming languages imposes additional challenges on compiler writers. This thesis starts with a brief introduction to monads and monad transformers and their relation to programming languages. A survey of the existing intermediate languages based on monads as well as highlights of the current developments in programming with effects are presented. It continues with the main contribution of this work: Monadic Intermediate Language (MIL), which is a statically and explicitly typed functional language, which uses monads and monad transformers to express different computational effects and their combinations. To evaluate the designed intermediate language, two source languages representing two major programming paradigms: object-oriented and functional, have been designed and compilers targeting MIL have been implemented. Strengths and weaknesses of MIL uncovered during the implementation of the source programming languages are described in detail. We conclude with describing code transformations and optimisations implemented for MIL, including very general effect-independent algebraic equivalences, such as, for example, monad laws, as well as a number of effect-dependent transformations. Relations to some of the well-known state-of-the-art optimisation techniques are outlined. The ideas described in this thesis are implemented as three separate Haskell packages (mil, funlang and oolang), which are open source and freely available online.","abstract_html":"Most modern compilers perform a number of sophisticated program analyses and transformations, with their correctness and safety being of extreme importance. Intermediate representations used in compilers play a crucial role in defining how these procedures will be performed: what is possible to express and a level of effort required. A variety of computational effects present in modern programming languages imposes additional challenges on compiler writers. This thesis starts with a brief introduction to monads and monad transformers and their relation to programming languages. A survey of the existing intermediate languages based on monads as well as highlights of the current developments in programming with effects are presented. It continues with the main contribution of this work: Monadic Intermediate Language (MIL), which is a statically and explicitly typed functional language, which uses monads and monad transformers to express different computational effects and their combinations. To evaluate the designed intermediate language, two source languages representing two major programming paradigms: object-oriented and functional, have been designed and compilers targeting MIL have been implemented. Strengths and weaknesses of MIL uncovered during the implementation of the source programming languages are described in detail. We conclude with describing code transformations and optimisations implemented for MIL, including very general effect-independent algebraic equivalences, such as, for example, monad laws, as well as a number of effect-dependent transformations. Relations to some of the well-known state-of-the-art optimisation techniques are outlined. The ideas described in this thesis are implemented as three separate Haskell packages (mil, funlang and oolang), which are open source and freely available online.","abstract_has_math":false,"creators":["Lypai, Dmytro"],"institution":null,"degree_name":null,"degree_level":"H","degree_discipline":null,"degree_department":"Chalmers tekniska högskola / Institutionen för data- och informationsteknik (Chalmers)","school":null,"contributors":[],"advisors":[],"committee_chairs":[],"committee_members":[],"year":2016,"date_issued":"2016","date_published":"2016","updated_at":"2026-11-19T02:50:59Z","subjects":["Informations- och kommunikationsteknik","Data- och informationsvetenskap","Information & Communication Technology","Computer and Information Science"],"languages":["eng"],"rights":[],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/20.500.12380/238552","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/20.500.12380/238552","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","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%3Achalmers%3Aoai%3Aodr.chalmers.se%3A20.500.12380%2F238552","prefix":"oai_dc"},"source_record":{"url":"https://odr.chalmers.se/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Aodr.chalmers.se%3A20.500.12380%2F238552","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.department","label":"Department","values":["Chalmers tekniska högskola / Institutionen för data- och informationsteknik (Chalmers)","Chalmers University of Technology / Department of Computer Science and Engineering (Chalmers)"]},{"key":"dc:creator","label":"Author","values":["Lypai, Dmytro"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2019-07-03T13:55:43Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2019-07-03T13:55:43Z"]},{"key":"dc:date.issued","label":"Date","values":["2016"]},{"key":"dc:publisher.program","label":"Dc Publisher Program","values":["Computer science – algorithms, languages and logic (MPALG), MSc"]},{"key":"dc:type.degree","label":"Dc Type Degree","values":["Examensarbete för masterexamen","Master Thesis"]},{"key":"thesis:degree_level","label":"Degree Level","values":["H"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["Informations- och kommunikationsteknik","Data- och informationsvetenskap","Information & Communication Technology","Computer and Information Science"]},{"key":"dc:subject.uppsok","label":"Dc Subject Uppsok","values":["Technology"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["eng"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/20.500.12380/238552"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Most modern compilers perform a number of sophisticated program analyses and transformations, with their correctness and safety being of extreme importance. Intermediate representations used in compilers play a crucial role in defining how these procedures will be performed: what is possible to express and a level of effort required. A variety of computational effects present in modern programming languages imposes additional challenges on compiler writers. This thesis starts with a brief introduction to monads and monad transformers and their relation to programming languages. A survey of the existing intermediate languages based on monads as well as highlights of the current developments in programming with effects are presented. It continues with the main contribution of this work: Monadic Intermediate Language (MIL), which is a statically and explicitly typed functional language, which uses monads and monad transformers to express different computational effects and their combinations. To evaluate the designed intermediate language, two source languages representing two major programming paradigms: object-oriented and functional, have been designed and compilers targeting MIL have been implemented. Strengths and weaknesses of MIL uncovered during the implementation of the source programming languages are described in detail. We conclude with describing code transformations and optimisations implemented for MIL, including very general effect-independent algebraic equivalences, such as, for example, monad laws, as well as a number of effect-dependent transformations. Relations to some of the well-known state-of-the-art optimisation techniques are outlined. The ideas described in this thesis are implemented as three separate Haskell packages (mil, funlang and oolang), which are open source and freely available online."]},{"key":"dc:title","label":"Title","values":["Monadic Intermediate Language for Modular and Generic Compilers"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.department":["Chalmers tekniska högskola / Institutionen för data- och informationsteknik (Chalmers)","Chalmers University of Technology / Department of Computer Science and Engineering (Chalmers)"],"dc:creator":["Lypai, Dmytro"],"dc:date.accessioned":["2019-07-03T13:55:43Z"],"dc:date.available":["2019-07-03T13:55:43Z"],"dc:date.issued":["2016"],"dc:description.abstract":["Most modern compilers perform a number of sophisticated program analyses and transformations, with their correctness and safety being of extreme importance. Intermediate representations used in compilers play a crucial role in defining how these procedures will be performed: what is possible to express and a level of effort required. A variety of computational effects present in modern programming languages imposes additional challenges on compiler writers. This thesis starts with a brief introduction to monads and monad transformers and their relation to programming languages. A survey of the existing intermediate languages based on monads as well as highlights of the current developments in programming with effects are presented. It continues with the main contribution of this work: Monadic Intermediate Language (MIL), which is a statically and explicitly typed functional language, which uses monads and monad transformers to express different computational effects and their combinations. To evaluate the designed intermediate language, two source languages representing two major programming paradigms: object-oriented and functional, have been designed and compilers targeting MIL have been implemented. Strengths and weaknesses of MIL uncovered during the implementation of the source programming languages are described in detail. We conclude with describing code transformations and optimisations implemented for MIL, including very general effect-independent algebraic equivalences, such as, for example, monad laws, as well as a number of effect-dependent transformations. Relations to some of the well-known state-of-the-art optimisation techniques are outlined. The ideas described in this thesis are implemented as three separate Haskell packages (mil, funlang and oolang), which are open source and freely available online."],"dc:identifier.uri":["https://hdl.handle.net/20.500.12380/238552"],"dc:language.iso":["eng"],"dc:publisher.program":["Computer science – algorithms, languages and logic (MPALG), MSc"],"dc:subject":["Informations- och kommunikationsteknik","Data- och informationsvetenskap","Information & Communication Technology","Computer and Information Science"],"dc:subject.uppsok":["Technology"],"dc:title":["Monadic Intermediate Language for Modular and Generic Compilers"],"dc:type.degree":["Examensarbete för masterexamen","Master Thesis"],"others:access_status":["open.access"],"thesis:degree_level":["H"]},"updated_at":"2026-11-19T02:50:59Z"}