3 ms·
Excellent, I think the author would do well to re-frame the question as you have. If nothing else to put it more clearly into the space of provable compilation.
by ChuckMcM 9y ago
Excellent, I think the author would do well to re-frame the question as you have. If nothing else to put it more clearly into the space of provable compilation.
When I transferred into the "Oak" group that later became the "Java" organization, the team I was on was looking at whether or not you could write an OS in Java sort of in spite of its safety rules. This sort of concept has been revisited by Rust with its safe/unsafe modal operation.
What both of those efforts have in common is that determining safety may be impossible at the construct level but provable if you were to exhaustively search all possible outcomes.
What the paper and your comment add to the discussion is the intriguing idea that you could create a 'safe' backend (say the equivalent of the JVM) as a target for a C compiler. And code that could not be compiled would be flagged for later analysis. Much like VHDL can express hardware that cannot by synthesized you might end up with a C compiler that could compile code that could not be executed. I could be fun to spend a bit of time poking around that rabbit hole.
- marktangotango 9y agoThe idea you can have a safe c compiler or runtime seems totally absurd to me. Why is any of this even considered seriously?
- Koshkin 9y agoIndeed. Even the "obvious" example of the compiler inserting bound checks in the generated code does not work with the well-known method of marking the beginning of a variable-length memory block at the end of a struct using an array of some fixed size, say, 1 (or even 0).
- deleted 9y ago[deleted]
- ktRolster 9y agoFor that situation, you would need to mark the end of the variable-length memory block at run-time.
- mike_hearn 9y agoIt's a very intriguing idea and you may be pleased to know that such research lines are still being explored: http://ssw.jku.at/General/Staff/ManuelRigger/ManLang17.pdf http://ssw.jku.at/General/Staff/ManuelRigger/ManLang17.pdf