ebook img

TryOpenJML - A Verily based web application for learning about the Java Modeling Language PDF

67 Pages·2016·1.16 MB·English
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview TryOpenJML - A Verily based web application for learning about the Java Modeling Language

UUnniivveerrssiittyy ooff CCeennttrraall FFlloorriiddaa SSTTAARRSS Electronic Theses and Dissertations, 2004-2019 2016 TTrryyOOppeennJJMMLL -- AA VVeerriillyy bbaasseedd wweebb aapppplliiccaattiioonn ffoorr lleeaarrnniinngg aabboouutt tthhee JJaavvaa MMooddeelliinngg LLaanngguuaaggee Tushar Deshpande University of Central Florida Part of the Computer Sciences Commons Find similar works at: https://stars.library.ucf.edu/etd University of Central Florida Libraries http://library.ucf.edu This Masters Thesis (Open Access) is brought to you for free and open access by STARS. It has been accepted for inclusion in Electronic Theses and Dissertations, 2004-2019 by an authorized administrator of STARS. For more information, please contact [email protected]. SSTTAARRSS CCiittaattiioonn Deshpande, Tushar, "TryOpenJML - A Verily based web application for learning about the Java Modeling Language" (2016). Electronic Theses and Dissertations, 2004-2019. 5131. https://stars.library.ucf.edu/etd/5131 TRYOPENJML–AVERILYBASEDWEBAPPLICATIONFORLEARNINGABOUTTHE JAVAMODELINGLANGUAGE by TUSHARDESHPANDE B.E.VisveswarayaTechnologicalUniversity-Belgaum,2012 Athesissubmittedinpartialfulfilmentoftherequirements forthedegreeofMasterofScience intheDepartmentofComputerScience intheCollegeofEngineeringandComputerScience attheUniversityofCentralFlorida Orlando,Florida SummerTerm 2016 MajorProfessor:GaryT.Leavens (cid:13)c 2016TusharDeshpande ii ABSTRACT This thesis has a two-fold purpose. On the one hand, the web applications are an important part of life. On a day to day basis, from managing our heath care choices to banking, to connecting to a friend, almost everything is done through a web application. Development of these applications is also a very trend-driven domain. Numerous web frameworks are available today, but almost none has been created taking reliability into consideration. With the combination of application construction recipes and static analysis, the Verily framework was created to build more reliable webapplications. On the other hand, the goal of the Java Modeling Language (JML) has to be conveyed to the world. It is a language that can go hand in hand with existing code, having a wide range of tools thathelpbuildpracticalandeffectivedesigns. TherearemanytoolsavailableforJML:jmldocfor web pages, jmlunit for unit tests, jmlc for class files, etc. I will be using the tools for Runtime Assertion Checking (RAC) and Extended Static Checking (ESC). These checks warn about the possible runtime exceptions and assertion violations. The benefits of JML assert statements over JavaassertionsarethattheysupportallJMLfeatures. The question that I am concerned with, in this thesis, is how the Verily Framework can contribute to the domain of web application development. Keeping this question in mind, my objective is to create a tutorial which will aid in learning about JML. The tutorial will let the potential users read andwriteJMLspecificationsanduseJMLtools,explainbasicJMLsemantics,andletthemknow wheretogoforhelpiftheyneedmoredetails. iii Thisthesisworkisdedicatedtomyfamily,whohavealwayslovedmeunconditionallyandwhose goodexampleshavetaughtmetoworkhardforthethingsthatIaspiretoachieve. iv ACKNOWLEDGMENTS Firstly, I would like to extend most profound appreciation to my advisor, Dr. Gary T. Leavens, for his encouragement and excellent guidance, and additionally to introduce me to Java Modeling Language. Without his support, this thesis would not have been possible. I would also like to thank the members of my thesis committee, Professors Damla Turgut and Damian Dechev for theiradviceandguidanceduringtheentireprocess. IwouldalsoliketothankJohnSingletonforthestimulatingdiscussions,valuablesuggestionsand guidance. Special thanks to Shraddha who has been a constant source of support and encourage- mentduringthechallengesofgraduateschoolandlife. v TABLE OF CONTENTS LISTOFFIGURES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . x CHAPTER1: INTRODUCTION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 WhytheVerilyFramework? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 WhycreateatutorialforJavaModelingLanguage? . . . . . . . . . . . . . . . . . 3 CHAPTER2: LITERATUREREVIEW . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 PriortutorialsonJML . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.3 Reliabilityinsoftware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.4 ContaintersandDocker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 CHAPTER3: TUTORIALDESIGN . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1 Web-basedApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.1 Backgroundoftheframework . . . . . . . . . . . . . . . . . . . . . . . . 8 3.1.2 Designpattern . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1.3 JavascriptBridge . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 vi 3.1.4 Front-End . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.1.4.1 AngularJS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.1.4.2 Freemarker . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.1.4.3 BootstrapCSS . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 3.1.5 Back-end . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.1.5.1 BackgroundonOpenJMLAPI . . . . . . . . . . . . . . . . . . 17 3.1.5.2 DockerContainers . . . . . . . . . . . . . . . . . . . . . . . . . 18 3.1.5.3 NGINX . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.2 Tutorial . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 CHAPTER4: IMPLEMENTATION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.1 Preview . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2 OpenJMLRunner . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 4.2.1 RuntimeAssertionCheck(RAC) . . . . . . . . . . . . . . . . . . . . . . 22 4.2.2 ExtendedStaticCheck(ESC) . . . . . . . . . . . . . . . . . . . . . . . . 23 4.3 PerformanceevaluationoftheVerilyframework . . . . . . . . . . . . . . . . . . . 24 4.4 Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.4.1 OverviewofOpenJML . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 vii 4.4.1.1 Assertion . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 4.4.1.2 UsingTryOpenJML . . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.2 Writingyourfirstpre-condition . . . . . . . . . . . . . . . . . . . . . . . 26 4.4.3 Writingyourfirstpost-condition . . . . . . . . . . . . . . . . . . . . . . . 27 4.4.4 HowdoJMLannotationswork? . . . . . . . . . . . . . . . . . . . . . . . 27 4.4.5 ModelandGhostfields . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.4.5.1 Model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 4.4.5.2 Ghost . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.4.6 ModifiersandAssignableclauses . . . . . . . . . . . . . . . . . . . . . . 29 4.4.6.1 Modifiers . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 4.4.6.2 Assignableclauses . . . . . . . . . . . . . . . . . . . . . . . . . 30 4.4.7 Invariants . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 CHAPTER5: FINDINGS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.1 Web-basedApplication . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 5.2 Tutorials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 CHAPTER6: FUTUREDIRECTIONS . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 viii CHAPTER7: CONCLUSION . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 7.1 TheVerilyFramework . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 7.2 TutorialonJavaModelingLanguage . . . . . . . . . . . . . . . . . . . . . . . . . 36 7.3 TryOpenJML-theweb-basedapplicationforlearningaboutJML . . . . . . . . . 37 APPENDIX: SOURCECODE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 38 LISTOFREFERENCES . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 ix

Description:
construction recipes and static analysis, the Verily framework was created to .. reliability aspect of the Verily framework built with AngularJS as front-end and . because their utilization in an application increases model coupling.
See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.