Attributes instantiation function generation