{"id":31552397,"url":"https://github.com/phreppo/hile","last_synced_at":"2025-10-04T19:55:11.860Z","repository":{"id":69593722,"uuid":"156755128","full_name":"phreppo/hile","owner":"phreppo","description":"Interpreter for the While language","archived":false,"fork":false,"pushed_at":"2019-12-20T17:53:23.000Z","size":135,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-08-15T09:54:56.867Z","etag":null,"topics":["interpreter","semantics","while"],"latest_commit_sha":null,"homepage":"","language":"Haskell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/phreppo.png","metadata":{"files":{"readme":"README.md","changelog":"ChangeLog.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-11-08T19:03:30.000Z","updated_at":"2024-08-15T09:54:59.977Z","dependencies_parsed_at":null,"dependency_job_id":"d3e708bd-5abf-4eac-b9b9-5bbe9d144b73","html_url":"https://github.com/phreppo/hile","commit_stats":null,"previous_names":["phreppo/hile"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/phreppo/hile","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phreppo%2Fhile","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phreppo%2Fhile/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phreppo%2Fhile/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phreppo%2Fhile/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/phreppo","download_url":"https://codeload.github.com/phreppo/hile/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/phreppo%2Fhile/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278366634,"owners_count":25975090,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["interpreter","semantics","while"],"created_at":"2025-10-04T19:55:06.759Z","updated_at":"2025-10-04T19:55:11.845Z","avatar_url":"https://github.com/phreppo.png","language":"Haskell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# hile\n\nInterpreter written in Haskell for the While language described [here](http://www.cs.kun.nl/~hubbers/courses/sc_1718/materiaal/wiley.pdf). It builds the semantic function of the code and then applies it to the given state. In particular the interpreter performs a fixpoint calculation using the [Knaster–Tarski theorem](https://en.wikipedia.org/wiki/Knaster%E2%80%93Tarski_theorem) for calculating the semantics of the while construct. For further information see [this](http://www.cs.kun.nl/~hubbers/courses/sc_1718/materiaal/wiley.pdf).\n\n![alt text](kt-theorem.png \"Logo Title Text 1\")\n \nTo use the interpreter one may exploit the REPL function in the main or \n\n```\nstack ghci\n```\n\nand then the function `i` to interpret one program in one given state. For example:\n\n```\ni (\"y:=1; while x != 1 do y:=y*x; x:=x-1\",\"[x-\u003e7000]\")\n```\n\ncomputes the factorial of 7000. The grammar of the language is: \n\n![alt text](grammar.png \"Logo Title Text 1\")\n\nThe syntax is enriched with some syntactic sugar, always removed before interpreting the program:\n\n| Sugar constructs       |\n| :-------------: |\n| for       | \n| repeat      | \n| or | \n| \u003c |\n| \u003e |\n| \u003e= |\n| != |\n| ^ |\n\nTo build the executable you need [happy](https://www.haskell.org/happy/) installed, one parser generator for Haskell. To build the executable run:\n\n```\n./generateGrammar\nstack build\n```\n\nTo run the REPL mode use:\n\n```\n./i\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphreppo%2Fhile","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fphreppo%2Fhile","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fphreppo%2Fhile/lists"}