JavaScript is disabled for your browser. Some features of this site may not work without it.
  • About K
  • Academics
  • Admission
  • Alumni Relations
  • Giving to K
  • News & Events
  • Student Life
  • HORNET HIVE
  • ATHLETICS
  • SITEMAP
  • WEBMAIL
    • Login
    View Item 
    •   CACHE Homepage
    • Academic Departments, Programs, and SIPs
    • Computer Science
    • Computer Science Senior Integrated Projects
    • View Item
    •   CACHE Homepage
    • Academic Departments, Programs, and SIPs
    • Computer Science
    • Computer Science Senior Integrated Projects
    • View Item

    Frame Systems for Knowledge Representation in Python

    Thumbnail
    View/Open
    Searchable PDF / Kalamazoo College Only (798.0Kb)
    Date
    2003
    Author
    Cross, Ashley
    Metadata
    Show full item record
    Abstract
    The class system in Python 2.2 is able to handle all of the information needed for a frame system. Hierarchies, inheritance, and introspection are all easily and naturally implemented within the class system. Using the Python class system has some advantages. For example, the hierarchy of a frame system is very easy to see when implemented using classes, as long as good coding is being used. The root of the frame system (the parent class that does not have its own parent) is at the top of the code. Logically, each child should come directly after its parent in the code, making it easy to see the hierarchy. Even if that's not the case, the parent of each subclass is passed in as a parameter to that class. The Python frame system is written so that this is not always the case. Definitions can get very messy using the frame system. The classes can be defined in any order, and it's not always easy to see the parent of a certain class. It's harder to follow the code due to the messy syntax, and therefore harder to see the hierarchy of any given frame system. The class system supports multiple inheritance, which is an advantage over my frame system already since the frame system only supports single inheritance. Other than the difference in multiple and single inheritance though, the frame system and class system are both very similar. Both support inheritance of both attributes and methods between classes and instances. The biggest difference here is the syntax. It is very easy to see which attributes and methods belong to which class in the class system, but it is a little messy when it comes to attributes and methods in the frame system. Introspection is essentially equal between the two systems. The Python 2.2 class system wasn't written to be a frame system, so I did need to add a few functions in order to make it work as a frame system. I only needed to add a few functions though, and they were all fairly simple. Once again though, the syntax of the class system is much more simple and user-friendly than the syntax of the frame system. The Python class system has many advantages over the frame system. Hierarchies and inheritance are both easier to see in the class system; multiple inheritance is supported rather than only single inheritance; and the biggest difference of all, the syntax of the class system is much cleaner and clearer than in the frame system. The code is easy to follow and easy to write.
    URI
    http://hdl.handle.net/10920/25117
    Collections
    • Computer Science Senior Integrated Projects [270]

    Browse

    All of CACHECommunities & CollectionsBy Issue DateAuthorsTitlesSubjectsThis CollectionBy Issue DateAuthorsTitlesSubjects

    My Account

    Login

    DSpace software copyright © 2002-2023  DuraSpace
    DSpace Express is a service operated by 
    Atmire NV
    Logo

    Kalamazoo College
    1200 Academy Street
    Kalamazoo Michigan 49006-3295
    USA
    Info 269-337-7000
    Admission 1-800-253-3602

    About K
    Academics
    Admission
    Alumni Relations
    Giving to K
    News & Events
    Student Life
    Sitemap
    Map & Directions
    Contacts
    Directories
    Nondiscrimination Policy
    Consumer Information
    Official disclaimer
    Search this site


    Academic Calendars
    Apply
    Bookstore
    Crisis Response
    Employment
    Library
    Registrar
    DSpace Express is a service operated by 
    Atmire NV