code: function createPredicate(pred, types)
  {
  	krillPrimValidateSyntax(pred);
  
  	if (arguments.length >= 2 && types !== null) {
  		mod_jsprim.forEachKey(types, function (k, v) {
  			if (v !== 'string' && v !== 'number' && v !== 'boolean')
  				throw (new VError(
  				    'field "%s": unknown type "%s"', k, v));
  		});
  
  		krillPrimValidateTypes(types, pred);
  	}
  
  	return (new Predicate(mod_jsprim.deepCopy(pred), types));
  }
docs: /*
  Construct a predicate based on the JSON-like representation "pred".  "types"
  maps field names to either "string" or "number".  See README.md for details.