System and method for automatically creating source code...

Data processing: software development – installation – and managem – Software program development tool – Translation of code

Reexamination Certificate

Rate now

  [ 0.00 ] – not rated yet Voters 0   Comments 0

Details

C717S152000, C717S152000

Reexamination Certificate

active

06237136

ABSTRACT:

BACKGROUND
1. Field of the Invention
The present invention relates to a system and method for automatically generating source code example files for an application program, wherein source code example files are automatically generated for a plurality of different programming languages and/or a plurality of different operating systems.
2. Description of the Related Art
Many application programs are distributed with examples which illustrate or exemplify operation of the application program. In many instances, the application program includes examples in a number of different programming languages. For example, NI-DAQ, the device driver and Windows driver library set for National Instruments Data Acquisition (DAQ) devices, is generally distributed with code examples in Microsoft Visual C++, Microsoft Visual Basic, and Borland C++.
In the NI-DAQ application program, the code examples generally had the following characteristics. First, each example included extensive Windows graphical user interface (GUI) code, so that the user could easily change key data acquisition parameters while running the example program. Second, each example accommodates a wide variety of DAQ devices. However, not all devices were supported by all NI-DAQ functions. Therefore, each example implemented run-time branching to make device specific function calls. Thirdly, each example was written individually for each language and three different Windows operating system (OS) versions (3.1x, 95, and NT), each taking advantage of the programming language specific features through language and OS specific project files. Finally, each example was delivered in the form of source code and ready-to-run executables.
While each delivered example illustrated an important aspect of using the NI-DAQ dynamic link library (DLL) through the exported application programming interface (API) calls, they had the following shortcomings with respect to the above mentioned characteristics. First, it was very difficult to find the few NI-DAQ function calls located in the few hundred lines of GUI code. In one example, there were 340 lines of code, which only included 2 lines of NI-DAQ function calls. Thus the NI-DAQ programming example resembled a Windows programming tutorial. Secondly, when the NI-DAQ driver set was upgraded to include support for new data acquisition (DAQ) devices, a programmer had to maintain the different versions of the examples for each programming language and OS. Thirdly, when a new version of the programming language was released (e.g.: Microsoft Visual C++ 5.0), the project files were required to be upgraded due to compatibility issues. Also, each example used slightly different sequences of function calls, which required that support personnel know the subtle differences between the examples. Fourthly, the size of the executables and/or run-time engines (e.g. the Visual Basic 3.0 run-time DLL is over 700 kB) required to run the executables required increased amounts of disk space for the installation media (1.44 MB floppies). Fifthly, the examples included no information on how physical signals were to be connected to the data acquisition devices while being used with these examples.
Finally, customers typically requested “code snippets”, which are concisely written source code files showing how to perform a certain task. The customer support engineers were thus required to spend time writing these short examples for customers.
Due to the above shortcomings and the large amount of required maintenance for the example source code, application developers were reluctant to provide a large number of examples to the users. The NI-DAQ library is a versatile driver library which supports over 50 different DAQ devices and signal conditioning units, as well as a wide variety of tasks for each DAQ device. Although the NI-DAQ User Manual did explain in flow charts how to use the set of NI-DAQ functions to perform various basic data acquisition tasks, the nature of the API calls required detailed expertise when it came to programming. Without examples, customers had a very difficult time programming with the NI-DAQ function calls.
Therefore, an improved system and method is desired for easily generating example programs for an application program, preferably in a plurality of different programming languages and/or for a plurality of different operating systems.
SUMMARY OF THE INVENTION
The present invention comprises a system and method for generating example source code files for an application program in a computer system. In the preferred embodiment, the system and method is used for creating source code example files for the NI-DAQ driver software from National Instruments.
The developer first generates a code flow description file. The code flow description file is written in a code flow description language which is independent of a plurality of programming languages, i.e., which includes only common programming elements from the plurality of programming languages. The developer then specifies one or more target programming languages. The present invention includes a Code Generator which generates one or more target example source code files in the specified target programming languages in response to the code flow description file. The Code Generator operates to parse the code flow description file to produce a code flow description data structure, and then generate the one or more target example source code files in the specified target programing languages in response to the code flow description data structure.
In one embodiment, the system further includes a program editor for creating the code flow description files. The system further comprises a function database which stores functions of the application program written in the code flow description language. The function database is useable in creating the code flow description file.
Thus, one object of the present invention is to easily create a large collection of examples that illustrate only a single basic data acquisition task, and reduce GUI code to a bare minimum.
Another object of the present invention is to have all of the examples of the same basic data acquisition task call the same sequence of NI-DAQ functions, so that an end user can examine an example in one language (e.g. Visual C++), and expect the same exact functionality from a counterpart example written in another programming language (e.g. Visual Basic).
Another object of the present invention is to simplify the programming style of example programs to accommodate a wide range of programming expertise levels among end users.
Another object of the present invention is to create source code program files which provide sufficient and consistent documentation elements in the example source code itself regarding what the example does, what functions it uses, its key parameters, and what signal connections to the DAQ device are necessary. It is also an object to allow comments in the source code to explain any special tips and techniques in that part of the source code.
Another object of the present invention is to reduce the storage space required by the installation media by providing only the files necessary to compile the source code into executable programs, but not the executables themselves.
Another object of the present invention is to maintain the example code flow in a single database file for ease of maintenance, so that the single database file could then be used to generate other types of files, such as on-line help documentation, file lists, etc.


REFERENCES:
patent: 4827404 (1989-05-01), Barstow et al.
patent: 5159687 (1992-10-01), Richburg
patent: 5187788 (1993-02-01), Marmelstein
patent: 5675801 (1997-10-01), Lindsey
patent: 6070007 (2000-05-01), Simonyi
Brazile. A System for Program Component Spcification and Code Generation. ACM. pp. 904-910, 1992.*
Castelluccia et al. Generating Efficient Protocol Code From an Abstract Specification. ACM. pp. 514-524, Aug. 1997.

LandOfFree

Say what you really think

Search LandOfFree.com for the USA inventors and patents. Rate them and share your experience with other people.

Rating

System and method for automatically creating source code... does not yet have a rating. At this time, there are no reviews or comments for this patent.

If you have personal experience with System and method for automatically creating source code..., we encourage you to share that experience with our LandOfFree.com community. Your opinion is very important and System and method for automatically creating source code... will most certainly appreciate the feedback.

Rate now

     

Profile ID: LFUS-PAI-O-2462730

  Search
All data on this website is collected from public sources. Our data reflects the most accurate information available at the time of publication.