herbie-fp / odyssey

A platform for exploring floating-point expressions :boat:
https://herbie-fp.github.io/odyssey/
MIT License
16 stars 0 forks source link

Map error explanations to AST #102

Open elmisback opened 3 weeks ago

elmisback commented 3 weeks ago

@parthrdesai If we assume you'll have an object mapping paths to explanations, you'll have enough to create some mock data and attach explanations to the error tree for next Monday. Then you can have the different explanations show as the user hovers over local error nodes.

elmisback commented 2 weeks ago

From Bhargav:

a location is an array of numbers, which indexes into the child subexpression. for example in (x + 1) - x, the location of (x + 1) is [1] and the location of x is [1, 1]

(said this is 1-indexed in response to my question)

So ideally, each explanations row, will have a new column this will contain the location which is an array of numbers Now error explanations removes common sub-expressions before doing anything. Regenerating all possible locations is apparently possible, and we can look into doing that

parthrdesai commented 2 weeks ago

I have started working on creating a mock data, still do not have anything up on UI. But most probably will be available for Monday demo.

parthrdesai commented 1 week ago

Have integrated comparing mock data of error location with the location of whole expression and once the location match we change the color of node to red. Next task are to get the accurate location data from explanations endpoint and display the error explanations accordingly.

parthrdesai commented 1 week ago

There's a small bug in assigning expression id to error explanation because when there are more than one expression error explanations are swap between expression that sets the explanation at the wrong expression. Making this 1st Priority to Fix

parthrdesai commented 1 week ago

The bug of expression id not correctly assigning to error explanation is fixed and created PR which updates the error explanation with node graph highlighting error node.