Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Trace selectors #658

Open
denismerigoux opened this issue Jul 16, 2024 · 0 comments
Open

Trace selectors #658

denismerigoux opened this issue Jul 16, 2024 · 0 comments
Labels
🔧 compiler Issue concerns the compiler ✨ enhancement New feature or request

Comments

@denismerigoux
Copy link
Contributor

In order to implement #657, a method for setting break-points will be needed, but also a method to inspect the trace and look at specific events quickly and easily. This need will also appear for explaining a computation to the end-user, as discussed in https://inria.hal.science/hal-04391612.

The trace is made up of raw events parsed into a tree data structure that is effectively the call tree of the Catala computation :

type event =
| VarComputation of var_def
| FunCall of fun_call
| SubScopeCall of {
name : information;
inputs : var_def list;
body : event list;
}
and var_def = {
pos : source_position option;
name : information;
io : io_log;
value : runtime_value;
fun_calls : fun_call list option;
}
and fun_call = {
fun_name : information;
fun_inputs : var_def list;
body : event list;
output : var_def;
}

In order to explore and filter this data structure, a specification language of tree nodes and leaves selector should be implemented. This way, we can try to match "all definitions of variable x inside a scope Foo being called underneath the subscope bar of scope Baz".

@denismerigoux denismerigoux added ✨ enhancement New feature or request 🔧 compiler Issue concerns the compiler labels Jul 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🔧 compiler Issue concerns the compiler ✨ enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

1 participant