Prepare global constraints auto generation

Seen the next patch for details