{"id":{"repo_id":"rice","oai_identifier":"oai:repository.rice.edu:1911/110375"},"canonical_url":"https://search.ndltd.org/etd/rice/oai:repository.rice.edu:1911/110375","repository":{"repo_id":"rice","name":"Rice University","base_url":"https://repository.rice.edu/server/oai/request"},"display":{"title":"Constrained Program Inference Using Metropolis-Hastings Sampling","abstract":"Conditional Program Generation (CPG) is a Sketch program generation technique that uses clues given by the user to generate the required Sketch. The CPG model generates a Sketch by sampling from the learned probability distribution P(sketch|clues). However, it cannot guarantee that the generated Sketch will incorporate all of the given clues. In practice, we find that when the CPG model assigns vanishingly low probabilities to every Sketch program in the Sketch program space that incorporates all of the given clues, it often returns a high-probability Sketch program that does not contain the clues. Such scenarios arise when the user wants to generate a novel program and gives clues that are significantly different from any set of clues the model was trained on. In this thesis, we introduce Constrained Program Inference (CPI), a method that treats constrained Sketch program generation as an inference problem, rather than a training problem. It guarantees every generated program will incorporate all of the given clues. Our method uses the Metropolis- Hastings algorithm to treat clues as hard constraints, thus enabling CPI to generate novel programs. We find that CPI is able to produce higher-quality programs than CPG.","abstract_html":"Conditional Program Generation (CPG) is a Sketch program generation technique that uses clues given by the user to generate the required Sketch. The CPG model generates a Sketch by sampling from the learned probability distribution P(sketch|clues). However, it cannot guarantee that the generated Sketch will incorporate all of the given clues. In practice, we find that when the CPG model assigns vanishingly low probabilities to every Sketch program in the Sketch program space that incorporates all of the given clues, it often returns a high-probability Sketch program that does not contain the clues. Such scenarios arise when the user wants to generate a novel program and gives clues that are significantly different from any set of clues the model was trained on. In this thesis, we introduce Constrained Program Inference (CPI), a method that treats constrained Sketch program generation as an inference problem, rather than a training problem. It guarantees every generated program will incorporate all of the given clues. Our method uses the Metropolis- Hastings algorithm to treat clues as hard constraints, thus enabling CPI to generate novel programs. We find that CPI is able to produce higher-quality programs than CPG.","abstract_has_math":false,"creators":["Chilukuri, Meghana Vasudha Oris"],"institution":"Rice University","degree_name":"Master of Science","degree_level":"Masters","degree_discipline":"Engineering","degree_department":"Computer Science","school":null,"contributors":[],"advisors":["Jermaine, Christopher"],"committee_chairs":[],"committee_members":[],"year":2021,"date_issued":"2021-04-30","date_published":"2021-04-30","updated_at":"2026-11-19T09:22:54Z","subjects":["program synthesis","metropolis-hastings","sketch generation"],"languages":["eng"],"rights":["Copyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder."],"rights_urls":[],"identifier_entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Chilukuri, Meghana Vasudha Oris. \"Constrained Program Inference Using Metropolis-Hastings Sampling.\" (2021) Master’s Thesis, Rice University. https://hdl.handle.net/1911/110375"],"render_values":[{"text":"Chilukuri, Meghana Vasudha Oris. \"Constrained Program Inference Using Metropolis-Hastings Sampling.\" (2021) Master’s Thesis, Rice University. https://hdl.handle.net/1911/110375","href":null,"code":true}]}],"person_identifier_entries":[]},"links":{"outbound_url":"https://hdl.handle.net/1911/110375","outbound_label":"Handle","outbound_source":"dc:identifier.uri","record_url":"https://hdl.handle.net/1911/110375","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%3Arice%3Aoai%3Arepository.rice.edu%3A1911%2F110375","prefix":"oai_dc"},"source_record":{"url":"https://repository.rice.edu/server/oai/request?verb=GetRecord&metadataPrefix=dim&identifier=oai%3Arepository.rice.edu%3A1911%2F110375","prefix":"dim"},"metadata_groups":[{"id":"people","label":"People","entries":[{"key":"dc:contributor.advisor","label":"Advisor","values":["Jermaine, Christopher"]},{"key":"dc:creator","label":"Author","values":["Chilukuri, Meghana Vasudha Oris"]}]},{"id":"academic_context","label":"Academic Context","entries":[{"key":"dc:date.accessioned","label":"Dc Date Accessioned","values":["2021-05-03T19:29:28Z"]},{"key":"dc:date.available","label":"Dc Date Available","values":["2021-05-03T19:29:28Z"]},{"key":"dc:date.created","label":"Dc Date Created","values":["2021-05"]},{"key":"dc:date.issued","label":"Date","values":["2021-04-30"]},{"key":"dc:date.submitted","label":"Dc Date Submitted","values":["May 2021"]},{"key":"dc:date.updated","label":"Dc Date Updated","values":["2021-05-03T19:29:28Z"]},{"key":"dc:type","label":"Dc Type","values":["Thesis","Text"]},{"key":"thesis:degree_department","label":"Department","values":["Computer Science"]},{"key":"thesis:degree_discipline","label":"Discipline","values":["Engineering"]},{"key":"thesis:degree_level","label":"Degree Level","values":["Masters"]},{"key":"thesis:degree_name","label":"Degree Name","values":["Master of Science"]},{"key":"thesis:degree_program","label":"Thesis Degree Program","values":["Program Synthesis"]},{"key":"thesis:institution_name","label":"Thesis Institution Name","values":["Rice University"]}]},{"id":"subjects_keywords","label":"Subjects and Keywords","entries":[{"key":"dc:subject","label":"Dc Subject","values":["program synthesis","metropolis-hastings","sketch generation"]}]},{"id":"language_rights","label":"Language and Rights","entries":[{"key":"dc:language.iso","label":"Language (ISO)","values":["eng"]},{"key":"dc:rights","label":"Dc Rights","values":["Copyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder."]}]},{"id":"identifiers","label":"Identifiers","entries":[{"key":"dc:identifier.citation","label":"Dc Identifier Citation","values":["Chilukuri, Meghana Vasudha Oris. \"Constrained Program Inference Using Metropolis-Hastings Sampling.\" (2021) Master’s Thesis, Rice University. https://hdl.handle.net/1911/110375"]},{"key":"dc:identifier.uri","label":"Identifier URI","values":["https://hdl.handle.net/1911/110375"]}]},{"id":"additional","label":"Additional Metadata","entries":[{"key":"dc:description.abstract","label":"Abstract","values":["Conditional Program Generation (CPG) is a Sketch program generation technique that uses clues given by the user to generate the required Sketch. The CPG model generates a Sketch by sampling from the learned probability distribution P(sketch|clues). However, it cannot guarantee that the generated Sketch will incorporate all of the given clues. In practice, we find that when the CPG model assigns vanishingly low probabilities to every Sketch program in the Sketch program space that incorporates all of the given clues, it often returns a high-probability Sketch program that does not contain the clues. Such scenarios arise when the user wants to generate a novel program and gives clues that are significantly different from any set of clues the model was trained on. In this thesis, we introduce Constrained Program Inference (CPI), a method that treats constrained Sketch program generation as an inference problem, rather than a training problem. It guarantees every generated program will incorporate all of the given clues. Our method uses the Metropolis- Hastings algorithm to treat clues as hard constraints, thus enabling CPI to generate novel programs. We find that CPI is able to produce higher-quality programs than CPG."]},{"key":"dc:format.mimetype","label":"Dc Format Mimetype","values":["application/pdf"]},{"key":"dc:title","label":"Title","values":["Constrained Program Inference Using Metropolis-Hastings Sampling"]},{"key":"others:access_status","label":"Others Access Status","values":["open.access"]}]}],"canonical_facts":{"dc:contributor.advisor":["Jermaine, Christopher"],"dc:creator":["Chilukuri, Meghana Vasudha Oris"],"dc:date.accessioned":["2021-05-03T19:29:28Z"],"dc:date.available":["2021-05-03T19:29:28Z"],"dc:date.created":["2021-05"],"dc:date.issued":["2021-04-30"],"dc:date.submitted":["May 2021"],"dc:date.updated":["2021-05-03T19:29:28Z"],"dc:description.abstract":["Conditional Program Generation (CPG) is a Sketch program generation technique that uses clues given by the user to generate the required Sketch. The CPG model generates a Sketch by sampling from the learned probability distribution P(sketch|clues). However, it cannot guarantee that the generated Sketch will incorporate all of the given clues. In practice, we find that when the CPG model assigns vanishingly low probabilities to every Sketch program in the Sketch program space that incorporates all of the given clues, it often returns a high-probability Sketch program that does not contain the clues. Such scenarios arise when the user wants to generate a novel program and gives clues that are significantly different from any set of clues the model was trained on. In this thesis, we introduce Constrained Program Inference (CPI), a method that treats constrained Sketch program generation as an inference problem, rather than a training problem. It guarantees every generated program will incorporate all of the given clues. Our method uses the Metropolis- Hastings algorithm to treat clues as hard constraints, thus enabling CPI to generate novel programs. We find that CPI is able to produce higher-quality programs than CPG."],"dc:format.mimetype":["application/pdf"],"dc:identifier.citation":["Chilukuri, Meghana Vasudha Oris. \"Constrained Program Inference Using Metropolis-Hastings Sampling.\" (2021) Master’s Thesis, Rice University. https://hdl.handle.net/1911/110375"],"dc:identifier.uri":["https://hdl.handle.net/1911/110375"],"dc:language.iso":["eng"],"dc:rights":["Copyright is held by the author, unless otherwise indicated. Permission to reuse, publish, or reproduce the work beyond the bounds of fair use or other exemptions to copyright law must be obtained from the copyright holder."],"dc:subject":["program synthesis","metropolis-hastings","sketch generation"],"dc:title":["Constrained Program Inference Using Metropolis-Hastings Sampling"],"dc:type":["Thesis","Text"],"others:access_status":["open.access"],"thesis:degree_department":["Computer Science"],"thesis:degree_discipline":["Engineering"],"thesis:degree_level":["Masters"],"thesis:degree_name":["Master of Science"],"thesis:degree_program":["Program Synthesis"],"thesis:institution_name":["Rice University"]},"updated_at":"2026-11-19T09:22:54Z"}