Atom (programming language)
Encyclopedia
Atom is a domain-specific language (DSL) in Haskell
, for designing real-time
embedded software.
, Atom was created in early 2007 and released in open-source of April of the same year.
Inspired by TRS
and Bluespec, Atom compiled circuit descriptions, that were based on guarded atomic operations, or conditional term rewriting, into Verilog
netlist
s for simulation and logic synthesis
.
As a hardware compiler, Atom's primary objective was to maximize the number of operations, or rules, that can execute in a given clock cycle without violating the semantics of atomic operation.
By employing the properties of conflict-free and sequentially-composable rules, Atom reduced maximizing execution concurrency to a feedback arc set
optimization of a rule-data dependency graph. This process was similar to James Hoe's original algorithm.
When Atom's author switched careers in late 2007 from logic design to embedded software engineering, Atom was redesign from an HDL
to a domain specific language
targeting hard realtime embedded applications. As a result, Atom's compiler's primary objective changed from maximizing rule concurrency to balancing processing load and minimizing
worse case timing latency
. In September 2008, Atom was presented at CUFP,
and in April 2009, was released as open-source in its new form.
task scheduling
and generates code with deterministic execution time and memory consumption, simplifying worst case execution time
analysis for applications that require hard realtime performance. Atom's concurrency model is that of guarded atomic actions, which eliminates the need for, and the problems of using, mutex locks
.
By removing run-time task scheduling and mutex locking—two services traditionally served by an RTOS
-- Atom can eliminate the need and overhead of an RTOS
in embedded applications.
of the current state.
Haskell (programming language)
Haskell is a standardized, general-purpose purely functional programming language, with non-strict semantics and strong static typing. It is named after logician Haskell Curry. In Haskell, "a function is a first-class citizen" of the programming language. As a functional programming language, the...
, for designing real-time
Real-time computing
In computer science, real-time computing , or reactive computing, is the study of hardware and software systems that are subject to a "real-time constraint"— e.g. operational deadlines from event to system response. Real-time programs must guarantee response within strict time constraints...
embedded software.
History
Originally intended as a high level hardware description languageHardware description language
In electronics, a hardware description language or HDL is any language from a class of computer languages, specification languages, or modeling languages for formal description and design of electronic circuits, and most-commonly, digital logic...
, Atom was created in early 2007 and released in open-source of April of the same year.
Inspired by TRS
and Bluespec, Atom compiled circuit descriptions, that were based on guarded atomic operations, or conditional term rewriting, into Verilog
Verilog
In the semiconductor and electronic design industry, Verilog is a hardware description language used to model electronic systems. Verilog HDL, not to be confused with VHDL , is most commonly used in the design, verification, and implementation of digital logic chips at the register-transfer level...
netlist
Netlist
The word netlist can be used in several different contexts, but perhaps the most popular is in the field of electronic design. In this context, a "netlist" describes the connectivity of an electronic design....
s for simulation and logic synthesis
Logic synthesis
In electronics, logic synthesis is a process by which an abstract form of desired circuit behavior, typically register transfer level , is turned into a design implementation in terms of logic gates. Common examples of this process include synthesis of HDLs, including VHDL and Verilog...
.
As a hardware compiler, Atom's primary objective was to maximize the number of operations, or rules, that can execute in a given clock cycle without violating the semantics of atomic operation.
By employing the properties of conflict-free and sequentially-composable rules, Atom reduced maximizing execution concurrency to a feedback arc set
Feedback arc set
In graph theory, a directed graph may contain directed cycles, a one-way loop of edges. In some applications, such cycles are undesirable, and we wish to eliminate them and obtain a directed acyclic graph . One way to do this is simply to drop edges from the graph to break the cycles...
optimization of a rule-data dependency graph. This process was similar to James Hoe's original algorithm.
When Atom's author switched careers in late 2007 from logic design to embedded software engineering, Atom was redesign from an HDL
Hardware description language
In electronics, a hardware description language or HDL is any language from a class of computer languages, specification languages, or modeling languages for formal description and design of electronic circuits, and most-commonly, digital logic...
to a domain specific language
targeting hard realtime embedded applications. As a result, Atom's compiler's primary objective changed from maximizing rule concurrency to balancing processing load and minimizing
worse case timing latency
Worst case execution time
The worst-case execution time of a computational task is the maximum length of time the task could take to execute on a specific hardware platform...
. In September 2008, Atom was presented at CUFP,
and in April 2009, was released as open-source in its new form.
Overview
Atom is a concurrent programming language intended for embedded applications. Atom features compile-timeCompile time
In computer science, compile time refers to either the operations performed by a compiler , programming language requirements that must be met by source code for it to be successfully compiled , or properties of the program that can be reasoned about at compile time.The operations performed at...
task scheduling
Scheduling (computing)
In computer science, a scheduling is the method by which threads, processes or data flows are given access to system resources . This is usually done to load balance a system effectively or achieve a target quality of service...
and generates code with deterministic execution time and memory consumption, simplifying worst case execution time
Worst case execution time
The worst-case execution time of a computational task is the maximum length of time the task could take to execute on a specific hardware platform...
analysis for applications that require hard realtime performance. Atom's concurrency model is that of guarded atomic actions, which eliminates the need for, and the problems of using, mutex locks
Lock (computer science)
In computer science, a lock is a synchronization mechanism for enforcing limits on access to a resource in an environment where there are many threads of execution. Locks are one way of enforcing concurrency control policies.-Types:...
.
By removing run-time task scheduling and mutex locking—two services traditionally served by an RTOS
Real-time operating system
A real-time operating system is an operating system intended to serve real-time application requests.A key characteristic of a RTOS is the level of its consistency concerning the amount of time it takes to accept and complete an application's task; the variability is jitter...
-- Atom can eliminate the need and overhead of an RTOS
Real-time operating system
A real-time operating system is an operating system intended to serve real-time application requests.A key characteristic of a RTOS is the level of its consistency concerning the amount of time it takes to accept and complete an application's task; the variability is jitter...
in embedded applications.
Limitations
To provide guarantees of deterministic execution time and memory consumption, Atom places several restrictions on computation. First, Atom designs are always finite state: all variables are global and declared at compile time and dynamic memory allocation is not allowed. Second, Atom provides no function or looping constructs. Instead state variable updates are pure combinational functionsCombinational logic
In digital circuit theory, combinational logic is a type of digital logic which is implemented by boolean circuits, where the output is a pure function of the present input only. This is in contrast to sequential logic, in which the output depends not only on the present input but also on the...
of the current state.