add PDense protocol
doc edits
dense API functions and default implementation
compliance test for dense function