The Background to Yggdrasil

Shen is a multiplatform functional programming language that is written in itself. It is fundamentally defined from a list of 46 system functions written in a microLisp called Kλ. Shen incorporates the features of a modern functional programming language, including pattern-directed data handling, partial applications and currying. It incorporates a Prolog and a compiler-compiler Shen-YACC. It inherits from Lisp the idea of programs as data and macros. It adds the power of sequent calculus to define types and for all these reasons Shen is par excellence a power tool for exploring ideas in computer science.

Between 2011 and 2018, Shen was ported to many platforms; Common Lisp (SBCL, CLisp), Wasp Lisp, Emacs Lisp, Clojure, Scheme, Python, Javascript, Ruby, Go, C, C++, and the JVM. This was an historical achievement which has not been matched in any other language community. Shen has established itself as not just a programming language, but the closest thing that computer science has produced to a universal high-level medium that transcends the boundaries between programming languages.

In order to leverage this power, it is necessary to take the next logical step, which is to create the power to turn any Shen program into an executable stand-alone application that is coded in the native code of the platform under which Shen runs. Hence it should be possible to generate an executable Python program from Shen running under Python. The trick is creating a program that extracts from the Shen kernel, just that code that is needed to make the application run.


In programming parlance, this is called a tree-shaker ; a program that traces the call tree structure of a program and eliminates all code that cannot be called from the top level. Because Shen compiles into a Lisp, Kλ, it is easy to treat this code as data and traverse the Kλ call tree to derive the needed code. This is the heart of a fundamental program which we call Yggdrasil .

Yggdrasil was the world tree which, in Viking mythology, supported the nine realms of existence. In our picture, the roots of Yggdrasil is the language Kλ which underpins Shen and the branches extend into the other programming worlds. By extracting the needed Kλ and using the existing compilers to map the Kλ to native code, we create a system in which programmers can realise their ideas in any mainstream programming medium by simply writing the Shen program and using Yggdrasil to generate the executable.

What Yggdrasil Means for Computing

Shen offers a degree of power and security found in few existing languages and no language has as many certified ports into other computer languages. A program written in Shen can be verified as type secure using the resources of mathematical logic and we can choose into what language to transpile this program. The resulting program from Yggdrasil inherits all the security and power of the Shen program. This has huge implications for the production of software in safety critical areas like flight, space research and medicine. Listen to our 6 minute video explaining Yggdrasil


Faster, smaller S31 Shen kernel released; read about the S series of kernels here.


Fourth edition of 'The Book of Shen' released; read about it here.


Bruno Deferrari wins the first Shen Open Science prize.


Yggdrasil project launched - the grand unification of programming languages.


Want to advertise on this site? Go to the contacts page.

Built by Shen Technology (c) Mark Tarver, September 2021