Learn CBR Call Save Code Repair Write-back Summary Hansruedi - - PowerPoint PPT Presentation

learn cbr
SMART_READER_LITE
LIVE PREVIEW

Learn CBR Call Save Code Repair Write-back Summary Hansruedi - - PowerPoint PPT Presentation

Learn CBR Hansruedi Patzen CBR Check Learn CBR Call Save Code Repair Write-back Summary Hansruedi Patzen 1 References University of Applied Sciences Rapperswil 14th January 2019 1 hansruedi.patzen@hsr.ch Learn CBR Hansruedi Patzen


slide-1
SLIDE 1

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Learn CBR

Save Code Hansruedi Patzen1

University of Applied Sciences Rapperswil

14th January 2019

1hansruedi.patzen@hsr.ch

slide-2
SLIDE 2

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

CBR

(Constraint-Based Refactoring / Constraint-Based Repair)

slide-3
SLIDE 3

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

CBR

Why Constraint-Based Refactoring?

slide-4
SLIDE 4

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Rules

We need rules.

slide-5
SLIDE 5

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Rules

And even more rules.

slide-6
SLIDE 6

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Check the Program

(Check the scene and the person)

slide-7
SLIDE 7

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Check

  • Generate constraints
  • Generate AP
  • Get user set intent I
slide-8
SLIDE 8

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Call the Solver

( Call 9112 for assistance)

2CH: 112 general emergency, 117 police, 118 fire department, 144 ambulance

slide-9
SLIDE 9

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Call

solve :- domains(Vars) , constrain(Vars), label(Vars).

slide-10
SLIDE 10

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Repair Constraint Violations

( Open the airway. Check for breathing. Do CPR3 )

3Push hard, push fast. Deliver rescue breaths. Repeat.

slide-11
SLIDE 11

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Repair

solve :- init(Vars), constrain(Vars, ConflctSet), repair(ConflctSet).

slide-12
SLIDE 12

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Write-Back Refactored Code

(Finish CPR)

slide-13
SLIDE 13

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Summary

slide-14
SLIDE 14

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

Summary

slide-15
SLIDE 15

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

References I

  • F. Steimann, “Constraint-Based Refactoring”, ACM Trans. Program. Lang. Syst.,
  • vol. 40, no. 1, 2:1–2:40, Jan. 2018, issn: 0164-0925. doi: 10.1145/3156016.

[Online]. Available: http://doi.acm.org/10.1145/3156016. ——,“Constraint-based Model Refactoring”, in Proceedings of the 14th International Conference on Model Driven Engineering Languages and Systems,

  • ser. MODELS’11, Berlin, Heidelberg: Springer-Verlag, 2011, pp. 440–454, isbn:

978-3-642-24484-1. [Online]. Available:

http://dl.acm.org/citation.cfm?id=2050655.2050700.

  • F. Steimann and J. von Pilgrim, “Refactorings Without Names”, in Proceedings
  • f the 27th IEEE/ACM International Conference on Automated Sofware

Engineering, ser. ASE 2012, New York, NY, USA: ACM, 2012, pp. 290–293, isbn: 978-1-4503-1204-2. doi: 10.1145/2351676.2351726. [Online]. Available:

http://doi.acm.org/10.1145/2351676.2351726.

slide-16
SLIDE 16

Learn CBR Hansruedi Patzen CBR Check Call Repair Write-back Summary References

References II

——,“Constraint-Based Refactoring with Foresight”, in Proceedings of the 26th European Conference on Object-Oriented Programming, ser. ECOOP’12, Berlin, Heidelberg: Springer-Verlag, 2012, pp. 535–559, isbn: 978-3-642-31056-0. doi:

10.1007/978-3-642-31057-7_24. [Online]. Available: http://dx.doi.org/10.1007/978-3-642-31057-7_24.

  • M. Fowler, K. Beck, and J. Brant, Refactoring: Improving the Design of Existing

Code, 1st ed. Addison-Wesley Professional, 1999, isbn: 978-0-201-48567-7. American National Red Cross, CPR Steps, 2018. [Online]. Available:

https://www.redcross.org/take-a-class/cpr/performing-cpr/cpr-steps

(visited on 10/18/2018).