let kind_order = function
  | PKProp -> 0
  | PKPre _ -> 0
  | PKEstablished -> 1
  | PKPreserved -> 2
  | PKVarPos -> 3
  | PKVarDecr -> 4
  | PKPropLoop -> 5
  | PKAFctOut -> 6
  | PKAFctExit -> 7