Aldor

Last updated
Aldor
Paradigm Multi-paradigm: object-oriented, functional, imperative, dependent typed, logic
Designed by Richard Dimick Jenks, Barry Trager, Stephen Watt, James Davenport, Robert Sutor, Scott Morrison
Developer Thomas J. Watson Research Center
First appeared1990;34 years ago (1990)
Stable release
1.0.3
Preview release
1.1.0
Platform Axiom computer algebra system
OS Linux, Solaris, Windows
License Aldor Public 2.0, Apache 2.0
Filename extensions .al, .as
Website aldor.org
Major implementations
Axiom computer algebra system
Influenced by
A#, Pascal, Haskell

Aldor is a programming language. [1] [2] [3] It is the successor of A# as the extension language of the Axiom computer algebra system.

Contents

Aldor combines imperative, functional, and object-oriented features. It has an elaborate type system, [4] allowing types to be used as first-class values. Aldor's syntax is heavily influenced by Pascal, but it is optionally indentation-sensitive, using whitespace characters and the off-side rule, like Python. In its current implementation, it is compiled, but an interactive listener is provided.

Aldor is distributed as free and open-source software, under the Apache License 2.0.

Examples

The Hello world program looks like this:

#include"aldor"#include"aldorio"stdout<<"Hello, world!"<<newline;

Example of dependent types (from the User Guide):

#include"aldor"#include"aldorio"#pilesumlist(R:ArithmeticType,l:ListR):R==s:R:=0;forxinlrepeats:=s+xsimportfromListInteger,Integer,ListSingleFloat,SingleFloatstdout<<sumlist(Integer,[2,3,4,5])<<newlinestdout<<sumlist(SingleFloat,[2.0,2.1,2.2,2.4])<<newline

99 Bottles of Beer:

#include"aldor"#include"aldorio"importfromInteger,String;bob(n:Integer):String=={b:String:=" bottle";ifn~=1thenb:=b+"s";b+" of beer";}main():()=={n:Integer:=99;otw:String:=" on the wall";-- refrainwhilen>0repeat{stdout<<n<<bob(n)<<otw<<", "<<n<<bob(n)<<"."<<newline;stdout<<"Take one down and pass it around, ";n:=n-1;ifn>0thenstdout<<n;elsestdout<<"no more";stdout<<bob(n)<<otw<<"."<<newline;stdout<<newline;}-- last versestdout<<"No more"<<bob(n)<<otw<<", no more"<<bob(n)<<"."<<newline;stdout<<"Go to the store and buy some more, ";n:Integer:=99;stdout<<n<<bob(n)<<otw<<"."<<newline;}main();

Related Research Articles

A "Hello, World!" program is generally a simple computer program which outputs to the screen a message similar to "Hello, World!" while ignoring any user input. A small piece of code in most general-purpose programming languages, this program is used to illustrate a language's basic syntax. A "Hello, World!" program is often the first written by a student of a new programming language, but such a program can also be used as a sanity check to ensure that the computer software intended to compile or run source code is correctly installed, and that its operator understands how to use it.

<span class="mw-page-title-main">PureBasic</span>

PureBasic is a commercially distributed procedural computer programming language and integrated development environment based on BASIC and developed by Fantaisie Software for Windows, Linux, and macOS. An Amiga version is available, although it has been discontinued and some parts of it are released as open-source. The first public release of PureBasic for Windows was on 17 December 2000. It has been continually updated ever since.

<span class="mw-page-title-main">QuickBASIC</span> IDE for the BASIC programming language

Microsoft QuickBASIC is an Integrated Development Environment and compiler for the BASIC programming language that was developed by Microsoft. QuickBASIC runs mainly on DOS, though there was also a short-lived version for the classic Mac OS. It is loosely based on GW-BASIC but adds user-defined types, improved programming structures, better graphics and disk support and a compiler in addition to the interpreter. Microsoft marketed QuickBASIC as the introductory level for their BASIC Professional Development System. Microsoft marketed two other similar IDEs for C and Pascal, viz QuickC and QuickPascal.

A string literal or anonymous string is a literal for a string value in the source code of a computer program. Modern programming languages commonly use a quoted sequence of characters, formally "bracketed delimiters", as in x = "foo", where "foo" is a string literal with value foo. Methods such as escape sequences can be used to avoid the problem of delimiter collision and allow the delimiters to be embedded in a string. There are many alternate notations for specifying string literals especially in complicated cases. The exact notation depends on the programming language in question. Nevertheless, there are general guidelines that most modern programming languages follow.

x86 assembly language is the name for the family of assembly languages which provide some level of backward compatibility with CPUs back to the Intel 8008 microprocessor, which was launched in April 1972. It is used to produce object code for the x86 class of processors.

<span class="mw-page-title-main">F Sharp (programming language)</span> Microsoft programming language

F# is a general-purpose, strongly typed, multi-paradigm programming language that encompasses functional, imperative, and object-oriented programming methods. It is most often used as a cross-platform Common Language Infrastructure (CLI) language on .NET, but can also generate JavaScript and graphics processing unit (GPU) code.

<span class="mw-page-title-main">C syntax</span> Set of rules defining correctly structured programs

The syntax of the C programming language is the set of rules governing writing of software in C. It is designed to allow for programs that are extremely terse, have a close relationship with the resulting object code, and yet provide relatively high-level data abstraction. C was the first widely successful high-level language for portable operating-system development.

In mathematics and in computer programming, a variadic function is a function of indefinite arity, i.e., one which accepts a variable number of arguments. Support for variadic functions differs widely among programming languages.

Fjölnir is a programming language developed by professor Snorri Agnarsson of computer science at Háskóli Íslands that was mostly used in the 1980s. The source files usually have the extension fjo or sma.

String functions are used in computer programming languages to manipulate a string or query information about a string.

<span class="mw-page-title-main">Python syntax and semantics</span> Set of rules defining correctly structured programs

The syntax of the Python programming language is the set of rules that defines how a Python program will be written and interpreted. The Python language has many similarities to Perl, C, and Java. However, there are some definite differences between the languages. It supports multiple programming paradigms, including structured, object-oriented programming, and functional programming, and boasts a dynamic type system and automatic memory management.

Haxe is a high-level cross-platform programming language and compiler that can produce applications and source code for many different computing platforms from one code-base. It is free and open-source software, released under the MIT License. The compiler, written in OCaml, is released under the GNU General Public License (GPL) version 2.

The Mouse programming language is a small computer programming language developed by Dr. Peter Grogono in the late 1970s and early 1980s. It was developed as an extension of an earlier language called MUSYS, which was used to control digital and analog devices in an electronic music studio.

This article compares a large number of programming languages by tabulating their data types, their expression, statement, and declaration syntax, and some common operating-system interfaces.

In computer science, manifest typing is explicit identification by the software programmer of the type of each variable being declared. For example: if variable X is going to store integers then its type must be declared as integer. The term "manifest typing" is often used with the term latent typing to describe the difference between the static, compile-time type membership of the object and its run-time type identity.

This article describes the features in the programming language Haskell.

Nemerle is a general-purpose, high-level, statically typed programming language designed for platforms using the Common Language Infrastructure (.NET/Mono). It offers functional, object-oriented, aspect-oriented, reflective and imperative features. It has a simple C#-like syntax and a powerful metaprogramming system.

Racket has been under active development as a vehicle for programming language research since the mid-1990s, and has accumulated many features over the years. This article describes and demonstrates some of these features. Note that one of Racket's main design goals is to accommodate creating new programming languages, both domain-specific languages and completely new languages. Therefore, some of the following examples are in different languages, but they are all implemented in Racket. Please refer to the main article for more information.

<span class="mw-page-title-main">Nim (programming language)</span> Programming language

Nim is a general-purpose, multi-paradigm, statically typed, compiled high-level systems programming language, designed and developed by a team around Andreas Rumpf. Nim is designed to be "efficient, expressive, and elegant", supporting metaprogramming, functional, message passing, procedural, and object-oriented programming styles by providing several features such as compile time code generation, algebraic data types, a foreign function interface (FFI) with C, C++, Objective-C, and JavaScript, and supporting compiling to those same languages as intermediate representations.

<span class="mw-page-title-main">Zig (programming language)</span> A general-purpose programming language, toolchain to build Zig/C/C++ code

Zig is an imperative, general-purpose, statically typed, compiled system programming language designed by Andrew Kelley. It is intended to be a successor to the C programming language, with the intention of being even smaller and simpler to program in while also offering more functionality.

References

  1. Gerdt, Vladimir P.; Koepf, Wolfram; Mayr, Ernst W.; Vorozhtsov, Evgenii V. (7 September 2010). Computer Algebra in Scientific Computing: 12th International Workshop, CASC 2010, Tsakhadzor, Armenia, September 6-12, 2010, Proceedings. Springer. ISBN   978-3-642-15274-0 . Retrieved 5 July 2023.
  2. Kirchner, Helene; Ringeissen, Christophe (30 December 2006). Frontiers of Combining Systems: Third International Workshop, FroCoS 2000 Nancy, France, March 22-24, 2000 Proceedings. Springer. ISBN   978-3-540-46421-1.
  3. Kerber, Manfred; Kohlhase, Michael (2 April 2001). Symbolic Computation and Automated Reasoning: The CALCULEMUS-2000 Symposium. CRC Press. ISBN   978-1-4398-6423-4 . Retrieved 5 July 2023.
  4. "Aldor Programming Language". Aldor.org. Retrieved 12 February 2017.