[Biojava-dev] ontologies
Matthew Pocock
matthew_pocock at yahoo.co.uk
Tue Sep 30 14:06:48 EDT 2003
Hi,
I've spent the last 2 days working on the ontology support. Nothing is
in CVS yet as I'm not sure if any of it is correct. I've done the following:
* TripleTerm now refers to a Term, not a subject, object, predicate triple.
* I'm incrementally bulking out OntologyOps as I identify bottlenecks.
* I've added a sablecc grammar and a parser for a simple sop language. I
will paste an example below. People may object to sablecc, so this is
one of the major reasons for not commiting yet
* I've defined the core rules of sets, lists, inheritance, binary
relations and agregate functions (e.g. for_each) in a core ontology.
This made my head hurt, and is bound to be buggy.
* There is now an ontology of all integers - we will need to mix in
operators over these. I will add an ontology of all strings soon.
Next, I will start work on the interpreter / inference engine / therome
prover. This is where everything may go wrong - but what can you do. If
you are interested in this stuff, please tell me - it's getting lonly
working on this alone.
Matthew
* Comments are in {} and can follow any identifier.
* Concrete entities are given names starting with a letter
* Terms are introduced as expressions containing just the term name
* Triples (and possibly triple terms) are introduced as
predicate(subject,object) where subject or object may be triples themselves
* Variables (things we will pattern-match) start with an underscore, and
are implicitly scoped to the expression they are in.
* All expressions resolve to boolean values - there is no way to
'return' a value.
* All expressions are statements of fact. They are axioms that do hold.
All data is entered as axioms.
------ how isa & instanceof relate to one another
------ in reality this probably lives
------ in the core ontology deffinitions
isa { inheritance of types - equivalent to sub-set I guess }
instanceof { an instance of a type - equivalent to set membership }
implies { Transitive closure }
(and(isa(_X, _Y), and(isa(_Y, _Z)),
isa(_X, _Z))
implies { How instanceof and isa play with each other }
(and(instanceof(_x, _X), isa(_X, _Y)),
instanceof(_x, _Y))
------ this is some biology - we use isa and
------ instanceof here to represent some knowledge
haemaglobin { Proteins that bind haem and are used to transport oxygen }
globin { Proteins that are globular-ish }
protein { Poly-peptides with some structure }
human-alpha-haemoglobin { The human alpha-haemoglobin protein }
isa(haemoglobin, globin)
isa(globin, protein)
instanceof(human-alpha-haemoglobin, haemoglobin)
------ Now we can assert the truth of statements
isa(haemoglobin, protein)
-> true
instanceof(human-alpha-haemoglobin, protein)
-> true
isa(protein, human-alpha-haemoglobin)
-> false
------ Or perhaps pattern-match
isa(_thing, protein)
-> isa(protein, protein),
isa(globin, protein),
isa(haemoglobin, protein);
_relation(human-alpha-haemoglobin, globin)
-> instanceof(human-alpha-haemoglobin, globin);
_relation(globin, human-alpha-haemoglobin)
-> ;
More information about the biojava-dev
mailing list