A formal specification framework for smart grid components (Complex Adaptive Systems Modeling, 2018)