All Projects → gangliao → TIGER

gangliao / TIGER

Licence: Apache-2.0 License
implement a full compiler based on c++ 11

Programming Languages

assembly
5116 projects
C++
36643 projects - #6 most used programming language
python
139335 projects - #7 most used programming language
HTML
75241 projects

Projects that are alternatives of or similar to TIGER

Awesome Web You Should Know
🌎awesome web you should know
Stars: ✭ 154 (+805.88%)
Mutual labels:  front-end, backend
Zxinglite
🔥 ZXing的精简版,优化扫码和生成二维码/条形码,内置闪光灯等功能。扫描风格支持:微信的线条样式,支付宝的网格样式。几句代码轻松拥有扫码功能 ,ZXingLite让集成更简单。(扫码识别速度快如微信)
Stars: ✭ 2,117 (+12352.94%)
Mutual labels:  code-generator, scanner
core
An advanced and highly optimized Java library to build frameworks: it's useful for scanning class paths, generating classes at runtime, facilitating the use of reflection, scanning the filesystem, executing stringified source code and much more...
Stars: ✭ 100 (+488.24%)
Mutual labels:  code-generator, scanner
Dev Practice
Practice your skills with these ideas.
Stars: ✭ 1,127 (+6529.41%)
Mutual labels:  front-end, backend
vagas
🤝 Venha fazer parte do nosso time
Stars: ✭ 15 (-11.76%)
Mutual labels:  front-end, backend
missionlog
🚀 lightweight logging • supports level based filtering and tagging • weighs in at around 500 bytes
Stars: ✭ 19 (+11.76%)
Mutual labels:  front-end, backend
paperclip
A DSL for web UI builders
Stars: ✭ 197 (+1058.82%)
Mutual labels:  front-end, backend
profile-store
Store profile links of people you admire, at one place. Made using MERN stack.
Stars: ✭ 37 (+117.65%)
Mutual labels:  backend
WPGrabInfo
WP Grab Info v2
Stars: ✭ 43 (+152.94%)
Mutual labels:  scanner
MX1014
MX1014 is a flexible, lightweight and fast port scanner.
Stars: ✭ 79 (+364.71%)
Mutual labels:  scanner
qm
QM model-based design tool and code generator based on UML state machines
Stars: ✭ 54 (+217.65%)
Mutual labels:  code-generator
nesca
The legendary netstalking NEtwork SCAnner
Stars: ✭ 80 (+370.59%)
Mutual labels:  scanner
garden.zbarcam
Migrated to https://github.com/kivy-garden/zbarcam
Stars: ✭ 49 (+188.24%)
Mutual labels:  scanner
food-help
A clone of popular food and business review web app yelp
Stars: ✭ 24 (+41.18%)
Mutual labels:  backend
englishextra.github.io
English Grammar for Russian-Speakers, a PWA website + SPA
Stars: ✭ 19 (+11.76%)
Mutual labels:  front-end
log4jscanwin
Log4j Vulnerability Scanner for Windows
Stars: ✭ 142 (+735.29%)
Mutual labels:  scanner
lightsout
🎲 Lights Out Game
Stars: ✭ 23 (+35.29%)
Mutual labels:  front-end
pointcss
A lightweight and flexible CSS Framework for building modern responsive web apps
Stars: ✭ 33 (+94.12%)
Mutual labels:  front-end
cf-check
CloudFlare Checker written in Go
Stars: ✭ 147 (+764.71%)
Mutual labels:  scanner
universitas.no
Online newspaper built with Django
Stars: ✭ 16 (-5.88%)
Mutual labels:  backend

TIGER - A Tiny Full Compiler

Build Status

This tiny compiler includes both front end and back end.

Front end: Grammar Rules, LL(1) Parse Table, Syntax and Semantic Check and Intermediate Code.

Back end: IR Optimization (Intra-block CFG optimization), MIPS Register Allocation, Instruction Selection and Code Generation.

You can access https://github.com/gangliao/TIGER to view the documentation!

How to Build

  1. development environment

    Currently, this project repository is maintained on github publicly and also been deployed on Travis CI. It supports both Ubuntu and Mac OS X.

  2. build:

    	# cd project dir
    	cd Tiger-Compiler
    	# build scanner, parser, generator
    	mkdir build && cd build
    	# cmake building tool
    	cmake ..
    	make -j4
  3. run:

    You can parsing test cases named *.tiger under /testCases2 to generate IR code. Default it will utilize CFG optimized technique to generate MIPS asm code.

    	# verbose mode: "-d to implement a verbose mode"
    	./src/parser <filename> -d

    If you want to use the naive mode to generate asm code, simply issue:

    	./src/parser <filename> -d -naive
  4. test:

    In testCases2 directory, it includes a test script test.sh to execute all test cases and generate the corresponding asm files *.naive.s and *.cfg.s.

    After souce code is compiled, you can simply issue the commands:

    cd testCases2
    sh ./test.sh

Demo

NOTE: This demo is gif graph format. If you have problem to view it in the markdown file, you can directly open it which located at img/demo.gif.

This Demo shows that

(1) [Compile Source Code] How to compile and generate parser binary ?

(2) [Compiler Front End] How to transfrom raw tiger program into IR code ?

(3) [Compiler Back End] How to generate optimized MIPS asm code via IR code ?

Desgin Internals

Tiger Compiler Front End - Design Internals

Tiger Compiler Back End - Design Internals

Test Cases

We passed all tests cases which provided by TA.

Please check out the details in report Phase2_Testing_and_Output.pdf from current directory, which includes test cases and their quality comparisons for naive and CFG intra-block register allocation.

Accomplishment

  • Register allocation code
    • Naive
    • CFG and intra block allocation
    • EBB and intra-EBB allocation
    • Whole function register allocation
    • Live Range Analysis and Graph Coloring
  • Instruction selection and generation code
  • Passes tests using generated code executing on simulator.
  • Report (desgin Internals, how to build, run, code quality comparisions, etc.)
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].