Question
The original implementation of C++ was developed by Bjarne Stroustrup in the form of a compiler called cfront that ran on a Unix-based computer at
The original implementation of C++ was developed by Bjarne Stroustrup in the form of a compiler called cfront that ran on a Unix-based computer at Bell Lab, and translated C++ code into C. This is the same place where the original Unix C compiler, cc,c had been developed some years earlier.
(1) It might have been easier to write the code for manipulating abstract syntax trees if cfront had been written in C++. Why do you suppose Stroustrup chose to write it in C instead?
(2) At some later point, a new C++ compiler, called ncpp and itself written in C++, was developed to target the Unix-based machine directly. Draw three T-diagrams to describe the cc executable and the cfront and ncpp sources.
(3) Using T-diagrams appropriately, explain how the items mentioned previously could be used together, over multiple steps, to produce executable versions of both cfront and ncpp.
(4) Suppose that a bug was discovered in cfront several years after the introduction of ncpp. What implications, if any, might this have for any C++ programmers using the newer tool, nccp? Be sure to explain your conclusions!
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started