]> matita.cs.unibo.it Git - helm.git/blob - helm/www/lambdadelta/osn.html
update in basic_2
[helm.git] / helm / www / lambdadelta / osn.html
1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
3 <html xmlns="http://www.w3.org/1999/xhtml" xmlns:ld="http://lambdadelta.info/" dir="ltr" lang="en-us"><head><meta http-equiv="Content-Language" content="en-us"/><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/><meta http-equiv="Content-Style-Type" content="text/css"/><meta name="author" content="Ferruccio Guidi"/><meta name="description" content="\lambda\delta home page: Open Symbolic Notation"/><title>\lambda\delta home page: Open Symbolic Notation</title><link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/ld_web.css"/><link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/lddl.css"/><link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/xhtbl.css"/><link rel="shortcut icon" href="http://lambdadelta.info/images/crux_16.ico"/></head><body lang="en-US"><div class="spacer"><a href="http://lambdadelta.info/osn/"><img class="w3c" alt="[Open Symbolic Notation logo]" title="OSN: Open Symbolic Notation" src="http://lambdadelta.info/images/osn_label.png"/></a></div><div class="head1">Open Symbolic Notation</div><div class="spacer"><img class="rule" alt="[Spacer]" title="\lambda\delta rainbow rule" src="http://lambdadelta.info/images/rainbow.png"/></div><div class="text">
4       Open Symbolic Notation, abbreviated OSN,
5       is an easy and flexible data-interchange text format
6       intended for the lightweight representation of
7       generic abstract syntax trees in the domain of formal languages.
8       In order to meet these design goals, OSN pursues the following features.
9    </div><ul><li class="red-mark"><span class="alpha"><a href="https://en.wikipedia.org/wiki/S-expression">Symbolic expressions</a>
10       based on widely accepted syntactical conventions
11       provide for a <span class="emph ">lightweight</span> and <span class="emph ">generic</span> grammar,
12       which is both <span class="emph ">easy for machines to process</span>,
13       and <span class="emph ">easy for humans to understand</span>.
14       As a mean to support <span class="emph ">efficient</span> information processing,
15       OSN aims at an economic representation of data
16       contrary to <a href="http://www.w3.org/TR/2008/REC-xml-20081126/#sec-origin-goals">XML design goal 10</a>.
17       Compared to other data-interchange formats based on symbolic expressions,
18       like <a href="http://people.csail.mit.edu/rivest/Sexp.txt">canonical symbolic expressions</a>,
19       representing arbitrary data in binary format is a secondary concern in the design of OSN,
20       as well as the support for canonicalization.
21       Apparently, these features fall outside the scope of OSN,
22       which targets the data structures of <span class="emph ">formal languages</span>. 
23    </span></li></ul><ul><li class="blue-mark"><span class="alpha">
24       Optionally <a href="https://en.wikipedia.org/wiki/Namespace">qualified</a> symbolic expressions 
25       allow OSN texts to mix data from different domains preserving their own semantics
26       because name conflicts can be avoided.
27       As a consequence OSN documents are <span class="emph ">easy to extend</span> in that
28       domain-specific OSN applications can work as expected even if
29       data from different domains is added to the text they process.
30    </span></li></ul><ul><li class="green-mark"><span class="alpha">
31       The <a href="https://en.wikipedia.org/wiki/ASCII">US-ASCII</a> character set,
32       extended to <a href="http://www.utf-8.com/">UTF-8</a> in
33       free-form text strings for the convenience of human readers,
34       makes OSN documents <span class="emph ">easy to visualize and transport</span> over communication media.
35       OSN design aims at supporting <span class="emph ">application-independent</span> standard encodings.
36    </span></li></ul><div class="head2dx" id="grammar">Grammar <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b6.png"/></div><div class="text">
37       An OSN text uses the <a href="http://www.utf-8.com/">UTF-8</a> character set
38       and contains the next seven tokens that we define in a very common EBNF variant.
39       Characters not starting a token are not allowed.
40       The ones in the range U+0021 ... U+007E are ! # $ % &amp; * / ? @ \ ^ | ~
41       and are available for extensions of OSN.
42    </div><ul><li class="">
43       This token can represent the identifiers and the numerical constants of most programming languages:
44       <br/><span class="emph ebnf">symbol = 1 * symbol-char ; <br/>symbol-char = '+' | '-' | '.' | '0' | ... | '9' | 'A' | ... | 'Z' | '_' | '`' | 'a' | ... | 'z' ; </span></li></ul><ul><li class="">
45       This token contains free-form text with commonly accepted escape sequences:
46       <br/><span class="emph ebnf">string = '"' , * ( string-char | "'" | '\' escape ) , '"' ; <br/>string-char = ( #0 | ... | #10FFFF ) - ( #0 | ... | #1F | "'" | '\' | '"' | #7F ) ; <br/>escape = 1 * space | '"' | "'" | '(' | ')' | '0' | '\' | 'a' | 'b' | 'e' | 'f' | 'n' | 'r' | 't' | ( 'u' , 4 * 4 hex ) | 'v' | ( 'x' , 2 * 2 hex ) ; <br/>space = #9 | ... | #D | #20 ; <br/>hex = '0' | ... | '9' | 'A' | ... | 'F' | 'a' | ... | 'f' ; </span></li></ul><ul><li class="">
47       This token is a widely used alternative of the former token:
48       <br/><span class="emph ebnf">string-alt = "'" , * ( string-char | '"' | '\' escape ) , "'" ; </span></li></ul><ul><li class="">
49       This token separates the qualifiers of a symbolic expression:
50       <br/><span class="emph ebnf">sep = ':' ; </span></li></ul><ul><li class="">
51       This token starts a compound symbolic expression:
52       <br/><span class="emph ebnf">open = '(' | '&lt;' | '[' | '{' ; </span></li></ul><ul><li class="">
53       This token ends a compound symbolic expression:
54       <br/><span class="emph ebnf">close = ')' | '&gt;' | ']' | '}' ; </span></li></ul><ul><li class="">
55       This token is ignored and separates the other tokens:
56       <br/><span class="emph ebnf">gap = space | ',' | ';' | '=' ; </span></li></ul><div class="text">
57       The grammar of OSN is very liberal by design.
58       Spaces of the form <span class="emph ebnf">1 * gap </span> can appear between any pair of tokens.
59    </div><ul><li class="">
60       An OSN text:
61       <br/><span class="emph ebnf">text = * q-expr ; </span></li></ul><ul><li class="">
62       A qualified symbolic expression:
63       <br/><span class="emph ebnf">q-expr = * ( symbol , 1 * sep ) , expr ; </span></li></ul><ul><li class="">
64       An unqualified symbolic expression:
65       <br/><span class="emph ebnf">expr = symbol | string | string-alt | ( open , text , close ) ; </span></li></ul><div class="head2dx" id="semantics">Semantics <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b1.png"/></div><div class="text">
66       Forthcoming ...
67    </div><!--
68       morover, the escape sequences \x &lt;two hexadecimal digits&gt; and \u &lt;four hexadecimal digits&gt;
69       allow to specify a character by its code point <newline/>
70       finally the escape sequences \( for U+0002 and \) for U+0003 are available
71 --><div class="head2dx" id="implementation">Implementation <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b5.png"/></div><div class="text">
72       Forthcoming ...
73    </div><div class="spacer"><img class="rule" alt="[Spacer]" title="\lambda\delta rainbow rule" src="http://lambdadelta.info/images/rainbow.png"/></div><div class="spacer"><br/></div><div class="spacer"><a href="http://validator.w3.org/check?uri=referer"><img class="w3c" alt="[Valid XHTML 1.1]" title="Valid XHTML 1.1" src="http://www.w3.org/Icons/valid-xhtml11-blue"/></a><a href="http://jigsaw.w3.org/css-validator/check/referer"><img class="w3c" alt="[Valid CSS level 2]" title="Valid CSS level 2" src="http://www.w3.org/Icons/valid-css2-blue"/></a><a href="http://www.w3.org/XML/"><img class="w3c" alt="[Generated from XML via XSL]" title="Generated from XML via XSL" src="http://lambdadelta.info/images/xml_xsl2.png"/></a><a href="http://www.w3.org/Graphics/PNG/"><img class="w3c" alt="[PNG used here]" title="PNG used here" src="http://lambdadelta.info/images/PNGnow2.png"/></a><a href="http://www.anybrowser.org/campaign/"><img class="w3c" alt="[Viewable with any browser]" title="Viewable with any browser" src="http://www.anybrowser.org/campaign/bvgraphics/abtfile.png"/></a></div><div class="spacer"><br/></div><div class="spacer">Last update: Thu, 09 Mar 2017 13:38:16 +0100</div></body></html>