.. _symbolic_expressions_chapter: Symbolic Expressions ==================== Each program variable is assigned a symbolic expression that denotes the current value of the program variable as a function of any number of symbolic *input variables*. Grackle provides builtin functions for creating fresh symbolic variables, and users can build up expressions by using operations supported by Grackle. For example, consider the following code: :: x = symbolic('u', 'integer'); y = symbolic('v', 'integer'); z = x + y; z = z + y; This code first generates fresh integer variables **u** and **v** and assigns them to program variables ``x`` and ``y`` respectively. It then generates the expression **u + v** and assigns that to the program variable ``z``. Finally, it uses the generates the expression **(u + v) + v** by using the current expressions assigned to ``z`` and ``y``, and then assigns that expression to ``z``. Grackle supports a variety of mathematical values including logical predicates, integers, real numbers, and fixed-precision integers. Input variables for these types can be created using the :ref:`symbolic_fun` function. To create more complex functions, Grackle supports a variety of functions in Matlab have been implemented in Grackle and extended them to support symbolic expressions. For complete documentation about what functions have been implemented in Grackle, see :ref:`matlab_api_chapter` for the MATLAB API and :ref:`llvm_api_chapter` for the LLVM API.