screwlisp proposes kittens

Plant Insect Bird practical formal ontology with Leonardo calculus

If you remember, I had a somewhat mediocre lispgamejam this year, though I did really get my Sandewallian software individuals working at last at that time, so there’s that.

This time and here I am composing an ontology containing its own concrete realisation that it acts as a vehicle for in Sandewallian style.

Allowing some boilerplate you might not have seen before, this document you are reading is literally the source of defining {organism plant insect bird} thingtype entites for our ontology, where each of {plant insect bird} is subsumed-by organism very straightforwardly.

In coming articles, we will see more of the relationship between the ontology and it acting as a vehicle for its concrete implementation, and more of the attributes, sets and so forth. There’s a mastodon thread link at the end for your questions, commentary and feedback/stern guidance.

The reason the document looks like it does is that I’m using emacs eev-mode, so I just press F8 on lines in this document I want-to-happen, and they visually happen on one half of my screen. Surely you have read me talk about this elsewhere.

Setting up a software-individual slime connection eepitch

 (eepitch-shell)

cd

git clone https://codeberg.org/tfw/pawn-75.git

mkdir -p leocommunity

rm -rf ~/leocommunity/Plantworldcp -r Pawn-75/Pawn-75 leocommunity/Plantworld

 (eepitch-kill)

Apropos my lispgamejam jam experience

 (setq inferior-lisp-program "clisp -E ISO-8859-1 -modern")

 (slime)

 (setq eepitch-buffer-name "*slime-repl clisp*")

(require "asdf")

(merge-pathnames #P"demus/Process/main/" #P"~/leocommunity/Plantworld/")

(uiop:chdir *)

(load #p"../../../remus/Startup/cl/acleo.leos")

(cle)

Alright, we made it in!

Creating our ontology

I guess that knowledgebases can each be one ontology’s universe.

crek organisms-kb

Alright, annoyingly these complex cle interactions take a long time to finish (for computer cycles; instant as a human), and the cursor doesn’t get restored to the other buffer (the shortcut to send it back is C-x o). The problem doesn’t matter in my unattended lisp-mediated eepitching though, so it doesn’t affect autonomous agents’ lives. But we are a human interloper here.

setk organisms-kb

To start with, let’s just create entityfile things in our knowledgebase that we will use to store our entities. Remember that we are using a metacircularly defined formal ontology to create our own formal ontology’s universe, though our ontology will eventually contain the source of concrete lisp programs that will use our ontology’s things as vehicles in the usual way. But these are just locations to store the things in our universe.

crefil organisms

crefil sensors

crefil plants

crefil insects

crefil birds

crefil world

I guess you can see where I’m going with this. A plant thingtype entity in the plants entityfile will subsume an organism thingtype, and plants will exist in the world entityfile’s contents… But let’s not get ahead of ourselves.

organisms

loadk organisms

put organism type thingtype

addmember (get organisms contents) organism

writefil organisms

loadk organisms

I can’t name the entityfile entity organism and then also name the new thingtype entity in the entityfile organism since entityfiles have the special property that their first element describes themselves, and we obviously can’t have degenerate names defined in one entityfile (the last one would just overwrite the former ones when the entityfile’s contents get loaded, I guess, and for entityfile entities in particular this would be a disaster).

plants

loadk plants

put plant type thingtype

put plant subsumed-by {organism}

addmember (get plants contents) plant

writefile plants

So entities of type plant are defined by the plant thingtype entity to be subsumed-by the thingtype organism. I.e. statements about organisms are also statements about plants in our formal ontology universe.

And then exactly the same,

insects

loadk insects

addmember (get insects contents) insect

put insect type thingtype

put insect subsumed-by {organism}

writefil insects

The squiggly brackets are sets as you expect; Sandewall has deliberately stuck to set theoretic notation where practical.

birds

loadk birds

put bird type thingtype

addmember (get birds contents) bird

put bird subsumed-by {organism}

writefil birds

as you can see, the only thing that matters is basically where the writefil birds is, since when that happens, everything in the contents of birds gets persisted to disk. So changes made after the writefil would not be persisted (unless there was another writefil).

Conclusion

That’s all for today, folks! We ended up doing exactly what Sandewall says is normal, and defining an ontology first (i.e., there are thingtypes {organism plant insect bird} where {plant insect bird} thingtypes are all subsumed-by the thingtype organism, all existing inside our organisms-kb ontology) and we will later use the things the ontology’s contents as vehicles for a concrete program purporting to conform to our ontology, and in our case the (lisp) source of the programs will also be inside the ontology.

While I am right about this being a formal ontology, I can imagine that I have abused the words ontology and universe a bit. Commentary on that (or other places that I don’t know I need to hear it yet) will be very welcome.

Tomorrow and over the course of the week I will flesh out this ontology and add its concrete implementation to it. Thanks everyone.

Fin.

Ontologically gentle guidance for me over on the mastodon thread as always please. Questions, conceivably.

When Sandewall’s AICA handbooks written 2010-2014 did not end up proximally unifying the field as they assayed to, Sandewall’s magnum opus we are enjoying here fell out of common knowledge. However, the formal ontology and notation with their integration as vehicles of concrete lisp programs are seeming incredibly potent to me. I think an arguement from ignorance against awareness and useages of Sandewall’s Leonardo System, sometimes styled the Leonardo calculus, if a disservice to modern formal ontology. So please do share this where and as you please, allowing that we are really just restarting the conversation about the Leonardo system now after a ten year intermission.

Oh, if you are reading this right when I am putting it online, on Wednesday’s show (i.e. Tuesday night at about 8pm in the Americas) we are having the LambdaCalculus townie give previews of their upcoming HOPE and PhreakNIC talks. Add your own pre-questions on this Mastodon thread please.

By the way, I am particularly greatful for boosts to the Mastodon threads.

See everyone back here and elsewhere soon.

screwlisp proposes kittens