Do all of the following.

  1. The alphabet for all these examples is {t,h,v}

    1. 3 or more t followed by one or more of ( either ( h followed by zero or one of h ) or ( v followed by t followed by h ) ) followed by exactly 2 v's followed by exactly 3 h's
    2. all strings that do not contain the substring vhvt
    3. starts with 3 or more hth's, ends with 5 or more vv's, and does not contain the substring hv.
  2. For the next questions, use the following signature

    signature lab02 = sig
        type `a set
        create `a set
        pull `a set -> `a
        push `a * `a set -> `a set
        dup `a set -> `a set
        zilch `a set -> bool
    end
    1. What is the type of
      1. dup
      2. zilch(create)
      3. pull (create)
      4. pull (dup )
      5. pull (push )
      6. push (dup (push (1, lab02.create)),lab02.create)
      7. push (zilch(create)), create)

      where the lab02.xxx notation means that a new instance of the module is used every time -- in other words, the `a are independent

    2. What is the value (if any) of
      1. push (2, push (3, create))
      2. zilch(create)