next up previous contents
Next: lesserSorts Up: Sort operations Previous: completeName   Contents

getKind and getKinds

The operation getKind takes as arguments the metarepresentation of a module $\mathcal{R}$ and the metarepresentation of a type, i.e., a sort or a kind. When its second argument is the metarepresentation of a type in $\mathcal{R}$, it returns the metarepresentation of the complete name of the corresponding kind.

  op getKind : Module Type ~> Kind [special (...)] .

For example,

  Maude> reduce in META-LEVEL : 
           getKind(upModule('NUMBERS, false), 'Zero) .
  result Kind: '`[NatSeq`,NatSet`]

  Maude> reduce in META-LEVEL : 
           getKind(upModule('NUMBERS, false), '`[Zero`]) .
  result Kind: '`[NatSeq`,NatSet`]

The operation getKinds takes as its only argument the metarepresentation of a module $\mathcal{R}$ and returns the metarepresentation of the set of kinds declared in $\mathcal{R}$, with kinds metarepresented using their complete names.

  op getKinds : Module ~> KindSet [special (...)] .

For example,

  Maude> reduce in META-LEVEL : getKinds(upModule('NUMBERS, false)) .
  result NeKindSet: '`[Bool`] ; '`[Nat3`] ; '`[NatSeq`,NatSet`]



The Maude Team