WebCtrl for interactive tutorials #3668
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
User Story
With the chapter "Using KeY" and the FM tutorial, we got two introductory chapters into KeY. Both are written PDF files, and therefore not so interesting or catchy.
For a web, interactive tutorials should be a way to go, but KeY is not a web application. To interact from a website (or a text editor) to KeY, we need a way of remotely controlling it.
Intended Change
This PR an UI extension to start/stop a local integrated webserver which allows (for now) to start a specified example in KeY.
For example, a tutorial can say "Please load 'Binary Search'" and providing the URL
http://localhost:8000/openExample?name=Binary Search. Opening this URL opens the example in KeY.This is just a small investigation of this problem.
Relation to JsonRPC
This is very close to the key api written #3303.
Differences are:
This allows control over the
MainWindow. Actions and manipulations target the UI. The Rest API is for externalizing the functionality.For example, when open an example with the RestAPI, you get a handle for a KeY environment. WebCtrl, the example will be open in the
MainWindow.Functionality would also include things like:
MainWindowIt comes with an
HTTPServerso it can be easily called from a web browser.A combination with RestAPI is possible.
Plan
Type of pull request
Ensuring quality
.github/workflows/tests.ymlAdditional information and contact(s)
The contributions within this pull request are licensed under GPLv2 (only) for inclusion in KeY.