Policy generator

Policy generator implementation.