Abstract: A METHOD ANDSYSTEM FOR SOFTWARE DEVELOPMENT USING CUSTOM LANGUAGES A system for enabling development in an eclipse based generic editor by using custom languages has been implemented. The system uses XML files to generate configuration for each custom language thus converting it into a special purpose editor. The existing development editors can be enabled for development using custom language by just installing the given system. The system uses open source platform of eclipse the plugin development environment for the implementation of the system. [Figure 1]
FORM 2
THE PATENTS ACT, 1970
(39 of 1970)
&
THE PATENT RULES, 2003
COMPLETE SPECIFICATION
(See Section 10 and Rule 13)
TITLE OF INVENTION: "A METHOD AND SYSTEM FOR SOFTWARE DEVELOPMENT USING CUSTOM
LANGUAGES"
Applicant TATA Consultancy Services Limited
A company Incorporated in India under The Companies Act, 1956
Having address:
Nirmal Building, 9th Floor,
Nariman Point, Mumbai 400021,
Maharashtra, India
The following specification particularly describes the invention and the manner in which it is performed.
FIELD OF THE INVENTION
The invention in general relates to the field of software development. More particularly the invention relates to an integrated development editor (IDE) for custom languages.
BACKGROUND OF THE INVENTION
Software development industry involves development of applications that includes writing of source code in integrated development environment (IDE) editors comprising of an interpreter, a compiler, a debugging tool, build automation tools and several other components. The state of the art IDE's only support certain languages. However developing applications using proprietary languages is still a challenge that needs to be addressed.
Proprietary or custom languages are quite common in software application development environment. They can be fourth generation languages or standalone languages for another proprietary runtime environment.
For developers, the editor poses one of the major challenges as there are no standard GUI editors for custom languages. For languages which need compilation, GUI editors help identify the syntax mistakes before compilation is triggered. The developers have always faced a problem of developing editors from scratch for every proprietary language. According to research a real time example of the developed editor shows that it took more than 180 person days to develop the editor with majority of the features listed in Editor Requirements.
Without an intelligent custom language (CL) Editor, programmer has to employ strenuous effort to format the code, identify the executable code i.e. the code outside the commented area, type the words without spell mistakes, to be aware of the signature of the function calls ( for ex: in languages that support sub routines/function/methods such as Perl, Java, C++, C etc.). Further without an intelligent CLEditor, the undo operations may not be available beyond one previous modification and also it is painful for the programmer to edit the code until all syntax specific errors are cleared.
Eclipse is an open source community, whose projects are focused on building an open development platform, comprising extensible frameworks, tools and runtime for building,
deploying and managing software across the life cycle. One powerful feature of Eclipse is Plug-in Development Environment. The Plug-in Development Environment (PDE) provides tools to create, develop, test, debug, build and deploy Eclipse plug-ins, fragments, features, update sites and rich client platform (RCP) products. PDE defines extension points for developing CLEditor on eclipse platform. These editor extension points can be utilized to contribute custom programming language behavior.
The state of the art eclipse based editor plugins such as JDT; CDT etc. are specific to the programming language (Java and C++ respectively) for which they are developed. These do not support development using the custom programming languages. Further development of custom language editors requires the developer to spend immense time developing the features already available in a standard development editor.
For each programming language the syntax is diverse and thus having a unique editor for all the programming language is a formidable challenge. Each programming consists of its own set of keywords. In Java "class, return, new etc." are keywords. Similarly in C++, "operator, struct, virtual are keywords". There are numerous other programming languages such as Perl, Python, Cobol and the like that have their own unique keyword set. Moreover syntax of each programming language varies. C/C++ supports pointers whereas Java does not. Similarly variable declaration syntax and comment syntax varies in each programming language. Java, C++ supports "//"comment syntax. Perl supports "#" comments and C supports 7*' and '*/" syntax.
It is quite vivid from the state of art that the challenge of varying syntax of custom programming language still persists and hence generalization of syntax is necessary for making a generic editor. In light of the foregoing problem there exists a need for developing a simplified generic custom language editor to support plurality of proprietary programming languages.
OBJECTIVES OF THE INVENTION
The principle object of the present invention is to develop an integrated development environment for plurality of custom languages.
Another significant object of the invention is to scale up the existing editors' to support development for multiple custom languages.
It is another object of the present invention to provide functionalities like syntax highlighting, brace matching, content assist, auto indentation, text hover and the like by configuring a XML document for each custom language.
Yet another object of the invention is to generalize the syntax of custom languages using XML configurations and enable existing editors' to support custom languages for development.
Another object of the invention is to provide a universal editor for development that will support plurality of custom languages.
SUMMARY
In one of the preferred embodiments of the present invention, an auto configurable system adaptable to develop code in custom languages has been described. The system changes a first development environment into a second development environment by utilizing a XML document that is used to generalize the syntax of the custom language.
The system primarily comprises of a source code editor, a configuration component and a language parser. By using the above discussed components the developer is now enabled to develop software code in the custom language as per his choice. Thus previously the editor that was just a simple editor is now transformed into a special purpose editor enabled for programming. The system enables all the standard features available in the state of the art editors also referred as first environment within the second environment.
This summary is provided to introduce a selection of concepts in a simplified form that are further described below in the detailed description. This summary is not intended to identify key features or essential features of the claimed subject matter, nor is it intended to be used as an aid in determining the scope of the claimed subject matter.
Additional features and advantages of the invention will be set forth in the description which follows, and in part will be obvious from the description, or may be learned by the practice of the invention. These and other features of the present invention will become more fully apparent from the following description, or may be learned by the practice of the invention as set forth hereinafter.
BRIEF DESCRIPTION OF THE DRAWINGS
The foregoing summary, as well as the following detailed description of preferred embodiments, is better understood when read in conjunction with the appended drawings. For the purpose of illustrating the invention, there is shown in the drawings example constructions of the invention; however, the invention is not limited to the specific system and method disclosed in the
drawings:
Figure 1 depicts the components involved in the working of the system.
Figure 2 illustrates a class diagram of the source code editor
Figure 3 depicts the high level class interaction within the configuration component
DETAILED DESCRIPTION OF THE INVENTION
Some embodiments of this invention, illustrating all its features, will now be discussed in detail. The words "comprising," "having," "containing," and "including," and other forms thereof, are intended to be equivalent in meaning and be open ended in that an item or items following any one of these words is not meant to be an exhaustive listing of such item or items, or meant to be limited to only the listed item or items.
It must also be noted that as used herein and in the appended claims, the singular forms "a," "an," and "the" include plural references unless the context clearly dictates otherwise. Although any systems and methods similar or equivalent to those described herein can be used in the practice or testing of embodiments of the present invention, the preferred, systems and methods are now described.
Referring to Figure 1, the present invention describes a system for developing a Custom language text editor 100 (CLEditor), which helps the developer developing source code in proprietary languages. The CLEditorlOO broadly comprises of a source code editorl02, a configuration component l04 and a language parser l06.
The source code editor l02 provides an editor for writing of source code that can be edited according to the functionality that needs to be implemented during the software development process. The working of the source code editor can be customized based on the XML document 103 prepared by the configuration component 104.Source code editor is the core component in the CL Editor Plugin. This component implements the "text editor" functionality. Basic text editor is offered as default in eclipse plugin development platform. CL Editor functionalities are implemented by extending from this basic text editor. This is achieved by contributing to the eclipse provided extension points. These are explained in detail in further sections.
Next, Figure 2 illustrates a tabular class diagram of the source code editor and the functions associated with the same.
Class
High level functionality
CLEditor Core text editor class which defines the code scanner,
document provider, editor actions, source viewer objects.
These are consumed by the eclipse editor functionality in
Plug in Development Environment (PDE) platform.
CLCodeScanner Extends from eclipse PDE provided RuleBasedScanner.
This class defines the APIs that are called by eclipse PDE
runtime environment to scan the text entered in the
editor.
Defines the rules such as keyword rule, single/multi line
comment rule, string line rule etc. and assigns the Color
object for these rules. During scanning if any of the
token matches to these predefined rules, its
corresponding color is applied in the editor source. This
is how the syntax color coding is achieved.
CLEditorSourceViewerConfiguration This class defines the editor add-ons; content assist,
content formatter, highlighting, auto-indent strategy,
double click strategy.
CLWordStrategy Adds any special formatting to the content in the editor.
Ex: If all keywords are to be in upper case, this class
provides hook point API for customization in CL editor.
CLAutoEditStrategy Adds auto edit strategy functionalities such as auto
indenting for each new line character pressed.
This auto indent for new line is default functionality
provided by the CLEditor. This can be customized by the
user as per the custom language requirements.
CLWordRule Extends from eclipse PDEs WordRule class to evaluate
the scanner returned content. Returns the tokens as
configured by code scanner.
The configuration component 104, receives input in the form of a XML document 103 based upon which the language parser 106 converts any normal/general purpose editor into a special purpose editor. The configuration component is unique to the custom language editor plugin. It provides the classes that hook into the externalized XML configuration information. For instance, list of key words specific to programming language are returned by this component to the "source code editor component". Source code editor assigns the rules to parse the code in the editor and for all recognized keywords as returned by configuration component adds the color code functionality.
Now referring to Figure 3, CL Code Scanner class interacts with the classes provided by the configuration component. These classes hook into the externalized syntax information such as key words, comment rules, string pattern etc.
The language parser 106 is a component of the system that enables working of the advanced features of the system including but not limited to, finding word occurrences depending upon scope recognition, text hover, completion proposal template, syntax check facility and code folding that helps making the CLEditor a special purpose editor.
The invention utilizes eclipse based PDE to develop the powerful CLEditor that supports plurality of proprietary languages. The typical requirements of a CLEditor include syntax highlighting, content assisting, brace matching, auto indentation of new lines and the like. Common functionalities like cut, copy, paste and delete functionalities are also present in the CLEditor. Advanced features including but not limited to word occurrences depending upon scope recognition, text hover, completion proposal template, syntax check facility and code folding help make the CLEditor a special purpose editor
The CLEditor is independent of any programming languages and is reusable. Reusability is achieved as the editor implementation is generic. None of the target programming functionalities are coded into the editor. Instead this is externalized into XML files. Users can package the editor by creating XML file for each programming language.
Extension points form the backbone of the CLEditor and help in extending the eclipse platform by defining custom behavior. The extension points includes but are not limited to
• org.eclipse.ui.editors
• org.eclipse.ui.commands
• org.eclipse.ui.bindings
• org.eclipse.ui.editors.templates
• org.eclipse.core.resources.markers
• org.eclipse.help.toc
• org.eclipse.help.contexts
Extension points are contracts defined by Eclipse PDE environment. For instance, in order for eclipse to recognize a new custom text editor, editor development should extend "org.eclipse.ui.editors" contract and provide the custom implementation class. Below is the editor extension point addressed by CLEditor.
Let us now discuss the functionality that every extension point contributes to create the CLEditor.
Extension Point Addressed by CLEditor
Functionality Added
org.eclipse.ui.editors To define a new text editor
org.eclipse.ui.commands Defines keyboard commands.
Commands added by CLEditor are
1. Brace matching (Ctrl+P)
2. Toggle comment (Ctrl+/)
org.eclipse.ui.editors.templates To define custom template functionality for
users to add proprietary language templates.
These are utilized in code completion
proposals.
org.eclipse.help.toc For contributing to Eclipse Help functionality
org.eclipse.ui.preferencePages For adding template preference page so that
users can add the custom code templates
The steps shown below describe the configuration that needs to be added in the xml document 103, so that a general purpose editor is extended for programming with custom languages.
1. Text file extension
2. Adding Keyword List
3. Adding Comment Syntax
4. Adding string identification syntax
5. Adding content assist templates
For illustration purposes, two programming languages are considered
C++ language, chosen from general purpose language perspective and
• Q++ language, chosen from custom (proprietary) language perspective
Q++ language is part of MasterCraft™ Application Development Environment.
MasterCraft™ provides an integrated development environment for building enterprise applications. MasterCraft™ has a platform independent domain specific 4GL language called Q++. Q++ hides many of the complexities of lower level languages from developers enabling them to fully concentrate on developing business functionality.
Q++, also called as QPP, is neither interpreted nor compiled. Once a program is written in Q++, developers choose to translate the same to C++, C'# or Java.
With an Eclipse workspace, workbench offers to bind the file extensions to a specific editor to default the Editor while working with the files. This binding is utilized by the eclipse runtime to invoke the respective editor when user accesses the associated file type.
If the custom language file names contain a specific extension such as html, htm or cpp, the system binds these names to the CLEditor.
To bind the extensions user can edit the "org.eclipse.ui.editors" extension point contribution in plugin.xml of CLEditor. Plurality of extensions can be added as needed. In the code snippet shown below the file extension "cl" can be replaced by any extension such as ".cpp", ".h" etc.
In another embodiment of the present invention, binding of the file extensions can be done via Eclipse Workbench. For instance files that have "*.cl" extension are bound to "Custom Language Editor" as the default choice using eclipse workbench preferences. Accessing files with "*.cl" extension, eclipse will invoke the "Custom Language Editor" to allow the editor to open the file for editing.
In the next step the keyword list is added via an external XML document 103. This XML document is a part of the system and the end users are enabled to edit the XML document 103and add respective language specific keywords so as to make the novice editor a special purpose editor that supports development for custom languages. For instance: the language specific keywords are added in the below format. Color coding is applied to the below keywords to distinguish them in the editor.
class return —>
The next step involves adding comment syntax which is specific to the custom programming languages. "Comment syntax" is available in all programming languages. Comments helps to articulate code for better readability and future maintainability. However comment syntax is generic to all program languages. Few examples include:
• Perl and Shell programming recognizes lines that start with "#" as comment
• C language syntax considers any text embedded in "/*" and "*/" as comment
• C++/Java syntax recognizes lines that start with "//" as comment
Thus externalizing the comment syntax helps to customize the editor for any programming language.
The regular expression pattern is included in the XML document (103) referred above. For instance:
"
Next, the templates are structured description of coding patterns that reoccur in the code. For instance, a print statement carrying user name, a looping syntax iterate statement, a particular comment etc. In the final step content assist templates are embedded within the CLEditor. By using templates for these coding patterns user can avoid typing in the complete code every time the syntax is used in the code. Instead template completion proposal system adds the necessary code to the editor content.
Finally thus the XML document 103includes but is not limited to the keyword list, syntax definitions, string identification syntax and the like.
In another exemplary embodiment the CLEditor supports software development using more than one custom language. The CLEditor uses separate XML documents as input for highlighting the code written in each custom language. This provides more flexibility while software development and thus enhances the efficiency and reduces the time required for development.
The advantages associated in using the system enables the user to effortlessly add custom behavior to the novice editors and make them special purpose editors' ready for programming using proprietary languages. Moreover the system is scalable and reusable. The working system reduces the coding effort and improves the construction of the software development lifecycle thereby reducing 40% cost and hence increase in the productivity.
WE CLAIM:
1. An auto configurable development environment to convert a first environment into a
second environment adaptable to at least one selected custom language, the system
comprising:
a. a source code editor, upon selection of one or more custom language, configured
to modify a source code thereof to support plurality of programming features of
the selected custom languages;
b. a configuration component, cooperating with said source code editor, is
configured to equate semantic and syntactical patterns of the selected custom
languages to invoke one or more corresponding XML files; and
c. a language parser configured to parse said XML files to generate a custom
integrated development environment for development using the selected custom
languages.
2. The system of claim 1 wherein, the programming features include syntax highlighting, content assist, brace matching, auto indentation, word occurrence, text hover and the like.
3. The system of claim 1 wherein, the custom language refers to programming languages like Q++,Z++ and the like.
4. The system of claim 1 wherein, the semantic and syntactical patterns includes but is not limited to a combination of keywords, comment syntax, string patterns, source file extensions and the like.
5. The system of claim 1 wherein the keywords refer to the vocabulary of the respective custom language.
6. The system of claim 1 wherein, the first environment refers to any state of the art editors like visual studio, Java Development tools (JDT), C++ Development tools (CDT)
7. The system of claim 1 wherein, the second environment refers to a special purpose editor generated post parsing of the XML document.
8. The system of claim 1 wherein, the comment syntax refers to the syntax used by the language to define comments within the language.
9. The system of claim 1 wherein, the source file extension refers to the extension of the
file.
10. A computer program product having computer readable media with executable instructions stored thereon for instantaneously altering a first development environment into a second development environment according to one or more selected languages from a set of custom languages , the executable instructions on said media operating on one or more memory handlers of a processor to arouse cooperation of a configuration component for semantic and syntactical mapping of the XML files corresponding to the selected custom languages.
11. The computer program product claim 10 wherein, the instructions are configured to fetch at least one xml file stored thereon the said media and instantaneously reconfigure the data value stored there in the cache of the processor.
12. A method to create an auto configurable environment to enable development using custom languages, the method comprising:
binding at least one file extension from a specific editor to a default editor within
the corresponding extension point by utilizing the eclipse workbench preferences
option;
specifying an XML document to specify semantic and syntactical patterns of
custom languages;
accepting user input for enabling color differentiation within the custom language
editor, and;
providing and parsing the specified XML document within the system to enable development using custom languages.
13. The method of claim 12 wherein the, the XML document includes but is not limited to a keyword list, comment syntax and the like.
14. The method of claim 12 wherein, the extension points refer to org.eclipse.ui.editors, org.eclipse.ui.commands, org.eclipse.ui.bindings, org.eclipse.ui.editors.templates,
org.eclipse.core.resources.markers, org.eclipse.help.toc, org.eclipse.help.contexts.
15. The method of claim 12 wherein, the specific editor refers to the CL Editor configured to support software development using custom languages.
16. The method of claim 12 wherein, the default editor refers to standard eclipse editor.
17. The method of claim 12 wherein, the user input is embedded within the XML document and defines default color codes to be implemented in the CLEditor.
| Section | Controller | Decision Date |
|---|---|---|
| # | Name | Date |
|---|---|---|
| 1 | 1873-MUM-2012-Response to office action [25-05-2022(online)].pdf | 2022-05-25 |
| 1 | ABSTRACT 1.jpg | 2018-08-11 |
| 2 | 1873-MUM-2012-FORM 3.pdf | 2018-08-11 |
| 2 | 1873-MUM-2012-Written submissions and relevant documents [02-09-2020(online)].pdf | 2020-09-02 |
| 3 | 1873-MUM-2012-FORM 2[TITLE PAGE].pdf | 2018-08-11 |
| 3 | 1873-MUM-2012-Correspondence to notify the Controller [17-08-2020(online)].pdf | 2020-08-17 |
| 4 | 1873-MUM-2012-FORM-26 [17-08-2020(online)].pdf | 2020-08-17 |
| 4 | 1873-MUM-2012-FORM 26(26-7-2012).pdf | 2018-08-11 |
| 5 | 1873-MUM-2012-Response to office action [17-08-2020(online)].pdf | 2020-08-17 |
| 5 | 1873-MUM-2012-FORM 2.pdf | 2018-08-11 |
| 6 | 1873-MUM-2012-US(14)-ExtendedHearingNotice-(HearingDate-19-08-2020).pdf | 2020-07-21 |
| 6 | 1873-MUM-2012-FORM 18.pdf | 2018-08-11 |
| 7 | 1873-MUM-2012-US(14)-HearingNotice-(HearingDate-02-04-2020).pdf | 2020-03-05 |
| 7 | 1873-MUM-2012-FORM 1.pdf | 2018-08-11 |
| 8 | 1873-MUM-2012-FORM 1(30-7-2012).pdf | 2018-08-11 |
| 8 | 1873-MUM-2012-CLAIMS [18-03-2019(online)].pdf | 2019-03-18 |
| 9 | 1873-MUM-2012-COMPLETE SPECIFICATION [18-03-2019(online)].pdf | 2019-03-18 |
| 9 | 1873-MUM-2012-DRAWING.pdf | 2018-08-11 |
| 10 | 1873-MUM-2012-DESCRIPTION(COMPLETE).pdf | 2018-08-11 |
| 10 | 1873-MUM-2012-FER_SER_REPLY [18-03-2019(online)].pdf | 2019-03-18 |
| 11 | 1873-MUM-2012-CORRESPONDENCE.pdf | 2018-08-11 |
| 11 | 1873-MUM-2012-OTHERS [18-03-2019(online)].pdf | 2019-03-18 |
| 12 | 1873-MUM-2012-CORRESPONDENCE(30-7-2012).pdf | 2018-08-11 |
| 12 | 1873-MUM-2012-FER.pdf | 2018-09-24 |
| 13 | 1873-MUM-2012-ABSTRACT.pdf | 2018-08-11 |
| 13 | 1873-MUM-2012-CORRESPONDENCE(26-7-2012).pdf | 2018-08-11 |
| 14 | 1873-MUM-2012-CLAIMS.pdf | 2018-08-11 |
| 15 | 1873-MUM-2012-ABSTRACT.pdf | 2018-08-11 |
| 15 | 1873-MUM-2012-CORRESPONDENCE(26-7-2012).pdf | 2018-08-11 |
| 16 | 1873-MUM-2012-CORRESPONDENCE(30-7-2012).pdf | 2018-08-11 |
| 16 | 1873-MUM-2012-FER.pdf | 2018-09-24 |
| 17 | 1873-MUM-2012-OTHERS [18-03-2019(online)].pdf | 2019-03-18 |
| 17 | 1873-MUM-2012-CORRESPONDENCE.pdf | 2018-08-11 |
| 18 | 1873-MUM-2012-FER_SER_REPLY [18-03-2019(online)].pdf | 2019-03-18 |
| 18 | 1873-MUM-2012-DESCRIPTION(COMPLETE).pdf | 2018-08-11 |
| 19 | 1873-MUM-2012-COMPLETE SPECIFICATION [18-03-2019(online)].pdf | 2019-03-18 |
| 19 | 1873-MUM-2012-DRAWING.pdf | 2018-08-11 |
| 20 | 1873-MUM-2012-CLAIMS [18-03-2019(online)].pdf | 2019-03-18 |
| 20 | 1873-MUM-2012-FORM 1(30-7-2012).pdf | 2018-08-11 |
| 21 | 1873-MUM-2012-FORM 1.pdf | 2018-08-11 |
| 21 | 1873-MUM-2012-US(14)-HearingNotice-(HearingDate-02-04-2020).pdf | 2020-03-05 |
| 22 | 1873-MUM-2012-FORM 18.pdf | 2018-08-11 |
| 22 | 1873-MUM-2012-US(14)-ExtendedHearingNotice-(HearingDate-19-08-2020).pdf | 2020-07-21 |
| 23 | 1873-MUM-2012-FORM 2.pdf | 2018-08-11 |
| 23 | 1873-MUM-2012-Response to office action [17-08-2020(online)].pdf | 2020-08-17 |
| 24 | 1873-MUM-2012-FORM 26(26-7-2012).pdf | 2018-08-11 |
| 24 | 1873-MUM-2012-FORM-26 [17-08-2020(online)].pdf | 2020-08-17 |
| 25 | 1873-MUM-2012-FORM 2[TITLE PAGE].pdf | 2018-08-11 |
| 25 | 1873-MUM-2012-Correspondence to notify the Controller [17-08-2020(online)].pdf | 2020-08-17 |
| 26 | 1873-MUM-2012-Written submissions and relevant documents [02-09-2020(online)].pdf | 2020-09-02 |
| 26 | 1873-MUM-2012-FORM 3.pdf | 2018-08-11 |
| 27 | ABSTRACT 1.jpg | 2018-08-11 |
| 27 | 1873-MUM-2012-Response to office action [25-05-2022(online)].pdf | 2022-05-25 |
| 1 | search_20-09-2018.pdf |