Automated C++ Program Generator using English Language Interface

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "Automated C++ Program Generator using English Language Interface"

Transcription

1 Automated C++ Program Generator using English Language Interface Ambuj Kumar and Prof. (Mrs.) Saroj Kaushik Department of Computer Science & Engineering Indian Institute of Technology, Delhi Hauz Khas, New Delhi India Abstract Automatic Programming is an ability of a computer to develop a program all by itself, once the problem has been stated in some specified domain using some suitable format [2]. We have developed automated C++ program generator which takes an input in English and generate C++ program. Once a problem has been specified in English, the system is able to interpret it and generate a C++ program using its knowledge base, inference engine as well as some intelligence. The domain of programs to be generated is data structures such as sorting, searching, linked lists, file handling, manipulating strings, numbers etc. The system has been implemented using Java in Linux environment. Keywords: Automatic Programming, analyzer, classifier, program generator, database of algorithms, processing of English text. 1. Introduction Automatic Programming has been a goal of computer science and artificial intelligence since the first programmer came face to face with the difficulties of programming [1]. The first automated programs were assemblers and compilers, developed in 1950's. Today, they are not considered as automated programs. However, these were invented at a time when most of the programming was done in machine language. Assemblers represented a spectacular level of automation compared with programming in machine code. Automatic Programming may be considered as an ability of a computer to generate programs automatically where the problem is specified in some suitable format [2]. Of course, there is no doubt that automated Programming will be domain specific. MIT (USA) is working on a similar concept. They have named their software as METAPHOR. It understands description of objects and generate templates of classes and functions accordingly [3]. For example, if we provide a description as An animal has 4 legs and 1 tail. A cow is an animal, then, METAPHOR software is able to generate a code as follows :- class animal { private : int legs, tail; public: }; animal() { legs = 4; tail = 1; } class cow : public animal{ }; cow(); The proposed system is currently able to interpret problems stated in English related to strings, numbers, linked lists and file handling 1

2 and generate full C++ program which could be run straight way. So, our system is different from METAPHOR. Instead of generating class definitions, it focuses directly on complete program generation. It has inference engine and makes use of knowledge base of templates of various programs. It is possible to extend the knowledge base and inference engine capability of this tool to make it even more powerful. Currently supported operations are listed in Appendix. 2. Architecture of System Overall architecture of the system is shown in fig.1. It mainly consists of input module, database of program skeletons, dictionary and program generator module. 2.1 Input Module It consists of Analyzer and classifier. The analyzer takes the problem statement given by the user in English. Basically, it creates a list of all meaningful words present in the problem statement and ignores irrelevant or noise words. The dictionary of meaningful words is maintained. It also performs spell check and reports suspected mistakes, if any. The user can then suggest suitable replacements. The classifier reads all the words present in the word list and interprets the meaning of user input. It identifies the type of problem and reports an error, if unable to interpret input statement of the problem Database of Algorithms The database of algorithms is maintained for string handling, number manipulation, arrays, linked lists (stack, queues, dequeues), sorting and file handling. The prototype of algorithms is stored and used to generate C++ program which may contain combination of more than one algorithm Program generator This is the most important part of the system. It generates the program on the basis of the problem's type decided by the classifier. The program generator goes through the word list generated by the analyzer, and hence decides which algorithms to use Processing of English text The word Natural Language Processing implies that we should be able to interpret the meaning of a statement even if it is specified in several different ways. This can be illustrated by the following example with reference to our system. Suppose we want to do the following sequence of operations. We create a singly linked list. Insert some nodes in it. Delete some nodes from it. Sort the list. Reverse the list. Finally, display the original list. This sequence of steps can be specified as a problem statement in several ways as illustrated below. Create a linked list, insert 5 elements into it, delete 4 elements, sort it, reverse it and then display the original list. Here, system can not infer the type of linked list one wants to create. So, it will prompt user to choose amongst different types of linked lists available, such as singly linked, doubly linked, circular singly linked lists etc. Further, the type of data is not specified in the statement. So, the user will be prompted to specify the type of elements in the list. Sorting of list will be done on the basis of some field which is not clear from the statement. The user will be asked to specify that too. Here original list may refer to the one created as linked list or the sorted one. User will identify which one he is interested and correspondingly that list will be preserved for displaying purpose. If input texts are as follows: Write a program which creates a singly linked list of integer values, put 5 elements into it, remove 4 elements from it, sort the list using insertion sort method, then invert the list and finally displays the sorted list. Here system will not ask above mentioned questions and will simply generate desired code. In this way, there can be several different ways of specifying the same problem statement, but all will have the same interpretations as illustrated above. The analyzer creates a list of meaningful words and irrelevant words are ignored. Let us consider an example, please generate for me a code for sorting an array of strings. The analyzer creates a word list sort, array and 2

3 strings. Other words are totally irrelevant and hence are ignored. On the basis of the word strings, the system decides that this is a problem of string handling. From the word array, the system judges that there will be multiple inputs, and hence asks for an array size. The word sort forces the system to ask for sorting algorithm to be used. Once all these information have been received, the system fits various algorithm programs using appropriate templates. For detailed working of the software refer to Appendix1. 3. Implementations The Dictionary has been implemented as a hashed file which contains all the relevant and meaningful words along with synonym words such as string and text are synonyms in the context of programming. When the system is started, then an adjacency list is created after scanning the entire dictionary file system. The adjacency list corresponding to a word contains all its synonyms. This adjacency list is used to comprehend the words each time a new question is given to the system. The repository of algorithms is nothing but a list of files, each file containing the skeleton of C++ code for the algorithm. The template data type of C++ has been used in many of these codes. The operations supported by the system are given below. The combinations of operations are also permitted. The details of directory structure of the system are shown in appendix1. Appendix 2 contains explanation and use of the system. Various programs generated using this system are included in appendix3. Operations on strings: concatenation, string comparison, substring checks, sorting (ascending /descending order) using different algorithms, conversion to upper/lower case, string reversal palindrome check, alphabetically first/last string from a set of strings (For examples, user may ask system to generate program for sort the string and reverse it and then concatenate with another string ) Operations on numbers: check for prime numbers, palindrome numbers, Fibonacci numbers, even/odd numbers, reversing digits of a number, sorting (ascending/descending order) using different algorithms, statistical operations such as maximum, minimum, average, standard deviation and variance (For example, write program for checking a given number whether it is palindrome and prime both ) Operations on linked lists: singly linked list, singly circular linked list, doubly linked list, doubly circular linked list, stack, queue, deques (using array or linked list concept), generalized linked list. Here the node structure of list is generalized one. Operations on files: A very generalized code is created to add/delete/search records in a file. (The structure of records is generalized.) 3.1. Proposed algorithm for generating C++ program The algorithm used in the proposed system is given below: Step 1: Read the query (problem statement in English) from the user. Step 2: Break up the problem statement into a list of words. Step 3: For each word in list do { if word key_list, retain it else if word ignore_list, remove it else suggest suitable correction using well known LCS algorithm /*this is a case of misspelled word*/ and goto Step3 & continue from this word. } Step 4: Analyze the filtered list of words obtained from above step. If the list is sufficient to comprehend the problem, goto Step 5 else give an error message and exit. Step 5: Depending on the sequence in which the words occur in the list generated after Step 3, generate the program and fit the function templates using the directory./ knowledge / algorithms in proper places Platform and Environment used The system is implemented on Linux environment using JAVA as we mainly require string processing. JAVA has a vast number of functions for the same (provided by the classes String and StringBuffer), which enable us to write very short codes for practically any type of string handling operations. Further, we need to handle the adjacency list of words. This is also done using the Vector class provided by java.util package. 3

4 Figure 1: Architecture of the system 4. Conclusion This system is currently able to generate simple programs similar to the level of programming taught in first year of undergraduate. But, this is not the end of it. It is not merely an academic exercise in futility. This software has a lot of growth potential. Of course, this software is domain specific. But, it can be extended to generate algorithms (functions or templates) on the basis of a process description given to it. In other words, it is possible to extend its inference engine so that it can comprehend English sentences, and come up with a logical analysis of the process being described. References [1] Charles Rich, Richard C. Waters. Approaches to Automatic Programming, Mitsubishi Electric Research Laboratory Technical Report, July [2] Charles Rich and Richard C. Waters Automatic programming: Myths and prospects IEEE Computer, 21(8):40-51, August [3] Daniel C. Halbert, Watch What I Do: Programming by Demonstration, chapter SmallStar: Programming by Demonstration in the Desktop Metaphor, pp , MIT Press, Cambridge, MA,

5 Appendix 1 Detailed working of the software Here is the directory structure of the system is shown in the figure below. The directories are explained as follows: src directory containing the JAVA source codes. classes.class files generated after compilation. doc documentation directory. shell contains the shell scripts being used internally to control the working of the software. These shell scripts are embedded within the software to handle simple issues such as executing the auto-generated C++ programs. knowledge contains 3 files namely word_list, key and ignore called knowledge base files. The file key contains the list of keywords i.e. those words which are critical for the purpose of understanding the meaning of a sentence. The file ignore contains a list of commonly occurring words which have no significance in the context of understanding of the programming problem statement e.g. words like is, are, the etc. The file word_list contains {key ignore (synonyms of words present in key)}. It contains two more directories dictionary - the storehouse of all words which are understood by this system along with links to corresponding synonyms of word if they exist. algorithms - contains generalized C++ templates for some standard functions. Figure 2: File structure of the software Startup phase The following sequence of steps is executed only once, i.e. when we start our system for the first time. This phase is particularly concerned with creation of adjacency list of words. The startup algorithm is described below which is followed Appendix 2 by main algorithm described in sub section 3.2. for all words in word_list do { - open file with the same name as the word (file is present in./dictionary) - add all words in file (except the word itself) to the adjacency list of the word } We feel that the reader still may not be able to fully understand what sort of natural language 5

6 processing is going on in the system discussed above. It may just appear like a keyword-based code fitting system. Obviously, a knowledge base of standard algorithms has to be present in some form or the other in such type of systems. The intelligence and natural language processing primarily deal with proper utilization of this knowledge base along with following some common-sense rules. So, we present a simple example to look at these issues. If the user s statement is Read N integers, sort them, then determine if the original list of integers are palindrome. Also, check if they are prime. Prima facie, it seems that the program construction will follow the following sequence of steps but, this is not exactly what happens. i. It will declare necessary variables to input N integers i.e. it will just declare an array. ii. Then, it will fit the code to take input from the user. iii. Finally, it will just fit the codes to sort the array, palindrome and prime numbers checks. The performance is obviously restricted by the size of knowledge base and available inference rules. However, it is possible to scale this system to any desired extent. As far as the contribution to software development is concerned, we all know that there are certain algorithms/code fragments which are needed again and again, but in various forms. For example, different types of linked lists are frequently used. But a major bottleneck is different structure of the node for different applications. This significantly increases the work involved. Using our system, a lot of time can be saved as far as generating a basic implementation of linked list is concerned. Any datatype can be incorporated in it. All the basic functions will also be generated. So, the programmer can customize the code to suit his needs within a few minutes. Simple features like the one described above will certainly help save at least a few hours of coding time. The steps (i) and (ii) described above are true, but step (iii) has some finer aspects to it. We have not specified whether it is an ascending order sort or descending order sort. By default, the system assumes it to be ascending order. Have a look at 2 keywords then and original sequence. These words may appear irrelevant to code generation, but the real picture is not so. The keyword then determines that the check for palindrome has to be done strictly after sorting. There is another catch to it. It says that check for palindrome has to be done only on the original sequence of input and NOT on the sorted sequence. Further, the ambiguity lies in which sequence to check for primality. So, we let the system ask the user whether he wants to do primality testing on original list or sorted list. This is done as soon as the problem is analyzed by the system. Here lies the intelligence. If the system is unable to decide what to do, it either asks the user or takes a default action (as in case of sorting). Practical feasibility of the system 6

7 Appendix 3 We will present snapshots of various examples. Example 1: Do the Sorting on an array of numbers, checking if they are prime and then finding their mean. The program generated as follows: Figure 3: The query window for Example 1 Figure 4: The response to the query 7

8 Example 2: Implement a doubly linked list Figure 5: The query for a linked list operation The program generated as follows: Figure 6: Asking for the elements of the node Figure 7: The response to the query 8

9 Example 3: Operations on record based files Figure 8: The query for a general filesystem The program generated as follows: Figure 9: Asking for the fields of record Figure 10: The response to the query 9

10 Example 4: Sort N strings, reverse them, find their lengths and then convert each of them to upper case Figure 11: A query for operations on strings Figure 12: Asking for the sorting algorithm Figure 13: Asking for number of strings Figure 14: The response to the query 10

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704)

GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT. Course Curriculum. DATA STRUCTURES (Code: 3330704) GUJARAT TECHNOLOGICAL UNIVERSITY, AHMEDABAD, GUJARAT Course Curriculum DATA STRUCTURES (Code: 3330704) Diploma Programme in which this course is offered Semester in which offered Computer Engineering,

More information

L T P C Course Name: Linux Lab 0 0 4 2. Course Code: PBC - 602

L T P C Course Name: Linux Lab 0 0 4 2. Course Code: PBC - 602 Course Code: PBC - 602 Course Name: Linux Lab 0 0 4 2 1) Write a shell script to input two numbers and perform all mathematical operations on them 2) Write a shell script to print the information about

More information

10CS35: Data Structures Using C

10CS35: Data Structures Using C CS35: Data Structures Using C QUESTION BANK REVIEW OF STRUCTURES AND POINTERS, INTRODUCTION TO SPECIAL FEATURES OF C OBJECTIVE: Learn : Usage of structures, unions - a conventional tool for handling a

More information

Lab Experience 17. Programming Language Translation

Lab Experience 17. Programming Language Translation Lab Experience 17 Programming Language Translation Objectives Gain insight into the translation process for converting one virtual machine to another See the process by which an assembler translates assembly

More information

MLR Institute of Technology

MLR Institute of Technology MLR Institute of Technology DUNDIGAL 500 043, HYDERABAD COMPUTER SCIENCE AND ENGINEERING Computer Programming Lab List of Experiments S.No. Program Category List of Programs 1 Operators a) Write a C program

More information

PES Institute of Technology-BSC QUESTION BANK

PES Institute of Technology-BSC QUESTION BANK PES Institute of Technology-BSC Faculty: Mrs. R.Bharathi CS35: Data Structures Using C QUESTION BANK UNIT I -BASIC CONCEPTS 1. What is an ADT? Briefly explain the categories that classify the functions

More information

C++ How to Program, 8/e by Pearson Education, Inc. All Rights Reserved.

C++ How to Program, 8/e by Pearson Education, Inc. All Rights Reserved. C++ How to Program, 8/e 1992-2012 by Pearson Education, Inc. 1992-2012 by Pearson Education, Inc. 1992-2012 by Pearson Education, Inc. We ve studied fixed-size data structures such as one-dimensional arrays

More information

Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore

Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore Compiler Design Prof. Y. N. Srikant Department of Computer Science and Automation Indian Institute of Science, Bangalore Module No. # 02 Lecture No. # 05 Run-time Environments-Part 3 and Local Optimizations

More information

PHP Essentials. PHP Essentials Edition 1.0

PHP Essentials. PHP Essentials Edition 1.0 PHP Essentials Edition 1.0. This ebook is provided for personal use only. Unauthorized use, reproduction and/or distribution strictly prohibited. All rights reserved. The content of this book is provided

More information

Pseudo code Tutorial and Exercises Teacher s Version

Pseudo code Tutorial and Exercises Teacher s Version Pseudo code Tutorial and Exercises Teacher s Version Pseudo-code is an informal way to express the design of a computer program or an algorithm in 1.45. The aim is to get the idea quickly and also easy

More information

FBCA-02 April-2007 Programming in C Language BCA-102 (New Course)

FBCA-02 April-2007 Programming in C Language BCA-102 (New Course) Seat No. : FBCA-02 April-2007 Programming in C Language BCA-102 (New Course) Time : 3 Hours] [Max. Marks : 70 Instructions : (1) Figures to the right indicate full marks of the question. (2) Make and state

More information

So today we shall continue our discussion on the search engines and web crawlers. (Refer Slide Time: 01:02)

So today we shall continue our discussion on the search engines and web crawlers. (Refer Slide Time: 01:02) Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #39 Search Engines and Web Crawler :: Part 2 So today we

More information

DEPARTMENT OF SCIENCE AND HUMANITIES CS6202-PROGRAMMING AND DATA STRUCTURES I QUESTION BANK

DEPARTMENT OF SCIENCE AND HUMANITIES CS6202-PROGRAMMING AND DATA STRUCTURES I QUESTION BANK DEPARTMENT OF SCIENCE AND HUMANITIES Sem/Year/Branch: II/I/CSE CS6202-PROGRAMMING AND DATA STRUCTURES I QUESTION BANK UNIT I 1. Give two examples of C preprocessors with syntax.(apr/may 2015) 2. What are

More information

Abstract Data Type. EECS 281: Data Structures and Algorithms. The Foundation: Data Structures and Abstract Data Types

Abstract Data Type. EECS 281: Data Structures and Algorithms. The Foundation: Data Structures and Abstract Data Types EECS 281: Data Structures and Algorithms The Foundation: Data Structures and Abstract Data Types Computer science is the science of abstraction. Abstract Data Type Abstraction of a data structure on that

More information

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION

A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION A TOOL FOR DATA STRUCTURE VISUALIZATION AND USER-DEFINED ALGORITHM ANIMATION Tao Chen 1, Tarek Sobh 2 Abstract -- In this paper, a software application that features the visualization of commonly used

More information

2) Write in detail the issues in the design of code generator.

2) Write in detail the issues in the design of code generator. COMPUTER SCIENCE AND ENGINEERING VI SEM CSE Principles of Compiler Design Unit-IV Question and answers UNIT IV CODE GENERATION 9 Issues in the design of code generator The target machine Runtime Storage

More information

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY

VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 603 203 DEPARTMENT OF COMPUTER APPLICATIONS QUESTION BANK IN REVISED BLOOM S TAXONOMY ACADEMIC YEAR: 0 7 VALLIAMMAI ENGINEERING COLLEGE SRM NAGAR, KATTANKULATHUR 0 0 SEMESTER: ODD BRANCH: MCA YEAR: I SEMESTER: I SUBJECT CODE AND NAME: MC70 Problem Solving and Programming NAME OF THE FACULTY

More information

CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions

CS 2112 Spring 2014. 0 Instructions. Assignment 3 Data Structures and Web Filtering. 0.1 Grading. 0.2 Partners. 0.3 Restrictions CS 2112 Spring 2014 Assignment 3 Data Structures and Web Filtering Due: March 4, 2014 11:59 PM Implementing spam blacklists and web filters requires matching candidate domain names and URLs very rapidly

More information

BCS2B02: OOP Concepts and Data Structures Using C++

BCS2B02: OOP Concepts and Data Structures Using C++ SECOND SEMESTER BCS2B02: OOP Concepts and Data Structures Using C++ Course Number: 10 Contact Hours per Week: 4 (2T + 2P) Number of Credits: 2 Number of Contact Hours: 30 Hrs. Course Evaluation: Internal

More information

DIABLO VALLEY COLLEGE CATALOG 2014-2015

DIABLO VALLEY COLLEGE CATALOG 2014-2015 COMPUTER SCIENCE COMSC The computer science department offers courses in three general areas, each targeted to serve students with specific needs: 1. General education students seeking a computer literacy

More information

High-level programming (Ch 11-14)

High-level programming (Ch 11-14) High-level programming (Ch 11-14) hardware software H/w s/w interface Problems Algorithms Prog. Lang & Interfaces Instruction Set Architecture Microarchitecture (Organization) Circuits Devices (Transistors)

More information

International Journal of Scientific & Engineering Research, Volume 4, Issue 11, November-2013 5 ISSN 2229-5518

International Journal of Scientific & Engineering Research, Volume 4, Issue 11, November-2013 5 ISSN 2229-5518 International Journal of Scientific & Engineering Research, Volume 4, Issue 11, November-2013 5 INTELLIGENT MULTIDIMENSIONAL DATABASE INTERFACE Mona Gharib Mohamed Reda Zahraa E. Mohamed Faculty of Science,

More information

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement?

PART-A Questions. 2. How does an enumerated statement differ from a typedef statement? 1. Distinguish & and && operators. PART-A Questions 2. How does an enumerated statement differ from a typedef statement? 3. What are the various members of a class? 4. Who can access the protected members

More information

AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm

AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm AS-2261 M.Sc.(First Semester) Examination-2013 Paper -fourth Subject-Data structure with algorithm Time: Three Hours] [Maximum Marks: 60 Note Attempts all the questions. All carry equal marks Section A

More information

Chapter 3. Linked Lists. Data Structures and Algorithms in Java

Chapter 3. Linked Lists. Data Structures and Algorithms in Java Chapter 3 Linked Lists Data Structures and Algorithms in Java Objectives Discuss the following topics: Singly Linked Lists Doubly Linked Lists Circular Lists Skip Lists Self-Organizing Lists Sparse Tables

More information

System Requirement Specification for A Distributed Desktop Search and Document Sharing Tool for Local Area Networks

System Requirement Specification for A Distributed Desktop Search and Document Sharing Tool for Local Area Networks System Requirement Specification for A Distributed Desktop Search and Document Sharing Tool for Local Area Networks OnurSoft Onur Tolga Şehitoğlu November 10, 2012 v1.0 Contents 1 Introduction 3 1.1 Purpose..............................

More information

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases

An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases An Eclipse Plug-In for Visualizing Java Code Dependencies on Relational Databases Paul L. Bergstein, Priyanka Gariba, Vaibhavi Pisolkar, and Sheetal Subbanwad Dept. of Computer and Information Science,

More information

Introduction to DBMS

Introduction to DBMS CHAPTER 1 Introduction to DBMS In this chapter, you will learn 1.0 Introduction 1.1 History of Database Management System 1.2 Database Architecture 1.3 Database Management System Users 1.4 Role of DBMS

More information

Java Native Interface

Java Native Interface Java Native Interface Application Notes Da Ke 4/5/2009 ECE 480 Spring 2009, Design Team 3 Department of Electrical and Computer Engineering Michigan State University Abstract Java is one of most widely

More information

VHDL Test Bench Tutorial

VHDL Test Bench Tutorial University of Pennsylvania Department of Electrical and Systems Engineering ESE171 - Digital Design Laboratory VHDL Test Bench Tutorial Purpose The goal of this tutorial is to demonstrate how to automate

More information

Glossary of Object Oriented Terms

Glossary of Object Oriented Terms Appendix E Glossary of Object Oriented Terms abstract class: A class primarily intended to define an instance, but can not be instantiated without additional methods. abstract data type: An abstraction

More information

Tamil Search Engine. Abstract

Tamil Search Engine. Abstract Tamil Search Engine Baskaran Sankaran AU-KBC Research Centre, MIT campus of Anna University, Chromepet, Chennai - 600 044. India. E-mail: baskaran@au-kbc.org Abstract The Internet marks the era of Information

More information

CS0213 DATA STRUCTURES AND ALGORITHM LAB USING C & C++ LABORATORY MANUAL II - CSE III - SEMESTER ACADEMIC YEAR:

CS0213 DATA STRUCTURES AND ALGORITHM LAB USING C & C++ LABORATORY MANUAL II - CSE III - SEMESTER ACADEMIC YEAR: CS0213 DATA STRUCTURES AND ALGORITHM LAB USING C & C++ LABORATORY MANUAL II - CSE III - SEMESTER ACADEMIC YEAR: 2012-2013 SCHOOL OF COMPUTER SCIENCE & ENGINEERING SRM UNIVERSITY, SRM NAGAR, KATTANKULATHUR-603203.

More information

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay

Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Information Theory and Coding Prof. S. N. Merchant Department of Electrical Engineering Indian Institute of Technology, Bombay Lecture - 14 Non-Binary Huffman Code and Other Codes In the last class we

More information

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++

1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ Answer the following 1) The postfix expression for the infix expression A+B*(C+D)/F+D*E is ABCD+*F/DE*++ 2) Which data structure is needed to convert infix notations to postfix notations? Stack 3) The

More information

12 Abstract Data Types

12 Abstract Data Types 12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

More information

REMOTE DEVELOPMENT OPTION

REMOTE DEVELOPMENT OPTION Leading the Evolution DATA SHEET MICRO FOCUS SERVER EXPRESS TM REMOTE DEVELOPMENT OPTION Executive Overview HIGH PRODUCTIVITY DEVELOPMENT FOR LINUX AND UNIX DEVELOPERS Micro Focus Server Express is the

More information

int w = (x + x)*y - y; System.out.println("The value of w is " + w); z = w + 3; System.out.println("The value of z is now " + z);

int w = (x + x)*y - y; System.out.println(The value of w is  + w); z = w + 3; System.out.println(The value of z is now  + z); MIT AITI Mobile Application Development in Java Lab 02: Java Basics Instructions on how to submit Lab 2 will be presented on the screen. Please follow instructions and if they are unclear, please feel

More information

V.S.B. ENGINEERING COLLEGE, KARUR. Academic Year: (ODD Semester) Department of Computer Science and Engineering

V.S.B. ENGINEERING COLLEGE, KARUR. Academic Year: (ODD Semester) Department of Computer Science and Engineering V.S.B. ENGINEERING COLLEGE, KARUR Academic Year: 2016-2017 (ODD Semester) Department of Computer Science and Engineering Question Bank (2013 Regulations) S.No. Name of the Subject / Lab Semester Page No.

More information

INDEX. C programming Page 1 of 10. 5) Function. 1) Introduction to C Programming

INDEX. C programming Page 1 of 10. 5) Function. 1) Introduction to C Programming INDEX 1) Introduction to C Programming a. What is C? b. Getting started with C 2) Data Types, Variables, Constants a. Constants, Variables and Keywords b. Types of Variables c. C Keyword d. Types of C

More information

KITES TECHNOLOGY COURSE MODULE (C, C++, DS)

KITES TECHNOLOGY COURSE MODULE (C, C++, DS) KITES TECHNOLOGY 360 Degree Solution www.kitestechnology.com/academy.php info@kitestechnology.com technologykites@gmail.com Contact: - 8961334776 9433759247 9830639522.NET JAVA WEB DESIGN PHP SQL, PL/SQL

More information

Efficient Data Structures for Decision Diagrams

Efficient Data Structures for Decision Diagrams Artificial Intelligence Laboratory Efficient Data Structures for Decision Diagrams Master Thesis Nacereddine Ouaret Professor: Supervisors: Boi Faltings Thomas Léauté Radoslaw Szymanek Contents Introduction...

More information

Linked Lists, Stacks, Queues, Deques. It s time for a chainge!

Linked Lists, Stacks, Queues, Deques. It s time for a chainge! Linked Lists, Stacks, Queues, Deques It s time for a chainge! Learning Goals After this unit, you should be able to... Differentiate an abstraction from an implementation. Define and give examples of problems

More information

Package Designer Guide

Package Designer Guide Package Designer Guide Rev: 13 December 2011 Sitecore CMS 6.5 Package Designer Guide An administrator's guide to creating and editing Sitecore packages Table of Contents Chapter 1 Introduction... 3 Chapter

More information

Open-Source, Cross-Platform Java Tools Working Together on a Dialogue System

Open-Source, Cross-Platform Java Tools Working Together on a Dialogue System Open-Source, Cross-Platform Java Tools Working Together on a Dialogue System Oana NICOLAE Faculty of Mathematics and Computer Science, Department of Computer Science, University of Craiova, Romania oananicolae1981@yahoo.com

More information

Metadata Driven Data Transformation

Metadata Driven Data Transformation Metadata Driven Data Transformation Petr Aubrecht and Zdenek Kouba {aubrech,kouba}@labe.felk.cvut.cz Czech Technical University Technická 2 Prague, 166 27, Czech Republic Abstract The bottleneck of a data

More information

Business Objects Online training Contents SAP BUSINESS OBJECTS 4.0/XI 3.1. We provide online instructor led Business Objects Training.

Business Objects Online training Contents SAP BUSINESS OBJECTS 4.0/XI 3.1. We provide online instructor led Business Objects Training. Business Objects Online training Contents SAP BUSINESS OBJECTS 4.0/XI 3.1 We provide online instructor led Business Objects Training. BUSINESS OBJECTS XI 3.1 TRAINING CONTENT: Oracle (Basics) Universe

More information

INTERNATIONAL EDITION. Problem Solving with C++ Data Abstraction & SIXTH EDITION. Walls and Mirrors. Frank M. Carrano Timothy Henry

INTERNATIONAL EDITION. Problem Solving with C++ Data Abstraction & SIXTH EDITION. Walls and Mirrors. Frank M. Carrano Timothy Henry INTERNATIONAL EDITION Data Abstraction & Problem Solving with C++ Walls and Mirrors SIXTH EDITION Frank M. Carrano Timothy Henry Operator Meaning Associativity Usage * multiply left expr * expr / divide

More information

Chapter 13 UNIX Operating System

Chapter 13 UNIX Operating System Understanding Operating Systems, Fifth Edition 13-1 Chapter 13 UNIX Operating System At a Glance Instructor s Manual Table of Contents Overview Objectives s Quick Quizzes Class Discussion Topics Additional

More information

CHAPTER 5 INTELLIGENT TECHNIQUES TO PREVENT SQL INJECTION ATTACKS

CHAPTER 5 INTELLIGENT TECHNIQUES TO PREVENT SQL INJECTION ATTACKS 66 CHAPTER 5 INTELLIGENT TECHNIQUES TO PREVENT SQL INJECTION ATTACKS 5.1 INTRODUCTION In this research work, two new techniques have been proposed for addressing the problem of SQL injection attacks, one

More information

NIST/ITL CSD Biometric Conformance Test Software on Apache Hadoop. September 2014. National Institute of Standards and Technology (NIST)

NIST/ITL CSD Biometric Conformance Test Software on Apache Hadoop. September 2014. National Institute of Standards and Technology (NIST) NIST/ITL CSD Biometric Conformance Test Software on Apache Hadoop September 2014 Dylan Yaga NIST/ITL CSD Lead Software Designer Fernando Podio NIST/ITL CSD Project Manager National Institute of Standards

More information

ML for the Working Programmer

ML for the Working Programmer ML for the Working Programmer 2nd edition Lawrence C. Paulson University of Cambridge CAMBRIDGE UNIVERSITY PRESS CONTENTS Preface to the Second Edition Preface xiii xv 1 Standard ML 1 Functional Programming

More information

AUTOMATE CRAWLER TOWARDS VULNERABILITY SCAN REPORT GENERATOR

AUTOMATE CRAWLER TOWARDS VULNERABILITY SCAN REPORT GENERATOR AUTOMATE CRAWLER TOWARDS VULNERABILITY SCAN REPORT GENERATOR Pragya Singh Baghel United College of Engineering & Research, Gautama Buddha Technical University, Allahabad, Utter Pradesh, India ABSTRACT

More information

Questions 1 through 25 are worth 2 points each. Choose one best answer for each.

Questions 1 through 25 are worth 2 points each. Choose one best answer for each. Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in

More information

Advance Bash Shell Scripting

Advance Bash Shell Scripting Advance Bash Shell Scripting 1- Introduction to Shell What is shell Installation of shell Shell features Bash Keywords Built-in Commands Linux Commands Specialized Navigation and History Commands Shell

More information

Getting Started with the Internet Communications Engine

Getting Started with the Internet Communications Engine Getting Started with the Internet Communications Engine David Vriezen April 7, 2014 Contents 1 Introduction 2 2 About Ice 2 2.1 Proxies................................. 2 3 Setting Up ICE 2 4 Slices 2

More information

CS420: Operating Systems OS Services & System Calls

CS420: Operating Systems OS Services & System Calls NK YORK COLLEGE OF PENNSYLVANIA HG OK 2 YORK COLLEGE OF PENNSYLVAN OS Services & System Calls James Moscola Department of Physical Sciences York College of Pennsylvania Based on Operating System Concepts,

More information

Introduction to C Programming

Introduction to C Programming Introduction to C Programming C HOW TO PROGRAM, 6/E 1992-2010 by Pearson Education, Inc. All Rights Reserved. 2.1 Introduction The C language facilitates a structured and disciplined approach to computer

More information

PHP 5.5 (FRAMEWORKS & CMS) WITH WEB APPLICATION & MOBILE APPLICATION DEVELOPMETN

PHP 5.5 (FRAMEWORKS & CMS) WITH WEB APPLICATION & MOBILE APPLICATION DEVELOPMETN Who we are ApexTG India Pvt. Ltd. focuses on delivering sophisticated technology-enabled solutions to maximize complex business needs. Founded in 2007 and based in New Delhi NCR Noida, the company has

More information

Programming API for FEMAP

Programming API for FEMAP Programming API for FEMAP An Introduction to The How s and Why s What is an API? The FEMAP API is an OLC/COM based programming interface and is object oriented programming. If you have never programmed

More information

Regular Expressions and Automata using Haskell

Regular Expressions and Automata using Haskell Regular Expressions and Automata using Haskell Simon Thompson Computing Laboratory University of Kent at Canterbury January 2000 Contents 1 Introduction 2 2 Regular Expressions 2 3 Matching regular expressions

More information

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share.

We will learn the Python programming language. Why? Because it is easy to learn and many people write programs in Python so we can share. LING115 Lecture Note Session #4 Python (1) 1. Introduction As we have seen in previous sessions, we can use Linux shell commands to do simple text processing. We now know, for example, how to count words.

More information

CHAPTER 4 ESSENTIAL DATA STRUCTRURES

CHAPTER 4 ESSENTIAL DATA STRUCTRURES CHAPTER 4 ESSENTIAL DATA STRUCTURES 72 CHAPTER 4 ESSENTIAL DATA STRUCTRURES In every algorithm, there is a need to store data. Ranging from storing a single value in a single variable, to more complex

More information

COURSE: B.TECH-ECE. IV Sem. Data structure Using C. b) Deletion of element in an array

COURSE: B.TECH-ECE. IV Sem. Data structure Using C. b) Deletion of element in an array COURSE: B.TECH-ECE. IV Sem Data structure Using C 1. Determine the formula to find the address location of an element in three dimensions array, suppose each element takes four bytes of space & elements

More information

Programming Exercises

Programming Exercises s CMPS 5P (Professor Theresa Migler-VonDollen ): Assignment #8 Problem 6 Problem 1 Programming Exercises Modify the recursive Fibonacci program given in the chapter so that it prints tracing information.

More information

A3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE. Write a program to find sum of all prime numbers between 100 and 500.

A3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE. Write a program to find sum of all prime numbers between 100 and 500. A3-R4: PROGRAMMING AND PROBLEM SOLVING THROUGH C LANGUAGE Assignment 1. Write a program to find sum of all prime numbers between 100 and 500. Assignment 2. Write a program to obtain sum of the first 10

More information

International Journal Of Engineering Research & Management Technology

International Journal Of Engineering Research & Management Technology International Journal Of Engineering Research & Management Technology ISSN: 2348-4039 September- 2014 Volume 1, Issue-5 Dynamic Implementation Using Linked List Karuna Department of Information and Technology

More information

Data Structure [Question Bank]

Data Structure [Question Bank] Unit I (Analysis of Algorithms) 1. What are algorithms and how they are useful? 2. Describe the factor on best algorithms depends on? 3. Differentiate: Correct & Incorrect Algorithms? 4. Write short note:

More information

Postgres Plus xdb Replication Server with Multi-Master User s Guide

Postgres Plus xdb Replication Server with Multi-Master User s Guide Postgres Plus xdb Replication Server with Multi-Master User s Guide Postgres Plus xdb Replication Server with Multi-Master build 57 August 22, 2012 , Version 5.0 by EnterpriseDB Corporation Copyright 2012

More information

Marathwada Institute of Technology

Marathwada Institute of Technology Marathwada Institute of Technology Master of Computer Application Title of the subject: Object Oriented Programming using C++ Course Code: MCA 101 Faculty: Shubhashree Savant Class: FY MCA Part - I (Question

More information

11A. CORPORATE INFRASTRUCTURE

11A. CORPORATE INFRASTRUCTURE DR.VSRS 11A. CORPORATE INFRASTRUCTURE for 5th GENERATION COMPUTERS DR.VSR.SUBRAMANIAM.MBA.,Ph.D.,D.Litt PUBLISHED IN : INDIAN MANAGEMENT (ISSN : 0019-5812). Journal of the All India Management Association,

More information

SQL Development Using Oracle

SQL Development Using Oracle SQL Development Using Oracle Course Summary Identify the major structural components of the Oracle Database 11g Create reports of aggregated data Write SELECT statements that include queries Retrieve row

More information

Quiz 4 Solutions EECS 211: FUNDAMENTALS OF COMPUTER PROGRAMMING II. 1 Q u i z 4 S o l u t i o n s

Quiz 4 Solutions EECS 211: FUNDAMENTALS OF COMPUTER PROGRAMMING II. 1 Q u i z 4 S o l u t i o n s Quiz 4 Solutions Q1: What value does function mystery return when called with a value of 4? int mystery ( int number ) { if ( number

More information

Module 2 Stacks and Queues: Abstract Data Types

Module 2 Stacks and Queues: Abstract Data Types Module 2 Stacks and Queues: Abstract Data Types A stack is one of the most important and useful non-primitive linear data structure in computer science. It is an ordered collection of items into which

More information

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology)

ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) ALLIED PAPER : DISCRETE MATHEMATICS (for B.Sc. Computer Technology & B.Sc. Multimedia and Web Technology) Subject Description: This subject deals with discrete structures like set theory, mathematical

More information

A Tokenization and Encryption based Multi-Layer Architecture to Detect and Prevent SQL Injection Attack

A Tokenization and Encryption based Multi-Layer Architecture to Detect and Prevent SQL Injection Attack A Tokenization and Encryption based Multi-Layer Architecture to Detect and Prevent SQL Injection Attack Mr. Vishal Andodariya PG Student C. U. Shah College Of Engg. And Tech., Wadhwan city, India vishal90.ce@gmail.com

More information

Data Structures. Topic #4

Data Structures. Topic #4 Topic #4 Today s Agenda Stack and Queue ADTs What are they Like Ordered Lists, are position oriented Use of Data Structures for Stacks and Queues arrays (statically & dynamically allocated) linear linked

More information

Quick Start Guide. Version R9. English

Quick Start Guide. Version R9. English Custom Reports Quick Start Guide Version R9 English March 5, 2015 Agreement The purchase and use of all Software and Services is subject to the Agreement as defined in Kaseya s Click-Accept EULATOS as

More information

Semantic Analysis: Types and Type Checking

Semantic Analysis: Types and Type Checking Semantic Analysis Semantic Analysis: Types and Type Checking CS 471 October 10, 2007 Source code Lexical Analysis tokens Syntactic Analysis AST Semantic Analysis AST Intermediate Code Gen lexical errors

More information

12 File and Database Concepts 13 File and Database Concepts A many-to-many relationship means that one record in a particular record type can be relat

12 File and Database Concepts 13 File and Database Concepts A many-to-many relationship means that one record in a particular record type can be relat 1 Databases 2 File and Database Concepts A database is a collection of information Databases are typically stored as computer files A structured file is similar to a card file or Rolodex because it uses

More information

Document management and exchange system supporting education process

Document management and exchange system supporting education process Document management and exchange system supporting education process Emil Egredzija, Bozidar Kovacic Information system development department, Information Technology Institute City of Rijeka Korzo 16,

More information

A New Model for Algorithm Animation Over the WWW. February 5, 1996

A New Model for Algorithm Animation Over the WWW. February 5, 1996 A New Model for Algorithm Animation Over the James E. Baker y Isabel F. Cruz z Giuseppe Liotta y Roberto Tamassia y February 5, 1996 Introduction Algorithm animation helps the end user to understand algorithms

More information

IN THIS CHAPTER,YOU ARE INTRODUCED to the C language so that you can see what

IN THIS CHAPTER,YOU ARE INTRODUCED to the C language so that you can see what 3 Compiling and Running Your First Program IN THIS CHAPTER,YOU ARE INTRODUCED to the C language so that you can see what programming in C is all about.what better way to gain an appreciation for this language

More information

Tutorial No. 1 - Solution (Introduction to Computers & Programming)

Tutorial No. 1 - Solution (Introduction to Computers & Programming) Tutorial No. 1 - Solution (Introduction to Computers & Programming) Computer Programming and Utilization (2110003) 1. Draw a block diagram of computer architecture. 2. List various components of a computer

More information

(Refer Slide Time: 01:35)

(Refer Slide Time: 01:35) Internet Technology Prof. Indranil Sengupta Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture No #26 Javascript Examples (Continued) In this class we will

More information

CS111 SQL Database Project Description

CS111 SQL Database Project Description CS111 SQL Database Project Description Rutgers University New Brunswick Spring 2015 In this project you will be using your existing knowledge gained through lectures and homeworks in order to explore an

More information

Figure 1: Graphical example of a mergesort 1.

Figure 1: Graphical example of a mergesort 1. CSE 30321 Computer Architecture I Fall 2011 Lab 02: Procedure Calls in MIPS Assembly Programming and Performance Total Points: 100 points due to its complexity, this lab will weight more heavily in your

More information

Introduction to C Programming S Y STEMS

Introduction to C Programming S Y STEMS Introduction to C Programming CS 40: INTRODUCTION TO U NIX A ND L I NUX O P E R AT ING S Y STEMS Objectives Introduce C programming, including what it is and what it contains, which includes: Command line

More information

Image Search by MapReduce

Image Search by MapReduce Image Search by MapReduce COEN 241 Cloud Computing Term Project Final Report Team #5 Submitted by: Lu Yu Zhe Xu Chengcheng Huang Submitted to: Prof. Ming Hwa Wang 09/01/2015 Preface Currently, there s

More information

2 SYSTEM DESCRIPTION TECHNIQUES

2 SYSTEM DESCRIPTION TECHNIQUES 2 SYSTEM DESCRIPTION TECHNIQUES 2.1 INTRODUCTION Graphical representation of any process is always better and more meaningful than its representation in words. Moreover, it is very difficult to arrange

More information

PL/I Program Profiles

PL/I Program Profiles 364 The Influence of Structured Programming on PL/I Program Profiles JAMES L. ELSHOFF, SENIOR MEMBER, IEEE Abstract-Two sets of commercial PL/I programs are studied. One set represents programming practice

More information

High level language programs versus Machine code

High level language programs versus Machine code High level language programs versus Machine code You all have experience programming in a high level language. You know that when you write a program in a language such as C or Java, the program is nothing

More information

Programming for MSc Part I

Programming for MSc Part I Herbert Martin Dietze University of Buckingham herbert@the-little-red-haired-girl.org July 24, 2001 Abstract The course introduces the C programming language and fundamental software development techniques.

More information

ADTs and Modules in Java and C

ADTs and Modules in Java and C CMPS 101 Algorithms and Abstract Data Types ADTs and Modules in Java and C Introduction This document introduces the concepts of Modules and ADTs, and describes how to implement them in both Java and C.

More information

Concepts of digital forensics

Concepts of digital forensics Chapter 3 Concepts of digital forensics Digital forensics is a branch of forensic science concerned with the use of digital information (produced, stored and transmitted by computers) as source of evidence

More information

IMPROVING PERFORMANCE OF RANDOMIZED SIGNATURE SORT USING HASHING AND BITWISE OPERATORS

IMPROVING PERFORMANCE OF RANDOMIZED SIGNATURE SORT USING HASHING AND BITWISE OPERATORS Volume 2, No. 3, March 2011 Journal of Global Research in Computer Science RESEARCH PAPER Available Online at www.jgrcs.info IMPROVING PERFORMANCE OF RANDOMIZED SIGNATURE SORT USING HASHING AND BITWISE

More information

AFF 826. Sub. Code 4BSO1C1. Sp2. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING

AFF 826. Sub. Code 4BSO1C1. Sp2. B.Sc. DEGREE EXAMINATION, NOVEMBER First Semester. Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING Sp2 AFF 826 Sub. Code 4BSO1C1 B.Sc. DEGREE EXAMINATION, NOVEMBER 2015 First Semester Software FUNDAMENTALS OF COMPUTERS AND C PROGRAMMING (CBCS 2014 onwards) Time : 3 Hours Maximum : 75 Marks Part A (10

More information

Data Structure. Lecture 3

Data Structure. Lecture 3 Data Structure Lecture 3 Data Structure Formally define Data structure as: DS describes not only set of objects but the ways they are related, the set of operations which may be applied to the elements

More information

Chapter 8: Bags and Sets

Chapter 8: Bags and Sets Chapter 8: Bags and Sets In the stack and the queue abstractions, the order that elements are placed into the container is important, because the order elements are removed is related to the order in which

More information

AN APPLICATION DEVELOPMENT FRAMEWORK USING EXPERT SYSTEM APPROACH

AN APPLICATION DEVELOPMENT FRAMEWORK USING EXPERT SYSTEM APPROACH AN APPLICATION DEVELOPMENT FRAMEWORK USING EXPERT SYSTEM APPROACH Rajendra M Sonar Shailesh J Mehta School Of Management Indian Institute of Technology Bombay Powai, Mumbai 400076, India rm_sonar@iitb.ac.in

More information