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:
Key | Command | Description |
---|---|---|
h | symex-move-backward | Move to the previous expression. |
j | symex-move-down | Move 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). |
k | symex-move-up | Move 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). |
l | symex-move-forward | Move 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.
Key | Command | Description |
---|---|---|
f | symex-traverse-forward | Traverse forward in the tree. |
b | symex-traverse-backward | Traverse backwards in the tree. |
Symex offers many such ways to get around. Next, we’ll see some ways to transform the source code.
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.