<?xml version="1.0" encoding="UTF-8"?>
<TEI xml:space="preserve" xmlns="http://www.tei-c.org/ns/1.0" 
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
xsi:schemaLocation="http://www.tei-c.org/ns/1.0 https://raw.githubusercontent.com/kermitt2/grobid/master/grobid-home/schemas/xsd/Grobid.xsd"
 xmlns:xlink="http://www.w3.org/1999/xlink">
	<teiHeader xml:lang="en">
		<fileDesc>
			<titleStmt>
				<title level="a" type="main">Symbolic Execution of Satellite Control Procedures in Graph-Transformation-Based EMF Ecosystems</title>
			</titleStmt>
			<publicationStmt>
				<publisher/>
				<availability status="unknown"><licence/></availability>
			</publicationStmt>
			<sourceDesc>
				<biblStruct>
					<analytic>
						<author>
							<persName><forename type="first">Nico</forename><surname>Nachtigall</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Université du Luxembourg</orgName>
								<address>
									<country key="LU">Luxembourg</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Benjamin</forename><surname>Braatz</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Université du Luxembourg</orgName>
								<address>
									<country key="LU">Luxembourg</country>
								</address>
							</affiliation>
						</author>
						<author>
							<persName><forename type="first">Thomas</forename><surname>Engel</surname></persName>
							<affiliation key="aff0">
								<orgName type="institution">Université du Luxembourg</orgName>
								<address>
									<country key="LU">Luxembourg</country>
								</address>
							</affiliation>
						</author>
						<title level="a" type="main">Symbolic Execution of Satellite Control Procedures in Graph-Transformation-Based EMF Ecosystems</title>
					</analytic>
					<monogr>
						<imprint>
							<date/>
						</imprint>
					</monogr>
					<idno type="MD5">11B2203BEE5682F8B85468AF171E35CA</idno>
				</biblStruct>
			</sourceDesc>
		</fileDesc>
		<encodingDesc>
			<appInfo>
				<application version="0.7.2" ident="GROBID" when="2023-03-24T03:08+0000">
					<desc>GROBID - A machine learning software for extracting information from scholarly documents</desc>
					<ref target="https://github.com/kermitt2/grobid"/>
				</application>
			</appInfo>
		</encodingDesc>
		<profileDesc>
			<textClass>
				<keywords>
					<term>symbolic execution</term>
					<term>graph transformation</term>
					<term>test case generation</term>
					<term>triple graph grammars</term>
					<term>EMF henshin</term>
				</keywords>
			</textClass>
			<abstract>
<div xmlns="http://www.tei-c.org/ns/1.0"><p>Symbolic execution is a well-studied technique for analysing the behaviour of software components with applications to test case generation. We propose a framework for symbolically executing satellite control procedures and generating test cases based on graph transformation techniques. A graph-based operational symbolic execution semantics is defined and the executed procedure models are used for generating test cases by performing model transformations. The approach is discussed based on a prototype implementation using the Eclipse Modelling Framework (EMF), Henshin and ECLiPSe-CLP tool ecosystem.</p></div>
			</abstract>
		</profileDesc>
	</teiHeader>
	<text xml:lang="en">
		<body>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="1">Introduction</head><p>Symbolic execution <ref type="bibr" target="#b3">[4]</ref> is a well-studied technique for analysing the behaviour of software components with applications to test case generation. The main idea is to abstract from possibly infinite or unspecified behaviour. Uninitialised input variables or external function calls are represented by symbolic variables with the sets of possible concrete input values as value domains. Consequently, symbolic program execution is rather based on symbols than on concrete values leading to symbolic expressions which may restrict the value domains of the symbols. For each execution path, a path constraint (PC) is defined by a dedicated boolean symbolic expression. Solving the expression, i.e., finding a valuation for all contained symbolic variables so that the expression is evaluated to true, provides concrete input values under which the corresponding path is traversable. An execution path is traversable as long as its path constraint is solvable.</p><p>In this paper, we propose a framework for symbolically executing satellite control procedures (SCPs) and generating test cases based on graph transformation techniques <ref type="bibr" target="#b5">[6]</ref>. We successfully apply graph transformation techniques in an industrial project with the satellite operator SES (Société Européenne des Satellites) for an automatic translation of SCPs from proprietary programming languages to SPELL (Satellite Procedure Execution Language &amp; Library) <ref type="bibr" target="#b7">[8]</ref>.</p><p>The safety-critical nature of SCPs implies that extensive testing is required after</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head>Proceedings of MoDeVVa 2013</head><p>translation. The presented approach allows us to generate tests without leaving this graph-transformation-based ecosystem. We define a graph-based operational semantics for symbolically executing SCPs for a subset of the SPELL language. The executed procedure models are used for generating test cases by performing model transformations. We discuss our approach based on a prototype implementation using the EMF Henshin <ref type="bibr" target="#b6">[7]</ref> and ECLiPSe-CLP <ref type="bibr" target="#b8">[9]</ref> tools.</p><p>Sec. 2 introduces the symbolic execution framework. In Sec. 3, the graphbased operational symbolic execution semantics is defined. Sec. 4 presents model transformation rules for test case generation and a prototype implementation for the approach. Sec. 5 concludes the paper and compares with related work.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="2">Models &amp; Symbolic Execution Framework</head><p>The symbolic execution framework in Fig. <ref type="figure">1</ref> uses the abstract syntax tree (AST) of a procedure, which defines a typed attributed graph <ref type="bibr" target="#b5">[6]</ref>. The AST can be constructed by parsing the source code with appropriate tools (see Sec. 4). The AST graph is symbolically executed using two graph transformation systems (GTSs). A GTS is a set of graph transformation rules where each rule may create or delete nodes and edges or update attribute values. In phase one, the GTS GTS F low is used to annotate AST with execution flow information leading to graph AF = AST + FLOW . In phase two (symbolic execution), the GTS GTS Sym is exhaustively applied to AF leading to graphs State i = AF + SYM i , i = 1..n representing the status of the execution.</p><p>Fig. <ref type="figure" target="#fig_0">2</ref> shows the running example in a small subset of the SPELL language <ref type="bibr" target="#b7">[8]</ref>. SCP "Charge Batteries" retrieves the state of charge (SC) of both batteries of a satellite, defines a minimal threshold min of 50%, and switches to the battery with higher SC if it exceeds min. Otherwise, an alert is issued. Meta-model SCP specifies the general syntax of ASTs for such procedures. A procedure Proc consists of a list of statements Stmnt (assignments Asg, function calls FnCall, definitions FnDef or branching If structures) with explicit next pointers. Function calls contain a list of arguments (arg) and function definitions contain a list of parameters (pm). An assignment contains a variable (var) and an assigned expression (ex). Expressions (Expr) are either numbers (Number), variables (Var) or Boolean expressions (Bool) with operator (&lt;, &lt;=, &gt;, &gt;=, and, or) and operands (left (le) and right (ri)). Complex statements (If,FnDef) contain a block (B) that references a list of statements. Furthermore, If statements have a boolean condition cond and may have else and ElIf structures (edge el). The AST for the procedure is a graph typed over meta-model SCP. Graph FLOW represents the flow annotation of AST . Places P are assigned (dotted edges asg) to nodes in AST that should x &gt; min :</p><formula xml:id="formula_0">6 Send ( ' S W I T C H _ B 1 &amp; 7 C H A R G E _ B 2 ') 8 9</formula><p>ELIF y &gt; min :  be executed. P nodes can be connected by f,l or n edges in order to indicate which other nodes need to be executed at first, next or last before finishing the execution of a node, e.g., in order to execute the procedure (node Proc), the assignment in line 13 (node Asg) needs to be executed first. For each execution path, a Token representing the current execution point with path constraint is created (in total six Tokens for the example). In graph SYM n , the Token node on place P that is assigned to node Proc indicates that the procedure was evaluated (eval=true) with path constraint pc=and(and(S 0 &gt;S 1 ,S 0 &gt;50),not(and(S 0 &lt;=50,S 1 &lt;=50))) and symbolic variables S 0 , S 1 (Symb) for GetTM('SC1') and GetTM('SC2') by entering line 6 but not line 23. The resulting graphs State 1..n can be used for model checking invariants, detection of dead model fragments or test generation.</p><formula xml:id="formula_1">10 Send ( ' S W I T C H _ B 2 &amp; 11 C H A R G E _ B 1 ') 12 13 s0 = GetTM ( ' SC1 ') 14 s1 = GetTM ( ' SC2</formula></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="3">Operational Execution Semantics</head><p>The execution semantics is divided into the execution flow of the AST graph and the token semantics for traversing all flow paths. Fig. <ref type="figure" target="#fig_1">3</ref> shows the rules of GTS F low and GTS Sym in short-hand notation, i.e., nodes and edges marked with &lt;+&gt; are created, those marked with &lt;-&gt; are deleted and attribute values of the form [x=&gt;y] are updated from x to y when applying the rule. Nodes marked with &lt;tr&gt; have a "hidden" translation attribute that is updated [false=&gt;true] during rule application so that the rule is only applied once. A more formal definition of graph transformation in general is given in <ref type="bibr" target="#b5">[6]</ref>.</p><p>Rule Init 1 specifies that the first statement of a procedure needs to be executed first. An initial token is put on the first place with path constraint true and eval=false. Rule Stmnt 1 defines that successive statements need to be executed successively. Note that the first statement in Fig. <ref type="figure" target="#fig_0">2</ref> is a FnDef. Therefore, another rule defines that the succeeding statement needs to be executed first until there is no more FnDef. Rule Asg 1 defines that the expression of an assignment needs to be evaluated first before assigning the resulting value. The rule for blocks is defined analogously. Rule Bool 1 defines that the left operand has to be evaluated before the right operand. Rule If 1 , branches the flow -the condition is evaluated before executing the block (hi -positive condition) or an "empty" place (lo -negative condition). Rule ElIf 1 links the "empty" place of rule If 1 to the alternative If. Rule Else 1 is defined analogously.</p><p>Rule TFst 2 moves the token to the first child place (edge f) as long as possible. Rule TNxt 2 moves the token of an evaluated place to the next place (edge n) and changes attribute eval to false. The rules implement a left-most inner-most evaluation strategy. Rule GetTM 2 evaluates each GetTM-FnCall to a path-wide unique symbolic variable (Symb) S i (uniqueness is given by token attribute sym which is increased by one). Note that Symbs are ordered in their occurence of evaluation which is important for a later test generation. Rule GetTM 2 requires that a last Symb already exists. An analogue rule creates a last Symb if not existent. Rule Asg 2 assigns the term of the evaluated expression to the variable Var and sets the assignment as evaluated by moving token edge on. Rule BoolAnd both evaluated operands with and. Analogue rules for boolean expressions with other operators (or,&lt;,&gt;,etc.) are defined. Amalgamated rule Branch 2 duplicates the token with all connected variables and symbols, negates the condition (not(t)) for the lo path and concatenates the condition with the path constraint. Rule Check 2 checks, if the path constraints of duplicated tokens are still satisfiable after a branch (attribute condition sat(pc)=true). If the path constraint of a token becomes unsatisfiable, the token status eval remains check and the token can not be moved any more. After simulating the example in Fig. <ref type="figure" target="#fig_0">2</ref>, three tokens from six possible paths are assigned to node Proc with eval=true while the other three tokens remain at the last If statement with unsolvable path constraints. Only tokens that are assigned to node Proc with eval=true are considered during test case generation (they represent execution paths with solvable path constraints). Additional rules are defined for annotating and traversing function calls and definitions. A function is traversed every time it is called so that global side effects in execution can be respected, e.g., operations on call by reference arguments.</p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="4">Implementation &amp; Test Case Generation</head><p>A procedure is parsed with Xtext <ref type="bibr" target="#b4">[5]</ref> to an EMF AST graph first. Then, the EMF Henshin tool <ref type="bibr" target="#b6">[7]</ref> is used in combination with the ECLiPSe constraint solver <ref type="bibr" target="#b8">[9]</ref> to execute the AST graph by automatic rule applications and satisfiability checking / solving constraints. The AST graph is completely preserved during execution. Correspondences between symbolic variables of path constraints (nodes of type Symb) and AST graph structures are used for test generation by applying the forward model transformation (FT) rules in Fig. <ref type="figure" target="#fig_2">4</ref>. An FT rule <ref type="bibr" target="#b7">[8]</ref> consists of a source graph G S , correspondence graph G C and target graph G T . While G S is parsed, nodes and edges in G C , G T are created. Applying the rules yields a graph that is serialised to test case files with Xtext. Rule Proc2Test creates a Test suite for a procedure. Rule Token2Case creates a test case for each execution path with solvable path constraint. Rule LstSymb2KeyElem adds a key tm for each last (edge lst) evaluated GetTM(tm) function call of an execution path to the test case with a list containing a test input valuation for symbolic variable s as first (edge fst) element so that path constraint pc is satisfied (solve(s,pc)). A second rule handles all previous symbolic variables. Symbolic variables are ordered in order to reflect the sequential execution order of the represented GetTM function calls which is needed for proper test generation with test inputs in correct order. </p></div>
<div xmlns="http://www.tei-c.org/ns/1.0"><head n="5">Conclusion &amp; Related Work</head><p>We have presented a framework for symbolically executing simple satellite procedures. The approach preserves the correspondences between symbolic variables and the AST, so that the result graph can be used for test case generation by performing model transformations afterwards. A prototype implementation for the symbolic execution and test case generation framework has been presented. In contrast to interpreter based symbolic execution engines <ref type="bibr" target="#b0">[1,</ref><ref type="bibr" target="#b2">3]</ref> of programming languages, our graph-transformation-based approach allows symbolic execution on a more abstract level enabling its formal analysis and application to other languages and behavioural diagrams in future work. In <ref type="bibr" target="#b1">[2]</ref>, an abstract symbolic execution framework based on term rewriting is proposed. In contrast to our approach, the correspondences between symbolic variables and the program term are not preserved. Research on how to transfer and enhance results from term to graph rewriting approaches for symbolic execution is topic of future work. In <ref type="bibr" target="#b9">[10]</ref>, the execution of UML state machines is presented but diagrampath-constraint correspondences are not specified explicitly.</p><p>In future work, we plan to extend the symbolic execution semantics for applicability to industrial SPELL SCPs <ref type="bibr" target="#b7">[8]</ref> and analyse its correctness w.r.t. a formal SPELL semantics that needs to be defined first. We will investigate important properties of symbolically executed models that should be preserved during model refactorings and how to ensure their preservation. Moreover, we will assess the scalability of our approach.</p></div><figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_0"><head>Fig. 2 .</head><label>2</label><figDesc>Fig. 2. SCP meta-model (top), SCP "Charge Batteries" (left), SCP model (AST), flow annotation (FLOW) and symbolic execution elements (SYMn)</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_1"><head>Fig. 3 .</head><label>3</label><figDesc>Fig. 3. Rules for annotation (top, GTS Flow ) and symbolic execution (bottom, GTS Sym )</figDesc></figure>
<figure xmlns="http://www.tei-c.org/ns/1.0" xml:id="fig_2"><head>Fig. 4 .</head><label>4</label><figDesc>Fig. 4. Rules for test case generation</figDesc></figure>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_0">Symbolic Execution of Satellite Control Procedures in Graph-Transformation-Based EMF Ecosystems</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_1">Proceedings of MoDeVVa 2013</note>
			<note xmlns="http://www.tei-c.org/ns/1.0" place="foot" xml:id="foot_2">Symbolic Execution of Control Procedures in Graph-Transformation-Based EMF Ecosystems</note>
		</body>
		<back>
			<div type="references">

				<listBibl>

<biblStruct xml:id="b0">
	<analytic>
		<title level="a" type="main">JPF-SE: A symbolic execution extension to java pathfinder</title>
		<author>
			<persName><forename type="first">S</forename><surname>Anand</surname></persName>
		</author>
		<author>
			<persName><forename type="first">C</forename><forename type="middle">S</forename><surname>Pasareanu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">W</forename><surname>Visser</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">TACAS</title>
		<imprint>
			<biblScope unit="page" from="134" to="138" />
			<date type="published" when="2007">2007</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b1">
	<monogr>
		<title level="m" type="main">A Generic Approach to Symbolic Execution</title>
		<author>
			<persName><forename type="first">A</forename><surname>Arusoaie</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Lucanu</surname></persName>
		</author>
		<author>
			<persName><forename type="first">V</forename><surname>Rusu</surname></persName>
		</author>
		<idno>RR-8189</idno>
		<imprint>
			<date type="published" when="2012-12">Dec 2012</date>
		</imprint>
		<respStmt>
			<orgName>INRIA</orgName>
		</respStmt>
	</monogr>
	<note type="report_type">Tech. Rep.</note>
</biblStruct>

<biblStruct xml:id="b2">
	<analytic>
		<title level="a" type="main">Klee: unassisted and automatic generation of high-coverage tests for complex systems programs</title>
		<author>
			<persName><forename type="first">C</forename><surname>Cadar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Dunbar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">D</forename><surname>Engler</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proceedings of the 8th USENIX conference on Operating systems design and implementation</title>
				<meeting>the 8th USENIX conference on Operating systems design and implementation<address><addrLine>Berkeley, CA, USA</addrLine></address></meeting>
		<imprint>
			<publisher>USENIX Association</publisher>
			<date type="published" when="2008">2008</date>
			<biblScope unit="page" from="209" to="224" />
		</imprint>
	</monogr>
	<note>OSDI&apos;08</note>
</biblStruct>

<biblStruct xml:id="b3">
	<analytic>
		<title level="a" type="main">Symbolic execution for software testing: three decades later</title>
		<author>
			<persName><forename type="first">C</forename><surname>Cadar</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Sen</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Commun. ACM</title>
		<imprint>
			<biblScope unit="volume">56</biblScope>
			<biblScope unit="issue">2</biblScope>
			<biblScope unit="page" from="82" to="90" />
			<date type="published" when="2013-02">Feb 2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b4">
	<monogr>
		<ptr target="http://www.eclipse.org/Xtext/" />
		<title level="m">The Eclipse Foundation: Xtext</title>
				<imprint>
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b5">
	<analytic>
		<title level="a" type="main">Fundamentals of Algebraic Graph Transformation</title>
		<author>
			<persName><forename type="first">H</forename><surname>Ehrig</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Ehrig</surname></persName>
		</author>
		<author>
			<persName><forename type="first">U</forename><surname>Prange</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Taentzer</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="s">EATCS Monographs in Theoretical Computer Science</title>
		<imprint>
			<date type="published" when="2006">2006</date>
			<publisher>Springer</publisher>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b6">
	<monogr>
		<title/>
		<author>
			<persName><surname>Emf Henshin</surname></persName>
		</author>
		<ptr target="http://www.eclipse.org/modeling/emft/henshin/" />
		<imprint>
			<date type="published" when="2013">2013</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b7">
	<analytic>
		<title level="a" type="main">On an Automated Translation of Satellite Procedures Using Triple Graph Grammars</title>
		<author>
			<persName><forename type="first">F</forename><surname>Hermann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">S</forename><surname>Gottmann</surname></persName>
		</author>
		<author>
			<persName><forename type="first">N</forename><surname>Nachtigall</surname></persName>
		</author>
		<author>
			<persName><forename type="first">B</forename><surname>Braatz</surname></persName>
		</author>
		<author>
			<persName><forename type="first">G</forename><surname>Morelli</surname></persName>
		</author>
		<author>
			<persName><forename type="first">A</forename><surname>Pierre</surname></persName>
		</author>
		<author>
			<persName><forename type="first">T</forename><surname>Engel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. ICMT&apos;13, LNCS</title>
				<meeting>ICMT&apos;13, LNCS</meeting>
		<imprint>
			<publisher>Springer</publisher>
			<date type="published" when="2013">2013</date>
			<biblScope unit="volume">7909</biblScope>
			<biblScope unit="page" from="50" to="51" />
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b8">
	<analytic>
		<title level="a" type="main">Eclipse -from lp to clp</title>
		<author>
			<persName><forename type="first">J</forename><surname>Schimpf</surname></persName>
		</author>
		<author>
			<persName><forename type="first">K</forename><surname>Shen</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="j">Theory and Practice of Logic Programming</title>
		<imprint>
			<biblScope unit="volume">12</biblScope>
			<biblScope unit="page" from="127" to="156" />
			<date type="published" when="2012">2012</date>
		</imprint>
	</monogr>
</biblStruct>

<biblStruct xml:id="b9">
	<analytic>
		<title level="a" type="main">Symbolic execution of UML-RT State Machines</title>
		<author>
			<persName><forename type="first">K</forename><surname>Zurowska</surname></persName>
		</author>
		<author>
			<persName><forename type="first">J</forename><surname>Dingel</surname></persName>
		</author>
	</analytic>
	<monogr>
		<title level="m">Proc. of SAC &apos;12</title>
				<meeting>of SAC &apos;12</meeting>
		<imprint>
			<publisher>ACM</publisher>
			<date type="published" when="2012">2012</date>
			<biblScope unit="page" from="1292" to="1299" />
		</imprint>
	</monogr>
	<note>SAC &apos;12</note>
</biblStruct>

				</listBibl>
			</div>
		</back>
	</text>
</TEI>
