stanford-oval / sempre

OBSOLETE. The Old Almond parser
Other
0 stars 1 forks source link

Remove the distinction between Value and Formula #23

Closed gcampax closed 6 years ago

gcampax commented 8 years ago

This is part of a larger refactoring that will essentially gut out SEMPRE in its original form, but we should do it before we adventure into more program synthesis.

Right now we use Value and Formula more or less interchangeably, because we don't have any "execution" step until much later in the client. This causes some mild annoyances like having to run with "FloatingParser.executeAllDerivations", but also and more importantly renders the code in ApplyFn / AddOperatorFn / AddValueFn / AddCompositionFn completely unreadable, as the functions try to deal with Formulas so that subsequent CallFormulas don't explode, but they really want to manipulate thingtalk specific types, and those are Values.

My proposal is to simply remove everything that deals with Formulas, at all.

Downsides of this (besides diverging from sempre upstream) is that we lose some work that might be useful when implementing database questions. I say might because last time I had in fact implemented database questions using the sempre code it was a mess that was hard to integrate with the rest of thingtalk. And honestly i feel like we care more about ifttt program synthesis that db questions...

gcampax commented 8 years ago

See branch wip/kill-formulas, which actually turned out to be a "gut SEMPRE of everything we don't need" kind of refactoring. 24k lines gone!

gcampax commented 6 years ago

SEMPRE is obsolete.