{"id":18769701,"url":"https://github.com/sunchao/tiger","last_synced_at":"2026-02-11T04:02:47.310Z","repository":{"id":6417200,"uuid":"7655588","full_name":"sunchao/tiger","owner":"sunchao","description":"Tiger Compiler from \"Modern Compiler Implementation in ML\" by Andrew W. Appel","archived":false,"fork":false,"pushed_at":"2015-05-15T05:03:01.000Z","size":378,"stargazers_count":102,"open_issues_count":1,"forks_count":20,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-08-10T00:22:15.613Z","etag":null,"topics":["compiler","sml"],"latest_commit_sha":null,"homepage":null,"language":"Standard ML","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sunchao.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-01-16T22:54:11.000Z","updated_at":"2025-04-27T14:25:25.000Z","dependencies_parsed_at":"2022-09-06T01:20:40.626Z","dependency_job_id":null,"html_url":"https://github.com/sunchao/tiger","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sunchao/tiger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunchao%2Ftiger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunchao%2Ftiger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunchao%2Ftiger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunchao%2Ftiger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sunchao","download_url":"https://codeload.github.com/sunchao/tiger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sunchao%2Ftiger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29326831,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-11T03:52:29.695Z","status":"ssl_error","status_checked_at":"2026-02-11T03:52:23.094Z","response_time":97,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["compiler","sml"],"created_at":"2024-11-07T19:16:39.837Z","updated_at":"2026-02-11T04:02:47.276Z","avatar_url":"https://github.com/sunchao.png","language":"Standard ML","funding_links":[],"categories":[],"sub_categories":[],"readme":"Tiger Compiler\n=====\n\nTiger Compiler from \"Modern Compiler Implementation in ML\" by Andrew\nW. Appel\n\n\n### Introduction\n\nThis is a Tiger compiler with all modules completed until Chapter 12\nin the book. Basically I followed all the instructions from the book\nwithout much alternation. I also tried to\nadhere to the functional style as much as possible, that means,\nminimize the usage of mutable data structures.\n\n\n### Requirement\n\nSo far the compiler works with either mac or linux. Besides that,\nyou need to have Standard ML and spim installed. Both of them can be\nfetched via homebrew.\n\nStandard ML is obviously need to compile the programs. Since the\ncompiler generates spim code, you'll need the\n[SPIM simulator](http://spimsimulator.sourceforge.net/) to actually\nrun the executables.\n\n### Build\nTo build the compiler, simply run\n\n```\nmake main\n```\n\nThis will build the image using `sources.cm`. Note that it currently\ndoesn't support windows.\n\n### Compile\n\nGiven a tiger source program `foo.tig`, to compile it, you'll need to first copy\nthe file to the project directory, and run\n\n```\nmake foo.spim\n```\n\nThis will compile the file, append `runtime.s` to it, and generate a\noutput SPIM program called `foo.spim`. Then to execute the program,\nrun\n\n```\nspim -file foo.spim\n```\n\nIf `foo.spim` exists, make will not overwrite it. You must remove the file before running make again.\n\n### Future Work\n\nThe second half of the book covers a lot of interesting stuff, and I'm\nthinking about extending the compile with the following features:\n\n* Garbage Collection\n* OO Features\n* Functional Features\n* Polymorphism and Type Inference\n* Optimizations\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunchao%2Ftiger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsunchao%2Ftiger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsunchao%2Ftiger/lists"}