// now remove two rules from the original and update the existing program
p.getRules().remove(p.getRules().size()-1);
p.getRules().remove(p.getRules().size()-1);
p.addNamespace("myns","http://example.com/myns");
connection.updateProgram(p);
// load the program by name and check if it is equal to the original program
Program p2 = connection.loadProgram(p.getName());
connection.commit();