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.
There are a finite number of names, and an even smaller number of good names. But apparently an infinite number of hacker news posters who comment on every new project to complain that the name has been used before for something else.
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)
I would normally agree with you on this, but these projects are in the same realm (language compiler infrastructure), so it's a bit more unfortunate than in the usual case
This reminds me, is there any C compilers that allows injecting custom parsing rules? Say, if it is parsing or type checking and hits upon an error, it calls a callback instead of bailing. This would be very useful for adding simple extensions to the language. I tried to make LLVM do this but couldn't figure it out.
I considered developing such a language, but could not justify it. The intermediate code I developed works just fine for this, and would be trivial to convert to/from a text based form, but I couldn't see the point.
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.
LLVM is a backend: it takes LLVM IR (intermediate representation) and generates machine code.
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)
One thing that CIL allows is creating amalgamations - converting the whole program into a single C file that can be then compiled by GCC or other compilers.
I just want a way to add simple inheritable classes to C without bringing in the entirety of C++ and all its differences and baggage. But I guess things like constructors/destructors are not possible to implement in a language standard-compliant way (not relying on compiler extensions).
What would you use AI for and in what way that is equivalent to what this tool is designed to do?
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.