Wednesday 29 February 2012

Standard Library (3 of 5). Metaprogramming


Metaprogramming allows the programmer to manipulate basic Libretto entities (packages, classes, functions and fields) as mutable data structures. The tools, which are outlined in this section, can affect the basic object model of the program. Since they are powerful and brutal, it is recommended to use them with great caution and only when necessary.

Standard Library (2 of 5). Multitasking

Multitasking is implemented in the Libretto standard library. The basic components of concurrent computing in Libretto are the actor model and software transactional memory based on the optimistic approach.

Saturday 25 February 2012

Friday 24 February 2012

Thursday 23 February 2012

Computing in Libretto (3 of 5). Local Variables

All variables in Libretto are local and inaccessible from the global context. The types of Libretto variables are:
  1. Block variables
  2. Path variables
  3. Parameter variables.
The range of local variables is a block or a path, in which they are defined. Similar to fields, local variables can be of two types – mutable (marked by the keyword var) and immutable (marked by fix).

Computing in Libretto (2 of 5). Expressions

In this post I describe the basic types of Libretto expressions.

Wednesday 22 February 2012

Computing in Libretto (1 of 5). Sequences and Paths

The basic feature of Libretto is that it handles single values and value collections in a uniform way. Actually Libretto works with a ‘generalized’ value, which may contain many concrete values. This mechanism is based on the concept of a linear (flat) sequence. Sequence-handling operations are the core of Libretto’s operational semantics.

Monday 20 February 2012

Basic Libretto Constructs (5 of 5). Packages

The concept of Libretto packages is still under development. In this post I show some draft ideas about them.

Basic Libretto Constructs (4 of 5). Objects

An object in Libretto is a container incapsulating attributes and behaviors (methods) of a domain entity. Objects are instances of classes, which specify their general patterns. There are two kinds of objects in Libretto: declarative and dynamic.

Sunday 19 February 2012

Basic Libretto Constructs (3 of 5). Fields

A field is a piece of data encapsulated within an object. A field can be defined either in a class constructor (and then it characterizes all instances of the class) or in an object definition (and then it is an individual characteristic of this object). Fields are part of object models used by Libretto programs.

Thursday 16 February 2012

Basic Libretto Constructs (1/5). Classes

A class is a template that determines the structure and behavior of objects of a certain type, which have common features. Such objects are called the instances of this class. The Libretto type system is based on multiple inheritance: a subclass can inherit from several superclasses.

What is Libretto?

This blog is dedicated to Libretto, a dynamic general purpose object-oriented programming language, which has been developed by our team over several years.

While being a regular programming language, Libretto is based on two novel concepts:

  • a ubiquitous (pervasive) context, and 
  • a sequence as a generalized value. 

The combination of these concepts has allowed us to make a number of important things, in particular, to get rid of the notorious null and the foreach operators. Thanks to these concepts, we also introduce a number of new constructs like external fields, and offer a collection of various assignment operators, which provide flexible data processing.

From the very beginning Libretto was designed for multiplatform application development, so hopefully it is good for cloud computing. For this, we have made a number of things. In particular, we have defined a sub-language of Libretto (called LibrettoScript), which can work on the client side (via a compiler to JavaScript). This feature is powered by special tools for HTML and XML document handling. For instance, Libretto allows the programmer to work in an XPath-like style.

Libretto has been designed as a language, which provides flexible syntax customization. Syntactic sugar and other means allow the programmer to use Libretto as a workbench for developing her/his own domain specific languages.

Syntax flexibility is a feature that makes Libretto good for model-driven development. But here is another feature for advanced model-driven development, which is introduced in the language. We have proven mathematically that object models described in Libretto have strict logic semantics as theories in a simple description logic. In other words, we can directly use declarative Libretto programs as the logical descriptions of domains. Here we see exciting perspectives for distributed knowledge processing, and combining knowledge processing techniques with regular programming.

It has also been mathematically shown that there is a mapping, which for any relational database model generates a semantically equivalent Libretto object model. Based on this idea, a sub-language of Libretto (LIbrettoDB) has been defined, and supplied with a compiler to SQL. LibrettoDB provides database management in terms of object modeling.

Thanks to the features mentioned above, Libretto offers a unified environment for the development of complicated multicomponent and multiplatform applications, for instance, cloud computing projects. Instead of using a zoo of programming languages, you can solve within Libretto all the tasks on both the server and client sides.

So, we are convinced that Libretto provides better conditions for software development, debugging and maintaining:)

We are proud that recently the Libretto Project has become a resident of the Skolkovo Innovation Centre:

------------------

In this blog I plan to provide you with a detailed overview of Libretto packed in 15 posts. I want to divide these posts into three groups – the basic Libretto constructs, computing in Lirbetto, and the Libretto standard library. Here is the contents. Its items will gradually become the links to the relevant posts: