Microsoft Phoenix
{{Use mdy dates|date=May 2019}}
{{Short description|Microsoft Research compiler framework}}
Microsoft Phoenix was an SDK available from Microsoft Connect for creating compilers, optimize code, and perform code analysis. Microsoft described it in the past tense on 2008-07-01.{{cite web | url = https://archive.org/details/phoenixsdkjune2008rc1 | title = Microsoft Phoenix SDK (2008-07-01)}}
Original Description
[It was] to be used as the back-end for future compiler technologies from Microsoft.{{refn|{{cite web | url = http://research.microsoft.com/phoenix/ | title = Phoenix Academic Program | accessdate = November 16, 2007 | archive-url = https://web.archive.org/web/20071213223938/http://research.microsoft.com/phoenix/ | archive-date = December 13, 2007 | url-status = dead }}{{cite book |last1=Safonov |first1=Vladimir O. |title=Trustworthy Compilers |date=2010 |publisher=John Wiley & Sons |location=Hoboken, New Jersey |isbn=9780470593349 |pages=239–276 |chapter-url=https://books.google.com/books?id=zhRpBZYyHcEC&pg=PA239 |accessdate=May 8, 2019 |language=en |chapter=Microsoft Phoenix, Phoenix-Targeted Tools, and Our Phoenix Projects}}{{cite book |last1=Tairas |first1=Robert |last2=Gray |first2=Jeff |chapter=Phoenix-based clone detection using suffix trees |title=Proceedings of the 44th annual Southeast regional conference |date=March 10, 2006 |pages=679–684 |chapter-url=http://gray.cs.ua.edu/pubs/acmse-2006-robert.pdf |accessdate=May 8, 2019 |publisher=Association for Computing Machinery|doi=10.1145/1185448.1185597 |isbn=1-59593-315-8 }}{{cite journal |last1=Safonov |first1=Vladimir |last2=Gratchev |first2=Mikhail |last3=Grigoryev |first3=Dmitry |last4=Maslennikov |first4=Alexander |title=Aspect.NET — aspect-oriented toolkit for Microsoft.NET based on Phoenix and Whidbey |journal=.NET Technologies 2006 |date=May 29 – June 1, 2006 |pages=19–30 |url=http://wscg.zcu.cz/rotor/NET_2006/Papers_2006/!Proceedings_Full_Papers_2006.pdf#page=23 |accessdate=May 8, 2019 |location=University of West Bohemia}}{{cite journal |last1=Ueng |first1=Sain-Zee |last2=Lathara |first2=Melvin |last3=Baghsorkhi |first3=Sara S. |last4=Hwu |first4=Wen-mei W. |title=CUDA-Lite: Reducing GPU Programming Complexity |journal=Languages and Compilers for Parallel Computing |pages=1–15 |url=https://www.researchgate.net/publication/221497030 |accessdate=May 8, 2019 |publisher=Springer |location=University of Illinois at Urbana-Champaign}}{{cite journal |last1=Castro |first1=Miguel |last2=Costa |first2=Manuel |last3=Harris |first3=Tim |title=Securing software by enforcing data-flow integrity |journal=Proceedings of the 7th Symposium on Operating Systems Design and Implementation |date=November 6, 2006 |pages=147–160 |url=http://static.usenix.org/event/osdi06/tech/full_papers/castro/castro.pdf |accessdate=May 8, 2019 |publisher=USENIX Association}}}} It [was] also available as an SDK, a pre-release build of which has been made accessible, to create compilers and code analysis tools using the Phoenix framework.
Overview
Microsoft Phoenix defines an intermediate representation (IR) for programs, using ASTs, control-flow graphs, and an exception handling model. For any program to be handled by Phoenix, it needs to be converted to this representation. The specification for these file type-specific converters, called file readers in Phoenix terminology, is also specified. Phoenix comes included with readers for Portable Executable binary files, CIL and the output of the Visual C++ front-end.{{cite web | url = https://connect.microsoft.com/content/content.aspx?ContentID=4527&SiteID=214 | title = Phoenix Compiler Backend | accessdate = November 16, 2007 | archive-url = https://web.archive.org/web/20101226130457/https://connect.microsoft.com/content/content.aspx?ContentID=4527&SiteID=214 | archive-date = December 26, 2010 | url-status = dead }} Readers for other languages can be written using the Phoenix SDK, though separate tools such as lex and yacc need to be used to write the lexer and parser, respectively.
Once the program has been converted to the IR, the analysis and optimization tools can operate on that form. Phoenix includes a selection of tools – including block counting, memory analysis, code coverage, code analysis and optimization.{{cite web | url = https://connect.microsoft.com/content/content.aspx?ContentID=4526&SiteID=214 | title = Phoenix based tools | accessdate = November 16, 2007 | archive-url = https://web.archive.org/web/20101226130845/https://connect.microsoft.com/content/content.aspx?ContentID=4526&SiteID=214 | archive-date = December 26, 2010 | url-status = dead }} The Phoenix SDK can be used to write and plug-in other tools as well. Code generation is handled by providing architecture-specific (either physical architecture of the processor or a virtual machine architecture) file writers. Phoenix provides the c2.dll
compiler backend, which it shares with Visual C++, to handle analysis, optimization and code generation for the x86 architecture. Writers for other architectures must be provided separately.
As a result of the modular architecture, any component can be replaced without affecting the rest of the system. For example, to target the compiler to a different architecture, only the file writer specific to the architecture needs to be changed, keeping the rest of the stack unchanged. To create a compiler for a new language, only the readers need to be provided.
Productization
A Phoenix component (phx.dll) is used for some of the static analysis (FxCop) in Visual Studio 2010.{{cite web | url = http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/10/19/vs-2010-beta-2-code-analysis-in-depth-first-look.aspx | title = VS 2010 Beta 2 Code Analysis In-Depth First Look | accessdate = March 30, 2010 | archive-url = https://web.archive.org/web/20100106131545/http://www.wintellect.com/CS/blogs/jrobbins/archive/2009/10/19/vs-2010-beta-2-code-analysis-in-depth-first-look.aspx | archive-date = January 6, 2010 | url-status = dead }} (The Phoenix compiler itself, which is required for most instrumentation insertion to work, is not included with Visual Studio.)
See also
References
{{Reflist}}
External links
- [https://web.archive.org/web/20071119175240/http://connect.microsoft.com/Phoenix Official Phoenix site]
- [https://web.archive.org/web/20091223055032/http://connect.microsoft.com/Phoenix/Downloads/DownloadDetails.aspx?DownloadID=12911 Phoenix SDK June 2008 CTP Release](latest release to the moment of writing)
{{Microsoft Research}}