# This file is governed by the Creative Commons license # Attribution-NonCommercial 4.0 Unported # http://creativecommons.org/licenses/by-nc/4.0/ # http://creativecommons.org/licenses/by-nc/4.0/legalcode # # Extended licenses, in particular commercial licenses, can be obtained from the # author of the source code. # Any re-distribution as source code must acknowledge the original author of this file. # # File: deeptelos-species.cbs # Author: Manfred Jeusfeld, manfred.jeusfeld@acm.org # Date: 2016-09-21 (2016-09-21) #---------------------------------------------------------------- # Use most general instances to formalize a multi-level model for # the animal kingdom. cbserver -port 4411 -t low -new SPECIESDB tellModel deeptelos.sml.txt tellModel deeptelos-GTs.sml.txt cd oHome mkdir SPECIES cd SPECIES tell ' SPECIES with comment onAnimal: "The Animal hierarchy. The superscripts stand for the abstraction level of the classes in the hierarchy. Hence, Animal¹ is a simple class whose instances are physical animals. Animal² is a meta class. Its instances are animal classes such as Cat and Dog. Finally, Animal³ stands for categories such as mammal, fish, bird etc." end' tell " Animal³ end Animal² with IN c: Animal³ end Animal¹ with IN c: Animal² end " tell ' SPECIES with comment onMammal: "The Mammal hierarchy is integrated into the Animal hierarchy. A Mammal² is an instance of Animal³, i.e. is is the name of an animal category. Mammal¹ is then the most general instance of Mammal², i.e. it subsumes all physical mammals." end' tell " Mammal² in Animal³ end Mammal¹ with IN c: Mammal² end " tell ' SPECIES with comment onBird: "The Bird hierarchy is another animal category parallel to Mammal."; onFish: "The Fish hierarchy is another animal category parallel to Mammal and Bird." end' tell " Bird² in Animal³ end Bird¹ with IN c: Bird² end Fish² in Animal³ end Fish¹ with IN c: Fish² end " mkdir EXAMPLE cd EXAMPLE tell ' EXAMPLE with comment onExample: "The example populates the hierarchy with some examples such as dogs, birds and fishes" end' tell " Dog in Mammal² end Cat in Mammal² end Elephant in Mammal² end " tell " Chicken in Bird² end Crow in Bird² end " tell " Clownfish in Fish² end Shark in Fish² end " # Now some 'real' animals tell " pluto in Dog end jerry in Cat end nemo in Clownfish end tweety in Chicken end jumbo in Elephant end bruce in Shark end "