]> matita.cs.unibo.it Git - helm.git/blob - helm/www/lambdadelta/osn.html
helena: warning removed and modifications for λΥP exportation
[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" dir="ltr" lang="en-us">
4   <head>
5     <meta http-equiv="Content-Language" content="en-us" />
6     <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
7     <meta http-equiv="Content-Style-Type" content="text/css" />
8     <meta name="author" content="Ferruccio Guidi" />
9     <meta name="description" content="\lambda\delta home page: Open Symbolic Notation" />
10     <title>\lambda\delta home page: Open Symbolic Notation</title>
11     <link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/ld_web.css" />
12     <link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/lddl.css" />
13     <link rel="stylesheet" type="text/css" href="http://lambdadelta.info/css/xhtbl.css" />
14     <link rel="shortcut icon" href="http://lambdadelta.info/images/crux_16.ico" />
15   </head>
16   <body lang="en-US">
17     <div class="spacer">
18       <a href="http://lambdadelta.info/osn/">
19         <img class="w3c" alt="[Open Symbolic Notation logo]" title="OSN: Open Symbolic Notation" src="http://lambdadelta.info/images/osn_label.png" />
20       </a>
21     </div>
22     <div class="head1">Open Symbolic Notation</div>
23     <div class="spacer">
24       <img class="rule" alt="[Spacer]" title="\lambda\delta rainbow rule" src="http://lambdadelta.info/images/rainbow.png" />
25     </div>
26     <div xmlns:ld="http://lambdadelta.info/" class="text">
27       Open Symbolic Notation, abbreviated OSN,
28       is an easy and flexible data-interchange text format
29       intended for the lightweight representation of
30       generic abstract syntax trees in the domain of formal languages.
31       In order to meet these design goals, OSN pursues the following features.
32    </div>
33     <ul xmlns:ld="http://lambdadelta.info/">
34       <li class="red-mark">
35         <span class="alpha">
36           <a href="https://en.wikipedia.org/wiki/S-expression">Symbolic expressions</a>
37       based on widely accepted syntactical conventions
38       provide for a <span class="emph ">lightweight</span> and <span class="emph ">generic</span> grammar,
39       which is both <span class="emph ">easy for machines to process</span>,
40       and <span class="emph ">easy for humans to understand</span>.
41       As a mean to support <span class="emph ">efficient</span> information processing,
42       OSN aims at an economic representation of data
43       contrary to <a href="http://www.w3.org/TR/2008/REC-xml-20081126/#sec-origin-goals">XML design goal 10</a>.
44       Compared to other data-interchange formats based on symbolic expressions,
45       like <a href="http://people.csail.mit.edu/rivest/Sexp.txt">canonical symbolic expressions</a>,
46       representing arbitrary data in binary format is a secondary concern in the design of OSN,
47       as well as the support for canonicalization.
48       Apparently, these features fall outside the scope of OSN,
49       which targets the data structures of <span class="emph ">formal languages</span>. 
50    </span>
51       </li>
52     </ul>
53     <ul xmlns:ld="http://lambdadelta.info/">
54       <li class="blue-mark">
55         <span class="alpha">
56       Optionally <a href="https://en.wikipedia.org/wiki/Namespace">qualified</a> symbolic expressions 
57       allow OSN texts to mix data from different domains preserving their own semantics
58       because name conflicts can be avoided.
59       As a consequence OSN documents are <span class="emph ">easy to extend</span> in that
60       domain-specific OSN applications can work as expected even if
61       data from different domains is added to the text they process.
62    </span>
63       </li>
64     </ul>
65     <ul xmlns:ld="http://lambdadelta.info/">
66       <li class="green-mark">
67         <span class="alpha">
68       The <a href="https://en.wikipedia.org/wiki/ASCII">US-ASCII</a> character set,
69       extended to <a href="http://www.utf-8.com/">UTF-8</a> in
70       free-form text strings for the convenience of human readers,
71       makes OSN documents <span class="emph ">easy to visualize and transport</span> over communication media.
72       OSN design aims at supporting <span class="emph ">application-independent</span> standard encodings.
73    </span>
74       </li>
75     </ul>
76     <div xmlns:ld="http://lambdadelta.info/" class="head2dx" id="grammar">Grammar <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b6.png" />
77     </div>
78     <div xmlns:ld="http://lambdadelta.info/" class="text">
79       An OSN text uses the <a href="http://www.utf-8.com/">UTF-8</a> character set
80       and contains the next seven tokens that we define in a very common EBNF variant.
81       Characters not starting a token are not allowed.
82       The ones in the range U+0021 ... U+007E are ! # $ % &amp; * / ? @ \ ^ | ~
83       and are available for extensions of OSN.
84    </div>
85     <ul xmlns:ld="http://lambdadelta.info/">
86       <li class="">
87       This token can represent the identifiers and the numerical constants of most programming languages:
88       <br />
89         <span class="emph ebnf">symbol = 1 * symbol-char ; <br />symbol-char = '+' | '-' | '.' | '0' | ... | '9' | 'A' | ... | 'Z' | '_' | '`' | 'a' | ... | 'z' ; </span>
90       </li>
91     </ul>
92     <ul xmlns:ld="http://lambdadelta.info/">
93       <li class="">
94       This token contains free-form text with commonly accepted escape sequences:
95       <br />
96         <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>
97       </li>
98     </ul>
99     <ul xmlns:ld="http://lambdadelta.info/">
100       <li class="">
101       This token is a widely used alternative of the former token:
102       <br />
103         <span class="emph ebnf">string-alt = "'" , * ( string-char | '"' | '\' escape ) , "'" ; </span>
104       </li>
105     </ul>
106     <ul xmlns:ld="http://lambdadelta.info/">
107       <li class="">
108       This token separates the qualifiers of a symbolic expression:
109       <br />
110         <span class="emph ebnf">sep = ':' ; </span>
111       </li>
112     </ul>
113     <ul xmlns:ld="http://lambdadelta.info/">
114       <li class="">
115       This token starts a compound symbolic expression:
116       <br />
117         <span class="emph ebnf">open = '(' | '&lt;' | '[' | '{' ; </span>
118       </li>
119     </ul>
120     <ul xmlns:ld="http://lambdadelta.info/">
121       <li class="">
122       This token ends a compound symbolic expression:
123       <br />
124         <span class="emph ebnf">close = ')' | '&gt;' | ']' | '}' ; </span>
125       </li>
126     </ul>
127     <ul xmlns:ld="http://lambdadelta.info/">
128       <li class="">
129       This token is ignored and separates the other tokens:
130       <br />
131         <span class="emph ebnf">gap = space | ',' | ';' | '=' ; </span>
132       </li>
133     </ul>
134     <div xmlns:ld="http://lambdadelta.info/" class="text">
135       The grammar of OSN is very liberal by design.
136       Spaces of the form <span class="emph ebnf">1 * gap </span> can appear between any pair of tokens.
137    </div>
138     <ul xmlns:ld="http://lambdadelta.info/">
139       <li class="">
140       An OSN text:
141       <br />
142         <span class="emph ebnf">text = * q-expr ; </span>
143       </li>
144     </ul>
145     <ul xmlns:ld="http://lambdadelta.info/">
146       <li class="">
147       A qualified symbolic expression:
148       <br />
149         <span class="emph ebnf">q-expr = * ( symbol , 1 * sep ) , expr ; </span>
150       </li>
151     </ul>
152     <ul xmlns:ld="http://lambdadelta.info/">
153       <li class="">
154       An unqualified symbolic expression:
155       <br />
156         <span class="emph ebnf">expr = symbol | string | string-alt | ( open , text , close ) ; </span>
157       </li>
158     </ul>
159     <div xmlns:ld="http://lambdadelta.info/" class="head2dx" id="semantics">Semantics <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b1.png" />
160     </div>
161     <div xmlns:ld="http://lambdadelta.info/" class="text">
162       Forthcoming ...
163    </div>
164     <!--
165       morover, the escape sequences \x &lt;two hexadecimal digits&gt; and \u &lt;four hexadecimal digits&gt;
166       allow to specify a character by its code point <newline/>
167       finally the escape sequences \( for U+0002 and \) for U+0003 are available
168 -->
169     <div xmlns:ld="http://lambdadelta.info/" class="head2dx" id="implementation">Implementation <img class="icon37" alt="[butterfly]" title="\lambda\delta butterfly" src="http://lambdadelta.info/images/b5.png" />
170     </div>
171     <div xmlns:ld="http://lambdadelta.info/" class="text">
172       Forthcoming ...
173    </div>
174     <div class="spacer">
175       <img class="rule" alt="[Spacer]" title="\lambda\delta rainbow rule" src="http://lambdadelta.info/images/rainbow.png" />
176     </div>
177     <div xmlns:ld="http://lambdadelta.info/" class="spacer">
178       <br />
179     </div>
180     <div xmlns:ld="http://lambdadelta.info/" class="spacer">
181       <a href="http://validator.w3.org/check?uri=referer">
182         <img class="w3c" alt="[Valid XHTML 1.1]" title="Valid XHTML 1.1" src="http://www.w3.org/Icons/valid-xhtml11-blue" />
183       </a>
184       <a href="http://jigsaw.w3.org/css-validator/check/referer">
185         <img class="w3c" alt="[Valid CSS level 2]" title="Valid CSS level 2" src="http://www.w3.org/Icons/valid-css2-blue" />
186       </a>
187       <a href="http://www.w3.org/XML/">
188         <img class="w3c" alt="[Generated from XML via XSL]" title="Generated from XML via XSL" src="http://lambdadelta.info/images/xml_xsl2.png" />
189       </a>
190       <a href="http://www.w3.org/Graphics/PNG/">
191         <img class="w3c" alt="[PNG used here]" title="PNG used here" src="http://lambdadelta.info/images/PNGnow2.png" />
192       </a>
193       <a href="http://www.anybrowser.org/campaign/">
194         <img class="w3c" alt="[Viewable with any browser]" title="Viewable with any browser" src="http://www.anybrowser.org/campaign/bvgraphics/abtfile.png" />
195       </a>
196     </div>
197     <div xmlns:ld="http://lambdadelta.info/" class="spacer">
198       <br />
199     </div>
200     <div xmlns:ld="http://lambdadelta.info/" class="spacer">Last update: Fri, 24 Nov 2017 21:00:00 +0100</div>
201   </body>
202 </html>