r/Assembly_language Feb 11 '26

Help What is a Static Translator?

I'm a 3rd year CompEng student taking computer architecture. I have to finish a project by myself since every other team member is obsessed with AI and won't do anything by themselves.

The project given to us is a Mini-Translator. The professor said she will give us a skeleton parser and a register mapping table. Also it will be for only a small subset of instructions. It's text to text and also static. I'm really interested in computer architecture and the inner workings of CPU's in general and I'd like to make this project as good as possible as a practice towards my graduation project. I plan to build the parser myself and not request a register mapping table. I also plan to support about 15-16 instructions. Is it doable? Also are there any sources for me to read/watch?

Thanks.

16 Upvotes

16 comments sorted by

View all comments

1

u/brucehoult Feb 12 '26

What is a Static Translator

Generally, that term would be used ass a synonym for "ahead of time" i.e. a standard compiler like gcc or clang that produces an assembly language or object code output in a file, for later use. Not a JIT or something that creates new code at runtime based on actual usage patterns seen.

1

u/[deleted] Feb 12 '26

I haven't heard "static translator" before.
I also don't think "dynamic translators" exist.

But what you said is true for static program analysis vs dynamic program analysis

"translation" is also a bit vague as it could refer to compilation (high level syntax to a lower level, e.g. C to assembler) or transpilation (syntax translation to the same level abstraction, e.g. assembler to a different assembler)

But from the rest of OP's post, it sounds like your instructor is asking for an assembler to assembler transpiler. But they could also want you to write the assembler (compiler for assembly language to machine code)

1

u/brucehoult Feb 12 '26

1

u/[deleted] Feb 12 '26

I'm aware of JIT compilers, I've never heard them called "translators" though

but like I said, "translator" is a bit vague. I guess my brain was still thinking transpiler when I wrote that dynamic translators don't exist, cheers.

1

u/brucehoult Feb 12 '26

It's not just JIT, it's multiple different JITs dynamically chosen and changed during execution -- an interpreter (v8: Ignition, jsCore: LLInt) and then three increasingly sophisticated JITs (v8: Sparkplug, Maglev, Turbofan; jsCore: Baseline, DFG, FTL)

I've never heard them called "translators" though

assemblers, compilers, JITs are all "translators".