Dynamic Editors for Well-Typed Expressions
Autor: | Pieter Koopman, Rinus Plasmeijer, Steffen Michels |
---|---|
Rok vydání: | 2021 |
Předmět: | |
Zdroj: | Lecture Notes in Computer Science ISBN: 9783030839772 TFP |
Popis: | Interactive systems may require complex inputs. Domain experts prefer guidance in the construction of these inputs. An ideal system prevents errors and is flexible in the construction and changes of its input. The iTask system generates web-editors given any first-order algebraic data types. The generated web-editors are useful but have their limitations. It is not possible to combine type safety with overloaded operators and preventing unbounded or ill-typed identifiers is impossible. Using phantom types, generalized algebraic datatypes or functions solves the language problems, but they cannot be handled by the datatype generic system. Moreover, changing expressions can require re-entering large parts of the input. We present dynamic editors that can solve all those problems. The programmer specifies the elements of such an editor by functions. The system shows the applicable edit elements in a drop-down menu to the user. The dynamic editor is used recursively to create the arguments for the selected function. Dynamic editors are seamlessly integrated with the ordinary web-editors of the iTask system. The obtained editors guide the users to make correct and type-safe inputs. These editors can be very flexible as well without making strange abstract syntax trees. |
Databáze: | OpenAIRE |
Externí odkaz: |