# Svex

Our core expression data type. A **S**ymbolic **V**ector
**Ex**pression may be either a constant 4vec, a variable, or a function applied to subexpressions.

This is a sum-of-products (i.e., union) type, introduced by defflexsum.

##### Members

`:var` → svex-var
- A variable, which represents a 4vec.
`:quote` → svex-quote
- A ``quoted constant'' 4vec, which represents itself.
`:call` → svex-call
- A function applied to some expressions.

See expressions for background. Each svex represents a
single 4vec result. The semantics are given by svex-eval.

Our svex expressions are always created with hons for
automatic structure sharing. Most operations over these expressions should
typically be memoized in some way or another.

### Subtopics

- Svex-p
- Recognizer for svex structures.
- Svar
- A single variable in a symbolic vector expression.
- Svex-composition
- The process of composing together a netlist of svex assignments into
full update functions.
- Svex-select
- Svex-alist
- Alist binding variables (svars) to expressions svexes.
- Svex-equiv
- Basic equivalence relation for svex structures.
- Svexlist
- A list of svex-p objects.
- Svex-call
- A function applied to some expressions.
- Fnsym
- A valid function name in an svex expressions.
- Svex-quote
- A ``quoted constant'' 4vec, which represents itself.
- Svex-var
- A variable, which represents a 4vec.
- Svcall-rw
- Safely construct an svex for a function call, with rewriting.
- Svcall
- Safely construct an svex for a function call.
- Svex-kind
- Get the
*kind* (tag) of a svex structure. - Svcall*
- Safely construct an svex for a function call, with evaluation
of quotes and simplification of concatenations and right-shifts.
- Svex-fix
- Fixing function for svex structures.
- Svex-count
- Measure for recurring over svex structures.
- Svex-1z
- An svex constant for an single X bit (lsb), upper bits all 0.
- Svex-1x
- An svex constant for an single X bit (lsb), upper bits all 0.
- Svex-z
- An svex constant for an infinite-width X.
- Svex-x
- An svex constant for an infinite-width X.