add 'isNegated' method and 'insertGate' function . close #153
Merge branch 'trunk'