Smarter Primitive Analyzer