ArticleslgStudy

computer science

Cuneiform (programming language)

Cuneiform (programming language) 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 Cuneiform (programming language) rather than just read about it. In short: Cuneiform is an open-source workflow language for large-scale scientific data analysis. It is a statically typed functional programming language promoting parallel computing.

Cuneiform (programming language) — main illustration
Cuneiform (programming language) — illustration

Key takeaways

  • Cuneiform (programming language) 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 Cuneiform (programming language) to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Cuneiform (programming language) from memory before moving on to harder problems.

Reference excerpt

Cuneiform is an open-source workflow language for large-scale scientific data analysis. It is a statically typed functional programming language promoting parallel computing. It features a versatile foreign function interface allowing users to integrate software from many external programming languages. At the organizational level Cuneiform provides facilities like conditional branching and general recursion making it Turing-complete. In this, Cuneiform is the attempt to close the gap between scientific workflow systems like Taverna, KNIME, or Galaxy and large-scale data analysis programming models like MapReduce or Pig Latin while offering the generality of a functional programming language. Cuneiform is implemented in distributed Erlang. If run in distributed mode it drives a POSIX-compliant distributed file system like Gluster or Ceph (or a FUSE integration of some other file system, e.g., HDFS). Alternatively, Cuneiform scripts can be executed on top of HTCondor or Hadoop. Cuneiform is influenced by the work of Peter Kelly who proposes functional programming as a model for scientific workflow execution. In this, Cuneiform is distinct from related workflow languages based on dataflow programming like Swift.

External software integration External tools and libraries (e.g., R or Python libraries) are integrated via a foreign function interface. In this it resembles, e.g., KNIME which allows the use of external software through snippet nodes, or Taverna which offers BeanShell services for integrating Java software. By defining a task in a foreign language it is possible to use the API of an external tool or library. This way, tools can be integrated directly without the need of writing a wrapper or reimplementing the tool. Currently supported foreign programming languages are:

Foreign language support for AWK and gnuplot are planned additions.

Type system Cuneiform provides a simple, statically checked type system. While Cuneiform provides lists as compound data types it omits traditional list accessors (head and tail) to avoid the possibility of runtime errors which might arise when accessing the empty list. Instead lists are accessed in an all-or-nothing fashion by only mapping or folding over them. Additionally, Cuneiform omits (at the organizational level) arithmetics which excludes the possibility of division by zero. The omission of any partially defined operation allows to guarantee that runtime errors can arise exclusively in foreign code.

Base data types As base data types Cuneiform provides Booleans, strings, and files. Herein, files are used to exchange data in arbitrary format between foreign functions.

Records and pattern matching Cuneiform provides records (structs) as compound data types. The example below shows the definition of a variable r being a record with two fields a1 and a2, the first being a string and the second being a Boolean.

Records can be accessed either via projection or via pattern matching. The example below extracts the two fields a1 and a2 from the record r.

Lists and list processing Furthermore, Cuneiform provides lists as compound data types. The example below shows the definition of a variable xs being a file list with three elements.

Lists can be processed with the for and fold operators. Herein, the for operator can be given multiple lists to consume list element-wise (similar to for/list in Racket, mapcar in Common Lisp or zipwith in Erlang). The example below shows how to map over a single list, the result being a file list.

The example below shows how to zip two lists the result also being a file list.

Finally, lists can be aggregated by using the fold operator. The following example sums up the elements of a list.

Parallel execution Cuneiform is a purely functional language, i.e., it does not support mutable references. In the consequence, it can use subterm-independence to divide a program into parallelizable portions. The Cuneiform scheduler distributes these portions to worker nodes. In addition, Cuneiform uses a Call-by-Name evaluation strategy to compute values only if they contribute to the computation result. Finally, foreign function applications are memoized to speed up computations that contain previously derived results. For example, the following Cuneiform program allows the applications of f and g to run in parallel while h is dependent and can be started only when both f and g are finished.

let output-of-f : File = f(); let output-of-g : File = g();

h( f = output-of-f, g = output-of-g ); The following Cuneiform program creates three parallel applications of the function f by mapping f over a three-element list:

let xs : [File] = ['a.txt', 'b.txt', 'c.txt' : File];

for x <- xs do f( x = x ) : File end; Similarly, the applications of f and g are independent in the construction of the record r and can, thus, be run in parallel:

Examples A hello-world script:

This script defines a task greet in Bash which prepends "Hello " to its string argument person. The function produces a record with a single string field out. Applying greet, binding the argument person to the string "world" produces the record <out = "Hello world">. Projecting this record to its field out evaluates the string "Hello world". Command line tools can be integrated by defining a task in Bash:

In this example a task samtoolsSort is defined. It calls the tool SAMtools, consuming an input file, in BAM format, and producing a sorted output file, also in BAM format.

Release history

In April 2016, Cuneiform's implementation language switched from Java to Erlang and, in February 2018, its major distributed execution platform changed from a Hadoop to distributed Erlang. Additionally, from 2015 to 2018 HTCondor had been maintained as an alternative execution platform. Cuneiform's surface syntax was revised twice, as reflected in the major version number.

… excerpt ends here. Continue reading the full article.

Illustrations

Cuneiform (programming language) illustration
Cuneiform (programming language) illustration

Worked examples

Example 1 — a first encounter with Cuneiform (programming language)

Start with the simplest possible case. Write down what Cuneiform (programming language) 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 Cuneiform (programming language) 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 Cuneiform (programming language) 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 Cuneiform (programming language)

In research
Cuneiform (programming language) 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 Cuneiform (programming language) 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
Cuneiform (programming language) is common in secondary-school and first-year university syllabi. It links to neighbouring topics Apache Hadoop, Cross-platform free software, Functional languages, so understanding it makes those chapters shorter.
In everyday life
Look for Cuneiform (programming language) 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 “Cuneiform (programming language)” →

How to study Cuneiform (programming language) in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Cuneiform (programming language) 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 Cuneiform (programming language) out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Cuneiform (programming language) in simple terms?

Cuneiform is an open-source workflow language for large-scale scientific data analysis. It is a statically typed functional programming language promoting parallel computing.

Why does Cuneiform (programming language) 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 Cuneiform (programming language)?

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 Cuneiform (programming language).

Tags

  • Apache Hadoop
  • Cross-platform free software
  • Functional languages
  • Linux programming tools
  • Programming languages
  • Scripting languages
  • Software using the Apache license
  • Statically typed programming languages
  • Workflow languages

Keep exploring