The Semantic Analysis Using Tree Transformation on the Objective-C Compiler

  • YunSik Son
  • YangSun Lee
Part of the Communications in Computer and Information Science book series (CCIS, volume 262)


Semantic Analysis is a process which analyzes the validity of a meaning created by combining a program’s different constituents, and this process has become indispensable component for producing a compiler. It uses the attribute grammar method or the manual method however such methodology holds limitations in terms of efficiency or automation. In this study, in order to make up for the drawbacks mentioned above, a semantic tree which includes the analyzed information will be defined and a technique to convert the abstract syntax tree used in most compilers – a result of syntax analysis – into a semantic tree will be proposed. The semantic tree transformation technique processes semantic analysis on a semantic node unit level and the semantic analysis process is carried out consistently and efficiently. In addition, the semantic tree transformation makes transformation of data structures and automation very simple.


Semantic Tree Tree Transformation Semantic Analysis Compiler Construction Objective-C Compiler Abstract Syntax Tree 


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. 1.
    Grune, D., Bal, H.E., Jacobs, C.J.H., Langendoen, K.G.: Modern Compiler Design. John Wiley & Sons (2000)Google Scholar
  2. 2.
    Aho, A.V., Lam, M.S., Sethi, R., Ullman, J.D.: Compilers: Principles, Techniques, & Tools. Addision-Wesley (2007)Google Scholar
  3. 3.
    Oh, S.M.: Introduction to Compilers, 3rd edn. Jungik Publishing, Seoul (2006)Google Scholar
  4. 4.
    Brosgol, B.M.: TCOLAda and the Middle End of the PQCC Ada Compiler. In: Proceedings of the ACM-SIGPLAN Symp. on The ADA Programming Lanugage, pp. 101–112 (1980)Google Scholar
  5. 5.
    Mithell, J.C.: Coercion and Type Interface. In: 11th ACM Symp. on Principles of Programming Languages, pp. 175–185 (1984)Google Scholar
  6. 6.
  7. 7.
    Aho, A.V., Johnson, S.C.: LR Parsing. ACM Computing Surveys 6(2), 99–124 (1974)CrossRefMATHGoogle Scholar
  8. 8.
    Barth, J.M.: A practical interprocedural data flow analysis algorithm. Communications of the ACM 21(9), 724–736 (1978)CrossRefGoogle Scholar
  9. 9.
    Kernighan, B.W., Ritchie, D.M.: The C Programming Language, 2nd edn. Prentice Hall (1988)Google Scholar
  10. 10.
    Knuth, D.E.: The Genesis of Attribute Grammars. In: ACM Proceedings of the International Conference on Attribute Grammars and Their Applications, pp. 1–12 (1990)Google Scholar
  11. 11.
    Knuth, D.E.: Semantic of context-free languages. Mathematical Systems Theory 2(2), 127–145 (1968)MathSciNetCrossRefMATHGoogle Scholar
  12. 12.
    Koskimies, K.: A specification language for one-pass semantic analysis. In: Proceedings of the 1984 SIGPLAN Symposium on Compiler Construction, pp. 179–189 (1984)Google Scholar
  13. 13.
    Lee, Y.-S., Kim, Y., Kwon, H.: Design and Implementation of the Decompiler for Virtual Machine Code of the C++ Compiler in the Ubiquitous Game Platform. In: Szczuka, M.S., Howard, D., Ślęzak, D., Kim, H.-K., Kim, T.-H., Ko, I.-S., Lee, G., Sloot, P.M.A. (eds.) ICHIT 2006. LNCS (LNAI), vol. 4413, pp. 511–521. Springer, Heidelberg (2007)CrossRefGoogle Scholar
  14. 14.
    Lee, Y.S., Oh, S.M., Bae, S.M., Son, M.S., Son, Y.S., Shin, Y.H.: Development of C++ Compiler for Embedded Systems. Industry-Academia Cooperation Foundation of Seokyeong University (2006)Google Scholar
  15. 15.
    Muchnick, S.S.: Advanced Compiler Design Implementation. Morgan Kaufmann Press (1997)Google Scholar
  16. 16.
    Oh, S.M., Kim, J.S.: Extension of SG Compiler. Project Report, Research Center for Information Communication, Dongguk University (2001)Google Scholar
  17. 17.
    Paakki, J.: Attribute Grammar Paradigms – A High-Level Methodology in Language Implementation. ACM Computing Surveys 27(2), 196–255 (1995)CrossRefGoogle Scholar
  18. 18.
    Sherman, M.S., Borkan, M.S.: A flexible semantic analyzer for Ada. In: ACM SIGPLAN Notices, Proceeding of the ACM-SIGPLAN Symposium on Ada Programming Language, vol. 15(2), pp. 62–71 (1980)Google Scholar
  19. 19.
    Son, Y.S.: 2-Level Code Generation using Semantic Tree, Master Thesis, Dongguk University (2006)Google Scholar
  20. 20.
    Son, Y.S., Oh, S.M.: Construction of Enhanced Parser for Mobile Contents. In: MITA 2008, pp. 41–44 (2008)Google Scholar
  21. 21.
    Kim, Y.G., Kwon, H.J., Lee, Y.S.: Design and Implementation of a Decompiler for Verification and Analysis of Intermediate Code in ANSI C Compiler. Journal of Korea Multimedia Society 10(3), 411–419 (2007)Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2011

Authors and Affiliations

  • YunSik Son
    • 1
  • YangSun Lee
    • 2
  1. 1.Dept. of Computer EngineeringDongguk UniversitySeoulKorea
  2. 2.Dept. of Computer EngineeringSeokyeong UniversitySeoulKorea

Personalised recommendations