From b04d0f385edb387f093c3f8e157788c38be67915 Mon Sep 17 00:00:00 2001 From: Mart Lubbers Date: Sat, 23 Jan 2016 18:25:28 +0100 Subject: [PATCH] add source code in appendix --- marsrover/document/appendix.tex | 2 ++ marsrover/document/preamble.tex | 9 ++++----- marsrover/document/robot.tex | 8 ++++++++ 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/marsrover/document/appendix.tex b/marsrover/document/appendix.tex index 517710a..f41435a 100644 --- a/marsrover/document/appendix.tex +++ b/marsrover/document/appendix.tex @@ -3,3 +3,5 @@ {../../dsl/xtend/src/robots/missions/TaskDSL.xtext} \lstinputlisting[label={lst:gen},caption={Xtend code generation}] {../../dsl/xtend/src/robots/missions/generator/TaskDSLGenerator.xtend} +\lstinputlisting[label={lst:val},caption={Xtend code validation}] + {../../dsl/xtend/src/robots/missions/validation/TaskDSLValidator.xtend} diff --git a/marsrover/document/preamble.tex b/marsrover/document/preamble.tex index e600613..a696501 100644 --- a/marsrover/document/preamble.tex +++ b/marsrover/document/preamble.tex @@ -1,17 +1,17 @@ \documentclass{article} -\usepackage[dvipdfm]{hyperref} % For a clickable toc and nice autorefs \usepackage{a4wide} % For not wasting space on a4 \usepackage{booktabs} % For nicer looking tables \usepackage{enumitem} % For nice enumeration types +\usepackage[dvipdfm]{hyperref} % For a clickable toc and nice autorefs \usepackage{fancyhdr} % For the fancy header with our names +\usepackage[T1]{fontenc} % For printing the strange xtext characters +\usepackage{float} % For better table and figure placement +\usepackage{listings} % For source code listings \usepackage{longtable} % For page spanning tables \usepackage{multirow} % For multirow tables \usepackage{tabu} % For nicer automatic spanning tables -\usepackage{float} % For better table and figure placement \usepackage[all]{xypic} % For nice diagrams -\usepackage{listings} % For source code listings -\usepackage[T1]{fontenc} \title{Autonomous sequential mission execution on Mars with a multi-brick \textsc{lego}$^{\small\textcopyright}$ robot.} @@ -26,7 +26,6 @@ breaklines=true, numbers=left, frame=L, - captionpos=B, inputencoding=utf8, extendedchars=true, literate={«}{{\guillemotleft}}1{»}{{\guillemotright}}1, diff --git a/marsrover/document/robot.tex b/marsrover/document/robot.tex index 028b495..7c4b501 100644 --- a/marsrover/document/robot.tex +++ b/marsrover/document/robot.tex @@ -201,6 +201,14 @@ prefix notation is used for binary and unary operators. \caption{Robot Domain Specific Language}\label{fig:dsl} \end{figure} +To assist the user programming in the DSL small validation mechanism have been +added. It could happen that the user specifies a mission that contains two +behaviours both want control at all times. A behaviour that wants control at +all times can be a valid design but when there are two with that property, only +one will be used. To avoid such situations the IDE will warn the user when this +is the case. The full code for the code validation can be found in +\autoref{lst:val}. + \subsection{Code Structure} The complete code generation code can be found in \autoref{lst:gen}. The following enumeration shows what is specifically generated per grammar object. -- 2.20.1