initial commit of partially working and largely untested experimental constraint code