This Vue.js app is a proof of concept for a detail of the prolog_trace app,
and uses the same Python backend.
It turns a formula in prefix notation into a tree structure, realized as an HTML table.
The formula in the following screenshot is the law of cosines.
(ang means angle opposite of.)
The cursor is on the c highlighted in orange. All other occurences are highlighted in yellow.
The app allows functions with different arity to have the same name, and be treated as different.
(That is motivated by the fact that Prolog allowes this.)
The following screenshot shows the result for the input "f(f, f(f), f(f, f(f)))".
Only 1-ary f is highlighted, but not the others.
This example also shows, that entered names can be replaced by custom names.
3-ary f has been renamed to "X", and 0-ary f is shown as a dot.
Custom names must not be empty, and together with the arity they must be unique.
(One could even used parentheses as custom names – which is probably not a good idea.)