Improve handling of return values#119
Merged
Merged
Conversation
Member
Author
|
This further evolved into a change to the PFFTT format, adding |
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.
Refine our handling of return values.
We add a Transcript driver to allow us to observe the values being generated during a run and the decisions being made about the results of each step. This allowed us to debug a number of gnarly deficiencies relating to how those values were assigned. This is accessed by passing
--output=nativeto the _technique run` command.If an
exec()function in a step fails that now results in aFailjudgement for the step. To facilitate that we (internally) use an outcomeOutcome::Throwto signify a failure more that needs to propagate up, distinct fromOutcome::Failwhich simply records the failure of that step and then allows the procedure to continue.During translation steps are now marked as being
computableor not, that is, if a step is pure prose then it can beDonedoes not convey a Value. On the other hand, if expressions are present then the value of the final expression does become the value of the step recorded in its result.A significant correctness arose from multiple code blocks in the paragraph body of a step. If an inline code expression spanned more than one lines, or if an expression apperaed on a second line it was not interpreted as being a part of that paragraph. This led to other confusion: the control structures do create scopes beneath them and conventionally are to be formatted onto their own lines. This branch fixes the ambiguities around that behaviour.
Finally we have resolved the significant weakness around resuming runs where values had already been entered by the user. This involved recording them in the PFFTT file under new state verb
Input.