Generate program specifications from Javascript source code