(I first learned about CIL in https://people.eecs.berkeley.edu/~necula/Papers/cil_cc02.pdf)
I guess ECMA should have done better research.
2012 is just the latest version. It was first published in 2001, and started in 2000. They're so close together that it's difficult to say if one would have been able to find the other.
https://en.wikipedia.org/wiki/Common_Language_Infrastructure
And even the fact that this is a fork of an earlier project and the name comes from that doesn't stop it!
(I'm aware I have chosen a very weird thing to be getting annoyed at over my breakfast crumpets this morning)
[0] https://github.com/rui314/chibicc [1] https://github.com/fuhsnn/slimcc-defer/commits
https://nedbatchelder.com/code/cog/
Never used it.
First of all, llvm has clang, which means that llvm as a whole is equipped to understand C (and C++ and Objective-C) both at a high level (abstract syntax tree, all types as declared by the programmer) and low level (SSA form, only the types that are meaningful for sound analysis and optimization).
I think that CIL was a really big deal before llvm and clang. Back then, it was a more approachable alternative to trying to fiddle with C than using GCC, since GCC has a steep learning curve. But in the last 15 years or so, most of the research that would have been done in CIL before is now done in llvm. That’s because llvm is much more complete and it’s designed for ergonomics, specifically in the case where you just want to mess around and even if you’re a newcomer to the compiler. The docs are great and the APIs are top notch.
I think that LLVM’s SSA form is especially good for doing sophisticated analysis and instrumentation of C. I’ve used that a lot for my C experiments. Clang’s AST is really great, too - and it’s amazing for doing higher level stuff where you want to see the original C types and declarations before lowering.
I suspect that there is very little that CIL can do for you that can’t be done in llvm more straightforwardly. And llvm+clang support all of C, plus the adjacent languages (C++ and others).
So, it’s cool that CIL is still around (having alternatives is good, generally) but in my opinion as someone who does experimental work in C compilers, C language extensions, and static/dynamic analysis of C, llvm completely subsumes CIL.
This is a frontend: it takes C and generates its own IR (a simplified version of C).
You could glue these together with an adapter from CIL to LLVM IR to get a complete C compiler.
Clang is both a frontend and a complete compiler in this respect: the Clang frontend compiles C to LLVM IR, and these are bundled together to produce the Clang compiler.
(Note: I'm simplifying things here. Clang and LLVM are more intertwined than these, and there are several nuances I'm not covering; I'm going for a high-level perspective here)
Which "AI"? There are a million and one different subcategories of AI or specific techniques and tools which fall under the AI umbrella. Which AI tools or techniques are suitable replacement tools for CIL and how?
“ CIL is a front-end for the C programming language that facilitates program analysis and transformation. CIL will parse and typecheck a program, and compile it into a simplified subset of C. “
To answer your question, I don’t know. I’m no expert in AI by any means. I just think that if there, as you put “a million and one different subcategories of AI or specific techniques and tools which fall under the AI umbrella”, it should be no surprise if something like this could be done with less effort with something that either already exists today or by designing an LLM to achieve the same goals.
And it would be far more enticing because users wouldn’t have to learn yet another language.