Browse Source

added theoretical article in docs (D3.3)

Jaromil 2 years ago
parent
commit
4c04fa036c

+ 3 - 0
.gitmodules

@@ -1,3 +1,6 @@
1 1
 [submodule "lib/lua_sandbox"]
2 2
 	path = lib/lua_sandbox
3 3
 	url = https://github.com/mozilla-services/lua_sandbox
4
+[submodule "docs/article/writedown"]
5
+	path = docs/article/writedown
6
+	url = https://github.com/dyne/writedown

+ 34 - 0
docs/article/config.zsh

@@ -0,0 +1,34 @@
1
+# Writedown
2
+# generic configuration defaults for rendered files
3
+
4
+WRITEDOWN_TITLE="DECODE language design patterns"
5
+WRITEDOWN_AUTHOR="Denis Roio, Dyne.org"
6
+WRITEDOWN_AFFILIATION="Dyne.org Foundation"
7
+# WRITEDOWN_DATE="Wednesday 18 October 2017"
8
+WRITEDOWN_TAGS="[blockchain, smart, contract, rules, langsec, DSL]"
9
+
10
+# number for each section
11
+WRITEDOWN_NRSEC=yes
12
+# table of contents
13
+WRITEDOWN_TOC=yes
14
+# bibliographic citation style (see writedown/citstyle)
15
+WRITEDOWN_CITSTYLE=harvard-kings-college-london
16
+# font size
17
+WRITEDOWN_FONTSIZE=11pt
18
+# bibtex file for bibliographic sources
19
+WRITEDOWN_BIB=views/references.bib
20
+# latex template (header and footer)
21
+WRITEDOWN_LATEX_TEMPLATE=views/template.tex
22
+
23
+# different formats as supported by pandoc.
24
+# to activate uncomment and fill, then use dash (-) as first argument
25
+# i.e: ./writedown/render -
26
+# WRITEDOWN_OUTPUT_FORMAT=epub
27
+# WRITEDOWN_OUTPUT_EXTENSION=epub
28
+
29
+# default pandoc base command
30
+# WRITEDOWN_PANDOC="pandoc --smart --standalone -f markdown
31
+
32
+# Experimental features are commented below
33
+
34
+# WRITEDOWN_ZOTERO="no"

+ 6 - 0
docs/article/views/abstract.txt

@@ -0,0 +1,6 @@
1
+
2
+This document explains the nature of smart rules in DECODE. It establishes guidelines and requirements for the implementation of an execution engine for a new domain specific language.
3
+
4
+DECODE's language is an external DSL implemented using a Syntax-Directed Translation. Its Semantic Model leads to coarse-grained tasks to be executed by the nodes on the peer to peer network.
5
+
6
+This is a living document and its latest version can be found on files.dyne.org/decode

File diff suppressed because it is too large
+ 346 - 0
docs/article/views/decode_language_patterns.md


+ 1 - 0
docs/article/views/index.txt

@@ -0,0 +1 @@
1
+decode_language_patterns.md

+ 232 - 0
docs/article/views/references.bib

@@ -0,0 +1,232 @@
1
+
2
+@article{roio2015d4,
3
+  title={Design of Social Digital Currency},
4
+  author={Roio, Denis and Sachy, Marco and Lucarelli, Stefano and Lietaer, Bernard and Bria, Francesca},
5
+  year={2015},
6
+  publisher={EU-FP7/D-CENT}
7
+}
8
+
9
+
10
+@article{sward2017data,
11
+  title={Data Insertion in Bitcoin's Blockchain},
12
+  author={Sward, Andrew and OP\_0, Vecna and Stonedahl, Forrest},
13
+  year={2017}
14
+}
15
+
16
+
17
+@InProceedings{DBLP:conf/birthday/WegnerEB12,
18
+  author	   = {Peter Wegner and Eugene Eberbach and Mark Burgin},
19
+  title		   = {Computational Completeness of Interaction Machines
20
+                  and Turing Machines},
21
+  year		   = 2012,
22
+  booktitle	   = {Turing-100 - The Alan Turing Centenary, Manchester,
23
+                  UK, June 22-25, 2012},
24
+  pages		   = {405-414},
25
+  url		   = {http://www.easychair.org/publications/paper/106520},
26
+  crossref	   = {DBLP:conf/birthday/2012turing},
27
+  timestamp	   = {Tue, 25 Jul 2017 11:35:36 +0200},
28
+  biburl	   = {http://dblp.org/rec/bib/conf/birthday/WegnerEB12},
29
+  bibsource	   = {dblp computer science bibliography, http://dblp.org}
30
+}
31
+
32
+@proceedings{DBLP:conf/birthday/2012turing,
33
+  editor    = {Andrei Voronkov},
34
+  title     = {Turing-100 - The Alan Turing Centenary, Manchester, UK, June 22-25,
35
+               2012},
36
+  series    = {EPiC Series in Computing},
37
+  volume    = {10},
38
+  publisher = {EasyChair},
39
+  year      = {2012},
40
+  url       = {http://www.easychair.org/publications/?page=1900403647},
41
+  timestamp = {Thu, 16 Jun 2016 17:11:03 +0200},
42
+  biburl    = {http://dblp.org/rec/bib/conf/birthday/2012turing},
43
+  bibsource = {dblp computer science bibliography, http://dblp.org}
44
+}
45
+
46
+@InProceedings{DBLP:conf/ipps/PizkaR02,
47
+  author	   = {Markus Pizka and Christian Rehn},
48
+  title		   = {Heaps and Stacks in Distributed Shared Memory},
49
+  year		   = 2002,
50
+  booktitle	   = {16th International Parallel and Distributed
51
+                  Processing Symposium {(IPDPS} 2002), 15-19 April
52
+                  2002, Fort Lauderdale, FL, USA, CD-ROM/Abstracts
53
+                  Proceedings},
54
+  doi		   = {10.1109/IPDPS.2002.1016494},
55
+  url		   = {https://doi.org/10.1109/IPDPS.2002.1016494},
56
+  crossref	   = {DBLP:conf/ipps/2002},
57
+  timestamp	   = {Wed, 24 May 2017 08:28:14 +0200},
58
+  biburl	   = {http://dblp.org/rec/bib/conf/ipps/PizkaR02},
59
+  bibsource	   = {dblp computer science bibliography, http://dblp.org}
60
+}
61
+
62
+@proceedings{DBLP:conf/ipps/2002,
63
+  title     = {16th International Parallel and Distributed Processing Symposium {(IPDPS}
64
+               2002), 15-19 April 2002, Fort Lauderdale, FL, USA, CD-ROM/Abstracts
65
+               Proceedings},
66
+  publisher = {{IEEE} Computer Society},
67
+  year      = {2002},
68
+  url       = {http://ieeexplore.ieee.org/xpl/mostRecentIssue.jsp?punumber=7926},
69
+  isbn      = {0-7695-1573-8},
70
+  timestamp = {Fri, 01 Aug 2014 14:26:10 +0200},
71
+  biburl    = {http://dblp.org/rec/bib/conf/ipps/2002},
72
+  bibsource = {dblp computer science bibliography, http://dblp.org}}
73
+
74
+@article{al2017chainspace,
75
+  title={Chainspace: A Sharded Smart Contracts Platform},
76
+  author={Al-Bassam, Mustafa and Sonnino, Alberto and Bano, Shehar and Hrycyszyn, Dave and Danezis, George},
77
+  journal={arXiv preprint arXiv:1708.03778},
78
+  year={2017}
79
+}
80
+
81
+@InProceedings{DBLP:conf/sp/WoodH15,
82
+  author	   = {Kerry N. Wood and Richard E. Harang},
83
+  title		   = {Grammatical Inference and Language Frameworks for
84
+                  {LANGSEC}},
85
+  year		   = 2015,
86
+  booktitle	   = {2015 {IEEE} Symposium on Security and Privacy
87
+                  Workshops, {SPW} 2015, San Jose, CA, USA, May 21-22,
88
+                  2015},
89
+  pages		   = {88-98},
90
+  doi		   = {10.1109/SPW.2015.17},
91
+  url		   = {https://doi.org/10.1109/SPW.2015.17},
92
+  crossref	   = {DBLP:conf/sp/2015w},
93
+  timestamp	   = {Fri, 26 May 2017 00:50:07 +0200},
94
+  biburl	   = {http://dblp.org/rec/bib/conf/sp/WoodH15},
95
+  bibsource	   = {dblp computer science bibliography, http://dblp.org}
96
+}
97
+
98
+@proceedings{DBLP:conf/sp/2015w,
99
+  title     = {2015 {IEEE} Symposium on Security and Privacy Workshops, {SPW} 2015,
100
+               San Jose, CA, USA, May 21-22, 2015},
101
+  publisher = {{IEEE} Computer Society},
102
+  year      = {2015},
103
+  url       = {http://ieeexplore.ieee.org/xpl/mostRecentIssue.jsp?punumber=7160794},
104
+  isbn      = {978-1-4799-9933-0},
105
+  timestamp = {Tue, 10 May 2016 13:48:24 +0200},
106
+  biburl    = {http://dblp.org/rec/bib/conf/sp/2015w},
107
+  bibsource = {dblp computer science bibliography, http://dblp.org}
108
+}
109
+
110
+@InProceedings{DBLP:conf/secdev/MomotBHP16,
111
+  author	   = {Falcon Momot and Sergey Bratus and Sven M. Hallberg
112
+                  and Meredith L. Patterson},
113
+  title		   = {The Seven Turrets of Babel: {A} Taxonomy of LangSec
114
+                  Errors and How to Expunge Them},
115
+  year		   = 2016,
116
+  booktitle	   = {{IEEE} Cybersecurity Development, SecDev 2016,
117
+                  Boston, MA, USA, November 3-4, 2016},
118
+  pages		   = {45-52},
119
+  doi		   = {10.1109/SecDev.2016.019},
120
+  url		   = {https://doi.org/10.1109/SecDev.2016.019},
121
+  crossref	   = {DBLP:conf/secdev/2016},
122
+  timestamp	   = {Fri, 17 Nov 2017 10:29:37 +0100},
123
+  biburl	   = {http://dblp.org/rec/bib/conf/secdev/MomotBHP16},
124
+  bibsource	   = {dblp computer science bibliography, http://dblp.org}
125
+}
126
+
127
+@proceedings{DBLP:conf/secdev/2016,
128
+  title     = {{IEEE} Cybersecurity Development, SecDev 2016, Boston, MA, USA, November
129
+               3-4, 2016},
130
+  publisher = {{IEEE}},
131
+  year      = {2016},
132
+  url       = {http://ieeexplore.ieee.org/xpl/mostRecentIssue.jsp?punumber=7838558},
133
+  isbn      = {978-1-5090-5589-0},
134
+  timestamp = {Fri, 17 Nov 2017 10:29:37 +0100},
135
+  biburl    = {http://dblp.org/rec/bib/conf/secdev/2016},
136
+  bibsource = {dblp computer science bibliography, http://dblp.org}
137
+}
138
+
139
+@article{costin2017lua,
140
+  title={Lua code: security overview and practical approaches to static analysis},
141
+  author={Costin, Andrei},
142
+  year={2017}
143
+}
144
+
145
+@article{wood2014ethereum,
146
+  title={Ethereum: A secure decentralised generalised transaction ledger},
147
+  author={Wood, Gavin},
148
+  journal={Ethereum Project Yellow Paper},
149
+  volume={151},
150
+  year={2014}
151
+}
152
+
153
+@Article{nakamoto2008bitcoin,
154
+	author = {Nakamoto, Satoshi},
155
+	title = {{Bitcoin: A peer-to-peer electronic cash system}},
156
+	journal = {{Consulted}},
157
+	volume = {{1}},
158
+	pages = {2012},
159
+	year = {2008},
160
+}
161
+
162
+@Article{aron2012bitcoin,
163
+	Publisher = {{Elsevier}},
164
+	author = {Aron, Jacob},
165
+	title = {{BitCoin software finds new life}},
166
+	journal = {{New Scientist}},
167
+	volume = {{213}},
168
+	number = {{2847}},
169
+	pages = {20},
170
+	year = {2012},
171
+}
172
+
173
+@article{mastercoin2013willett,
174
+	url = {{https://github.com/mastercoin-MSC/spec}},
175
+	author = {J. R. Willett},
176
+	title = {{MasterCoin Complete Specification}},
177
+	year = {2013},
178
+}
179
+
180
+@article{back2014enabling,
181
+  title={Enabling blockchain innovations with pegged sidechains},
182
+  author={Back, Adam and Corallo, Matt and Dashjr, Luke and Friedenbach, Mark and Maxwell, Gregory and Miller, Andrew and Poelstra, Andrew and Tim{\'o}n, Jorge and Wuille, Pieter},
183
+  journal={URL: http://www. opensciencereview. com/papers/123/enablingblockchain-innovations-with-pegged-sidechains},
184
+  year={2014}
185
+}
186
+
187
+@incollection{bocek2018smart,
188
+  title={Smart Contracts--Blockchains in the Wings},
189
+  author={Bocek, Thomas and Stiller, Burkhard},
190
+  booktitle={Digital Marketplaces Unleashed},
191
+  pages={169--184},
192
+  year={2018},
193
+  publisher={Springer}
194
+}
195
+
196
+@book{fowler2010domain,
197
+  title={Domain-specific languages},
198
+  author={Fowler, Martin},
199
+  year={2010},
200
+  publisher={Pearson Education}
201
+}
202
+
203
+@article{barrett2009satisfiability,
204
+  title={Satisfiability Modulo Theories.},
205
+  author={Barrett, Clark W and Sebastiani, Roberto and Seshia, Sanjit A and Tinelli, Cesare},
206
+  journal={Handbook of satisfiability},
207
+  volume={185},
208
+  pages={825--885},
209
+  year={2009}
210
+}
211
+
212
+@article{de2011satisfiability,
213
+  title={Satisfiability modulo theories: introduction and applications},
214
+  author={De Moura, Leonardo and Bj{\o}rner, Nikolaj},
215
+  journal={Communications of the ACM},
216
+  volume={54},
217
+  number={9},
218
+  pages={69--77},
219
+  year={2011},
220
+  publisher={ACM}
221
+}
222
+
223
+@article{o2017smart,
224
+  title={Smart Contracts-Dumb Idea},
225
+  author={O'Hara, Kieron},
226
+  journal={IEEE Internet Computing},
227
+  volume={21},
228
+  number={2},
229
+  pages={97--101},
230
+  year={2017},
231
+  publisher={IEEE}
232
+}

+ 177 - 0
docs/article/views/template.tex

@@ -0,0 +1,177 @@
1
+\documentclass[a4paper]{extarticle}
2
+\usepackage{lmodern}
3
+$if(fontsize)$
4
+\usepackage[$fontsize$]{extsizes}
5
+$endif$
6
+\usepackage{fullpage}
7
+\usepackage{longtable}
8
+\usepackage{booktabs}
9
+\usepackage{amssymb,amsmath}
10
+\usepackage{ifxetex,ifluatex}
11
+\usepackage{fixltx2e} % provides \textsubscript
12
+\ifnum 0\ifxetex 1\fi\ifluatex 1\fi=0 % if pdftex
13
+  \usepackage[T1]{fontenc}
14
+  \usepackage[utf8x]{inputenc}
15
+\else % if luatex or xelatex
16
+  \ifxetex
17
+    \usepackage{mathspec}
18
+  \else
19
+    \usepackage{fontspec}
20
+  \fi
21
+  \defaultfontfeatures{Ligatures=TeX,Scale=MatchLowercase}
22
+\fi
23
+% use upquote if available, for straight quotes in verbatim environments
24
+\IfFileExists{upquote.sty}{\usepackage{upquote}}{}
25
+% use microtype if available
26
+\IfFileExists{microtype.sty}{%
27
+\usepackage{microtype}
28
+\UseMicrotypeSet[protrusion]{basicmath} % disable protrusion for tt fonts
29
+}{}
30
+\usepackage{hyperref}
31
+\hypersetup{unicode=true,
32
+            pdftitle={$title$},
33
+            pdfauthor={$author$},
34
+            $if(keywords)$
35
+            pdfkeywords={$for(keywords)$$keywords$$sep$; $endfor$},
36
+            $endif$
37
+            pdfborder={0 0 0},
38
+            breaklinks=true}
39
+\urlstyle{same}  % don't use monospace font for urls
40
+\usepackage{xcolor}
41
+$if(listings)$
42
+\usepackage{listings}
43
+\lstset{
44
+    basicstyle=\ttfamily,
45
+%    numbers=left,
46
+    numberstyle=\footnotesize,
47
+    stepnumber=2,
48
+    numbersep=5pt,
49
+    backgroundcolor=\color{black!10},
50
+    showspaces=false,
51
+    showstringspaces=false,
52
+    showtabs=false,
53
+    tabsize=2,
54
+    captionpos=b,
55
+    breaklines=true,
56
+    breakatwhitespace=true,
57
+    breakautoindent=true,
58
+    linewidth=\textwidth
59
+}
60
+$endif$
61
+\usepackage{color}
62
+\usepackage{fancyvrb}
63
+\newcommand{\VerbBar}{|}
64
+\newcommand{\VERB}{\Verb[commandchars=\\\{\}]}
65
+\DefineVerbatimEnvironment{Highlighting}{Verbatim}{commandchars=\\\{\}}
66
+% Add ',fontsize=\small' for more characters per line
67
+\newenvironment{Shaded}{}{}
68
+\newcommand{\KeywordTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
69
+\newcommand{\DataTypeTok}[1]{\textcolor[rgb]{0.56,0.13,0.00}{{#1}}}
70
+\newcommand{\DecValTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
71
+\newcommand{\BaseNTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
72
+\newcommand{\FloatTok}[1]{\textcolor[rgb]{0.25,0.63,0.44}{{#1}}}
73
+\newcommand{\ConstantTok}[1]{\textcolor[rgb]{0.53,0.00,0.00}{{#1}}}
74
+\newcommand{\CharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
75
+\newcommand{\SpecialCharTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
76
+\newcommand{\StringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
77
+\newcommand{\VerbatimStringTok}[1]{\textcolor[rgb]{0.25,0.44,0.63}{{#1}}}
78
+\newcommand{\SpecialStringTok}[1]{\textcolor[rgb]{0.73,0.40,0.53}{{#1}}}
79
+\newcommand{\ImportTok}[1]{{#1}}
80
+\newcommand{\CommentTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textit{{#1}}}}
81
+\newcommand{\DocumentationTok}[1]{\textcolor[rgb]{0.73,0.13,0.13}{\textit{{#1}}}}
82
+\newcommand{\AnnotationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
83
+\newcommand{\CommentVarTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
84
+\newcommand{\OtherTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{{#1}}}
85
+\newcommand{\FunctionTok}[1]{\textcolor[rgb]{0.02,0.16,0.49}{{#1}}}
86
+\newcommand{\VariableTok}[1]{\textcolor[rgb]{0.10,0.09,0.49}{{#1}}}
87
+\newcommand{\ControlFlowTok}[1]{\textcolor[rgb]{0.00,0.44,0.13}{\textbf{{#1}}}}
88
+\newcommand{\OperatorTok}[1]{\textcolor[rgb]{0.40,0.40,0.40}{{#1}}}
89
+\newcommand{\BuiltInTok}[1]{{#1}}
90
+\newcommand{\ExtensionTok}[1]{{#1}}
91
+\newcommand{\PreprocessorTok}[1]{\textcolor[rgb]{0.74,0.48,0.00}{{#1}}}
92
+\newcommand{\AttributeTok}[1]{\textcolor[rgb]{0.49,0.56,0.16}{{#1}}}
93
+\newcommand{\RegionMarkerTok}[1]{{#1}}
94
+\newcommand{\InformationTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
95
+\newcommand{\WarningTok}[1]{\textcolor[rgb]{0.38,0.63,0.69}{\textbf{\textit{{#1}}}}}
96
+\newcommand{\AlertTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
97
+\newcommand{\ErrorTok}[1]{\textcolor[rgb]{1.00,0.00,0.00}{\textbf{{#1}}}}
98
+\newcommand{\NormalTok}[1]{{#1}}
99
+\usepackage{graphicx,grffile}
100
+\makeatletter
101
+\def\maxwidth{\ifdim\Gin@nat@width>\linewidth\linewidth\else\Gin@nat@width\fi}
102
+\def\maxheight{\ifdim\Gin@nat@height>\textheight\textheight\else\Gin@nat@height\fi}
103
+\makeatother
104
+% Scale images if necessary, so that they will not overflow the page
105
+% margins by default, and it is still possible to overwrite the defaults
106
+% using explicit options in \includegraphics[width, height, ...]{}
107
+\setkeys{Gin}{width=\maxwidth,height=\maxheight,keepaspectratio}
108
+\IfFileExists{parskip.sty}{%
109
+\usepackage{parskip}
110
+}{% else
111
+\setlength{\parindent}{0pt}
112
+\setlength{\parskip}{6pt plus 2pt minus 1pt}
113
+}
114
+
115
+% previously included by writedown in options.sty
116
+\setlength{\parindent}{1.25em}
117
+\setlength{\parskip}{.2em}
118
+\usepackage{etoolbox}
119
+\AtBeginEnvironment{quote}{\parskip 1em}
120
+
121
+\setlength{\emergencystretch}{3em}  % prevent overfull lines
122
+\providecommand{\tightlist}{%
123
+  \setlength{\itemsep}{0pt}\setlength{\parskip}{0pt}}
124
+\setcounter{secnumdepth}{0}
125
+% Redefines (sub)paragraphs to behave more like sections
126
+\ifx\paragraph\undefined\else
127
+\let\oldparagraph\paragraph
128
+\renewcommand{\paragraph}[1]{\oldparagraph{#1}\mbox{}}
129
+\fi
130
+\ifx\subparagraph\undefined\else
131
+\let\oldsubparagraph\subparagraph
132
+\renewcommand{\subparagraph}[1]{\oldsubparagraph{#1}\mbox{}}
133
+\fi
134
+% END OF CONFIG    ------------------------------------------
135
+
136
+% START OF CONTENT ------------------------------------------
137
+
138
+\title{$title$}
139
+$if(subtitle)$
140
+\providecommand{\subtitle}[1]{}
141
+\subtitle{$subtitle$}
142
+$endif$
143
+$if(author)$
144
+\author{$for(author)$$author$$sep$ \and $endfor$}
145
+$endif$
146
+$if(institute)$
147
+\providecommand{\institute}[1]{}
148
+\institute{$for(institute)$$institute$$sep$ \and $endfor$}
149
+$endif$
150
+\date{$date$}
151
+$if(logo)$
152
+\logo{\includegraphics{$logo$}}
153
+$endif$
154
+
155
+\begin{document}
156
+
157
+\maketitle
158
+
159
+\begin{abstract}
160
+$abstract$
161
+\end{abstract}
162
+
163
+\providecommand{\keywords}[1]{\textbf{\textit{Keywords---}} #1}
164
+$if(keywords)$
165
+    \keywords{$for(keywords)$$keywords$$sep$; $endfor$}
166
+$endif$
167
+
168
+\pagebreak[4]
169
+{
170
+\setcounter{tocdepth}{3}
171
+\tableofcontents
172
+}
173
+\pagebreak[4]
174
+
175
+$body$
176
+
177
+\end{document}

+ 1 - 0
docs/article/writedown

@@ -0,0 +1 @@
1
+Subproject commit 7b97cdb16568f02be623b42b3ba5cceba0615880