Skip to content

SAM: A simple application model

SAM is an abstract model of q applications. Think of SAM as having an inner core and an outer layer.

The inner core of SAM consists of variables and constants interconnected by

views. All functions, and all

views expressed in terms of them are completely free of side effects. All side effects in the core are explicitly located in

views. Changes in the state of the core happen only as the result of activity in the outer layer, which in turn is restricted to the form of

variable assignments
caused by set messages from other processes (including real-time feeds)
code execution
caused by close callbacks


variable assignments


  • invalidate other variables
  • fire triggers


code execution


  • assigns variables
  • sends messages to other processes
Back to top