{"id":{"repo_id":"waterloo","oai_identifier":"oai:uwspace.uwaterloo.ca:10012/16133"},"canonical_url":"https://search.ndltd.org/etd/waterloo/oai:uwspace.uwaterloo.ca:10012/16133","repository":{"repo_id":"waterloo","name":"University of Waterloo","base_url":"https://dspacemainprd01.lib.uwaterloo.ca/server/oai/request"},"display":{"title":"TreeGen: a monotonically impure functional language","abstract":"We present TreeGen, an impure functional language designed to express, consume, and validate JSON-like documents, as well as generate text files. The language aims to provide a more reliable and flexible way to create customised Interface Definition Languages, since the current state of the art is implemented via monolithic, ad-hoc codebases, which cannot easily be modified. TreeGen's principal contribution, aside from being tailored to the domain of manipulating documents and generating text, is the concept of monotonic mutability: despite being an impure scripting language, its execution remains deterministic under arbitrary reordering of operations, making it robust to many common classes of programmer error possible in languages that allow unchecked mutability. We prove this by basing TreeGen's unordered constraint-based formal semantics on a partially-ordered model of TreeGen's heap, then showing that the execution of any TreeGen expression's constraint set is deterministic under chaotic iteration. We also give notes on our experience implementing the language. These notes include a model for execution tracing and error reporting, necessary data structures to practically implement the formal semantics, related performance issues, and comments on potential mitigations of those performance issues.","abstract_html":"We present TreeGen, an impure functional language designed to express, consume, and validate JSON-like documents, as well as generate text files. The language aims to provide a more reliable and flexible way to create customised Interface Definition Languages, since the current state of the art is implemented via monolithic, ad-hoc codebases, which cannot easily be modified. TreeGen&#x27;s principal contribution, aside from being tailored to the domain of manipulating documents and generating text, is the concept of monotonic mutability: despite being an impure scripting language, its execution remains deterministic under arbitrary reordering of operations, making it robust to many common classes of programmer error possible in languages that allow unchecked mutability. We prove this by basing TreeGen&#x27;s unordered constraint-based formal semantics on a partially-ordered model of TreeGen&#x27;s heap, then showing that the execution of any TreeGen expression&#x27;s constraint set is deterministic under chaotic iteration. We also give notes on our experience implementing the language. These notes include a model for execution tracing and error reporting, necessary data structures to practically implement the formal semantics, related performance issues, and comments on potential mitigations of those performance issues.","abstract_has_math":false,"creators":["Hackett, Alistair Finn"],"institution":"University of Waterloo","degree_name":null,"degree_level":null,"degree_discipline":null,"degree_department":null,"school":null,"contributors":[],"advisors":["Lhoták, Ondřej"],"committee_chairs":[],"committee_members":[],"year":2020,"date_issued":"2020-08-19","date_published":"2020-08-19","updated_at":"2026-11-19T10:46:45Z","subjects":["programming languages","monotonic mutability","determinism","text templating"],"languages":["en"],"rights":[],"rights_urls":[],"identifier_entries":[],"person_identifier_entries":[]},"links":{"outbound_url":"http://hdl.handle.net/10012/16133","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"http://hdl.handle.net/10012/16133","record_label":"Repository record","record_kind":"handle","record_source":"dc:identifier.uri","download_url":null,"download_label":null,"download_source":null,"access_status":null,"embargo_until":null,"access_note":null},"source_record":{"url":"https://dspacemainprd01.lib.uwaterloo.ca/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Auwspace.uwaterloo.ca%3A10012%2F16133","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Lhoták, Ondřej"]},{"key":"dc:creator","label":"Author","values":["Hackett, Alistair Finn"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2020-08-19T15:19:57Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2020-08-19T15:19:57Z"]},{"key":"dc:date.issued","label":"Date","values":["2020-08-19"]},{"key":"dc:date.submitted","label":"Dc Date Submitted","values":["2020-08-12"]},{"key":"dc:publisher","label":"Institution","values":["University of Waterloo"]},{"key":"dc:type","label":"Dc Type","values":["Master Thesis"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["programming languages","monotonic mutability","determinism","text templating"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["en"]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.uri","label":"Identifier URI","values":["http://hdl.handle.net/10012/16133"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["We present TreeGen, an impure functional language designed to express, consume, and validate JSON-like documents, as well as generate text files. The language aims to provide a more reliable and flexible way to create customised Interface Definition Languages, since the current state of the art is implemented via monolithic, ad-hoc codebases, which cannot easily be modified. TreeGen's principal contribution, aside from being tailored to the domain of manipulating documents and generating text, is the concept of monotonic mutability: despite being an impure scripting language, its execution remains deterministic under arbitrary reordering of operations, making it robust to many common classes of programmer error possible in languages that allow unchecked mutability. We prove this by basing TreeGen's unordered constraint-based formal semantics on a partially-ordered model of TreeGen's heap, then showing that the execution of any TreeGen expression's constraint set is deterministic under chaotic iteration. We also give notes on our experience implementing the language. These notes include a model for execution tracing and error reporting, necessary data structures to practically implement the formal semantics, related performance issues, and comments on potential mitigations of those performance issues."]},{"key":"dc:title","label":"Title","values":["TreeGen: a monotonically impure functional language"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Lhoták, Ondřej"],"dc:creator":["Hackett, Alistair Finn"],"dc:date.accessioned":["2020-08-19T15:19:57Z"],"dc:date.available":["2020-08-19T15:19:57Z"],"dc:date.issued":["2020-08-19"],"dc:date.submitted":["2020-08-12"],"dc:description.abstract":["We present TreeGen, an impure functional language designed to express, consume, and validate JSON-like documents, as well as generate text files. The language aims to provide a more reliable and flexible way to create customised Interface Definition Languages, since the current state of the art is implemented via monolithic, ad-hoc codebases, which cannot easily be modified. TreeGen's principal contribution, aside from being tailored to the domain of manipulating documents and generating text, is the concept of monotonic mutability: despite being an impure scripting language, its execution remains deterministic under arbitrary reordering of operations, making it robust to many common classes of programmer error possible in languages that allow unchecked mutability. We prove this by basing TreeGen's unordered constraint-based formal semantics on a partially-ordered model of TreeGen's heap, then showing that the execution of any TreeGen expression's constraint set is deterministic under chaotic iteration. We also give notes on our experience implementing the language. These notes include a model for execution tracing and error reporting, necessary data structures to practically implement the formal semantics, related performance issues, and comments on potential mitigations of those performance issues."],"dc:identifier.uri":["http://hdl.handle.net/10012/16133"],"dc:language.iso":["en"],"dc:publisher":["University of Waterloo"],"dc:subject":["programming languages","monotonic mutability","determinism","text templating"],"dc:title":["TreeGen: a monotonically impure functional language"],"dc:type":["Master Thesis"],"others:access_status":["open.access"]},"updated_at":"2026-11-19T10:46:45Z"}