Skip to content

Add support for expressing the dialogue control logic in ThingTalk#344

Draft
gcampax wants to merge 6 commits into
masterfrom
wip/new-dialogue-language
Draft

Add support for expressing the dialogue control logic in ThingTalk#344
gcampax wants to merge 6 commits into
masterfrom
wip/new-dialogue-language

Conversation

@gcampax

@gcampax gcampax commented May 3, 2021

Copy link
Copy Markdown
Contributor

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.

gcampax added 4 commits May 2, 2021 10:23
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)
@gcampax gcampax added enhancement cleanup Clean ups, refactorings, and code improvements that don't fall under other categories labels May 3, 2021
@gcampax gcampax marked this pull request as draft May 3, 2021 03:36
@lgtm-com

lgtm-com Bot commented May 3, 2021

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging 62ad879 into c35928e - view on LGTM.com

fixed alerts:

  • 3 for Useless assignment to property

@lgtm-com

lgtm-com Bot commented May 3, 2021

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging 5980a67 into c35928e - view on LGTM.com

fixed alerts:

  • 3 for Useless assignment to property

@lgtm-com

lgtm-com Bot commented May 4, 2021

Copy link
Copy Markdown

This pull request fixes 3 alerts when merging 4338cc8 into 4bfc4bd - view on LGTM.com

fixed alerts:

  • 3 for Useless assignment to property

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cleanup Clean ups, refactorings, and code improvements that don't fall under other categories enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant