150 likes | 285 Views
Analysis of Complex D ata S tructures with PEX. Vadim Mutilin Evgeniy Gerlits Vladimir Fedotov Mentor: Patrice Godefroid. Microsoft Pex. White box test generation for .NET Implements DART (Directed Automated Random Testing): combines concrete and symbolic executions
E N D
Analysis of Complex Data Structures with PEX VadimMutilin EvgeniyGerlits Vladimir Fedotov Mentor: Patrice Godefroid
Microsoft Pex • White box test generation for .NET • Implements DART (Directed Automated Random Testing): combines concrete and symbolic executions • Push button approach
Complex Data Structures • Examples: List, Queue, Map, Tree, Graph
Motivation • Nikolai Tillmann, et al. Test Input Generation for Programs with Pointers. TACAS 2009. • Does push button approach really work on complex data structures? • class MyList<T> • private T value • add(T value) • void removeAT(intindex) • T getItem(int index)
Project Goals • Understanding limits • Documentation • Authors • Concrete examples • Making out suggestions • Usage patterns • Improvements
Push Button (Results) • MyContains 6/6 (100.00%), 103 Runs
Push Button (Results) covered/total basic blocks (test runs)
Factory Approach • Pex generates template for Factory method • User adds Factory method which generates the inputs • Factory method may be parameterized
Factory (Results) covered/total basic blocks (test runs)
Pool Approach • Collection of concrete input objects • Collection is created manually by the tester • Pex iterates indexes • Implementation is called with concrete objects by their indexes
Pool (Results) covered/total basic blocks (test runs)
Relaxing Visibility Constraints Can be done with annotation
Conclusion • Pex limitations are still unclear • 2 bugs reported to the Pex team • Suggested • Pool approach • Relaxing visibility constraints with annotations • Promising topic for further research