Testing threshold functions using implied minterm structure