SlideShare a Scribd company logo
1 of 4
1
cs205: engineering software
university of virginia fall 2006
Validation
David Evans
www.cs.virginia.edu/cs205
2cs205: engineering software
Dictionary Definition
val i date
1. To declare or make legally valid.
2. To mark with an indication of
official sanction.
3. To establish the soundness of;
corroborate.
Can we do any of these with software?
3cs205: engineering software
Java’s License
READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED
SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT")
CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA
PACKAGE. BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU
AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE
ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR
ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT"
BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT
AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED
SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR,
IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE
"DECLINE" BUTTON AT THE END OF THIS AGREEMENT.
4cs205: engineering software
Java’s License
5. LIMITATION OF LIABILITY. TO THE
EXTENT NOT PROHIBITED BY LAW, IN NO
EVENT WILL SUN OR ITS LICENSORS BE
LIABLE FOR ANY LOST REVENUE, PROFIT OR
DATA, OR FOR SPECIAL, INDIRECT,
CONSEQUENTIAL, INCIDENTAL OR PUNITIVE
DAMAGES, HOWEVER CAUSED REGARDLESS
OF THE THEORY OF LIABILITY, ARISING OUT
OF OR RELATED TO THE USE OF OR
INABILITY TO USE SOFTWARE, EVEN IF SUN
HAS BEEN ADVISED OF THE POSSIBILITY OF
SUCH DAMAGES. …
5cs205: engineering software
Java’s License
2. RESTRICTIONS. … Unless
enforcement is prohibited by applicable
law, you may not modify, decompile, or
reverse engineer Software. You
acknowledge that Software is not
designed, licensed or intended for use
in the design, construction, operation or
maintenance of any nuclear
facility. Sun disclaims any express or
implied warranty of fitness for such
uses.
6cs205: engineering software
Software Validation
• Process designed to increase our
confidence that a program works as
intended
• For complex programs, cannot often
make guarantees
• This is why typical software licenses
don’t make any claims about their
program working
2
7cs205: engineering software
Increasing Confidence
• Testing
– Run the program on set of inputs and
check the results
• Verification
– Argue formally or informally that the
program always works as intended
• Analysis
– Poor programmer’s verification:
examine the source code to increase
confidence that it works as intended
8cs205: engineering software
Testing and Fishing
Using some
successful tests to
conclude that a
program has no
bugs, is like
concluding there are
no fish in the lake
because you didn’t
catch one!
9cs205: engineering software
Exhaustive Testing
• Test all possible inputs
• PS1: 50x50 grid, all cells can be
either dead or alive before starting
22500 =
37582802345480120368336241897238650486773655175925867705652383978223168149833770853573272575265884
43337024577495260577603092278913516177656519073109687802364646940433162365621467244164785911318325
93729111221580180531749232777515579969899075142213969117994877343802049421624954402214529390781647
56333953502477258490160766686298256791862284963616020887736583495016379018852302624744050739038203
21888923861099058697067531432439211984822120754440224333665547868565593896895856381265823772240377
21702239991441466026185752651502936472280911018500320375496336749951569521541850441747925844066295
27967187260528579255266013070204799821833474935632167746952968255176585826750271589400788772725007
0780350262952377214028842297486263597879792176338220932619489509376
But that’s not all: all possible start stop step clicks,
different platforms, how long to you need to run it, etc.
10cs205: engineering software
Selective Testing
• We can’t test everything, pick test
cases with high probability of finding
flaws
• Black-Box Testing: design tests
looking only at specification
• Glass-Box Testing: design tests
looking at code
– Path-complete: at least one test to
exercise each path through code
11cs205: engineering software
Black-Box Testing
Test all paths through the specification
public CellState getNextState ()
// MODIFIES: this
// EFFECTS: Returns the next state for this cell. If a cell is currently
// dead cell and has three live neighbors, then it becomes a live cell.
// If a cell is currently alive and has two or three live neighbors it
// remains alive. Otherwise, the cell dies.
12cs205: engineering software
Test all paths through the specification:
1. currently dead, three live neighbors
2. currently alive, two live neighbors
3. currently alive, three live neighbors
4. currently dead, < 3 live neighbors
5. currently dead, > 3 live neighbors
6. currently alive, < 2 live neighbors
7. currently alive, > 3 live neighbors
public CellState getNextState ()
// MODIFIES: this
// EFFECTS: Returns the next state for this cell. If a cell is currently
// dead cell and has three live neighbors, then it becomes a live cell.
// If a cell is currently alive and has two or three live neighbors it
// remains alive. Otherwise, the cell dies.
3
13cs205: engineering software
Black-Box Testing
Test all (7) paths through the specification
Test boundary conditions
1. all neighbors are dead
2. all neighbors are alive
3. cell is at a corner of the grid
4. cell is at an edge of the grid
public CellState getNextState ()
// MODIFIES: this
// EFFECTS: Returns the next state for this cell. If a cell is currently
// dead cell and has three live neighbors, then it becomes a live cell.
// If a cell is currently alive and has two or three live neighbors it
// remains alive. Otherwise, the cell dies.
14cs205: engineering software
Glass-Box Testing
public CellState getNextState()
{
int countalive = 0;
Enumeration<SimObject> neighbors = getNeighbors();
while (neighbors.hasMoreElements()) {
SimObject neighbor = neighbors.nextElement();
if (neighbor instanceof Cell) {
Cell cell = (Cell) neighbor;
if (cell.isAlive()) { countalive++; }
}
if (countalive == 3) {
return CellState.createAlive ();
} else if (getState ().isAlive () && countalive == 2) {
return CellState.createAlive ();
} else { return CellState.createDead (); }
}
How many paths are
there through this code?
15cs205: engineering software
Path-Complete Testing
• Insufficient
– Often, bugs are missing paths
• Impossible
– Most programs have an infinite number
of paths
– Loops and recursion
• Test with zero, one and several iterations
– Branching
• Can test all paths
16cs205: engineering software
How many paths?
if (countalive == 3) {
return CellState.createAlive ();
} else if (getState ().isAlive () && countalive == 2) {
return CellState.createAlive ();
} else {
return CellState.createDead ();
}
}
17cs205: engineering software
Testing Recap
• Testing can find problems, not to prove
your program works
– Since exhaustive testing is impossible,
select test cases with maximum
probability of finding bugs
– A successful test case is one that reveals a
bug in your program!
• Typically at least 40% of cost of
software project is testing, often ~80%
of cost for safety-critical software
18cs205: engineering software
Quizzing
4
19cs205: engineering software
Testing Recap
• Testing can find problems, but can’t
prove your program works
– Since exhaustive testing is impossible,
select test cases with maximum
probability of finding bugs
– A successful test case is one that reveals
a bug in your program!
• If we can’t test all possible paths
through a program, how can we
increase our confidence that it works?
20cs205: engineering software
Analysis
• Make claims about all possible paths
by examining the program code
directly, not executing it
• Use formal semantics of programming
language to know what things mean
• Use formal specifications of
procedures to know that they do
21cs205: engineering software
Hopelessness of Analysis
It is impossible to correctly
determine if any interesting property
is true for an arbitrary program!
The Halting Problem: it is
impossible to write a
program that determines if
an arbitrary program halts.
22cs205: engineering software
Compromises
• Use imperfect automated tools:
– Accept unsoundness and incompleteness
– False positives: sometimes an analysis tool will
report warnings for a program, when the
program is actually okay (unsoundness)
– False negatives: sometimes an analysis tool
will report no warnings for a program, even
when the program violates properties it checks
(incompleteness)
• Use informal reasoning
• Design programs to modularize
reasoning
23cs205: engineering software
Charge
• Next class:
– ps2 hints
– Exceptions, programming defensively

More Related Content

What's hot

Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?Andrey Karpov
 
Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...Andrey Karpov
 
Testing: ¿what, how, why?
Testing: ¿what, how, why?Testing: ¿what, how, why?
Testing: ¿what, how, why?David Rodenas
 
Exactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and StrategyExactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and StrategyIosif Itkin
 
ISTQB Certified Tester Exam Question Papers and Answers - 11
ISTQB Certified Tester Exam Question Papers and Answers - 11ISTQB Certified Tester Exam Question Papers and Answers - 11
ISTQB Certified Tester Exam Question Papers and Answers - 11BDDazza
 
Www.istqb.guru istqb question-paper5
Www.istqb.guru istqb question-paper5Www.istqb.guru istqb question-paper5
Www.istqb.guru istqb question-paper5Tomas Vileikis
 
Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage" Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage" Rapita Systems Ltd
 
Meetup of test mini conference on ai in testing
Meetup of test mini conference  on ai in testingMeetup of test mini conference  on ai in testing
Meetup of test mini conference on ai in testingKai Lepler
 
Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...PVS-Studio
 
Reporting bugs: Errors Made and Lessons Learned
Reporting bugs: Errors Made and Lessons LearnedReporting bugs: Errors Made and Lessons Learned
Reporting bugs: Errors Made and Lessons LearnedPeter Sabev
 
Istqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparationIstqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparationKevalkumar Shah
 
Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Gerald Muecke
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notesonsoftwaretest
 
От хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере BackendОт хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере BackendCOMAQA.BY
 
Exploratory Testing
Exploratory TestingExploratory Testing
Exploratory Testingnazeer pasha
 

What's hot (19)

Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?Game Engine Code Quality: Is Everything Really That Bad?
Game Engine Code Quality: Is Everything Really That Bad?
 
Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...
 
Testing: ¿what, how, why?
Testing: ¿what, how, why?Testing: ¿what, how, why?
Testing: ¿what, how, why?
 
Exactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and StrategyExactpro Discussion about Joy and Strategy
Exactpro Discussion about Joy and Strategy
 
ISTQB Certified Tester Exam Question Papers and Answers - 11
ISTQB Certified Tester Exam Question Papers and Answers - 11ISTQB Certified Tester Exam Question Papers and Answers - 11
ISTQB Certified Tester Exam Question Papers and Answers - 11
 
Www.istqb.guru istqb question-paper5
Www.istqb.guru istqb question-paper5Www.istqb.guru istqb question-paper5
Www.istqb.guru istqb question-paper5
 
Manual testing
Manual testingManual testing
Manual testing
 
Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage" Presentation slides: "How to get 100% code coverage"
Presentation slides: "How to get 100% code coverage"
 
312 50-demo
312 50-demo312 50-demo
312 50-demo
 
Meetup of test mini conference on ai in testing
Meetup of test mini conference  on ai in testingMeetup of test mini conference  on ai in testing
Meetup of test mini conference on ai in testing
 
Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...Static analysis is most efficient when being used regularly. We'll tell you w...
Static analysis is most efficient when being used regularly. We'll tell you w...
 
Reporting bugs: Errors Made and Lessons Learned
Reporting bugs: Errors Made and Lessons LearnedReporting bugs: Errors Made and Lessons Learned
Reporting bugs: Errors Made and Lessons Learned
 
Wa
WaWa
Wa
 
Istqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparationIstqb intro with question answer for exam preparation
Istqb intro with question answer for exam preparation
 
Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017Must.Kill.Mutants. Agile Testing Days 2017
Must.Kill.Mutants. Agile Testing Days 2017
 
ISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture NotesISTQB, ISEB Lecture Notes
ISTQB, ISEB Lecture Notes
 
От хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере BackendОт хаоса к автоматизации тестирования на примере Backend
От хаоса к автоматизации тестирования на примере Backend
 
Exploratory Testing
Exploratory TestingExploratory Testing
Exploratory Testing
 
Ch14
Ch14Ch14
Ch14
 

Viewers also liked (8)

Tcp
TcpTcp
Tcp
 
Lecture7
Lecture7Lecture7
Lecture7
 
1
11
1
 
Lecture6
Lecture6Lecture6
Lecture6
 
Rd
RdRd
Rd
 
Sockets
SocketsSockets
Sockets
 
Amcat+syllabus+and+sample+papers
Amcat+syllabus+and+sample+papersAmcat+syllabus+and+sample+papers
Amcat+syllabus+and+sample+papers
 
Amcat placement questions
Amcat placement questionsAmcat placement questions
Amcat placement questions
 

Similar to SEO-optimized title for document on software validation testing and analysis

Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniquesersanbilik
 
Software testing foundation
Software testing foundationSoftware testing foundation
Software testing foundationAnirudh503501
 
Exam viewassessmentsuiteuserguide version 9
Exam viewassessmentsuiteuserguide version 9Exam viewassessmentsuiteuserguide version 9
Exam viewassessmentsuiteuserguide version 9William McIntosh
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbjeyasrig
 
5 Essential Tips for Load Testing Beginners
5 Essential Tips for Load Testing Beginners5 Essential Tips for Load Testing Beginners
5 Essential Tips for Load Testing BeginnersNeotys
 
SE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software TestingSE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software TestingAmr E. Mohamed
 
Introduction to MultisimCircuitSimulation.pdf
Introduction to MultisimCircuitSimulation.pdfIntroduction to MultisimCircuitSimulation.pdf
Introduction to MultisimCircuitSimulation.pdfKadiriIbrahim2
 
Software Testing - Online Guide
Software Testing - Online GuideSoftware Testing - Online Guide
Software Testing - Online Guidebigspire
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutionsgavhays
 
Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214David Rodenas
 
Basic of Software Testing.pptx
Basic of Software Testing.pptxBasic of Software Testing.pptx
Basic of Software Testing.pptxaparna14patil
 
Manual testing interview questions
Manual testing interview questionsManual testing interview questions
Manual testing interview questionsBABAR MANZAR
 
(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and backDavid Rodenas
 
Software Engineering - chp7- tests
Software Engineering - chp7- testsSoftware Engineering - chp7- tests
Software Engineering - chp7- testsLilia Sfaxi
 
Exactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test OraclesExactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test OraclesIosif Itkin
 
Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4Iosif Itkin
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfFarjanaParvin5
 
Istqb interview questions By H2KInfosys
Istqb interview questions By H2KInfosysIstqb interview questions By H2KInfosys
Istqb interview questions By H2KInfosysH2kInfosys
 

Similar to SEO-optimized title for document on software validation testing and analysis (20)

Software Testing Tecniques
Software Testing TecniquesSoftware Testing Tecniques
Software Testing Tecniques
 
Software testing foundation
Software testing foundationSoftware testing foundation
Software testing foundation
 
Exam viewassessmentsuiteuserguide version 9
Exam viewassessmentsuiteuserguide version 9Exam viewassessmentsuiteuserguide version 9
Exam viewassessmentsuiteuserguide version 9
 
Exam view user guide v9
Exam view user guide v9Exam view user guide v9
Exam view user guide v9
 
Dw testing
Dw testingDw testing
Dw testing
 
software testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblbsoftware testing types jxnvlbnLCBNFVjnl/fknblb
software testing types jxnvlbnLCBNFVjnl/fknblb
 
5 Essential Tips for Load Testing Beginners
5 Essential Tips for Load Testing Beginners5 Essential Tips for Load Testing Beginners
5 Essential Tips for Load Testing Beginners
 
SE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software TestingSE2018_Lec 19_ Software Testing
SE2018_Lec 19_ Software Testing
 
Introduction to MultisimCircuitSimulation.pdf
Introduction to MultisimCircuitSimulation.pdfIntroduction to MultisimCircuitSimulation.pdf
Introduction to MultisimCircuitSimulation.pdf
 
Software Testing - Online Guide
Software Testing - Online GuideSoftware Testing - Online Guide
Software Testing - Online Guide
 
Testing Software Solutions
Testing Software SolutionsTesting Software Solutions
Testing Software Solutions
 
Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214Testing, Learning and Professionalism — 20171214
Testing, Learning and Professionalism — 20171214
 
Basic of Software Testing.pptx
Basic of Software Testing.pptxBasic of Software Testing.pptx
Basic of Software Testing.pptx
 
Manual testing interview questions
Manual testing interview questionsManual testing interview questions
Manual testing interview questions
 
(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back(automatic) Testing: from business to university and back
(automatic) Testing: from business to university and back
 
Software Engineering - chp7- tests
Software Engineering - chp7- testsSoftware Engineering - chp7- tests
Software Engineering - chp7- tests
 
Exactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test OraclesExactpro FinTech Webinar - Global Exchanges Test Oracles
Exactpro FinTech Webinar - Global Exchanges Test Oracles
 
Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4Foundations of Software Testing Lecture 4
Foundations of Software Testing Lecture 4
 
Class9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdfClass9_SW_Testing_Strategies.pdf
Class9_SW_Testing_Strategies.pdf
 
Istqb interview questions By H2KInfosys
Istqb interview questions By H2KInfosysIstqb interview questions By H2KInfosys
Istqb interview questions By H2KInfosys
 

Recently uploaded

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfPrecisely
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningLars Bell
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionDilum Bandara
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
"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
 
Vertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsVertex AI Gemini Prompt Engineering Tips
Vertex AI Gemini Prompt Engineering TipsMiki Katsuragi
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024Lonnie McRorey
 
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
 

Recently uploaded (20)

Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdfHyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
Hyperautomation and AI/ML: A Strategy for Digital Transformation Success.pdf
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 
DSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine TuningDSPy a system for AI to Write Prompts and Do Fine Tuning
DSPy a system for AI to Write Prompts and Do Fine Tuning
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Advanced Computer Architecture – An Introduction
Advanced Computer Architecture – An IntroductionAdvanced Computer Architecture – An Introduction
Advanced Computer Architecture – An Introduction
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
"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...
 
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
 
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
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 
TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024TeamStation AI System Report LATAM IT Salaries 2024
TeamStation AI System Report LATAM IT Salaries 2024
 
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
 

SEO-optimized title for document on software validation testing and analysis

  • 1. 1 cs205: engineering software university of virginia fall 2006 Validation David Evans www.cs.virginia.edu/cs205 2cs205: engineering software Dictionary Definition val i date 1. To declare or make legally valid. 2. To mark with an indication of official sanction. 3. To establish the soundness of; corroborate. Can we do any of these with software? 3cs205: engineering software Java’s License READ THE TERMS OF THIS AGREEMENT AND ANY PROVIDED SUPPLEMENTAL LICENSE TERMS (COLLECTIVELY "AGREEMENT") CAREFULLY BEFORE OPENING THE SOFTWARE MEDIA PACKAGE. BY OPENING THE SOFTWARE MEDIA PACKAGE, YOU AGREE TO THE TERMS OF THIS AGREEMENT. IF YOU ARE ACCESSING THE SOFTWARE ELECTRONICALLY, INDICATE YOUR ACCEPTANCE OF THESE TERMS BY SELECTING THE "ACCEPT" BUTTON AT THE END OF THIS AGREEMENT. IF YOU DO NOT AGREE TO ALL THESE TERMS, PROMPTLY RETURN THE UNUSED SOFTWARE TO YOUR PLACE OF PURCHASE FOR A REFUND OR, IF THE SOFTWARE IS ACCESSED ELECTRONICALLY, SELECT THE "DECLINE" BUTTON AT THE END OF THIS AGREEMENT. 4cs205: engineering software Java’s License 5. LIMITATION OF LIABILITY. TO THE EXTENT NOT PROHIBITED BY LAW, IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR SPECIAL, INDIRECT, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF OR RELATED TO THE USE OF OR INABILITY TO USE SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. … 5cs205: engineering software Java’s License 2. RESTRICTIONS. … Unless enforcement is prohibited by applicable law, you may not modify, decompile, or reverse engineer Software. You acknowledge that Software is not designed, licensed or intended for use in the design, construction, operation or maintenance of any nuclear facility. Sun disclaims any express or implied warranty of fitness for such uses. 6cs205: engineering software Software Validation • Process designed to increase our confidence that a program works as intended • For complex programs, cannot often make guarantees • This is why typical software licenses don’t make any claims about their program working
  • 2. 2 7cs205: engineering software Increasing Confidence • Testing – Run the program on set of inputs and check the results • Verification – Argue formally or informally that the program always works as intended • Analysis – Poor programmer’s verification: examine the source code to increase confidence that it works as intended 8cs205: engineering software Testing and Fishing Using some successful tests to conclude that a program has no bugs, is like concluding there are no fish in the lake because you didn’t catch one! 9cs205: engineering software Exhaustive Testing • Test all possible inputs • PS1: 50x50 grid, all cells can be either dead or alive before starting 22500 = 37582802345480120368336241897238650486773655175925867705652383978223168149833770853573272575265884 43337024577495260577603092278913516177656519073109687802364646940433162365621467244164785911318325 93729111221580180531749232777515579969899075142213969117994877343802049421624954402214529390781647 56333953502477258490160766686298256791862284963616020887736583495016379018852302624744050739038203 21888923861099058697067531432439211984822120754440224333665547868565593896895856381265823772240377 21702239991441466026185752651502936472280911018500320375496336749951569521541850441747925844066295 27967187260528579255266013070204799821833474935632167746952968255176585826750271589400788772725007 0780350262952377214028842297486263597879792176338220932619489509376 But that’s not all: all possible start stop step clicks, different platforms, how long to you need to run it, etc. 10cs205: engineering software Selective Testing • We can’t test everything, pick test cases with high probability of finding flaws • Black-Box Testing: design tests looking only at specification • Glass-Box Testing: design tests looking at code – Path-complete: at least one test to exercise each path through code 11cs205: engineering software Black-Box Testing Test all paths through the specification public CellState getNextState () // MODIFIES: this // EFFECTS: Returns the next state for this cell. If a cell is currently // dead cell and has three live neighbors, then it becomes a live cell. // If a cell is currently alive and has two or three live neighbors it // remains alive. Otherwise, the cell dies. 12cs205: engineering software Test all paths through the specification: 1. currently dead, three live neighbors 2. currently alive, two live neighbors 3. currently alive, three live neighbors 4. currently dead, < 3 live neighbors 5. currently dead, > 3 live neighbors 6. currently alive, < 2 live neighbors 7. currently alive, > 3 live neighbors public CellState getNextState () // MODIFIES: this // EFFECTS: Returns the next state for this cell. If a cell is currently // dead cell and has three live neighbors, then it becomes a live cell. // If a cell is currently alive and has two or three live neighbors it // remains alive. Otherwise, the cell dies.
  • 3. 3 13cs205: engineering software Black-Box Testing Test all (7) paths through the specification Test boundary conditions 1. all neighbors are dead 2. all neighbors are alive 3. cell is at a corner of the grid 4. cell is at an edge of the grid public CellState getNextState () // MODIFIES: this // EFFECTS: Returns the next state for this cell. If a cell is currently // dead cell and has three live neighbors, then it becomes a live cell. // If a cell is currently alive and has two or three live neighbors it // remains alive. Otherwise, the cell dies. 14cs205: engineering software Glass-Box Testing public CellState getNextState() { int countalive = 0; Enumeration<SimObject> neighbors = getNeighbors(); while (neighbors.hasMoreElements()) { SimObject neighbor = neighbors.nextElement(); if (neighbor instanceof Cell) { Cell cell = (Cell) neighbor; if (cell.isAlive()) { countalive++; } } if (countalive == 3) { return CellState.createAlive (); } else if (getState ().isAlive () && countalive == 2) { return CellState.createAlive (); } else { return CellState.createDead (); } } How many paths are there through this code? 15cs205: engineering software Path-Complete Testing • Insufficient – Often, bugs are missing paths • Impossible – Most programs have an infinite number of paths – Loops and recursion • Test with zero, one and several iterations – Branching • Can test all paths 16cs205: engineering software How many paths? if (countalive == 3) { return CellState.createAlive (); } else if (getState ().isAlive () && countalive == 2) { return CellState.createAlive (); } else { return CellState.createDead (); } } 17cs205: engineering software Testing Recap • Testing can find problems, not to prove your program works – Since exhaustive testing is impossible, select test cases with maximum probability of finding bugs – A successful test case is one that reveals a bug in your program! • Typically at least 40% of cost of software project is testing, often ~80% of cost for safety-critical software 18cs205: engineering software Quizzing
  • 4. 4 19cs205: engineering software Testing Recap • Testing can find problems, but can’t prove your program works – Since exhaustive testing is impossible, select test cases with maximum probability of finding bugs – A successful test case is one that reveals a bug in your program! • If we can’t test all possible paths through a program, how can we increase our confidence that it works? 20cs205: engineering software Analysis • Make claims about all possible paths by examining the program code directly, not executing it • Use formal semantics of programming language to know what things mean • Use formal specifications of procedures to know that they do 21cs205: engineering software Hopelessness of Analysis It is impossible to correctly determine if any interesting property is true for an arbitrary program! The Halting Problem: it is impossible to write a program that determines if an arbitrary program halts. 22cs205: engineering software Compromises • Use imperfect automated tools: – Accept unsoundness and incompleteness – False positives: sometimes an analysis tool will report warnings for a program, when the program is actually okay (unsoundness) – False negatives: sometimes an analysis tool will report no warnings for a program, even when the program violates properties it checks (incompleteness) • Use informal reasoning • Design programs to modularize reasoning 23cs205: engineering software Charge • Next class: – ps2 hints – Exceptions, programming defensively