Getting Started
Sym is a tool for creating and manipulating symbolic content. By symbolic content, we mean both mathematical expressions and other symbolic content (source code is one example). Almost anything that can be represented as a tree of symbols can potentially be content in Sym. The topics in the Getting Started section of the documentation cover installing Sym and starting to use Sym.
Installing Sym
Sym includes a Windows installer. The installation requirements and info about the install destination are listed below.
Using Sym
To get started using Sym, you need to understand the basics of how documents and content are created and edited.
Documents
Every document has two main components; the document content that you create and the libraries that define the objects and functionality available in the document. Documents will nearly always have a reference to least one library. Without any libraries loaded there would be virtually no functionality available in the document.
Commands
Commands are used both to construct and manipulate expressions. Typically, single-character keystrokes are used to invoke commands. For example, the "s" keystroke normally runs the Simplify command on the highlighted expression.
Components of the Sym application
The three main components of the Sym application are the content, the tools used to edit and manage the content and the libraries that provide the objects and functionality that are used to create and edit expressions.
Content
Content windows include Document Modules, Object Modules and Unit Test Modules. With the exception of the Properties windows which are attached to modules, all of the windows in the Sym application can be dragged and docked in a variety of locations to provide a way to customize the layout of the main application window.
Tools
In addition to the content of the application there are several tools available to assist you in creating and managing the content of a document, like the Document Explorer, Object Browser and Unit Test Runner.
Libraries
There are a number of libraries that are available online that can be used with Sym documents.
Concepts
This section of the documentation covers the use of Objects, Libraries and References, Notations, Styles and Types and how each is created, edited and used in the Sym application.
Objects
An object is the basic building block of all of the symbolic content contained in a document - every term in every symbolic expression in Sym is an instance of an object. Many of the objects used in Sym have an object definition that specifies how the object looks and behaves, but it's also possible to create objects that don't have object definitions. All objects are identified by their name and object names are always defined in a specific namespace. All object definitions contain a type definition. Optionally, objects can also contain Properties, Clauses, Renderings, and a Description.
Library Locations and References
Locations are used to manage groups of libraries and documents. The purpose of locations is to make documents portable from one machine to another. To do that, locations can be online as well as on your local machine. If a document references online libraries, the required libraries will be downloaded automatically when the document is opened.
Notations and Rendering
The purpose of notations is to make it possible to easily change the way expressions are displayed. Notations are assigned to Document Modules, Unit Test Modules and Object Modules. The notation assigned determines which renderings are selected for each expression in the module.
Styles
Each notation refers to a stylesheet. Stylesheets define Styles. Styles are used in two places. First, they can be used to style text. Second, they can be used to style parts of an expression in a rendering. You can create new style and new stylesheets.
Types
Every term in every expression in a Sym document has a type assigned to it. Every object definition has a type definition as one of its components. Since type definitions can include things like type variables, Sym uses a type inferencing process to determine the explicit types assigned to each term in every expression.
The Sym Programming Language
The Sym programming language is designed first and foremost for manipulating expressions. Because it's designed to manipulate expressions, the code in the Sym language is built from Sym expressions rather than text.
Functions
A function is an object definition that includes clauses its Implementation section.
Pattern Matching - Overview
The purpose of a pattern match is to bind an expression to a variable during the execution of code. Most commonly, the expressions that become the values bound variables are the parameters passed into a function call.
Unit Testing
Unit tests provide a way to validate that code functions correctly and to detect errors that might be introduced as code is modified. A Unit Test Module contains a list of unit tests. Unit tests can be run individually, all of the tests in a unit test module can be executed at the same time, or using the Unit Test Runner, unit tests from multiple unit test modules can be run simultaneously.
The Build Process
The build process converts the clauses in object definitions into a form that can be executed. The build process also runs the type inferencing process on all of the expressions in the document, which speeds up execution of commands and unit tests. At the end of the build process, the rendering of any open modules is updated to reflect any changes to the renderings in object definitions.