Procedural modeling enables building complex geometric objects and scenes in a wide panel of applications. The traditional approach relies on the sequential application of a reduced set of construction rules. We offer to automatically generate new topological rules based on an initial object and the expected result of the future operation. Non-expert users can thereby develop their own operations. We exploited our approach for the modeling of the geological subsoil.