ArticleslgStudy

computer science

SequenceL

SequenceL is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand SequenceL rather than just read about it. In short: SequenceL is a general purpose functional programming language and auto-parallelizing (parallel computing) compiler and tool set, which main design objectives are performance on multi-core processor hardware, ease of programming, platform portability/optimization, and code clarity and readability. Its main advantage is that it can be used to write straightforward code that automatically exploits fully all processing…

Key takeaways

  • SequenceL belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect SequenceL to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of SequenceL from memory before moving on to harder problems.

Reference excerpt

SequenceL is a general purpose functional programming language and auto-parallelizing (parallel computing) compiler and tool set, which main design objectives are performance on multi-core processor hardware, ease of programming, platform portability/optimization, and code clarity and readability. Its main advantage is that it can be used to write straightforward code that automatically exploits fully all processing power available, without programmers needing to identify parallelisms, specify vectorization, avoid race conditions, and other challenges of manual directive-based programming methods such as OpenMP. Programs written in SequenceL can be compiled to multithreaded code that runs in parallel, with no explicit indications from a programmer of how or what to parallelize. As of 2015, versions of the SequenceL compiler generate parallel code as an intermediate representation in C++ or OpenCL, which allows it to work with most popular programming languages, including C, C++, C#, Fortran, Java, and Python. A platform-specific runtime manages the threads safely, automatically providing parallel performance according to the number of cores available. Supported instruction set architectures include ARM, x86, and POWER8.

History SequenceL was initially developed over a 20-year period starting in 1989, mostly at Texas Tech University. Primary funding was from NASA, which originally wanted to develop a specification language which was "self-verifying"; that is, once written, the requirements could be executed, and the results verified against the desired outcome. The principal researcher on the project was initially Daniel Cooke, who was soon joined by Nelson Rushton (another Texas Tech professor) and later Brad Nemanich (then a PhD student under Cooke). The goal of creating a language that was simple enough to be readable, but unambiguous enough to be executable, drove the inventors to settle on a functional, declarative language approach, where a programmer describes desired results, rather than the means to achieve them. The language is then free to solve the problem in the most efficient manner that it can find. As the language evolved, the researchers developed new computing approaches, including consume-simplify-produce (CSP). In 1998, research began to apply SequenceL to parallel computing. This culminated in 2004 when it took its more complete form with the addition of the normalize-transpose (NT) semantic, which coincided with the major vendors of central processing units (CPUs) making a major shift to multi-core processors rather than continuing to increase clock speeds. NT is the semantic work-horse, being used to simplify and decompose structures, based on a dataflow-like execution strategy similar to GAMMA and NESL. The NT semantic achieves a goal similar to that of the Lämmel and Peyton-Jones' boilerplate elimination. All other features of the language are definable from these two laws - including recursion, subscripting structures, function references, and evaluation of function bodies. Though it was not the original intent, these new approaches allowed the language to parallelize a large fraction of the operations it performed, transparently to the programmer. In 2006, a prototype auto-parallelizing compiler was developed at Texas Tech University. In 2009, Texas Tech licensed the intellectual property to Texas Multicore Technologies (TMT), for follow-on commercial development. In January 2017, TMT released v3, which includes the commercial Professional Edition, and added a free Community Edition for download.

Design SequenceL is designed to be as simple as possible to learn and use, focusing on algorithmic code where it adds value, e.g., the inventors chose not to reinvent I/O since C handled that well. As a result, the full language reference for SequenceL is only 40 pages, with copious examples, and its formal grammar has around 15 production rules. SequenceL is strictly evaluated (like Lisp), statically typed with type inference (like Haskell), and uses a combination of infix and prefix operators that resemble standard, informal mathematical notation (like C, Pascal, Python, etc.). It is a purely declarative language, meaning that a programmer defines functions, in the mathematical sense, without giving instructions for their implementation. For example, the mathematical definition of matrix multiplication is this:

The product of the m×p matrix A with the p×n matrix B is the m×n matrix whose (i,j)'th entry is ∑k=1pA(i,k)B(k,j) The SequenceL definition mirrors that definition more or less exactly:

matmul(A(2), B(2)) [i,j] := let k := 1...size(B); in sum( A[i,k] * B[k,j] );

The subscripts following each parameter A and B on the left hand side of the definition indicate that A and B are depth-2 structures (i.e., lists of lists of scalars), which are here thought of as matrices. From this formal definition, SequenceL infers the dimensions of the defined product from the formula for its (i, j)'th entry (as the set of pairs (i, j) for which the right hand side is defined) and computes each entry by the same formula as in the informal definition above. Notice there are no explicit instructions for iteration in this definition, or for the order in which operations are to be carried out. Because of this, the SequenceL compiler can perform operations in any order (including parallel order) which satisfies the defining equation. In this example, computing of coordinates in the product will be parallelized in a way that, for large matrices, scales linearly with the number of processors. As above, SequenceL has no built-in constructs for input/output (I/O) since it was designed to work in an additive manner with other programming languages. The decision to compile to multithreaded C++ and support the 20+ Simplified Wrapper and Interface Generator (SWIG) languages (C, C++, C#, Java, Python, etc.) means it easily fits into extant design flows, training, and tools. It can be used to enhance extant applications, create multicore libraries, and even create standalone applications by linking the resulting code with other code which performs I/O tasks. SequenceL functions can also be queried from an interpreter with given inputs, like Python and other interpreted languages.

… excerpt ends here. Continue reading the full article.

Worked examples

Example 1 — a first encounter with SequenceL

Start with the simplest possible case. Write down what SequenceL claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to SequenceL before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about SequenceL ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of SequenceL

In research
SequenceL appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses SequenceL in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
SequenceL is common in secondary-school and first-year university syllabi. It links to neighbouring topics Array programming languages, Concurrent programming languages, Cross-platform software, so understanding it makes those chapters shorter.
In everyday life
Look for SequenceL outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “SequenceL” →

How to study SequenceL in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what SequenceL means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain SequenceL out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is SequenceL in simple terms?

SequenceL is a general purpose functional programming language and auto-parallelizing (parallel computing) compiler and tool set, which main design objectives are performance on multi-core processor hardware, ease of programming, platform portability/optimization, and code clarity and readability…

Why does SequenceL matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study SequenceL?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on SequenceL.

Tags

  • Array programming languages
  • Concurrent programming languages
  • Cross-platform software
  • Declarative programming languages
  • Functional languages
  • Functional programming
  • GPGPU
  • Heterogeneous computing
  • High-level programming languages
  • Mathematical software
  • Numerical analysis software for Linux
  • Numerical analysis software for Windows

Keep exploring