def readProfile(filename):
  """
  input: string, name of a file containing a profile description
  output: asp.TermSet, with atoms matching the contents of the input file

  Parses a profile description, and returns
  a TermSet object.
  """
  p    = profile_parser.Parser()
  accu = TermSet()
  file = open(filename,'r')
  s    = file.readline()
  while s!="":
    try:
      accu = p.parse(s,filename)
    except EOFError:
      break
    s = file.readline()

  return accu
input: string, name of a file containing a profile description
  output: asp.TermSet, with atoms matching the contents of the input file

  Parses a profile description, and returns
  a TermSet object.