Your SlideShare is downloading. ×
Smalltalk Metaprogramming supports Probabilistic Program Analysis
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×

Saving this for later?

Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime - even offline.

Text the download link to your phone

Standard text messaging rates apply

Smalltalk Metaprogramming supports Probabilistic Program Analysis

557
views

Published on

Smalltalk Metaprogramming supports Probabilistic Program Analysis by Dave Mason. ESUG09, Brest, France

Smalltalk Metaprogramming supports Probabilistic Program Analysis by Dave Mason. ESUG09, Brest, France

Published in: Technology, Education

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
557
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
2
Comments
0
Likes
1
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Smalltalk Metaprogramming supports Probabilistic Program Analysis Dave Mason Ryerson University Monday, 2009 August 31 1
  • 2. Why Path Discovery? Testing/coverage Program Comprehension/Visualization Software Reliability Monday, 2009 August 31 2
  • 3. Domain/Path Discovery Depth-first Breadth-first Heuristic Probabilistic Monday, 2009 August 31 3
  • 4. Operational Profile probability of each point in the input domain histogram or continuous probabilistic density function derived from real world / “expert” we will use to drive program analysis Monday, 2009 August 31 4
  • 5. Continuation-Based all parameters are variables of the PDF at any decision point (loop/if) involving those parameters take a snapshot snapshot placed twice in priority queue true case false case Monday, 2009 August 31 5
  • 6. Continuation-Based (cont) take first from priority queue to proceed when any path completes, take first from q q ordered by integral of domain over PDF many paths may be in partial execution by construction, paths complete in frequency order Monday, 2009 August 31 6
  • 7. Monte Carlo generate a random point in the input space check that not in a domain already found execute, when loop/if add to path, returning with correct true/false Monday, 2009 August 31 7
  • 8. Metaprogramming Smalltalk supports 4 key technologies: Dynamic types First-class booleans Continuation capture Dynamic code generation Monday, 2009 August 31 8
  • 9. Dynamic Types because there are no “native” types can pass parameter types in place of e.g. numbers no change whatsoever required to source can trace deeply into library classes/methods Monday, 2009 August 31 9
  • 10. First-class Booleans conceptually true/false are not special, they are simply objects Maybe can extend Boolean so that use in loop/if can capture information in practice, use sends #mustBeBoolean which can capture information Monday, 2009 August 31 10
  • 11. Continuation Capture continuation is the information necessary to execute the rest of the program derived from Seaside continuation capture walks stack saving local variables first-class Monday, 2009 August 31 11
  • 12. Dynamic Code Generation need to check complex predicates for inclusion could interpret the predicates not essential, but generating code for the check can speed up the implementation Monday, 2009 August 31 12
  • 13. Conclusion Smalltalk provides the metaprogramming necessary to implement this analysis seamlessly may be the only one with all these features questions? Monday, 2009 August 31 13