版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
1、1Program entanglement, feature interaction and the Feature Language Extensions (FLX)Francis LeungComputer ScienceIllinois Institute of Technology2Ideal Software DevelopmentModular ProgramminglEach functionality of an application can be developed as a reusable program module independent of other modu
2、leslEach new release is an integration of new modules and existing moduleslReality: the programs of different functionalities entangles in the same module; new releases are developed by changing existing code.Automated VerificationlThere is a tool that can automatically verify whether an application
3、 satisfies assertions about itlTodays software relies on case by case testing.3Why cant we use automated verifier like the hardware designers?HardwarelFinite state machinelBoolean logicSoftwarelState variables may not be bounded (e.g. integer)lMust reason on predicate logic whose variables have comp
4、lex data structures (e.g. Is the linked list empty?)4FLX approach to the verification problemAn executable FLX program is compiled into a finite state machine even if state variables are unbounded.A new first order satisfiability algorithm that does not require iterations of solving a SAT problem.W.
5、H. Leung, “On the Verifiability of Programs Written in the Feature Language Extensions,” HASE07.5OutlineIntroductionThe feature interaction problemThe foundation constructs of the Feature Language Extensions (FLX)Exception handling and extensibility in FLXConclusion6Some terminologyA feature is some
6、 functionality of an application. It is also called a concern, an aspect etc. in the literature.lCongestion control and reliable data transport are two features of TCPlPlain old telephone call, call forwarding are two features of a telephony applicationThe programs of two features are entangled if t
7、hey appear in the same method or function.When a feature is implemented by changing the code of another feature, it implies that their programs are entangled.7What It Takes to Add Features to SW TodayThe programmer develops Call Waiting by changing the code of POTSCall Forwarding is developed by cha
8、nging the code of Call Waiting and POTSRetry is developed by changing the code of Call Forwarding, Call Waiting and POTS, and so onThe programmer is not just implementing one feature. He must thoroughly understand change the code and test many featuresFeatures are not reusable without each otherlThe
9、y are “entangled”POTS as An Example8How does entangled code look like?9OutlineIntroductionlThe software verification challengelThe program entanglement problemThe feature interaction problemThe foundation constructs of the Feature Language Extensions (FLX)Exception handling and extensibility in FLXC
10、onclusion10Why Are We Still Writing Entangled Code?The programmer is not experiencedThe programmer is not well trainedThe programmer is not given enough time and resources.Because they use top-downIt is due to object oriented programmingIt is due to water fall“Whoever blames will later be blamed. Th
11、e times they are a changing” I. Bob DylanIt is because they do not follow a plan (agile programming)No, because they use bottom-upThe programmers cannot help it!11Entanglement Conditions*C1: If features interact;C2: Executed by the same sequential process; andC3: Implemented by a programming languag
12、e that require specification of execution flowsThe programs of these features will inevitably entangle.If features do not interact, their programs do not have to be entangled.*W. H. Leung, “Program entanglement, feature interaction and the Feature Language Extensions,” Computer Networks, Feb., 20071
13、2TerminologyTwo features interact if their behavior changes when integrated togetherA feature is implemented by computer programsThe behavior of a feature is its execution flow and output for a given inputAn interaction condition is a condition under which the behavior of the interacting features ch
14、anges.lvalue of variables, a particular point in the execution pathAn interaction condition is resolved by specification of the changed behavior13Examples of feature interactionAdding call forwarding or do not disturb changes the behave of POTS when the phone is calledAdding congestion control chang
15、es the behavior of reliable data transport when a duplicated acknowledgement is receivedAdding exception handling changes the behavior of the application program when the system throws an exceptionA new release typically will consist of new features that change the behavior of old features14Another
16、Example of Entangled CodeWhen a function throws a new exception, programs that call the function may have to be changedPrograms that transitively (indirectly) call the function may also have to be changedExisting programming languages offer very little help to programmersMany popular programs hang o
17、ften because exceptions are not handledFunction throws a new exception15What is the solution?Is it sufficient to put all the blue, green, orange and purple code into separate files (or modules)?To implement purple, you still have to go through and often times change blue, green and orange.Purple can
18、not be understood by itself.Purple cannot be reused without blue, green, and orange.16Requirements for solving the program entanglement problemProgrammers add features by changing the code of other featuresThey must manually read large amount of code to determine where to make the changesThe program
19、s of interacting features are entangled in the same reusable program unitFeatures cannot be reused without each otherThe programs of interacting features can be developed independent of one anotherThere is a tool to automatically detect feature interaction conditionsFeatures can be integrated withou
20、t changing the code of other featuresFeatures can be reused independent of one another17OutlineIntroductionlThe software verification challengelThe program entanglement problemThe feature interaction problemlThe entanglement conditionslRequirements for the solutionThe foundation constructs of the Fe
21、ature Language Extensions (FLX)Exception handling and extensibility in FLXConclusion18FLX is meant for feature rich componentsPhoneDigit AnalysisFeature PackageCall ProcessingFeature PackagePhone AgentRouter19FLX relaxes C3 and supports non-procedural programmingA program unit consists of a conditio
22、n and a program bodyWhen a condition becomes true, the corresponding program body is executedProgrammer does not sequence the execution order of the program unitsProgram Unit 1Program Unit 2Program Unit NCondition 1Condition 2Condition NProgram Body 1Program Body 2Program Body N.20An Example Program
23、 UnitIdleRingingTerm-requestReceiveCall condition: state.equals (State.IDLE);event: TerminationRequest e; Ringing r = new Ringing (e.FromPhoneID);rt.sendEvent ( r); state = State.RINGING; 21Features and feature packages written in FLX are reusableFeatures are written based on a model instead of the
24、code of other featuresFeatures and feature packages are integrated in a feature packageOne can integrate different combinations of features and feature packages into different feature packagescallwaiting3-wayhomeinter-comselectivcallforwardcallpick-upBasicTelephonyPOTSresidentialpackagebusinesspacka
25、geDomainAnchor feature22An Example Domain Statementdomain BasicTelephony variables: DTenum State (DIALING, OUTPULSING, BUSY, AUDIBLE, TALKING, RINGING, DISCONNECT, IDLE;State state = State.IDLE; events: TerminationRequest; Busy; Ringing;Answer;Disconnect; Onhook;Offhook;Digits;TimeOut;resources:Phon
26、e fone;Router rt;23An Anchor Featureanchor feature Pots domain BasicTelephony;MakeCall condition: state.equals(State.IDLE);event: Offhook; fone.applyDialTone();state = State.DIALING; ReceiveCall RingPhone OutpulseDigits 24An Example FeatureFeature DoNotDisturb domain BasicTelephony;anchorPots;SayBus
27、y condition: all;event: TerminationRequest e; Busy b = new Busy(e.FromPhoneID);rt.sendEvent ( b); 25An Example Feature Packagefeature package QuietPhone domain: BasicTelephony;features:DoNotDisturb, Pots, CatchAll;PriorityPrecedence DoNotDisturb, Pots, CatchAll;The priority precedence list specifies
28、 that when an interaction condition becomes true, the program unit belonging to the feature with the highest precedence gets executed.26Feature InteractionTwo program units interact if the conjunction of their condition parts is satisfiable.Two features interact if a program unit in one feature inte
29、racts with a program unit in the other feature.Do not disturbSayBusy condition: state.equals(State.IDLE);event: Term-request e; Busy b = new Busy(e.fromPID):rt.sendEvent (b); (2) Call Forwarding ForwardCall condition: state.equals (State.IDLE);event: Term-request e; If (forwardNumber != “” & for
30、wardNumber != e.fromPID) rt.send (forwardNumber, e); stop; 27Feature interaction resolution using program unitsfeature package SelectiveForwarding PriorityPrecedence: DND, CF, POTS;.selectToForward condition: state.equals(State.IDLE);event: Term-request e; if (phoneIDlist.contains(e.FromPhoneID) DND
31、; else CF; stop;28Straight PrecedenceWhen an interaction condition becomes true, program units of the features will be executed according to their precedence.feature Billing domain: BasicTelephony; anchor: POTS;StartMeter condition: state.equals(State.AUDIBLE); event: Answer e; CallRecord=new CallRe
32、cord (e.fromPID); meter.start (1 second); feature package NoFreeCalls domain:BasicTelephony; features: Billing,Pots; straightPrecedence (Billing, Pots);29Multiple precedence listsMultiple precedence lists may lead to order or type contradictions. Contradiction may be resolved by program units.featur
33、e package BilledQuietPhone domain: BasicTelephony;feature: DND, Billing, POTS, CatchAll;straightPrecedence (Billing, POTS);priorityPrecedence (Billing, CatchAll);priorityPrecedence (DND, POTS, CatchAll);30It is sufficient to only implement priority and straight precedence lists*All contradiction fre
34、e precedence list sets can be represented by a matrix like this.* L. Yang, A. Chaven, K. Ramachandra, W. H. Leung, Resolving feature interaction using precedence lists in the Feature Language Extensions,” ICFI07.31OutlineIntroductionlThe software verification challengelThe program entanglement probl
35、emThe feature interaction problemlThe entanglement conditionslRequirements for the solutionThe foundation constructs of the Feature Language Extensions (FLX)lModel: domain statement, anchor featurelFeatures and feature packageslPrecedence listsException handling and extensibility in FLXConclusion32R
36、eusable FLE exception features example 1exception feature CatchAll domain: BasicTelephony;anchor: Pots;catch condition: all;event: any; System.out.println (“CatchAll: unexpected condition and event”);this.dump (domain, event);33Reusable FLE exception featureexample 2exception feature DamageControl d
37、omain: RobustTelephony;anchor: Pots;illegalOnhook condition: state.NotEquals(State.IDLE);event: Onhook; System.out.println (“Illegal Onhook”);fone.disable ();stop ();brokenRingCkt condition: all;event: RingCktBrokenException e; System.out.println (“Major Alarm: Ring CKT broken:”, e.id); stop ();34Ex
38、tending a domain statementdomain RobustTelephony extends BasicTelephony exceptions:RingCKTBrokenException;ConfCKTBrokenException;/ and others35Putting them togetherfeature package RobustSCFdomain: RobustTelephony;features: SelectiveCallForwarding, DamageControl, CatchAll;PriorityPrecedence: DamageCo
39、ntrol, SelectiveForwarding, CatchAll;36Some properties of exception handling and extensibility in FLXException handlinglNormal processing features and exception handling features can be developed independentlylException features confines the scope of exceptionslExceptions handling does not have a di
40、fferent control flow modellSupports the complete set of termination modelsExtensibilitylA model can evolve without changing existing codelOriginal features can be integrated with features developed with the evolved model37OutlineIntroductionlThe software verification challengelThe program entanglement problemThe feature interaction problemlThe entanglement conditionslRequirements for the solutionThe foundation constructs of the Feature Language Extensions (FLX)lDom
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 面向steam教育的2024《荷塘月色》教學(xué)課件開發(fā)
- 2024關(guān)于保護(hù)環(huán)境的演講(35篇)
- 2021年-某局黨組對于機(jī)構(gòu)編制工作情況報(bào)告(匯編)
- 初中文言實(shí)詞虛詞歸納總結(jié)
- 2024年KUKA機(jī)器人培訓(xùn):打造未來智能制造人才
- 六頂思維的帽子全文
- 2024年電影《信條》公開課教案:教學(xué)方法論
- 工業(yè)機(jī)器人編程:2024年安川機(jī)器人培訓(xùn)手冊
- 2025版高考語文一輪復(fù)習(xí)專項(xiàng)對點(diǎn)練22鑒賞現(xiàn)代詩歌的語言和表達(dá)技巧含解析
- 2025屆高考生物一輪復(fù)習(xí)課后限時(shí)集訓(xùn)2細(xì)胞中的元素及無機(jī)化合物含解析新人教版
- 2024全新物業(yè)服務(wù)培訓(xùn)
- 山東省日照地區(qū)2024-2025學(xué)年八年級(jí)上學(xué)期期中考試數(shù)學(xué)試題(含答案)
- 《地產(chǎn)公司圖紙管理辦法》的通知
- 中華民族共同體概論學(xué)習(xí)通超星期末考試答案章節(jié)答案2024年
- 世界慢阻肺日
- 2024年資格考試-CPSM認(rèn)證考試近5年真題附答案
- 混料機(jī)的安全操作規(guī)程有哪些(8篇)
- 期中 (試題) -2024-2025學(xué)年譯林版(三起)英語六年級(jí)上冊
- 2024秋期國家開放大學(xué)《財(cái)務(wù)報(bào)表分析》一平臺(tái)在線形考(作業(yè)一至五)試題及答案
- 國家基本醫(yī)療保險(xiǎn)、工傷保險(xiǎn)和生育保險(xiǎn)藥品目錄(2023年)
- GB/T 37356-2019色漆和清漆涂層目視評(píng)定的光照條件和方法
評(píng)論
0/150
提交評(píng)論