On Automated Generation of Behavioral Parameterized Macromodels. Part I: Algorithmic aspects