Skip to content

Adds callback support to Klee's Lua input - #1962

Open
kennyweiss wants to merge 52 commits into
developfrom
feature/kweiss/klee-lua-callbacks
Open

Adds callback support to Klee's Lua input#1962
kennyweiss wants to merge 52 commits into
developfrom
feature/kweiss/klee-lua-callbacks

Conversation

@kennyweiss

@kennyweiss kennyweiss commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • This feature PR adds callback support to Klee's Lua input
  • It also adds the ability to pass a separate initialization context (a Lua table) into Klee (Lua only)
    • This allows users to provide their own variables/functions to override information in the Lua input
    • E.g. the Klee input might have dimension-specific logic, and this initialization context allows then to set the dimension
  • The callback support allows fields to support function alternatives via the new inlet addFunctionAsValueAlternative()
  • Docs: https://axom.readthedocs.io/en/feature-kweiss-klee-lua-callbacks/

TODO

  • Update RELEASE-NOTES

@BradWhitlock BradWhitlock left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

kennyweiss and others added 16 commits August 27, 2026 18:22
Converted some SLIC_ERROR() calls to throwing exceptions so we can provide better error handling.
…deck

Users can pass in a lua table containing variables and functions.
Adds inlet::KleeReader::shouldTreatFunctionAsNotFound() as a way to override default behavior.
This defaults to false, but is overriden by klee to allow functions for scalars/maps.
Specifically, the variables can be modified within the deck.
* Removed scalar->vector coersion. Need to return a table with one entry rather than a scalar
* Stop storing name for operators. They were not used
* Removed unreachable duplicate export extraction
Bindings operate in isolated environment so they don't inherit or affect the global state.
This avoids extra calls for variables vs. tabular Lua input.
We have to explicitly register which paths can contain callbacks with inlet.
kennyweiss and others added 29 commits August 27, 2026 18:23
* Tags function alternatives as internal Sidre groups so restart reconstruction
  doesn't expose callback storage as ordinary fields
* Reject multiple callback alternatives for the same input path and documents this
… first

We previously overcomplicated the solution to allow order independence, which does not seem necessary.
The simplified approach allows us to treat the result as an ordinary function.
Only support a Lua table as input, not a ket/value map.
… callback evaluation

And documents when we use SLIC_ERROR/SLIC_WARNING vs. validation checks vs. throwing.
And adds a minor missing one.
@kennyweiss
kennyweiss force-pushed the feature/kweiss/klee-lua-callbacks branch from 353e98e to b3663e1 Compare August 28, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Inlet Klee Related to the Klee component

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants