memoizing analyzer code