OWL2+SWRL vs CL

146 views
Skip to first unread message

Igor Toujilov

unread,
May 15, 2024, 7:27:57 PMMay 15
to ontolo...@googlegroups.com
There is a simple task. Someone goes to a shop and buys the following items with known prised:
- a bag, 3.5$;
- a book, 0.8$;
- a pencil, 0.05$;
- a rubber eraser, 0.02$.
Can you create an ontology which can calculate the total bill using known ontological tools? Please no programming languages.
I can do this purely in OWL2+SWRL. This is described in the article [1].

John F Sowa, is it possible to solve this task in Common Logic (CL)?

Regards,
Igor



Alex Shkotin

unread,
May 16, 2024, 5:28:17 AMMay 16
to ontolo...@googlegroups.com

Igor and All,


I am happy to write that the report Specific tasks of Ugraphia on a specific structure(-:PUBLIC:-) is now preprinted [1].

It shows a way to formalize how we solve our tasks by applying a theory.

To solve a task manually we create a tree of subtasks until solved or obvious.

TO solve a task automatically we formalize it and give it to the interpreter to calculate a formula.


Igor, 


In the framework of ugraph theory [2] we have ~20 definitions. I am not sure if all of them are expressible on OWL2+SWRL, but if one or another is, please give a formula to add to the framework. I can reserve a language tag like "owr" for OWL2+SWRL.


For example let's take this definition


rus

Пусть g есть граф, v есть вершина, такая что v принадлежит g. степень [вершины] v в [графе] g есть количество простых рёбер графа g инцидентных v плюс умноженное на два количество петель графа g инцидентных v.

eng

Let g be a graph, v is a vertex such that v belongs to g. The degree of a vertex v in a graph g is the number of simple edges of the graph g that are incident with v plus the number of loops of the graph g that are incident with v multiplied by two.

yfl

declaration d func(Nat graph vertex) (g v) ≝ {vertex(g)(v)} (#e:edge(g) simple(e) & (e inc v)) + 2*(#e:edge(g) loop(e) & (e inc v)).


Is it possible to define this d function in OWL2+SWRL?

If yes, does it mean that we probably can formalize ugraph theory in it?

I know that we can keep the structure of ugraph in OWL2.

Then we can formalize and solve tasks from [1] in it.

That would be great ⏲️


Alex


[1] -https://www.researchgate.net/publication/380576198_Specific_tasks_of_Ugraphia_on_a_particular_structure_formulations_solutions_placement_in_the_framework DOI: 10.13140/RG.2.2.34057.45927

-https://www.academia.edu/119115395/Specific_tasks_of_Ugraphia_on_a_particular_structure

[2] framework

https://www.researchgate.net/publication/374265191_Theory_framework_-_knowledge_hub_message_1

https://www.researchgate.net/publication/374233866_Karkas_teorii_-_koncentrator_znanij_soobsenie_No1



чт, 16 мая 2024 г. в 02:27, 'Igor Toujilov' 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/ontolog-forum/CAKP%2B7LP_z8MMr6jrFe4TM_iNhSvGjP1-Fesn%2BYK%3DpUJQb5FPmQ%40mail.gmail.com.

John F Sowa

unread,
May 17, 2024, 5:46:22 PMMay 17
to ontolo...@googlegroups.com
Igor,

My recommendation is to replace OWL + SWRL with  (1) a simple type hierarchy, equivalent to just the hierarchy part of OWL, which is the most widely used subset, and (2) full first-order logic (FOL) for the constraints.

The requirement of decidability makes the OWL notation (Turtle or whatever) more complex than it should be.  That makes it harder to learn, harder to use, and less expressive.  And it serves no useful purpose whatsoever.    Nobody but a logician who had advanced training could ever write a statement that is undecidable.  The Cyc developers, for example, use a superset of FOL, but in 30 years of applications, nobody had ever written an ontology that contained any undecidable statements.

For the type hierarchy, I recommend the four sentence types of Aristotle's syllogisms.   Full FOL can be expressed in a very readable and writable notation that uses logical operators with the following spelling:  AND, OR, NOT, IF-THEN, SOME, EVERY.    For a summary, see slides 25 to 37 of https://jfsowa.com/talks/patolog1.pdf .  That's all you need to express (1) a type hierarchy equivalent to the OWL hierarchy, and (2) constraints in full FOL. 

 SWRL has some non-logical features, but they are unnecessary if you have full FOL. 

This is a simple subset of Common Logic.   You can use any standard dialect of CL for the internal representation, and you can use highly readable versions of Controlled English, Russian, or whatever for the user interface.

John
 


From: "Igor Toujilov' via ontolog-forum" <ontolo...@googlegroups.com>

Igor Toujilov

unread,
May 18, 2024, 6:59:26 AMMay 18
to ontolo...@googlegroups.com
John,
I hoped you would show us a computer-executable example of how to sum a set of numbers in an ontology, using a publicly available free tool based on FOL or CL.

Igor

--
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,
May 18, 2024, 3:29:45 PMMay 18
to ontolo...@googlegroups.com, CG
Igor,

Before commenting on OWL + SWRL, I'd like to say a bit about my qualifications for evaluating hardware and software design.  I admit that in my 30 years at IBM, I did quite a bit of research.  But I also worked with the IBM large systems development groups, where I learned how computer systems are designed and developed from the circuit level to the mainframe level to the operating system level to the user application level.  

First, I suggest a cartoon, which was drawn by one of my colleagues at IBM in 1974:  The Adventures of Task-Force Tim, http://www.jfsowa.com/computer/tftim.htm .  The topic is the failure of IBM's huge project called Future Systems (FS).  It collapsed in 1974, and high-level management attempted to cover up the failure and salvage something from it.

On a more serious note, see the page on Computer Systems, in which I discuss some lessons learned from those days and from later developments in the computer industry:   http://www.jfsowa.com/computer/ .   The first topic is about issues related to FS, including my Memo 125, which was circulated by copying machines throughout IBM.  The people who read it loved it (most of them) or hated it (the managers who were responsible).  Fortunately, Carl Conti protected me by getting me transferred to the IBM Systems Research Institute, which was outside the chain of command of the people who caused FS and its downfall.  That is where I did my research, writing, and teaching about AI, natural language processing, experts systems, and applications to computer software.

And note, by the way, I have been writing critical articles about bad system designs for many years -- even when it got me in a lot of trouble -- plus a lot of praise by people who had been too timid to admit publicly that the design was bad.  They didn't have to criticize FS themselves.  They just asked someone "Did you see Sowa's Memo 125?"  Then depending on the answer, they knew whether it was safe to add their own criticisms.

Since OWL + SWRL have been forced upon innocent victims for almost 20 years, there is a huge amount of legacy software built on top of them.  That software is not going away.  I am not suggesting that anybody should throw away programs that they have been using for many years.  The effects of legacy software don't go away.  Everything that follows has to have interfaces to it for many, many years.

But what I am saying is that OWL was a terrible blunder.  It is the kind of mistake that very intelligent researchers who have little or no experience with practical software design tend to make.  Please read my Memo 125.  The kind of blunders that IBM managers made in 1974 comes from the same motivations as the mistakes made by the designers of OWL. 

To answer your question, I'll just say that you or anybody else could write an ontology for addition in FOL much simpler, better, and faster than in OWL + SWRL.  In fact, you can Google many publications about how to define addition by axioms stated in FOL.  It's simple.

Paul Tyson

unread,
May 18, 2024, 5:55:47 PMMay 18
to ontolo...@googlegroups.com

John, I will ask plainly where Igor might be too polite or timid: put up or shut up. 

No one doubts your experience and publications. Can you spare a few lines of code to show how one might express his problem in FOL, and then process it using open-source tools to get the desired result?

Admittedly, any such bakeoff between different technology stacks is not going to identify a clear choice for all semantic applications. But there are obvious and proven paths from RDF & friends to solving Igor's simple problem and many vastly more complex. Show us something built on FOL, DOL, CL, etc. that's easier, faster, or more robust.

Regards,
--Paul

--
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,
May 18, 2024, 8:42:09 PMMay 18
to ontolo...@googlegroups.com
Paul,

OK.  I recommend the free software called SWI Prolog, which is based on first-order logic.   You can download it from https://www.swi-prolog.org .

Since I would rather not give a tutorial on Prolog, I'll spell out the statements in a version of controlled English.  If you want an explanation of Prolog, there are many, many introductions to Prolog that use SWI notation.   Use your favorite search engine to find one.  (Actually, I wrote an intro, which uses a slightly different syntax from SWI.  See https://www.jfsowa.com/logic/prolog1.htm )

Definitions in controlled English:

Let Sum(L) be the sum of all the numbers in a list L.
Let Head(L) be the first element of L.
Let Tail(L) be the list that follows the head. 

The complete program in controlled English:

If the length of L is 0, then Sum(L) = 0.
If the length of L is not 0, then Sum(L) = Head(L) + Sum(Tail(L)).

Note that this is pure and simple first-order logic stated in a version of Controlled English.  These two lines can be mapped directly to any version of Prolog or related versions of logic programming.  Those notations are actually more concise, but they require a bit more explanation.

Our old VivoMind company used Prolog for all the AI reasoning, Java for the user interface, and C for some low-level subroutines that were invoked by Prolog.   For an overview of the VivoMind system and the results in competition with other AI systems, see https://jfsowa.com/talks/cogmem.pdf .

As you can see from some of the competitions, VivoMind (and its implementation in Prolog) was faster, more powerful, and more accurate than the competition.  That was during the decade of 2000 to 2010.
  
Our new Permion.ai company uses a superset of ISO Standard Prolog.  It is specially optimized for the kinds of operations that are used, including LLMs.  But all those operations can be implemented in  other versions, including SWI (also with subroutines for LLMs).

John
 


From: "Paul Tyson" <pht...@sbcglobal.net>
Sent: 5/18/24 5:56 PM
To: ontolo...@googlegroups.com
Subject: Re: [ontolog-forum] Future Systems of the Past (was OWL2+SWRL vs CL

Alex Shkotin

unread,
May 19, 2024, 5:37:50 AMMay 19
to ontolo...@googlegroups.com

Paul,


It would be better if Igor gave us not a reference to the article but the code in OWL2+SWRL itself.

So we have a task

Let "Someone goes to a shop and buys the following items with known prised:

- a bag, 3.5$;

- a book, 0.8$;

- a pencil, 0.05$;

- a rubber eraser, 0.02$."

Create an ontology and show us how to calculate the total bill using known ontological tools.


What is the OWL2+SWRL text of ontology and what tool to use?


Here is Rhodes. Jump here 👏


Alex



вс, 19 мая 2024 г. в 00:55, Paul Tyson <pht...@sbcglobal.net>:

alex.shkotin

unread,
May 19, 2024, 5:45:58 AMMay 19
to ontolog-forum
IN ADDITION: is that like RDF+SPARQL should be OK?

воскресенье, 19 мая 2024 г. в 12:37:50 UTC+3, alex.shkotin:

Igor Toujilov

unread,
May 19, 2024, 9:01:37 AMMay 19
to ontolo...@googlegroups.com
Alex,
I am sorry for not providing enough references (they are in my article). But for convenience I give them here.
All related material can be found in my open source project MELO, https://sourceforge.net/projects/meloproject/.
You need a Protege system installed (also make sure the SWRL plug-in is installed into Protege) on your machine to run the test:
- Download the ontology (list_sum.owl).
- Start Protege and load the ontology into there.
- In Protege start Pellet reasoner and see the inferred value of the sum.

Igor

Igor Toujilov

unread,
May 19, 2024, 10:22:39 AMMay 19
to ontolo...@googlegroups.com
John,
A typical scenario of consuming an ontology by end-users is the following:
- Download the ontology;
- Load it into a visual tool;
- Run a reasoner on it and see the results in the visual tool.

SWI-Prolog is an excellent system with web-server components and OWL support. I used it in 2005 when I was working in UCL for the Cancergrid project in ontologies in cancer bioinformatics. This was a big international project where I collaborated with the National Cancer Institute (NCI), universities of Oxford, Cambridge, Manchester, UCLA, etc. I created an ontology web-server based on SWI-Prolog. It loaded ontologies, e.g. NCI Thesaurus, from OWL files into the Prolog runtime environment and then exposed the ontology through the web. The server accepted queries in Prolog and I suggested using it as a production server for the project. However, after some testing my suggestion was not accepted. The reason for this decision was: software engineers who tested the server were not good enough in Prolog to write the queries.

Igor

Alex Shkotin

unread,
May 19, 2024, 12:52:35 PMMay 19
to ontolo...@googlegroups.com
Igor,

You gave a simple set of facts 
"Someone goes to a shop and buys the following items with known prised:

- a bag, 3.5$;

- a book, 0.8$;

- a pencil, 0.05$;

- a rubber eraser, 0.02$."

We need to formalize them and to say which tool to call to get a sum of prices.

And you give me the "575 lines (491 with data), 26.9 kB" text as a solution?


Just to begin, a formalization in RDF form may be like that.

KG:

bag price 33.5$.

book price 0.8$.

pencil price 0.05$.

rubber_eraser price 0.02$.


And the query like Sparql is:

Select bag.price+book.price+pencil.price+rubber_eraser.price from KG.

It gives us the value we need.


How does the same look in OWL2+SWRL?

Please code, no references.


Alex


вс, 19 мая 2024 г. в 16:01, 'Igor Toujilov' via ontolog-forum <ontolo...@googlegroups.com>:

John F Sowa

unread,
May 19, 2024, 2:51:15 PMMay 19
to ontolo...@googlegroups.com, CG
Igor,

I'm glad that we agree on the value of Prolog.   The reason why Prolog failed to achieve much usage in the US was caused by a prominent AI author, who wrote a couple of books and was considered an authority.   His comment about Prolog:  "We tried that with Microplanner, and it was inefficient."

Since it's not nice to say anything bad about the dead, I won't mention his name.  But his comment was based on a profound ignorance:  Microplanner was a research project, written by one person for a PhD dissertation.   It did not support the full functionality of Prolog.  It was written in LISP, which is OK for AI applications, but it is not efficient for high performance. 

For the IBM system that beat the world champion in Jeopardy, the program that analyzed the English questions and answers was written in Prolog.  That program was written by Michael McCord, who was one of the four co-authors of the book Knowledge Systems and Prolog.  My "Prolog to Prolog" was another one of the four.

By the way, the IBM developers had tried to use some software based on the Semantic Web stack.  But it was too slow and too difficult to update.  They brought back McCord, who had retired from IBM a few years earlier.  His Prolog implementation was faster, had more functionality, and was easier to update.

For our VivoMind company, we used Prolog for supporting applications that processed English and other natural languages.  The semantic representation was based on conceptual graphs, which are based on Peirce's existential graphs, which we extended (with a few minor features) to represent the full ISO standard for Common Logic.

The users communicated with applications in English and in diagrams.,  See the examples in https://jfsowa.com/talks/cogmem.pdf .   The VivoMind system could analyze English (and other NLs) as well as computer languages.  For the application in legacy reengineering, it was able to compare and detect errors and inconsistencies  in programming languages, English comments in the code, documentation about the programs, and various memos, commentary, and publications.

Our new Permion.ai company has a more general foundation that can also support current versions of LLMs.  That enables detailed analysis, evaluation, and correction of output generated by the LLMs.   Detecting errors is very important.  Correcting errors is even better.   

 And by the way, John McCarthy, who originally designed LISP, finally admitted that Prolog was better for advanced AI applications.  My colleague Arun Majumdar influenced that decision after showing him VivoMind applications and their implementation.

John
 


From: "Igor Toujilov' via ontolog-forum" <ontolo...@googlegroups.com>

John,
A typical scenario of consuming an ontology by end-users is the following:
- Download the ontology;
- Load it into a visual tool;
- Run a reasoner on it and see the results in the visual tool.

SWI-Prolog is an excellent system with web-server components and OWL support. I used it in 2005 when I was working in UCL for the Cancergrid project in ontologies in cancer bioinformatics. This was a big international project where I collaborated with the National Cancer Institute (NCI), universities of Oxford, Cambridge, Manchester, UCLA, etc. I created an ontology web-server based on SWI-Prolog. It loaded ontologies, e.g. NCI Thesaurus, from OWL files into the Prolog runtime environment and then exposed the ontology through the web. The server accepted queries in Prolog and I suggested using it as a production server for the project. However, after some testing my suggestion was not accepted. The reason for this decision: software engineers who tested the server were not good enough in Prolog to write the queries.

Igor

Igor Toujilov

unread,
May 20, 2024, 9:04:36 AMMay 20
to ontolo...@googlegroups.com
Alex,

Alex wrote> We need to formalize them and to say which tool to call to get a sum of prices.


This is formalised in the ontology file list_sum.owl and I gave the reference to it.

In this email thread I also posted the normal usage scenario for such files. For convenience, I remind again:

- Download the ontology (list_sum.owl).
- Start Protege and load the ontology into there.
- In Protege start Pellet reasoner and see the inferred value of the sum.


Alex wrote> And you give me the "575 lines (491 with data), 26.9 kB" text as a solution?


This is the solution in the form of ontology file. It contains the formalisation, rules and data.


Alex wrote>

> And the query like Sparql is:

> Select bag.price+book.price+pencil.price+rubber_eraser.price from KG.

> It gives us the value we need.


It is a well known fact that the sum can be calculated in SPARQL. For the reasons I posted to this email thread earlier, it is not an interesting solution.


Alex wrote>

> How does the same look in OWL2+SWRL?

> Please code, no references.


The referenced file list_sum.owl is OWL2+SWRL code of the solution in RDF/XML format. I don't see a point for inserting this code (575 lines) directly into the email. It can be always downloaded from the reference I provided. This file, while still human-readable, is mostly for machine-processing. To view this file in a convenient way, load it to Protege. For those who don't want to install Protege, I will post this ontology in the Manchester format generated from Protege. For humans, reading and writing an OWL code in the Manchester syntax is much more convenient than doing so in RDF/XML syntax.


Regards,

Igor


Kingsley Idehen

unread,
May 20, 2024, 9:37:18 AMMay 20
to ontolo...@googlegroups.com

Hi John, Igor, Alex, and any other interested party,

This is an interesting discussion that, in my opinion, brings us back to an age-old issue with RDF, namely conflating XML and RDF. Ultimately, we leverage the fact that RDF (a data definition language) is expressible using a variety of notations and serializable using a variety of formats. That said, I don’t believe you would read official W3C specifications and arrive at the particular worldview that seems to drive many of John’s fundamental gripes with RDF and OWL.

Now that we have better tools, it’s a lot easier to demonstrate the point above.

  1. This animated teletype session illustrates what I believe irks John (I think).

  2. This variant replaces RDF/XML with RDF-Turtle across the board (it could also have been JSON-LD if requested).

  3. This variant drops OWL2 for comparative consistency, since the challenge boils down to declarative rules definitions handled by relevant language processors.

I hope this helps demonstrate the “horses for courses” nature of these matters, and that RDF isn’t RDF-XML—above all else :)

-- 
Regards,

Kingsley Idehen	      
Founder & CEO 
OpenLink Software   
Home Page: http://www.openlinksw.com
Community Support: https://community.openlinksw.com
Weblogs (Blogs):
Company Blog: https://medium.com/openlink-software-blog
Virtuoso Blog: https://medium.com/virtuoso-blog
Data Access Drivers Blog: https://medium.com/openlink-odbc-jdbc-ado-net-data-access-drivers

Personal Weblogs (Blogs):
Medium Blog: https://medium.com/@kidehen
Legacy Blogs: http://www.openlinksw.com/blog/~kidehen/
              http://kidehen.blogspot.com

Profile Pages:
Pinterest: https://www.pinterest.com/kidehen/
Quora: https://www.quora.com/profile/Kingsley-Uyi-Idehen
Twitter: https://twitter.com/kidehen
Google+: https://plus.google.com/+KingsleyIdehen/about
LinkedIn: http://www.linkedin.com/in/kidehen

Web Identities (WebID):
Personal: http://kingsley.idehen.net/public_home/kidehen/profile.ttl#i
        : http://id.myopenlink.net/DAV/home/KingsleyUyiIdehen/Public/kingsley.ttl#this

Igor Toujilov

unread,
May 20, 2024, 9:47:44 AMMay 20
to ontolo...@googlegroups.com
The ontology in Manchester syntax is below.

Regards,
Igor

Prefix: MELO1: <http://sourceforge.net/MELO/1#>
Prefix: MELO2: <http://sourceforge.net/MELO/2#>
Prefix: MELO: <http://sourceforge.net/MELO#>
Prefix: dc: <http://purl.org/dc/elements/1.1/>
Prefix: ls: <http://www.semanticweb.org/list_sum#>
Prefix: owl: <http://www.w3.org/2002/07/owl#>
Prefix: rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
Prefix: rdfs: <http://www.w3.org/2000/01/rdf-schema#>
Prefix: swrl: <http://www.w3.org/2003/11/swrl#>
Prefix: swrlb: <http://www.w3.org/2003/11/swrlb#>
Prefix: xml: <http://www.w3.org/XML/1998/namespace>
Prefix: xsd: <http://www.w3.org/2001/XMLSchema#>

Ontology: <http://www.semanticweb.org/list_sum>

Annotations:
    dc:contributor "Raju Irshad"@en,
    dc:creator "Igor Toujilov"@en,
    dc:description "
            This ontology demonstrates how to close a set of individuals
            of interest to calculate their aggregation properties.
            We call this technique a partial closure of the world.
            In this example, the closure is achieved by organising the individuals
            in a linked list.
            This ontology also shows another technique, which we call indexed namespaces.
            Two linked lists are created in different namespaces:
            the first one links the individuals in the alphabetical order,
            and the second one links the same individuals in the reverse order.
            This is useful for calculating multiple aggregation properties
            on multiple sets of individuals in the same ontology.
        "@en,
    dc:source "https://mailman.stanford.edu/pipermail/p4-feedback/2013-April/005704.html"^^xsd:anyURI,
    dc:title "List Sum Example"@en

AnnotationProperty: dc:contributor
AnnotationProperty: dc:creator
AnnotationProperty: dc:description
AnnotationProperty: dc:source
AnnotationProperty: dc:title
Datatype: rdf:PlainLiteral
Datatype: xsd:decimal

ObjectProperty: MELO1:follows
    Characteristics:
        Functional
   
ObjectProperty: MELO2:follows
    Characteristics:
        Functional
   
DataProperty: MELO1:has_price_sum
    Characteristics:
        Functional
    Range:
        xsd:decimal
   
DataProperty: MELO2:has_price_sum
    Characteristics:
        Functional
    Range:
        xsd:decimal
   
DataProperty: ls:has_price
    Characteristics:
        Functional
    Range:
        xsd:decimal
   
Class: MELO:property_aggregation_result
    Annotations:
        dc:description "
            Look up the inferred individuals of this class for resulting values
            of the aggregation properties, for example, has_price_sum for this ontology.
        "@en
   
Class: owl:Thing
   
Individual: ls:bag
    Types:
        owl:Thing,
        not (MELO1:follows some owl:Thing),
        not ( inverse (MELO2:follows) some owl:Thing)
    Facts:  
     MELO2:follows  ls:book,
     ls:has_price  350
   
Individual: ls:book
    Types:
        owl:Thing
    Facts:  
     MELO1:follows  ls:bag,
     MELO2:follows  ls:pencil,
     ls:has_price  80
   
Individual: ls:pencil
    Types:
        owl:Thing
    Facts:  
     MELO1:follows  ls:book,
     MELO2:follows  ls:rubber,
     ls:has_price  5
   
Individual: ls:rubber
    Types:
        owl:Thing,
        not (MELO2:follows some owl:Thing),
        not ( inverse (MELO1:follows) some owl:Thing)
    Facts:  
     MELO1:follows  ls:pencil,
     ls:has_price  2
   
Rule:
    (not (MELO1:follows some owl:Thing))(?h), ls:has_price(?h, ?p) -> MELO1:has_price_sum(?h, ?p)

Rule:
    (not (MELO2:follows some owl:Thing))(?h), ls:has_price(?h, ?p) -> MELO2:has_price_sum(?h, ?p)

Rule:
    MELO1:follows(?x, ?y), ls:has_price(?x, ?p), MELO1:has_price_sum(?y, ?s), swrlb:add(?p, ?s, ?xs) -> MELO1:has_price_sum(?x, ?xs)

Rule:
    MELO2:follows(?x, ?y), ls:has_price(?x, ?p), MELO2:has_price_sum(?y, ?s), swrlb:add(?p, ?s, ?xs) -> MELO2:has_price_sum(?x, ?xs)

Alex Shkotin

unread,
May 21, 2024, 5:22:20 AMMay 21
to ontolo...@googlegroups.com
Hi Kinglsey,

The question #1 is how to stop these chats?  They are just typing and typing and resuming throws me out. 
More later.

Alex

пн, 20 мая 2024 г. в 16:37, '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.

Alex Shkotin

unread,
May 21, 2024, 6:25:07 AMMay 21
to ontolo...@googlegroups.com
Igor,

I did all three steps. My question #1 is where I must "see the inferred value of the sum":
image.png

Alex

пн, 20 мая 2024 г. в 16:47, 'Igor Toujilov' via ontolog-forum <ontolo...@googlegroups.com>:

Alex Shkotin

unread,
May 21, 2024, 6:43:59 AMMay 21
to ontolo...@googlegroups.com
My question #2 is why I cannot sign up by my google account?
image.png

All tools are good as long as they are available🏋️

Alex

пн, 20 мая 2024 г. в 16:37, 'Kingsley Idehen' via ontolog-forum <ontolo...@googlegroups.com>:

On 5/20/24 9:04 AM, 'Igor Toujilov' via ontolog-forum wrote:

--
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,
May 21, 2024, 7:38:58 AMMay 21
to ontolo...@googlegroups.com
Hi Alex,
Kinglsey posted animated snapshots of the previous chats. If you wait for enough time after clicking on the link, the animation will be completed (stopped) and you can scroll to the beginning of the chat to view it.

Regards,
Igor

Kingsley Idehen

unread,
May 21, 2024, 7:40:17 AMMay 21
to ontolo...@googlegroups.com

On 5/21/24 5:22 AM, Alex Shkotin wrote:

Hi Kinglsey,

The question #1 is how to stop these chats?  They are just typing and typing and resuming throws me out. 
More later.

Alex

Alex,

Just drop the &t parameter in the URL, and refresh :)

Just goto: https://linkeddata.uriburner.com/chat/?chat_id=s-3gPHEdAD7jxtdmBi2Fhy3ptX3RReEn6jGQUBPtvD3kKq#usr-fzbr9iaiqfs rather than https://linkeddata.uriburner.com/chat/?chat_id=s-3gPHEdAD7jxtdmBi2Fhy3ptX3RReEn6jGQUBPtvD3kKq&t=60#usr-fzbr9iaiqfs.

Here’s the conclusion at the end of the page.

Comparative Commentary

The table below compares each approach based on the uniform scenario:

Aspect RDF-Turtle + SPARQL Prolog Datalog OWL2 + SWRL
Ease of Use Moderate; requires understanding of RDF and SPARQL Easy; straightforward logic programming Easy; straightforward logic programming Moderate; requires understanding of OWL and SWRL
Data Representation Graph-based, semantic web standards Logic-based, lists and facts Logic-based, facts Graph-based, semantic web standards
Query Language SPARQL, powerful for querying RDF data Prolog rules, powerful for logical queries Datalog rules, similar to Prolog OWL for structure, SWRL for rules
Expressiveness High, supports complex queries and reasoning High, supports complex logic and recursion High, supports complex logic and recursion High, supports complex rules and reasoning
Interoperability High, widely used in semantic web technologies Low, specific to Prolog environments Low, specific to Datalog environments High, integrates with OWL and RDF
Tool Support Good, many tools support RDF and SPARQL Good, several Prolog interpreters available Moderate, fewer Datalog interpreters Good, supported by OWL reasoners
Performance Depends on the RDF store and SPARQL engine Generally efficient for logic-based queries Generally efficient for logic-based queries Depends on the OWL reasoner
Dynamic Calculation Achieved via SPARQL query Achieved via Prolog rules Achieved via Datalog rules Limited; SWRL lacks native aggregation
Namespace Handling Explicitly defined using prefixes Not applicable Not applicable Explicitly defined using prefixes

Summary (from ChatGPT, not me)

Each approach has its strengths and is suitable for different use cases depending on the requirements for expressiveness, interoperability, and tool support. The RDF-Turtle + SPARQL and OWL2 + SWRL approaches are particularly strong in environments that require integration with other semantic web technologies. Prolog and Datalog offer straightforward implementations for logic programming tasks but lack the semantic web integration. SWRL, while powerful for rule expression, lacks support for aggregation, which is crucial for tasks like calculating totals.

Kingsley

Igor Toujilov

unread,
May 21, 2024, 8:50:16 AMMay 21
to ontolo...@googlegroups.com
Alex,
This is a Protege UI problem: not all windows show inferences. To overcome the problem, use DL Query as below:
Screenshot from 2024-05-21 13-18-33.png
It shows two results because there are two sets of rules in different namespaces: one for the linked list in namespace 1 and another for the linked list in the opposite direction in namespace 2.
The corresponding individuals show the sums (again two numbers for different namespaces):
Screenshot from 2024-05-21 13-48-54.png
Igor


Alex Shkotin

unread,
May 21, 2024, 12:35:16 PMMay 21
to ontolo...@googlegroups.com
Igor,

Important tick is this one
image.png

And now I have some derived numbers but for me strange one
image.png
image.png
image.png
image.png
What does it mean?

Alex

вт, 21 мая 2024 г. в 15:50, 'Igor Toujilov' via ontolog-forum <ontolo...@googlegroups.com>:

Alex Shkotin

unread,
May 21, 2024, 12:39:23 PMMay 21
to ontolo...@googlegroups.com
dropping works well.
And why cannot I register?

вт, 21 мая 2024 г. в 14:40, 'Kingsley Idehen' via ontolog-forum <ontolo...@googlegroups.com>:

Alex Shkotin

unread,
May 21, 2024, 1:05:30 PMMay 21
to ontolo...@googlegroups.com
IN ADDITION This is the answer from meta.ai for me for tomorrow https://www.meta.ai/c/a93cb17f-bfe2-483b-8f0a-1ba35801bd71 
Here is an expanded ontology that incorporates SWRL (Semantic Web Rule Language) and OWL2 (Web Ontology Language 2) examples:
@prefix : <(link unavailable)#> .
@prefix owl: <http://www.w3.org/2002/07/owl#> .
@prefix swrl: <http://www.w3.org/2003/11/swrl#> .
@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .

:Bag a owl:Class ;
  rdfs:label "Bag" ;
  :price 3.5 .

:Book a owl:Class ;
  rdfs:label "Book" ;
  :price 0.8 .

:Pencil a owl:Class ;
  rdfs:label "Pencil" ;
  :price 0.05 .

:RubberEraser a owl:Class ;
  rdfs:label "Rubber Eraser" ;
  :price 0.02 .

:Price a owl:DatatypeProperty ;
  rdfs:label "Price" ;
  rdfs:range xsd:decimal .

:TotalBill a owl:Class ;
  rdfs:label "Total Bill" ;
  :hasPrice :Price .

:hasItem a owl:ObjectProperty ;
  rdfs:label "Has Item" ;
  rdfs:domain :TotalBill ;
  rdfs:range owl:Thing .

:totalPrice a owl:DatatypeProperty ;
  rdfs:label "Total Price" ;
  rdfs:range xsd:decimal .

### SWRL Rules

:TotalBillRule a swrl:Imp ;
  swrl:body (
    ?bill a :TotalBill .
    ?bill :hasItem ?item .
    ?item :price ?price .
  ) ;
  swrl:head (
    ?bill :totalPrice ?total .
    swrl:builtIn (swrl:add(?total, ?price))
  ) .

### OWL2 Axioms

:TotalBill owl:equivalentClass (
  [ a owl:Class ;
    owl:intersectionOf (:Bag :Book :Pencil :RubberEraser)
  ]
) .

:TotalBill owl:disjointWith (:Bag :Book :Pencil :RubberEraser) .
This expanded ontology includes:
  • SWRL rules to calculate the total price of a TotalBill by summing up the prices of all items.
  • OWL2 axioms to define a TotalBill as the intersection of all items (i.e., a TotalBill must have at least one of each item) and to specify that TotalBill is disjoint with each item (i.e., a TotalBill cannot be an instance of any individual item).
Using this ontology, you can query the total bill using SPARQL, and the SWRL rules will be applied to calculate the total price.
Note that this is just one example of how to incorporate SWRL and OWL2 into the ontology, and there are many other ways to do this depending on the specific requirements of your use case. 

вт, 21 мая 2024 г. в 19:39, Alex Shkotin <alex.s...@gmail.com>:

Alex Shkotin

unread,
May 21, 2024, 1:30:53 PMMay 21
to ontolo...@googlegroups.com
IN ADDITION-2 This is a meta.ai solution in CL. But we need a CL expert and CL reasoner to check it.

Here is the updated ontology with prices for the items:
cl:ontology (
  cl:definition (
    :Bag cl:type cl:Entity
    :Book cl:type cl:Entity
    :Pencil cl:type cl:Entity
    :RubberEraser cl:type cl:Entity
    :TotalBill cl:type cl:Entity
  )

  cl:relation (
    :hasItem cl:arguments (:TotalBill :Entity)
    :price cl:arguments (:Entity xsd:decimal)
  )

  cl:rule (
    cl:forall (?bill :TotalBill
      cl:=> (cl:and (cl:exists (?item :hasItem ?bill)
                     (?item :price ?price))
               (cl:not (cl:exists (?item2 :hasItem ?bill)
                              (cl:not (cl:eq (?item, ?item2))))))
         (?bill :totalPrice (cl:sum ?price)))
  )

  cl:rule (
    cl:forall (?bill :TotalBill
      cl:=> (cl:not (cl:exists (?item :hasItem ?bill)))
         (?bill :totalPrice 0))
  )

  cl:rule (
    cl:forall (?item :Entity
      cl:=> (?item :price ?price)
         (cl:>= ?price 0))
  )

  cl:fact (
    :Bag :price 3.5
  )

  cl:fact (
    :Book :price 0.8
  )

  cl:fact (
    :Pencil :price 0.05
  )

  cl:fact (
    :RubberEraser :price 0.02
  )
)
This updated ontology includes cl:fact statements that specify the prices for each item. The cl:fact statements assert that the price of a Bag is 3.5, the price of a Book is 0.8, the price of a Pencil is 0.05, and the price of a RubberEraser is 0.02.
With these prices defined, the rules in the ontology can be used to calculate the total price of a TotalBill based on the items it contains.

вт, 21 мая 2024 г. в 20:05, Alex Shkotin <alex.s...@gmail.com>:

Kingsley Idehen

unread,
May 21, 2024, 1:59:40 PMMay 21
to ontolo...@googlegroups.com

Hi Alex,

On 5/21/24 12:39 PM, Alex Shkotin wrote:
dropping works well.
And why cannot I register?

We need to fix the NASCAR multi-protocol authentication widget such the the designated Identity Provider for that instance is clearer i.e., surface the button that you need to click on for registration, if you don't want to create a new account rather than using what you already have the likes of Apple, Google, Microsoft etc..

I have this fixed.

Kingsley

Kingsley Idehen

unread,
May 21, 2024, 2:10:18 PMMay 21
to ontolo...@googlegroups.com, Alex Shkotin

Hi Alex,

Note the following, based on a CoPilot interaction.


The SPARQL CONSTRUCT equivalent of the given SWRL rule would look something like this:


       

   

CONSTRUCT { ?bill :totalPrice ?total . } WHERE { ?bill a :TotalBill . ?bill :hasItem ?item . ?item :price ?price . BIND (?price AS ?total) } 

Please note that SPARQL doesn’t support arithmetic operations directly in the CONSTRUCT clause. The swrl:add(?total, ?price) operation from the SWRL rule can’t be translated directly into SPARQL. In the SPARQL query above, I’ve used the BIND operation to assign the value of ?price to ?total. If you need to perform arithmetic operations, you might need to handle it in your application logic after retrieving the data with SPARQL.

Also, remember that SPARQL CONSTRUCT allows you to create a new RDF graph, so the resulting ?total will not update the original graph. If you want to update the original graph, you might need to use SPARQL UPDATE instead.

Please consult with a Semantic Web expert or conduct further research to determine the best method for your specific needs and circumstances.


My follow-on interaction with CoPilot produced.


You’re correct! My apologies for the oversight. We can indeed use a SELECT subquery in the WHERE clause to perform the addition operation. Here’s the corrected SPARQL CONSTRUCT query:


       

   

CONSTRUCT { ?bill :totalPrice ?total . } WHERE { { SELECT ?bill (SUM(?price) AS ?total)  WHERE { ?bill a :TotalBill . ?bill :hasItem ?item . ?item :price ?price . }  GROUP BY ?bill } } 

  
     
  

In this query, the SELECT subquery is used to calculate the total price for each bill by summing up the prices of its items. The result is then used in the CONSTRUCT clause to create the new triples. Thank you for pointing out the correct approach! 😊


Conclusion:

SPARQL is a very powerful dynamic rules language too. Which actually use that as the basis for Custom Reasoning & Inference in our Virtuoso Platform.

Kingsley

Igor Toujilov

unread,
May 21, 2024, 6:55:01 PMMay 21
to ontolo...@googlegroups.com
Alex,
I always use full reasoner options.
For each bought item you see two values of property has_price_sum in different namespaces. They belong to two different linked lists: one for a forward linkage and another for a backward linkage. This is to demonstrate how to implement the sum on different sets of items in the same ontology. The sum would work with a single linked list which would be easier to understand.
The total price is calculated recursively from the head to the tail of each list. So, the final has_price_sum value for a list belongs to the tail of this list. All other items of the list hold only intermediate values of has_price_sum and they are not important for the end-user. That is why the class property_aggregation_result is introduced. It holds only items having the total has_price_sum value.

Regards,
Igpr

Alex Shkotin

unread,
May 22, 2024, 5:21:44 AMMay 22
to ontolo...@googlegroups.com
we did it🏋️

вт, 21 мая 2024 г. в 20:59, 'Kingsley Idehen' via ontolog-forum <ontolo...@googlegroups.com>:

Alex Shkotin

unread,
May 22, 2024, 5:52:05 AMMay 22
to ontolo...@googlegroups.com

Igor,


For me, this construction, when an intermediate sum is assigned to each member of the set, looks like a trick, although ingenious, it does not seem practical.

In theory, it would be necessary to reformulate the problem when, as is customary in DB languages, there are computable fields.


You raised a very important topic: how fields storing calculations are formalized in modern formal ontologies.

And here I need to think about how to discuss this.


As for SWRL+Pellet, this of course needs to be studied: an inference engine that can do calculations is very interesting!


Alex

ср, 22 мая 2024 г. в 01:55, 'Igor Toujilov' via ontolog-forum <ontolo...@googlegroups.com>:

Igor Toujilov

unread,
May 22, 2024, 10:13:15 AMMay 22
to ontolo...@googlegroups.com
Alex,
Alex wrote> when an intermediate sum is assigned to each member of the set, looks like a trick, although ingenious, it does not seem practical.

Welcome to the bizarre world of SWRL! This is the only possible way of passing values to rules. In SWRL there is no destructive assignment and no parameters apart from individuals and their property values.

Igor

Paul Tyson

unread,
May 22, 2024, 11:22:44 AMMay 22
to ontolo...@googlegroups.com
RIF[1] provides declarative aggregation functions, including “Sum”. One could easily write these rules in RIF, translate to SPARQL, and execute against an RDF dataset for desired results. Or prolog if preferred.

Regards,
—Paul


On May 22, 2024, at 09:13, 'Igor Toujilov' via ontolog-forum <ontolo...@googlegroups.com> wrote:



Igor Toujilov

unread,
May 22, 2024, 11:37:54 AMMay 22
to ontolo...@googlegroups.com
Alex,
SPARQL will calculate the sum but this is not good enough because many ontologies require using those results in subsequent automatic calculations. So, when using SPARQL, the results should be inserted back into the source ontology and the reasoner should automatically reload it which is not straightforward.

Igor

Igor Toujilov

unread,
May 22, 2024, 11:46:18 AMMay 22
to ontolo...@googlegroups.com
Paul,
The initial goal of this email thread was to discuss how to make automatic (arithmetic) calculations in a logical reasoner on an ontology with the results of those calculations to go (automatically) as inputs for other (automatic) calculations and (automatically) repeat the calculation cycle recursively.

Igor

Paul Tyson

unread,
May 22, 2024, 12:32:56 PMMay 22
to ontolo...@googlegroups.com


On May 22, 2024, at 10:46, 'Igor Toujilov' via ontolog-forum <ontolo...@googlegroups.com> wrote:


Paul,
The initial goal of this email thread was to discuss how to make automatic (arithmetic) calculations in a logical reasoner on an ontology with the results of those calculations to go (automatically) as inputs for other (automatic) calculations and (automatically) repeat the calculation cycle recursively.

That was not clear to me from your original problem statement—you just asked for a sum total of a purchase order. But I see your proposed solution used a more general iterative approach, which would be applicable to other use cases. In RIF-PRD[1](production rules) there might be some examples more similar to yours.

Regards,
—Paul

Igor Toujilov

unread,
May 22, 2024, 1:17:04 PMMay 22
to ontolo...@googlegroups.com
Paul,
I see; I am very interested in discussing deep integration of conventional calculations into logical reasoners on ontologies.

Regards,
igor

John F Sowa

unread,
May 22, 2024, 3:06:48 PMMay 22
to ontolo...@googlegroups.com
Igor, Alex, Paul, List,

Mathematicians have been integrating mathematical calculations with logic since the Egyptians, Chinese, and Babylonians.  They get their inspiration from playing with diagrams.  Then they state their proofs in natural languages or formal notations that can be easily translated to FOL.

Igor:  I am very interested in discussing deep integration of conventional calculations into logical reasoners on ontologies.

That is very important.  I recommend Wolfram's Mathematica, which supports all the major versions of mathematics.  Wolfram and his colleagues have implemented a front-end that uses LLMs to translate English to and from the formal mathematical notation.

And by the way, Wolfram used Prolog to implement the early versions of Mathematica.  He and his employees later designed a very general mathematical notation, which is translated to their proprietary extension to Prolog.

Alex:  when an intermediate sum is assigned to each member of the set, looks like a trick, although ingenious, it does not seem practical. 

That is a recursive definition.  The idea was invented by the Babylonians (or maybe the Egyptians or the Chinese) thousands of years ago.  Euclid routinely used recursion in his definitions, but he didn't cite his sources.

Alex:  Welcome to the bizarre world of SWRL! This is the only possible way of passing values to rules. In SWRL there is no destructive assignment and no parameters apart from individuals and their property values. 

That is true of Prolog and Mathematica, which are vastly more powerful and efficient.  For high speed computation, any specifications designed with Mathematica can be automatically translated to FORTRAN or C.  That is an option that we used for VivoMind, and we continue to do with our new Permion.ai.  

Alex:  As for SWRL+Pellet, this of course needs to be studied: an inference engine that can do calculations is very interesting!

It's the way that mathematicians write axioms for every version of math.  If you really need high-speed performance, you can translate whatever you specify to FORTRAN or C.

I strongly recommend Wolfram's writings or watching his lectures on YouTube.  He is a very intelligent and practical mathematician who knows how to design powerful software.  He knows that decidability would be a disaster for any practical implementation of logic.

John

Alex Shkotin

unread,
May 23, 2024, 7:03:06 AMMay 23
to ontolo...@googlegroups.com
Paul,

I agree with you that the initial task was not general at all. It was about formalization of summation. And my short answer was that we do not need any reasoning, just calculation.
On the other hand calculation is a special kind of reasoning :-)

Igor,

Anyway the initial impression is that we need not use formal ontology for this kind of task :-)
If we have some structure with functional data dependencies this is a kind of axiom, but getting dependent values in general is a specific task like solving equations of some kind.
It looks like a step to perform before reasoning.
More later.

Alex

ср, 22 мая 2024 г. в 19:32, Paul Tyson <pht...@sbcglobal.net>:

Alex Shkotin

unread,
May 23, 2024, 8:39:59 AMMay 23
to ontolo...@googlegroups.com
IN ADDITION We formalize  for a reason (usually to use comp to work instead of us) and choose a tool the best for a task.
Let me show example from [1] of task solving, manual and comp-based
image.png
It takes 6 steps to solve the task manually and one by comp.

The ability of Pellet to calculate is the feature to study 🎆

Alex

[1]

чт, 23 мая 2024 г. в 14:02, Alex Shkotin <alex.s...@gmail.com>:

Igor Toujilov

unread,
May 23, 2024, 9:51:51 AMMay 23
to ontolo...@googlegroups.com
Alex,
Some years ago many people in the Protege mail-list asked how to incorporate arithmetic and other aggregative calculations in ontologies. They want a reasoner to classify objects in an ontology depending on aggregation values of their properties automatically, i.e. without further human intervention. I realised that this use-case is very widespread but there was no solution. That is why I created my ontological aggregation approach. The shopping list total calculation, of course, is not a practical use-case for direct usage but it is easy to understand and convenient for a discussion of the approach. There are numerous practical and academic use-cases that desperately need aggregation directly inside ontologies.

Igor

Mark Underwood

unread,
May 23, 2024, 11:36:20 AMMay 23
to ontolo...@googlegroups.com
I wanted to know whether a network switch I own can be configured to be a DHCP server. As you can glimpse with the screenshot, Gemini is pretty good with the context, apparent "understanding" of DHCP protocol, the specific manufacturer's product line (network switches) features, but gets wrong the specific advice being requested in the prompt when it responds with:

"Unmanaged switches: The TL-SG2218 cannot act as a DHCP server itself. It is designed to simply extend your network by providing more Ethernet ports."

The switch being discussed does support DHCP server capability. The text is correct WRT Jetstream switches by this maker but doesn't recognize that the subject switch is a member of the Jetstream SDN / smart switch class and has this capability.

Interesting, as it would be a trivial ask of a product tree ontology. What such an ontology might not have, though, and which Gemini was pretty good at, is the narrative around DHCP and its typical use with other network devices. 

Unfortunately for me, that's the part I already knew.
gemini-on-DHCP-capability-20240523.JPG

John F Sowa

unread,
May 23, 2024, 6:58:26 PMMay 23
to ontolo...@googlegroups.com
Igor,

One simple addition to my response to Alex (copy below) would satisfy all the requirements by all those people:

Igor:   Some years ago many people in the Protege mail-list asked how to incorporate arithmetic and other aggregative calculations in ontologies. 

The answer is simple:  First-order logic supports functions as well as predicates.  Just take the solution that I recommended to Alex in my note below.  In any position where FOL is permitted, just use an FOL statement that includes  a function.  That function could be anything specified in any programming language (even FORTRAN or C). 

Please note that Wolfram supports full FOL.  They also support the option of translating any function or predicate specified in the Wolfram notation to FORTRAN or C.  They supported that option in the 1990s.

This is just one of many reasons why the decidability gang destroyed the power of the design that Tim B-L intended for the Semantic Web.   If they had just allowed pure FOL, all these features would have been available in 2005.

The implementation is trivial.  Just take any software that supports OWL, keep the hierarchy, throw out Turtle, and replace it with FOL.  And Voila!   You have an immense improvement in power, generality, and performance.

John
____________________________________
Alex,

There are much more important issues to discuss than just the DL 'egg'.

Alex:  The direction of future development of formal ontologies can  be found already in the DL “egg”, which, as is known, consists of a T-box (Terminology) and an A-box (Assertions). In the future, the decoding will be  changed as follows: T - Theoretical knowledge, A -  fActual knowledge. 

First, by "DL egg", I assume that you mean "description logic".   The first version of so-called Description logic by Ron Brachman and his thesis adviser Bill Woods emphasized the type hierarchy.  Later they added first-order logic as the constraint language.  Since the type hierarchy could be defined in FOL, that seemed to make it redundant.

But the difference between the two was priority or precedence:   The type hierarchy was the basis for the ontology.  In case of any conflict, the type hierarchy was considered to be correct, and the constraint language had to be modified to make it consistent with the hierarchy.

I believe that stage of DL development was a very good start.  Unfortunately, the decidability gang took over and persuaded most (but not all) DL proponents to restrict the constraint logic to the decidable subset.  Very few people who had real work to do adopted that restriction.  Unfortunately, the gang packed the voting process and forced decidability on the Semantic Web.  That was a terrible blunder.

However, the original idea of using FOL as the foundation was good.  The partitioning into a type hierarchy that took precedence over the constraint language was also good.  In practical applications, they also used database languages (SQL or object-oriented DB)  for storing and querying episodic information.

That led to a three-way partitioning:   (1) Type hierarchy (ontology); (2) Constraint logic (also a part of ontology); (3) Episodic information (raw data and information of any kind).

In case of conflicts, #1 had precedence over #2, which had precedence over #3.  The strategy for resolving conflicts depended on informing the system developers or managers, who would make the final decisions about what to change.

As for Claude Sonnet, I don't know enough about their inner workings.  In order to make LLMs safe, the constraints must be applied by technology that is independent of the tensor calculus that processes LLMs.  If they are using something like the above constraint hierarchy, that would be good.  Perhaps they have some other method.  But whatever it is, it must be some kind of method that is outside the basic tensor calculus that processes the LLLMs.

John
 


From: "Igor Toujilov' via ontolog-forum" <ontolo...@googlegroups.com>

Kingsley Idehen

unread,
May 23, 2024, 7:24:28 PMMay 23
to ontolo...@googlegroups.com

Hi John,

On 5/23/24 6:57 PM, John F Sowa wrote:
Igor,

One simple addition to my response to Alex (copy below) would satisfy all the requirements by all those people:

Igor:   Some years ago many people in the Protege mail-list asked how to incorporate arithmetic and other aggregative calculations in ontologies. 

The answer is simple:  First-order logic supports functions as well as predicates.  Just take the solution that I recommended to Alex in my note below.  In any position where FOL is permitted, just use an FOL statement that includes  a function.  That function could be anything specified in any programming language (even FORTRAN or C). 

Please note that Wolfram supports full FOL.  They also support the option of translating any function or predicate specified in the Wolfram notation to FORTRAN or C.  They supported that option in the 1990s.

This is just one of many reasons why the decidability gang destroyed the power of the design that Tim B-L intended for the Semantic Web.   If they had just allowed pure FOL, all these features would have been available in 2005.

The implementation is trivial.  Just take any software that supports OWL, keep the hierarchy, throw out Turtle, and replace it with FOL.  And Voila!   You have an immense improvement in power, generality, and performance.

I was following along until you mentioned RDF-Turtle, which is simply a notation and data serialization format. I don't know how that has anything to do with FOL.

RDF is based on FOL, always has been. RDF is notation and serialization format agnostic. The snafu years back was conflating RDF and RDF-XML (yet another notation and serialization format combo).

My earlier examples in this thread support my statement above. Moreover, OWL itself is just a worldview (schema or vocabulary or ontology) that can be used to constrain interaction with structured data constructed using any of the various RDF notations for serialization using any of its associated formats.

Here's a dump from https://linkeddata.uriburner.com/chat/?chat_id=s-7h62WuqY82YGK5iUR3viD4eC4Zkw1pvXN95v6Cf61HBx#asi-8211 .


Uniform Scenario

Scenario: A shopping cart contains four items: a bag, a book, a pencil, and a rubber eraser. The task is to calculate the total cost of items in the shopping cart.

RDF-Turtle Ontology + SPARQL Query

Data format:
@prefix schema: <http://schema.org/> . @prefix ex: <https://groups.google.com/g/ontolog-forum/c/4gbCSTNsuFQ/m/l1LxfOcWAQAJ#> . @prefix xsd: <http://www.w3.org/2001/XMLSchema#> . ex:Bag a schema:Product ; schema:name "Bag" ; schema:price "3.5"^^xsd:decimal . ex:Book a schema:Product ; schema:name "Book" ; schema:price "0.8"^^xsd:decimal . ex:Pencil a schema:Product ; schema:name "Pencil" ; schema:price "0.05"^^xsd:decimal . ex:Eraser a schema:Product ; schema:name "Rubber Eraser" ; schema:price "0.02"^^xsd:decimal . ex:ShoppingCart a schema:ItemList ; schema:itemListElement ex:Bag, ex:Book, ex:Pencil, ex:Eraser .

SPARQL Query:

Data format:
PREFIX schema: <http://schema.org/> PREFIX ex: <https://groups.google.com/g/ontolog-forum/c/4gbCSTNsuFQ/m/l1LxfOcWAQAJ#> PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> SELECT (SUM(xsd:decimal(?price)) AS ?totalBill) WHERE { ex:ShoppingCart schema:itemListElement ?item . ?item schema:price ?price . }

Prolog Representation

Data format:
item(bag, 3.5). item(book, 0.8). item(pencil, 0.05). item(eraser, 0.02). shopping_cart([bag, book, pencil, eraser]). total_bill(Total) :- shopping_cart(Items), findall(Price, (member(Item, Items), item(Item, Price)), Prices), sum_list(Prices, Total). sum_list([], 0). sum_list([H|T], Sum) :- sum_list(T, Rest), Sum is H + Rest.

Datalog Representation

Data format:
item(bag, 3.5). item(book, 0.8). item(pencil, 0.05). item(eraser, 0.02). shopping_cart(bag). shopping_cart(book). shopping_cart(pencil). shopping_cart(eraser). total_bill(Total) :- findall(Price, (shopping_cart(Item), item(Item, Price)), Prices), sum_list(Prices, Total). sum_list([], 0). sum_list([H|T], Sum) :- sum_list(T, Rest), Sum is H + Rest.

SWRL Rules in RDF-Turtle (Conceptual)

Data format:
@prefix swrl: <http://www.w3.org/2003/11/swrl#> . @prefix swrlb: <http://www.w3.org/2003/11/swrlb#> . @prefix schema: <http://schema.org/> . @prefix ex: <https://groups.google.com/g/ontolog-forum/c/4gbCSTNsuFQ/m/l1LxfOcWAQAJ#> . # Rules to associate items with their prices [ a swrl:Imp ; swrl:body ( [ a swrl:IndividualPropertyAtom ; swrl:propertyPredicate schema:itemListElement ; swrl:argument1 ex:ShoppingCart ; swrl:argument2 ?item ] ) ; swrl:head ( [ a swrl:IndividualPropertyAtom ; swrl:propertyPredicate schema:price ; swrl:argument1 ?item ; swrl:argument2 ?price ] ) ].

Comparative Commentary

The table below compares each approach based on the uniform scenario:

Aspect RDF-Turtle + SPARQL Prolog Datalog
SWRL
Ease of Use Moderate; requires understanding of RDF and SPARQL Easy; straightforward logic programming Easy; straightforward logic programming
Moderate; requires understanding of SWRL and RDF
Data Representation Graph-based, semantic web standards Logic-based, lists and facts Logic-based, facts Graph-based, semantic web standards
Query Language SPARQL, powerful for querying RDF data Prolog rules, powerful for logical queries Datalog rules, similar to Prolog
SWRL, integrates rules with RDF

Summary

Each approach has its strengths and is suitable for different use cases depending on the requirements for expressiveness, interoperability, and tool support. The RDF-Turtle + SPARQL and SWRL approaches are particularly strong in environments that require integration with other semantic web technologies. Prolog and Datalog offer straightforward implementations for logic programming tasks but lack the semantic web integration. SWRL, while powerful for rule expression, lacks support for aggregation, which is crucial for tasks like calculating totals.

Michael DeBellis

unread,
May 24, 2024, 12:13:57 AMMay 24
to ontolog-forum
Igor, I know this is kind of late but I wanted to show my example of how to do this.  It's kind of a hack but it works. If you load this into Protege and run Pellet then the rule:  add(?nt, ?c2, ?ct), nextItem(?i1, ?i2), totalCost(?i1, ?ct), hasCost(?i2, ?c2) -> totalCost(?i2, ?nt)

Will compute the total cost and put it as the total cost of the shopping cart. It's a hack because I had to hard code the first item in the list to have the same cost and total cost but I think this does what you described.  IMO this also shows that logic isn't always the most intuitive way to do something. I think an easier and more intuitive way to do it is with the SPARQL query:

PREFIX : <http://www.semanticweb.org/mdebe/ontologies/2024/4/shopping/>
SELECT (SUM(?cost) AS ?total_cost)
WHERE {?shopping_cart :hasItem ?item.
       ?item :hasCost ?cost.}

If you run this in Snap SPARQL it prints out the total. 

Also, I think this shows why the OWA can be such a pain. If not for the OWA I could have had a rule that dealt with the first item in the list by checking which item didn't have a previous item and I wouldn't have had to do the hack of making the first item have the same cost and total cost. 

Michael
On Wednesday, May 15, 2024 at 4:27:57 PM UTC-7 Igor Toujilov wrote:
There is a simple task. Someone goes to a shop and buys the following items with known prised:
- a bag, 3.5$;
- a book, 0.8$;
- a pencil, 0.05$;
- a rubber eraser, 0.02$.
Can you create an ontology which can calculate the total bill using known ontological tools? Please no programming languages.
I can do this purely in OWL2+SWRL. This is described in the article [1].

John F Sowa, is it possible to solve this task in Common Logic (CL)?

Regards,
Igor



Shoping Example.ttl

Alex Shkotin

unread,
May 24, 2024, 3:33:06 AMMay 24
to ontolo...@googlegroups.com
Mark,

my experience with meta.ai which is quite good in its knowledge of OWL2 - just as an example of a highly specialized topic that is closer to me than DHCP. He knows a lot but makes serious mistakes, what is said out of the blue. This can be classified as unsystematic extensive knowledge and possibly schizophrenia. By the way, I wonder how psychologists describe GenAI disorders?

Alex

чт, 23 мая 2024 г. в 18:36, Mark Underwood <know...@gmail.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.

Alex Shkotin

unread,
May 24, 2024, 5:51:09 AMMay 24
to ontolo...@googlegroups.com

Igor,


I agree that the topic is very interesting and important. 


Alex



чт, 23 мая 2024 г. в 16:51, 'Igor Toujilov' via ontolog-forum <ontolo...@googlegroups.com>:

Alex Shkotin

unread,
May 24, 2024, 6:02:28 AMMay 24
to ontolo...@googlegroups.com
Guys,

Give me a weekend to join your SWRL discussion.
Meanwhile we can search internet like this "aggregation directly inside ontologies" to get https://link.springer.com/content/pdf/10.1007/11531371_39.pdf

Alex

пт, 24 мая 2024 г. в 07:14, Michael DeBellis <mdebe...@gmail.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.

Mike Bergman

unread,
May 25, 2024, 3:22:40 PMMay 25
to ontolo...@googlegroups.com

Hi Kingsley,

Applause again for being a voice of practical examples and reasoned education.

Hi John,

Please refrain from your incessant put-downs and dismissals of W3C semantic standards. No one is forcing you, or anyone else, to use it. I think the constant denigration speaks more to you than the standards.

It seems to me that all of us share a common desire to bring logical and semantically-responsive technologies to address real-world problems. The contexts and imperatives of these problems both derive from their nature and the communities they affect. Who is to say one sucks but one is the answer, when those and many others may be employed? John, you too often violate in my opinion Peirce's admonition to not block the way to inquiry.

Hi All,

I would love to see more discourse with actual problems and responses to same from various aspects of the community, as much of this thread has admirable exhibited. Thank you; for the most part this has been a helpful thread. Let's pull together on the oars, rather than arguing what ends up being parochial minutiae.

Best, Mike

--
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 on the web visit https://groups.google.com/d/msgid/ontolog-forum/f54ae06a-66b7-43de-8ec7-c82d4fad34fa%40openlinksw.com.
-- 
__________________________________________

Michael K. Bergman
319.621.5225
http://mkbergman.com
http://www.linkedin.com/in/mkbergman
__________________________________________ 

Ravi Sharma

unread,
May 25, 2024, 4:01:59 PMMay 25
to ontolo...@googlegroups.com
John
I agree with a lot of comments on Wolfram. I add that he also rediscovered multidimensional hyper circles from ancient Indian knowledge.
I find Wolfram alpha to be useful for many Q's on Math which I am also learning with some pointers from Ken (thanks).
I have not used Mathematica as it is a subscription?

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



Michael DeBellis

unread,
May 27, 2024, 1:23:35 PMMay 27
to ontolo...@googlegroups.com
I have not used Mathematica as it is a subscription?

FYI, there is a GNU version of Mathematica that is completely free called Octave: https://octave.org/  Doesn't have all the bells and whistles of Mathematica but it is still quite nice. For Andrew's Intro to ML class he used Octave rather than Python because Octave is easier to use. It's a wonderful environment to learn Linear Algebra. Very much like Lisp in that there is an interpreter and you can evaluate things on the fly. You really work at the conceptual level and think in terms of matrices, transposes, inverses, etc. rather than Pandas or other data structures as in Python.  I also highly recommend Gilbert Strang's free Intro to Linear Algebra class from MIT Open Courses. 

If you have any connections to a university or NASA you might want to look into getting a complimentary Mathematica license. Mathematica is like Apple, they see the value in giving away copies for student use so that when students go into industry they already know Mathematica and will want to use it. All the undergrads that I work with from Berkeley's data science program have free versions of Mathematica. 

Michael 

You received this message because you are subscribed to a topic in the Google Groups "ontolog-forum" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/ontolog-forum/4gbCSTNsuFQ/unsubscribe.
To unsubscribe from this group and all its topics, send an email to ontolog-foru...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ontolog-forum/CAAN3-5eeRW0Ev1vE5WRCy99SiigbhauHSUPFFp8ERDCgj9vg5w%40mail.gmail.com.

Dan Brickley

unread,
May 27, 2024, 1:39:17 PMMay 27
to ontolo...@googlegroups.com
I believe Octave is more like Matlab

There is some version of Mathematica for Raspberry Pi, 

Dan

Michael DeBellis

unread,
May 27, 2024, 1:48:21 PMMay 27
to ontolo...@googlegroups.com
I believe Octave is more like Matlab

Sorry, my mistake, yes, it is a GNU version of Matlab not Mathematica.  

John F Sowa

unread,
May 29, 2024, 1:55:39 PMMay 29
to ontolo...@googlegroups.com
Kingsley,

I have no objections to RDF, and I have no objections to using the triple format (x R y) in any software.   I worked on the committee that defined the ISO standard for Common Logic, and we designed it to accept RDF formats (as well as a broad range of other formats).

Kingsley:  I was following along until you mentioned RDF-Turtle, which is simply a notation and data serialization format. I don't know how that has anything to do with FOL.

I don't object to RDF or the kinds of applications that use OWL.  My objection is about the OWL constraint language (in any notation, such as Turtle or the more primitive version) is that it does not support full FOL.   My recommendation for OWL3 is to support full FOL for the constraint language.  That would be a superset of Turtle (and other notations).

Therefore, all applications that use OWL2 could continue to run indefinitely.  But new applications could mix old OWL2 applications with a version of OWL3 that supports full FOL for the constraint language.

As a replacement for Turtle, I recommend a highly readable and writable version of Controlled English (and/or other NLs).  Short summary:  a notation that supports the following logic words in a subset of English syntax:  and, or, not, if-then, some, every.  As an example, the ACE software would support that option, and it's freely available.   It could be used to translate English-like statements to internal OWL3 formats.

Reason for OWL3:  Controlled English for full FOL is simpler, easier to read, easier to write, more expressive, and more efficient for 99.99% of all applications of OWL2.

The logicians who designed OWL mistakenly believed that decidability was important.  However, undecidable statements in FOL are so complex that only a professional logician would know how to write one.  

Cyc, for example, supports a superset of FOL, and in the past 40 years nobody has ever written an application that failed because of an undecidable statement.   Many people have made mistakes that caused applications to fail.  But nobody has ever found a failure that was caused by an undecidable statement.

John
 


From: "Kingsley Idehen' via ontolog-forum" <ontolo...@googlegroups.com>

Kingsley Idehen

unread,
May 30, 2024, 4:15:13 PMMay 30
to ontolo...@googlegroups.com

Hi John,

On 5/29/24 1:55 PM, John F Sowa wrote:

Kingsley,

I have no objections to RDF, and I have no objections to using the triple format (x R y) in any software.   I worked on the committee that defined the ISO standard for Common Logic, and we designed it to accept RDF formats (as well as a broad range of other formats).

I believe it’s important to separate RDF as a data definition language from its various notations and data serialization formats. This conflation dates back to the early days of RDF and RDF/XML, and unfortunately, it has persisted. For instance, the official Semantic Web Layer Cake still includes RDF/XML as the interchange layer, despite years of protestation from myself and many others. That said, we should be able to look beyond the specification management snafus to a reality where RDF isn’t bound to any specific notation or serialization format.

Various Official Semantic Web Layer Cakes

Official Cakes|520|500

My Semantic Web Layer Cake Revision from this blog post

My Layer Cake Revision|520x500


Kingsley:  I was following along until you mentioned RDF-Turtle, which is simply a notation and data serialization format. I don't know how that has anything to do with FOL.

I don't object to RDF or the kinds of applications that use OWL.  My objection is about the OWL constraint language (in any notation, such as Turtle or the more primitive version) is that it does not support full FOL.   My recommendation for OWL3 is to support full FOL for the constraint language.  That would be a superset of Turtle (and other notations).

I think it’s important to decouple RDF as a basic data definition language from vocabularies, schemas, and ontologies such as RDF Schema (RDFS) and the OWL Ontology Language (OWL). As you know, these distinctions are very important.


Therefore, all applications that use OWL2 could continue to run indefinitely.  But new applications could mix old OWL2 applications with a version of OWL3 that supports full FOL for the constraint language.

I doubt anyone has a problem with that viewpoint.


As a replacement for Turtle, I recommend a highly readable and writable version of Controlled English (and/or other NLs).  

Why does anything need to be replaced? The beauty of RDF and the Architecture of the World Wide Web (AWWW) is that they aim for loose coupling, i.e., “horses for courses” compliant. Basically, everyone can use whatever works best for them rather than having preferences force-fed to anyone.

Short summary:  a notation that supports the following logic words in a subset of English syntax:  and, or, not, if-then, some, every.  As an example, the ACE software would support that option, and it's freely available.   It could be used to translate English-like statements to internal OWL3 formats.

As you know, the pursuit of single globally accepted notation for anything is always problematic. We already have a variety of options that ultimately leverage FOL as the underlying conceptual schema.


Reason for OWL3:  Controlled English for full FOL is simpler, easier to read, easier to write, more expressive, and more efficient for 99.99% of all applications of OWL2.

Sure, but who’s waiting for this? Or, put differently, what innovations are currently being held up by this issue? Controlled English has its own lane while OWL has its own. If you look at recent LLM-based natural language processor innovations, the end product look very much like a celebration of Controlled English.


The logicians who designed OWL mistakenly believed that decidability was important.  However, undecidable statements in FOL are so complex that only a professional logician would know how to write one. 

That’s fine, but what current solutions out in the wild are stifled by the decidability branch of OWL? I only see this as marginally important to those that are trying to develop a 100% compliant OWL processor, for whatever reason.


Cyc, for example, supports a superset of FOL, and in the past 40 years nobody has ever written an application that failed because of an undecidable statement.  

Yes, I totally agree. I only start getting confused when this gets conflated with the following:

The notion of a Semantic Web — an entity relationship graph constructed from hyperlinks that comprise machine-computable entity relationship type semantics.

RDF — a data definition language for entity relationship types that can be used to construct a Semantic Web, courtesy of Linked Data principles.

OWL — one of many ontologies that can be used to apply constraints to structured data constructed using RDF.

Many people have made mistakes that caused applications to fail.  But nobody has ever found a failure that was caused by an undecidable statement.

True, but that shouldn’t be conflated with the items above (including the use of terms from the OWL ontology for bits of reasoning and inference).

Kingsley


John
 


From: "Kingsley Idehen' via ontolog-forum" <ontolo...@googlegroups.com>

Hi John,

On 5/23/24 6:57 PM, John F Sowa wrote:
Igor,

One simple addition to my response to Alex (copy below) would satisfy all the requirements by all those people:

Igor:   Some years ago many people in the Protege mail-list asked how to incorporate arithmetic and other aggregative calculations in ontologies. 

The answer is simple:  First-order logic supports functions as well as predicates.  Just take the solution that I recommended to Alex in my note below.  In any position where FOL is permitted, just use an FOL statement that includes  a function.  That function could be anything specified in any programming language (even FORTRAN or C). 

Please note that Wolfram supports full FOL.  They also support the option of translating any function or predicate specified in the Wolfram notation to FORTRAN or C.  They supported that option in the 1990s.

This is just one of many reasons why the decidability gang destroyed the power of the design that Tim B-L intended for the Semantic Web.   If they had just allowed pure FOL, all these features would have been available in 2005.

The implementation is trivial.  Just take any software that supports OWL, keep the hierarchy, throw out Turtle, and replace it with FOL.  And Voila!   You have an immense improvement in power, generality, and performance.

I was following along until you mentioned RDF-Turtle, which is simply a notation and data serialization format. I don't know how that has anything to do with FOL.

RDF is based on FOL, always has been. RDF is notation and serialization format agnostic. The snafu years back was conflating RDF and RDF-XML (yet another notation and serialization format combo).

My earlier examples in this thread support my statement above. Moreover, OWL itself is just a worldview (schema or vocabulary or ontology) that can be used to constrain interaction with structured data constructed using any of the various RDF notations for serialization using any of its associated formats.

Here's a dump from https://linkeddata.uriburner.com/chat/?chat_id=s-7h62WuqY82YGK5iUR3viD4eC4Zkw1pvXN95v6Cf61HBx#asi-8211 .

--
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.

Paul Tyson

unread,
May 30, 2024, 6:09:17 PMMay 30
to ontolo...@googlegroups.com

John: thanks for the good explanation and your reasoned assessment of the W3C semantic stack.

Kingsley: I agree with your points except regarding RDF/XML. Anyone who still is stuck on this needs to read the RDF/XML spec and understand the design principles and limitations, and then move on to other serializations that suit their needs and toolchains. I would advise against adopting any RDF toolchain that did not at least read RDF/XML, and preferably also write it, mainly to support integration with XML toolchain including XSLT, xquery, xproc, etc, enabling full integration of XML document corpuses with RDF datasets. For a baseline example, a few dozen lines of XSLT will transform any xml document into its infoset RDF representation (in RDF/XML conveniently, slightly less so in another notation). Marry that up to other domain semantic data sources, and you have with very little effort created a linked data pool far more valuable than either the XML or the RDF by itself. From there, the sky's the limit for expanding and exploiting your linked data. (Not to say there aren't other ways to do this, but none so easy using ready-to-hand tools and existing data sources.)

Regards,
--Paul

Kingsley Idehen

unread,
May 31, 2024, 3:02:23 PMMay 31
to ontolo...@googlegroups.com

Hi Paul,

On 5/30/24 6:09 PM, Paul Tyson wrote:

John: thanks for the good explanation and your reasoned assessment of the W3C semantic stack.

Kingsley: I agree with your points except regarding RDF/XML. Anyone who still is stuck on this needs to read the RDF/XML spec and understand the design principles and limitations, and then move on to other serializations that suit their needs and toolchains.


Yes, but my point is that W3C spec publication issues have left confusing items in the public view that continue to either confuse people or reinforce long discarded confusion.


I would advise against adopting any RDF toolchain that did not at least read RDF/XML, and preferably also write it, mainly to support integration with XML toolchain including XSLT, xquery, xproc, etc, enabling full integration of XML document corpuses with RDF datasets.

Sorta.

Our Virtuoso platform still makes extensive use of RDF/XML, right now, but completely outside the user's view.


For a baseline example, a few dozen lines of XSLT will transform any xml document into its infoset RDF representation (in RDF/XML conveniently, slightly less so in another notation). Marry that up to other domain semantic data sources, and you have with very little effort created a linked data pool far more valuable than either the XML or the RDF by itself. From there, the sky's the limit for expanding and exploiting your linked data. (Not to say there aren't other ways to do this, but none so easy using ready-to-hand tools and existing data sources.)


Yes, but that isn't the front-door of RDF i.e., its an implementation detail.

I generally discourage narratives that lead to the misconception that XML is a mandatory requirement regarding RDF :)

Kingsley

John F Sowa

unread,
May 31, 2024, 5:43:15 PMMay 31
to ontolo...@googlegroups.com, EG, CG, Peirce List
Kingsley, Paul, List.

As I said, I've been a mathematician from way back, and I consider designs that can be translated to and from other formats without loss of info to be functionally identical.  But I also worked at IBM for 30 years, and I learned about all the pain and suffering caused by revisions and upgrades and supposed equivalences that aren't.

As an extreme example, consider the IBM SAGE computer for the US Strategic Air Command in the 1950s, which was intended to detect and monitor all aircraft flying over North America.  It weighed 250 tons and occupied one acre of floor space.  See https://www.ibm.com/history/sage#:~:text=SAGE%20remained%20in%20service%20by,role%20in%20the%20Cold%20War.

When I joined IBM in the 1960s, I saw the actual engineering model in operation in Kingston, NY.  It was used to test all software upgrades and fixes for the machines that were deployed at various installations.

The software designs for SAGE in the 1950s were adapted to the airlines reservation system for American Airlines in the 1960s, which ran on the IBM 7094.  Later that was upgraded for a System/360 version that included hotel reservations and car reservations.  That system was so successful that all software systems by all competitors world wide adopted the same software conventions.

Today, any reservations that anybody makes world wide are based on extensions of the  design decisions that were made for that 250-ton monster of the 1950s.  But the computer chip in your cell phone today has vastly more computer speed and storage capacity.  However, the system design and data structures at each stage were upward compatible with the previous versions.

Summary:   The SAGE data structure designs are still buried deep inside the latest and greatest  reservation systems today.  The high-level design decisions last forever, but the details at the bottom change with every major upgrade.

General principle:  Implementation details are temporary.  Logic is forever.

John
 


From: "Kingsley Idehen' via ontolog-forum" <ontolo...@googlegroups.com>

Ravi Sharma

unread,
May 31, 2024, 8:16:09 PMMay 31
to ontolo...@googlegroups.com
John, Kingsley, and others
Very helpful.
I personally started on IBM 360, 370, and later upto .....8086 PCs and other mainframes such as Univac 1108, CDC 6400 etc., during the Apollo time frame.
Ended with 2 mainframes executing car manufacture in more than dozen time zones and then reverse and forward engineered and architected a SAP based supply chain for GM.
NextGen Airspace on which I also worked at AF Contract integrated air and space and included drones and transponders under Maritime domain or situational Awareness but what is the relevance, I guess you are saying that someone has sometime to uncover old code or firmware to really understand what legacy knowledge was? And its connection to old languages related to LLMs and how is that relevant for our future directions? (If working on Voyager 1 - 2 data it is relevant.)
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.

Paul Tyson

unread,
Jun 1, 2024, 11:21:45 AMJun 1
to ontolo...@googlegroups.com
Kingsley and all,
How about encouraging narratives that emphasize the complementary power
of RDF and XML together for building amazing information delivery
systems? RDF/XML, OWL/XML, RIF/XML, RuleML, XCL (common logic XML),
non-RDF XML in standard or proprietary schemas--I say bring it on! The
information delivery practitioner who shuns either RDF or XML is doing
more work for lesser results.

--Paul


Kingsley Idehen

unread,
Jun 1, 2024, 1:52:34 PMJun 1
to ontolo...@googlegroups.com

Hi Paul,

In a genuinely objective realm, absolutely!

The problem right now is that RDF is an important piece of a bigger puzzle (giant global entity relationship graph constructed from hyperlinks) shrouded in confusion. Part of the confusion arises from its initial conflation with RDF/XML, alongside messaging that positioned it as an ‘interchange format’ or ‘data model’ rather than a data definition (or description) language that’s loosely coupled with a variety of notations, syntaxes, and data serialization formats.

Despite issues with the specs’ maintenance, XML and RDF have been decoupled.

Today, if you search for “What is RDF?” you will find that it is still described in confusing terms – more often than not.

Examples:

  1. ChatGPT’s description using the GPT-4 Language Model.

  2. Microsoft CoPilot’s description.

  3. Perplexity.ai’s description.

  4. You.com’s description.

  5. Google Gemini’s description – the best one of the lot, IMHO.

Paul Tyson

unread,
Jun 1, 2024, 2:28:33 PMJun 1
to ontolo...@googlegroups.com

Kingsley,

On 6/1/24 12:52, 'Kingsley Idehen' via ontolog-forum wrote:

Hi Paul,

On 6/1/24 11:21 AM, Paul Tyson wrote:

Kingsley and all,

On 5/31/24 14:02, 'Kingsley Idehen' via ontolog-forum wrote:

Hi Paul,

On 5/30/24 6:09 PM, Paul Tyson wrote:

John: thanks for the good explanation and your reasoned assessment of the W3C semantic stack.

Kingsley: I agree with your points except regarding RDF/XML. Anyone who still is stuck on this needs to read the RDF/XML spec and understand the design principles and limitations, and then move on to other serializations that suit their needs and toolchains.

Yes, but my point is that W3C spec publication issues have left confusing items in the public view that continue to either confuse people or reinforce long discarded confusion.

I would advise against adopting any RDF toolchain that did not at least read RDF/XML, and preferably also write it, mainly to support integration with XML toolchain including XSLT, xquery, xproc, etc, enabling full integration of XML document corpuses with RDF datasets.

Sorta.

Our Virtuoso platform still makes extensive use of RDF/XML, right now, but completely outside the user's view.

For a baseline example, a few dozen lines of XSLT will transform any xml document into its infoset RDF representation (in RDF/XML conveniently, slightly less so in another notation). Marry that up to other domain semantic data sources, and you have with very little effort created a linked data pool far more valuable than either the XML or the RDF by itself. From there, the sky's the limit for expanding and exploiting your linked data. (Not to say there aren't other ways to do this, but none so easy using ready-to-hand tools and existing data sources.)

Yes, but that isn't the front-door of RDF i.e., its an implementation detail.

I generally discourage narratives that lead to the misconception that XML is a mandatory requirement regarding RDF :)

How about encouraging narratives that emphasize the complementary power of RDF and XML together for building amazing information delivery systems? RDF/XML, OWL/XML, RIF/XML, RuleML, XCL (common logic XML), non-RDF XML in standard or proprietary schemas--I say bring it on! The information delivery practitioner who shuns either RDF or XML is doing more work for lesser results.

--Paul

In a genuinely objective realm, absolutely!

The problem right now is that RDF is an important piece of a bigger puzzle (giant global entity relationship graph constructed from hyperlinks) shrouded in confusion. Part of the confusion arises from its initial conflation with RDF/XML, alongside messaging that positioned it as an ‘interchange format’ or ‘data model’ rather than a data definition (or description) language that’s loosely coupled with a variety of notations, syntaxes, and data serialization formats.

Can we agree that, no matter one's RDF competence, RDF/XML is avoidable in most cases, useful in some?

And I submit that nothing is left uncovered in the GGERG by the union of RDF and XML. Nor, (considering the corporate bottom line), is the GEERG (giant enterprise entity relationship graph) left wanting anything.

Regards,
--Paul

--
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,
Jun 2, 2024, 12:35:07 AMJun 2
to ontolo...@googlegroups.com

Hi Paul,

On 6/1/24 2:28 PM, Paul Tyson wrote:

Kingsley,

On 6/1/24 12:52, 'Kingsley Idehen' via ontolog-forum wrote:

Hi Paul,

On 6/1/24 11:21 AM, Paul Tyson wrote:

Kingsley and all,

On 5/31/24 14:02, 'Kingsley Idehen' via ontolog-forum wrote:

Hi Paul,

On 5/30/24 6:09 PM, Paul Tyson wrote:

John: thanks for the good explanation and your reasoned assessment of the W3C semantic stack.

Kingsley: I agree with your points except regarding RDF/XML. Anyone who still is stuck on this needs to read the RDF/XML spec and understand the design principles and limitations, and then move on to other serializations that suit their needs and toolchains.

Yes, but my point is that W3C spec publication issues have left confusing items in the public view that continue to either confuse people or reinforce long discarded confusion.

I would advise against adopting any RDF toolchain that did not at least read RDF/XML, and preferably also write it, mainly to support integration with XML toolchain including XSLT, xquery, xproc, etc, enabling full integration of XML document corpuses with RDF datasets.

Sorta.

Our Virtuoso platform still makes extensive use of RDF/XML, right now, but completely outside the user's view.

For a baseline example, a few dozen lines of XSLT will transform any xml document into its infoset RDF representation (in RDF/XML conveniently, slightly less so in another notation). Marry that up to other domain semantic data sources, and you have with very little effort created a linked data pool far more valuable than either the XML or the RDF by itself. From there, the sky's the limit for expanding and exploiting your linked data. (Not to say there aren't other ways to do this, but none so easy using ready-to-hand tools and existing data sources.)

Yes, but that isn't the front-door of RDF i.e., its an implementation detail.

I generally discourage narratives that lead to the misconception that XML is a mandatory requirement regarding RDF :)

How about encouraging narratives that emphasize the complementary power of RDF and XML together for building amazing information delivery systems? RDF/XML, OWL/XML, RIF/XML, RuleML, XCL (common logic XML), non-RDF XML in standard or proprietary schemas--I say bring it on! The information delivery practitioner who shuns either RDF or XML is doing more work for lesser results.

--Paul

In a genuinely objective realm, absolutely!

The problem right now is that RDF is an important piece of a bigger puzzle (giant global entity relationship graph constructed from hyperlinks) shrouded in confusion. Part of the confusion arises from its initial conflation with RDF/XML, alongside messaging that positioned it as an ‘interchange format’ or ‘data model’ rather than a data definition (or description) language that’s loosely coupled with a variety of notations, syntaxes, and data serialization formats.

Can we agree that, no matter one's RDF competence, RDF/XML is avoidable in most cases, useful in some?


I don't see avoidance as an issue. It just isn't a mandatory part of what RDF is, fundamentally. Naturally, where appropriate, it does provide utility as a notation, syntax, or serialization format.


And I submit that nothing is left uncovered in the GGERG by the union of RDF and XML. Nor, (considering the corporate bottom line), is the GEERG (giant enterprise entity relationship graph) left wanting anything.


Yes, but in situations where XML is relevant.


Kingsley

Paul Tyson

unread,
Jun 2, 2024, 10:08:28 AMJun 2
to ontolo...@googlegroups.com
Of course--only when humans need to communicate in full sentences and paragraphs, using pictures, tables, lists, diagrams, cross-references, citations, etc. Say, to support modern civilization?

Best,
--Paul

Kingsley Idehen

unread,
Jun 3, 2024, 3:34:18 PMJun 3
to ontolo...@googlegroups.com

For example?

Paul Tyson

unread,
Jun 4, 2024, 10:33:44 PMJun 4
to ontolo...@googlegroups.com

Kingsley,

I had begun to suspect you and I operate in different problem domains, and if your problems can all be solved with RDF only, that's fine.

A giant open-source example of merging RDF with a document corpus is Wikidata and Wikipedia (which uses markdown, an easier and less rigorous markup format, instead of XML).

For over 2 decades I have worked on information delivery solutions that merge XML corpuses with RDF datasets representing ontologies, taxonomies, metadata, and hyperlinks to create robust hypermedia applications. I've done quite a bit of work in the Product Lifecycle Management (PLM) domain, which involves the design, documentation, testing, certification, manufacturing, and maintenance of complex products--such as aircraft, ships, mining equipment, medical devices, and electronic products.

Regards,
--Paul


Kingsley Idehen

unread,
Jun 5, 2024, 7:38:40 AMJun 5
to ontolo...@googlegroups.com

I don't operate in any kind of domain where problem are solved solely by a data definition language such as RDF.


A giant open-source example of merging RDF with a document corpus is Wikidata and Wikipedia (which uses markdown, an easier and less rigorous markup format, instead of XML).

For over 2 decades I have worked on information delivery solutions that merge XML corpuses with RDF datasets representing ontologies, taxonomies, metadata, and hyperlinks to create robust hypermedia applications. I've done quite a bit of work in the Product Lifecycle Management (PLM) domain, which involves the design, documentation, testing, certification, manufacturing, and maintenance of complex products--such as aircraft, ships, mining equipment, medical devices, and electronic products.


For some 20 years+ I've overseen the design and development of a platform that leverages XML and XSLT as core components of its data transformation layer. That platform also sits at the core of the massive Linked Open Data (LOD) cloud which even comprises a variant of Wikidata hosted on said platform.

We seem to be veering away from my fundamental argument that RDF and XML are two separate things that don't need to be conflated.

Kingsley

Regards,
--Paul


--
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.
Reply all
Reply to author
Forward
0 new messages