||-----------------------------------------------------------  
|| Name:    Transducer for Glass.                            ||
|| Version: 1.3  GLAMMAR (Feb 13, 1991)         ||
||-----------------------------------------------------------  

[
(DefTyp ("counter.gl",5) "B" (TypAtom "B")),
(DefVal ("counter.gl",7) "jkff"
 (VType 
  (TypUni 
   (TypProd 
    [
     (TypSym "B"), 
     (TypSym "B")])
   (TypProd 
    [
     (TypSym "B"), 
     (TypSym "B")]))
  (VAtom "jkff"))),
(DefVal ("counter.gl",8) "and"
 (VType 
  (TypUni 
   (TypProd 
    [
     (TypSym "B"), 
     (TypSym "B")])
   (TypSym "B"))
  (VAtom "and"))),
(DefVal ("counter.gl",9) "or"
 (VType 
  (TypUni 
   (TypProd 
    [
     (TypSym "B"), 
     (TypSym "B")])
   (TypSym "B"))
  (VAtom "or"))),
(DefVal ("counter.gl",10) "buf"
 (VType 
  (TypUni 
   (TypSym "B")
   (TypSym "B"))
  (VAtom "buf"))),
(DefVal ("counter.gl",11) "nand"
 (VType 
  (TypUni 
   (TypProd 
    [
     (TypSym "B"), 
     (TypSym "B")])
   (TypSym "B"))
  (VAtom "nand"))),
(DefVal ("counter.gl",14) "counterstage"
 (VType 
  (TypUni 
   (TypProd 
    [
     (TypSym "B"), 
     (TypSym "B"), 
     (TypSym "B"), 
     (TypSym "B")])
   (TypProd 
    [
     (TypSym "B"), 
     (TypSym "B")]))
  (VMacLambda 
   (FpList 
    [
     (FpName "d"),
     (FpName "preset"),
     (FpName "toggle"),
     (FpName "nclr")])
   (VWhere 
    [
     (DefCon ("counter.gl",18) 
      (VSym ("counter.gl",18) "ja")
      (VValApply 
       (VSym ("counter.gl",18) "nand")
       (VList 
        [
         (VSym ("counter.gl",18) "ka"),
         (VSym ("counter.gl",18) "preset")]))),
     (DefCon ("counter.gl",19) 
      (VSym ("counter.gl",19) "ka")
      (VValApply 
       (VSym ("counter.gl",19) "nand")
       (VList 
        [
         (VSym ("counter.gl",19) "d"),
         (VSym ("counter.gl",19) "nclr")]))),
     (DefCon ("counter.gl",20) 
      (VSym ("counter.gl",20) "ea")
      (VValApply 
       (VSym ("counter.gl",20) "or")
       (VList 
        [
         (VSym ("counter.gl",20) "toggle"),
         (VSym ("counter.gl",20) "preset")])))]
   (VValApply 
    (VSym ("counter.gl",16) "jkff")
    (VList 
     [
      (VValApply 
       (VSym ("counter.gl",16) "and")
       (VList 
        [
         (VSym ("counter.gl",16) "ja"),
         (VSym ("counter.gl",16) "ea")])),
      (VValApply 
       (VSym ("counter.gl",16) "and")
       (VList 
        [
         (VSym ("counter.gl",16) "ka"),
         (VSym ("counter.gl",16) "ea")]))])))))),
(DefVal ("counter.gl",23) "mand"
 (VType 
  (TypFun 
   (TypBind "n")
   (TypUni 
    (TypPwr 
     (TypSym "B") 
     (VSym ("counter.gl",23) "n"))
    (TypSym "B")))
  (VMacAlts 
   [
    (VMacLambda 
     (FpInt 2)
     (VSym ("counter.gl",24) "and")),
    (VMacLambda 
     (FpName "n")
     (VMacLambda 
      (FpComp 
       (FpName "x")
       (FpName "xr"))
      (VValApply 
       (VSym ("counter.gl",25) "and")
       (VList 
        [
         (VSym ("counter.gl",25) "x"),
         (VValApply 
          (VValApply 
           (VSym ("counter.gl",25) "mand")
            (VBuiltin "-2"
              [ 
              (VSym ("counter.gl",25) "n"),
              (VInt 1)]))
          (VSym ("counter.gl",25) "xr"))]))))]))),
(DefVal ("counter.gl",28) "countr"
 (VType 
  (TypUni 
   (TypProd 
    [
     (TypPwr 
      (TypSym "B") 
      (VInt 4)), 
     (TypSym "B"), 
     (TypSym "B"), 
     (TypSym "B"), 
     (TypSym "B")])
   (TypProd 
    [
     (TypSym "B"), 
     (TypPwr 
      (TypSym "B") 
      (VInt 4))]))
  (VMacLambda 
   (FpList 
    [
     (FpList 
      [
       (FpName "d3"),
       (FpName "d2"),
       (FpName "d1"),
       (FpName "d0")]),
     (FpName "nload"),
     (FpName "nclear"),
     (FpName "enap"),
     (FpName "enat")])
   (VWhere 
    [
     (DefCon ("counter.gl",32) 
      (VSym ("counter.gl",32) "carry")
      (VValApply 
       (VValApply 
        (VSym ("counter.gl",32) "mand")
        (VInt 5))
       (VList 
        [
         (VSym ("counter.gl",32) "q3"),
         (VSym ("counter.gl",32) "q2"),
         (VSym ("counter.gl",32) "q1"),
         (VSym ("counter.gl",32) "q0"),
         (VSym ("counter.gl",32) "enat")]))),
     (DefCon ("counter.gl",33) 
      (VList 
       [
        (VSym ("counter.gl",33) "q3"),
        (VSym ("counter.gl",33) "q3'")])
      (VValApply 
       (VSym ("counter.gl",33) "counterstage")
       (VList 
        [
         (VSym ("counter.gl",33) "d3"),
         (VSym ("counter.gl",33) "preset"),
         (VValApply 
          (VValApply 
           (VSym ("counter.gl",33) "mand")
           (VInt 4))
          (VList 
           [
            (VSym ("counter.gl",33) "q2"),
            (VSym ("counter.gl",33) "q1"),
            (VSym ("counter.gl",33) "q0"),
            (VSym ("counter.gl",33) "en")])),
         (VSym ("counter.gl",33) "nclr")]))),
     (DefCon ("counter.gl",34) 
      (VList 
       [
        (VSym ("counter.gl",34) "q2"),
        (VSym ("counter.gl",34) "q2'")])
      (VValApply 
       (VSym ("counter.gl",34) "counterstage")
       (VList 
        [
         (VSym ("counter.gl",34) "d2"),
         (VSym ("counter.gl",34) "preset"),
         (VValApply 
          (VValApply 
           (VSym ("counter.gl",34) "mand")
           (VInt 3))
          (VList 
           [
            (VSym ("counter.gl",34) "q1"),
            (VSym ("counter.gl",34) "q0"),
            (VSym ("counter.gl",34) "en")])),
         (VSym ("counter.gl",34) "nclr")]))),
     (DefCon ("counter.gl",35) 
      (VList 
       [
        (VSym ("counter.gl",35) "q1"),
        (VSym ("counter.gl",35) "q1'")])
      (VValApply 
       (VSym ("counter.gl",35) "counterstage")
       (VList 
        [
         (VSym ("counter.gl",35) "d1"),
         (VSym ("counter.gl",35) "preset"),
         (VValApply 
          (VSym ("counter.gl",35) "and")
          (VList 
           [
            (VSym ("counter.gl",35) "q0"),
            (VSym ("counter.gl",35) "en")])),
         (VSym ("counter.gl",35) "nclr")]))),
     (DefCon ("counter.gl",36) 
      (VList 
       [
        (VSym ("counter.gl",36) "q0"),
        (VSym ("counter.gl",36) "q0'")])
      (VValApply 
       (VSym ("counter.gl",36) "counterstage")
       (VList 
        [
         (VSym ("counter.gl",36) "d0"),
         (VSym ("counter.gl",36) "preset"),
         (VSym ("counter.gl",36) "en"),
         (VSym ("counter.gl",36) "nclr")]))),
     (DefCon ("counter.gl",37) 
      (VSym ("counter.gl",37) "preset")
      (VValApply 
       (VSym ("counter.gl",37) "nand")
       (VList 
        [
         (VSym ("counter.gl",37) "nload"),
         (VSym ("counter.gl",37) "nclr")]))),
     (DefCon ("counter.gl",38) 
      (VSym ("counter.gl",38) "nclr")
      (VValApply 
       (VSym ("counter.gl",38) "buf")
       (VSym ("counter.gl",38) "nclear"))),
     (DefCon ("counter.gl",39) 
      (VSym ("counter.gl",39) "en")
      (VValApply 
       (VSym ("counter.gl",39) "and")
       (VList 
        [
         (VSym ("counter.gl",39) "enap"),
         (VSym ("counter.gl",39) "enat")])))]
   (VList 
    [
     (VSym ("counter.gl",30) "carry"),
     (VList 
      [
       (VSym ("counter.gl",30) "q3"),
       (VSym ("counter.gl",30) "q2"),
       (VSym ("counter.gl",30) "q1"),
       (VSym ("counter.gl",30) "q0")])])))))]
