Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

Design Pattern Ontology

296 views
Skip to first unread message

Igor Toujilov

unread,
Nov 25, 2024, 7:41:28 PM11/25/24
to ontolo...@googlegroups.com
Hi All,
I am studying a famous book [1] written by the Gang of Four. I am
surprised that despite it being written 30 years ago, I did not find a
design pattern ontology. There is plenty of material on ontology
design patterns on the Internet, but nothing about a design pattern
ontology which I miss and want to create if it does not exist yet.
Please advise if I overlooked something.

Regards,
Igor

[1] Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, Design
patterns : elements of reusable object-oriented software. 1994.

Mike Bennett

unread,
Nov 25, 2024, 7:56:10 PM11/25/24
to ontolo...@googlegroups.com
A design pattern ontology would be a very different thing to an ontology
design pattern, but both are things of value.

At the Object Management Group (OMG) we maintain a suite of standards
based on many of these design patterns, i.e. UML and the underpinnings
in MOF.

We are also exploring whether or how to move some of these modeling
languages from being MOF-based to using the new more semantically rich
framework that has been developed for the SysML V2 standards (which has
a kernel language called KerML). These are still in the Finalization
process.

This is where the distinction between model semantics and the semantics
of the target problem domain subject matter become an important
consideration. For example MOF was all about model element semantics.

Ideally some of these directions will move things towards something with
clear formal semantics both for model semantics and how subject matter
semantics is treated. Whether that's in KerML or a more conventional
ontology standard such as FOL or DL, or a syntax such as RDF/OWL,
remains to be seen.

If anyone did happen to be doing a formal ontology of these software
design patterns, this would be very helpful to know.

Meanwhile you should probably also check out the OMG's ESSENCE standard
(spearheaded by Ivar Jacobson) for the kind of model concepts needed to
model a design methodology.

Mike

Alex Shkotin

unread,
Nov 26, 2024, 3:10:56 AM11/26/24
to ontolo...@googlegroups.com
Interesting topics.
And google search for 
"software design patterns catalog" as ontology is at first cut an advanced catalog
and "software design patterns ontology" 
return promising URLs to begin with.

And I asked Gemini: " But I need ontology for software design patterns." It does not know about [1].

Alex

While there isn't a widely recognized, standardized ontology specifically designed for software design patterns, the concept of using ontologies to represent and reason about software design patterns is an active area of research.

Here's how ontologies can be applied to software design patterns:

1. Formalizing Pattern Knowledge:

  • Capturing Core Concepts: Define classes for patterns, their intents, problems, solutions, and participants.
  • Establishing Relationships: Model relationships between patterns, such as inheritance, composition, and usage scenarios.
  • Representing Contextual Information: Incorporate information about the patterns' applicability, trade-offs, and potential anti-patterns.

2. Enabling Pattern Discovery and Recommendation:

  • Semantic Search: Use ontology-based search techniques to find relevant patterns based on specific requirements.
  • Pattern Matching: Identify potential pattern matches within existing codebases using ontology-driven analysis.
  • Recommendation Systems: Develop intelligent systems that recommend appropriate patterns based on the context of the software development project.

3. Supporting Automated Reasoning and Code Generation:

  • Rule-Based Systems: Use ontologies to create rule-based systems that can automatically apply patterns to code.
  • Model-Driven Development: Integrate ontologies into model-driven development processes to generate code from high-level design models.

4. Facilitating Knowledge Sharing and Collaboration:

  • Common Vocabulary: Establish a shared vocabulary for discussing design patterns, promoting better communication and understanding.
  • Collaborative Development: Use ontologies to support collaborative development efforts, enabling teams to work together more effectively.

Challenges and Considerations:

  • Ontology Development: Creating a comprehensive and accurate ontology for software design patterns requires significant effort and expertise.
  • Semantic Interoperability: Ensuring interoperability between different ontologies is crucial for effective knowledge sharing and reuse.
  • Scalability: As the number of patterns and their relationships grows, the ontology may become complex and difficult to maintain.

Potential Benefits:

  • Improved Design Quality: By providing a formal framework for understanding and applying patterns, ontologies can help developers create more robust and maintainable software.
  • Enhanced Collaboration: Ontologies can facilitate knowledge sharing and collaboration among software development teams.
  • Automated Tools and Techniques: Ontology-based tools can automate various aspects of the software development process, such as code generation and refactoring.

While there's still much work to be done in this area, the potential benefits of using ontologies for software design patterns are significant. By addressing the challenges and leveraging the opportunities, researchers and practitioners can advance the state of the art in software engineering.


вт, 26 нояб. 2024 г. в 03:56, Mike Bennett <mben...@hypercube.co.uk>:
--
All contributions to this forum are covered by an open-source license.
For information about the wiki, the license, and how to subscribe or
unsubscribe to the forum, see http://ontologforum.org/info
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/ontolog-forum/089e3b0a-dd6a-4968-8969-1eedb6de7da9%40hypercube.co.uk.

John F Sowa

unread,
Nov 26, 2024, 6:15:14 PM11/26/24
to ontolo...@googlegroups.com, CG, ontolog...@googlegroups.com
Mike and Igor,

I'm glad that you mentioned design patterns.  But instead of an ontology of design patterns, I would say that design patterns should be the BASIS for ontology.  In fact, I would point out that visualization and conceptualization are the basis for mathematics.  The formal notation always comes at the end, never at the beginning.

The term 'design pattern' is for the kinds of visualizations that mathematicians and logicians start with.  The formal notations are essential, but creative mathematicians always start with visual patterns long before they get down to the formal details.  In fact, mathematicians usually have the problem completely solved in diagrams long before they work out the formal notations.

The formalism is essential to verify that the visualization is correct and to specify every last detail.  And the task of writing out the formal details can often point out issues that were missing or mistaken in the visualization.  Visualization is the essence of mathematics.  Formalization is the housekeeping that is important for keeping everything neat and tidy.

More generally, I would emphasize the trio of Conceptualization, Analysis, and Formalization.  We need all three.   For comments by Paul Halmos (a former president of the American Mathematical Society) and Albert Einstein, see the following slide 27.  For more discussion and references, see https://jfsowa.com/talks/eswc.pdf .



 


From: "Mike Bennett" <mben...@hypercube.co.uk>

Kingsley Idehen

unread,
Nov 27, 2024, 8:32:36 AM11/27/24
to ontolo...@googlegroups.com

Hi John,

I’ve used your https://jfsowa.com/talks/eswc.pdf reference to generate an article using following workflow, courtesy of our AI Middleware Layer using OpenAI’s GPT-4o language model API:

  1. Summarize https://jfsowa.com/talks/eswc.pdf.

  2. Redo, but incorporating the following:

    • FAQ – minimum 10 questions
    • HowTo – to the degree relevant
    • Glossary – minimum 10 key terms
  3. Improve by adding a section titled “Contemporary View in the Age of LLM-based Natural Language Processors”:

    • How do LLMs change the tooling available for generating and integrating Ontologies?
    • How do LLMs change the workflow associated with semantic integration informed by Ontologies?
    • How do LLMs affect the practical aspects of ontology-informed integration of data, information, and knowledge?
  4. Redo, but in a markdown block.

  5. Improve by incorporating the quotes in the attached image.

Article Generated from PDF

Summary of “Knowledge Representation: Logical, Cognitive, and Computational Foundations” by John F. Sowa

This document explores the integration of logic, cognitive science, and computation in knowledge representation (KR) and its applications to the Semantic Web. It provides insights into foundational principles, challenges, and future directions in building intelligent systems that align with human understanding. Additionally, it discusses the transformative impact of modern tools like Large Language Models (LLMs) on traditional KR workflows, particularly in the domains of ontology generation, semantic integration, and data-driven reasoning.


Visualization in Knowledge Representation: Insights from Mathematics and Physics

The Creative Role of Visualization

The process of knowledge representation, much like the creative process in mathematics and physics, is deeply visual and conceptual. Sowa’s ideas align with the insights of mathematician Paul Halmos and physicist Albert Einstein:

  1. Paul Halmos on Mathematics:
    Halmos suggests that the act of doing mathematics is not inherently deductive but rather imaginative. A mathematician’s work involves “vague guesses, visualizing broad generalizations, and jumping to unwarranted conclusions” to gain insight. He highlights the distinction between the creative and deductive stages of reasoning, where proving rigorously is more of a technical task that follows the initial creative insight.

    “The deductive stage, writing the results down, and writing its rigorous proof are relatively trivial once the real insight arrives; it is more the draftsman’s work, not the architect’s.” — Halmos (1968)

  2. Albert Einstein on Physics:
    Einstein emphasizes that thought, especially his, is largely non-verbal and visual. He describes ideas as associative images that are “voluntarily reproduced and combined”, with words coming only as a secondary process after visualization and mental modeling.

    “The words or the language, as they are written or spoken, do not seem to play any role in my mechanism of thought… The above-mentioned elements are, in my case, of visual and some of muscular type.” — Quoted by Hadamard (1945)

Relevance to KR:
Both Halmos and Einstein underline the significance of visualization and conceptualization in the creative process. Similarly, in KR, the conceptual graph and ontology modeling stages often mirror this visual, creative phase, while the deductive reasoning and querying processes align with the draftsman’s work of formalization. The interplay of these two stages is crucial for developing effective KR systems.


FAQ (Frequently Asked Questions)

  1. What is Knowledge Representation (KR)?
    KR is a method of encoding information so that both humans and machines can interpret, reason, and use it.

  2. Why is KR important for the Semantic Web?
    KR enables meaningful integration of data across diverse domains, supporting reasoning and query answering in distributed environments.

  3. What are the main challenges in KR?

    • Balancing expressivity and computational efficiency.
    • Semantic alignment across disparate ontologies.
  4. How do Conceptual Graphs (CGs) relate to KR?
    CGs are a visual, logic-based notation inspired by Charles Sanders Peirce that facilitates reasoning and data integration.

  5. What is the relationship between KR and cognitive science?
    KR draws on human cognitive processes to design systems that reason intuitively and interact effectively with users.

  6. How do RDF, OWL, and SPARQL fit into KR?
    These are tools and languages that implement KR principles for structuring, querying, and reasoning with web data.

  7. How do LLMs affect ontology generation?
    LLMs automate concept extraction, align schemas, and assist in iterative refinement, reducing manual effort.

  8. What reasoning methods are emphasized in KR?
    Deductive reasoning is primary, but inductive and abductive reasoning are also important for dealing with uncertainty and incomplete data.

  9. What role does scalability play in KR?
    Scalable KR systems can manage the vast data of the Semantic Web while maintaining reasoning capabilities.

  10. What are the future directions for KR?
    Future research emphasizes hybrid reasoning systems, commonsense knowledge, and dynamic, context-aware ontologies.


HowTo: Implement Key Concepts

  1. Building a Knowledge Graph:

    • Identify entities and relationships in your domain.
    • Use RDF and OWL to define semantic structures.
    • Leverage tools like SPARQL for querying and linking data.
  2. Creating Conceptual Graphs (CGs):

    • Start with a logical representation of your knowledge (e.g., subject-predicate-object).
    • Use CG notation to diagram entities, relationships, and constraints.
    • Apply Peirce’s existential graphs for reasoning tasks.
  3. Integrating Ontologies:

    • Use tools like Protégé to define and align ontologies.
    • Employ semantic integration techniques to resolve mismatches between data schemas.
  4. Reasoning with KR:

    • Apply deductive reasoning for strict logic.
    • Incorporate abductive reasoning to hypothesize explanations for observed phenomena.
    • Use inductive reasoning for generalizing from patterns.
  5. Leveraging LLMs for KR:

    • Automate ontology generation by extracting entities and relationships from unstructured data.
    • Use natural language queries to interact with knowledge graphs via SPARQL translations.
    • Dynamically refine semantic integration tasks with LLM-driven context analysis.

Contemporary View in the Age of LLM-based Natural Language Processors

1. LLMs and Ontology Generation

LLMs simplify and accelerate ontology development by:

  • Extracting Concepts and Relationships: Automating the identification of entities, attributes, and relationships from unstructured text.
  • Populating Ontologies: Adding instances to existing ontologies or creating entirely new structures with minimal human intervention.
  • Semantic Alignment: Mapping disparate ontologies through pattern recognition and contextual reasoning.
  • Human-Readable Documentation: Generating plain-language descriptions of complex ontologies for broader accessibility.

2. LLMs and Semantic Integration Workflows

LLMs redefine semantic integration workflows by:

  • Dynamic Schema Mapping: Identifying relationships between schemas without predefined ontologies.
  • Disambiguating Concepts: Leveraging context from data to resolve ambiguities and inconsistencies during integration.
  • Interactive Refinement: Facilitating collaboration between human experts and AI for iterative improvements.
  • Enhanced Reasoning: Using ontologies as guides for refining integration processes and ensuring consistency.

3. LLMs and Ontology-Informed Data Integration

LLMs affect practical aspects of data integration by:

  • Processing Unstructured Data: Extracting actionable insights and linking them to structured ontologies to enrich knowledge graphs.
  • Natural Language Query Support: Translating conversational queries into SPARQL or SQL for seamless interaction with knowledge bases.
  • Continuous Evolution: Dynamically adapting ontologies to reflect new data, ensuring relevance and accuracy.

Impact: LLM-powered KR systems are more adaptive, scalable, and accessible, enabling organizations to operationalize linked data principles effectively.


Glossary of Key Terms

  1. Knowledge Representation (KR): The process of modeling information so that it can be easily interpreted and reasoned about by humans and machines.
  2. Semantic Web: A framework for enabling data to be shared and reused across applications, enterprises, and communities using standard formats.
  3. Ontology: A formal specification of concepts, relationships, and constraints within a domain.
  4. Conceptual Graphs (CGs): A graphical representation of logical propositions based on Peirce’s ideas.
  5. Existential Graphs: A visual logic system created by Peirce, foundational to modern KR techniques.
  6. Deductive Reasoning: Deriving logically certain conclusions from premises.
  7. Abductive Reasoning: Inferring the most likely explanation for a set of observations.
  8. Inductive Reasoning: Generalizing conclusions from specific instances.
  9. RDF (Resource Description Framework): A standard model for data interchange on the web.
  10. SPARQL: A query language used to retrieve and manipulate data stored in RDF format.

Closing Note

The integration of LLMs into KR workflows marks a new era for the Semantic Web. By bridging symbolic reasoning, cognitive insights, and computational efficiency, LLMs empower systems to address real-world challenges with greater accuracy and scalability. Much like Halmos and Einstein’s insights into visualization in creative processes, KR systems increasingly leverage visual and conceptual models to align with human reasoning and foster innovation.

Related

-- 
Regards,

Kingsley Idehen	      
Founder & CEO 
OpenLink Software   
Home Page: http://www.openlinksw.com
Community Support: https://community.openlinksw.com

Social Media:
LinkedIn: http://www.linkedin.com/in/kidehen
Twitter : https://twitter.com/kidehen


Igor Toujilov

unread,
Nov 27, 2024, 8:38:33 AM11/27/24
to ontolo...@googlegroups.com
John,
I agree that visualisation is important in formal reasoning. But I am not sure that it works in all cases. I have seen theoretical physicists discussing their problems on YouTube for hours without a single diagram. It seems they operate mathematical formulas in their mind. They use some gestures, but no diagrams which would not be much helpful to present things in a high-dimensional space.

--
All contributions to this forum are covered by an open-source license.
For information about the wiki, the license, and how to subscribe or
unsubscribe to the forum, see http://ontologforum.org/info
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.

Kingsley Idehen

unread,
Nov 27, 2024, 8:42:18 AM11/27/24
to ontolo...@googlegroups.com
Hi Igor,

On 11/27/24 8:38 AM, 'Igor Toujilov' via ontolog-forum wrote:
> John,
> I agree that visualisation is important in formal reasoning. But I am
> not sure that it works in all cases. I have seen theoretical
> physicists discussing their problems on YouTube for hours without a
> single diagram.

IMHO:

That doesn’t mean they didn’t use a diagram during the early conceptual
stages, or even have one off-camera. As visual beings, any
well-thought-out process typically begins with some form of conceptual
visualization—unless it’s just copying, memorizing, and regurgitating
someone else’s work. :)

Ravi Sharma

unread,
Nov 29, 2024, 12:43:09 PM11/29/24
to ontolo...@googlegroups.com
In the software development and maturity considerations we used to talk of design, development and implementation patterns.
Would you then build three different ontologies?
I would think only one would be applicable for all three types of patterns.

Thanks.
Ravi
(Dr. Ravi Sharma, Ph.D. USA)
NASA Apollo Achievement Award
Former Scientific Secretary iSRO HQ
Ontolog Board of Trustees
Particle and Space Physics
Senior Enterprise Architect
SAE Fuel Cell Standards Member



--
All contributions to this forum are covered by an open-source license.
For information about the wiki, the license, and how to subscribe or
unsubscribe to the forum, see http://ontologforum.org/info
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.

Igor Toujilov

unread,
Nov 29, 2024, 1:21:59 PM11/29/24
to ontolo...@googlegroups.com
Ravi,
Thank you for reminding me.
I agree. The ontology should integrate all those patterns. It can be
modular where each module is devoted to a narrower aspect. But the
integrated ontology should combine all those modules.
Also analysis patterns are relevant here. Some years ago, I read an
excellent book by Martin Fowler about analysis patterns.
> To view this discussion visit https://groups.google.com/d/msgid/ontolog-forum/CAAN3-5fRjN4GD16ubRYG9Zf8VQvxZgyRzheKVJ92QEa8vqem3Q%40mail.gmail.com.

Alex Shkotin

unread,
Nov 30, 2024, 3:29:50 AM11/30/24
to ontolo...@googlegroups.com
Hi Kingsley,

And let me add that almost any complex mathematical formula, especially in physics, is a two-dimensional diagram, i.e., not linear.
Like this
image.png
Visual thinking is a power of the mind.

Alex


ср, 27 нояб. 2024 г. в 16:42, 'Kingsley Idehen' via ontolog-forum <ontolo...@googlegroups.com>:
--
All contributions to this forum are covered by an open-source license.
For information about the wiki, the license, and how to subscribe or
unsubscribe to the forum, see http://ontologforum.org/info
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.

John F Sowa

unread,
Nov 30, 2024, 8:42:09 PM11/30/24
to ontolo...@googlegroups.com
Ravi, Igor, and Kingsley,

Since Matthew isn't with us, I'll summarize some of his points which we had discussed over many years in different ways.

He had been working at Shell Oil for years, and he had developed a detailed ontology for the oil industry.  He later generalized it to develop a more general top level, which I considered quite good.   We had discussed issues about generalizing it even farther,  but he was reluctant to go farther in levels of abstraction.   We agreed that was a reasonable point of view.

But we also agreed that his details for the oil industry might conflict with details for other industries, such as banking and farming.   Furthermore, he recognized that different oil companies had different ways of representing the same terms because they had developed different policies and procedures.

I'll also mention another widely used ontology, which evolved over a period of about 70 years, and it is unlikely to change for a long, long time:  the ontology for making reservations for airlines, which was later extended to cover anything related to airlines, such as hotels, car rentals, trains, taxis, etc., etc.

And that ontology began in the 1950s with IBM's project SAGE for the airplanes used in the Strategic Air Command  over North America.  In the 1960s, IBM adapted that ontology for American Airlines.  IBM later sold the software to other airlines.   And all the other additions were made to conform to the same basic ontology from the 1950s.  70 years later, that top level is so entrenched that it is never going away.

Another world-wide ontology that also developed in the 1960s includes the global weather patterns that were established by the world-wide weather simulation programs.  They use a different way of representing the world than the reservation systems.

Fundamental problem:  There will never be a single universal ontology for representing anything and everything in the world (or the universe).

That is a fact that any system of knowledge representation must deal with.

John
 


From: "Ravi Sharma" <drravi...@gmail.com>

In the software development and maturity considerations we used to talk of design, development and implementation patterns.
Would you then build three different ontologies?
I would think only one would be applicable for all three types of patterns.

Thanks.
Ravi

On Wed, Nov 27, 2024 at 5:42 AM 'Kingsley Idehen' via ontolog-forum <ontolo...@googlegroups.com> wrote:

Kingsley Idehen

unread,
Dec 1, 2024, 11:25:40 AM12/1/24
to ontolo...@googlegroups.com

Hi John,

On 11/30/24 8:41 PM, John F Sowa wrote:
Ravi, Igor, and Kingsley,

Since Matthew isn't with us, I'll summarize some of his points which we had discussed over many years in different ways.

He had been working at Shell Oil for years, and he had developed a detailed ontology for the oil industry.  He later generalized it to develop a more general top level, which I considered quite good.   We had discussed issues about generalizing it even farther,  but he was reluctant to go farther in levels of abstraction.   We agreed that was a reasonable point of view.

But we also agreed that his details for the oil industry might conflict with details for other industries, such as banking and farming.   Furthermore, he recognized that different oil companies had different ways of representing the same terms because they had developed different policies and procedures.

I'll also mention another widely used ontology, which evolved over a period of about 70 years, and it is unlikely to change for a long, long time:  the ontology for making reservations for airlines, which was later extended to cover anything related to airlines, such as hotels, car rentals, trains, taxis, etc., etc.

And that ontology began in the 1950s with IBM's project SAGE for the airplanes used in the Strategic Air Command  over North America.  In the 1960s, IBM adapted that ontology for American Airlines.  IBM later sold the software to other airlines.   And all the other additions were made to conform to the same basic ontology from the 1950s.  70 years later, that top level is so entrenched that it is never going away.

Another world-wide ontology that also developed in the 1960s includes the global weather patterns that were established by the world-wide weather simulation programs.  They use a different way of representing the world than the reservation systems.

Fundamental problem:  There will never be a single universal ontology for representing anything and everything in the world (or the universe).

That is a fact that any system of knowledge representation must deal with.

John


I completely agree with your perspective on ontologies and practical reality. Hopefully, the rise of LLMs will simplify these concepts by enabling quicker experimentation with ontologies, ultimately reinforcing this crucial point.

Kingsley

 


From: "Ravi Sharma" <drravi...@gmail.com>

In the software development and maturity considerations we used to talk of design, development and implementation patterns.
Would you then build three different ontologies?
I would think only one would be applicable for all three types of patterns.

Thanks.
Ravi

On Wed, Nov 27, 2024 at 5:42 AM 'Kingsley Idehen' via ontolog-forum <ontolo...@googlegroups.com> wrote:
Hi Igor,

On 11/27/24 8:38 AM, 'Igor Toujilov' via ontolog-forum wrote:
> John,
> I agree that visualisation is important in formal reasoning. But I am
> not sure that it works in all cases. I have seen theoretical
> physicists discussing their problems on YouTube for hours without a
> single diagram.

IMHO:

That doesn’t mean they didn’t use a diagram during the early conceptual
stages, or even have one off-camera. As visual beings, any
well-thought-out process typically begins with some form of conceptual
visualization—unless it’s just copying, memorizing, and regurgitating
someone else’s work. :)

--
Regards,

Kingsley Idehen
--
All contributions to this forum are covered by an open-source license.
For information about the wiki, the license, and how to subscribe or
unsubscribe to the forum, see http://ontologforum.org/info
---
You received this message because you are subscribed to the Google Groups "ontolog-forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ontolog-foru...@googlegroups.com.