write main function
change minor typing rules; add Nop to semantic AST; add tests