Engineering Confluent Computational Fields: from Functions to Rewrite Rules