<p>This is a research area that's been investigated quite heavily since the late 1970s. The keyword to Google for is "structure editor", and the great-grandparent of all modern structure editors is the <a href="http://dl.acm.org/citation.cfm?doid=358746.358755" rel="nofollow">Cornell Program Synthesizer</a>.</p>

<p>The main limitation of this kind of system is that it turns out there are many program edits which are easy to do with free text, but hard to do in a structure-respecting way. As a result, most modern IDEs use a variety of incremental parsing algorithms (see, for instance the work done as part of the <a href="http://harmonia.cs.berkeley.edu/harmonia/index.html" rel="nofollow">Harmonia project</a>) to build a parse tree from what the user types, and then repeatedly re-run static analysis on that AST. While computationally expensive, when done well this combines the benefits of both styles (and when done poorly, it combines their limitations). </p>

CC BY-SA 3.0
2014-05-30T19:37:45.930Z
2014-05-30T19:37:45.930Z
Neel Krishnaswami
<p>I would look at gupta team devleoper. It allows you to both free type code and select coding elements from a menu. The coding assistant menu shows you appliacable functions at any one time and this choice changes based on context i.e using a child table gui element the menu will show all table functions. <a href="http://www.guptatechnologies.com/Products/App_Dev/TeamDeveloper/TD-Video-TD62-Overview.aspx" rel="nofollow">http://www.guptatechnologies.com/Products/App_Dev/TeamDeveloper/TD-Video-TD62-Overview.aspx</a></p>

CC BY-SA 3.0
2014-05-30T15:33:10.393Z
2014-05-30T15:33:10.393Z
Stevie
<p>I'd like to know whether an application development environment exists that uses a menu-driven coding editor that employs a programming language state machine. This would mean that commands, variable names, etc. are not manually keyed in, but rather are selected from a menu of context-specific options, where the programming language is expressed as a state machine, and where the state is derived from the current portion of the code being edited. </p>

<p>For example, before the first line of code is entered, the user is presented with a hierarchical menu of only those commands, operators, and data objects that 1) have been previously defined by the user or predefined by the programming language (e.g., the system clock), and 2) that are applicable to the current portion of the code being edited.  Thus, if at this point the user selects an If...then command from the commands submenu, he is then presented with another menu of data objects to choose from for the 'if' conditions(s), or else he can define a new data object for the condition on the fly.  After selecting/defining a data object, he is then given the choice to have the data object evaluated as is, or else he can select one or more functions from yet another menu of functions that may be applied to the selected data object (e.g., val()), and so on until the 'If' conditions have been set to the programmer's - and the language state machine's - satisfaction.  The process is then repeated for coding the 'then' portion of the statement. </p>

<p>The idea is that the user never types any portion of the code that can be derived from the programming language and predefined data objects (although he would still name user-created objects and functions, as well as enter strings and numbers that are required by any code elements he selects).  Rather, the user selects all such code elements from ever-changing, context-sensitive menus in order to assist the programmer and reduce syntax errors.  This wound be different than IDEs that display command templates that appear as guides when the user starts to type a command.</p>

CC BY-SA 3.0
2014-05-30T10:28:24.993Z
See https://code.google.com/p/blockly/ (and there are tons of [visual programming languages](http://en.wikipedia.org/wiki/Visual_programming_language) out there). However your question is not research-level, so it is out of the scope of this Q&A site (see the [FAQ](http://cstheory.stackexchange.com/help/on-topic) for more information).
Marzio De Biasi
<fl.formal-languages><automata-theory><turing-machines>
Looking for menu-driven coding editor based on a programming language state machine
Dan Swirsky
# Looking for menu-driven coding editor based on a programming language state machine

(Asked by: username_0 on 2014-05-30)

I'd like to know whether an application development environment exists that uses a menu-driven coding editor that employs a programming language state machine. This would mean that commands, variable names, etc. are not manually keyed in, but rather are selected from a menu of context-specific options, where the programming language is expressed as a state machine, and where the state is derived from the current portion of the code being edited.

For example, before the first line of code is entered, the user is presented with a hierarchical menu of only those commands, operators, and data objects that 1) have been previously defined by the user or predefined by the programming language (e.g., the system clock), and 2) that are applicable to the current portion of the code being edited. Thus, if at this point the user selects an If...then command from the commands submenu, he is then presented with another menu of data objects to choose from for the 'if' conditions(s), or else he can define a new data object for the condition on the fly. After selecting/defining a data object, he is then given the choice to have the data object evaluated as is, or else he can select one or more functions from yet another menu of functions that may be applied to the selected data object (e.g., val()), and so on until the 'If' conditions have been set to the programmer's - and the language state machine's - satisfaction. The process is then repeated for coding the 'then' portion of the statement.

The idea is that the user never types any portion of the code that can be derived from the programming language and predefined data objects (although he would still name user-created objects and functions, as well as enter strings and numbers that are required by any code elements he selects). Rather, the user selects all such code elements from ever-changing, context-sensitive menus in order to assist the programmer and reduce syntax errors. This wound be different than IDEs that display command templates that appear as guides when the user starts to type a command.

**Tags:** fl.formal-languages, automata-theory, turing-machines

> **Comments:**
> **username_1**: See https://code.google.com/p/blockly/ (and there are tons of [visual programming languages](http://en.wikipedia.org/wiki/Visual_programming_language) out there). However your question is not research-level, so it is out of the scope of this Q&A site (see the [FAQ](http://cstheory.stackexchange.com/help/on-topic) for more information).  

---

## 2 answers

### Answer by username_2 on 2014-05-30. Score: 2

This is a research area that's been investigated quite heavily since the late 1970s. The keyword to Google for is "structure editor", and the great-grandparent of all modern structure editors is the [Cornell Program Synthesizer](http://dl.acm.org/citation.cfm?doid=358746.358755).

The main limitation of this kind of system is that it turns out there are many program edits which are easy to do with free text, but hard to do in a structure-respecting way. As a result, most modern IDEs use a variety of incremental parsing algorithms (see, for instance the work done as part of the [Harmonia project](http://harmonia.cs.berkeley.edu/harmonia/index.html)) to build a parse tree from what the user types, and then repeatedly re-run static analysis on that AST. While computationally expensive, when done well this combines the benefits of both styles (and when done poorly, it combines their limitations).


---

### Answer by username_3 on 2014-05-30. Score: 0

I would look at gupta team devleoper. It allows you to both free type code and select coding elements from a menu. The coding assistant menu shows you appliacable functions at any one time and this choice changes based on context i.e using a child table gui element the menu will show all table functions. <http://www.guptatechnologies.com/Products/App_Dev/TeamDeveloper/TD-Video-TD62-Overview.aspx>


---

