a programming language and
                                        a web platform

http://libretto-lang.org
The Libretto Web Platform

A

    ● single-language
    ● multi-platform

web programming environment
The Libretto Web Platform

based on the

  ●   general-purpose
  ●   high-level
  ●   dynamic
  ●   object-oriented

programming language Libretto
WHY?
Today

                 Database




                            Server




        Client
The Libretto Web Platform

                  Database




                             Server




         Client
WHO?
Target Groups

  ● cloud computing application
    development

  ● knowledge management & regular
    programming integration
HOW?
The Libretto Web Platform


[A] A multi-purpose programming language

[B] A multi-platform programming environment
[A] Libretto

a general-purpose object oriented dynamic
programming language

a single language space of Libretto
   ● on the server side
   ● on the client side
   ● with persistent storage

datatype system with logical
semantics
[A] Libretto vs Ruby


class Ninja(var name)      class Ninja
                             attr_accessor :name
fix drew = Ninja("Drew")
fix adam = Ninja("Adam")     def initialize(name)
                               @name = name
                             end
                           end

                           drew = Ninja.new("Drew")
                           adam = Ninja.new("Adam")
[A] Libretto vs Python, Haskell,
 C#
                                        "n".join(foo.description()
                                            for foo in mylist
                                               if foo.description() != "")



mylist.description?[$!=""].join("n")
                                        concat $ List.intersperse "n"
                                            $ filter (/= "")
                                                $ map description mylist




                                        string retval = "";
                                        foreach (Foo foo in mylist)
                                        {
                                            string desc = foo.description();
                                            if (desc != "")
                                            {
                                                    if (retval != "")
                                                       retval += "n";
                                                    retval += desc;
                                            }
                                        }
[A] Libretto vs JavaScript



UL?[id == "selected-plays"]   var uls = document.getElementsByTagName("UL")
  $LI. style                  var ul
    {float = "left"           for(var i = 0, l = uls.length; i < l; i++)
     listStyle = "none"          if (uls[i].id === "selected-plays") {
     margin = "10px"}                ul = uls[i]; break
                                 }
                              var style
                              for(var n = ul.firstChild; n != null;
                                                          n = n.nextSibling)
                                 if (n.nodeName === "LI") {
                                     style = n.style
                                     style.float = "left"
                                     style.listStyle = "none"
                                     style.margin = "10px"
                                 }
[A] Libretto vs JQuery

                                                           JQuery



window {onload =                                           $(document).ready(function(){
  %{DIV ?[id == "switcher-normal"] {onclick =                $("#switcher-normal").bind('click', function(){
         %{BODY {class ?["large" or "narrow"]--}}            $('body').removeClass("large").removeClass("narrow");
    }                                                      });
    DIV?[id == "switcher-narrow"] {onclick =
        %{BODY {class ?["large"]--; class += "narrow"}}    $("#switcher-narrow").bind('click', function(){
                                                             $('body').removeClass("large").addClass("narrow");
    }
                                                           });
    DIV?[id == "switcher-large"] {onclick =
        %{BODY {class ?["narrow"]--; class += "large"}}    $("#switcher-large").bind('click', function(){
    }                                                        $('body').removeClass("narrow").addClass("large");
    DIV ?[id == "switcher"]                                });
        &DIV ?[:class == "button"] as buttons {onclick =
          %{buttons {class ?["selected"]--}                $("#switcher .button").bind('click', function(){
                                                                $("#switcher .button").removeClass("selected");
            this {class += "selected"}}
                                                                $(this).addClass("selected");
      }                                                      })
  }                                                        });
}
[A] Libretto vs Logic



 Theorem (Malykh, Mantsivoda, 2010). The
 declarative part of Libretto is a sublogic of the
 SW description logic SHOIN(D).
[A] Libretto vs Logic


              {         Logical
                       Datatype
                       System
                   Logically Sound
                       (Query)
                    Sublanguage

                Advanced Programming
                       Tools


   Declarative part of Libretto = Simple Logic

   Declarative Libretto Programs = Knowledge Bases

   Logically Approved Concept of Data!
[A] Libretto vs Logic
                                     ?
Query: Find a man' spouse aged 40,
      which has a son




Description Logic:




       man.spouse ?[age == 40 and hasChild.Man]
[A] Libretto vs SQL
Relational model (tables)
                                                Object model (graphs)




                            Resembles Hibernate, BUT!

                            ●   implemented on the language level
                            ●   within a unified language space
                            ●   logically valid
[A] Libretto vs SQL

Libretto



municipal11.~municipal.title    SELECT ARTICLE.TITLE
                                  FROM ARTICLE, MUNICIPAL
                                 WHERE
                                     ARTICLE.MUNICIPAL_ID = MUNICIPAL.ID
                                     AND MUNICIPAL.ID = 11

                               UNION ALL
                                   SELECT NEWS.TITLE
                                   FROM NEWS, MUNICIPAL
                                   WHERE
                                    NEWS.MUNICIPAL_ID = MUNICIPAL.ID
                                      AND MUNICIPAL.ID = 11
[B] The Libretto Web Platform
[B] The Libretto Web Platform


 compile                 r
        rs
                   sl ato
                n
             tra
[B] The Libretto Web Platform
                             logical
                             datatypes


 compile                 r
        rs
                   sl ato
                n
             tra
[B] The Libretto Web Platform
                                                  logical
                                                  datatypes


        compile                  r
                rs
                           sl ato
                        n
                     tra
                                     translator




                                                          p   ing
                                                      map




web framework
[B] The Libretto Web Platform
                                               logical
                                               datatypes


      compile                 r
             rs
                        sl ato
                     n
                  tra
                                  translator




                                                       p   ing
                                                   map




web framework
[B] The Libretto Web Platform
                                               logical
                                               datatypes


      compile                 r
             rs
                        sl ato
                     n
                  tra
                                  translator




                                                       p   ing
                                                   map




web framework
[A] Libretto vs Semantic Web

Targeting Semantic Web problems:

● the isolation of knowledge handling tools
  from development technologies

● the high comprehension threshold for regular
  developers.
[A] Libretto vs Semantic Web
Potential:

● Libretto programs as knowledge bases

● KBM and OOP integration

● standardized API to data and knowledge MS

● executable formalized specifications and
  normative documents
HOW MUCH?
Business Model
Open Core = OS + non-OS-additions

For free:
● Basic compilers from Libretto
● Translator to JavaScript
● Basic Web Framework
● Basic Libretto Libraries
Business Model
Open Core = OS + non-OS-additions

For money:
● Replication Support
● Scalability Support
● Dashboard for Monitoring & Management
● Technical Maintenance & Consulting
● Hosting?

Libretto

  • 1.
    a programming languageand a web platform http://libretto-lang.org
  • 2.
    The Libretto WebPlatform A ● single-language ● multi-platform web programming environment
  • 3.
    The Libretto WebPlatform based on the ● general-purpose ● high-level ● dynamic ● object-oriented programming language Libretto
  • 4.
  • 5.
    Today Database Server Client
  • 6.
    The Libretto WebPlatform Database Server Client
  • 7.
  • 8.
    Target Groups ● cloud computing application development ● knowledge management & regular programming integration
  • 9.
  • 10.
    The Libretto WebPlatform [A] A multi-purpose programming language [B] A multi-platform programming environment
  • 11.
    [A] Libretto a general-purposeobject oriented dynamic programming language a single language space of Libretto ● on the server side ● on the client side ● with persistent storage datatype system with logical semantics
  • 12.
    [A] Libretto vsRuby class Ninja(var name) class Ninja attr_accessor :name fix drew = Ninja("Drew") fix adam = Ninja("Adam") def initialize(name) @name = name end end drew = Ninja.new("Drew") adam = Ninja.new("Adam")
  • 13.
    [A] Libretto vsPython, Haskell, C# "n".join(foo.description() for foo in mylist if foo.description() != "") mylist.description?[$!=""].join("n") concat $ List.intersperse "n" $ filter (/= "") $ map description mylist string retval = ""; foreach (Foo foo in mylist) { string desc = foo.description(); if (desc != "") { if (retval != "") retval += "n"; retval += desc; } }
  • 14.
    [A] Libretto vsJavaScript UL?[id == "selected-plays"] var uls = document.getElementsByTagName("UL") $LI. style var ul {float = "left" for(var i = 0, l = uls.length; i < l; i++) listStyle = "none" if (uls[i].id === "selected-plays") { margin = "10px"} ul = uls[i]; break } var style for(var n = ul.firstChild; n != null; n = n.nextSibling) if (n.nodeName === "LI") { style = n.style style.float = "left" style.listStyle = "none" style.margin = "10px" }
  • 15.
    [A] Libretto vsJQuery JQuery window {onload = $(document).ready(function(){ %{DIV ?[id == "switcher-normal"] {onclick = $("#switcher-normal").bind('click', function(){ %{BODY {class ?["large" or "narrow"]--}} $('body').removeClass("large").removeClass("narrow"); } }); DIV?[id == "switcher-narrow"] {onclick = %{BODY {class ?["large"]--; class += "narrow"}} $("#switcher-narrow").bind('click', function(){ $('body').removeClass("large").addClass("narrow"); } }); DIV?[id == "switcher-large"] {onclick = %{BODY {class ?["narrow"]--; class += "large"}} $("#switcher-large").bind('click', function(){ } $('body').removeClass("narrow").addClass("large"); DIV ?[id == "switcher"] }); &DIV ?[:class == "button"] as buttons {onclick = %{buttons {class ?["selected"]--} $("#switcher .button").bind('click', function(){ $("#switcher .button").removeClass("selected"); this {class += "selected"}} $(this).addClass("selected"); } }) } }); }
  • 16.
    [A] Libretto vsLogic Theorem (Malykh, Mantsivoda, 2010). The declarative part of Libretto is a sublogic of the SW description logic SHOIN(D).
  • 17.
    [A] Libretto vsLogic { Logical Datatype System Logically Sound (Query) Sublanguage Advanced Programming Tools Declarative part of Libretto = Simple Logic Declarative Libretto Programs = Knowledge Bases Logically Approved Concept of Data!
  • 18.
    [A] Libretto vsLogic ? Query: Find a man' spouse aged 40, which has a son Description Logic: man.spouse ?[age == 40 and hasChild.Man]
  • 19.
    [A] Libretto vsSQL Relational model (tables) Object model (graphs) Resembles Hibernate, BUT! ● implemented on the language level ● within a unified language space ● logically valid
  • 20.
    [A] Libretto vsSQL Libretto municipal11.~municipal.title SELECT ARTICLE.TITLE FROM ARTICLE, MUNICIPAL WHERE ARTICLE.MUNICIPAL_ID = MUNICIPAL.ID AND MUNICIPAL.ID = 11 UNION ALL SELECT NEWS.TITLE FROM NEWS, MUNICIPAL WHERE NEWS.MUNICIPAL_ID = MUNICIPAL.ID AND MUNICIPAL.ID = 11
  • 21.
    [B] The LibrettoWeb Platform
  • 22.
    [B] The LibrettoWeb Platform compile r rs sl ato n tra
  • 23.
    [B] The LibrettoWeb Platform logical datatypes compile r rs sl ato n tra
  • 24.
    [B] The LibrettoWeb Platform logical datatypes compile r rs sl ato n tra translator p ing map web framework
  • 25.
    [B] The LibrettoWeb Platform logical datatypes compile r rs sl ato n tra translator p ing map web framework
  • 26.
    [B] The LibrettoWeb Platform logical datatypes compile r rs sl ato n tra translator p ing map web framework
  • 27.
    [A] Libretto vsSemantic Web Targeting Semantic Web problems: ● the isolation of knowledge handling tools from development technologies ● the high comprehension threshold for regular developers.
  • 28.
    [A] Libretto vsSemantic Web Potential: ● Libretto programs as knowledge bases ● KBM and OOP integration ● standardized API to data and knowledge MS ● executable formalized specifications and normative documents
  • 29.
  • 30.
    Business Model Open Core= OS + non-OS-additions For free: ● Basic compilers from Libretto ● Translator to JavaScript ● Basic Web Framework ● Basic Libretto Libraries
  • 31.
    Business Model Open Core= OS + non-OS-additions For money: ● Replication Support ● Scalability Support ● Dashboard for Monitoring & Management ● Technical Maintenance & Consulting ● Hosting?