Add support for expressing the dialogue control logic in ThingTalk#344
Draft
gcampax wants to merge 6 commits into
Draft
Add support for expressing the dialogue control logic in ThingTalk#344gcampax wants to merge 6 commits into
gcampax wants to merge 6 commits into
Conversation
Rename the modules to have more meaningful names
Refactor the compiler to convert Ast.Expression to TableOp/StreamOp without going through Ast.Table/Ast.Stream/Ast.Action, which are deprecated. The bulk of the compiler, which deals with TableOp/StreamOp, is unchanged. There are a couple small changes in ReduceOp because SortExpression takes an arbitrary sort value rather than a single field. This fixes the compilation of sort expressions (which should not return the sort key as additional field), fixed the query hints with computed output parameters, and most importantly fixes passing input parameters to user-declared functions.
These are the dialogue statements from RUSS, but implemented as language primitives, which will allow us to define their semantics in a more interesting way in the future (basically, questions will turn into slot-filling automatically)
|
This pull request fixes 3 alerts when merging 62ad879 into c35928e - view on LGTM.com fixed alerts:
|
|
This pull request fixes 3 alerts when merging 5980a67 into c35928e - view on LGTM.com fixed alerts:
|
|
This pull request fixes 3 alerts when merging 4338cc8 into 4bfc4bd - view on LGTM.com fixed alerts:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
The goal of this (draft) PR is to merge RUSS into ThingTalk and Genie proper, with the design described at https://wiki.almond.stanford.edu/en/genie/design-notes/unified-control-language
Ultimately, programmers should be able to express complex dialogue logic, with conditionals, follow-ups and calls to APIs, in a way that still supports synthesis and therefore a contextual semantic parser.
I expect small changes to the language, mostly around control commands and dialogue states, but significant changes to the compiler and the runtime interface to Genie, so I'm starting with some cleanups.