specifying the java collections framework in javadl
play

Specifying the Java Collections Framework in JavaDL cand. inform. - PowerPoint PPT Presentation

Specifying the Java Collections Framework in JavaDL cand. inform. Denis Lohner Institut f ur Theoretische Informatik - Universit at Karlsruhe 6th KeY Symposium, 2007 Betreuer: Dipl.Inform. R. Bubel verantw. Betreuer: Prof. Dr. P. H.


  1. Specifying the Java Collections Framework in JavaDL cand. inform. Denis Lohner Institut f¨ ur Theoretische Informatik - Universit¨ at Karlsruhe 6th KeY Symposium, 2007 Betreuer: Dipl.Inform. R. Bubel verantw. Betreuer: Prof. Dr. P. H. Schmitt

  2. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Outline Motivation 1 Specification by example 2 Interface specification 3 Using specifications 4 A ”new” method contract rule 5 Demo 6 Conclusion 7 Denis Lohner Specifying the JCF 2/20

  3. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Outline Motivation 1 Specification by example 2 Interface specification 3 Using specifications 4 A ”new” method contract rule 5 Demo 6 Conclusion 7 Denis Lohner Specifying the JCF 2/20

  4. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Outline Motivation 1 Specification by example 2 Interface specification 3 Using specifications 4 A ”new” method contract rule 5 Demo 6 Conclusion 7 Denis Lohner Specifying the JCF 2/20

  5. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Outline Motivation 1 Specification by example 2 Interface specification 3 Using specifications 4 A ”new” method contract rule 5 Demo 6 Conclusion 7 Denis Lohner Specifying the JCF 2/20

  6. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Outline Motivation 1 Specification by example 2 Interface specification 3 Using specifications 4 A ”new” method contract rule 5 Demo 6 Conclusion 7 Denis Lohner Specifying the JCF 2/20

  7. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Outline Motivation 1 Specification by example 2 Interface specification 3 Using specifications 4 A ”new” method contract rule 5 Demo 6 Conclusion 7 Denis Lohner Specifying the JCF 2/20

  8. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Outline Motivation 1 Specification by example 2 Interface specification 3 Using specifications 4 A ”new” method contract rule 5 Demo 6 Conclusion 7 Denis Lohner Specifying the JCF 2/20

  9. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Motivation Problem No sources of the JDK library available in KeY 1 ⇒ symbolical execution of library calls fail For native methods sources not even exist 2 Why specifying the Java Collections Framework? JCF used in many projects Case study Denis Lohner Specifying the JCF 3/20

  10. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Motivation Problem No sources of the JDK library available in KeY 1 ⇒ symbolical execution of library calls fail For native methods sources not even exist 2 Why specifying the Java Collections Framework? JCF used in many projects Case study Denis Lohner Specifying the JCF 3/20

  11. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Motivation Problem No sources of the JDK library available in KeY 1 ⇒ symbolical execution of library calls fail For native methods sources not even exist 2 Why specifying the Java Collections Framework? JCF used in many projects Case study Denis Lohner Specifying the JCF 3/20

  12. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Motivation Problem No sources of the JDK library available in KeY 1 ⇒ symbolical execution of library calls fail For native methods sources not even exist 2 Why specifying the Java Collections Framework? JCF used in many projects Case study Denis Lohner Specifying the JCF 3/20

  13. Motivation Specification Interfaces Using specs Method contract rule Conclusion Appendix Motivation Problem No sources of the JDK library available in KeY 1 ⇒ symbolical execution of library calls fail For native methods sources not even exist 2 Why specifying the Java Collections Framework? JCF used in many projects Case study Denis Lohner Specifying the JCF 3/20

  14. Motivation Specification Interfaces Using specs Method contract rule Conclusion Normal Case Appendix Exceptional Case General Concept Specification by example Normal case Example Method SomeLibrary.copy(java.lang.Object[] src, java.lang.Object[] dest) Precondition src != null & src.<created> = TRUE & dest != null & dest.<created> = TRUE & src.length = dest.length & \ forall int i; ( (0 <= i & i < src.length) -> arrayStoreValid(dest, src[i]) ) Postcondition \ forall int i; ( (0 <= i & i < src.length) -> dest[i] = src[i] ) Modifies dest[0 .. src.length] Denis Lohner Specifying the JCF 4/20

  15. Motivation Specification Interfaces Using specs Method contract rule Conclusion Normal Case Appendix Exceptional Case General Concept Specification by example Normal case Example Method SomeLibrary.copy(java.lang.Object[] src, java.lang.Object[] dest) Precondition src != null & src.<created> = TRUE & dest != null & dest.<created> = TRUE & src.length = dest.length & \ forall int i; ( (0 <= i & i < src.length) -> arrayStoreValid(dest, src[i]) ) Postcondition \ forall int i; ( (0 <= i & i < src.length) -> dest[i] = src[i] ) Modifies dest[0 .. src.length] Denis Lohner Specifying the JCF 4/20

  16. Motivation Specification Interfaces Using specs Method contract rule Conclusion Normal Case Appendix Exceptional Case General Concept Specification by example Normal case Example Method SomeLibrary.copy(java.lang.Object[] src, java.lang.Object[] dest) Precondition src != null & src.<created> = TRUE & dest != null & dest.<created> = TRUE & src.length = dest.length & \ forall int i; ( (0 <= i & i < src.length) -> arrayStoreValid(dest, src[i]) ) Postcondition \ forall int i; ( (0 <= i & i < src.length) -> dest[i] = src[i] ) Modifies dest[0 .. src.length] Denis Lohner Specifying the JCF 4/20

  17. Motivation Specification Interfaces Using specs Method contract rule Conclusion Normal Case Appendix Exceptional Case General Concept Specification by example Normal case Example Method SomeLibrary.copy(java.lang.Object[] src, java.lang.Object[] dest) Precondition src != null & src.<created> = TRUE & dest != null & dest.<created> = TRUE & src.length = dest.length & \ forall int i; ( (0 <= i & i < src.length) -> arrayStoreValid(dest, src[i]) ) Postcondition \ forall int i; ( (0 <= i & i < src.length) -> dest[i] = src[i] ) Modifies dest[0 .. src.length] Denis Lohner Specifying the JCF 4/20

  18. Motivation Specification Interfaces Using specs Method contract rule Conclusion Normal Case Appendix Exceptional Case General Concept Specification by example Normal case Example Method SomeLibrary.copy(java.lang.Object[] src, java.lang.Object[] dest) Precondition src != null & src.<created> = TRUE & dest != null & dest.<created> = TRUE & src.length = dest.length & \ forall int i; ( (0 <= i & i < src.length) -> arrayStoreValid(dest, src[i]) ) Postcondition \ forall int i; ( (0 <= i & i < src.length) -> dest[i] = src[i] ) Modifies dest[0 .. src.length] Denis Lohner Specifying the JCF 4/20

  19. Motivation Specification Interfaces Using specs Method contract rule Conclusion Normal Case Appendix Exceptional Case General Concept Specification by example Normal case Example Method SomeLibrary.copy(java.lang.Object[] src, java.lang.Object[] dest) Precondition src != null & src.<created> = TRUE & dest != null & dest.<created> = TRUE & src.length = dest.length & \ forall int i; ( (0 <= i & i < src.length) -> arrayStoreValid(dest, src[i]) ) Postcondition \ forall int i; ( (0 <= i & i < src.length) -> dest[i] = src[i] ) Modifies dest[0 .. src.length] Denis Lohner Specifying the JCF 4/20

  20. Motivation Specification Interfaces Using specs Method contract rule Conclusion Normal Case Appendix Exceptional Case General Concept Specification by example Normal case Example Method SomeLibrary.copy(java.lang.Object[] src, java.lang.Object[] dest) Precondition src != null & src.<created> = TRUE & dest != null & dest.<created> = TRUE & src.length = dest.length & \ forall int i; ( (0 <= i & i < src.length) -> arrayStoreValid(dest, src[i]) ) Postcondition \ forall int i; ( (0 <= i & i < src.length) -> dest[i] = src[i] ) Modifies dest[0 .. src.length] Denis Lohner Specifying the JCF 4/20

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend