SlideShare a Scribd company logo
1 of 21
Abhik Roychoudhury, National University of Singapore
Satish Chandra, Google
PROGRAM REPAIR
& AUTO-CODING
Talk for ICSE 2023 10-year
Most Influential Paper Award
ICSE2023 MIP Award Talk
Hoang Duong Thien Nguyen, Dawei Qi, Abhik Roychoudhury
School of Computing, National University of Singapore, Singapore
Satish Chandra
IBM Research, USA
01
SemFix: ICSE 2013
In this paper, we present an automated repair method based on symbolic
execution, constraint solving and program synthesis.
Education Correctness Security
Program
Repair
Buggy Program
Tests
Patched
Program
02
ICSE2023 MIP Award Talk
PROGRAM REPAIR
Baseline
Codebase
Initial
Req
Modified
Codebase
CS1010S, ...
First-year programming
Intelligent Tutoring
System
Augmented
Req
THE DEBUGGING PROBLEM
05
ICSE2023 MIP Award Talk
RETROSPECTIVE: DEBUGGING
Source of specifications:
Previous version
Another implementation,
Tests … ?
Dagstuhl Seminar 13061
Fault Prediction, Localization, and Repair, Feb 2013
Repair exploiting symbolic execution
• Scalability with respect to search space size.
Repair via constraint solving
• Synthesize rather than lifting fixes from elsewhere.
Repair without formal specifications
• Do not depend on any being available.
From https://www.dagstuhl.de/13061
07
ICSE2023 MIP Award Talk
SPEC from TESTS
Test ID a b c oracle Pass
1 -1 -1 -1 INVALID
2 1 1 1 EQUILATERAL
3 2 2 3 ISOSCELES
4 2 3 2 ISOSCELES
5 3 2 2 ISOSCELES
6 2 3 4 SCALANE
1 int triangle(int a, int b, int c){
2 if (a <= 0 || b <= 0 || c <= 0)
3. return INVALID;
4. if (a == b && b == c)
5. return EQUILATERAL;
6. if (a == b || b != c) // bug !
7. return ISOSCELES;
8. return SCALENE;
9. }
08
Correct fix
(a == b || b== c || a == c)
ICSE2023 MIP Award Talk
EXAMPLE
Accumulated constraints
f (2,2,3) == true ^
f (2,3,2) == true ^
…
Find a f satisfying this constraint
By fixing the set of operators appearing in f
Program synthesis with fixed set of operators
1 int triangle (int a, int b, int c) {
if (a <= 0 || b <= 0 ||
c<=0) return INVALID;
if (a == b && b == c)
return EQUILATERAL;
if (f (a, b,c))
return ISOSCELES;
return SCALENE;
2
3
4
5
6
7
8
9 }
a==2
7
b==2 c==3
f (2,2,3) = true
Symbolic Execution
ICSE2023 MIP Award Talk
SPEC. from TESTS
Automatically generate the constraint
f (2,2,3) ^ f (2,3,2) ^ f (3,2,2) ^ ¬ f (2,3,4)
Solution
f(a,b,c) = (a == b || b == c || a == c)
“Program testing and program proving can
be considered as extreme alternatives.….
This paper describes a practical approach
between these two extremes…
Each symbolic execution result may be equivalent
to a large number of normal tests”
TESTING/
VERIFICATION
...
8
ICSE2023 MIP Award Talk
SYMBOLIC EXECUTION (1976)
Specification Inference
In the absence of formal specifications,
analyze the buggy program and its
artifacts such as execution traces via
various heuristics to glean a
specification about how it can pass tests
and what could have gone wrong!
1 int triangle (int a, int b, int c) {
if (a <= 0 || b <= 0 ||
c<=0) return INVALID;
if (a == b && b == c)
return EQUILATERAL;
if (f (a, b,c)) // X
return ISOSCELES;
return SCALENE;
2
3
4
5
6
7
8
9 }
a==2 b==2 c==3
X = true
Symbolic Execution
9
ICSE2023 MIP Award Talk
SE for REPAIR
a <=0 || b <= 0 || c <= 0
Yes
Yes
Yes
No
No
No
a == b && b == c
1, 1, 1
1,1,2
a == b || b != c
2,3,4
10
ICSE2023 MIP Award Talk
SE for TESTING
1 int triangle (int a, int b, int c) {
if (a <= 0 || b <= 0 ||
c<=0) return INVALID;
if (a == b && b == c)
return EQUILATERAL;
if (a == b || b != c)
return ISOSCELES;
return SCALINE;
2
3
4
5
6
7
8
9 }
-1, -1, -1
11
ICSE2023 MIP Award Talk
REPAIR / TESTING a <=0 || b <= 0 || c <= 0
Yes
Yes
Yes
No
No
No
a == b && b == c
1, 1, 1
1,1,2
a == b || b != c
2,3,4
-1, -1, -1
1 int triangle (int a, int b, int c) {
if (a <= 0 || b <= 0 ||
c<=0) return INVALID;
if (a == b && b == c)
return EQUILATERAL;
if (f (a, b,c)) // X
return ISOSCELES;
return SCALINE;
2
3
4
5
6
7
8
9 }
a==2 b==2 c==3
X= true / X = f(2,2,3)
Symbolic Execution
SemFix paper
comes here
Passing &
failing tests
Extract
constraints
Learning/
Inference
Generate patch
candidates
Fault localization
Semantic
Repair
Learning-based
Repair
Search-based
Repair
Synthesize code via
constraint solving Predict patch
Validate patch
candidates
Model of patches
03
Patch
Code
transformations
Buggy Program Code corpus
SUMMARY
for t in Tests {
generate repair constraint
}
Synthesize e from
t
t t
Semantics-based Schematic
A BRIEF HISTORY OF 2013-2023
ML makes significant inroads into software tools
• code completion
• code search and recommendation
• troubleshooting
• test selection
• …
• and of course, automated program repair!
From research to mainstream in less than 10 years
A new era of
software tools
ICSE2023 MIP Award Talk
Large code repositories
aka “big code”
Huge progress in ML
esp. in deep learning
ML COMES TO
AUTOMATED PROGRAM REPAIR
Immense amount of code change data available on past fixes
• Sometimes even aligned with bug symptom
ML problem
• Given a potentially buggy code fragment, predict an edit
Software tool problem
• Localize the error [as before]
• Predict an edit [ML problem]
• Validate that the edited code works [as before]
ICSE2023 MIP Award Talk
Passing &
failing tests
Learning/
Inference
Fault localization
Learning-based
Repair
Predict patch
Model of repair
Patch
Buggy Program Code corpus
Code
transformations
GETAFIX (META, 2019)
ICSE2023 MIP Award Talk
+10
+2 +35
-10 -1
-7
+1
-1
42294d 5cdd7c 1ee3fc 181d81 1d89b2 f54c2d
public int getWidth() {
@Nullable View v = this.getView();
- return v.getWidth();
+ return v != null ? v.getWidth() : 0;
}
Bader et al, Learning to fix bugs automatically, OOPSLA 2019
x == null
? x.foo()
: default
x.foo() y == null
? y.bar()
: default
y.bar()
α == null
? α.β()
: default
α.β()
Pattern discovery by anti-unification
Pattern application by probabilistic calculation
GETAFIX (META, 2019)
ICSE2023 MIP Award Talk
Developers are picky about their code – semantic equivalence is
not enough
Emphasis on ranking and picking the most likely pattern – no
budget to compile multiple fixes
Convenient UI integration is important
Where ML has helped?
Generalization in fix patterns
Productive in static analysis errors,
build errors etc.
(somewhat narrow domain, spec is
easier)
CHALLENGES IN APR
ICSE2023 MIP Award Talk
Continued challenges
Patch accuracy: tests may not
capture the full spec
Localization continues to be a
challenge
Private
Code
GitHub Copilot
Service
OpenAI GPT-4 Model GitHu
b
Public code and
text on the
internet
Provide Editor context
Improve Suggestions
04
Provide Suggestions
ICSE2023 MIP Award Talk
PROSPECTIVE: 2022-23
Modern LLMs trained on large code corpora have shown surprising capabilities (beyond code completion) out-of-the-
box, and many more accessible with few-shot prompting. The impact of these capabilities is significant on research
and on the profession.
PROGRAM REPAIR IN THE ERA OF ML-
GENERATED CODE
1. ML-generated code does not mean bugs will not appear. In production,
new unforeseen/untested conditions might occur. The need for fixing
failures is going to be there.
2. Models will improve to be more predictable as well as to avoid the more
routine kind of bugs.
3. Prompts used in code generation might themselves become the entity of
record, in which case the notion of "repair" might be applicable to prompts
too.
4. The question will remain on when ML-generated code can be
“trusted” enough to be integrated as part of your SW project!
20
Steering Search Specification Inference
GRADUAL CORRECTNESS
ICSE2023 MIP Award Talk
"EVIDENCE" from REPAIR
Automated Repair of Programs from Large Language Models, ICSE23.
Trustworthy Software
21
TRUSTED AUTOMATED PROGRAMMING
Repair techniques on code from LLMs
Evidence generation via repair
ICSE2023 MIP Award Talk

More Related Content

What's hot

Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j
 
Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...
Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...
Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...Deloitte United States
 
Becoming A Digital Business
Becoming A Digital BusinessBecoming A Digital Business
Becoming A Digital BusinessKen Polotan
 
Artificial intelligence applications for covid 19
Artificial intelligence applications for covid 19Artificial intelligence applications for covid 19
Artificial intelligence applications for covid 19SABARINATH C D
 
McKinsey - Covid 19 - Global Auto Consumer Insights - November 2020
McKinsey -  Covid 19 - Global Auto Consumer Insights - November 2020McKinsey -  Covid 19 - Global Auto Consumer Insights - November 2020
McKinsey - Covid 19 - Global Auto Consumer Insights - November 2020Martin Hattrup
 
Generative AI and law.pptx
Generative AI and law.pptxGenerative AI and law.pptx
Generative AI and law.pptxChris Marsden
 
Matthueu Lamiaux-Enfermedades transmitidas por vectores
Matthueu Lamiaux-Enfermedades transmitidas por vectoresMatthueu Lamiaux-Enfermedades transmitidas por vectores
Matthueu Lamiaux-Enfermedades transmitidas por vectoresFundación Ramón Areces
 
#BainWebinar Next Generation Industrial Performance Post COVID-19
#BainWebinar Next Generation Industrial Performance Post COVID-19#BainWebinar Next Generation Industrial Performance Post COVID-19
#BainWebinar Next Generation Industrial Performance Post COVID-19Bain & Company Brasil
 
Digitaizing Business Services
Digitaizing Business ServicesDigitaizing Business Services
Digitaizing Business Servicesaccenture
 
An Introduction to Generative AI
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AICori Faklaris
 
Technology tech trends 2022 and beyond
Technology tech trends 2022 and beyond Technology tech trends 2022 and beyond
Technology tech trends 2022 and beyond Brian Pichman
 
How ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundlyHow ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundlyPekka Abrahamsson / Tampere University
 
WeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital Agency
WeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital AgencyWeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital Agency
WeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital AgencyClément LEDORMEUR
 
UX STRAT Online 2021 Presentation by Mike Kuniavsky, Accenture
UX STRAT Online 2021 Presentation by Mike Kuniavsky, AccentureUX STRAT Online 2021 Presentation by Mike Kuniavsky, Accenture
UX STRAT Online 2021 Presentation by Mike Kuniavsky, AccentureUX STRAT
 
Introduction to ChatGPT
Introduction to ChatGPTIntroduction to ChatGPT
Introduction to ChatGPTannusharma26
 
Esanthramanujam-ChatGPT vs Bard-PPT.pptx
Esanthramanujam-ChatGPT vs Bard-PPT.pptxEsanthramanujam-ChatGPT vs Bard-PPT.pptx
Esanthramanujam-ChatGPT vs Bard-PPT.pptxesANTHHHH
 

What's hot (20)

Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptxNeo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
Neo4j & AWS Bedrock workshop at GraphSummit London 14 Nov 2023.pptx
 
Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...
Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...
Hot technology trends for 2020 and beyond: A preview of Deloitte’s annual Tec...
 
Generative AI
Generative AIGenerative AI
Generative AI
 
Becoming A Digital Business
Becoming A Digital BusinessBecoming A Digital Business
Becoming A Digital Business
 
ChatGPT for Academic
ChatGPT for AcademicChatGPT for Academic
ChatGPT for Academic
 
Artificial intelligence applications for covid 19
Artificial intelligence applications for covid 19Artificial intelligence applications for covid 19
Artificial intelligence applications for covid 19
 
McKinsey - Covid 19 - Global Auto Consumer Insights - November 2020
McKinsey -  Covid 19 - Global Auto Consumer Insights - November 2020McKinsey -  Covid 19 - Global Auto Consumer Insights - November 2020
McKinsey - Covid 19 - Global Auto Consumer Insights - November 2020
 
Generative AI and law.pptx
Generative AI and law.pptxGenerative AI and law.pptx
Generative AI and law.pptx
 
Matthueu Lamiaux-Enfermedades transmitidas por vectores
Matthueu Lamiaux-Enfermedades transmitidas por vectoresMatthueu Lamiaux-Enfermedades transmitidas por vectores
Matthueu Lamiaux-Enfermedades transmitidas por vectores
 
#BainWebinar Next Generation Industrial Performance Post COVID-19
#BainWebinar Next Generation Industrial Performance Post COVID-19#BainWebinar Next Generation Industrial Performance Post COVID-19
#BainWebinar Next Generation Industrial Performance Post COVID-19
 
Digitaizing Business Services
Digitaizing Business ServicesDigitaizing Business Services
Digitaizing Business Services
 
An Introduction to Generative AI
An Introduction  to Generative AIAn Introduction  to Generative AI
An Introduction to Generative AI
 
Technology tech trends 2022 and beyond
Technology tech trends 2022 and beyond Technology tech trends 2022 and beyond
Technology tech trends 2022 and beyond
 
How ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundlyHow ChatGPT and AI-assisted coding changes software engineering profoundly
How ChatGPT and AI-assisted coding changes software engineering profoundly
 
WeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital Agency
WeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital AgencyWeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital Agency
WeChat Mini Program for Advertising and Creative - 31Ten Shanghai Digital Agency
 
UX STRAT Online 2021 Presentation by Mike Kuniavsky, Accenture
UX STRAT Online 2021 Presentation by Mike Kuniavsky, AccentureUX STRAT Online 2021 Presentation by Mike Kuniavsky, Accenture
UX STRAT Online 2021 Presentation by Mike Kuniavsky, Accenture
 
Introduction to ChatGPT
Introduction to ChatGPTIntroduction to ChatGPT
Introduction to ChatGPT
 
Esanthramanujam-ChatGPT vs Bard-PPT.pptx
Esanthramanujam-ChatGPT vs Bard-PPT.pptxEsanthramanujam-ChatGPT vs Bard-PPT.pptx
Esanthramanujam-ChatGPT vs Bard-PPT.pptx
 
introduction Azure OpenAI by Usama wahab khan
introduction  Azure OpenAI by Usama wahab khanintroduction  Azure OpenAI by Usama wahab khan
introduction Azure OpenAI by Usama wahab khan
 
Journey of Generative AI
Journey of Generative AIJourney of Generative AI
Journey of Generative AI
 

Similar to 16May_ICSE_MIP_APR_2023.pptx

Automated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAutomated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAbhik Roychoudhury
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talkAbhik Roychoudhury
 
Final Exam Questions Fall03
Final Exam Questions Fall03Final Exam Questions Fall03
Final Exam Questions Fall03Radu_Negulescu
 
Constraint Programming - An Alternative Approach to Heuristics in Scheduling
Constraint Programming - An Alternative Approach to Heuristics in SchedulingConstraint Programming - An Alternative Approach to Heuristics in Scheduling
Constraint Programming - An Alternative Approach to Heuristics in SchedulingEray Cakici
 
Continuous test suite failure prediction
Continuous test suite failure predictionContinuous test suite failure prediction
Continuous test suite failure predictionssuser94f898
 
Thesis+of+étienne+duclos.ppt
Thesis+of+étienne+duclos.pptThesis+of+étienne+duclos.ppt
Thesis+of+étienne+duclos.pptPtidej Team
 
Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...
Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...
Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...Yuki Ueda
 
Final Exam Solutions Fall02
Final Exam Solutions Fall02Final Exam Solutions Fall02
Final Exam Solutions Fall02Radu_Negulescu
 
Planning/Scheduling with CP Optimizer
Planning/Scheduling with CP OptimizerPlanning/Scheduling with CP Optimizer
Planning/Scheduling with CP OptimizerPhilippe Laborie
 
CV - Rajat Gupta
CV - Rajat GuptaCV - Rajat Gupta
CV - Rajat GuptaRajat Gupta
 
Vision Algorithmics
Vision AlgorithmicsVision Algorithmics
Vision Algorithmicspotaters
 
Multi-Objective Cross-Project Defect Prediction
Multi-Objective Cross-Project Defect PredictionMulti-Objective Cross-Project Defect Prediction
Multi-Objective Cross-Project Defect PredictionSebastiano Panichella
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSTAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSung Kim
 
Cross-Project Build Co-change Prediction
Cross-Project Build Co-change PredictionCross-Project Build Co-change Prediction
Cross-Project Build Co-change PredictionShane McIntosh
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directionsTao He
 
Reengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy SoftwareReengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy SoftwareTeodoro Cipresso
 
22316-2019-Summer-model-answer-paper.pdf
22316-2019-Summer-model-answer-paper.pdf22316-2019-Summer-model-answer-paper.pdf
22316-2019-Summer-model-answer-paper.pdfPradipShinde53
 
The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)Maurício Aniche
 

Similar to 16May_ICSE_MIP_APR_2023.pptx (20)

APSEC2020 Keynote
APSEC2020 KeynoteAPSEC2020 Keynote
APSEC2020 Keynote
 
Automated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWSAutomated Program Repair, Distinguished lecture at MPI-SWS
Automated Program Repair, Distinguished lecture at MPI-SWS
 
Repair dagstuhl jan2017
Repair dagstuhl jan2017Repair dagstuhl jan2017
Repair dagstuhl jan2017
 
Automated Program Repair Keynote talk
Automated Program Repair Keynote talkAutomated Program Repair Keynote talk
Automated Program Repair Keynote talk
 
Final Exam Questions Fall03
Final Exam Questions Fall03Final Exam Questions Fall03
Final Exam Questions Fall03
 
Constraint Programming - An Alternative Approach to Heuristics in Scheduling
Constraint Programming - An Alternative Approach to Heuristics in SchedulingConstraint Programming - An Alternative Approach to Heuristics in Scheduling
Constraint Programming - An Alternative Approach to Heuristics in Scheduling
 
Continuous test suite failure prediction
Continuous test suite failure predictionContinuous test suite failure prediction
Continuous test suite failure prediction
 
Thesis+of+étienne+duclos.ppt
Thesis+of+étienne+duclos.pptThesis+of+étienne+duclos.ppt
Thesis+of+étienne+duclos.ppt
 
Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...
Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...
Impact of Coding Style Checker on Code Review -A case study on the OpenStack ...
 
Final Exam Solutions Fall02
Final Exam Solutions Fall02Final Exam Solutions Fall02
Final Exam Solutions Fall02
 
Planning/Scheduling with CP Optimizer
Planning/Scheduling with CP OptimizerPlanning/Scheduling with CP Optimizer
Planning/Scheduling with CP Optimizer
 
CV - Rajat Gupta
CV - Rajat GuptaCV - Rajat Gupta
CV - Rajat Gupta
 
Vision Algorithmics
Vision AlgorithmicsVision Algorithmics
Vision Algorithmics
 
Multi-Objective Cross-Project Defect Prediction
Multi-Objective Cross-Project Defect PredictionMulti-Objective Cross-Project Defect Prediction
Multi-Objective Cross-Project Defect Prediction
 
STAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash ReproductionSTAR: Stack Trace based Automatic Crash Reproduction
STAR: Stack Trace based Automatic Crash Reproduction
 
Cross-Project Build Co-change Prediction
Cross-Project Build Co-change PredictionCross-Project Build Co-change Prediction
Cross-Project Build Co-change Prediction
 
Testing survey by_directions
Testing survey by_directionsTesting survey by_directions
Testing survey by_directions
 
Reengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy SoftwareReengineering and Reuse of Legacy Software
Reengineering and Reuse of Legacy Software
 
22316-2019-Summer-model-answer-paper.pdf
22316-2019-Summer-model-answer-paper.pdf22316-2019-Summer-model-answer-paper.pdf
22316-2019-Summer-model-answer-paper.pdf
 
The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)The relationship between test and production code quality (@ SIG)
The relationship between test and production code quality (@ SIG)
 

More from Abhik Roychoudhury (16)

IFIP2023-Abhik.pptx
IFIP2023-Abhik.pptxIFIP2023-Abhik.pptx
IFIP2023-Abhik.pptx
 
Fuzzing.pptx
Fuzzing.pptxFuzzing.pptx
Fuzzing.pptx
 
Dagstuhl2021
Dagstuhl2021Dagstuhl2021
Dagstuhl2021
 
Singapore International Cyberweek 2020
Singapore International Cyberweek 2020Singapore International Cyberweek 2020
Singapore International Cyberweek 2020
 
NUS PhD e-open day 2020
NUS PhD e-open day 2020NUS PhD e-open day 2020
NUS PhD e-open day 2020
 
Art of Computer Science Research Planning
Art of Computer Science Research PlanningArt of Computer Science Research Planning
Art of Computer Science Research Planning
 
Automated Repair - ISSTA Summer School
Automated Repair - ISSTA Summer SchoolAutomated Repair - ISSTA Summer School
Automated Repair - ISSTA Summer School
 
Isorc18 keynote
Isorc18 keynoteIsorc18 keynote
Isorc18 keynote
 
Symbexecsearch
SymbexecsearchSymbexecsearch
Symbexecsearch
 
Mobilesoft 2017 Keynote
Mobilesoft 2017 KeynoteMobilesoft 2017 Keynote
Mobilesoft 2017 Keynote
 
Binary Analysis - Luxembourg
Binary Analysis - LuxembourgBinary Analysis - Luxembourg
Binary Analysis - Luxembourg
 
Abhik-Satish-dagstuhl
Abhik-Satish-dagstuhlAbhik-Satish-dagstuhl
Abhik-Satish-dagstuhl
 
Issta13 workshop on debugging
Issta13 workshop on debuggingIssta13 workshop on debugging
Issta13 workshop on debugging
 
Repair dagstuhl
Repair dagstuhlRepair dagstuhl
Repair dagstuhl
 
PAS 2012
PAS 2012PAS 2012
PAS 2012
 
Pas oct12
Pas oct12Pas oct12
Pas oct12
 

Recently uploaded

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfMr Bounab Samir
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationAadityaSharma884161
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayMakMakNepo
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxLigayaBacuel1
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxOH TEIK BIN
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxthorishapillay1
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfSpandanaRallapalli
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxDr.Ibrahim Hassaan
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomnelietumpap1
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designMIPLM
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Mark Reed
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentInMediaRes1
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxEyham Joco
 

Recently uploaded (20)

Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdfLike-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
Like-prefer-love -hate+verb+ing & silent letters & citizenship text.pdf
 
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Bikash Puri  Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Bikash Puri Delhi reach out to us at 🔝9953056974🔝
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
ROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint PresentationROOT CAUSE ANALYSIS PowerPoint Presentation
ROOT CAUSE ANALYSIS PowerPoint Presentation
 
Quarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up FridayQuarter 4 Peace-education.pptx Catch Up Friday
Quarter 4 Peace-education.pptx Catch Up Friday
 
Planning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptxPlanning a health career 4th Quarter.pptx
Planning a health career 4th Quarter.pptx
 
Solving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptxSolving Puzzles Benefits Everyone (English).pptx
Solving Puzzles Benefits Everyone (English).pptx
 
Proudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptxProudly South Africa powerpoint Thorisha.pptx
Proudly South Africa powerpoint Thorisha.pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
ACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdfACC 2024 Chronicles. Cardiology. Exam.pdf
ACC 2024 Chronicles. Cardiology. Exam.pdf
 
Gas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptxGas measurement O2,Co2,& ph) 04/2024.pptx
Gas measurement O2,Co2,& ph) 04/2024.pptx
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
ENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choomENGLISH6-Q4-W3.pptxqurter our high choom
ENGLISH6-Q4-W3.pptxqurter our high choom
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Keynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-designKeynote by Prof. Wurzer at Nordex about IP-design
Keynote by Prof. Wurzer at Nordex about IP-design
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)Influencing policy (training slides from Fast Track Impact)
Influencing policy (training slides from Fast Track Impact)
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Alper Gobel In Media Res Media Component
Alper Gobel In Media Res Media ComponentAlper Gobel In Media Res Media Component
Alper Gobel In Media Res Media Component
 
Types of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptxTypes of Journalistic Writing Grade 8.pptx
Types of Journalistic Writing Grade 8.pptx
 

16May_ICSE_MIP_APR_2023.pptx

  • 1. Abhik Roychoudhury, National University of Singapore Satish Chandra, Google PROGRAM REPAIR & AUTO-CODING Talk for ICSE 2023 10-year Most Influential Paper Award
  • 2. ICSE2023 MIP Award Talk Hoang Duong Thien Nguyen, Dawei Qi, Abhik Roychoudhury School of Computing, National University of Singapore, Singapore Satish Chandra IBM Research, USA 01 SemFix: ICSE 2013 In this paper, we present an automated repair method based on symbolic execution, constraint solving and program synthesis.
  • 3. Education Correctness Security Program Repair Buggy Program Tests Patched Program 02 ICSE2023 MIP Award Talk PROGRAM REPAIR Baseline Codebase Initial Req Modified Codebase CS1010S, ... First-year programming Intelligent Tutoring System Augmented Req
  • 4. THE DEBUGGING PROBLEM 05 ICSE2023 MIP Award Talk RETROSPECTIVE: DEBUGGING Source of specifications: Previous version Another implementation, Tests … ?
  • 5. Dagstuhl Seminar 13061 Fault Prediction, Localization, and Repair, Feb 2013 Repair exploiting symbolic execution • Scalability with respect to search space size. Repair via constraint solving • Synthesize rather than lifting fixes from elsewhere. Repair without formal specifications • Do not depend on any being available. From https://www.dagstuhl.de/13061 07 ICSE2023 MIP Award Talk SPEC from TESTS
  • 6. Test ID a b c oracle Pass 1 -1 -1 -1 INVALID 2 1 1 1 EQUILATERAL 3 2 2 3 ISOSCELES 4 2 3 2 ISOSCELES 5 3 2 2 ISOSCELES 6 2 3 4 SCALANE 1 int triangle(int a, int b, int c){ 2 if (a <= 0 || b <= 0 || c <= 0) 3. return INVALID; 4. if (a == b && b == c) 5. return EQUILATERAL; 6. if (a == b || b != c) // bug ! 7. return ISOSCELES; 8. return SCALENE; 9. } 08 Correct fix (a == b || b== c || a == c) ICSE2023 MIP Award Talk EXAMPLE
  • 7. Accumulated constraints f (2,2,3) == true ^ f (2,3,2) == true ^ … Find a f satisfying this constraint By fixing the set of operators appearing in f Program synthesis with fixed set of operators 1 int triangle (int a, int b, int c) { if (a <= 0 || b <= 0 || c<=0) return INVALID; if (a == b && b == c) return EQUILATERAL; if (f (a, b,c)) return ISOSCELES; return SCALENE; 2 3 4 5 6 7 8 9 } a==2 7 b==2 c==3 f (2,2,3) = true Symbolic Execution ICSE2023 MIP Award Talk SPEC. from TESTS Automatically generate the constraint f (2,2,3) ^ f (2,3,2) ^ f (3,2,2) ^ ¬ f (2,3,4) Solution f(a,b,c) = (a == b || b == c || a == c)
  • 8. “Program testing and program proving can be considered as extreme alternatives.…. This paper describes a practical approach between these two extremes… Each symbolic execution result may be equivalent to a large number of normal tests” TESTING/ VERIFICATION ... 8 ICSE2023 MIP Award Talk SYMBOLIC EXECUTION (1976)
  • 9. Specification Inference In the absence of formal specifications, analyze the buggy program and its artifacts such as execution traces via various heuristics to glean a specification about how it can pass tests and what could have gone wrong! 1 int triangle (int a, int b, int c) { if (a <= 0 || b <= 0 || c<=0) return INVALID; if (a == b && b == c) return EQUILATERAL; if (f (a, b,c)) // X return ISOSCELES; return SCALENE; 2 3 4 5 6 7 8 9 } a==2 b==2 c==3 X = true Symbolic Execution 9 ICSE2023 MIP Award Talk SE for REPAIR
  • 10. a <=0 || b <= 0 || c <= 0 Yes Yes Yes No No No a == b && b == c 1, 1, 1 1,1,2 a == b || b != c 2,3,4 10 ICSE2023 MIP Award Talk SE for TESTING 1 int triangle (int a, int b, int c) { if (a <= 0 || b <= 0 || c<=0) return INVALID; if (a == b && b == c) return EQUILATERAL; if (a == b || b != c) return ISOSCELES; return SCALINE; 2 3 4 5 6 7 8 9 } -1, -1, -1
  • 11. 11 ICSE2023 MIP Award Talk REPAIR / TESTING a <=0 || b <= 0 || c <= 0 Yes Yes Yes No No No a == b && b == c 1, 1, 1 1,1,2 a == b || b != c 2,3,4 -1, -1, -1 1 int triangle (int a, int b, int c) { if (a <= 0 || b <= 0 || c<=0) return INVALID; if (a == b && b == c) return EQUILATERAL; if (f (a, b,c)) // X return ISOSCELES; return SCALINE; 2 3 4 5 6 7 8 9 } a==2 b==2 c==3 X= true / X = f(2,2,3) Symbolic Execution
  • 12. SemFix paper comes here Passing & failing tests Extract constraints Learning/ Inference Generate patch candidates Fault localization Semantic Repair Learning-based Repair Search-based Repair Synthesize code via constraint solving Predict patch Validate patch candidates Model of patches 03 Patch Code transformations Buggy Program Code corpus SUMMARY for t in Tests { generate repair constraint } Synthesize e from t t t Semantics-based Schematic
  • 13. A BRIEF HISTORY OF 2013-2023 ML makes significant inroads into software tools • code completion • code search and recommendation • troubleshooting • test selection • … • and of course, automated program repair! From research to mainstream in less than 10 years A new era of software tools ICSE2023 MIP Award Talk Large code repositories aka “big code” Huge progress in ML esp. in deep learning
  • 14. ML COMES TO AUTOMATED PROGRAM REPAIR Immense amount of code change data available on past fixes • Sometimes even aligned with bug symptom ML problem • Given a potentially buggy code fragment, predict an edit Software tool problem • Localize the error [as before] • Predict an edit [ML problem] • Validate that the edited code works [as before] ICSE2023 MIP Award Talk Passing & failing tests Learning/ Inference Fault localization Learning-based Repair Predict patch Model of repair Patch Buggy Program Code corpus Code transformations
  • 15. GETAFIX (META, 2019) ICSE2023 MIP Award Talk +10 +2 +35 -10 -1 -7 +1 -1 42294d 5cdd7c 1ee3fc 181d81 1d89b2 f54c2d public int getWidth() { @Nullable View v = this.getView(); - return v.getWidth(); + return v != null ? v.getWidth() : 0; } Bader et al, Learning to fix bugs automatically, OOPSLA 2019 x == null ? x.foo() : default x.foo() y == null ? y.bar() : default y.bar() α == null ? α.β() : default α.β() Pattern discovery by anti-unification Pattern application by probabilistic calculation
  • 16. GETAFIX (META, 2019) ICSE2023 MIP Award Talk Developers are picky about their code – semantic equivalence is not enough Emphasis on ranking and picking the most likely pattern – no budget to compile multiple fixes Convenient UI integration is important
  • 17. Where ML has helped? Generalization in fix patterns Productive in static analysis errors, build errors etc. (somewhat narrow domain, spec is easier) CHALLENGES IN APR ICSE2023 MIP Award Talk Continued challenges Patch accuracy: tests may not capture the full spec Localization continues to be a challenge
  • 18. Private Code GitHub Copilot Service OpenAI GPT-4 Model GitHu b Public code and text on the internet Provide Editor context Improve Suggestions 04 Provide Suggestions ICSE2023 MIP Award Talk PROSPECTIVE: 2022-23 Modern LLMs trained on large code corpora have shown surprising capabilities (beyond code completion) out-of-the- box, and many more accessible with few-shot prompting. The impact of these capabilities is significant on research and on the profession.
  • 19. PROGRAM REPAIR IN THE ERA OF ML- GENERATED CODE 1. ML-generated code does not mean bugs will not appear. In production, new unforeseen/untested conditions might occur. The need for fixing failures is going to be there. 2. Models will improve to be more predictable as well as to avoid the more routine kind of bugs. 3. Prompts used in code generation might themselves become the entity of record, in which case the notion of "repair" might be applicable to prompts too. 4. The question will remain on when ML-generated code can be “trusted” enough to be integrated as part of your SW project!
  • 20. 20 Steering Search Specification Inference GRADUAL CORRECTNESS ICSE2023 MIP Award Talk "EVIDENCE" from REPAIR Automated Repair of Programs from Large Language Models, ICSE23.
  • 21. Trustworthy Software 21 TRUSTED AUTOMATED PROGRAMMING Repair techniques on code from LLMs Evidence generation via repair ICSE2023 MIP Award Talk