{"title":"Haskelite:基于模式匹配计算的跟踪解释器","authors":"Pedro Vasconcelos, Rodrigo Marques","doi":"arxiv-2407.11831","DOIUrl":null,"url":null,"abstract":"Many Haskell textbooks explain the evaluation of pure functional programs as\na process of stepwise rewriting using equations. However, usual implementation\ntechniques perform program transformations that make producing the\ncorresponding tracing evaluations difficult. This paper presents a tracing\ninterpreter for a subset of Haskell based on the pattern matching calculus of\nKahl. We start from a big-step semantics in the style of Launchbury and develop\na small-step semantics in the style of Sestoft's machines. This machine is used\nin the implementation of a step-by-step educational interpreter. We also\ndiscuss some implementation decisions and present illustrative examples.","PeriodicalId":501197,"journal":{"name":"arXiv - CS - Programming Languages","volume":null,"pages":null},"PeriodicalIF":0.0000,"publicationDate":"2024-07-16","publicationTypes":"Journal Article","fieldsOfStudy":null,"isOpenAccess":false,"openAccessPdf":"","citationCount":"0","resultStr":"{\"title\":\"Haskelite: A Tracing Interpreter Based on a Pattern-Matching Calculus\",\"authors\":\"Pedro Vasconcelos, Rodrigo Marques\",\"doi\":\"arxiv-2407.11831\",\"DOIUrl\":null,\"url\":null,\"abstract\":\"Many Haskell textbooks explain the evaluation of pure functional programs as\\na process of stepwise rewriting using equations. However, usual implementation\\ntechniques perform program transformations that make producing the\\ncorresponding tracing evaluations difficult. This paper presents a tracing\\ninterpreter for a subset of Haskell based on the pattern matching calculus of\\nKahl. We start from a big-step semantics in the style of Launchbury and develop\\na small-step semantics in the style of Sestoft's machines. This machine is used\\nin the implementation of a step-by-step educational interpreter. We also\\ndiscuss some implementation decisions and present illustrative examples.\",\"PeriodicalId\":501197,\"journal\":{\"name\":\"arXiv - CS - Programming Languages\",\"volume\":null,\"pages\":null},\"PeriodicalIF\":0.0000,\"publicationDate\":\"2024-07-16\",\"publicationTypes\":\"Journal Article\",\"fieldsOfStudy\":null,\"isOpenAccess\":false,\"openAccessPdf\":\"\",\"citationCount\":\"0\",\"resultStr\":null,\"platform\":\"Semanticscholar\",\"paperid\":null,\"PeriodicalName\":\"arXiv - CS - Programming Languages\",\"FirstCategoryId\":\"1085\",\"ListUrlMain\":\"https://doi.org/arxiv-2407.11831\",\"RegionNum\":0,\"RegionCategory\":null,\"ArticlePicture\":[],\"TitleCN\":null,\"AbstractTextCN\":null,\"PMCID\":null,\"EPubDate\":\"\",\"PubModel\":\"\",\"JCR\":\"\",\"JCRName\":\"\",\"Score\":null,\"Total\":0}","platform":"Semanticscholar","paperid":null,"PeriodicalName":"arXiv - CS - Programming Languages","FirstCategoryId":"1085","ListUrlMain":"https://doi.org/arxiv-2407.11831","RegionNum":0,"RegionCategory":null,"ArticlePicture":[],"TitleCN":null,"AbstractTextCN":null,"PMCID":null,"EPubDate":"","PubModel":"","JCR":"","JCRName":"","Score":null,"Total":0}
Haskelite: A Tracing Interpreter Based on a Pattern-Matching Calculus
Many Haskell textbooks explain the evaluation of pure functional programs as
a process of stepwise rewriting using equations. However, usual implementation
techniques perform program transformations that make producing the
corresponding tracing evaluations difficult. This paper presents a tracing
interpreter for a subset of Haskell based on the pattern matching calculus of
Kahl. We start from a big-step semantics in the style of Launchbury and develop
a small-step semantics in the style of Sestoft's machines. This machine is used
in the implementation of a step-by-step educational interpreter. We also
discuss some implementation decisions and present illustrative examples.