For a better understanding of the present invention, and to show more clearly how it may be carried into effect, reference will now be made, by way of example, to the accompanying drawings, which illustrate aspects of embodiments of the present invention and in which:
a is another code listing of a function representation defined declaratively;
b is a declarative code listing after having run a configurer which permits additional narrowing of definition;
a is a dialogue permitting entry of information including the identity for a function representation named “UpperCaseFirstLetter” to be added to the set of function representations available for use when using the visual editor shown in
b is a dialogue permitting entry of information relating to input data and output data regarding the function representation named “UpperCaseFirstLetter”;
c is a layout showing the graphical function representation named “UpperCaseFirstLetter”;
a is a view of a dialogue for calling a visual representation of a primitive function that exists in a library of a programming language from a visual editor in accordance with an aspect of an embodiment of the present invention;
b is a code listing of a primitive function definition;
c is a view of the dialogue shown in
Computer 100 may be implemented using any suitable computer, such as an IBM® eServer™ computer or IntelliStation® computer, which are products of International Business Machines Corporation, located in Armonk, N.Y. Although the depicted representation shows a personal computer, exemplary aspects of the present invention may be implemented in other types of data processing systems, such as laptop computers, palmtop computers, handheld computers, network computers, servers, workstations, cellular telephones and similar wireless devices, personal digital assistants and other electronic devices on which software programs may be installed. Computer 100 also preferably includes a graphical user interface (GUI) that may be implemented by means of systems software residing in computer readable media in operation within computer 100.
With reference now to
In the depicted example, local area network (LAN) adapter 212 connects to south bridge and I/O controller hub 204 and audio adapter 216, keyboard and mouse adapter 220, modem 222, read only memory (ROM) 424, universal serial bus (USB) ports and other communications ports 232, and PCI/PCIe devices 234 connect to south bridge and I/O controller hub 204 through bus 238. Hard disk drive (HDD) 226 and CD-ROM drive 230 connect to south bridge and I/O controller hub 204 through bus 240. PCI/PCIe devices may include, for example, Ethernet adapters, add-in cards, and PC cards for notebook computers. PCI uses a card bus controller, while PCIe does not. ROM 224 may be, for example, a flash binary input/output system (BIOS). Hard disk drive 226 and CD-ROM drive 230 may use, for example, an integrated drive electronics (IDE) or serial advanced technology attachment (SATA) interface. A super I/O (SIO) device 236 may be connected to south bridge and I/O controller hub 204.
A bus system may be comprised of one or more buses, such as a system bus, an I/O bus and a PCI bus. Of course the bus system may be implemented using any type of communications fabric or architecture that provides for a transfer of data between different components or devices attached to the fabric or architecture. A communications unit may include one or more devices used to transmit and receive data, such as a modem or a network adapter.
An operating system runs on processor 206 and coordinates and provides control of various components within data processing system 200 in
Instructions for the operating system, the object-oriented programming system, and applications or programs are located on storage devices, such as hard disk drive 226, and may be loaded into main memory 208 for execution by processor 206. Aspects of the present invention may be performed by processor 206 using computer implemented instructions, which may be located in a memory such as, for example, main memory 208, read only memory 224, or in one or more peripheral devices.
Those of ordinary skill in the art will appreciate that the hardware in
In some illustrative examples, data processing system 200 may be a personal digital assistant (PDA), which may be configured with flash memory to provide non-volatile memory for storing operating system files and/or user-generated data. A memory may be, for example, main memory 208 or a cache such as found in north bridge and memory controller hub 202. A processing unit may include one or more processors. The depicted examples in
Reference is made to
The graphical code representation 302 may represent a portion of a computer program, or alternatively may represent a complete computer program. The graphical code representation 302 may be translated into program code by any suitable means. For example, the translation may be performed by one or more programmers, or may alternatively be performed by translation software, or may alternatively be performed by some combination of the two. The resulting translated product may be in any suitable form. For example, the translated product may be source code in a programming language. Alternatively, for example, the translated produce may be in the form of machine code.
The graphical code representation 302 may be in the form of blocks 303, which may also be referred to as nodes 303, and data flow lines 304. The nodes 303 are graphical representations of an activity that a user wishes to occur. For example, in the exemplary graphical code representation 302, the node shown at 306 represents the determination of whether or not the value of the variable “item.id” is equal to “234FTR56”.
Referring to
The node 303 may have one or more output terminals 310 thereon, which indicates that the activity represented by the node 303 produces one or more items of output data. The term “output data” is meant to be interpreted broadly and can mean numeric values, textual data, logical values, graphical data or any other suitable type of output. The node 303 could alternatively have no output terminals 310 thereon, indicating that the activity represented by the node 303 produces no output data.
It will be understood that the number and type of input terminals 308 and output terminals 310 are not necessarily related to each other. For example, a node 303 may have one or more input terminals 308 and no output terminals 310, or one or more input terminals 308 and one or more output terminals 310. Similarly a node 303 may have no input terminals 308 and no output terminals 310 or no input terminals 308 and one or more output terminals 310.
Data flow lines 304 connect to and from input and output terminals 308 and 310 respectively and graphically represent the data flow to and from the activities represented by the nodes 303. The data flow lines 304 may appear as simple lines to and from nodes 303. In some instances, including all those shown in
The visual editor 300 may be used to combine nodes 303 and data flow lines 304 to form graphical representations of functions, which may be referred to as graphical function representations 314 (see
Referring to
The graphical function representation 314 has a name 318 and optionally has a category 320 associated therewith. In the exemplary graphical function representation 314 (
As noted above, the function represented by a graphical function representation 314 may have zero, one or more input data items associated therewith and may have zero, one or more output data items associated therewith. The function represented by the exemplary graphical function representation 314 shown in
The function represented by the graphical function representation 314 may have one or more exceptions associated therewith which control the conditions under which the function would operate. No exceptions are shown, however, for the exemplary graphical function representation 314 shown in
The function represented by the graphical function representation 314 has an implementation, which is the computer code (not shown) defining the tasks that are to be accomplished by the function.
The function represented by the graphical function representation 314 may optionally have a description associated therewith. No description is shown, however, for the function represented by the exemplary graphical function representation 314 shown in
Referring to
The visual editor 300 may be configured to permit the user to define a new function representation, such as the new function representation 326, in one or more ways. For example, the visual editor 300 may be configured to permit the user to define a new function representation declaratively. This means that the user may define the new function representation using a declarative textual format instead of a graphical format. A declarative representation of a function is a textual representation of what the user wishes the function to accomplish. It is thus similar to a graphical function representation in the sense that the user focuses on what the function accomplishes without focusing on how the function accomplishes it (i.e. without writing any source code). For example, the declarative function representation shown in
The function representation shown in
In cases where the code returns program control to the location from which the function was called, a special identifier may be used which can be replaced at runtime by code that would cause a return.
Reference is now made to
It will be understood that the declarative function representation is not source code or machine code. It is still a representation of code. At some point, some translation means is required to translate the declarative function representation into source code or machine code.
It will be further understood that the function representations 326, 330 and 332 in
The function representations 326, 330 and 332 may be copied directly into the work area 301 (
Instead of defining a new function representation declaratively, the new function representation may be defined visually, for example by using the visual program editor 300 itself. An exemplary visual or graphical function representation is shown at 334 in
As shown in
The new function representation 334 may be defined using whatever elements are available in the function representation set 324 (
The definition of the function 334 may be defined using the same visual editor 300 shown in
Once completed, the new function 334 may be saved anywhere, such as, for example, in the same folders as the set 324 (
An advantage of providing the capability of adding a function representation using the visual language itself is that the user is not required to learn a new language and new language syntax. They can define the function using the same system, e.g. the visual editor 300 (
The visual editor 300 may be configured to permit a user to convert some portion of a graphical code representation 302 into a graphical function representation 334 for storage and later use as one of the usable function set 324 (
Reference is made to
When searching through a list of available primitive functions (shown at 356 in
The user may then save the new primitive function 358 in the same folder as the existing primitive functions 356. When the user wishes to view all the primitive functions in that folder, the new function 358 can be made to appear in the list by dynamically creating the list of primitive functions available (
A variant of the mechanism permitting the use of primitive functions permits the primitive function 358 to be added to the set 324 of graphical function representations 326 as a graphical function representation 326. This permits calls to primitive functions 356 which may not exist on the computer or network in which the visual editor 300 is being used, but which will exist on the computer or server where the executable file will ultimately reside when the code is executed. Such function representation calls may be referred to as local visual snippets (see
Another variant of the mechanism for adding primitive function calls is to define the new function visually, wherein the definition is simply a primitive function call. The details of the implementation of the primitive function may be kept hidden in the primitive function since the user can define the necessary information (e.g. input data, output data), using the visual editor 300 without having to become educated on the nuances of working directly with primitive contacts. The new function representation 314 would appear in the set 324 and can be added to a graphical code representation 302 as could any other graphical function representation 314.
Calling the primitive function from the visual editor 300, and saving it among the set 324 of graphical function representations 314, facilitates access by the user, since the user does not have to look up the function in a potentially less clear list of primitive functions in a primitive function lookup. A user strategy could be to create visual calls to primitive functions for what the user considers to be commonly used or important primitive functions. It is alternatively possible for primitive functions to be added by using a declarative format, described above in relation to
Representations of local function calls permit clients of the visual editor 300 to define functions which are specifically appropriate for their use. Thus, such functions would not necessarily exist in a library of general function representations that would be distributed with the editor 300.
Permitting the use of primitive function calls to be added to the available functions permits a more experienced user to access new functions in the underlying programming language. If this is provided in combination with a mechanism for defining new function representations 326 visually as described above with respect to
The visual editor 300 may be stored as a set of instructions on any suitable type of computer usable medium, examples of which are shown at 226 and 230 in
The new function representation may be a first function representation and may be defined visually. The processor 206 (
In another aspect, a computer program product shown at 250 in
Reference is made to
At step 402, the new function representation may be defined declaratively. Alternatively, the new function representation may be defined visually. The new function representation may be a call to a primitive function in an imperative programming language. In embodiments wherein the function is a call to a primitive function, the function may be defined visually, declaratively or otherwise.
The invention can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment containing both hardware and software elements. In a preferred embodiment, the invention is implemented in software, which includes but is not limited to firmware, resident software, microcode, etc.
Furthermore, the invention can take the form of a computer program product shown at 250 in
The medium can be an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system (or apparatus or device) or a propagation medium. Examples of a computer-readable medium include a semiconductor or solid state memory, magnetic tape, a removable computer diskette, a random access memory (RAM), a read-only memory (ROM), a rigid magnetic disk and an optical disk. Current examples of optical disks include compact disk-read only memory (CD-ROM), compact disk-read/write (CD-R/W) and DVD.
A data processing system suitable for storing and/or executing program code will include at least one processor coupled directly or indirectly to memory elements through a system bus. The memory elements can include local memory employed during actual execution of the program code, bulk storage, and cache memories which provide temporary storage of at least some program code in order to reduce the number of times code must be retrieved from bulk storage during execution.
Input/output or I/O devices (including but not limited to keyboards, displays, pointing devices, etc.) can be coupled to the system either directly or through intervening I/O controllers.
Network adapters may also be coupled to the system to enable the data processing system to become coupled to other data processing systems or remote printers or storage devices through intervening private or public networks. Modems, cable modem and Ethernet cards are just a few of the currently available types of network adapters.
While the above description provides example embodiments, it will be appreciated that the present invention is susceptible to modification and change without departing from the fair meaning and scope of the accompanying claims. Accordingly, what has been described is merely illustrative of the application of embodiments of the invention. Numerous modifications and variations of the present invention are possible in light of the above teachings. It is therefore to be understood that within the scope of the appended claims, the invention may be practiced otherwise than as specifically described herein.
Copyright in this application and in any patent issuing herefrom, including without limitation copyright in all screen representations and partial screen representations, is retained by International Business Machines Corporation and/or its related companies. A limited license is granted to reproduce this application, or any patent to issue herefrom, solely in its entirety in the form in which it is published by a patent office in which it has been filed. No right or license is granted to reproduce any part of this application, or of any patent to issue herefrom, other than as a component of the entire document as published by a patent office in which it has been filed.