C-function contract