SlideShare uma empresa Scribd logo
1 de 34
Reverse Engineering as Theory Building Tony Clark t.n.clark@mdx.ac.uk Balbir Barn b.barn@mdx.ac.uk School of Engineering and Information Sciences University Of Middlesex London, UK
Overview Motivation: Houston, we have a problem. Surely this has been done before? Theory Building: An approach: Old wine in new bottles. Some technology: New wine in old bottles. Case Study: But what might it look like?
Motivation: There is nothing new under the sun.
The business driver Software Outsourcing Inc High value software maintenance contracts Outsourcing of source code maintenance of large scale legacy systems Critical operational systems Initial contract is limited length – achievement of maintenance requests will lead to longer contract. Issues Support for responding to rapid ad hoc requests for changes to system Lack of documentation Original software developers no longer at the customer company A common scenario facing many Indian IT providers
Naur’s Theory of Programming Seminal paper written in 1985 Fundamental assertion: Programmers achieve a certain insight or theory of some aspect of the domain that they are addressing Based on Ryle (1949) –  A person who has a theory or facts can do things and explain why and respond to questions Explains this in the context of the software lifecycle Traditionally software methods are focused on artifact production (explicit knowledge). But should be focussed on techne and phronosis (wisdom derived from practice)
Naur’s Thesis: Features Programming is Theory Building. Understand the domain as a theory. Theories consist of information bearing statements about a domain that are true (or false). No such thing as the ideal  theory because: many consistent (incomplete) theories. theories are personal. theories consist of information necessary for stakeholder.
Systems lifecycle and theory building Theory building Theory Decay Analysis and Design Implementation Maintenance Deployed System Once the system is deployed and enters into a maintenance phase, the only way the theory can be retained is by transfer of knowledge between team members. The artifacts represent an incomplete documentation of the theory
Naur’s Thesis: Benefit Claims Core IPR is in theories. Theories are more abstract than programs. Maintain system using theories. Introduce new people using theory not code. Theories are reusable (code fails to be). Theories allow questions to be articulated. Theories capture different views of a system.
Understanding is Theory Building
What do we currently do? Program Code: Just look at the code. Misunderstandings because: the domain is weakly represented in the code. unable to articulate questions. UML Models: Weakly expressive: Static models are OK. Dynamic models lack completeness. Meaning is bound up with translations to code. Modularity cannot be applied to understanding: have to state the whole thing – no real views.
Naur’s Thesis Applied to Modelling What’s the difference between modelling and programming? If programming is the construction of a theory that is then mapped to an implementation (theory) then: Modelling smells like programming to me. What’s the difference between modelling and domain specific modelling? A theory building framework gives us a context in which this can be analyzed.
Approach: Building theories about an application.
Theory Building Process User Interface observation System  Executions interaction Source Code Models (static, dynamic, security, etc.) Theorems (aspects) formulation inspection modification grounding Documentation comprehension abstraction Partial Theories Expert Knowledge acquisition slicing aggregation Theory
What is a theory? theorem: true or false statements. theory: collections of theorems. axioms: statements that are givens. rules: ways of constructing theorems. mappings: between theories (and theorems) combinations: composing theories (and theorems). initial: an initial theory maps to all the others. terminal: every theory maps to a terminal theory.
Being Concrete: Aspects of a Simple Case Study
Customer Requirement Software maintenance contract with a Library. They have software controlling borrowings at multiple terminals. Originally sourced from a third party. They have lost the documentation. They have the source code. Occasionally they have noticed books going missing. Under the contract your company needs to identify and fix the problem.
Library Source Code class Library {   Vector<Reader> readers;   Vector<Book> books; Hashtable<Reader,Book[]> borrows; intnextReaderId;  public void handle(Messagem) { switch(m.id) { case REGISTER: register(m); break; case ADD_BOOK: add_book(m); break; case BORROW: borrow(m); break;       ... }  }   ... } application state entry point interface
Library Operations public void register(Messagem) {  String name = (String)m.getData(0); if(hasReader(name) == false) { intid = allocateReaderId(); readers.add(newReader(name,id)); m.reply(id);  } else m.fail(); } message args guard data access message reply
Borrowing public voidborrow(Messagem) { int id = (int)m.getData(0);  String name = (String)m.getData(1);   Reader reader = getReader(id);   Book book = removeBook(name);   Book[] borrowed = borrows.get(id); if(borrowed.length < BORROW_LIMIT) {     Book[] updated = new Book[borrowed.length+1]; Array.copyInto(borrowed,updated); updated[borrowed.length] = book; borrows.put(reader,updated); m.reply(OK);   } else m.reply(FAIL); } data access data access
Static Modelling
Commands
Data Access
Results
Partial Theories are Defined by Rules r = (Reader)[name = n; id = i] not(R->includes(r)) ---------------------------------------------- [EvalRule]        (Eval)[          data = (AddReader)[name = n];           result = (ReaderAllocated)[id = i];          change = (StateChange)[            pre = (Library)[              readers = R;               books = B;               borrows = X;  nextReaderId = i];             post = (Library)[              readers = R->including(r);               books = B;               borrows = X; nextReaderId = i+1            ]         ]       ]
Evaluating More than one Data Access (Evals)[accesses = Seq{}; changes = Seq{}; results = R]  (EvalsRule)        (Eval)[data = a; change = c; result = r] ---------------------------------------------------------  (EvalsRule) (Evals)[accesses = Seq{a}; changes = Seq{c}; results = Seq{r}]          (Evals)[accesses = P; changes = C; results = V]          (Evals)[accesses = Q; changes = D; results = W] ---------------------------------------------------------- (EvalsRule) (Evals)[accesses = P + Q; changes = C + D; results = V + W
Library Theory
Theorems Can someone borrow a book without joining the library? Can two people join the library with the same id? Is it possible to construct a situation where a book disappears from the library?
Theorem Development 2
Fill in the Blanks 2
Hypothesize the Blanks 2
Deduction Deduction: Theory tells us there must be two cards for fred. Reality: Fred must have duplicated the library card and an accomplice borrows the second book at the same time when fred borrows the first. Solution: change the theory.
ModifyDefinitionofProject
Borrowing (modified) publicsynchronized void borrow(Messagem) { int id = (int)m.getData(0);  String name = (String)m.getData(1);   Reader reader = getReader(id);   Book book = removeBook(name);   Book[] borrowed = borrows.get(id); if(borrowed.length < BORROW_LIMIT) {     Book[] updated = new Book[borrowed.length+1]; Array.copyInto(borrowed,updated); updated[borrowed.length] = book; borrows.put(reader,updated); m.reply(OK);   } else m.reply(FAIL); }
Conclusion Understanding is theory building. Modelling and programming are essentially the same. Modelling aims to be initial. Programming needs to be terminal. Modelling languages should support theories. Theories need to support: translation through mappings. different views through combination. patterns through parameterization.

Mais conteúdo relacionado

Mais procurados

Data Mining and the Web_Past_Present and Future
Data Mining and the Web_Past_Present and FutureData Mining and the Web_Past_Present and Future
Data Mining and the Web_Past_Present and Future
feiwin
 
Email Data Cleaning
Email Data CleaningEmail Data Cleaning
Email Data Cleaning
feiwin
 
An Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System ManagementAn Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System Management
feiwin
 
Finding Similar Files in Large Document Repositories
Finding Similar Files in Large Document RepositoriesFinding Similar Files in Large Document Repositories
Finding Similar Files in Large Document Repositories
feiwin
 
The Query Engine: The Life of a Read
The Query Engine: The Life of a ReadThe Query Engine: The Life of a Read
The Query Engine: The Life of a Read
MongoDB
 

Mais procurados (20)

Data Mining and the Web_Past_Present and Future
Data Mining and the Web_Past_Present and FutureData Mining and the Web_Past_Present and Future
Data Mining and the Web_Past_Present and Future
 
Email Data Cleaning
Email Data CleaningEmail Data Cleaning
Email Data Cleaning
 
Spark Solution for Rank Product
Spark Solution for Rank ProductSpark Solution for Rank Product
Spark Solution for Rank Product
 
An Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System ManagementAn Integrated Framework on Mining Logs Files for Computing System Management
An Integrated Framework on Mining Logs Files for Computing System Management
 
Data Structures and Algorithm - Week 8 - Minimum Spanning Trees
Data Structures and Algorithm - Week 8 - Minimum Spanning TreesData Structures and Algorithm - Week 8 - Minimum Spanning Trees
Data Structures and Algorithm - Week 8 - Minimum Spanning Trees
 
Finding Similar Files in Large Document Repositories
Finding Similar Files in Large Document RepositoriesFinding Similar Files in Large Document Repositories
Finding Similar Files in Large Document Repositories
 
Data Structures and Algorithm - Week 3 - Stacks and Queues
Data Structures and Algorithm - Week 3 - Stacks and QueuesData Structures and Algorithm - Week 3 - Stacks and Queues
Data Structures and Algorithm - Week 3 - Stacks and Queues
 
The Query Engine: The Life of a Read
The Query Engine: The Life of a ReadThe Query Engine: The Life of a Read
The Query Engine: The Life of a Read
 
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
Ranking and Diversity in Recommendations - RecSys Stammtisch at SoundCloud, B...
 
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning TrackConformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
Conformer-Kernel with Query Term Independence @ TREC 2020 Deep Learning Track
 
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
IRJET- Empower Syntactic Exploration Based on Conceptual Graph using Searchab...
 
Document Classification and Clustering
Document Classification and ClusteringDocument Classification and Clustering
Document Classification and Clustering
 
Data exploration validation and sanitization
Data exploration validation and sanitizationData exploration validation and sanitization
Data exploration validation and sanitization
 
Machine Reading Using Neural Machines (talk at Microsoft Research Faculty Sum...
Machine Reading Using Neural Machines (talk at Microsoft Research Faculty Sum...Machine Reading Using Neural Machines (talk at Microsoft Research Faculty Sum...
Machine Reading Using Neural Machines (talk at Microsoft Research Faculty Sum...
 
TextRank: Bringing Order into Texts
TextRank: Bringing Order into TextsTextRank: Bringing Order into Texts
TextRank: Bringing Order into Texts
 
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
ChemExtractor: Enhanced Rule-Based Capture and Identification of PDF Based Pr...
 
Data Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL TreesData Structures and Algorithm - Week 5 - AVL Trees
Data Structures and Algorithm - Week 5 - AVL Trees
 
Data Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black TreesData Structures and Algorithm - Week 6 - Red Black Trees
Data Structures and Algorithm - Week 6 - Red Black Trees
 
SF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in PythonSF Python Meetup: TextRank in Python
SF Python Meetup: TextRank in Python
 
Cs583 info-retrieval
Cs583 info-retrievalCs583 info-retrieval
Cs583 info-retrieval
 

Semelhante a Reverse engineering and theory building v3

06 styles and_greenfield_design
06 styles and_greenfield_design06 styles and_greenfield_design
06 styles and_greenfield_design
Majong DevJfu
 
Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)
Ravi Okade
 
conceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdf
conceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdfconceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdf
conceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdf
SahajShrimal1
 

Semelhante a Reverse engineering and theory building v3 (20)

06 styles and_greenfield_design
06 styles and_greenfield_design06 styles and_greenfield_design
06 styles and_greenfield_design
 
reverse(1)
reverse(1)reverse(1)
reverse(1)
 
Towards Computational Research Objects
Towards Computational Research ObjectsTowards Computational Research Objects
Towards Computational Research Objects
 
Open Archives Initiative Object Reuse and Exchange
Open Archives Initiative Object Reuse and ExchangeOpen Archives Initiative Object Reuse and Exchange
Open Archives Initiative Object Reuse and Exchange
 
Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)Optimizing Application Architecture (.NET/Java topics)
Optimizing Application Architecture (.NET/Java topics)
 
Introduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKennaIntroduction to OpenSees by Frank McKenna
Introduction to OpenSees by Frank McKenna
 
Illustrated Code (ASE 2021)
Illustrated Code (ASE 2021)Illustrated Code (ASE 2021)
Illustrated Code (ASE 2021)
 
The Rise of Approximate Ontology Reasoning: Is It Mainstream Yet? --- Revisit...
The Rise of Approximate Ontology Reasoning: Is It Mainstream Yet? --- Revisit...The Rise of Approximate Ontology Reasoning: Is It Mainstream Yet? --- Revisit...
The Rise of Approximate Ontology Reasoning: Is It Mainstream Yet? --- Revisit...
 
Design Patterns
Design PatternsDesign Patterns
Design Patterns
 
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
Apache Calcite: A Foundational Framework for Optimized Query Processing Over ...
 
Database Research Principles Revealed
Database Research Principles RevealedDatabase Research Principles Revealed
Database Research Principles Revealed
 
Mining Source Code Improvement Patterns from Similar Code Review Works
Mining Source Code Improvement Patterns from Similar Code Review WorksMining Source Code Improvement Patterns from Similar Code Review Works
Mining Source Code Improvement Patterns from Similar Code Review Works
 
Data legend dh_benelux_2017.key
Data legend dh_benelux_2017.keyData legend dh_benelux_2017.key
Data legend dh_benelux_2017.key
 
From Scientific Workflows to Research Objects: Publication and Abstraction of...
From Scientific Workflows to Research Objects: Publication and Abstraction of...From Scientific Workflows to Research Objects: Publication and Abstraction of...
From Scientific Workflows to Research Objects: Publication and Abstraction of...
 
Orcas
OrcasOrcas
Orcas
 
Modeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and FunctionalModeling- Object, Dynamic and Functional
Modeling- Object, Dynamic and Functional
 
conceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdf
conceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdfconceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdf
conceptsinobjectorientedprogramminglanguages-12659959597745-phpapp02.pdf
 
Being RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data PersistenceBeing RDBMS Free -- Alternate Approaches to Data Persistence
Being RDBMS Free -- Alternate Approaches to Data Persistence
 
Data Mining-based Tools to Support Library Update. PhD Defence of Oleksandr Z...
Data Mining-based Tools to Support Library Update. PhD Defence of Oleksandr Z...Data Mining-based Tools to Support Library Update. PhD Defence of Oleksandr Z...
Data Mining-based Tools to Support Library Update. PhD Defence of Oleksandr Z...
 
Lambdas & Streams
Lambdas & StreamsLambdas & Streams
Lambdas & Streams
 

Mais de ClarkTony

Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
ClarkTony
 
LEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and AnalysisLEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and Analysis
ClarkTony
 
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven ArchitectureA Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
ClarkTony
 
Context Aware Reactive Applications
Context Aware Reactive ApplicationsContext Aware Reactive Applications
Context Aware Reactive Applications
ClarkTony
 
Model Slicing
Model SlicingModel Slicing
Model Slicing
ClarkTony
 
Patterns 200711
Patterns 200711Patterns 200711
Patterns 200711
ClarkTony
 
Kings 120711
Kings 120711Kings 120711
Kings 120711
ClarkTony
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
ClarkTony
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
ClarkTony
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09
ClarkTony
 
Mcms and ids sig
Mcms and ids sigMcms and ids sig
Mcms and ids sig
ClarkTony
 
Onward presentation.en
Onward presentation.enOnward presentation.en
Onward presentation.en
ClarkTony
 
Formalizing homogeneous language embeddings
Formalizing homogeneous language embeddingsFormalizing homogeneous language embeddings
Formalizing homogeneous language embeddings
ClarkTony
 
Filmstrip testing
Filmstrip testingFilmstrip testing
Filmstrip testing
ClarkTony
 
Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory building
ClarkTony
 

Mais de ClarkTony (20)

The Uncertain Enterprise
The Uncertain EnterpriseThe Uncertain Enterprise
The Uncertain Enterprise
 
Actors for Behavioural Simulation
Actors for Behavioural SimulationActors for Behavioural Simulation
Actors for Behavioural Simulation
 
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
Context-Aware Content-Centric Collaborative Workflow Management for Mobile De...
 
LEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and AnalysisLEAP A Language for Architecture Design, Simulation and Analysis
LEAP A Language for Architecture Design, Simulation and Analysis
 
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven ArchitectureA Common Basis for Modelling Service-Oriented and Event-Driven Architecture
A Common Basis for Modelling Service-Oriented and Event-Driven Architecture
 
Context Aware Reactive Applications
Context Aware Reactive ApplicationsContext Aware Reactive Applications
Context Aware Reactive Applications
 
Model Slicing
Model SlicingModel Slicing
Model Slicing
 
Patterns 200711
Patterns 200711Patterns 200711
Patterns 200711
 
Kings 120711
Kings 120711Kings 120711
Kings 120711
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
 
Iswim for testing
Iswim for testingIswim for testing
Iswim for testing
 
Kiss at oopsla 09
Kiss at oopsla 09Kiss at oopsla 09
Kiss at oopsla 09
 
Mcms and ids sig
Mcms and ids sigMcms and ids sig
Mcms and ids sig
 
Ocl 09
Ocl 09Ocl 09
Ocl 09
 
Scam 08
Scam 08Scam 08
Scam 08
 
Onward presentation.en
Onward presentation.enOnward presentation.en
Onward presentation.en
 
Hcse pres
Hcse presHcse pres
Hcse pres
 
Formalizing homogeneous language embeddings
Formalizing homogeneous language embeddingsFormalizing homogeneous language embeddings
Formalizing homogeneous language embeddings
 
Filmstrip testing
Filmstrip testingFilmstrip testing
Filmstrip testing
 
Dsm as theory building
Dsm as theory buildingDsm as theory building
Dsm as theory building
 

Último

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
Joaquim Jorge
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Safe Software
 

Último (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024Tata AIG General Insurance Company - Insurer Innovation Award 2024
Tata AIG General Insurance Company - Insurer Innovation Award 2024
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 

Reverse engineering and theory building v3

  • 1. Reverse Engineering as Theory Building Tony Clark t.n.clark@mdx.ac.uk Balbir Barn b.barn@mdx.ac.uk School of Engineering and Information Sciences University Of Middlesex London, UK
  • 2. Overview Motivation: Houston, we have a problem. Surely this has been done before? Theory Building: An approach: Old wine in new bottles. Some technology: New wine in old bottles. Case Study: But what might it look like?
  • 3. Motivation: There is nothing new under the sun.
  • 4. The business driver Software Outsourcing Inc High value software maintenance contracts Outsourcing of source code maintenance of large scale legacy systems Critical operational systems Initial contract is limited length – achievement of maintenance requests will lead to longer contract. Issues Support for responding to rapid ad hoc requests for changes to system Lack of documentation Original software developers no longer at the customer company A common scenario facing many Indian IT providers
  • 5. Naur’s Theory of Programming Seminal paper written in 1985 Fundamental assertion: Programmers achieve a certain insight or theory of some aspect of the domain that they are addressing Based on Ryle (1949) – A person who has a theory or facts can do things and explain why and respond to questions Explains this in the context of the software lifecycle Traditionally software methods are focused on artifact production (explicit knowledge). But should be focussed on techne and phronosis (wisdom derived from practice)
  • 6. Naur’s Thesis: Features Programming is Theory Building. Understand the domain as a theory. Theories consist of information bearing statements about a domain that are true (or false). No such thing as the ideal theory because: many consistent (incomplete) theories. theories are personal. theories consist of information necessary for stakeholder.
  • 7. Systems lifecycle and theory building Theory building Theory Decay Analysis and Design Implementation Maintenance Deployed System Once the system is deployed and enters into a maintenance phase, the only way the theory can be retained is by transfer of knowledge between team members. The artifacts represent an incomplete documentation of the theory
  • 8. Naur’s Thesis: Benefit Claims Core IPR is in theories. Theories are more abstract than programs. Maintain system using theories. Introduce new people using theory not code. Theories are reusable (code fails to be). Theories allow questions to be articulated. Theories capture different views of a system.
  • 10. What do we currently do? Program Code: Just look at the code. Misunderstandings because: the domain is weakly represented in the code. unable to articulate questions. UML Models: Weakly expressive: Static models are OK. Dynamic models lack completeness. Meaning is bound up with translations to code. Modularity cannot be applied to understanding: have to state the whole thing – no real views.
  • 11. Naur’s Thesis Applied to Modelling What’s the difference between modelling and programming? If programming is the construction of a theory that is then mapped to an implementation (theory) then: Modelling smells like programming to me. What’s the difference between modelling and domain specific modelling? A theory building framework gives us a context in which this can be analyzed.
  • 12. Approach: Building theories about an application.
  • 13. Theory Building Process User Interface observation System Executions interaction Source Code Models (static, dynamic, security, etc.) Theorems (aspects) formulation inspection modification grounding Documentation comprehension abstraction Partial Theories Expert Knowledge acquisition slicing aggregation Theory
  • 14. What is a theory? theorem: true or false statements. theory: collections of theorems. axioms: statements that are givens. rules: ways of constructing theorems. mappings: between theories (and theorems) combinations: composing theories (and theorems). initial: an initial theory maps to all the others. terminal: every theory maps to a terminal theory.
  • 15. Being Concrete: Aspects of a Simple Case Study
  • 16. Customer Requirement Software maintenance contract with a Library. They have software controlling borrowings at multiple terminals. Originally sourced from a third party. They have lost the documentation. They have the source code. Occasionally they have noticed books going missing. Under the contract your company needs to identify and fix the problem.
  • 17. Library Source Code class Library { Vector<Reader> readers; Vector<Book> books; Hashtable<Reader,Book[]> borrows; intnextReaderId; public void handle(Messagem) { switch(m.id) { case REGISTER: register(m); break; case ADD_BOOK: add_book(m); break; case BORROW: borrow(m); break; ... } } ... } application state entry point interface
  • 18. Library Operations public void register(Messagem) { String name = (String)m.getData(0); if(hasReader(name) == false) { intid = allocateReaderId(); readers.add(newReader(name,id)); m.reply(id); } else m.fail(); } message args guard data access message reply
  • 19. Borrowing public voidborrow(Messagem) { int id = (int)m.getData(0); String name = (String)m.getData(1); Reader reader = getReader(id); Book book = removeBook(name); Book[] borrowed = borrows.get(id); if(borrowed.length < BORROW_LIMIT) { Book[] updated = new Book[borrowed.length+1]; Array.copyInto(borrowed,updated); updated[borrowed.length] = book; borrows.put(reader,updated); m.reply(OK); } else m.reply(FAIL); } data access data access
  • 24. Partial Theories are Defined by Rules r = (Reader)[name = n; id = i] not(R->includes(r)) ---------------------------------------------- [EvalRule] (Eval)[ data = (AddReader)[name = n]; result = (ReaderAllocated)[id = i]; change = (StateChange)[ pre = (Library)[ readers = R; books = B; borrows = X; nextReaderId = i]; post = (Library)[ readers = R->including(r); books = B; borrows = X; nextReaderId = i+1 ] ] ]
  • 25. Evaluating More than one Data Access (Evals)[accesses = Seq{}; changes = Seq{}; results = R] (EvalsRule) (Eval)[data = a; change = c; result = r] --------------------------------------------------------- (EvalsRule) (Evals)[accesses = Seq{a}; changes = Seq{c}; results = Seq{r}] (Evals)[accesses = P; changes = C; results = V] (Evals)[accesses = Q; changes = D; results = W] ---------------------------------------------------------- (EvalsRule) (Evals)[accesses = P + Q; changes = C + D; results = V + W
  • 27. Theorems Can someone borrow a book without joining the library? Can two people join the library with the same id? Is it possible to construct a situation where a book disappears from the library?
  • 29. Fill in the Blanks 2
  • 31. Deduction Deduction: Theory tells us there must be two cards for fred. Reality: Fred must have duplicated the library card and an accomplice borrows the second book at the same time when fred borrows the first. Solution: change the theory.
  • 33. Borrowing (modified) publicsynchronized void borrow(Messagem) { int id = (int)m.getData(0); String name = (String)m.getData(1); Reader reader = getReader(id); Book book = removeBook(name); Book[] borrowed = borrows.get(id); if(borrowed.length < BORROW_LIMIT) { Book[] updated = new Book[borrowed.length+1]; Array.copyInto(borrowed,updated); updated[borrowed.length] = book; borrows.put(reader,updated); m.reply(OK); } else m.reply(FAIL); }
  • 34. Conclusion Understanding is theory building. Modelling and programming are essentially the same. Modelling aims to be initial. Programming needs to be terminal. Modelling languages should support theories. Theories need to support: translation through mappings. different views through combination. patterns through parameterization.