]> matita.cs.unibo.it Git - helm.git/blob - helm/www/lambdadelta/web/home/osn.ldw.xml
ef8580bb8c47b9ac7c3097cdc98d912c81d915fa
[helm.git] / helm / www / lambdadelta / web / home / osn.ldw.xml
1 <?xml version="1.0" encoding="UTF-8"?>
2
3 <page xmlns="http://lambdadelta.info/"
4       description = "\lambda\delta home page: Open Symbolic Notation"
5       title = "\lambda\delta home page: Open Symbolic Notation"
6       logo = "osn"
7       head = "Open Symbolic Notation"
8 >
9    <body>
10       Open Symbolic Notation, abbreviated OSN,
11       is an easy and flexible data-interchange text format
12       intended for the lightweight representation of
13       generic abstract syntax trees in the domain of formal systems.
14       In order to meet theese design goals, OSN pursues the following features.
15    </body>
16    <list><style class="red-mark"><item><style class="alpha">
17       <link to="https://en.wikipedia.org/wiki/S-expression">Symbolic expressions</link>
18       based on widely accepted syntactical conventions
19       provide for a <notice text="lightweight"/> and <notice text="generic"/> grammar,
20       which is both <notice text="easy for machines to process"/>,
21       and <notice text="easy for humans to understand"/>.
22       As a mean to support <notice text="efficient"/> information processing,
23       OSN aims at an economic representation of data
24       contrary to <link to="http://www.w3.org/TR/2008/REC-xml-20081126/#sec-origin-goals">XML design goal 10</link>.
25       Compared to other data-interchange formats based on symbolic expressions,
26       like <link to="http://people.csail.mit.edu/rivest/Sexp.txt">canonical symbolic expressions</link>,
27       representing arbitrary data in binary format is a secondary concern in the designn of OSN,
28       as well as the support for canonicalization.
29       Apparently, theese features fall outside the scope of OSN,
30       which targets the data structures of <notice text="formal systems"/>. 
31    </style></item></style>
32    <newline/>
33    <style class="blue-mark"><item><style class="alpha">
34       Optionally <link to="https://en.wikipedia.org/wiki/Namespace">qualified</link> symbolic expressions 
35
36    </style></item></style>
37    <newline/>
38    <style class="green-mark"><item><style class="alpha">
39       The <link to="https://en.wikipedia.org/wiki/ASCII">US-ASCII</link> character set,
40       extended to <link to="http://www.utf-8.com/">UTF-8</link> in
41       free-form text strings for the convenience of human readers,
42       makes OSN documents <notice text="easy to visualize and transport"/> over communication media.
43       OSN design aims at supporting <notice text="application-independent"/> standard encodings.
44    </style></item></style></list>
45    <body>
46       
47    </body>
48 <!--
49    flexibility: S-expressions should make it relatively simple to
50      modify and extend data structures.
51       OSN is completely language independent but uses .
52 -->
53
54
55    <section6 name="syntax">Syntax</section6>
56
57    <body>
58       An OSN text uses the <link to="http://www.utf-8.com/">UTF-8</link> character set
59       and contains the next seven tokens that we define in a very common EBNF variant.
60       Characters not starting a token are not allowed.
61       The ones in the range U+0021 ... U+007E are ! # $ % &amp; * / ? @ \ ^ | ~
62       and are available for extensions of OSN.
63    </body>
64    <list><item>
65       <ebnf>
66          <prod of="symbol"/> <def/> 
67             <plus/> <prod of="symbol-char"/>
68          <stop/> <newline/>
69          <prod of="symbol-char"/> <def/>
70             <str2 of="+"/> <or/> <str2 of="-"/> <or/> <str2 of="."/> <or/>
71             <str2 of="0"/> <etc/> <str2 of="9"/> <or/>
72             <str2 of="A"/> <etc/> <str2 of="Z"/> <or/>
73             <str2 of="_"/> <or/> <str2 of="`"/> <or/>
74             <str2 of="a"/> <etc/> <str2 of="z"/>
75          <stop/>
76       </ebnf><newline/>
77       this token can represent the identifiers and the numerical constants of most programming languages;
78    </item><newline/><item>
79       <ebnf>
80          <prod of="string"/> <def/>
81             <str2 of="&quot;"/> <and/>
82             <star/> <open/>
83                <prod of="string-char"/> <or/>
84                <str1 of="'"/> <or/>
85                <str2 of="\"/> <prod of="escape"/>
86             <close/> <and/>
87             <str2 of="&quot;"/>
88          <stop/> <newline/>
89          <prod of="string-char"/> <def/>
90             <open/>
91                <xchr of="0"/> <etc/> <xchr of="10FFFF"/>
92             <close/> <but/> <open/>
93                <xchr of="0"/> <etc/> <xchr of="1F"/> <or/>
94                <str1 of="'"/> <or/> <str2 of="\"/> <or/>
95                <str2 of="&quot;"/> <or/> <xchr of="7F"/> 
96             <close/>
97          <stop/> <newline/>
98          <prod of="escape"/> <def/>
99             <plus/> <prod of="space"/> <or/>
100             <str2 of="&quot;"/> <or/> <str1 of="'"/> <or/>
101             <str2 of="("/> <or/> <str2 of=")"/> <or/>
102             <str2 of="0"/> <or/> <str2 of="\"/> <or/>
103             <str2 of="a"/> <or/> <str2 of="b"/> <or/>
104             <str2 of="e"/> <or/>
105             <str2 of="f"/> <or/> <str2 of="n"/> <or/>
106             <str2 of="r"/> <or/> <str2 of="t"/> <or/>
107             <open/>
108                <str2 of="u"/> <and/> <spec of="4"/> <prod of="hex"/>
109             <close/> <or/>
110             <str2 of="v"/> <or/>
111             <open/>
112                <str2 of="x"/> <and/> <spec of="2"/> <prod of="hex"/>
113             <close/>
114          <stop/> <newline/>
115          <prod of="space"/> <def/>
116             <xchr of="9"/> <etc/> <xchr of="D"/> <or/>
117             <xchr of="20"/>
118          <stop/> <newline/>            
119          <prod of="hex"/> <def/>
120             <str2 of="0"/> <etc/> <str2 of="9"/> <or/>
121             <str2 of="A"/> <etc/> <str2 of="F"/> <or/>
122             <str2 of="a"/> <etc/> <str2 of="f"/>
123          <stop/>
124       </ebnf><newline/>
125       this token contains free-form text with commonly accepted escape sequences;
126    </item><newline/><item>
127       <ebnf>
128          <prod of="string-alt"/> <def/>
129             <str1 of="'"/> <and/>
130             <star/> <open/>
131                <prod of="string-char"/> <or/>
132                <str2 of="&quot;"/> <or/>
133                <str2 of="\"/> <prod of="escape"/>
134             <close/> <and/>
135             <str1 of="'"/>
136          <stop/>
137       </ebnf><newline/>
138       this token is a widely used alternative of the former;
139    </item><newline/><item>
140       <ebnf>
141          <prod of="sep"/> <def/> <str2 of=":"/> <stop/>
142       </ebnf><newline/>
143       this token separates the qualifiers of a symbolic expression;
144    </item><newline/><item>
145       <ebnf>
146          <prod of="open"/> <def/>
147             <str2 of="("/> <or/> <str2 of="&lt;"/> <or/> <str2 of="["/> <or/> <str2 of="{"/>
148          <stop/>
149       </ebnf><newline/>
150       this token starts a compound symbolic expression;
151    </item><newline/><item>
152       <ebnf>
153          <prod of="close"/> <def/>
154             <str2 of=")"/> <or/> <str2 of="&gt;"/> <or/> <str2 of="]"/> <or/> <str2 of="}"/>
155          <stop/>
156       </ebnf><newline/>
157       this token ends a compound symbolic expression;
158    </item><newline/><item>
159       <ebnf>
160          <prod of="gap"/> <def/>
161             <prod of="space"/> <or/>
162             <str2 of=","/> <or/> <str2 of=";"/> <or/> <str2 of="="/>
163          <stop/>
164       </ebnf><newline/>
165       this token is ignored and separates the other tokens.
166    </item></list>
167
168    <body>
169    </body>
170
171 <!--
172       morover, the escape sequences \x &lt;two hexadecimal digits&gt; and \u &lt;four hexadecimal digits&gt;
173       allow to specify a character by its code point <newline/>
174       finally the escape sequences \( for U+0002 and \) for U+0003 are available
175 -->
176
177    <footer/>
178 </page>