2

UML class diagrams (1st pic) and frames (which belong to knowledge representation and artificial intelligence) (2nd pic) look pretty alike. But do class diagrams exactly type of frames or they just look similar?

UML class diagram example Frames example

  • 1
    From your example, it looks like frames are closer to UML object diagrams than UML class diagrams. However, I'm not that familiar with frames. Could you provide a link to a good reference that explains them in more detail? I'm familiar with UML, so if I had a good understanding of the intent and abilities of the frame notation, I can probably provide a good explanation of how UML and frame notation relate. – Thomas Owens Mar 10 '16 at 19:56
  • @ThomasOwens I'd like to see your description. Here is a good explanation, I think. Also Wikipedia has two articles: 1st and 2nd. – AivanF. Mar 11 '16 at 16:42
1

Based on the links that you provided (1, 2, 3), I was able to come to a more complete understanding of what frames are.

There's no direct mapping between frame representations and a UML model. The frame language is something that is specific to representing knowledge in an AI system, while UML is designed for a generic model of software (primarily object-oriented software).

The first link you provided says this:

Frames are extensions of the traditional 'record' datatype used in databases. If you choose to program your agents in an object-oriented language such as Java or C++, then you will be able to represent knowledge as objects, which are very similar to frame structures.

The closest thing in UML to the frame notation is an object diagram. Each frame is a specific instance of a class. However, an object diagram (in the formal usage) doesn't allow you to capture all of the contextual information (in your example, things like "if difficult, then pay attention"). Many UML tools do allow for capturing notes as part of the model, though, which is how you would represent this.

A composite structure diagram may also show how a specific instance is built.

In order to accurately capture all of the information, you may also need a class diagram to show the general relationship between types.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.