Showing posts with label specification. Show all posts
Showing posts with label specification. Show all posts

Friday, 2 March 2012

Standard Library (5 of 5). LibrettoDB and Databases

Relational databases are interpreted in Libretto as object models, and queries to databases are interpreted as Libretto expressions. The access to a database is organized in two steps:
  1. The development of an object model for the database universe of discourse.
  2. The construction of mapping from this object model to the database.
The technology implemented in Libretto has a theoretical background published in Databases as Ontologies. Due to this method, queries to a database can be represented as regular Libretto expressions.

Thursday, 1 March 2012

Standard Library (4 of 5). XML and HTML Processing

In this post I show how Libretto handles XML and HTML documents – on both the server and client sides.

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

Computing in Libretto (4 of 5). Exception Handling

Exceptions and their handling in Libretto are considered here. Please pay your attention to local traps.

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.