Modular Software Development for Dealing with Uncertainty 6th Asian Workshop of Advanced Software Engineering (AWASE2017) Modular Software Development for Dealing with Uncertainty Naoyasu Ubayashi Kyushu University, Japan May 5, 2017
Naoyasu Ubayashi Professor @ Kyushu University Research Interests Ph.D (University of Tokyo, 1999) Toshiba (1982-2003), Kyushu Tech. (2003-2009), Kyushu U. (2010-) POSL (Principles of Software Languages) Research Group Research Interests Software & Programming Languages (especially, Modularity) Abstraction-Aware Verifying Compiler Extensible Modelling Language Modularity for Uncertainty Software Repository Mining Formal Methods
Outline Motivation What is Uncertainty? Modularity for Uncertainty iArch-U: IDE for Uncertainty-Aware Software Development Summary and Ongoing Work
Open Source Software (GitHub) http://posl.github.io/iArch/
Motivation
Uncertainty in Software Development Requirements or design models tend to contain uncertainty, because all of the concerns cannot be captured at the early phase. Uncertainty can appear in all aspects of software development. Unfixed Requirements Alternative Implementation Policies Uncertain Performance Modelling Programming Testing
Myth in Software Engineering Software Engineering is founded on a computational myth that no longer fully serves its purpose: that the computational environment is predictable and in principle fully specifiable, and that the systems that compute in those environments can in principle be engineered so that they are trouble-free. D. Garlan: Software Engineering in an Uncertain World, FSE/SDP Workshop on Future of Software Engineering Research, 2010.
Uncertainty in OSS Projects SZZ-based
What is Uncertainty?
Known Unknowns vs. Unknown Unknowns Known what is unknown Unknown what is unknown e.g., Design Alternatives Design A Design B Which should be selected? e.g., Users’ Preference Unknown Unknowns recommend Accepted Unaccepted Users Sebastian, E., and David S. R.: Known Unknowns: Testing in the Presence of Uncertainty, 22nd ACM SIGSOFT International Symposium on Foundations of Software Engineering(FSE 2014), 2014.
Definition of Uncertainty The most used definitions of uncertainty simply distinguish between natural variability of physical processes (i.e., aleatory or stochastic uncertainty) and the uncertainties in knowledge of these processes (i.e., epistemic or state-of-knowledge uncertainty). For proposing such a taxonomy for uncertainties in computer systems models, we base on a general definition of uncertainty in modeling given in [2] as: "any deviation from the unachievable ideal of completely deterministic knowledge of the relevant system". [1] Diego Perez-Palacin, Raffaela Mirandola: Uncertainties in the modeling of self-adaptive systems: a taxonomy and an example of availability evaluation, ICPE 2014. [2] W. Walker, P. Harremo´ Ss, J. Romans, J. van der Sluus, M. van Asselt, P. Janssen, and M. Krauss: Defining uncertainty. a conceptual basis for uncertainty management in model-based decision support, Integrated Assessment, 4(1):5–17, 2003.
Uncertainty in OSS Projects SZZ-based
Living with Uncertainty Modularity for Uncertainty Living with Uncertainty
Modular Software Development with Uncertainty Idea 1: Uncertainty as Pluggable Interface [Expression of Uncertainty (Known Unknowns, Epistemic)] Idea 2: Interface-Centric Modular Reasoning [Type Checking / Model Checking for Uncertainty] Modularity for Uncertainty Uncertain Concerns Uncertain Concerns Uncertain Concerns Modelling Programming Testing Fukamachi, T., Ubayashi, N., Hosoai, S., and Kamei, Y., Modularity for Uncertainty, In Proceedings of the 7th International Workshop on Modelling in Software Engineering (MiSE 2015), pp.7-12, 2015.
Archface-U : Component Interface Idea 1 Archface-U : Component Interface Java Interface interface uncertain uSubject extends Subject { public void {removeObserver(), deleteObserver()}; [public void notify();] } interface component Subject { public void addObserver(); public void setState(); Certain Archface Uncertain Archface { } Alternative [ ] Optional Variability model is applied to uncertainty management. (not product but process)
Archface-U : Connector Interface Idea 1 Archface-U : Connector Interface Finite State Process (FSP) interface connector uObserverPattern extends cObserverPattern (cSubject, cObserver) { cSubject = (cSubject.setState-> [uSubject.notify] ->cObserver.update->cSubject.getState->cSubject); } interface connector cObserverPattern(cSubject, cObserver) { cSubject = (cSubject.setState->cObserver.update ->cSubject.getState->cSubject); Certain Archface Uncertain Archface Magee, J. and Kramer, J.: State Models and Java Programs (1999).
Interface-Centric Modular Reasoning Idea 2 Interface-Centric Modular Reasoning We can continue development embracing uncertainty If True… Add Add Remove Certain Interface Uncertain Concerns Uncertain Concerns Uncertain Concerns Archface-U Test Execution Model Checking Model Checking Type Checking (Simulation) Type Checking (Simulation) True False True False True False Model Code Test Consistency is guaranteed (via Type Checking)
Uncertainty-Aware Software Development iArch-U IDE for Uncertainty-Aware Software Development
Overview of iArch-U IDE Modeling Support Programming Support Testing Support Uncertainty Management Support with Git
(Type Checking, Git-based Uncertainty Management) Eclipse Plugin Java Programming UML Modelling Archface-U View (Type Checking, Git-based Uncertainty Management) Archface-U
Modelling Setting of Alternative Uncertainty Alternative Uncertainty in Sequence Diagram Type Checking for UML Diagrams
Model Checking for UML Models Modify Archface-U Property Connector Interface ERROR Model Checking (LTSA) Translate Model OK Type Checking Indirectly Verified (avoidance of state explosion) UML Model
Model Checking for Java Code Modify Archface-U Property Connector Interface ERROR Model Checking (LTSA) Translate Model OK Type Checking Indirectly Verified (avoidance of state explosion) Java Code
Uncertainty Management with Git
Unit Testing Type Checking iArch-U Weaving & Test Execution Archface-U Java Code { void bubbleSort(Data data);, void quickSort(Data data); } class ... { void bubbleSort void quickSort ... } Type Checking iArch-U Weaving & Test Execution bubbleSort quickSort Possibility bubbleSort Aspect (AspectJ) bubbleSort(foo); bubbleSort(bar); ... quickSort Generate Test Cases
Summary and Ongoing Work
Ongoing Work Extension to Probabilistic Programming Archface-U dealing with probability Type system for probabilistic programming Probabilistic model checking Extension to A/B Testing uncertain component uStudentController extends StudentController{ { @ExecWeight(4) void filterStudent(JTable table);, @ExecWeight(1) void colorStudent(JTable table); }