slide1
Download
Skip this Video
Download Presentation
Software development : Objectives

Loading in 2 Seconds...

play fullscreen
1 / 81

Software development : Objectives - PowerPoint PPT Presentation


  • 67 Views
  • Uploaded on

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 .

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Software development : Objectives' - lewis


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.
slide8
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

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 ( )

{

try {

doAnything();

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...

}

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.

slide17
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:

slide24
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.
slide26
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;

If ( everything ok?)

else

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;

object.setXXX(7)

object.setXXX(5);

object.setXXX(3);

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;

object.setXXX(7)

object.setXXX(5);

object.setXXX(3);

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);

object.setA(9);

object.setA(8);

}

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

slide41
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
design
Ourproposal

Design

Ariadna

Design

Implicitreconstructors

  • Memento + Command
  • In thereconstructableobject, methodreconstruct(equiv.execute)

Explicitreconstructors

  • Command.

publicvoidreconstruct(ImplicitReconstructor reconstructor) throwsAnyException {

}

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

{

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

...

}

management
Ourproposal

Design

Ariadna

Management

Creation of reconstructios

Factorypattern

  • Automaticinitialization of theinstances
  • Itmanagestheinsertion in theReconstructionPath.

Contextmanagement

Done bythemanagementclasses of theframework

Contexthierarchy

slide49
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

slide62
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.

slide75
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 reconstructor Class 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?

?

ad