CLACL (programming language)
Encyclopedia
CLACL is the result of a theoretical research, still in progress, which aims to provide a formal description of the logical choices relating to the definition of organisational processes of composition
Composition (visual arts)
In the visual arts – in particular painting, graphic design, photography and sculpture – composition is the placement or arrangement of visual elements or ingredients in a work of art or a photograph, as distinct from the subject of a work...

.

The logic of "CLACL" is not based on the processing of numerical information, but on 'spatial-relational' information. They generate a logical configuration.
Then, with a tool called "Plasma" you can shape the created domain in a physical form such as music or graphics.

example of Instances and Domain

example of a Model

CLACL is an interpreted
Interpreter (computing)
In computer science, an interpreter normally means a computer program that executes, i.e. performs, instructions written in a programming language...

 language and integrated into a production environment that provides several tools to facilitate the writing of the code and its graphical representation.

The first version (00.02.00) of the language was made available on the Internet in 2000 at the site of the project. The version (00.06.00) was distributed at the 2009 Festival of Mathematics held in Rome and during which the project CLAC was presented.

The last version is 00.08.01.

Characteristics of the Language

Given this background, it is clear that the target of potential users of the language is those working within creative fields in different areas: from design
Design
Design as a noun informally refers to a plan or convention for the construction of an object or a system while “to design” refers to making this plan...

 to music
Musical composition
Musical composition can refer to an original piece of music, the structure of a musical piece, or the process of creating a new piece of music. People who practice composition are called composers.- Musical compositions :...

.
Every design work produces an organism, more or less complex and complete, in which all of its parts are in mutual relation.
To ease the description let us consider the graphic planning, that is the design and realization of a graphic pattern.
Whoever had any chance to prepare a composition, knows that every element should be in a precise relation with the others and only when all the elements will be balanced the composition can be considered done. This is a process that can be proved and verified.

Since the compositional process is guided by logical choices, the program is centred around the information science area of Artificial Intelligence
Artificial intelligence
Artificial intelligence is the intelligence of machines and the branch of computer science that aims to create it. AI textbooks define the field as "the study and design of intelligent agents" where an intelligent agent is a system that perceives its environment and takes actions that maximize its...

.
It is for this reason that the project is mentioned in the entry Computational creativity
Computational creativity
Computational creativity is a multidisciplinary endeavour that is located at the intersection of the fields of artificial intelligence, cognitive psychology, philosophy, and the arts.The goal of computational creativity is to model, simulate or replicate creativity using a computer, to...

 External links  in the Wikipedia as one of the few examples of the application of Information science
Information science
-Introduction:Information science is an interdisciplinary science primarily concerned with the analysis, collection, classification, manipulation, storage, retrieval and dissemination of information...

 to creativity
Creativity
Creativity refers to the phenomenon whereby a person creates something new that has some kind of value. What counts as "new" may be in reference to the individual creator, or to the society or domain within which the novelty occurs...

.

In view of the target of the language, the closely logic
Logic
In philosophy, Logic is the formal systematic study of the principles of valid inference and correct reasoning. Logic is used in most intellectual activities, but is studied primarily in the disciplines of philosophy, mathematics, semantics, and computer science...

-driven syntax, somewhat challenging for anyone not accustomed to working in AI
Artificial intelligence
Artificial intelligence is the intelligence of machines and the branch of computer science that aims to create it. AI textbooks define the field as "the study and design of intelligent agents" where an intelligent agent is a system that perceives its environment and takes actions that maximize its...

, was supplemented by constructs more readily usable in practice.

As an example, see the description of a cycle (loop) implemented in Prolog
Prolog
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...

 and CLACL.

With the following example in prolog
Prolog
Prolog is a general purpose logic programming language associated with artificial intelligence and computational linguistics.Prolog has its roots in first-order logic, a formal logic, and unlike many other programming languages, Prolog is declarative: the program logic is expressed in terms of...

, a loop is run that prints the loop index:

loop(X,Y) :-
!,X < Y,
print(X),
X2 is X + 1,
loop(X2,Y).

In CLACL, a the similar process, is carried out using the following code:


@PRINT("$x $y",NL)
FOR ( $x, $y ) IN II[]
{
@PRINT($x,$y,NL)
}


result:

$x $y

!a !a

!a !b

!a !c

!b !a

!b !b

!b !c

!c !a

!c !b

!c !c

as can be seen, the formalism of the cycle, which in prolog per se does not exist, in CLACL is carried out in a very similar way to the C-Language
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

.

The language adopts a combination of the declarative and procedural paradigms.
The two languages are Prolog and C-Language
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

.
The declarative aspect comes from prolog and is used in statements and in scanning the tree of alternatives (backtracking
Backtracking
Backtracking is a general algorithm for finding all solutions to some computational problem, that incrementally builds candidates to the solutions, and abandons each partial candidate c as soon as it determines that c cannot possibly be completed to a valid solution.The classic textbook example...

).
The procedural aspect is derived from C-Language
C (programming language)
C is a general-purpose computer programming language developed between 1969 and 1973 by Dennis Ritchie at the Bell Telephone Laboratories for use with the Unix operating system....

 and is highlighted in particular in the control structures of the procedural flow.

Structure of the language

The commands are listed in a script that is subjected to an interpreter that generates the result. The purpose of the carrying out of controls is to produce a logical configuration of entities and represent it in graphic form, and as such, as a product of processing, there will be a graph. The set of entities that form part of the graph is called a domain.

CLACL has three groups of statements:
  • Declarations
  • Controls
  • Commands


The declarations reflect the situations of the domain and are the most similar to Prolog.

The controls implement constructs for controlling the flow of the code with loops and expressions.

The commands require or set conditions on the domain.

As with all programming languages, CLACL implements the following key concepts:
  • Variable
  • Instruction
  • Expression
  • Control structures
  • Subprogram
  • Information structures


and additionally implements specialist concepts of the domain of the issues which address:
  • Statements
  • Tests
  • States


The entities that can be generated via the interpretation of the script are:
  • instances
  • relations
  • models
  • forms
  • figure


Instance
An instance can be seen as a geometric point in the plane but we are not interested in its position; our interest is its existence within the domain and its relationship with other entities.

Relation
A relation describes the relationship between different instances.

Model
A model allows the description of complex relations.

Form
The form describes the characteristics of a logical figure.

Figure
Figure
Figure may refer to:*A shape, drawing, or representation*Figure, wood appearance*Musical figure, distinguished from musical motif*Shaping a mirror on a reflective telescope*Noise figure, in telecommunication*Dance figure, an elementary dance pattern...

A logical figure can be seen as a geometrical figure.

Examples

Generation of an instance:

instance:a

or

!a

Generation of a relation:

relation:rl1(instance:a, instance:b)

or:

&rl1(!a, !b)

Definition of a model that represents a triangular configuration:

define model: tris(!a,!b,!c)
{
&rr(!a,!b)
&rr(!b,!c)
&rr(!c,!a)
}

Implementation of a cycle:

FOR ($a,$b) in SET[]
{
@PRINT(“Instances “,$a,“ - “,$b,NL)
}

Implementation of a condition

CASE ($x

0)
{
@PRINT(“The value of $x is zero“,NL)
}

Definition of a function:

define function: switch($a,$b,$c)
{
CASE ($a

1)
{
@PRINT($b,” - “,$c,NL)
}
CASE ($a

2)
{
@PRINT($c,” - “,$b,NL)
}
}

some operations on the set:

def INSI1[4] // definition of the set of 4 items

ST1[] = [ ST1[] + ST2[] ] // add

ST1[] = [ ST1[] - ST2[] ] // subtract

( ST1[]

ST2[] ) // equals

Example of an logic expression:

(( ST1[]

ST2[] ) AND (( ST3[]

ST2[] ) OR ( ST4[]

ST1[] )) AND pos(!a

!b))

External links

The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK