SPC functions used for ecnuspc project