{"id":23064395,"url":"https://github.com/hiejulia/compilers","last_synced_at":"2026-05-16T18:33:27.847Z","repository":{"id":104754481,"uuid":"246259040","full_name":"hiejulia/compilers","owner":"hiejulia","description":"Compiler architecture / algorithms","archived":false,"fork":false,"pushed_at":"2020-04-14T14:54:45.000Z","size":103,"stargazers_count":0,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-01T03:35:47.574Z","etag":null,"topics":["c-compiler","compiler-architecture","jit","jvm","lex","yacc"],"latest_commit_sha":null,"homepage":"","language":"Java","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/hiejulia.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-03-10T09:30:05.000Z","updated_at":"2020-04-14T14:55:34.000Z","dependencies_parsed_at":"2023-05-29T14:30:13.016Z","dependency_job_id":null,"html_url":"https://github.com/hiejulia/compilers","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hiejulia/compilers","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiejulia%2Fcompilers","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiejulia%2Fcompilers/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiejulia%2Fcompilers/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiejulia%2Fcompilers/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hiejulia","download_url":"https://codeload.github.com/hiejulia/compilers/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hiejulia%2Fcompilers/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33114242,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-16T04:41:52.686Z","status":"ssl_error","status_checked_at":"2026-05-16T04:41:52.009Z","response_time":115,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: 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":["c-compiler","compiler-architecture","jit","jvm","lex","yacc"],"created_at":"2024-12-16T04:17:56.243Z","updated_at":"2026-05-16T18:33:27.824Z","avatar_url":"https://github.com/hiejulia.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Compiler architecture/ algorithms\n+ Java compiler\n- C lang compiler to x86 assembly lang \n+ Crypto compiler \n+ Android compiler\n+ GNU Compiler Collection(gcc)\n\n## Principles of compiler design \n\u003ca href=\"https://imgur.com/XOY6tgi\"\u003e\u003cimg src=\"https://i.imgur.com/XOY6tgi.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/tosIdXB\"\u003e\u003cimg src=\"https://i.imgur.com/tosIdXB.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/aDjfjYu\"\u003e\u003cimg src=\"https://i.imgur.com/aDjfjYu.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n- lexical anaylysis \n\u003ca href=\"https://imgur.com/7JokU0j\"\u003e\u003cimg src=\"https://i.imgur.com/7JokU0j.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/1nJeQrf\"\u003e\u003cimg src=\"https://i.imgur.com/1nJeQrf.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/wosu8XG\"\u003e\u003cimg src=\"https://i.imgur.com/wosu8XG.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/OXpIAB7\"\u003e\u003cimg src=\"https://i.imgur.com/OXpIAB7.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\n- syntax analysis \n- semantic analysis \n- Intermediate code generation\n- Code optimization \n- Code generation phase \n- Symbol table management\n- Error handling\n- Data-flow analysis \n- Compiler-construction toolkits\n- Parsing \n    \u003ca href=\"https://imgur.com/YhOhF9q\"\u003e\u003cimg src=\"https://i.imgur.com/YhOhF9q.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/kwW9N08\"\u003e\u003cimg src=\"https://i.imgur.com/kwW9N08.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/Tgo2tFC\"\u003e\u003cimg src=\"https://i.imgur.com/Tgo2tFC.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/Qyh0TJb\"\u003e\u003cimg src=\"https://i.imgur.com/Qyh0TJb.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/YhOhF9q\"\u003e\u003cimg src=\"https://i.imgur.com/YhOhF9q.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\u003ca href=\"https://imgur.com/j6UDrhS\"\u003e\u003cimg src=\"https://i.imgur.com/j6UDrhS.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\n\n### MiniC compiler \n- Simplified C \n    - higher order calculator \n- x86 instrusion set \n- AT\u0026T syntax for x86 Assembly lang\n\n- Symbol table in miniC \n    - hoc6 \n    - singly LinkedList \n    - BST - form Symbol table \u0026 Hash Table C \n    - optimization analysis func \n    - ADT - AVL or Red black tree \n\n\n- Target code generation \n    - assembly lang x86 \n\n\n- gdb for debug FPU code \n\n###### Architecture of MiniC compiler \n\u003ca href=\"https://imgur.com/3arpPhK\"\u003e\u003cimg src=\"https://i.imgur.com/3arpPhK.png\" title=\"source: imgur.com\" /\u003e\u003c/a\u003e\n\n- grammar specification file - yacc\n- generate RPN IR, 4 tuple list IR and non optimized assembly code \n- Init Symbol table by insert pre defined constants, keywords, built in functions \n- Symbol table \n- generate non optimized assembly lang for each parsed source lang construct \n- display Symbol table \n- parser : yacc\n\n\n##### Algorithms \n- Parser algorithm \n\n##### Testing \n- Scanner : yylex() from scaner.y \n    - Scan \u0026 detect lexical atoms\n    - Symbol table \n\n\n- parser \n    - generated by yacc \n    - basic grammar\n    - aggregatign constructs \n    - control structs \n\n\n\n- semantic analysis \n    - RPN, 4 tuple and raw assembly outputs \n\n- code gen \n    - RPN (AST) \u0026 4 tuple \n- type checking \u0026 optimization \n\n#### Compiler development tool \n- yacc \n\n### Java compiler \n\n\n### JVM \n+ Container aware Java \n+ Extended language with more language features (e.g., arrays) for use in ambitious courses.•JVM target for building a compiler that generates code for the Java Virtual Machine (JVM).•Optimizer component and assignment for teaching code optimization.•Interpreter component and assignment for teaching program interpretation.•Alternate build process for building the toolset via Ant [4], in addition to Make [3], en-abling students and instructors to install the toolset on non-Unix platforms such as Windows.\n+ Enable execution of Java on GPU \n    + Java Stream API - Lambda - exploit processing power of GPU \n    + \n+ GC \n    + memory allocation \n    + \n+ Core component : \n    + Lexer, Parser, Visitor, AST, Constrainer, Interpreter, Compiler, VM, Debugger, Lexical analysis, Build Abstract syntax, type checking, \n+ Lexx/ Parse generator : JavaCC, JLex, Cup \n+ Build : Make, Ant\n+ Advancd : Optimizer, Interpreter \n+ Some proposal \n    + JVM access check \n    + Value objects \n    + Diagnostic command framework \n    + Low overhead way of sampling Java heap allocation \n    + Concurrent monitor delfation \n    + \n+ JVM Tools Interface   \n    + Adding patch points or method entry and exit \n    + Enum of compiled methods \n    + State changed notifications and compiled method load \n    + Query support \n    + Chunks of compiled methods \n\n+ Concurrent JVM \n    + access object \n    + \n+ Lexical issue : + Symbol table (token)\n+ Scanner \n+ Dataflow analysis \n+ Program optimization \n+ Code generation \n+ Runtime system \n\n\n### Crypto compiler \n\n\n\n#### Other examples of Java compiler written in Java (standard java compiler is written in C/C ++)\n\n#### cPLC — A cryptographic programming language and compiler\nhttps://www.researchgate.net/publication/224259131_cPLC_-_A_cryptographic_programming_language_and_compiler\nhttps://cryptography.io/en/latest/installation/\nchrome-extension://oemmndcbldboiebfnladdacbdfmadadm/https://eprint.iacr.org/2005/160.pdf\nhttps://crypto.iacr.org/2019/affevents/ppml/page.html\n\n\n\n#### Courses (undergraduate/ graduate/ PhD level )\n+ Modern Compiler Implementation in Java.\n+ Compilers: Principles, Techniques, \u0026Tools\n+ Book \n    + Compiling with C# and Java, Pat Terry, 2005, ISBN 032126360X624\n    + Compiler Construction, Niklaus Wirth, 1996, ISBN 0-201-40353-6\n    + Fischer, C. N. and LeBlanc, R. Jr. \"Crafting a Compiler\", Benjamin/Cummings, Inc., 1989.\n\n\n+ Course: \n    \nThe Java Virtual Machine Specification\nEspecially: Compiling for the Java Virtual Machine\nJasmin home page\nEspecially: Jasmin instruction list\nLLVM home page\nInteractive Illustrations For Inside the Java 2 Virtual Machine\nByte Code Engineering Library\nVirtual machine literature\nChapter 15.1 Virtual Machines. In Michael Scott : Programming Language Pragmatics (3rd Ed.). Morgan Kaufmann, USA, 2009.\nChapter 10 Intermediate Representations \u0026 Chapter 11 Code Generation for a Virtual Machine. In Fischer C.N., Cytron R.K. \u0026 LeBlanc R.J.Jr. Crafting A Compiler. Addison-Wesley, 2010.\nIain Craig, Virtual machines. London, Springer-Verlag, 2006.\nBill Blunden, Virtual machine design and implementation in C/C++. Plano, Texas, Wordware Publishing, 2002.\nJoshua Engel, Programming for the JAVA virtual machine. Reading (Massachusetts), Addison-Wesley, 1999.\nTim Lindholm, Frank Yellin, The Java virtual machine specification. Reading (MA) : Addison-Wesley, 1999.\nBill Venners, Inside the Java virtual machine. New York (NY), McGraw-Hill, 1998.\nJon Meyer and Troy Downing, Java virtual machine. O’Reilly, 1997\nGamma et al.: Design Patterns: Elements of Reusable Object-Oriented Software.  Addison-Wesley, Reading, 1995.\n\n+ Resource :\n    + http://www.cse.chalmers.se/edu/year/2018/course/TDA283_Compiler_Construction/project/\n    + chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/http://www.cse.chalmers.se/edu/year/2016/course/TDA283_Compiler_Construction/proj.pdf\n\n\n\n\n+ Progress: \n    + https://www.cs.rochester.edu/~cding/Teaching/compilerProjects.html\n        + done : scanner \n\n\n\n\n\n### Resource \n- http://ftp.math.utah.edu/pub/hoc/\n- http://www.cs.sjsu.edu/~louden/cmptext/\nhttp://dinosaur.compilertools.net/yacc/\n- https://www.cs.purdue.edu/homes/xyzhang/spring09/notes/intro.pdf\n\n- chrome-extension://oemmndcbldboiebfnladdacbdfmadadm/http://web.cs.ucla.edu/~palsberg/course/purdue/cs352/F00/lec4.pdf","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiejulia%2Fcompilers","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhiejulia%2Fcompilers","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhiejulia%2Fcompilers/lists"}