Sequence tests
Refactored semantic check
Prolog term generator refactored
Sequence prolog term generator added