SlideShare a Scribd company logo
1 of 42
Revisiting Information Hiding Reflections on Classical and Nonclassical Modularity K. Ostermann, P. G. Giarrusso, C. Kästner, T. Rendel University of Marburg, Germany
AOP Inheritance Mutable State Implicit Side Effects Reflection Failure-Oblivious Computing The Modularity Dichotomie Negation-as-Failure SML Modules Abstract Data Types Pure Functions Hoare Logic Design by Contract Existential Types
The Logic Dichotomie Truth-Preserving Deduction Closed-World Reasoning Precidate Logic Default Logic Nonmonotonic Logic Monotonicity Belief Revision Global Consistency Axiomatic Method Paraconsistent Logic Model Theory Inductive Reasoning Occam’s Razor
This talk Relating the modularity dichotomie to the logic dichotomie Philisophical justification for being on the dark side Doubts whether the Jedi side is as desirable as we think
The Pillars of Classical Modularity
Information Hiding and Abstraction Distinguish concrete implementation of a component from interface Supports “modular reasoning” Interfaces as “firewalls” for change propagation Substitutability: Can freely modify or replace component implementations if the interfaces are the same Examples: Control structures, procedural abstraction, abstract data types, …
Information Hiding and Classical Logic Interface = Set of axioms Implementation = Model of the axioms Substitutability: Same theorems hold for all models of the axioms Cannot distinguish different models within the theory
Reductionism and Compositionality Reductionism: Belief that complex systems can be understood by understanding its parts and the rules with which they are composed Reductionism is an implicit assumption of classical modularity Formally stated as compositionality Example: Denotational Semantics Substitutability: Can replace expression by another one with the same meaning
Reductionism and Compositionality in Classical Logic Proofs of theorems are compositional: Can split into lemmas and proof independently Substitutability: Sets of axioms can be replaced by other axioms with the same deductive closure without changing the set of theorems
Idealization Deal with complexity by  concentrating on things relevant to the task at hand ignoring the rest for the time being Galileo’s laws of motion Dijkstra: Must idealize because “we have very, very small heads” Idealization is an implicit assumption of modularity:
Interfaces as idealizations From the Java API documentation of java.awt.Label Idealization: Clients can ignore whether setText updates the screen public void setText(String text) Sets the text for this label to the specified text.  Parameters: text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "". See Also: getText()
Idealization and Classical Logic The axiomatic method is a formalization of idealization
Monotonicity Idea: Properties of a system can be proved “once and for all” We never have to withdraw a conclusion when we “learn more” Hoare Logic, equational reasoning, … are all monotonic …as are classical logics
Classical modularity, recap Software components Have well-defined stable interfaces (by abstraction) Can be organized hierarchically to manage complexity (by idealization)  Changes to implementation do not affect rest of the system (by compositionality) Correctness  can be proved in isolation, composition preserves correctness (by monotonicity)
Classical Modularity Compositionality Monotonicity Abstraction Idealization Information Hiding Reductionism
Programming as Human Activity
Programmers use Inductive Reasoning Programmers infer a general software property from observing individual cases Tests meant as instances of a general theorem Generalize observed/inspected behavior of a library to other parts Aside: Inductive reasoning also successfully used by tools such as Daikon [Ernst et al]
Inductive Reasoning is hard-wired HebbianLearning:“Cells that fire together, wire together”
Default Reasoning and Occam’s Razor
Default reasoning about APIs An API function will not perform the side effect of formatting the harddrive unless explicitly specified public void setText(String text) Sets the text for this label to the specified text.  Parameters: text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "". See Also: getText()
Occam’s razor and debugging …a division by zero in line 3 of X.java
The actual code of X.java According to Occam’s razor we reject this explanation public class X {   public static void main(String args[]) { System.out.println("Exception in thread quot;mainquot; “      + “java.lang.ArithmeticException: / by zero"       +"     at X.main(X.java:3)");   } }
Default Reasoning and Occam’s Razor Acknowledged by principle of least astonishment
Law of Prägnanz in Gestalt Psychology We order our experience in a way which is regular, orderly, symmetric and maximizes simplicity.
Negation as FailureClosed-World Reasoning Removing an API function is OK if it is not called in my code base One can try to avoid API changes, but this leads to “software asbestos”
Closed-World Reasoning in Linux “Get your kernel driver into the main kernel tree. If your driver is in the tree, and a kernel interface changes, it will be fixed  up by the person who did the kernel change” From: “The Linux Kernel Driver Interface”, Greg Kroah-Hartman
Don’t blame the programmers Programmers are forced to use non-classical reasoning: They have no other choice! Many relevant properties cannot be established with classical reasoning! As logical theories, module interfaces are highly incomplete!
Revisiting Information Hiding
Interface Detail If a stakeholder reasons about “non-functional” properties, the abstraction barriers break Example: Choice of implementation of an ADT matters for some stake holders Example: Power consumption, heat production, stack usage, … Using more precise interfaces does not scale Reveal more and more implementation details Unclear how to specify non-modular properties
Large Systems Whenever information is hidden, there is potentially a stakeholder (or, concern) who is interested in that detail The larger the system, the more likely such a stakeholder exists Hence the more difficult to maintain the classical notion of information hiding Example: Torvalds’ argument against microkernel OS
Large systems and crosscutting concerns Crosscutting concerns are hard to modularize using classical modularity mechanisms Tangling/scattering prevents composability Destroys assumption of classical modularity Just hiding a scattered concern behind interfaces as if it does not exist does not work
The Dominant Decomposition The “tyranny of the dominant decomposition”: What can be hidden depends on the decomposition But there is no “best” decomposition What one stakeholder would hide is of primary importance to another
Software Evolution Parnas: Hide what is most likely to change But how do we know which changes are likely? If a design decision is part of an interface, it cannot be evolved modularly But if it is hidden behind an interface, evolution might bring a new stakeholder which needs to know about that decision
Software Evolution Interface method of java.awt.Label Assume a new composite GUI component which includes two labels How can we implement display update for setBothTexts(String,String) without flickering? public void setText(String text) Sets the text for this label to the specified text.  Parameters: text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "". See Also: getText()
Information Hiding and Classical Logic:McCarthy’s Qualification Problem “In order to fully represent the conditions for the successful performance of an action, an impractical and implausible number of qualifications would have to be included in the sentences expressing them” [John McCarthy, 1980]
Programming and Modeling
Programming and Modeling What is the cause of the failures of classical modularity? My hypothesis:  Influence of natural sciences and mathematics on CS and programming Programs as (scientific) models But does this notion of modeling fit to software?
Software “Modeling”
Programs are not models! Software has to take into account the needs of many stakeholders at once It has to interact with the real world Simplifying assumptions may turn out to be wrong Software systems are more like a mix of many overlapping and interacting models Programs are not models of a part of reality; they are, when executed, a part of reality
Scientific Modeling “We are confronted with a patchwork of theories and models, all of which hold ceteris paribus in their specific domains of applicability.” [Hartmann&Frigg, “Scientific Models”, 2005]
In the paper… Several “dark side” modularity mechanisms correspond to non-classical logics Aspects explained in default logic  Failure-oblivious computing and paraconsistent logics Shared mutable state and separation logic … Goal of modularity: Modularize relevant properties A property P is modularized (w.r.t. logic L) in a program unit U, if P can be proven from U in L
Conclusions Software is a form of human knowledge representationthat happens to be executable on a machine The human face of the dark side

More Related Content

What's hot

Very short OOP Introduction
Very short OOP IntroductionVery short OOP Introduction
Very short OOP IntroductionCristian G
 
VLSI IN NEURAL NETWORKS
VLSI IN NEURAL NETWORKSVLSI IN NEURAL NETWORKS
VLSI IN NEURAL NETWORKSMohan Moki
 
Neural perceptual model to global local vision for the recognition of the log...
Neural perceptual model to global local vision for the recognition of the log...Neural perceptual model to global local vision for the recognition of the log...
Neural perceptual model to global local vision for the recognition of the log...ijaia
 
Analysis of Neocognitron of Neural Network Method in the String Recognition
Analysis of Neocognitron of Neural Network Method in the String RecognitionAnalysis of Neocognitron of Neural Network Method in the String Recognition
Analysis of Neocognitron of Neural Network Method in the String RecognitionIDES Editor
 
Uncertainty classification of expert systems a rough set approach
Uncertainty classification of expert systems   a rough set approachUncertainty classification of expert systems   a rough set approach
Uncertainty classification of expert systems a rough set approachEr. rahul abhishek
 
Fundamentals of logic
Fundamentals of logicFundamentals of logic
Fundamentals of logicHumzaBharmal
 
pln_ecan_agi_16
pln_ecan_agi_16pln_ecan_agi_16
pln_ecan_agi_16EEPCO
 
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy Systems
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy SystemsComputer Aided Development of Fuzzy, Neural and Neuro-Fuzzy Systems
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy SystemsIJEACS
 
Report
ReportReport
Reportbutest
 
Artificial Neural Network Abstract
Artificial Neural Network AbstractArtificial Neural Network Abstract
Artificial Neural Network AbstractAnjali Agrawal
 

What's hot (18)

Very short OOP Introduction
Very short OOP IntroductionVery short OOP Introduction
Very short OOP Introduction
 
VLSI IN NEURAL NETWORKS
VLSI IN NEURAL NETWORKSVLSI IN NEURAL NETWORKS
VLSI IN NEURAL NETWORKS
 
Lesson 37
Lesson 37Lesson 37
Lesson 37
 
Soft computing
Soft computingSoft computing
Soft computing
 
Neural perceptual model to global local vision for the recognition of the log...
Neural perceptual model to global local vision for the recognition of the log...Neural perceptual model to global local vision for the recognition of the log...
Neural perceptual model to global local vision for the recognition of the log...
 
Oop concepts
Oop conceptsOop concepts
Oop concepts
 
Contents
ContentsContents
Contents
 
Soft Computing
Soft ComputingSoft Computing
Soft Computing
 
Soft computing
Soft computingSoft computing
Soft computing
 
Analysis of Neocognitron of Neural Network Method in the String Recognition
Analysis of Neocognitron of Neural Network Method in the String RecognitionAnalysis of Neocognitron of Neural Network Method in the String Recognition
Analysis of Neocognitron of Neural Network Method in the String Recognition
 
Uncertainty classification of expert systems a rough set approach
Uncertainty classification of expert systems   a rough set approachUncertainty classification of expert systems   a rough set approach
Uncertainty classification of expert systems a rough set approach
 
Fundamentals of logic
Fundamentals of logicFundamentals of logic
Fundamentals of logic
 
Fuzzy logic
Fuzzy logicFuzzy logic
Fuzzy logic
 
pln_ecan_agi_16
pln_ecan_agi_16pln_ecan_agi_16
pln_ecan_agi_16
 
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy Systems
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy SystemsComputer Aided Development of Fuzzy, Neural and Neuro-Fuzzy Systems
Computer Aided Development of Fuzzy, Neural and Neuro-Fuzzy Systems
 
Report
ReportReport
Report
 
Artificial Neural Network Abstract
Artificial Neural Network AbstractArtificial Neural Network Abstract
Artificial Neural Network Abstract
 
Introduction to Soft Computing
Introduction to Soft ComputingIntroduction to Soft Computing
Introduction to Soft Computing
 

Viewers also liked

Viewers also liked (20)

[OOP - Lec 08] Encapsulation (Information Hiding)
[OOP - Lec 08] Encapsulation (Information Hiding)[OOP - Lec 08] Encapsulation (Information Hiding)
[OOP - Lec 08] Encapsulation (Information Hiding)
 
Api desgin
Api desginApi desgin
Api desgin
 
Assignment on errors
Assignment on errorsAssignment on errors
Assignment on errors
 
Oop
Oop Oop
Oop
 
Absolute relative error
Absolute relative errorAbsolute relative error
Absolute relative error
 
Java abstract class & abstract methods
Java abstract class & abstract methodsJava abstract class & abstract methods
Java abstract class & abstract methods
 
Abstraction and Encapsulation
Abstraction and EncapsulationAbstraction and Encapsulation
Abstraction and Encapsulation
 
Info hiding
Info hidingInfo hiding
Info hiding
 
Inheritance and Polymorphism Java
Inheritance and Polymorphism JavaInheritance and Polymorphism Java
Inheritance and Polymorphism Java
 
Abstraction in java
Abstraction in javaAbstraction in java
Abstraction in java
 
Abstract class and Interface
Abstract class and InterfaceAbstract class and Interface
Abstract class and Interface
 
Chapter2 Encapsulation (Java)
Chapter2 Encapsulation (Java)Chapter2 Encapsulation (Java)
Chapter2 Encapsulation (Java)
 
Inheritance and Polymorphism
Inheritance and PolymorphismInheritance and Polymorphism
Inheritance and Polymorphism
 
Java Programming - Abstract Class and Interface
Java Programming - Abstract Class and InterfaceJava Programming - Abstract Class and Interface
Java Programming - Abstract Class and Interface
 
Java OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & InterfaceJava OOP Programming language (Part 6) - Abstract Class & Interface
Java OOP Programming language (Part 6) - Abstract Class & Interface
 
Inheritance
InheritanceInheritance
Inheritance
 
Digital Watermarking
Digital WatermarkingDigital Watermarking
Digital Watermarking
 
polymorphism
polymorphism polymorphism
polymorphism
 
Inheritance
InheritanceInheritance
Inheritance
 
Polymorphism
PolymorphismPolymorphism
Polymorphism
 

Similar to Revisiting Information Hiding - Reflections on Classical and Nonclassical Modularity

The Role Of Ontology In Modern Expert Systems Dallas 2008
The Role Of Ontology In Modern Expert Systems   Dallas   2008The Role Of Ontology In Modern Expert Systems   Dallas   2008
The Role Of Ontology In Modern Expert Systems Dallas 2008Jason Morris
 
Practical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematicianPractical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematicianIan Thomas
 
Object Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel BoundariesObject Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel BoundariesRoman Agaev
 
Lloyd Swarmfest 2010 Presentation
Lloyd   Swarmfest 2010 PresentationLloyd   Swarmfest 2010 Presentation
Lloyd Swarmfest 2010 Presentationkalloyd
 
Artificial intelligent
Artificial intelligentArtificial intelligent
Artificial intelligentALi Akram
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design conceptssrijavel
 
Data and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet ServicesData and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet ServicesSergey Boldyrev
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programmingmukhtarhudaya
 
White-Paper-the-AI-behind-vectra-AI.pdf
White-Paper-the-AI-behind-vectra-AI.pdfWhite-Paper-the-AI-behind-vectra-AI.pdf
White-Paper-the-AI-behind-vectra-AI.pdfBoris647814
 
Emerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxEmerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxPoonamKumarSharma
 
X Som Graduation Presentation
X Som   Graduation PresentationX Som   Graduation Presentation
X Som Graduation PresentationGiorgio Orsi
 
Detecting the High Level Similarities in Software Implementation Process Usin...
Detecting the High Level Similarities in Software Implementation Process Usin...Detecting the High Level Similarities in Software Implementation Process Usin...
Detecting the High Level Similarities in Software Implementation Process Usin...IOSR Journals
 
Semantic IoT Semantic Inter-Operability Practices - Part 1
Semantic IoT Semantic Inter-Operability Practices - Part 1Semantic IoT Semantic Inter-Operability Practices - Part 1
Semantic IoT Semantic Inter-Operability Practices - Part 1iotest
 
The Joy Of Functional Programming
The Joy Of Functional ProgrammingThe Joy Of Functional Programming
The Joy Of Functional Programmingjasondew
 
Interview preparation for programming.pptx
Interview preparation for programming.pptxInterview preparation for programming.pptx
Interview preparation for programming.pptxBilalHussainShah5
 
Paper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docxPaper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docxaman341480
 

Similar to Revisiting Information Hiding - Reflections on Classical and Nonclassical Modularity (20)

The Role Of Ontology In Modern Expert Systems Dallas 2008
The Role Of Ontology In Modern Expert Systems   Dallas   2008The Role Of Ontology In Modern Expert Systems   Dallas   2008
The Role Of Ontology In Modern Expert Systems Dallas 2008
 
Practical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematicianPractical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematician
 
Object Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel BoundariesObject Oriented Approach Within Siebel Boundaries
Object Oriented Approach Within Siebel Boundaries
 
Lloyd Swarmfest 2010 Presentation
Lloyd   Swarmfest 2010 PresentationLloyd   Swarmfest 2010 Presentation
Lloyd Swarmfest 2010 Presentation
 
Artificial intelligent
Artificial intelligentArtificial intelligent
Artificial intelligent
 
Fundamental design concepts
Fundamental design conceptsFundamental design concepts
Fundamental design concepts
 
Complexity
ComplexityComplexity
Complexity
 
Data and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet ServicesData and Computation Interoperability in Internet Services
Data and Computation Interoperability in Internet Services
 
Aspect Oriented Programming
Aspect Oriented ProgrammingAspect Oriented Programming
Aspect Oriented Programming
 
White-Paper-the-AI-behind-vectra-AI.pdf
White-Paper-the-AI-behind-vectra-AI.pdfWhite-Paper-the-AI-behind-vectra-AI.pdf
White-Paper-the-AI-behind-vectra-AI.pdf
 
AI Presentation 1
AI Presentation 1AI Presentation 1
AI Presentation 1
 
Emerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptxEmerging Approach to Computing Techniques.pptx
Emerging Approach to Computing Techniques.pptx
 
Chapter 1.pptx
Chapter 1.pptxChapter 1.pptx
Chapter 1.pptx
 
Utility Classes
Utility ClassesUtility Classes
Utility Classes
 
X Som Graduation Presentation
X Som   Graduation PresentationX Som   Graduation Presentation
X Som Graduation Presentation
 
Detecting the High Level Similarities in Software Implementation Process Usin...
Detecting the High Level Similarities in Software Implementation Process Usin...Detecting the High Level Similarities in Software Implementation Process Usin...
Detecting the High Level Similarities in Software Implementation Process Usin...
 
Semantic IoT Semantic Inter-Operability Practices - Part 1
Semantic IoT Semantic Inter-Operability Practices - Part 1Semantic IoT Semantic Inter-Operability Practices - Part 1
Semantic IoT Semantic Inter-Operability Practices - Part 1
 
The Joy Of Functional Programming
The Joy Of Functional ProgrammingThe Joy Of Functional Programming
The Joy Of Functional Programming
 
Interview preparation for programming.pptx
Interview preparation for programming.pptxInterview preparation for programming.pptx
Interview preparation for programming.pptx
 
Paper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docxPaper Analysis Essay The 5-page Paper You Submit Must At L.docx
Paper Analysis Essay The 5-page Paper You Submit Must At L.docx
 

Recently uploaded

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountPuma Security, LLC
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxnull - The Open Security Community
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraDeakin University
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhisoniya singh
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024BookNet Canada
 

Recently uploaded (20)

Breaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path MountBreaking the Kubernetes Kill Chain: Host Path Mount
Breaking the Kubernetes Kill Chain: Host Path Mount
 
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptxMaking_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
Making_way_through_DLL_hollowing_inspite_of_CFG_by_Debjeet Banerjee.pptx
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
DMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special EditionDMCC Future of Trade Web3 - Special Edition
DMCC Future of Trade Web3 - Special Edition
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
Artificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning eraArtificial intelligence in the post-deep learning era
Artificial intelligence in the post-deep learning era
 
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | DelhiFULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
FULL ENJOY 🔝 8264348440 🔝 Call Girls in Diplomatic Enclave | Delhi
 
Pigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping ElbowsPigging Solutions Piggable Sweeping Elbows
Pigging Solutions Piggable Sweeping Elbows
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
#StandardsGoals for 2024: What’s new for BISAC - Tech Forum 2024
 
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptxVulnerability_Management_GRC_by Sohang Sengupta.pptx
Vulnerability_Management_GRC_by Sohang Sengupta.pptx
 

Revisiting Information Hiding - Reflections on Classical and Nonclassical Modularity

  • 1. Revisiting Information Hiding Reflections on Classical and Nonclassical Modularity K. Ostermann, P. G. Giarrusso, C. Kästner, T. Rendel University of Marburg, Germany
  • 2. AOP Inheritance Mutable State Implicit Side Effects Reflection Failure-Oblivious Computing The Modularity Dichotomie Negation-as-Failure SML Modules Abstract Data Types Pure Functions Hoare Logic Design by Contract Existential Types
  • 3. The Logic Dichotomie Truth-Preserving Deduction Closed-World Reasoning Precidate Logic Default Logic Nonmonotonic Logic Monotonicity Belief Revision Global Consistency Axiomatic Method Paraconsistent Logic Model Theory Inductive Reasoning Occam’s Razor
  • 4. This talk Relating the modularity dichotomie to the logic dichotomie Philisophical justification for being on the dark side Doubts whether the Jedi side is as desirable as we think
  • 5. The Pillars of Classical Modularity
  • 6. Information Hiding and Abstraction Distinguish concrete implementation of a component from interface Supports “modular reasoning” Interfaces as “firewalls” for change propagation Substitutability: Can freely modify or replace component implementations if the interfaces are the same Examples: Control structures, procedural abstraction, abstract data types, …
  • 7. Information Hiding and Classical Logic Interface = Set of axioms Implementation = Model of the axioms Substitutability: Same theorems hold for all models of the axioms Cannot distinguish different models within the theory
  • 8. Reductionism and Compositionality Reductionism: Belief that complex systems can be understood by understanding its parts and the rules with which they are composed Reductionism is an implicit assumption of classical modularity Formally stated as compositionality Example: Denotational Semantics Substitutability: Can replace expression by another one with the same meaning
  • 9. Reductionism and Compositionality in Classical Logic Proofs of theorems are compositional: Can split into lemmas and proof independently Substitutability: Sets of axioms can be replaced by other axioms with the same deductive closure without changing the set of theorems
  • 10. Idealization Deal with complexity by concentrating on things relevant to the task at hand ignoring the rest for the time being Galileo’s laws of motion Dijkstra: Must idealize because “we have very, very small heads” Idealization is an implicit assumption of modularity:
  • 11. Interfaces as idealizations From the Java API documentation of java.awt.Label Idealization: Clients can ignore whether setText updates the screen public void setText(String text) Sets the text for this label to the specified text. Parameters: text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "". See Also: getText()
  • 12. Idealization and Classical Logic The axiomatic method is a formalization of idealization
  • 13. Monotonicity Idea: Properties of a system can be proved “once and for all” We never have to withdraw a conclusion when we “learn more” Hoare Logic, equational reasoning, … are all monotonic …as are classical logics
  • 14. Classical modularity, recap Software components Have well-defined stable interfaces (by abstraction) Can be organized hierarchically to manage complexity (by idealization) Changes to implementation do not affect rest of the system (by compositionality) Correctness can be proved in isolation, composition preserves correctness (by monotonicity)
  • 15. Classical Modularity Compositionality Monotonicity Abstraction Idealization Information Hiding Reductionism
  • 17. Programmers use Inductive Reasoning Programmers infer a general software property from observing individual cases Tests meant as instances of a general theorem Generalize observed/inspected behavior of a library to other parts Aside: Inductive reasoning also successfully used by tools such as Daikon [Ernst et al]
  • 18. Inductive Reasoning is hard-wired HebbianLearning:“Cells that fire together, wire together”
  • 19. Default Reasoning and Occam’s Razor
  • 20. Default reasoning about APIs An API function will not perform the side effect of formatting the harddrive unless explicitly specified public void setText(String text) Sets the text for this label to the specified text. Parameters: text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "". See Also: getText()
  • 21. Occam’s razor and debugging …a division by zero in line 3 of X.java
  • 22. The actual code of X.java According to Occam’s razor we reject this explanation public class X { public static void main(String args[]) { System.out.println("Exception in thread quot;mainquot; “ + “java.lang.ArithmeticException: / by zero" +" at X.main(X.java:3)"); } }
  • 23. Default Reasoning and Occam’s Razor Acknowledged by principle of least astonishment
  • 24. Law of Prägnanz in Gestalt Psychology We order our experience in a way which is regular, orderly, symmetric and maximizes simplicity.
  • 25. Negation as FailureClosed-World Reasoning Removing an API function is OK if it is not called in my code base One can try to avoid API changes, but this leads to “software asbestos”
  • 26. Closed-World Reasoning in Linux “Get your kernel driver into the main kernel tree. If your driver is in the tree, and a kernel interface changes, it will be fixed up by the person who did the kernel change” From: “The Linux Kernel Driver Interface”, Greg Kroah-Hartman
  • 27. Don’t blame the programmers Programmers are forced to use non-classical reasoning: They have no other choice! Many relevant properties cannot be established with classical reasoning! As logical theories, module interfaces are highly incomplete!
  • 29. Interface Detail If a stakeholder reasons about “non-functional” properties, the abstraction barriers break Example: Choice of implementation of an ADT matters for some stake holders Example: Power consumption, heat production, stack usage, … Using more precise interfaces does not scale Reveal more and more implementation details Unclear how to specify non-modular properties
  • 30. Large Systems Whenever information is hidden, there is potentially a stakeholder (or, concern) who is interested in that detail The larger the system, the more likely such a stakeholder exists Hence the more difficult to maintain the classical notion of information hiding Example: Torvalds’ argument against microkernel OS
  • 31. Large systems and crosscutting concerns Crosscutting concerns are hard to modularize using classical modularity mechanisms Tangling/scattering prevents composability Destroys assumption of classical modularity Just hiding a scattered concern behind interfaces as if it does not exist does not work
  • 32. The Dominant Decomposition The “tyranny of the dominant decomposition”: What can be hidden depends on the decomposition But there is no “best” decomposition What one stakeholder would hide is of primary importance to another
  • 33. Software Evolution Parnas: Hide what is most likely to change But how do we know which changes are likely? If a design decision is part of an interface, it cannot be evolved modularly But if it is hidden behind an interface, evolution might bring a new stakeholder which needs to know about that decision
  • 34. Software Evolution Interface method of java.awt.Label Assume a new composite GUI component which includes two labels How can we implement display update for setBothTexts(String,String) without flickering? public void setText(String text) Sets the text for this label to the specified text. Parameters: text - the text that this label displays. If text is null, it is treated for display purposes like an empty string "". See Also: getText()
  • 35. Information Hiding and Classical Logic:McCarthy’s Qualification Problem “In order to fully represent the conditions for the successful performance of an action, an impractical and implausible number of qualifications would have to be included in the sentences expressing them” [John McCarthy, 1980]
  • 37. Programming and Modeling What is the cause of the failures of classical modularity? My hypothesis: Influence of natural sciences and mathematics on CS and programming Programs as (scientific) models But does this notion of modeling fit to software?
  • 39. Programs are not models! Software has to take into account the needs of many stakeholders at once It has to interact with the real world Simplifying assumptions may turn out to be wrong Software systems are more like a mix of many overlapping and interacting models Programs are not models of a part of reality; they are, when executed, a part of reality
  • 40. Scientific Modeling “We are confronted with a patchwork of theories and models, all of which hold ceteris paribus in their specific domains of applicability.” [Hartmann&Frigg, “Scientific Models”, 2005]
  • 41. In the paper… Several “dark side” modularity mechanisms correspond to non-classical logics Aspects explained in default logic Failure-oblivious computing and paraconsistent logics Shared mutable state and separation logic … Goal of modularity: Modularize relevant properties A property P is modularized (w.r.t. logic L) in a program unit U, if P can be proven from U in L
  • 42. Conclusions Software is a form of human knowledge representationthat happens to be executable on a machine The human face of the dark side
  • 43. Reflections on Denotational Semantics let f(x) = if x == 0 then 42 else f(x-1)in f (1000000000) A semantics which says that this program denotes 42 is broken.
  • 44. Information Hiding: Examples Control structures hide details of control flow management Substitutability: Compilers can choose among different implementations of control structure Procedural abstraction hides implementation behind procedure signature/contract Substitutability: Can replace by different implementation of same contract, e.g. Dijkstra’s THE layer structure Objects of a class can be replaced by objects of a subclass Substitutability: Liskov substitution principle Abstract data types hide internal representation of data Substitutability: Reynold’s abstraction theorem
  • 45. Large Systems The filesystems depend on the VM, and the VM depends on the filesystem. You can't just split them up as if they were two separate things (or rather: you cansplit them up, but they still very much need to know about each other in very intimate ways) Linus Torvalds about Modularity in Operating Systems