It really depends on what precisely you're trying to say and what you want to emphasize.
The user can trace the extraction algorithm (to / until / until reaching / until it reaches) a specific node.
There's a subject-verb semantic mismatch here. The user doesn't (transitively) trace the algorithm, but rather its progress or output. Alternatively, they might run a trace on it. All of your choices are appropriate except until reaching (another semantic mismatch), and they also all convey the same general meaning of following up to a certain point and then stopping. There are a few subtle differences, though...
- To is terse and has more of a sense of finality than the others
- Until suggests a span of time or progress, and it also conveys the idea of the user's interacting with the program while it runs more strongly than to
- Until it reaches grants the algorithm more emphasis and agency
The algorithm traverses the nodes of the DOM-tree top-down (to / to reach / until to reach / until reaching / until it reaches) the highlighted node
Here there's no semantic issues, because it's correct to say the algorithm traverses nodes. Until to reach is not grammatical; you use a noun or a clause as a target of a preposition, not a bare infinitive.
I would use until, because it seems like your focus is the process - traversing - so you want to describe what happens during the time it takes to complete. However, if you want to focus on the end goal of the algorithm, then use to.
- To versus to reach - emphasis on the node itself versus emphasis on the goal of finding it
- Until reaching versus until it reaches - emphasis on the progress or traversal versus emphasis on the algorithm or its agency