Context Discovery Framework, with extensions and test cases, implemented as part of my PhD work.