WO2004102380A2 - Method and system for storing pending changes to data - Google Patents

Method and system for storing pending changes to data Download PDF

Info

Publication number
WO2004102380A2
WO2004102380A2 PCT/US2004/012059 US2004012059W WO2004102380A2 WO 2004102380 A2 WO2004102380 A2 WO 2004102380A2 US 2004012059 W US2004012059 W US 2004012059W WO 2004102380 A2 WO2004102380 A2 WO 2004102380A2
Authority
WO
WIPO (PCT)
Prior art keywords
change
computer program
data
pending
text
Prior art date
Application number
PCT/US2004/012059
Other languages
French (fr)
Other versions
WO2004102380A3 (en
Inventor
Charles Simonyi
Original Assignee
Intentional Software Corporation
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Intentional Software Corporation filed Critical Intentional Software Corporation
Publication of WO2004102380A2 publication Critical patent/WO2004102380A2/en
Publication of WO2004102380A3 publication Critical patent/WO2004102380A3/en

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/30Creation or generation of source code
    • G06F8/33Intelligent editors
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/71Version control; Configuration management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Computer Security & Cryptography (AREA)
  • Stored Programmes (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

A method and system for storing pending changes to data having a data model is provided. In one embodiment, a pending change system receives a change (1003) that is to be made to the data. When the change is 'committed' (1004-Y), the change system determines whether the change to the data will result in changed data that is consistent with the data model. When the change system determines that the change is consistent (1006-Y), it updates the data accordingly (1007). If, however, a change is not committed (1004-N) or committed but inconsistent (1006-N), the change system stores the change in a pending change list associated with the data (1008).

Description

METHOD AND SYSTEM FOR STORING PENDING CHANGES TO DATA
TECHNICAL FIELD
[0001] The present invention relates generally to a computer method and system for generating a computer program.
BACKGROUND
[0002] Computer programs are generally written in a high-level programming language (e.g., Java or C). Compilers are then used to translate the instructions of the high-level programming language into machine instructions, which can be executed by a computer. The compilation process is generally divided into 6 phases:
1. Lexical analysis
2. Syntactic analysis
3. Semantic analysis
4. Intermediate code generation
5. Code optimization
6. Final code generation
[0003] During lexical analysis, the source code of the computer program is scanned and components or tokens of the high-level language are identified. The compiler converts the source code into a series of tokens that are processed during syntactic analysis. For example, during lexical analysis, the compiler would identify the statement cTable=1.0; as the variable (cTable), the operator(=), the constant (1.0), and a semicolon. A variable, operator, constant, and semicolon are tokens of the high-level language.
[0004] During syntactic analysis (also referred to as "parsing"), the compiler processes the tokens and generates a syntax tree to represent the program based on the syntax (also referred to as "grammar") of the programming language. A syntax tree is a tree structure in which operators are represented by non-leaf nodes and their operands are represented by child nodes. In the above example, the operator ("=") has two operands: the variable (cTable) and the constant (1.0). The term "parse tree" and "syntax tree" are used interchangeably in this description to refer to the syntax-based tree generated as a result of syntactic analysis. For example, such a tree may optionally describe the derivation of the syntactic structure of the computer program (e.g., may describe that a certain token is an identifier, which is an expression as defined by the syntax). Syntax-based trees may also be referred to as "concrete syntax trees," when the derivation of the syntactic structure is included, and as "abstract syntax trees," when the derivation is not included.
[0005] During semantic analysis, the compiler modifies the syntax tree to ensure semantic correctness. For example, if the variable (cTable) is an integer and the constant (1.0) is real, then during semantic analysis an real to integer conversion would be added to the syntax tree.
[0006] During intermediate code generation, code optimization, and final code generation, the compiler generates machine instructions to implement the program represented by the syntax tree. The machine instructions can then be executed by the computer.
[0007] To develop a computer program, a programmer typically uses a text- based editor to specify letters, numbers, and other characters that make up the source code for the computer program. The text-based editor may store these characters in the source code file using an ASCII format and delimiting each line by an end-of-line character. After the source code file is created, the programmer runs a compiler to compile the source code into the corresponding object code for the computer program. As the compiler proceeds through its lexical analysis, syntactic analysis, and semantic analysis phases using the source code as input, it may detect an error in the source code. If the programmer has specified a syntactically incorrect statement in the source code, then the compiler may stop its compilation and output an indication of the incorrect statement. For example, the syntax may specify that "==" is the "equal to" operator, but the programmer may have inadvertently used "=", which may be the "assignment" operator, where the equal to operator should have been used. Once the programmer is notified of the error, the programmer would use the text-based editor to correct the error and recompile the source code. A programmer may need to repeat this cycle of editing and compiling the source code many times until the compiler can complete the compilation of the source code.
[0008] Structured editors have been developed to assist programmers in the specifying of the source code for a computer program. In addition to performing the functions of the text editor, a structured editor may perform lexical and syntactic analysis as the source code is being entered by the programmer (referred to as "eager parsing"). A structured editor typically maintains a hierarchical representation of the source code based on the hierarchy of the programming language syntax. This hierarchical representation may be a syntax tree. As a programmer enters the characters of the source code, the structured editor may perform lexical and syntactic analysis. If the structured editor detects a lexical or syntactic error, it typically notifies the programmer and requires correction before the programmer can continue entering the source code. For example, if a programmer entered the assignment operator, rather than the equal operator, the structured editor would require the programmer to immediately correct the error.
[0009] A system has been described for generating and maintaining a computer program represented as an intentional program tree, which is a type of syntax tree. (For example, U.S. Patent No. 5,790,832 entitled "Method and System for Generating and Displaying a Computer Program" and U.S. Patent No. 6,097,888 entitled "Method and System for Reducing an Intentional Program Tree Represented by High-Level Computational Constructs," which are hereby incorporated by reference.) The system provides a mechanism for directly manipulating nodes corresponding to syntactic elements by adding, deleting, and moving the nodes within an intentional program tree. An intentional program tree is one type of "program tree." A "program tree" is a tree representation of a computer program that includes operator nodes and operand nodes. A program tree may also include inter-node references that are not tree-like in nature such as a reference from a declaration node of an identifier to the node that defines that identifier's type. An abstract syntax tree and a concrete syntax tree are examples of a program tree. Once a program tree is generated, the system performs the steps of semantic analysis, intermediate code generation, code optimization, and final code generation to effect the transformation of the computer program represented by the program tree into executable code.
[0010] That system also provides commands for selecting a portion of a program tree, for placing an insertion point in the program tree, and for selecting a type of node to insert at the insertion point. The system allows various commands to be performed relative to the currently selected portion and the current insertion point. For example, the currently selected portion can be copied or cut to a clipboard. The contents of the clipboard can then be pasted from the clipboard to the current insertion point using a paste command. Also, the system provides various commands (e.g., "Paste =") to insert new a node at the current insertion point.
[0011] The system displays the program tree to a programmer by generating a display representation of the program tree. A display representation format specifies the visual representation (e.g., textual) of each type of node that may be inserted in a program tree. The system may support display representation formats for several popular programming languages, such as C, Java, Basic, and Lisp. This permits a programmer to select, and change at any time, the display representation format that the system uses to produce a display representation of a program tree. For example, one programmer can select to view a particular program tree in a C display representation format, and another programmer can select to view the same program tree in a Lisp display representation format. Also, one programmer can switch between a C display representation format and a Lisp display representation format for a program tree.
[0012] The system also indicates the currently selected portion of the program tree to a programmer by highlighting the corresponding display representation of the program tree. Similarly, the system indicates the current insertion point to a programmer by displaying an insertion point mark (e.g., "|" or "Λ") within the displayed representation. The system also allows the programmer to select a new current portion or re-position the insertion point based on the display representation. [0013] Structured editors allow source code to be selected and modified on a syntactic-element basis. For example, a structured editor may allow a programmer to select an identifier, the expression that contains the identifier (e.g., the identifier, binary operator, and the other operand), the statement that contains the expression, and the procedure that contains the statement. For example, given the following source code: void foo ( ) {a=b+10} a structured editor would allow the selection of the identifier "b," the selection of the expression "b+10," the selection of the statement "a=b+10," or the selection of the entire "foo" procedure. The structured editor might not allow the programmer to select only the identifier and its binary operator because that would be an incomplete syntactic element. For example, the programmer could not select only "b+."
[0014] Structured editors have not been widely adopted. This lack of adoption results primarily from the restriction that source code can only be modified on a syntactic element basis. Because a text-based editor does not have this restriction, programmers typically prefer to develop computer programs using text- based editors. Nevertheless, programmers would like to sometimes select the source code on a syntactic element basis. Therefore, it would be desirable to have a development environment that would allow the flexibility of a text-based editor while allowing the selection of source code on a syntactic element basis as provided by a structured editor.
BRIEF DESCRIPTION OF THE DRAWINGS
[0015] Figure 1 is a block diagram illustrating an inconsistent change to example source code.
[0016] Figure 2 is a block diagram illustrating an example layout of a file that contains source code and a pending change list.
[0017] Figure 3 is a diagram illustrating a program tree representation of example source code.
[0018] Figure 4 is a diagram illustrating a program tree representation of example new code. [0019] Figure 5 is a diagram illustrating a program tree of example source code along with a pending change data structure in one embodiment.
[0020] Figure 6 is a diagram illustrating a program tree of example source code along with a pending change list in another embodiment.
[0021] Figure 7 is a block diagram illustrating a modification to example source code.
[0022] Figure 8 is a diagram illustrating an example program tree with a pending change.
[0023] Figure 9 is a block diagram illustrating components of a pending change system for source code in one embodiment.
[0024] Figure 10 is a flow diagram illustrating the change source code component of the change system in one embodiment.
[0025] Figure 11 is a flow diagram illustrating a display routine associated with an assignment operator in one embodiment.
DETAILED DESCRIPTION
[0026] A method and system for storing pending changes to data having a data model is provided. As described below, the method and system may be used in a program development environment to provide advantages of both text-based editors and structured editors. In one embodiment, a pending change system receives a change that is to be made to data. When the change is "committed," the change system determines whether the change to the data will result in changed data that is consistent with or conforms to a data model. For example, if the data is source code for a computer program, then the change will be consistent with the data model (i.e., syntax of the programming language) when the change will result in source code that is a syntactically correct. When the change system determines that the change is consistent, it updates the data accordingly. If, however, a change is not committed or committed but inconsistent, the change system stores the change in a pending change data structure associated with the data. A change that has been committed and is consistent with the data model is referred to as a "recognized change" or an "accepted change." A change that has not yet been committed or that has been committed but is inconsistent is referred to as an "unrecognized change" or a "pending change." For example, if the change is to add a valid statement to source code, then before being committed the change is unrecognized and after being committed the change is recognized. If the change is to add an invalid statement, however, then the change is unrecognized whether or not it was committed. By storing pending changes in a pending change list, the change system preserves the consistency of the data, but allows the changes, albeit possibly inconsistent changes, to be tracked. When the data is later displayed, the change system can examine the pending change list and display an indication of the pending changes along with the data. So, for example, the display may list source code with the invalid statement inserted as indicated by a pending change. The change system can allow a user to correct an inconsistent change or to commit the pending change so that the change can be recognized. A pending change that is inconsistent may become consistent due to a change in the data that does not modify the pending change. For example, a statement may be invalid because it declares an identifier to have a certain type that has not yet been defined. If a statement is later added that defines that type, the pending change becomes consistent without modifying the pending change itself. In this way, the change system can ensure that the consistency of the data is maintained, while tracking pending changes that may be inconsistent so that the changes can be corrected later.
[0027] In one embodiment, the pending change system is implemented as part of a program development environment that uses techniques typically associated with structured editors and other techniques typically associated with text-based editors. Thus, the program development environment might be characterized as a lightweight-structured editor that combines advantages of structured editors (e.g., semantic element selection) and text-based editors (e.g., flexible data entry), but minimizes the disadvantages of structured editors and text- based editors. Because the pending change system allows for the storing of changes that are not syntactically correct, a programmer can indicate a change to source code that makes it syntactically incorrect and have that change saved for later display and correction, rather than being forced to correct it immediately. [0028] The pending change system can associate pending changes with the underlying data in many ways. For example, if the data is source code stored in a source code file in a non-structured manner, then the pending change list might be appended to the end of the file. As another example, if the source code is stored in a program tree, then the pending change list can be stored as a node of the program tree with a child node representing each pending change. Each pending change may specify the type of change (e.g., insertion), the portion of the data to which the change applies (e.g., insertion point), and the substance of the change (e.g., text to be inserted). When the pending change system displays the data, it can also display an indication of the pending changes. A user can select to display either the data by itself or the data as modified by the pending changes. When the data is source code, the pending change system may simply display text whose insertion is pending at its insertion point within the source code or not display portions of the source code whose deletion is pending.
[0029] The pending change system can be used in many environments other than conventional program development environments. Such environments may maintain Extensible Markup Language ("XML") documents, Universal Modeling Language ("UML") models, data stored in a database, and so on. When used in an XML environment, the change system may use an XML schema as the data model and track pending changes in an XML document. When used in the UML environment, the change system can use UML notations and semantic defined by the UML standards specification as the data model for a UML model. When used in a database environment, the change system may use the database schema and additional validation rules as the data model. As a user starts to make changes to the database, the change system may store the changes that have not yet committed or are inconsistent in a change table. The change table identifies the database tables to be changed, the type of change, the new data, and so on.
[0030] To facilitate the editing of data, the pending change system may convert data stored in a structured manner to unstructured data so that it can be changed by a user in an unstructured manner. For example, if source code is stored in a program tree, a user may select a statement to edit in an unstructured manner. The change system would generate the text corresponding to the statement and allow the user to edit the text using conventional text-based editor techniques. The change system may add an entry to the pending change list that indicates to replace the selected statement with the modified text. When the change is eventually recognized, the pending change system can update the program tree and remove the entry from the pending change list.
[0031] Figure 1 is a block diagram illustrating an inconsistent change to example source code. Block 101 illustrates the source code that is to be changed. Block 102 contains the new code that is to be inserted into the source code. The source code and new code may be stored in separate files. To effect the change, a user may select the new code and paste it into the source code. As shown in block 103, the user has selected to insert the new code before the closing parenthesis of the condition (i.e., "(a>10)") of the "if statement. The insertion of the new code at this insertion point would result in source code that is syntactically incorrect. A conventional structured editor would attempt to parse the new code as it is inserted and would require the programmer to correct the source code at that time. Using such a structured editor, the programmer could correct the source code by, for example, undoing the insertion or moving the new code to a different position. The change system, in contrast, does not require the programmer to correct the source code at that time. Rather, the change system maintains an unchanged copy of the source code, which is syntactically correct, and stores an indication of the pending change in the pending change list associated with the source code in a persistent manner. When the programmer later displays the source code, the source code along with the pending change can be displayed as shown in block 103. At that point, the change system can allow the programmer to correct the change and to commit the change.
[0032] Figure 2 is a block diagram illustrating an example layout of a file that contains source code and a pending change list. The source code file 201 contains the source code 202 stored as text and the pending change list 203. Alternatively, the source code could be stored using a program tree or some other structured means. The source code could also be stored in the source code file both as text and as a program tree. The pending change list contains the pending change that is represented by the insertion point within the source code along with the new code to be inserted. The new code can be stored as text or in some other way. For example, if new code itself was syntactically correct, then it could be stored as a program tree.
[0033] A pending change list can have multiple entries with each entry representing a different pending change. Each pending change entry contains information that describes the pending change. A pending change can be categorized as an insertion, a deletion, or a replacement. A replacement could be represented as two pending changes, that is a deletion of the source code to be modified and an insertion of the modified source code as new code. Each pending change entry may include a change type (e.g., insertion or deletion). An entry for a deletion may identify the range to be deleted, and an entry for an insertion may identify the insertion point and the data to be inserted. The pending changes can be represented in other ways. For example, an insertion could be represented by storing information at the insertion point itself (e.g., a pending change node stored within a program tree). The pending changes can also be stored in various types of data structures such as a table, a linked list, a tree, and so on.
[0034] Figure 3 is a diagram illustrating a program tree representation of example source code. The source code corresponds to the source code of Figure 1. Each non-leaf node represents an operator, and each child node represents the operands of the operator. Node 301 represents a statement aggregation operator, and nodes 302 and 307 represent operands of the statement aggregation operator. Node 302 represents the assignment operator, and nodes 303 and 304 represent its operands. Node 303 represents the variable "a," and node 304 represents the addition operator of an expression. Nodes 305 and 306 represent the operands of node 304. Node 305 represents the variable "b," and node 306 represents the variable "c." Nodes 307-321 similarly represent the operators and operands associated with the "if statement of node 307. Figure 4 is a diagram illustrating a program tree representation of example new code. The new code corresponds to the new code of Figure 1. Nodes 401-413 represent the operators and operands of the new code.
[0035] Figure 5 is a diagram illustrating a program tree of example source code along with a pending change data structure in one embodiment. The source code corresponds to the source code of Figure 3, and the change corresponds to the insertion of the new code of Figure 4. Nodes 301-321 represent the unchanged source code. Node 501 represents the pending change data structure. Node 501 may have a child node for each pending change. In this example, node 502 is the only child node because only one change is pending. Node 502 indicates that the change type is an insertion, which may be stored as an attribute of the node. Child nodes 503 and 401 are the operand nodes of the change "operator." Node 503 points to the insertion point within the source code (i.e., after node 310). Nodes 401-413 represent the new code to be inserted. Figure 6 is a diagram illustrating a program tree of example source code along with a pending change list in another embodiment. In this example, the new code is represented as text, rather than as a program tree, as indicated by node 504 and block 505, in contrast to nodes 401-413 of Figure 5.
[0036] Figure 7 is a block diagram illustrating a modification to example source code. In this example, the user has selected to modify the "if statement. The change system has converted the "if statement of the program tree into text, referred to as "liquefaction" or "unstructuring" of the structured representation. The change system then allows the user to modify the text using conventional non- structured text processing techniques. When the user has completed the modification, the change can be committed. The commitment can be signaled explicitly or implicitly. For example, the user can select a commit button to explicitly signal or select another statement to implicitly signal. In this case, since the condition portion of the "if statement is not syntactically correct, the change is stored in the pending change list. Figure 8 is a diagram illustrating an example program tree with a pending change. In this case, the unstructured text representing the modified text is stored in block 805 below the replace node 802. The source code itself contains nodes 301-321 to represent the entire unmodified source code.
[0037] Figure 9 is a block diagram illustrating components of a pending change system for source code in one embodiment. The pending change system 900 includes controller 901 , change source code component 902, parse source code component 903, display source code component 904, and source code store 905. The controller provides a user interface through which a user can create, store, and modify source code. The controller may implement traditional structured editor techniques in addition to techniques made available as a result of the pending change list. The change source code component is invoked to allow a user to change the source code and to save unrecognized changes in a pending change list. The parse source code component is invoked to perform the syntactic analysis to determine whether source code is consistent with the syntax of the programming language. The display source code component is invoked to display source code along with any pending changes. The source code store stores the source code of the computer programs. The source code store may be a conventional storage device accessed through a conventional file system.
[0038] The pending change system may be implemented on a computer that may include a central processing unit, memory, input devices (e.g., keyboard and pointing devices), output devices (e.g., display devices), and storage devices (e.g., disk drives). The memory and storage devices are computer-readable media that may contain instructions that implement the pending change system. In addition, the data structures and message structures may be stored or transmitted via a data transmission medium, such as a signal on a communications link. Various communications links may be used, such as the Internet, a local area network, a wide area network, or a point-to-point dial-up connection.
[0039] Figure 10 is a flow diagram illustrating the change source code component of the change system in one embodiment. The component displays the source code including indications of any pending changes, receives a change type command, and inputs the change. The component then determines whether the change is to be committed. If committed, then the component parses the source code with the change. If the source code with the change is syntactically correct, then the component effects the change. If the change is not syntactically correct or has not yet been committed, then the component stores the change in the pending change list associated with the source code. The component is passed a copy of the source code along with its associated pending change list. In block 1001 , the component invokes the display source code component to display the source code along with the pending changes. In decision block 1002, if the user indicates to insert text, the component continues at block 1003, else the component continues to identify the type of change and to process accordingly as indicated by the ellipsis. A user can indicate the insertion command by selecting an insertion point and starting to enter text. A user can indicate the delete command by selecting a range of text and pressing the delete key on a keyboard. In block 1003, the component receives the new code as text to be inserted at the insertion point. In decision block 1004, if the user indicates to commit the change, then the component continues at block 1005, else the component continues at block 1008. In block 1005, the component parses the changed source code. In decision block 1006, if the changed source code was successfully parsed, then the component continues at block 1007, else the component continues at block 1008. In block 1007, the component updates the source code to reflect the insertion of the new code and completes. This updating may include changing the program tree representation of the source code that is stored in the source code store. In block 1008, the component stores the change in the pending change list associated with the source code and updates the source code store as appropriate and then completes.
[0040] Figure 11 is a flow diagram illustrating a display routine associated with an assignment operator in one embodiment. Each operator type may have an associated display routine. To display the source code, the change system invokes the display routine associated with the root node of the program tree. That display routine effects the display of that node by invoking the display routines for each of its operand nodes, which in turn invokes the display routines of its operands. Each display routine may invoke a display pending change component to apply the effect of any pending changes relating to the display of the source code for that node. For example, if a pending change is to change an assignment operator to an equal to operator within the condition of an "if statement, the routine would update the generated display representation accordingly. In block 1101 , the routine invokes the display routine for the left operand of the assignment operator. In block 1102, the routine displays the effect of any pending changes relating to the position immediately before the assignment operator. For example, the routine may display text corresponding to a pending insertion. In block 1103, the routine displays the assignment operator. In block 1104, the routine displays the effect of any pending changes relating to the position immediately after the assignment operator. For example, if the assignment operator is within the range of a pending delete, then the routine may suppress the display of the assignment operator. In block 1105, the routine invokes the display routine for the right operand of the assignment operator and then returns.
[0041] Although the present invention has been described in terms of a preferred embodiment, it is not intended that the invention be limited to these embodiments. Modifications within the spirit of the invention will be apparent to those skilled in the art. For example, one skilled in the art will appreciate that changes can be specified in many different ways, such as via a keyboard, a mouse, a handwriting tablet (e.g., using gestures), voice recognition, and so on. The scope of the present invention is defined by the claims that follow.

Claims

CLAIMSI/We claim:
1. A method in a computer system for controlling the editing of a computer program, the method comprising: receiving a description of a change to be made at a designated location of the computer program; determining whether the change will result in the computer program becoming invalid; when it is determined that the change will result in the computer program becoming invalid, storing the description of the change and the designated location without changing the computer program; and when displaying the computer program, displaying an indication of the change in association with the designated location.
2. The method of claim 1 wherein the stored description is an entry in a list of pending changes for the computer program.
3. The method of claim 2 wherein the entry contains a reference to a description of the change and a reference to the designated location.
4. The method of claim 1 wherein the computer program is represented as program tree.
5. The method of claim 1 wherein the change will result in the computer program having an invalid syntax.
6. The method of claim 1 wherein the change will result in the computer program having invalid semantics.
7. The method of claim 1 wherein the displayed indication of the change is the description of the change and receiving an indication of a modification to the change so that the modified change will result in the computer program becoming valid.
8. The method of claim 1 wherein when it is determined that the modified change will result in the computer program becoming, valid, applying the modified change to the computer program.
9. The method of claim 1 wherein the description of the change and designated location is stored persistently.
10. The method of claim 1 wherein it is used with a structured editor.
11. A method in a computer system for editing a computer program, the method comprising: receiving an indication of an insertion point within the computer program; receiving from a user text to be inserted into the computer program at the insertion point; receiving from the user an indication to commit the insertion of the text into the computer program at the insertion point; and after receiving the indication to commit the insertion of the text, determining whether the text when inserted at the insertion point will result in the computer program being valid; when it is determined that the computer program will be valid, modifying the computer program to reflect insertion of the text into the computer program at the insertion point; and when it is determined that the computer program will be invalid, storing an indication of the text and of the insertion point in association with the computer program.
12. The method of claim 11 including when displaying the computer program and when the indication of the text and of the insertion point is stored in association with the computer program, displaying an indication of the text in association with the insertion point of the displayed computer program.
13. The method of claim 11 wherein the stored indication is an entry in a list of pending changes for the computer program.
14. The method of claim 11 wherein the computer program is represented as program tree.
15. The method of claim 11 wherein the insertion will result in the computer program having an invalid syntax.
16. The method of claim 11 wherein the insertion will result in the computer program having invalid semantics.
17. The method of claim 11 wherein the determining includes parsing the text.
18. The method of claim 11 wherein it is used with a structured editor.
19. A method in a computer system for tracking changes to a computer program, the method comprising: for each of a plurality of changes, receiving from a user an indication of the change to be made to the computer program; and before committing the change, storing an indication that the change is pending for the computer program.
20. The method of claim 19 including when displaying the computer program, displaying an indication of each change near the location within the computer program where the change is to be made.
21. The method of claim 19 wherein the indication is stored in a pending change data structure.
22. The method of claim 19 including, after the change is committed, determining whether the computer program after the change is made will be valid.
23. The method of claim 22 wherein the computer program is invalid when it is syntactically incorrect.
24. The method of claim 22 wherein the computer program is invalid when it is semantically incorrect.
25. The method of claim 22 including storing an indication that the change determined to be invalid is pending.
26. The method of claim 19 including: attempting to recognize the change; and when the change is recognized, editing the computer program in accordance with the change; and removing the stored indication that the change is pending for the computer program.
27. The method of claim 26 including: when the change is not recognized, maintaining the stored indication that the change is pending for the computer program.
28. The method of claim 19 wherein the change is to insert new code at an insertion point within the computer program.
29. The method of claim 28 wherein the new code is input in an unstructured manner.
30. The method of claim 19 wherein the change is to delete a portion of the computer program.
31. The method of claim 19 wherein the change is to modify a portion of the computer program.
32. The method of claim 19 wherein it is used in conjunction with a structured editor.
33. A computer-based method for changing data having a data model, the method comprising: receiving a change to make to the data; determining whether the change to the data will result in changed data that is consistent with the data model; and when it is determined that the change will result in the data not being consistent with the data model, leaving the data unchanged; and storing in association with the data an indication that the change is pending so that processing of the data can factor in the pending change and so that a modification can be made that will result in the changed data being consistent with the data model.
34. The method of claim 33 wherein the modification is made to the change.
35. The method of claim 33 wherein the modification is made to the data.
36. The method of claim 33 wherein the data model specifies a grammar.
37. The method of claim 33 wherein the data is an XML document.
38. The method of claim 37 wherein the data model is an XML schema.
39. The method of claim 33 wherein the data is stored in a database.
40. The method of claim 39 wherein the database includes a pending change table for storing pending changes.
41. The method of claim 40 wherein a pending change is a collection of table changes, where each table change identifies a table, an entry within the table, a field within the entry, and a value for the field.
42. The method of claim 40 wherein the data model is a database schema.
43. The method of claim 33 wherein the data is an UML model.
44. The method of claim 43 wherein the data model is UML notation.
45. The method of claim 43 wherein the data model is UML semantics.
46. The method of claim 33 wherein the change is indicated by a gesture.
47. The method of claim 33 wherein the data is a computer program.
48. The method of claim 47 wherein the computer program specified in a programming language with a grammar and wherein the data model is the grammar.
49. A computer-based method for changing data, the method comprising: receiving a change to make to the data; when the data as changed is to be committed, recognizing the data as changed; when the recognition is successful, modifying the data as indicated by the change; and when the recognition is not successful, storing an indication that the change is pending; and when the data as changed is not be committed, storing an indication that the change is pending.
50. The method of claim 49 wherein when displaying the data and a change is pending, displaying an indication of the change in association with the data.
51. The method of claim 49 wherein the data is a computer program.
52. The method of claim 51 wherein the recognizing includes parsing the changed computer program.
53. The method of claim 49 wherein the data is a UML model.
54. The method of claim 53 wherein the recognizing includes determining whether the UML model as changed is a valid UML model.
55. The method of claim 49 where the change is indicated by a gesture.
56. The method of claim 49 wherein the data is an XML document.
57. The method of claim 56 wherein the recognizing includes determining whether the changed XML document is consistent with a schema.
58. The method of claim 49 wherein the data is stored in a database.
59. The method of claim 58 wherein the database includes a pending change table for storing pending changes.
60. The method of claim 59 wherein the recognizing includes determining whether the pending change is consistent with a database schema.
61. A computer-based method in a structured editor for changing a computer program stored in a structured manner, the method comprising: receiving in a non-structured manner text to be inserted into the computer program; determining whether computer program with the received text inserted to would be syntactically correct; when the received text has been committed for insertion, when the computer program with the text inserted would be syntactically correct, inserting the text into the computer program; and when the computer program with the text inserted would not be syntactically correct, storing an indication that text is to be inserted into the computer program; and when the received text is not yet committed for insertion, storing an indication that text is to be inserted into the computer program.
62. The method of claim 61 wherein the determining includes performing a lexical analysis of the computer program with the text inserted.
63. The method of claim 62 whether the stored computer program includes an indication of the syntactic entities of the computer program.
64. The method of claim 61 wherein the stored computer program includes a syntax tree.
65. The method of claim 61 wherein the stored computer program includes program tree.
66. The method of claim 61 including: receiving from a user a selection of a syntactic entity of the computer program; providing text associated with the selected syntactic entity; and allowing the user to change the provided text in a non-structured manner so that the changed text can be inserted into a structured representation of the computer program.
67. The method of claim 61 wherein the computer program is stored is additionally stored in a non-structured manner.
68. A computer-readable medium containing a data structure comprising: a program tree representing a computer program, the program tree having nodes; and a pending list indicating changes to be made to the computer program represented by the program tree, a change including a reference to a node of the program tree.
PCT/US2004/012059 2003-05-09 2004-04-20 Method and system for storing pending changes to data WO2004102380A2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
US10/435,497 US7237226B2 (en) 2003-05-09 2003-05-09 Method and system for storing pending changes to data
US10/435,497 2003-05-09

Publications (2)

Publication Number Publication Date
WO2004102380A2 true WO2004102380A2 (en) 2004-11-25
WO2004102380A3 WO2004102380A3 (en) 2005-03-17

Family

ID=33416958

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/US2004/012059 WO2004102380A2 (en) 2003-05-09 2004-04-20 Method and system for storing pending changes to data

Country Status (2)

Country Link
US (1) US7237226B2 (en)
WO (1) WO2004102380A2 (en)

Families Citing this family (23)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7299450B2 (en) * 2003-06-17 2007-11-20 Microsoft Corporation Undoing changes in a software configuration management system
US7519952B2 (en) * 2003-07-28 2009-04-14 International Business Machines Corporation Detecting an integrity constraint violation in a database by analyzing database schema, application and mapping and inserting a check into the database and application
US7437712B1 (en) * 2004-01-22 2008-10-14 Sprint Communications Company L.P. Software build tool with revised code version based on description of revisions and authorizing build based on change report that has been approved
US20060048118A1 (en) * 2004-08-30 2006-03-02 International Business Machines Corporation Method and apparatus for optimizing code with artificial statements
US20060277525A1 (en) * 2005-06-06 2006-12-07 Microsoft Corporation Lexical, grammatical, and semantic inference mechanisms
US7533135B2 (en) * 2005-07-01 2009-05-12 Sap Aktiengesellschaft Methods and systems for reducing database accesses in an object-oriented system
US20070005552A1 (en) * 2005-07-01 2007-01-04 Udo Klein Methods and systems for reducing transient memory consumption in an object-oriented system
US20070266128A1 (en) * 2006-05-10 2007-11-15 Bhogal Kulvir S Method and apparatus for monitoring deployment of applications and configuration changes in a network of data processing systems
US7949949B2 (en) * 2006-11-20 2011-05-24 Intentional Software Corporation Domain transformation languages
US8312427B2 (en) * 2007-05-15 2012-11-13 International Business Machines Corporation Selecting a set of candidate code expressions from a section of program code for copying
US20110258538A1 (en) * 2010-03-31 2011-10-20 Heng Liu Capturing DOM Modifications Mediated by Decoupled Change Mechanism
US20120210298A1 (en) * 2011-02-10 2012-08-16 International Business Machines Corporation Locating changes in source code
US20130152061A1 (en) * 2011-12-12 2013-06-13 Microsoft Corporation Full fidelity parse tree for programming language processing
US9639335B2 (en) 2013-03-13 2017-05-02 Microsoft Technology Licensing, Llc. Contextual typing
US9696974B2 (en) * 2013-03-13 2017-07-04 Microsoft Technology Licensing, Llc. Graph-based model for type systems
US9652207B2 (en) 2013-03-13 2017-05-16 Microsoft Technology Licensing, Llc. Static type checking across module universes
US9563412B2 (en) 2013-03-13 2017-02-07 Microsoft Technology Licensing, Llc. Statically extensible types
US9280445B2 (en) * 2014-03-28 2016-03-08 International Business Machines Corporation Logging code generation and distribution
US20150301806A1 (en) * 2014-04-16 2015-10-22 The Mathworks, Inc. Tentative program code in an editor
US9208040B2 (en) * 2014-04-30 2015-12-08 Stmicroelectronics International N.V. Repair control logic for safe memories having redundant elements
US9678724B2 (en) 2015-05-29 2017-06-13 Intentional Software Corporation System and method for combining text editing and tree encoding for computer programs
JP6162909B2 (en) * 2015-07-31 2017-07-12 楽天株式会社 Tree structure data editing device, tree structure data editing method, and program
US11209806B2 (en) * 2017-09-13 2021-12-28 Fisher-Rosemount Systems, Inc. Assistant application for a modular control system

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5907705A (en) * 1996-10-31 1999-05-25 Sun Microsystems, Inc. Computer implemented request to integrate (RTI) system for managing change control in software release stream
US6097888A (en) * 1993-10-29 2000-08-01 Microsoft Corporation Method and system for reducing an intentional program tree represented by high-level computational constructs
US6275223B1 (en) * 1998-07-08 2001-08-14 Nortel Networks Limited Interactive on line code inspection process and tool
US20020023257A1 (en) * 1999-10-05 2002-02-21 Dietrich Charisius Methods and systems for finding specific line of source code

Family Cites Families (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2534360B2 (en) 1988-09-26 1996-09-11 インターナシヨナル・ビジネス・マシーンズ・コーポレーシヨン Connection method, node connection method, data processing method, and method of inserting node in tree
US5339433A (en) * 1992-11-19 1994-08-16 Borland International, Inc. Symbol browsing in an object-oriented development system
CA2214972C (en) 1995-02-22 2000-07-18 Agust Sverrir Egilsson Graphical environment for managing and developing applications
US5752058A (en) 1995-07-06 1998-05-12 Sun Microsystems, Inc. System and method for inter-token whitespace representation and textual editing behavior in a program editor
US5857212A (en) 1995-07-06 1999-01-05 Sun Microsystems, Inc. System and method for horizontal alignment of tokens in a structural representation program editor
US5813019A (en) 1995-07-06 1998-09-22 Sun Microsystems, Inc. Token-based computer program editor with program comment management
US5748975A (en) 1995-07-06 1998-05-05 Sun Microsystems, Inc. System and method for textual editing of structurally-represented computer programs with on-the-fly typographical display
US6314559B1 (en) * 1997-10-02 2001-11-06 Barland Software Corporation Development system with methods for assisting a user with inputting source code
US6305008B1 (en) * 1998-11-13 2001-10-16 Microsoft Corporation Automatic statement completion
US7134115B2 (en) * 2002-02-07 2006-11-07 Matsushita Electric Industrial Co., Ltd. Apparatus, method, and program for breakpoint setting

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6097888A (en) * 1993-10-29 2000-08-01 Microsoft Corporation Method and system for reducing an intentional program tree represented by high-level computational constructs
US5907705A (en) * 1996-10-31 1999-05-25 Sun Microsystems, Inc. Computer implemented request to integrate (RTI) system for managing change control in software release stream
US6275223B1 (en) * 1998-07-08 2001-08-14 Nortel Networks Limited Interactive on line code inspection process and tool
US20020023257A1 (en) * 1999-10-05 2002-02-21 Dietrich Charisius Methods and systems for finding specific line of source code

Also Published As

Publication number Publication date
WO2004102380A3 (en) 2005-03-17
US7237226B2 (en) 2007-06-26
US20040225964A1 (en) 2004-11-11

Similar Documents

Publication Publication Date Title
US7237226B2 (en) Method and system for storing pending changes to data
US10684829B2 (en) System and method for combining text editing and tree encoding for computer programs
US8429525B2 (en) Method and system for reversible design tree transformations
US7730102B2 (en) Method and system for organizing and manipulating nodes by category in a program tree
US8286132B2 (en) Comparing and merging structured documents syntactically and semantically
US5737608A (en) Per-keystroke incremental lexing using a conventional batch lexer
JP4140980B2 (en) A syntax-independent display method for computer programs that display program trees.
Ballance et al. The Pan language-based editing system
Ballance et al. The Pan language-based editing system for integrated development
Ballance et al. Grammatical abstraction and incremental syntax analysis in a language-based editor
Koskimies et al. The design of a language processor generator
Lunney et al. Syntax-directed editing
GB2420638A (en) Method of substituting code fragments in Internal Representation
Collard Meta-differencing: An infrastructure for source code difference analysis
Boshernitsan Program manipulation via interactive transformations
Ballance et al. Design of the Pan language-based editor
Recanati Success and failure of programming environments-report on the design and use of a graphic abstract syntax tree editor
Eichelberger et al. Object‐oriented processing of Java source code
Meira et al. ForMooZ: A hypertext-based environment to support object-oriented formal development
László et al. Compiler Generator for Creating MOF-compliant Source Code Models.
Marti et al. GIPSY: a generator for incremental programming systems

Legal Events

Date Code Title Description
AK Designated states

Kind code of ref document: A2

Designated state(s): AE AG AL AM AT AU AZ BA BB BG BR BW BY BZ CA CH CN CO CR CU CZ DE DK DM DZ EC EE EG ES FI GB GD GE GH GM HR HU ID IL IN IS JP KE KG KP KR KZ LC LK LR LS LT LU LV MA MD MG MK MN MW MX MZ NA NI NO NZ OM PG PH PL PT RO RU SC SD SE SG SK SL SY TJ TM TN TR TT TZ UA UG US UZ VC VN YU ZA ZM ZW

AL Designated countries for regional patents

Kind code of ref document: A2

Designated state(s): BW GH GM KE LS MW MZ SD SL SZ TZ UG ZM ZW AM AZ BY KG KZ MD RU TJ TM AT BE BG CH CY CZ DE DK EE ES FI FR GB GR HU IE IT LU MC NL PL PT RO SE SI SK TR BF BJ CF CG CI CM GA GN GQ GW ML MR NE SN TD TG

121 Ep: the epo has been informed by wipo that ep was designated in this application
122 Ep: pct application non-entry in european phase