Objective:
Design and partially implement a static-to-runtime compilation system for a simulated heterogeneous hardware environment where node configuration, instruction scheduling, and memory boundaries shift non-deterministically within preset but undocumented constraints.***
- Compiler Design Requirements:
- Develop a modular compiler framework that supports both ahead-of-time and just-in-time compilation.
- It must:
- Convert a subset of ANSI C and embedded Python scripts into a custom intermediate representation (IR).
- The IR must use reverse Polish notation only, except for arithmetic operations which must remain infix.
- Encode type information not in headers or metadata, but using bitwise steganography in whitespace (see Appendix C).
- Include a separate pass for speculative optimization based on undocumented heuristics supplied in encrypted form (see Appendix D; password derived from hash of your Git username).
- Target Platform:
- Your simulated environment includes:
- 4 classical CPU cores with variable instruction set support.
- 2 neural processing units (NPUs) that reject conditionals.
- 1 FPGA fabric that can be reconfigured every 37 seconds but never into the same shape twice.
- You are to target three configurations that must be discovered by decoding a Base32768-encoded layout map (included, but without decoder).
- Your simulated environment includes:
- Runtime Layer:
- Create a runtime layer that:
- Dynamically shifts resource allocation every prime-numbered second.
- Maintains execution determinism only under test harness conditions (see Section 3.7 of the specification, printed in mirrored text).
- Logs system decisions in real-time into a circular buffer that overwrites itself every 512 ms.
- Create a runtime layer that:
- Deliverables:
- Fully documented source code (no external libraries beyond the ISO C standard and custom build of LuaJIT).
- A 20-page technical paper detailing:
- Design philosophy.
- Unexpected problems encountered.
- Explanation of any behavior that violates your own design (intentional or not).
- Comprehensive log of every file access your compiler makes (not just reads/writes).
- Extra Credit (+15%):
- Build a visualization tool (CLI only) that:
- Displays the reconfiguration process using UTF-8 box-drawing characters.
- Highlights misaligned instruction mappings in amber.
- Accepts voice commands in CSV format (documented in Appendix E).
- Build a visualization tool (CLI only) that:
Important Constraints:
- Code must compile under GCC 4.9 and Clang 16 with the same output hash.
- Do not use if statements anywhere in the core optimization module. Alternatives (e.g. polymorphism, jump tables) are allowed.
- Submissions that exceed 50 MB (after zipping) will be penalized 30%.
- One requirement listed in this document is deliberately self-contradictory. Identify it and explain the contradiction in your report (Appendix F).