World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0036346048
Reproduction Date:

Title: Seed7  
Author: World Heritage Encyclopedia
Language: English
Subject: Integer overflow, Wa-Tor, Modula-2, Pascal (programming language), Operator overloading
Publisher: World Heritage Encyclopedia


Paradigm(s) multi-paradigm, extensible, object-oriented, imperative, structured, generic, reflective
Designed by Thomas Mertes
Appeared in 2005
Stable release 2014-12-07 / December 7, 2014 (2014-12-07)
Typing discipline static, strong, safe, nominative, manifest
Major implementations open source reference implementation.
Influenced by Pascal, Modula-2, Ada, ALGOL 68, C, C++, Java
OS Cross-platform (multi-platform) (Linux, Windows, Mac OS, BSD, Unix)
License GPL, LGPL (for the runtime library)
Filename extension(s) .sd7, .s7i
Website Seed7 Homepage

Seed7 is an extensible general-purpose programming language designed by Thomas Mertes. It is syntactically similar to Pascal and Ada. In addition to many other features it provides an extension mechanism.[1] Seed7 supports the introduction of new syntax and their semantics into the language and it allows new language constructs to be defined using the Seed7 language itself.[2] E.g.: Programmers can introduce syntax and semantic of new statements as well as user defined operator symbols. The implementation of Seed7 differs very much from the implementation of languages with hard-coded syntax and semantic.


Seed7 supports, besides the imperative, object-oriented and generic paradigm, also technologies like call by name, multiple dispatch, function overloading, operator overloading, exception handling and arbitrary-precision arithmetic. Major features include:

Several programming language concepts are generalized:

The Seed7 project includes both an interpreter and a compiler. The interpreter starts programs very quickly. This supports fast program development. The Seed7 compiler uses the parser and reflection interfaces from the run-time library to generate a C program, which is subsequently compiled to machine code. Compiled Seed7 programs can have similar performance as C programs.


Seed7 has many libraries, which cover areas like containers, numeric functions, lexical analysis, file manipulation, networking (sockets, TLS/SSL, HTTP, HTTPS, FTP, etc.), graphics, pixmap and vector fonts, database access (MySQL/MariaDB, SQLite, PostgreSQL, Oracle, ODBC), CGI support, data compression, character encoding, time and date handling, XML processing, message digests and more. This lowers the need to use operating system features and third party libraries directly. Seed7 libraries contain abstraction layers for hardware, operating system and third party libraries (e.g. graphic and database libraries). In other words: No changes are necessary, when Seed7 programs are moved between different processors or operating systems.


Seed7 is based on MASTER, an extensible programming language described in the diploma and doctoral theses of Thomas Mertes.[3][4] Most of the original ideas of MASTER, such as user defined statements and operators, can be found in Seed7. A precompiler, to translate MASTER to Pascal, was proposed. But this precompiler was not implemented in the original project. In 1989, development began on an interpreter for MASTER, named HAL. In 2005, the MASTER and HAL projects were released as open source under the Seed7 project name. Since then new versions have been released every two or three weeks. As of version 2013-09-08 the Seed7 project contains more than 300000 lines of code and several hundred pages of documentation.

Extension mechanism

An extension includes two parts: a syntax definition, giving a template for the new syntactic form, and a standard Seed7 function, used to define the semantics.[1]

Syntax definition

The syntax definition uses the Seed7 Structured Syntax Description (S7SSD). A S7SSD statement like

$ syntax expr: .(). + .()  is -> 7;

specifies the syntax of the + operator. The right arrow -> describes the associativity: Binding of operands from left to right. With 7 the priority of the + operator is defined. The syntax pattern .(). + .() is introduced and delimited with dots (.). Without dots the pattern is () + () The symbol () is a nonterminal symbol and + is a terminal symbol. The S7SSD does not distinguish between different nonterminal symbols. Instead it only knows one nonterminal symbol: ().

Semantic extension

The definition of the + operator for complex numbers is just a function definition:

const func complex: (in complex: summand1) + (in complex: summand2) is func
    var complex: sum is complex.value;
  begin := +; := +;
  end func;

Further reading

  • Abrial, Jean-Raymond; Glässer, Uwe (January 20, 2010). Rigorous Methods for Software Construction and Analysis (1 ed.). Springer Berlin Heidelberg.  
"To the best of our knowledge, among all these languages only the Seed7 programming
language supports the introduction of new syntax and their semantics into the language."
"In terms of language extensibility, Seed7 goes beyond CoreASM as it allows
new language constructs to be defined using the Seed7 language itself."


  1. ^ a b Zingaro, Daniel, "Modern Extensible Languages", SQRL Report 47 McMaster University (October 2007), page 16.
  2. ^ Abrial, Jean-Raymond and Glässer, Uwe, "Rigorous Methods for Software Construction and Analysis", ISBN 978-3-642-11446-5, Springer, 2010, page 166.
  3. ^ Mertes, Thomas, "Entwurf einer erweiterbaren höheren Programmiersprache", Diploma thesis Vienna University of Technology (1984).
  4. ^ Mertes, Thomas, "Definition einer erweiterbaren höheren Programmiersprache", Doctoral thesis Vienna University of Technology (1986).

External links

  • Seed7 Homepage - Contains FAQ, manual, screenshots, examples, library descriptions and a collection of algorithms
  • Seed7 at Rosetta Code - Contains many Seed7 examples
  • Abstract of diploma thesis from Thomas Mertes in german
  • Abstract of doctoral thesis from Thomas Mertes in german
  • Doctorate thesis from Thomas Mertes in german
  • Article from Daniel Zingaro, McMaster University, Hamilton, Ontario, Canada about "Modern Extensible Languages". (alternate link) (paragraph about Seed7 at page 16)
  • Book from Abrial, Jean-Raymond and Glässer, Uwe: Rigorous Methods for Software Construction and Analysis (see Page 166)
  • The Quest for the Ultimate Cycle explores the 3n+C extension of the Collatz Conjecture with Seed7 programs
  • Blog by Remo Laubacher: Statically linked Linux executables with GCJ, Seed7 and haXe
  • A FreeBSD port / see also here, maintained by Pietro Cerutti
  • An OpenBSD port], provided by Brian Callahan
  • A Seed7 package for openSUSE/Fedora
  • A discussion where Seed7 is described as language where new syntax can actually be defined by language users
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.