Skip to content
Snippets Groups Projects
Commit a7b8931a authored by René Schöne's avatar René Schöne
Browse files

Moved presentation to other repo.

parent 36ba06bc
Branches
No related tags found
No related merge requests found
MAIN = racr-mquat.tex
BIB = refs.bib
PDF = racr-mquat.pdf
LATEX = lualatex --synctex=1
IMAGES = opt_problem.pdf \
opt_problem_sol.pdf \
gen_sol_arch.pdf \
gen.pdf \
sol.pdf \
comp_sol.pdf
CROPPED = $(IMAGES:%.pdf=images/$(basename %.pdf).pdf)
.PHONY: all clean quick images
all: $(PDF) presentation.md
images: $(CROPPED)
cp -a images/ /home/rschoene/Dokumente/HAEC/HAEC-ENASA-B01/Poster/output15
presentation.tex: presentation.md
pandoc --latex-engine=xelatex -t beamer presentation.md -o presentation.tex
$(PDF): presentation.tex $(MAIN) $(BIB) $(CROPPED)
$(LATEX) $(MAIN)
# lualatex $(MAIN)
bibtex racr-mquat
$(LATEX) $(MAIN)
$(LATEX) $(MAIN)
quick: presentation.tex $(MAIN) $(BIB) $(CROPPED)
$(LATEX) $(MAIN)
images/gen.pdf: gen.pdf
pdfcrop --margins='0 0 100 0' $< $@
images/sol.pdf: sol.pdf
pdfcrop --margins='0 0 100 0' $< $@
images/%.pdf: %.pdf
pdfcrop $< $@
clean:
rm -f *~
rm -f *.{aux,log,bbl,blg}
rm -f $(PDF)
File added
No preview for this file type
File deleted
File deleted
File deleted
doc/images/models.png

88.9 KiB

File deleted
File deleted
File deleted
#!/bin/bash
open-pdf-presenter -n notes.xml racr-mquat.pdf
---
title: RACR-MQuAT – The journey has just begun
author:
- René Schöne
header-includes:
- \usepackage{lscape}
- \usepackage{lipsum}
- \newcommand{\blandscape}{\begin{landscape}}
- \newcommand{\elandscape}{\end{landscape}}
comment:
- \setupexternalfigures[factor=fit]
---
# The past
## Where we started in Phase I
- MQuAT concept \cite{gotz2014models}
- Self-adaptive system optimizing for multiple qualities
- Component-based design for both hardware and software
- Quality contracts capturing requirements and guarantees of components
- THEATRE \cite{gotz2010theatre} as a Java-based implementation of MQuAT
- Knowledge represented using EMF-(Meta)Models
- Optimization problem solved by transformation to ILP
- Designed for distributed operation (see HAECubie) using Master-Slave-Pattern \cite{sahni1996scheduling}
\oppcomment{%
- MQuAT: approach to build self-adaptive systems <br/>%
- model-driven, component-based, use quality contracts <br/>%
- THEATRE: reference implementation <br/>%
- use EMF-models, optimization problem (shown later) solved with ILP
}
## Structure and variant model
\centerline{\includegraphics[height=0.7\textheight]{images/models.png}}
\oppcomment{%
- structure: defines types of possible components <br/>%
- variant: runtime-model (only shown for hardware here) <br/>%
}
## The optimization problem
Mapping *n* components on *m* resources
\centerline{\includegraphics[width=\linewidth]{images/opt_problem.pdf}}
\oppcomment{%
- simple architecture shown here <br/>%
- n software component, aligned in pipe-and-filter, each 2 impls, 2 modes <br/>%
- modes have contracts <br/>%
- m hardware components (workers) <br/>%
- request triggers optimization
}
## The optimization problem solved
Mapping *n* components on *m* resources
\centerline{\includegraphics[width=\linewidth]{images/opt_problem_sol.pdf}}
\oppcomment{%
- choose mapping of software components onto hardware components <br/>%
- such that requirements are fulfilled and optimal with regard to objective function
}
## What was the problem
- Usage of ILP thought *unusable* for bigger systems
- Current measurements disprove this, see slides 11 – 13
- EMF-Models and some of their elements ambiguous or redudant
- Component requirement possible on both, component- and mode-level
- Structure and variant model contain similar information
- Approach of structural model not easy to use (especially for ILP-Generation)
- Currently, ILP generated from scratch for each request
\oppcomment{%
- ILP believed to be unsusable, see slides 11-13 <br/>%
- similar information: subcomponents/subresources <br/>%
- general approach not easy to use: assumptions (mostly implicit) made for structural model (e.g. for ILP-Generation: containers are servers with one level of subresources) <br/>%
- generation of ILP always from scratch
}
# The present
## How we want to achieve scalability
- Use RACR \cite{burger2012racr}
- **R**eference **A**ttribute Grammer **C**ontrolled **R**ewriting
- Specify knowledge as an ASG\footnote{Abstract Syntax Graph, i.e. an Abstract Syntax Tree with references}
whose structure is defined by a RAG\footnote{Reference Attribute Grammar}
- RAG is a combination of structural and variant model, avoiding duplicate information
- Analyses run on ASG now run inherently **incremental** and are defined **declaratively**
\oppcomment{%
- use compiler techniques: RAGs and graph rewriting <br/>%
- tool = RACR, allows to specify AST and attributes, enables incremental analysis <br/>%
- here: structure + variant model combined to single ASG <br/>%
- attributes to compute ILP
}
## Test setup
\centerline{\includegraphics[width=\linewidth]{images/gen_sol_arch.pdf}}
\(a) Initial creation, (b) HW changes
\oppcomment{%
- want to measure time to generate and to solve ILP <br/>%
- (a) create a synthetic model, generate ILP, solve it <br/>%
- (b) simulate hardware changes, generate and solve again <br/>%
- assumption: software does not change (that frequently)
}
## Measurements
- Setup
- System Generator to generate ILP for increasing size of systems
- 23 different sizes of systems
- ILP-Solving with 40sec timeout
\vfill
- ILP-Solving using existing Java/EMF-based, old ILP format
- Timeouts: glpk 10/23, lpsolve 8/23
\vfill
- ILP-Solving using Scheme/RACR-based, enhanced ILP format
- All but one systems solved within 5sec (outlier 12sec)
\oppcomment{%
- Java <br/>%
- same problem solved, but 40% timed out
- RACR <br/>%
- chosen other format for ILP (only binary variables, no floats) <br/>%
- side result next slides
}
## Measuring generation times
- Not quite there yet:
\centerline{\includegraphics[height=0.6\textheight]{images/gen.pdf}}
\oppcomment{%
- Generation with <br/>%
- Left = Java <br/>%
- Middle = Racket <br/>%
- Right = Larceny <br/>%
- 8 seconds maximum on y axis <br/>%
- steps during synthetic scenario, increasing amount of changes
}
## Measuring solving times
- Promising results
\centerline{\includegraphics[height=0.6\textheight]{images/sol.pdf}}
\oppcomment{%
- side result from new format of ILP encoding the problem <br/>%
}
## Measuring solving times (Detailed)
\centerline{\includegraphics[height=0.65\textheight]{images/comp_sol.pdf}}
- solid = GLPK, old format, dashed = GLPK, enhanced format
- dotted = Gurobi, enhanced format ($\leq$ 1sec)
\oppcomment{%
- already big change from old to new format <br/>%
- even more using commercial solver Gurobi
}
## Current pitfalls
- Different input formats accepted by lp\_solve and glpk
- Transformation (mostly syntactical) needed
- Slow running Larceny
- Unexpected as Larceny compiles to machine code
- Caching not fully exploited
- Some constraints still unnecessarily recomputed
\oppcomment{%
- Difficult to compare solvers due to different accepted Syntax <br/>%
- Larceny expected to run faster than Racket, but does not <br/>%
- Only first implementation, improvements possible and likely
}
## General Facts
- <https://bitbucket.org/rschoene/racr-mquat>
- Main language: Scheme
--------------------------------------------------------------------------------
Language files blank comment code
------------------------- ------- ------------ ------------ ------------
Scheme 12 159 168 1222
Python 6 49 16 284
SUM: 19 212 185 1546
--------------------------------------------------------------------------------
\oppcomment{%
- java ca. 224kloc, just ILP-generator around same size as complete scheme <br/>%
- reasonable big test suite of ILP-generator testing for correctness
}
# The future
## Where we should go next
- Do not transform to ILP
- Implement a heuristic similar to RACRtune demo\footnote{Shown at HAEC review and OUTPUT'15, paper in progress} of Daniel Langner and Johannes Mey
- Apply static analysis where appropriate, e.g.
- Abstract Interpretation \cite{Cousot1977,Rosendahl1990} to estimate energy consumption \cite{Jayaseelan2006,Rusu2003}
- Describe decisions \cite{Danylenko2015}
- Eliminate unreachable configurations
- Unify constraints (in contracts) of modes
- Extend AG
- Describe multiple systems and their interaction, e.g. \cite{WSG+2013}
- Include behavior model for more fine grained description
\oppcomment{%
- vision slides <br/>%
- heuristic different from RACRtune <br/>%
- but expected to be faster than ILP, directly using features of RACR <br/>%
- static analysis (Phase II), abstract interpretation of program <br/>%
- formally describe decisions, eliminate unreachable configurations, unify constraints <br/>%
- could also go in direction of multiple systems <br/>%
<br/>%
- Comment from Markus Daun: They solve similar problems and use an own technique, also with caching. <br/>%
- Comment from Walte: He thinks, that the one-execution-at-a-time assumptions is quite strict. <br/>%
- Further he agrees, that unusable resources can also be found using static analysis.
}
## An example application of static analysis
Worst Case Execution Time (WCET) squeezing \cite{knoop2013wcet}
- Combines ILP solving with Symbolic Execution (SE) \cite{King1976}
- Iterative, alternating, automatic approach
- SE either tightens found bound – or proves it precise
\vfill
Application to HAEC use case
- Do Worst Case Energy Consumption (WCEC) squeezing
- based on energy contracts
\oppcomment{%
- approach of Jens Knoop, estimates WCET using ILP <br/>%
}
File deleted
\documentclass[english]{beamer}
\usetheme[pagenum,section,smallrightmargin]{tud}
\setbeamertemplate{navigation symbols}{}
\title{RACR - MQuAT}
\subtitle{The journey has just begun}
\author{René Schöne}
\faculty{Fakultät Informatik}
\institute{Institut für Software- und Multimediatechnik}
\chair{Lehrstuhl Softwaretechnologie}
\date{\today}
% more preamble...
\usepackage[T1]{fontenc}
\usepackage{lmodern}
\usepackage{babel}
\usepackage{selinput}
\usepackage{luacode}
\usepackage{longtable}
\usepackage{booktabs}
\usepackage{multicol}
\bibliographystyle{alpha}
\setbeamersize{text margin right=15pt}
%\DeclareTextCommandDefault{\textbullet}{\ensuremath{\bullet}}
\begin{luacode*}
newline = function()
return "\n";
end
tab = function()
return "\t";
end
\end{luacode*}
\newcommand{\oppcomment}[1]{\directlua{
if (notestring == nil) then
notestring = "<notes>" .. newline();
init = 1;
end
notestring = notestring
.. tab() .. "<note number ='\insertpagenumber'>" .. newline()
.. "SLIDE" .. tab() .. " \insertframenumber" .. newline();
% if ("\secname" == "") then
% notestring = notestring .. newline()
% else
% notestring = notestring .. "SECTION" .. tab() .. " \thesection " .. " - \secname " .. newline()
% end
% if ("\subsecname" == "") then
% notestring = notestring .. newline()
% else
% notestring = notestring .. "SUBSEC" .. tab() .. " \thesubsection " .. " - \subsecname " .. newline()
% end
notestring = notestring .. "SEC" .. tab() .. " \thesection " .. newline()
% notestring = notestring .. "SUBSEC" .. tab() .. " \thesubsection " .. newline()
local content = "#1";
notestring = notestring
.. newline()
.. "==================================================" .. newline() .. newline()
.. content:gsub("<br/>", newline()) .. newline()
.. tab() .. "</note>" .. newline();
}}
%
\newcommand{\oppend}{\directlua{
if notestring == nil
then
else
assert(io.open("notes.xml", 'w')):write(notestring .. " </notes> ");
end
}}
\begin{document}
\maketitle
\input{"presentation.tex"}
\oppend
%allowframebreaks,
\begin{frame}[t,allowframebreaks]%[shrink=5]
%\begin{multicols}{2}[\frametitle{\insertsection} \usebeamertemplate{frametitle}]
\frametitle{References}
\footnotesize
%\nocite{*}
\bibliography{refs}
%\end{multicols}
\end{frame}
\end{document}
@article{sahni1996scheduling,
title={Scheduling master-slave multiprocessor systems},
author={Sahni, Sartaj},
journal={IEEE transactions on Computers},
number={10},
pages={1195--1199},
year={1996},
publisher={IEEE}
}
@incollection{gotz2014models,
title={A Models@ run. time Approach for Multi-objective Self-optimizing Software},
author={G{\"o}tz, Sebastian and K{\"u}hn, Thomas and Piechnick, Christian and P{\"u}schel, Georg and A{\ss}mann, Uwe},
booktitle={Adaptive and Intelligent Systems},
pages={100--109},
year={2014},
publisher={Springer}
}
@book{gotz2010theatre,
title={{THEATRE Resource Manager Interface Specification v. 1.0}},
author={G{\"o}tz, Sebastian and Wilke, Claas and Cech, Sebastian and Waltsgott, Johannes and Fritzsche, Ronny and Reimann, Jan and Schmidt, Matthias},
year={2010},
publisher={Techn. Univ., Fakult{\"a}t Informatik}
}
@article{burger2012racr,
title={RACR: A Scheme library for reference attribute grammar controlled rewriting},
author={B{\"u}rger, Christoff},
year={2012}
}
@inproceedings{Cousot1977,
address = {New York, New York, USA},
author = {Cousot, Patrick and Cousot, Radhia},
booktitle = {Proceedings of the 4th ACM SIGACT-SIGPLAN symposium on Principles of programming languages - POPL '77},
doi = {10.1145/512950.512973},
month = jan,
pages = {238--252},
publisher = {ACM Press},
title = {{Abstract interpretation}},
url = {http://dl.acm.org/citation.cfm?id=512950.512973},
year = {1977}
}
@inproceedings{Jayaseelan2006,
author = {Jayaseelan, R. and Mitra, T.},
booktitle = {12th IEEE Real-Time and Embedded Technology and Applications Symposium (RTAS'06)},
doi = {10.1109/RTAS.2006.17},
isbn = {0-7695-2516-4},
issn = {1545-3421},
keywords = {Batteries,Embedded computing,Embedded software,Embedded system,Energy consumption,Mission critical systems,Mobile computing,Real time systems,Scheduling algorithm,Timing},
pages = {81--90},
publisher = {IEEE},
shorttitle = {Real-Time and Embedded Technology and Applications},
title = {{Estimating the Worst-Case Energy Consumption of Embedded Software}},
url = {http://ieeexplore.ieee.org/lpdocs/epic03/wrapper.htm?arnumber=1613325},
year = {2006}
}
@phdthesis{Danylenko2015,
author = {Danylenko, Antonia},
booktitle = {PhD thesis, Linnaeus University},
keywords = {Decision Algebra,classification,classifier,decision functions,decision models},
pages = {170},
school = {Linnaeus University, V\"{a}xj\"{o}, Sweden},
title = {{Decision Algebra: A General Approach to Learning and Using Classifiers}},
year = {2015}
}
@article{Rusu2003,
author = {Rusu, Cosmin and Melhem, Rami and Moss\'{e}, Daniel},
doi = {10.1145/950162.950166},
issn = {15399087},
journal = {ACM Transactions on Embedded Computing Systems},
keywords = {Power management,operating systems,real-time,reward-based,scheduling},
month = nov,
number = {4},
pages = {537--559},
publisher = {ACM},
title = {{Maximizing rewards for real-time applications with energy constraints}},
url = {http://dl.acm.org/citation.cfm?id=950162.950166},
volume = {2},
year = {2003}
}
@article{Rosendahl1990,
author = {Rosendahl, Mads},
isbn = {0-387-53101-7},
month = sep,
pages = {143--156},
publisher = {Springer-Verlag New York, Inc.},
title = {{Abstract interpretation using attribute grammars}},
url = {http://dl.acm.org/citation.cfm?id=91976.91992},
year = {1990}
}
@incollection{WSG+2013,
author = {Weyns, Danny and Schmerl, Bradley and Grassi, Vincenzo and Malek, Sam and Mirandola, Raffaela and Prehofer, Christian and Wuttke, Jochen and Andersson, Jesper and Giese, Holger and G\"{o}schka, Karl M.},
booktitle = {Software Engineering for Self-Adaptive Systems II},
pages = {76--107},
publisher = {Springer},
title = {{On patterns for decentralized control in self-adaptive systems}},
volume = {7475 LNCS},
year = {2013}
}
@inproceedings{knoop2013wcet,
title={WCET squeezing: on-demand feasibility refinement for proven precise WCET-bounds},
author={Knoop, Jens and Kov{\'a}cs, Laura and Zwirchmayr, Jakob},
booktitle={Proceedings of the 21st International conference on Real-Time Networks and Systems},
pages={161--170},
year={2013},
organization={ACM}
}
@article{King1976,
author = {King, James C.},
doi = {10.1145/360248.360252},
file = {:home/rschoene/.local/share/data/Mendeley Ltd./Mendeley Desktop/Downloaded/King - 1976 - Symbolic execution and program testing.pdf:pdf},
issn = {00010782},
journal = {Communications of the ACM},
keywords = {program debugging,program proving,program testing,program verification,symbolic execution,symbolic interpretation},
month = jul,
number = {7},
pages = {385--394},
publisher = {ACM},
title = {{Symbolic execution and program testing}},
url = {http://dl.acm.org/citation.cfm?id=360248.360252},
volume = {19},
year = {1976}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment