1 / 25

Portable Automotive Electronic Models using Standard XML Technologies

Portable Automotive Electronic Models using Standard XML Technologies. Syed Zia Akbar Zaidi. Department of Computer and Information Science Linköpings universitet. Contributions. Defined a simple architecture definition language (ADL) Used to model the automotive electronic systems

mya
Download Presentation

Portable Automotive Electronic Models using Standard XML Technologies

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Portable Automotive Electronic Modelsusing Standard XML Technologies Syed Zia Akbar Zaidi Department of Computer and Information ScienceLinköpings universitet

  2. Contributions • Defined a simple architecture definition language (ADL) • Used to model the automotive electronic systems • XML representation: models portable among manufacturers and suppliers • Identified the constraints of the automotive electronic field • Types of requirements • Modelling and representation of automotive electronic requirements using XML technologies • Xlinkit, XQuery, CommonRules • Case study representing a vehicle cruise controller • Modeled using our ADL • The requirements placed on the cruise controller have been modelled using xlinkit, XQuery and CommonRules

  3. Outline • Automotive Electronics The Industry Generic Architectures The Cruise Controller • Modelling AE using XML The Merits of XML The Cruise Controller Model The Cruise Controller • Requirements Modelling Requirements on the Cruise Controller XML Technologies Xlinkit, XQuery, CommonRules • Conclusions and Future Work

  4. Embedded Systems • Automotive Electronic Systems • Complex distributed embedded systems that have important requirements safety cost, and performance. • Responsible for controlling the functionality of a vehicle.

  5. Car makers Suppliers XML Automotive Industry: Interoperability

  6. What is an ADL? • An ADL is a language that provides features for modeling a hardware and software system’s conceptual architecture. • In other way, it is a high-level description of the overall interconnection structure of an architecture. • It provides formal modeling notations for architectural elements, such as components, connectors. • It also provides development tools that operate on architectural specifications, such as configuration and constraints. • It reduces cost of development. • ADLs: • Software: ACME,Rapide, C2, Darwin, MetaH, SADL, UinCon, Wright, xArch, … • Hardware: MoML, ISDL, Valen-C, MIMOLA, LISA, nML, ARC, Axys, RADL, Target, MDES, EPRESSION, …

  7. ADL Exchange: The Merit of XML • XML highly suited for ADLs“The Merit of XML as an Architecture Description Metalanguage”, Steve Pruitt et al. • Representation • Analysis • Traceability • Views • Collaboration • Repository <!-- Example in MOML --> <?xml version="1.0" standalone="no"?> <!DOCTYPE model PUBLIC "…" "http://…"> <model name="top" class="path name"> <entity name="source" class="path name"> <port name="output"/> </entity> <entity name="sink" class="path name"> <port name="input"/> </entity> <relation name="r1" class="path name"/> <link port="source.output" relation="r1"/> <link port="sink.input" relation="r1"/> </model>

  8. AE: Generic Architecture

  9. Vehicle cruise controller. • Modelled with a CPG of 32 processes and two conditions. • Mapped on 5 nodes: CEM, ABS, ETM, ECM, TCM. • Schedule: Cruise Controller Process Start WCET Resource PR1 0 0 P6 PR2 0 12 P1 PR28 0 12 P2 ARC2 12 1 B1 PR3 13 7 P2 .. .. ..

  10. XML Model for Cruise Controller • architecture.xml <NODE Name="CEM" Id="P1"> <Processor Name="AMD"><P_Type>I</P_Type></Processor> <Memory unit="KB">128</Memory> </NODE> • behaviour.xml <PROCESS Name="PR3" Id="PR3"> <WCET unit="ms">7</WCET><Memory unit="KB">2</Memory> </PROCESS> <ARC Name="ARC3" Id="ARC3"> <Src>PR3</Src><Dest>PR4</Dest><Delay unit="ms">0</Delay> </ARC> • mapping.xml <MAP Resource="P1"> <Process>PR1</Process><Process>PR2</Process><Process>PR30</Process> </MAP> • schedule.xml <SLOT Id="PR1"><Start unit="ms">0</Start><Duration unit="ms">0</Duration> <Resource>P6</Resource></SLOT> <SLOT Id="PR2"><Start unit="ms">0</Start><Duration unit="ms">12</Duration> <Resource>P1</Resource></SLOT>

  11. Requirements Engineering • RE is the branch of systems engineering concerned with • the real-world goals and constraints on systems • the relationship of these factors to precise specifications of systems behavior, and to their evolution over time and across system families. • RE Activities: • eliciting requirements • modeling and analyzing requirements • communicating requirements • agreeing requirements • evolving requirements

  12. Requirements on the Cruise Controller • Requirements on the model • The model should be consistent • Every process should be mapped to one and only one node • Every sensor/actuator should be connected • The schedule should be correct • The schedule should respect the precedence constraints • No two slots in the schedule should overlap • Cruise Controller • Timing requirements • The CC should execute within 100 ms • Resource requirements • The sum of processes’ memory on a nodeshould not exceed that node's capacity • Should be expressed using XML Technologies

  13. XQuery: An XML Query Language • W3C standard • http://www.w3.org/TR/xquery • Derived from QuiltJonathan Robie, Don Chamberlin, and Daniela Florescu • Based on XML-QL • Relevant W3C documents • XML Query Requirements • XML Query Use Cases • XQuery 1.0: An XML Query Language • XQuery 1.0 and XPath 2.0 Data Model • XQuery 1.0 Formal Semantics • XML Syntax for XQuery 1.0 (XQueryX)

  14. XQuery • To find all process names and connected sensors for processes whose worst case execution time > 10ms & memory size < 20MB. <Behavioral_Model>{ for $b in document(“Behavior.xml”)//Process where $b/WCET > 10 and $b/Memory < 20 return <Process Name = {$b/Name}>{ $b/Sensor }</Process> }</Behavioral Model> • Overview • Path expressions: XPath • Conditional expressions • FLWR (“flower”) expressions

  15. Behavioral_Model Process Sensor Name WCET Memory 12 ms PR2 10 KB CC XPath • W3C Standard • http://www.w3.org/TR/xpath • Example 1:Behavioral_Model/Process/Name • Example 2: Behavioral_Model/Process/Name [../WCET = 12] Tree Construction

  16. FOR/LET Clauses List of tuples WHERE Clause Filtered list of tuples RETURN Clause Instance of XQuery data model FLWR (“FLOWER”) Expression • “Flower” expressions FOR ... LET... FOR... LET... WHERE... RETURN... • Example: find all Processes with WCET > 14 • FOR $x IN document("behavior.xml") • // Process • WHERE $x/WCET > 14 • RETURN $x/@Id • Result: • <Process>PR6</Process> • <Process>PR8</Process> • <Process>PR31</Process>

  17. If-Then-Else • The CC should execute within 100 ms. <results>{ let $a := document("data/schedule.xml")//SLOT, $b := max(for $c in document("data/schedule.xml")//SLOT/Start returnint(string-value($c))), $d := $a[Start = $b],$e := $a[Start = $b]/Start, $f := $a[Start = $b]/Duration,$g := $b+$f return <SLOT Id={$d/@Id}>{ $e, $f} {<WCET> {$g}</WCET>, if ($g>100) then <Fault> Time Lapsed </Fault> else "WCET ok" }</SLOT>}</results>

  18. Resource Requirement Query for $map in document("data/sweb/mapping.xml")//MAP, $nod in document("data/sweb/architecture.xml")//:NODE[@Id = $map/@Resource] let $proc := document("data/sweb/behaviour.xml")//PROCESS[@Id = $map/Process] return <processor Name={$nod/@Name} Id={$nod/@Id} HasMemory={$nod/Memory/text(),$nod/Memory/@unit} MemoryUsedByScheduledProcesses={sum($proc/Memory),$nod/Memory/@unit}> { for $process in $proc return <process Name={$process/@Name} Id={$process/@Id} Memory={$process/Memory/text(),$process/Memory/@unit} /> sortby(int(substring-before(@Memory,"K"))) } </processor> sortby(int(substring-after(@Id,"P")))

  19. Resource Requirements Result query result:check_resource_consistency.xml <?xml version="1.0" ?> <quip:result xmlns:quip="http://.."> <processor Name="CEM" Id="P1" HasMemory="128KB" MemoryUsedByScheduledProcesses="20KB"> <processName="PR1" Id="PR1" Memory="1KB" /> <processName="PR31" Id="PR31" Memory="4KB" /> <processName="PR30" Id="PR30" Memory="5KB" /> <processName="PR2" Id="PR2" Memory="10KB" /> </processor> <processor Name="ABS" Id="P2" HasMemory="256KB" MemoryUsedByScheduledProcesses="25KB"> <processName="PR32" Id="PR32" Memory="1KB" /> <processName="PR27" Id="PR27" Memory="2KB" /> <processName="PR3" Id="PR3" Memory="2KB" /> <processName="PR4" Id="PR4" Memory="5KB" /> <processName="PR29" Id="PR29" Memory="7KB" /> <processName="PR28" Id="PR28" Memory="8KB" /> </processor> … </quip:result>

  20. XQuery Software • QuiP • http://www.softwareag.com/developer/downloads/default.htm • Software AG • Windows and Linux on x86 • Features • Latest W3C syntax • Graphical user interface. • Kweelt • http://kweelt.sourceforge.net/ • Open Source • Runs on all Java platforms • Problems • Older syntax, from previous W3C requirements. • No graphical user interface.

  21. Rule Language LinkGeneration Rules Rule Set Links Docunments Document Set XLink XML Rule Engine Architecture xLinkit • Xlinkit is a lightweight application service which provides rule-based link generation and checks the consistency of distributed documents and web content. • xLinkit is specially designed to validate complex documents • Semantics: first order logic

  22. Query Construction <DocumentSet name=”CruiseCtrl"> <DocFile href=”schedule.xml"/> <DocFile href=”behavior.xml"/> </DocumentSet> <RuleSet name="ScheduleRule"> <RuleFile href=“rule4.xml” xpath="/consistencyruleset/ consistencyrule"/></RuleSet> <consistencyruleset> <globalset id="schedule" xpath="/SCHEDULE/SLOT" /> <globalset id="process_behaviour" xpath="/BEHAVIOURAL_MODEL/PROCESS" /> <globalset id="arc_behaviour" xpath="/BEHAVIOURAL_MODEL/ARC" /> <consistencyrule id="r1"> <forall var="a" in="$schedule"><or> <exists var="p" in="$process_behaviour"> <and><equalop1="$a/@Id" op2="$p/@Id" /> <equalop1="$a/Duration/text()" op2="$p/WCET/text()" /></and> </exists> <exists var="c" in="$arc_behaviour"> <and><equalop1="$a/@Id" op2="$c/@Id" /> <equalop1="$a/Duration/text()" op2="$c/Delay/text()" /></and> </exists> </or> </forall> </consistencyrule></consistencyruleset>

  23. Xlinkit Results <xlinkit:ConsistencyLink ruleid="http://www.ida.liu.se/rule.xml#/ consistencyruleset/consistencyrule[1]"> <xlinkit:State>consistent</xlinkit:State> <xlinkit:Locator xlink:href="http://www.ida.liu.se/Schedule.xml#/SLOT[1]"/> <xlinkit:Locator xlink:href="http://www.ida.liu.se/Behavior.xml#/PROCESS[3]"/> </xlinkit:ConsistencyLink> <xlinkit:ConsistencyLink ruleid="http://www.ida.liu.se/rule.xml#/ consistencyruleset/consistencyrule[1]"> <xlinkit:State>inconsistent</xlinkit:State> <xlinkit:Locator xlink:href="http://www.ida.liu.se/Schedule.xml#/SLOT[3]"/> <xlinkit:Locator xlink:href="http://www.ida.liu.se/Behavior.xml#/PROCESS[15]"/> </xlinkit:ConsistencyLink>

  24. Discussion • XML technologies • Current technologies • Xlinkit: first order logic + path expressions • XQuery: relational databases + path expressions • CommonRules: logic programming • Semantic Web • DAML+OIL • RuleML

  25. Conclusions and Future Work • Simple architecture ADL with an XML representation • Modelled the cruise controller using this ADL • Automotive electronic requirements • Modelling and representation of requirements using XML technologies • Xlinkit, XQuery, CommonRules • Requirements on the cruise controller • Modelled using xlinkit, XQuery and CommonRules • Future work: • What is the advantage of using the SemanticWeb technologies? • DAML+OIL instead of XML for the ADL representation • RuleML instead of CommonRules

More Related