some refactorings

- fix a sample
- improve variable_decl's type member.(type can represent invalid state.
  so it is no need to use boost::optional.)
- add location where the error generated in not_implemented_error.
do not use assert(false)
remove useless header inclusion and improve a macro name