SlideShare a Scribd company logo
1 of 98
A Grand Unified Theory of
        Software
      Vinod Dinakaran
    BarcampBangalore XII
A Grand Unified Theory of
        Software
      Vinod Dinakaran
    BarcampBangalore XII
..so I had a 92-slide deck prepared…
… and this was slide 92…
                  … so this is more like a
                  progress report than a
                  finished product…
        WIP
                  ..but you can help finish it!




  SE
GUT
         GUT  S
          WIP




                  YOUR THEORY
..so I figured this session
    would work better
      as a discussion
   than a monologue 
What I’d like to talk about..
• What I mean by “A Theory of software”
• Why we need such a thing
• A pretty good Grand Theory of Software
  Engineering I found on Google
• My own ideas for a Grand Theory of Software
• Discuss these ideas
I’ll talk till…
• What I mean by “A Theory of software”
• Why we need such a thing
• A pretty good Grand Theory of Software
  Engineering I found on Google
• My own ideas for a Grand Theory of Software
It’ll be GREAT if we can get till…
• What I mean by “A Theory of software”
• Why we need such a thing
• A pretty good Grand Theory of Software
  Engineering I found on Google
• My own ideas for a Grand Theory of Software
It’ll be AWESOME if we can get till…
• What I mean by “A Theory of software”
• Why we need such a thing
• A pretty good Grand Theory of Software
  Engineering I found on Google
• My own ideas for a Grand Theory of Software
So what does “Theory of Software”
             mean?
Theorem proving     Way(s) of thinking
Code Verification   Useful models
Theoretical /       Common Lang Vocab
Academic            Sensible Axioms
                    Derivable Laws
IRL




Emp St Bldg         Its model
What can we print on the T-shirts for
            software?
We’d print the Theory of Software
            on T-shirts
Why do we need a “Theory of
        Software”?
This is software
development/engineering today
Integration
Webapp
Enterprise App
IT Org
3 reasons, therefore
#1: S/w Dev is a lossy process




We need a Pensieve for software for the lost “WHY”s
#2: We no longer
    UNDERSTAND
software that we built
  … at least not fully

    …its that big
#3: we’re due some Revolution




We are        We need to
here          be here
As proof I present a lot of
        MICRO-
 THEORIES, IDIOMS,
    BEST PRACTICES
           AND
   METHODOLOGIES
Goto is harmful                            1 program

           Structured programming is good                           n programs
           Object Orientation is good; encapsulate state
        Functional programming is good; avoid state

                 TDD is good; test everything!                      1-n devs


        Adding manpower to a late project makes it later
                                                                    1 pm
  The man-month is a dangerous and fallacious myth, for it
      implies that man and machine are interchangeable
                                                                    n pm’s

You ship your organization, i.e., your code has the same shape as
                        your org structure                          1 org

      Release early, release often (startups)
          Use old, proven technology (Mars rover)                   n orgs


       Hardware doubles in performance every 18 months
                                                                    the world
Remind you of something?
So what’s required of a “Theory of
            Software”?
Once built, with the ToS we could…
• Use the model as a blueprint to build software
• One model can build many “instances” of
  software – same or similar
• One model will allow reasoning about all such
  instances
• There would be “Universal Software Laws”

         • …pigs will fly…unicorns everywhere…
So like other Physical theories

One paradigm     => Unified
                    Simple
No schools       => Consistent
                    Defined scope
Puzzle Solving   => Definition & Explanation
Research         => Falsifiable
They’re not the same, tho…
Real World              Software world

“Out there”             Inside our heads

Real, unchangeable       Limited only by our
limits                   imagination
Objective (well, mostly) Subjective
So unlike other Physical theories
Any ToS should :
• Directly represent man and the subjectivity
  that comes with it
• Allow for how the human mind works and
  model it
• Model human organizations and human +
  machine combinations
• Model software; its structure and behavior
Finally, like any body of science, it
            should have…
         Axioms: Givens, “Taken for
           granted”s, universal truths

         Theories: Assumptions based on
           the axioms

         Laws: Proven theories

         Application of the Science
Two candidates: GUTSE & GUTS
A brief tangent before we start
                     “Sw FEM” post
                        + GUTS



Waitaminnit…




                   …GUTSE!
GUTSE and GUTS: a comparison
Feature                     GUTSE        GUTS
Unified, simple                     Y           *
Consistent                          Y           *
Defined Scope                       Y           Y
Vast explanation capacity           Y           N
Falsifiable                         Y           Y
Models humans                       Y           Y
Models human Orgs                   Y           N
Models human+m/c combos             Y           N
Models software                     Y           Y
Has axioms                          Y           Y
Has Theorems                        N           *
Has Laws                            N           *
Has applications                    Y*          N
… and so we come full circle…
                     … so this is more like a
                     progress report than a
                     finished product…
           WIP
                     ..but you can help finish it!




    SE
  GUT
           GUT   S
             WIP




                     YOUR THEORY
Where do we go from here?




GUTSE                  GUTS



          Discussion
GUTSE: Axioms
Q: What do we do when we write
           software?
A:
We solve problems using machines
Actually….

  We solve problems & encode the
              solutions
using so that machines can run them
            instead of us



               Coded Solution   Running Solution
  Problem
Problem    Solution




Encoded    Solution to
Solution   problem
All Software Development is therefore a
        Grand translation exercise
…translation of what? To what?
A string           of        symbols
Generally, A composition      of        building blocks
                                        (aka Composition units)
E.g.:
Pascal:  "procedure begin .... end".
         whole thing is the spec, each identifier is a CU
English: "This is a sentence".
         Words are CUs, sentence is the spec;
         Sentences are CUs, Para is the spec;
         and so forth


A set of specifications, constrained by the kind of CUs allowed
to be in them

E.g.:
         Java, Fortran, Assembly
Equally: Requirements Spec, Design Doc
         UML
         Logs
Special case: the Executor
All Software Engineering can be expressed in
    terms of transformers and specifications
But it cant all be rote
       transforms, right?




A: Semantic Mappings    (yes, they’re Venn Diagrams)
Mapping a language to another (via a
  transformer) defines it in terms of the
other language; thereby giving it meaning.
Sem-nastics: The Semantic Domain




                     This is a Semantic Domain
                      because both programs
                       mean the same in this
                               domain
More Sem-nastics




                   SD




 SD    SD
A Semantic Domain is where semantic
 relations become syntactic. If two specs’
  translation into an SD are syntactically
equivalent, then they are also semantically
                equivalent.
General Semantic Domain
More Sem-nastics
Problem Solving: GUTSE-style
Sw Engg: GUTSE-style
We still need to define the machine and the
    mind a little bit better so that we can
          reason about their behavior
The model m/c: a Von Neumann m/c
The vNM executor
The model mind: ACT-R

             Requirements:
             •Explain and predict
             problem solving
             •Explain and predict
             HUMAN problem solving
                •Without ignoring our
                understanding and
                learning difficulties
             •Concrete and
             operationalized.
ACT-R Demo
ACT-R Demo
E.g.: if Goal Memory has:
                 =goal>
                          isa ADDITION
                          n1=three
                          n2=four
                          ans=nil
ACT-R Demo
… and Procedural Memory has:
                Add-nos
                       =goal>
                             isa ADDITION
                             n1=three
                             n2=four
                             ans=nil
                       =fact>
                             isa ADD-FACT
                             addend1=num1
                             addend2=num2
                             sum=sum
                ==>
                       =goal>
                             ans=sum
ACT-R Demo
and we indeed have a fact in Declarative Memory that asserts:
        =fact3+4>
                isa ADD-FACT
                addend1=three
                addend2=four
                sum=seven

... then the mind will output
          seven
… as the answer.
ACT-R Demo
This is a simple example, but more complex
  ones are:
  - reasoning by counting
  - retrieval from memory
  - retrieval from input system (e.g., by reading
  a book)
GUTSE: Theories
Composing transformers
Composing Transformers
Man + m/c
Man + m/c : Circa 1970s
Organization: Waterfall
Organization: MMM
Organization: XP
GUTSE: 50k view
GUTSE: Laws
Meta Law: no law can be stated without
      qualification wrt a specific SD
GUTSE: Application
 of Science
Tour de Force: Assembly vs. HLL
         Q:Which is better from a Programmer’s POV?
        A: Let’s model the process of learning the
 language, writing a trial program and then executing a
  real program by implementing a Bubble Sort in both




C /Assembly SD                                        C /Assembly
                                                       Execution
                                                      State Space



                                         Lists of
                                        Numbers SD
… then let’s replace the human with
   ACT-R and see how it behaves




C /Assembly SD                      C /Assembly
                                     Execution
                                    State Space



                        Lists of
                       Numbers SD
Step 0: Simulate a language in ACT-R




       The Assembly machine’s ACT-R setup is essentially the same
Sample Rule from Sim
Step 1: Learn the languages
Step 2: Learn the Sort program
Assembly




C
Bubble Sort in Assembly
Bubble Sort in C
Step 3: Simulate run of s/w bubble
sort m/c’s written in Assembly & C
Bubble Sort m/c: Internals




   The C machine’s internal view is essentially the same
Bubble Sort m/c: Simulated Internals
Actual run results


                     ~2X effort for
                     Assembly




                          Overall, C wins
GUTS
Start with the “how to read..” node
                              (see links)
Questions?
Links
Ref                Link

Alan Kay’s Talk    http://www.tele-task.de/archive/video/flash/14029/

“FEM analysis on   http://tt2n.blogspot.com/2009/06/fem-like-analysis-
code” blog post    on-code.html

GUTS               https://github.com/vinodkd/guts

GUTSE              http://books.google.com/books/about/The_Grand_Un
                   ified_Theory_of_Software_Eng.html?id=TLcceL3NEiM
                   C
Thank You




Vinod.dinakaran@gmail.com
      +vinod.dinakaran
    @vinod_dinakaran
     tt2n.blogspot.com

More Related Content

Similar to A Grand Unified Theory of Software

Boost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaBoost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaStack Learner
 
Better. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC DesignBetter. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC Designjennifer gergen
 
Dances with unicorns
Dances with unicornsDances with unicorns
Dances with unicornsEspritAgile
 
Mastering python lesson1
Mastering python lesson1Mastering python lesson1
Mastering python lesson1Ruth Marvin
 
Planning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsPlanning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsChristian Heilmann
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developerAnton Kirillov
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review GuideBenjamin Kissinger
 
Culture And Aesthetic Revisited
Culture And Aesthetic RevisitedCulture And Aesthetic Revisited
Culture And Aesthetic RevisitedAdam Keys
 
Design Patterns Summer Course 2009-2010 - Session#1
Design Patterns Summer Course 2009-2010 - Session#1Design Patterns Summer Course 2009-2010 - Session#1
Design Patterns Summer Course 2009-2010 - Session#1Muhamad Hesham
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developersMichael Marotta
 
Importance Of Being Driven
Importance Of Being DrivenImportance Of Being Driven
Importance Of Being DrivenAntonio Terreno
 
FME UC 2014: Keynote from Boundless
FME UC 2014: Keynote from BoundlessFME UC 2014: Keynote from Boundless
FME UC 2014: Keynote from BoundlessSafe Software
 
David Barber - Deep Nets, Bayes and the story of AI
David Barber - Deep Nets, Bayes and the story of AIDavid Barber - Deep Nets, Bayes and the story of AI
David Barber - Deep Nets, Bayes and the story of AIBayes Nets meetup London
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLCAbdul Karim
 

Similar to A Grand Unified Theory of Software (20)

Debugging
DebuggingDebugging
Debugging
 
Boost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In BanglaBoost Your Base Bootcamp - [Online & Offline] In Bangla
Boost Your Base Bootcamp - [Online & Offline] In Bangla
 
Better. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC DesignBetter. Faster. UXier. — AToMIC Design
Better. Faster. UXier. — AToMIC Design
 
B D D Intro
B D D  IntroB D D  Intro
B D D Intro
 
Dances with unicorns
Dances with unicornsDances with unicorns
Dances with unicorns
 
Mental Models2
Mental Models2Mental Models2
Mental Models2
 
The Heart Of Agile
The Heart Of AgileThe Heart Of Agile
The Heart Of Agile
 
Mastering python lesson1
Mastering python lesson1Mastering python lesson1
Mastering python lesson1
 
Raising the Bar
Raising the BarRaising the Bar
Raising the Bar
 
Planning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teamsPlanning JavaScript and Ajax for larger teams
Planning JavaScript and Ajax for larger teams
 
Evolving as a professional software developer
Evolving as a professional software developerEvolving as a professional software developer
Evolving as a professional software developer
 
Basics of Programming - A Review Guide
Basics of Programming - A Review GuideBasics of Programming - A Review Guide
Basics of Programming - A Review Guide
 
Culture And Aesthetic Revisited
Culture And Aesthetic RevisitedCulture And Aesthetic Revisited
Culture And Aesthetic Revisited
 
Design Patterns Summer Course 2009-2010 - Session#1
Design Patterns Summer Course 2009-2010 - Session#1Design Patterns Summer Course 2009-2010 - Session#1
Design Patterns Summer Course 2009-2010 - Session#1
 
Documentation for developers
Documentation for developersDocumentation for developers
Documentation for developers
 
Importance Of Being Driven
Importance Of Being DrivenImportance Of Being Driven
Importance Of Being Driven
 
FME UC 2014: Keynote from Boundless
FME UC 2014: Keynote from BoundlessFME UC 2014: Keynote from Boundless
FME UC 2014: Keynote from Boundless
 
Oop concept
Oop conceptOop concept
Oop concept
 
David Barber - Deep Nets, Bayes and the story of AI
David Barber - Deep Nets, Bayes and the story of AIDavid Barber - Deep Nets, Bayes and the story of AI
David Barber - Deep Nets, Bayes and the story of AI
 
How to Implement Domain Driven Design in Real Life SDLC
How to Implement Domain Driven Design  in Real Life SDLCHow to Implement Domain Driven Design  in Real Life SDLC
How to Implement Domain Driven Design in Real Life SDLC
 

Recently uploaded

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
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
 
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
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentationphoebematthew05
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brandgvaughan
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 

Recently uploaded (20)

"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
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
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering Tips
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
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
 
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...
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
costume and set research powerpoint presentation
costume and set research powerpoint presentationcostume and set research powerpoint presentation
costume and set research powerpoint presentation
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
WordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your BrandWordPress Websites for Engineers: Elevate Your Brand
WordPress Websites for Engineers: Elevate Your Brand
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 

A Grand Unified Theory of Software

  • 1. A Grand Unified Theory of Software Vinod Dinakaran BarcampBangalore XII
  • 2. A Grand Unified Theory of Software Vinod Dinakaran BarcampBangalore XII
  • 3. ..so I had a 92-slide deck prepared…
  • 4. … and this was slide 92… … so this is more like a progress report than a finished product… WIP ..but you can help finish it! SE GUT GUT S WIP YOUR THEORY
  • 5. ..so I figured this session would work better as a discussion than a monologue 
  • 6. What I’d like to talk about.. • What I mean by “A Theory of software” • Why we need such a thing • A pretty good Grand Theory of Software Engineering I found on Google • My own ideas for a Grand Theory of Software • Discuss these ideas
  • 7. I’ll talk till… • What I mean by “A Theory of software” • Why we need such a thing • A pretty good Grand Theory of Software Engineering I found on Google • My own ideas for a Grand Theory of Software
  • 8. It’ll be GREAT if we can get till… • What I mean by “A Theory of software” • Why we need such a thing • A pretty good Grand Theory of Software Engineering I found on Google • My own ideas for a Grand Theory of Software
  • 9. It’ll be AWESOME if we can get till… • What I mean by “A Theory of software” • Why we need such a thing • A pretty good Grand Theory of Software Engineering I found on Google • My own ideas for a Grand Theory of Software
  • 10. So what does “Theory of Software” mean?
  • 11. Theorem proving Way(s) of thinking Code Verification Useful models Theoretical / Common Lang Vocab Academic Sensible Axioms Derivable Laws
  • 12. IRL Emp St Bldg Its model
  • 13.
  • 14. What can we print on the T-shirts for software?
  • 15. We’d print the Theory of Software on T-shirts
  • 16. Why do we need a “Theory of Software”?
  • 23. #1: S/w Dev is a lossy process We need a Pensieve for software for the lost “WHY”s
  • 24. #2: We no longer UNDERSTAND software that we built … at least not fully …its that big
  • 25.
  • 26. #3: we’re due some Revolution We are We need to here be here
  • 27. As proof I present a lot of MICRO- THEORIES, IDIOMS, BEST PRACTICES AND METHODOLOGIES
  • 28. Goto is harmful 1 program Structured programming is good n programs Object Orientation is good; encapsulate state Functional programming is good; avoid state TDD is good; test everything! 1-n devs Adding manpower to a late project makes it later 1 pm The man-month is a dangerous and fallacious myth, for it implies that man and machine are interchangeable n pm’s You ship your organization, i.e., your code has the same shape as your org structure 1 org Release early, release often (startups) Use old, proven technology (Mars rover) n orgs Hardware doubles in performance every 18 months the world
  • 29. Remind you of something?
  • 30. So what’s required of a “Theory of Software”?
  • 31. Once built, with the ToS we could… • Use the model as a blueprint to build software • One model can build many “instances” of software – same or similar • One model will allow reasoning about all such instances • There would be “Universal Software Laws” • …pigs will fly…unicorns everywhere…
  • 32. So like other Physical theories One paradigm => Unified Simple No schools => Consistent Defined scope Puzzle Solving => Definition & Explanation Research => Falsifiable
  • 33. They’re not the same, tho… Real World Software world “Out there” Inside our heads Real, unchangeable Limited only by our limits imagination Objective (well, mostly) Subjective
  • 34. So unlike other Physical theories Any ToS should : • Directly represent man and the subjectivity that comes with it • Allow for how the human mind works and model it • Model human organizations and human + machine combinations • Model software; its structure and behavior
  • 35. Finally, like any body of science, it should have… Axioms: Givens, “Taken for granted”s, universal truths Theories: Assumptions based on the axioms Laws: Proven theories Application of the Science
  • 37. A brief tangent before we start “Sw FEM” post + GUTS Waitaminnit… …GUTSE!
  • 38. GUTSE and GUTS: a comparison Feature GUTSE GUTS Unified, simple Y * Consistent Y * Defined Scope Y Y Vast explanation capacity Y N Falsifiable Y Y Models humans Y Y Models human Orgs Y N Models human+m/c combos Y N Models software Y Y Has axioms Y Y Has Theorems N * Has Laws N * Has applications Y* N
  • 39. … and so we come full circle… … so this is more like a progress report than a finished product… WIP ..but you can help finish it! SE GUT GUT S WIP YOUR THEORY
  • 40. Where do we go from here? GUTSE GUTS Discussion
  • 42. Q: What do we do when we write software?
  • 43. A: We solve problems using machines
  • 44. Actually…. We solve problems & encode the solutions using so that machines can run them instead of us Coded Solution Running Solution Problem
  • 45. Problem Solution Encoded Solution to Solution problem
  • 46. All Software Development is therefore a Grand translation exercise
  • 48. A string of symbols Generally, A composition of building blocks (aka Composition units) E.g.: Pascal: "procedure begin .... end". whole thing is the spec, each identifier is a CU English: "This is a sentence". Words are CUs, sentence is the spec; Sentences are CUs, Para is the spec; and so forth A set of specifications, constrained by the kind of CUs allowed to be in them E.g.: Java, Fortran, Assembly Equally: Requirements Spec, Design Doc UML Logs
  • 49.
  • 50. Special case: the Executor
  • 51. All Software Engineering can be expressed in terms of transformers and specifications
  • 52. But it cant all be rote transforms, right? A: Semantic Mappings (yes, they’re Venn Diagrams)
  • 53. Mapping a language to another (via a transformer) defines it in terms of the other language; thereby giving it meaning.
  • 54. Sem-nastics: The Semantic Domain This is a Semantic Domain because both programs mean the same in this domain
  • 55. More Sem-nastics SD SD SD
  • 56. A Semantic Domain is where semantic relations become syntactic. If two specs’ translation into an SD are syntactically equivalent, then they are also semantically equivalent.
  • 61. We still need to define the machine and the mind a little bit better so that we can reason about their behavior
  • 62. The model m/c: a Von Neumann m/c
  • 64. The model mind: ACT-R Requirements: •Explain and predict problem solving •Explain and predict HUMAN problem solving •Without ignoring our understanding and learning difficulties •Concrete and operationalized.
  • 66. ACT-R Demo E.g.: if Goal Memory has: =goal> isa ADDITION n1=three n2=four ans=nil
  • 67. ACT-R Demo … and Procedural Memory has: Add-nos =goal> isa ADDITION n1=three n2=four ans=nil =fact> isa ADD-FACT addend1=num1 addend2=num2 sum=sum ==> =goal> ans=sum
  • 68. ACT-R Demo and we indeed have a fact in Declarative Memory that asserts: =fact3+4> isa ADD-FACT addend1=three addend2=four sum=seven ... then the mind will output seven … as the answer.
  • 69. ACT-R Demo This is a simple example, but more complex ones are: - reasoning by counting - retrieval from memory - retrieval from input system (e.g., by reading a book)
  • 74. Man + m/c : Circa 1970s
  • 80. Meta Law: no law can be stated without qualification wrt a specific SD
  • 82. Tour de Force: Assembly vs. HLL Q:Which is better from a Programmer’s POV? A: Let’s model the process of learning the language, writing a trial program and then executing a real program by implementing a Bubble Sort in both C /Assembly SD C /Assembly Execution State Space Lists of Numbers SD
  • 83. … then let’s replace the human with ACT-R and see how it behaves C /Assembly SD C /Assembly Execution State Space Lists of Numbers SD
  • 84. Step 0: Simulate a language in ACT-R The Assembly machine’s ACT-R setup is essentially the same
  • 86. Step 1: Learn the languages
  • 87. Step 2: Learn the Sort program Assembly C
  • 88. Bubble Sort in Assembly
  • 90. Step 3: Simulate run of s/w bubble sort m/c’s written in Assembly & C
  • 91. Bubble Sort m/c: Internals The C machine’s internal view is essentially the same
  • 92. Bubble Sort m/c: Simulated Internals
  • 93. Actual run results ~2X effort for Assembly Overall, C wins
  • 94. GUTS
  • 95. Start with the “how to read..” node (see links)
  • 97. Links Ref Link Alan Kay’s Talk http://www.tele-task.de/archive/video/flash/14029/ “FEM analysis on http://tt2n.blogspot.com/2009/06/fem-like-analysis- code” blog post on-code.html GUTS https://github.com/vinodkd/guts GUTSE http://books.google.com/books/about/The_Grand_Un ified_Theory_of_Software_Eng.html?id=TLcceL3NEiM C
  • 98. Thank You Vinod.dinakaran@gmail.com +vinod.dinakaran @vinod_dinakaran tt2n.blogspot.com