Computer programming experts who say it would be nearly impossible to write the software for "Star Wars" represent a "stagnant subculture" that "grossly overrates" the difficulty of the task, the head of the Strategic Defense Initiative Organization's software committee said yesterday.

Danny Cohen, a computer scientist at the University of Southern California, told a Senate panel that the software needed to operate an antimissile system could be created without any breakthroughs in programming technology.

"There are those who claim that they cannot produce adequate software," Cohen said in testimony before the Senate Armed Services subcommittee on strategic and theater nuclear weapons. "We agree that they cannot. There are experts who claim that they can. We agree with them, too." Critics have said that the kind of missile defense envisioned by President Reagan could never be made trustworthy because it would be almost impossible to test software under the realistic conditions necessary to find errors in the computer code and correct them before the system would have to face a Soviet nuclear attack.

Cohen, while conceding that it is impossible to completely "de-bug" programs, said the software could be designed so that errors do not disable the system. Such a system, he said, could be one that "copes with imperfections and corrects for them, rather than attempting to achieve an unattainable perfection."

David Parnas, the most prominent critic of SDI software potential, told the senators that while components could be tested before deployment, there would be no way to measure the reliability of an operational system.

Parnas, a professor at the University of Victoria, was appointed to the SDIO committee but resigned last summer, taking the position that he could not in good conscience work on a program that he thought was doomed to failure.

"You never really know when you've found the last bug," Parnas said. He said that all experience with software has shown that errors show up long after a system is put to use. He cited aborted launches of the space shuttle that were traced to software errors that showed up only when certain conditions occurred simultaneously, a situation that years of previous testing had failed to simulate.

Cohen told the subcommittee that the software could be made to work by using redundant programs that could function semiautonomously and which would be written by independent groups of programmers using different codes. Thus, he said, a failure in one would not cripple the whole system.

"To achieve this," Cohen said, "we should not look for help from the institutionalized and stagnant subculture of the 'software engineering' establishment . . . . This sect grossly overrates the perfection of Swiss clockwork, and strives to achieve it."