From OpenCog
Jump to: navigation, search

Atomese is the provisional name given to the concept of writing programs with atoms, that is, of defining functions and structures using FunctionLink, ExecutionOutputLink and many others: PutLink, GetLink and so on. It vaguely resembles a kind-of programming language that borrows ideas from prolog, but with types, from SQL and relational algebra, but without tables, and from functional-programming.

Atomese was originally intended to be a language for knowledge representation: that is, a way of encoding facts and hypothesis, in a machine-readable way, such that the knowledge can be manipulated, data-mined, reasoned with.

However, with increasing sophistication and usage, it was found to be convenient to add programming-language-like features to the knowledge-representation system. One motivation for Atomese was the need to implement procedural scripting and behavior trees within OpenCog -- that is, to define algorithmic snippets that could "do things" in the real world, such as turn robot motors and the like.

Atomese is not, and was never intended to be a programming language with which humans will write "code" by hand. Rather, it is a language that computer algorithms, such as term rewriting systems and rule engines, would be able to manipulate. It is a language that genetic programming systems, such as MOSES, could manipulate. It is a language designed for easy self-introspection.

As a runtime, atomese has horrible performance: it is many thousands of times slower than a native compiled language. That is OK, because atomese was not meant to be a runtime; rather, it is meant for knowledge representation and self-introspection.

Despite this orientation away from human programmers, some exploratory work is being done on allowing human programmers to create Atomese more simply and elegantly. One idea is to syntactically sugar the Scheme or python shells for making Atomese more concise and transparent when coded in those languages. Another idea is to do something more radical, such as making an Agda Atomese, exploiting dependent type theory (Atomese has a relatively rich type system).

See also