What does Smalltalk have to do with Numerically Intensive Tasks? ● Conventional perception of technical computing is fast becoming out of date ● Take a look at our business ● Take a look at our technology ● Take a look at our processes
Romax Technology Ltd. & RomaxDesigner ● Our value proposition – RomaxDesigner enables us to predict the system wide behavior of transmission systems beyond what was previously possible
What can Romax model? Parallel Shaft Arrangement Perpendicular Shaft Arrangement Planetary Shaft Arrangement
F = kx ● Given – Stiffness ● Produced from the stiffnesses of all the components – Forces ● Produced by the engine and transmitted by the gearbox ● Solve for – Deflection ● How the design will distort in use ● Large distortions reduce component life
VPD (Virtual Product Development) Concept Feedback Analysis Design Feedback – Analysis tells you how your design performs – Development of a Complete transmission system takes 3-4 years – We can reduce that to 1 to 1.5 years Prototype/ Detailed Physical testing Design Feedback
The Challenge ● Customers want ever more complex simulation ● Greater complexity puts greater demands on performance ● The market demands ever shorter lead times and shorter development cycles ● How does Smalltalk help?
Why not C#/Java? – Speed of Compilation and Late Binding ● Smalltalk's simple syntax is designed to compile like lightning ● With late binding you can run a test even when the system is broken ● Step change in programming style
Why not C#/Java? – Class extensions ● Use double dispatch wherever you want ● Bounce gui and test behaviour directly off the model ● Matlab like extensions for Domain Experts – To plot a graph #((1 0) (2 0.5) (3 1.3)) asPoints plot – To draw an HTML table 'x' || 'y' || 'theta'
Why not C#/Java? - Resumable exceptions ● No need for multiple callbacks ● We register a single general purpose callback that throws a Smalltalk exception ● Exception hierarchy and scoping rules take care of the rest Fortran signals Fortran Smalltalk exception Fortran resumes Smalltalk calls Fortran Smalltalk catches End of call out numerical routine exception Smalltalk
Opportunity for Smalltalk in the technical computing market ● The technical computing market is huge ● Designed for analysts' own use. Does not address product development cycle ● Smalltalk is fundamentally good for technical computing – Arbitrary length integers and fractions – BlockClosures that serve as a great way of passing equations to solvers – 'doIt' immediate mode
Obsticles for Smalltalk in the technical computing market ● Smalltalk has many quirks. You will need a Smalltalk coach – Syntax ● Operator precedence ● Array syntax – Lack of native solvers/libraries – Floating Point performance – Mixed language support
Smalltalk is 70 times slower than Fortran for Floating Point ops ● Conventional wisdom – Layered Architecture – Product model in Smalltalk – All engineering calcs in Fortran ● Now profile it – We spend 60% of time transferring data back and forth between Smalltalk and Fortran ● Layered Architecture = barrier = difficult to optimize
Smalltalk is 70 times slower than Fortran for Floating Point ops ● Smalltalk is just about fast enough (but only just) – It can do almost everything we need ● First build it in Smalltalk Then profile it Then optimize the Smalltalk Then use Fortran for the true bottlenecks ● Use a single language = No barriers = Easy to optimize
The Chassis/Body System Metaphor ● Two requirements – Torsional Rigidity – Passenger space ● Two solutions – The Chassis provides torsional rigidity Local Optima – The Body provides passenger space
The Monocoque System Metaphor ● Two requirements – Torsional Rigidity – Passenger space ● One solution – Single structure integrates torsional rigidity with passenger Global Optimum space
It is not a Technical Challenge Programming Smalltalk Team Product Model Engineering Fortran Analysis Calculation Engine Team ● A traditional team structure will always produce a Layered Architecture with local optima ● To produce a global optimum, both layers have to be designed Simultaneously by the same team
Solution – Pair Programming between Fortran Guys and Smalltalk Guys ● Produce a globally optimized design ● Right First Time – All skills (coding best practices, domain knowledge) immediately at hand ● Zero Lead Time for: – Newbie Programmer with no domain knowledge – Newbie Domain Expert with no development skills
Commercial Drivers for Shift Towards Monocoque Architecture Smalltalk C++ Fortran Product Model System Numeric Visualization interfacing ● Customers want ever more complex analysis ● The market demands shorter lead times and shorter development cycles
Conclusion ● Why did we want to use Smalltalk in our organization? ● What were the challenges to using Smalltalk in our organization? ● What could the Smalltalk community do to support us?
Thank You Any Questions? Enjoy the rest of the conference firstname.lastname@example.org