Modified Pre/Post functions into using interface

This patch changes Pre/Post functions into using interface from logic with reflect package.(holding backward compatibility)
I think the changes help understand Pre/Post function's definition.

thank you!