The Use of Natural Language Processing Approach for Converting Pseudo Code to C# Code

Abstract Although current computer-aided software engineering tools support developers in composing a program, there is no doubt that more flexible supportive tools are needed to address the increases in the complexity of programs. This need can be met by automating the intellectual activities that are carried out by humans when composing a program. This paper aims to automate the composition of a programming language code from pseudocode, which is viewed here as a translation process for a natural language text, as pseudocode is a formatted text in natural English language. Based on this view, a new automatic code generator is developed that can convert pseudocode to C# programming language code. This new automatic code generator (ACG), which is called CodeComposer, uses natural language processing (NLP) techniques such as verb classification, thematic roles, and semantic role labeling (SRL) to analyze the pseudocode. The resulting analysis of linguistic information from these techniques is used by a semantic rule-based mapping machine to perform the composition process. CodeComposer can be viewed as an intelligent computer-aided software engineering (I_CASE) tool. An evaluation of the accuracy of CodeComposer using a binomial technique shows that it has a precision of 88%, a recall of 91%, and an F-measure of 89%.

[1]  Muthu Ramachandran,et al.  Automated improvement for component reuse , 2004, Softw. Process. Improv. Pract..

[2]  Charles J. Fillmore,et al.  Types of Lexical Information , 1969 .

[3]  Ralph Grishman,et al.  The NomBank Project: An Interim Report , 2004, FCP@NAACL-HLT.

[4]  Ralph Johnson,et al.  design patterns elements of reusable object oriented software , 2019 .

[5]  Kamel Barkaoui,et al.  A Tile Logic Based Approach for Software Architecture Description Analysis , 2010, J. Softw. Eng. Appl..

[6]  Linda Sara Mathew,et al.  PSEUDOCODE TO SOURCE PROGRAMMING LANGUAGE TRANSLATOR , 2016 .

[7]  R. Darnell Translation , 1873, The Indian medical gazette.

[8]  Roger S. Pressman,et al.  Software Engineering: A Practitioner's Approach , 1982 .

[9]  Swapnali Kurhade,et al.  Semi natural language algorithm to programming language interpreter , 2016, 2016 International Conference on Advances in Human Machine Interaction (HMI).

[10]  Sophia Ananiadou,et al.  Knowledge-based processing in machine translation , 1993 .

[11]  Bonnie J. Dorr,et al.  Large-Scale Dictionary Construction for Foreign Language Tutoring and Interlingual Machine Translation , 1998, Machine Translation.

[12]  Martha Palmer,et al.  From TreeBank to PropBank , 2002, LREC.

[13]  J. Ramanujam,et al.  Automatic C-to-CUDA Code Generation for Affine Programs , 2010, CC.

[14]  David C Brown Artificial intelligence for design process improvement , 2005 .

[15]  Bruce McMillin,et al.  Software engineering: What is it? , 2018, 2018 IEEE Aerospace Conference.

[16]  Richard Fox,et al.  Automated Code Generation Using Case-Based Reasoning, Routine Design and Template-Based Programming , 2012, MAICS.

[17]  Aysh Alhroob,et al.  The Definition of Intelligent Computer Aided Software Engineering (I-CASE) Tools , 2015 .

[18]  Greg Carlson,et al.  A unified analysis of the English bare plural , 1977 .

[19]  Teruko Mitamura,et al.  Acquisition of large lexicons for practical knowledge-based MT , 2004, Machine Translation.

[20]  Martha Palmer,et al.  Verbnet: a broad-coverage, comprehensive verb lexicon , 2005 .

[21]  David L. Olson,et al.  Advanced Data Mining Techniques , 2008 .

[22]  Aniello Cimitile,et al.  A logic based approach to reverse engineering tools production , 1991, Proceedings. Conference on Software Maintenance 1991.

[23]  James H. Martin,et al.  Speech and language processing: an introduction to natural language processing, computational linguistics, and speech recognition, 2nd Edition , 2000, Prentice Hall series in artificial intelligence.

[24]  Emanuel Kitzelmann,et al.  Inductive Programming: A Survey of Program Synthesis Techniques , 2009, AAIP.

[25]  Osamu Furuse,et al.  An example-based method for transfer-driven machine translation , 1992, TMI.

[26]  Hany H. Ammar,et al.  Software Engineering Using Artificial Intelligence Techniques: Current State and Open Problems , 2012 .

[27]  Justin Emile Gottschlich,et al.  AI programmer: autonomously creating software programs using genetic algorithms , 2017, GECCO Companion.

[28]  Zili Zhang,et al.  A Fuzzy Logic Based Approach for Software Testing , 2007, Int. J. Pattern Recognit. Artif. Intell..

[29]  Dan Roth,et al.  The Importance of Syntactic Parsing and Inference in Semantic Role Labeling , 2008, CL.

[30]  Alfred V. Aho,et al.  Compilers: Principles, Techniques, and Tools , 1986, Addison-Wesley series in computer science / World student series edition.

[31]  Nicholas Asher,et al.  Selectional restrictions, types and categories , 2014, J. Appl. Log..

[32]  Satoshi Sato,et al.  CTM: An Example-Based Translation Aid System , 1992, COLING.

[33]  P. Gács,et al.  Algorithms , 1992 .

[34]  Oksana Nikiforova,et al.  Problems and Perspectives of Code Generation from UML Class Diagram , 2011, Sci. J. Riga Tech. Univ. Ser. Comput. Sci..

[35]  Shadi Aljawarneh,et al.  An expert code generator using rule-based and frames knowledge representation techniques , 2014, 2014 5th International Conference on Information and Communication Systems (ICICS).

[36]  Juan Manuel Cueva Lovelle,et al.  A brief introduction to model-driven engineering , 2014 .

[37]  John B. Lowe,et al.  The Berkeley FrameNet Project , 1998, ACL.

[38]  Rahul Dubey,et al.  Algorithm to Code Converter , 2018, 2018 2nd International Conference on Trends in Electronics and Informatics (ICOEI).

[39]  Vishal Parekh,et al.  Pseudocode to Source Code Translation , 2016 .

[40]  Daniel B. Jones,et al.  Analogical natural language processing , 1996 .

[41]  Suvam Mukherjee,et al.  AUTOMATIC ALGORITHM SPECIFICATION TO SOURCE CODE TRANSLATION , 2011 .