Software development objectives
This presentation is the property of its rightful owner.
Sponsored Links
1 / 81

Software development : Objectives PowerPoint PPT Presentation


  • 47 Views
  • Uploaded on
  • Presentation posted in: General

Introduction The problem Error recovery techniques . A complement for the Hardware. Satisfy the ever growing requirements of the customers. SOFTWARE QUALITY . Software development : Objectives. Evlolution of the goals. Introduction The problem Error recovery techniques .

Download Presentation

Software development : Objectives

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Software development objectives

Introduction

Theproblem

Error recoverytechniques...

  • A complementforthe Hardware

  • Satisfytheevergrowingrequirements of thecustomers

  • SOFTWARE QUALITY

Software development: Objectives

Evlolution of thegoals


Software quality

Introduction

Theproblem

Error recoverytechniques...

Software Quality

Goal:toobtainhighquality software

¿Software Quality?

Factors:

  • Usability

  • Reliability

    • Correction

    • Robustness

  • Speed

  • Satisfaction of requirements

  • Others


Software robustness

Introduction

Theproblem

Error recoverytechniques...

Software Robustness

“Software robustness can be defined as the degree to which a system or component can function correctly in the presence of invalid inputs or stressful environmental conditions”

  • Depends of:

    • Technologicalresources

    • Programmer’sskills.

  • Technologicalresources in OOP? Exceptionhandlingmechanisms.


Exception handling mechanism

Introduction

Theproblem

Error recoverytechniques...

ExceptionHandlingmechanism

  • Error recoverygoal: Maintaintheconsistency of thesystem

  • Itcoverspart of thetasksthatmustbehandled....

    ... butdelegatesotherstodevelopers (disallowing).

  • some of these tasks can be implemented automatically by means of the information contained in the model, savingworktodevelopers.

    • Makingeasierreadibility and themaintenance of thecodeavoidingtheimplementation of proceessesnotstraigthmodel-related.

ExceptionHandling


Thesis

Introduction

Theproblem

Error recoverytechniques...

Thesis

Weconsider:

The modern object-oriented languages can be extended with a new semantic layer that complements current exception-handling mechanisms, simplifying the implementation of these processes purely oriented to consistency maintenance in the presence of exceptional scenarios.


Goals

Introduction

Theproblem

Error recoverytechniques...

Goals

Tocomplement OO paradignwithmechanismstomakemaintenance of consistencyeasier in thosescenarioswherethat can be done automatically.

Considerations:

  • Wewanttodeveloper a practicalsolutionfor usual problems.

  • Realisticdevelopmentscompliant.

  • Legacycode compatible

  • Languagespecificationsmustberespected.

  • Maintenable

  • Withrealistic and feasible performance rates.


Software development objectives

Contents

Introduction

Theproblem

Error recoverytechniques

Error recoverysolutions

Ourproposal

Design

Ariadna

Evaluation of theresults

Conclusions


Robustness

Introduction

Theproblem

Error recoverytechniques...

Robustness.

Goal: robust software.

Ideally...: Avoidtheocurrence of an error in thesystem

  • Strict Software Correctiontechniques

  • Strict control of the software developmentprocess.

  • Others.

    Drawbacks:

  • Human factor

  • Notevery error comes from a problem of thesystem.

    … Experienceevidencesthatcompletley error-free software cannotbedeveloperd … (Bertrand Meyer)

    Robustnesswarranty: In case an error happens, itmustnotsuppouse a fail in thesystem.


Robustness1

Introduction

Theproblem

Error recoverytechniques...

Robustness

Whatmustbecoveredbyguarantee?

  • No information of theuser can belost.

    A textproccessor, beforeexitingabnormally, savesthedocument.

  • Theconsistency of thesystemmustbemaintained in presence of errors.

    Ifan error occurswhileweempty a waterreservoir (thelockgateis open), Shouldthelockgateremain open?

  • E Ifnone of themcouldbeachieved, a programmedexitof thesystemmustbe done.

    Whenthe error cannotbedesallowed, theend of theprocesssmustbefaced as organized as possible.


Current scenary error recovery

Introduction

Theproblem

Error recoverytechniques...

Currentscenary: Error recovery


What do languages cover

  • detection

  • localization

  • disallowing

  • detection

  • localization

  • ¿disallowing?

Introduction

Theproblem

Error recoverytechniques...

What do languagescover?

Languagewithoutexceptions

Languagewithexceptions

C,Basic,LISP,ensamblador,etc.

Error eventrutine

Example in C:

Ternaryrelationship

#include <signal.h>

voidterminationhandler (intsignum) {

structtempfile p;

for (p = temp file list; p; p = p−>next)

unlink (p−>name);}

intmain (void) {

...

if (signal (SIGINT, terminationhandler) == SIG IGN)

signal (SIGINT, SIG IGN);

if (signal (SIGHUP, terminationhandler) == SIG IGN)

signal (SIGHUP, SIG IGN);

… }


Disallowing with exception handling mechanism

Introduction

Theproblem

Error recoverytechniques...

DisallowingwithExceptionHandlingmechanism

Options

Ignore

Determinados tipos de error sujetos a condiciones transitorias.

try

{

while ( <n−times condition> )

{

try {

doAnything();

<delay n seconds>

break;

}

catch ( MyExpectedException e){

//Nothingto do ...

}

}

}

try

{

doAnything();

}

catch ( AnyException)

{

¿…?

}

Es posible ignorar los errores en métodos y subsistemas no ligados al objetivo principal del sistema.

try

{

//The method whose

errors are not important ...

doAnything()

}

catch {AnyException e}

{

//Nothingto do...

<log message ...>

}

Ignore it

Retry

undo

Retry

Recoverability of the

State/consistency

Undo

New consistentstate

New consistentstate


Recoverability

Introduction

Theproblem

Error recoverytechniques...

Recoverability?


Limitations of the exception handling mechanism

Introduction

Theproblem

Error recoverytechniques...

Limitationsof theExceptionHandlingmechanism

classCounter {

privateintcount;

public void inc(){count++;}

public void reset(){count=0;} }

try

{

counter.inc();

anotherObject.methodThatFails();

//salta una excepción…

}

catch ( AnyException)

{

How can decrease the counter?

}

Vector rotated = new Vector();

try

{

//Se añade la figura rotada al vector

paint.rotate(rotated);

}

catch ( AnyException)

{

Which was each figure original position?

}

Itguaranteesthatthecode in the catch block willbeexecuted:

  • Doesnotguaranteetherestoration of theconsistency

  • Don’tknowwhatshouldberestored.

  • Sometimesweknow, butitcannotbe done

  • Sometimesit can be done, butwe do notknowhow

try

{

doAnything();

doAnotherThing();

doTheLastThing();

}

catch ( AnyException)

{

¿…?

}

  • try

  • {

  • paint.rotate();

  • }

  • catch ( AnyException)

  • {

  • ¿Which figures haverotated?

  • }


  • Limitations of the exception handling mechanism1

    Introduction

    Theproblem

    Error recoverytechniques...

    Limitationsof theExceptionHandlingmechanism

    Problem:

    ExceptionHandlingmechanisms do notcovertheneedings of thedevelopertoreachmodel’srecoverabilitywhenan error occurrs. (error recovery)

    It forces the developers to implemen customized solutions fot these scenarios.

    All of them can be solved by means of design patterns

    But

    It forces to apply them for each scenary without reusing it.


    Software development objectives

    Contents

    Introduction

    Theproblem

    Error recoverytechniques

    Error recoverysolutions

    Ourproposal

    Design

    Ariadna

    Evaluation of theresults

    Conclusions


    Error recovery techniques

    Theproblem

    Error recoverytechniques...

    Error recoverysolutions

    Error recoverytechniques

    Clasification:


    Backward error recovery

    Theproblem

    Error recoverytechniques...

    Error recoverysolutions

    Backward Error Recovery

    Theyassumethatthelaststate of thesystembeforethecurrentoperationwasconsistent.

    So, they try toreturntothisstate.

    Generally, they are basedontheregister of thechangesoccurred in thesystem.

    Applicability:

    • Faulttolerance

    • Mobile agents.

    • Extension of ExceptionHandlingmechanism

      Threestrategiesplus adaptations:

    • Checkpointing

    • Audit Trial

    • Recovery Cache


    Backward error recovery1

    Theproblem

    Error recoverytechniques...

    Error recoverysolutions

    Backward Error Recovery

    • Checkpointing

      • RecoveryPoints

      • Generation

        • Random

        • Synchronize

        • Hybridsolutions

      • Highmemoryusage.

    • Audit Trial

      • Onlythechanges are stored.

      • Less heavy but more complicatedimplementation

    • Recovery Caché

      • Hybridsolution.


    Forward error recovery

    Theproblem

    Error recoverytechniques...

    Error recoverysolutions

    Forward Error Recovery

    Thecurrentstateismodifiedtoreach a new consistentstate.

    Most popular:

    • Exceptionhandlingtechniques

    • Compensationstrategies

      • Theconsistency of thesystemdoesnotdependonlyfromtheinternalmodelstate.


    Reversion

    Theproblem

    Error recoverytechniques...

    Error recoverysolutions

    Reversion

    N.V. Tikhomirovafor OO.

    “Restoringonlythechangesoccurred in themodelisnotenoughtoundothechanges in the global system”

    Someactions can haveeffectsout of thescope of theobjectmodel.


    Logging techniques

    Theproblem

    Error recoverytechniques...

    Error recoverysolutions

    Loggingtechniques

    BER & FER related

    Mostsolutions are closeto:


    Software development objectives

    Presentation

    Introduction

    Theproblem

    Error recoverytechniques

    Error recoverysolutions

    Ourproposal

    Design

    Ariadna

    Evaluation of theresults

    Conclusions


    Error recovery solutions

    Error recoverytechniques...

    Error recoverysolutions

    Ourproposal

    Error recoverysolutions

    Differentapproaches

    • Integrated in theprogramminglanguages.

    • Basedontheextension of the virtual machine

    • Basedondesignpatterns.

    • Basedon meta-programming

    • Basedonframeworks

    • Basedonexternallibrariesortransactionalproducts.

    • Hybrids.


    Software development objectives

    Contents

    Introduction

    Theproblem

    Error recoverytechniques

    Error recoverysolutions

    Ourproposal

    Design

    Ariadna

    Evaluation of theresults

    Conclusions


    Our proposal

    Error recoverysolutions

    Ourproposal

    Design

    Ourproposal

    Wepretend:

    • Toextend OO languageswith a recoverabilitymechanismsthatcomplementsExceptionHandlingmechanism, covering:

      • Makeeasiertomaintaintheconsistency of thesystem, notonly in theinternalobjectmodel.

      • Respectinglanguages’ specifications (No more new languages, please!)

      • Avoidthemisuse of theelementsof thelanguage.

      • Avoidthedetermination of thedesignas possible.

      • Complexityfromthepoint of thedevelopermustbedecreased.


    Concept of reconstructor

    Error recoverysolutions

    Ourproposal

    Design

    Concept of Reconstructor

    A reconstructor is an element specialized in restoring the consistency of a specific part of the model. It can do it restoring the previous state or compensating some actions whose effects fall out beyond the scope of the model.

    Whenan error occurs, thereconstructormustdisallowtheeffect of theactionsexecutedfromthebeginning of theinterruptedoperation.

    • Restoringthepreviuosstate

    • Compensatinganyexecuted compensable action


    Reconstructors working way

    Error recoverysolutions

    Ourproposal

    Design

    Reconstructors’ workingway

    • each reconstructor can disallow one specific change that has happened during an operation execution, so a reconstructor will be created each time a reconstructable action is executed.

    • As they are created, the reconstructors are stacked in the reconstruction path

    • Reconstruction paths are organized in reconstructioncontexts.

    • Theoperation can:

      • Finishsuccessfully, so thereconstructioncontext can bediscarded

      • Be interruptedbyanexception, so theconsistencyisrestoredexecutingallthereconstructors in thecontextin the reverse order from that in which they were created


    Implicit reconstructors

    Error recoverysolutions

    Ourproposal

    Design

    Implicitreconstructors

    • Implicit reconstructors apply an audit trial strategy (39) to store any change produced in a reconstructable attribute (that is, any attribute whose state affects the consistency of the system).

    • Any time that one of these attributes is modified, an implicit reconstructor specialized in the task of restoring the attribute to its previous value is generated and added to the current context’s reconstruction path

    ReconstructionPath

    object.setA(5);

    object.setA(6);

    throwException

    Set A=5

    Set A=0


    Explicit reconstructors

    Error recoverysolutions

    Ourproposal

    Design

    Explicitreconstructors

    • Specialized in the execution of compensation methods

    • Explicit reconstructors are expected to restore not the state but the consistency of the system, disallowing the actions whose effects fall beyond the object model compromising global consistency (compensable actions).

    • An explicit reconstructor is divided into two parts:

      • The compensation method, which must be implemented by the developer.

      • A specialized object whose task consists in the invocation of the compensation method, managing the parameters it needs to do its work.


    Explicit reconstructors1

    Error recoverysolutions

    Ourproposal

    Design

    Explicitreconstructors

    compensatePrepareDeliverycompensatesprepareDelivery, but… Whoinvokesthismethod?

    Compensationmethod: Handmadecustomizedbythedeveloper

    Invocationlogic: Automaticallymanaged..


    Sending parameters to reconstructors

    Error recoverysolutions

    Ourproposal

    Design

    Sendingparameterstoreconstructors

    Compensationbasedsolutionfor prepare delivery can beimproved.

    Ifwewanttorestorthe film toits original place... Whichwas?

    Theinformationthatthecompensationmethdosneedstoundotheactionmadebythe compensable methodsisat leastthesamethatthelatterreceived [Cri79]

    So, theexplicitreconstructorneedstoreceive at leastthesameparametersthatthecompelsablemethodreceived.


    Determined reconstructions

    Error recoverysolutions

    Ourproposal

    Design

    Determinedreconstructions

    Reconstructionpolicy can depend of manyfactorsbeyondthe original parameters set, likethe time.

    Example: Reconstruction process where switching off a biological samples fridge is disallowed

    Exception

    • Reconstruction

    • Iflessthan 30 minutes

      • Startagain

    • Else,

    • Discardsamples

    • Notify


    Determined reconstructions1

    Error recoverysolutions

    Ourproposal

    Design

    Determinedreconstructions

    • We refer to those parameters that the compensation method needs beyond the ones received by its compensable method as additional parameters.


    Reconstruction contexts

    Error recoverysolutions

    Ourproposal

    Design

    ReconstructionContexts

    Op1;

    Op2;

    <createcontext>

    If ( everything ok?)

    <discardcontext>

    else

    <reconstructcontext>

    Noteveryoperationmustbereconstructable.

    Tiillnow,

    OneonlyReconstructionPath Complete reconstructions

    Weneedtodelimitthescope of thereconstruction -> Contexts

    A Context per reconstructionpath.

    Everyreconstructorwillberelatedto a context

    Reconstructableoperations


    Reconstruction contexts simple contexts

    Error recoverysolutions

    Ourproposal

    Design

    ReconstructionContexts–Simple Contexts

    Explicitopening and closing

    Closingthecontext:

    • Reconstruction

      • Wefirereconsructors in the reverse ordertheywerecreated.

      • Wedestroythem once executed

    • Discardingthecontext

      • Operationfinishedsuccessfully.

      • Fullyintegratedwiththe try/catch/finally block.


    Nested contexts

    int XXX = 8;

    <new Context>

    object.setXXX(7)

    <new Context>

    object.setXXX(5);

    object.setXXX(3);

    <context closing>

    object.m();

    Object.setXXX(2);

    Context

    n

    Context N

    R

    Context N

    Set XXX=8

    Context N+1

    InvokecompensateM

    SetXXX=8

    Set XXX=3

    Set XXX=7

    Context N

    Set XXX=5

    InvokecompensateM

    D

    Set XXX=3

    Set XXX=8

    FromContext N+1

    Set XXX=7

    Set XXX=5

    InvokecompensateM

    Set XXX=3

    Error recoverysolutions

    Ourproposal

    Design

    Nestedcontexts

    Whathappensifwecreate a contextinsideanopenedone?

    Thesecondisnestedtothefirst.

    • Ifthesubcontextisreconstructed→ Itsreconstructors are fired

    • Ifitisdiscarded→ Itsreconstructors are inserted in itsparent’sreconstructionpath

    Context n+1


    Independent contexts

    int XXX = 8;

    <new Context>

    object.setXXX(7)

    <new Context>

    object.setXXX(5);

    object.setXXX(3);

    <context closing>

    object.m();

    Object.setXXX(2);

    Context

    n

    Context N

    R

    Context N

    Set XXX=8

    Context N+1

    InvokecompensateM

    SetXXX=8

    Set XXX=3

    Set XXX=7

    Context N

    Set XXX=5

    InvokecompensateM

    Set XXX=3

    Error recoverysolutions

    Ourproposal

    Design

    Independentcontexts

    Sometimes, somecontexts are notinterestingforthe global reconstructionformanyreasons:

    They are out of date (Ej, disallowingthelastprintled line in a printermakessenceonlyinmediatelyafterprintingit), unimportant, others.

    .

    Context n+1

    D

    Set XXX=8

    InvokecompensateM

    Set XXX=3


    Suspending contexts

    private int a = 5;

    public void execute(…)

    {

    object.setA(6);

    <context halting>

    object.setA(9);

    <context resume>

    object.setA(8);

    <exception raising>

    }

    1

    2

    3

    4

    1

    2

    3

    4

    Set A = 9

    ignored reconstructor

    Ignored reconstructor

    Set A = 5

    Set A = 5

    Set A = 5

    Error recoverysolutions

    Ourproposal

    Design

    Suspendingcontexts

    Independentcontextsallowtocreateparenthesis in theReconstructionPath, buttheycreate and discardreconstructors.

    A suspended contextdoesnotallow new reconstructorsuntilitisresumed.

    ReconstructorA=6 isnotadded


    Software development objectives

    Contents

    Introduction

    Theproblem

    Error recoverytechniques

    Error recoverysolutions

    Ourproposal

    Design

    Ariadna

    Evaluation of theresults

    Conclusions


    Target platforms

    Ourproposal

    Design

    Ariadna

    Target platforms

    OO Industrynowadays

    Lowlevel

    Widestscope

    General purpose

    Agile development, scripting, quickprototyping


    Architecture of the solution

    Ourproposal

    Design

    Ariadna

    Architecture of thesolution

    • None of theknownalternativessatisfiesalltherequirements.

    • Combination of:

      • Framework

      • Reflectivity

      • @OP, integratedthroughannotations.


    Implicit reconstructors1

    Ourproposal

    Design

    Ariadna

    Implicitreconstructors

    Relatedtoanattribute

    Everytimeanattributeismodifiedusingsetter A new reconstructoriscreated.

    Theattributeisreconstructable


    Explicit reconstructors2

    Ourproposal

    Design

    Ariadna

    Explicitreconstructors

    Basedon

    • Thedefinition of a compensationmethod

    • Nameconvention

      Thename of thecompensationmethodmustbe preceded by __

    • Activation of thereconstructorusingtheannotationreconstructor


    Explicit reconstructors sending additional i nfo

    Ourproposal

    Design

    Ariadna

    Explicitreconstructors: Sendingadditionalinfo

    Twotasks:


    Design

    Ourproposal

    Design

    Ariadna

    Design

    Implicitreconstructors

    • Memento + Command

    • In thereconstructableobject, methodreconstruct(equiv.execute)

      Explicitreconstructors

    • Command.

    publicvoidreconstruct(ImplicitReconstructor reconstructor) throwsAnyException {

    <Sets the value received into the reconstructor>

    }

    publicreconstructableMethod(param1,param2, ... ,paramN)

    {

    <new ExplicitReconstructor( this,

    ”reconstructableMethod”, param1, ... , paramN )>

    ...

    }


    Management

    Ourproposal

    Design

    Ariadna

    Management

    Creation of reconstructios

    Factorypattern

    • Automaticinitialization of theinstances

    • Itmanagestheinsertion in theReconstructionPath.

      Contextmanagement

      Done bythemanagementclasses of theframework

      Contexthierarchy


    Software development objectives

    Contents

    Introduction

    Theproblem

    Error recoverytechniques

    Error recoverysolutions

    Ourproposal

    Design

    Ariadna

    Evaluation of theresults

    Conclusions


    Ariadna

    Design

    Ariadna

    Evaluation of theresults

    Ariadna

    PreprocessingtoolovertheframeworkRecoderforstaticmetaprogramming in Java:

    • Analysesthecode and return a kind of AST

    • Allowthemodification of the AST

    • Creates new version of codefromthemodified AST

      Ariadna = codeenricher + framework.


    Working way de ariadna

    Design

    Ariadna

    Evaluation of theresults

    Workingwayde Ariadna

    Original sourcecodeanalysis

    • Obtainsan AST

    • Weprocessthetreeidentifying:

      • Reconstructableattributes

      • Compensationmethods

      • Additionalparameterssending

    A

    • Enrichment of thesysntactictree

      • Withtherequiredcommandsforreconstructors’ creation and management

    B

    • Generation of theenrichedsourcecodewith

      • Theadditionalcode

      • Framework forreconstructorsmanagement

    C


    Example ariadna implicit reconstructors generation

    Design

    Ariadna

    Evaluation of theresults

    ExampleAriadna: Implicitreconstructorsgeneration

    @reconstructableprivateintcounter;

    • publicvoidsetCounter(intcounter)

    • {

      • com.reconstructor.factory.ReconstructorFactory.createImplicitReconstructor(

        • this, this.counter, ”counter”);

        • this.counter = counter;

    • }

    publicvoidreconstruct(com.reconstructor.ObjectPropertyReconstructorreconstructor

    ) throwsSecurityException, NoSuchFieldException, IllegalArgumentException,

    IllegalAccessException

    {

    java.lang.Classcl = this.getClass();

    java.lang.reflect.Fieldfield = cl.getDeclaredField(reconstructor.getAttribute());

    field.set(this, reconstructor.getOriginalValue());

    }


    Premosgames 2 0

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    Version2.0 de PREMOSGAMES (PREdictiveMOdel of Seagrass Growth And MEadow Spreads)

    Simulationtoolorientedtothe control and analysis of acuaticmeadows of zoosteranolti (seaweeds).

    EU contract MEIFCT- 2005-515071

    Collaborationwith:

    • Netherlands Institute of Ecology (NIOO-KNAW) (Estancia en los PaisesBajos)

    • Ecologydeparment of Universidad de Cádiz

      Error recovery in PREMOSGAMES 1.0

    • Checkpointing

    • Unfeasiblememory use.

      Error recovery in PREMOSGAMES 2.0

    • AriadnaImplicitreconstructors


    Premosgames 2 01

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    Treeshapedstructure

    Recursiveprocessing of eachnodeeveryday

    And ifanexceptionoccurs? Part of thetreeisonedayolder, so itis in anunconsistentstate.

    Benefitsusingreconstructors?

    We compare a handmadesolutionbasedondesignpatterns (memento + factory) vs theversionusing Ariadna.


    Premosgames 2 02

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    • Leafclasshandmadesolution


    Premosgames 2 03

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    • Bundleclasshandmadesolution.


    Premosgames 2 04

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    Bundle

    class


    Premosgames 2 05

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    Leafclassusingreconstructors


    Premosgames 2 06

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    Bundleclassusingreconstructors


    Premosgames 2 07

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    Bundleclassusingreconstructors

    Contextmanagementcode


    Premosgames 2 08

    Design

    Ariadna

    Evaluation of theresults

    PREMOSGAMES 2.0

    eLOCsaving


    Software development objectives

    Contents

    Introduction

    Theproblem

    Error recoverytechniques

    Error recoverysolutions

    Ourproposal

    Design

    Ariadna

    Evaluation of theresults

    Conclusions


    Evaluating the results

    Ariadna

    Evaluation of theresults

    In process...

    Evaluatingtheresults

    Goals:

    • Minimizethework of thedeveloper

    • Realistic and feasiblesolution

      Methodology

      Expectedeffects:

  • Readability

  • Reduction of lines of code

  • Error riskreduction

  • Lessinformationmanagedbythedeveloper

  • Lesscompilationunitsmanagedbythedeveloper

  • Worserates of performance


  • Metrics

    Ariadna

    Evaluation of theresults

    In process...

    Metrics

    TraditionalMetrics → Designevaluationoriented

    Toevaluatepreformancepenalty:

    • Number of objects

    • Number of invocationsbetweenobjects (CouplingBetweenObjects de Briand)

      Worksaving:

    • eLOC (EffectiveLines Of Code)


    Compararisons

    Ariadna

    Evaluation of theresults

    In process...

    Compararisons


    Work saving eloc

    Ariadna

    Evaluation of theresults

    In process...

    Worksaving. eLOC.

    eLocImplicitreconstructors


    Work saving eloc1

    Ariadna

    Evaluation of theresults

    In process...

    Worksaving. eLOC.


    Performance penalty number of objects

    Ariadna

    Evaluation of theresults

    In process...

    Performance penalty. Number of objects.


    Performance penalty number of objects1

    Ariadna

    Evaluation of theresults

    In process...

    Performance penalty. Number of objects.


    Performance penalty invocations

    Ariadna

    Evaluation of theresults

    In process...

    Performance penalty. Invocations.


    Performance penalty invocations1

    Ariadna

    Evaluation of theresults

    In process...

    Performance penalty. Invocations.


    Interpretation

    Ariadna

    Evaluation of theresults

    In process...

    Interpretation

    Worksaving:


    Interpretation1

    Ariadna

    Evaluation of theresults

    In process...

    Interpretation

    Performance:

    Considerations:

    Explicitreconstructorsare less usual

    Measured are calculatedwith 5 params5 additionalparams.

    [D:Descarte;R:Reconstrucción]


    Difussion

    Ariadna

    Evaluation of theresults

    In process...

    Difussion

    Computer Languages, Systems and Structures, Elsevier. Extending object-oriented languages with backward error recovery integrated support. Dr. Daniel Fernández Lanvin, Dr. Raúl Izquierdo Castanedo, Dr. Aquilino Adolfo Juan Fuente and Alberto Manuel Fernández Álvarez. Acceptedwithminorchanges.


    Software development objectives

    Contents

    Introduction

    Theproblem

    Error recoverytechniques

    Error recoverysolutions

    Ourproposal

    Design

    Ariadna

    Evaluation of theresults

    In process


    Aspect oriented reconstructors

    Ariadna

    Evaluation of theresults

    In process...

    Aspectorientedreconstructors

    • Reconstructorsbasedrecoverabilityrequires in thisversion:

      • Theannotation of thereconstructableentities and thedefinition of the compensable methods

      • Theenrichment of thesourcecode.

    • Usingaspects

      • Stillneeded

        • Enclosethe set of reconstructableclasses

        • Explicitreconstructors’ definition

          But…

          We can avoidthepreprocessingaddindthereconstructionlogic as anaspect, and usingannotationsto relate itwiththemodel.

      • Richer set of contextmanagementpolicies (retry, advancednesting, etc).


    Aspect oriented reconstructors1

    Ariadna

    Evaluation of theresults

    In process...

    Aspectorientedreconstructors

    Reconstructable classes

    @Reconstructable

    class ExampleClass {

    private int counter;

    public void setCounter(int value) {

    counter = value;

    }

    }

    Explicit reconstructors

    @Reconstructable(“prepare delivery disallowing”)

    public void prepareDelivery( Type1 param1, … , TypeNparamN ){

    . . .

    }

    @Reconstructor(“prepare delivery disallowing”)

    public void disallowDelivery( Type1 param1, … , TypeNparamN ){

    . . .

    }


    Aspect oriented reconstructors2

    Ariadna

    Evaluation of theresults

    In process...

    Aspectorientedreconstructors

    public aspect ReconstructionAspect {

    pointcut fields(Object obj, Object val) :

    set(@Reconstructable * *) &&

    !withincode(@Reconstructor * *(..)) &&

    !withincode(@Reconstructable * *(..)) &&

    target(obj) &&

    args(val);

    before(Object obj, Object val) : fields(obj, val){

    if (!ContextFactory.hasActiveContext()) {

    return;

    }

    //We obtain the name of the modified field.

    String fieldName = thisJoinPoint.getSignature().getName();

    //We obtain the reference to the modified field.

    Field field = ReflectionUtil.getReconstructableField(obj.getClass(), fieldName);

    //We add the reconstructor to the reconstruction path.

    ContextFactory.getCurrentContext().addReconstructor(

    new ImplicitReconstructor(obj, field));

    }

    }


    Aspect oriented reconstructors3

    Ariadna

    Evaluation of theresults

    In process...

    Aspectorientedreconstructors

    public aspect ReconstructionAspect {

    //Explicit reconstructors generation

    pointcut methods(Object obj, Reconstructable tag) :

    //It should be fired when invoked any reconstructable method.

    execution(@Reconstructable * *(..)) &&

    @annotation(tag) &&

    this(obj);

    before(Object obj,Reconstructable tag):methods(obj, tag){

    if (!ContextFactory.hasActiveContext()) {

    return;

    }

    //We build the invocation to its reconstructorClass declaringClass =

    thisJoinPoint.getSignature().getDeclaringType();

    Method method = ReflectionUtil.getReconstructorFor(

    declaringClass, tag);

    Object[] args = thisJoinPoint.getArgs();

    //We obtain the reference to the current context

    Context ctx = ContextFactory.getCurrentContext();

    //We add the Ex. Rec. to the reconstruction path.

    ctx.addReconstructor(newExplicitReconstructor( obj, method, args));

    ctx.reconstructableMethodEntry();

    }


    Future work

    Ariadna

    Evaluation of theresults

    In process...

    Futurework

    Faulttolerance, Transactions, atomicity, isolation…

    Reconstructores

    Exceptionhandling

    Reconstructors in othercontexts and environments

    ¿Web services?

    ?


  • Login