3.1 Moving Around

In your source buffer, enter Symex mode using the keybinding that you configured for symex-mode-interface (See Installing Symex).

Now, try moving around using these commands:

KeyCommandDescription
hsymex-move-backwardMove to the previous expression.
jsymex-move-downMove down the tree to the “parent” node. Note that this is oriented with the root being the “lowest,” and the most nested expression being the “highest.” This orientation is customizable (See Up and Down).
ksymex-move-upMove up the tree to a “child” node. Note that this is oriented with the root being the “lowest,” and the most nested expression being the “highest.” This orientation is customizable (See Up and Down).
lsymex-move-forwardMove to the next expression.

The first thing you’ll notice is Symex’s modal nature. If you’ve used Evil or Vim, then it should feel familiar. But if not, don’t worry, as Symex isn’t anything as complex as Vim. As you can already see, it uses a simple modal style — a style that we call “point-free” editing1. This style of interface is designed to be precise and efficient while also being easy to learn and use.

You may notice, as you wander the source tree, that Symex remembers branch positions, so that you can go up and down without losing context.

But you may not always want to navigate using such explicit movements. Sometimes, you just want to traverse trees forwards and backwards to find the right spot.

KeyCommandDescription
fsymex-traverse-forwardTraverse forward in the tree.
bsymex-traverse-backwardTraverse backwards in the tree.

Symex offers many such ways to get around. Next, we’ll see some ways to transform the source code.


Footnotes

(1)

The term is borrowed from functional programming, where it refers to being able to code in a very succinct way in cases where the data can be implicit. With Symex, the “implicit data” is the expression indicated by the cursor.