use spock framework for unit tests
core: fix 'if' detection
core: fix basic block initial id