Let generated interpreters handle 'nothing' values. - #50
Open
StefRasing wants to merge 10 commits into
Open
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #50 +/- ##
==========================================
+ Coverage 69.11% 76.67% +7.56%
==========================================
Files 3 3
Lines 204 283 +79
==========================================
+ Hits 141 217 +76
- Misses 63 66 +3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Benchmark Results
Benchmark PlotsA plot of the benchmark results have been uploaded as an artifact to the workflow run for this PR. |
Member
|
Thoughts:
module HerbInterpret
...
struct InterpretException <: Expception end
struct InterpretResult{R} ... end
...
end
|
…s in stateful grammars; added tests; updated docstrings for core functions
Member
|
https://github.com/Herb-AI/HerbInterpret.jl/tree/bench/update-to-generated now includes examples of using the generated interpreters in the |
This interpreter works on a rule_id and list of children outputs instead of an entire program. This way a user can interpret cached results.
Member
|
Is this ready for review? |
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.
Exception throwing and catching in Julia is really really slow. A better way to handle invalid arguments or parsing is to let domain functions return a special value in stead of throwing exceptions. I choose
nothingas an exception, but we might use more informative exceptions.To correctly pass exceptions upstream, the interpreter needs to return
nothingif any child of the interpreted program producesnothing.To give a sense of the speed-up this might give; a certain SyGuS string problem was solved in ±12s using the old interpreter, but with this fix it only took ±1s. This is a huge speedup, but the string domain is exception heavy. I don't think fix will harm performance in any other way.