示例#1
0
文件: core.py 项目: gsanou/pyontutils
 # for example a word count for a document?
 # I guess all implementations of symbolic systems are physical
 # and ultimately the distinction between symbolic and physical
 # isn't actually useful for aspects
 # we do however need a notation of bottom for aspects which
 # says that for certain inputs the aspect cannot return a
 # meaningful (correctly typed non null) value
 (asp.Local, owl.disjointWith, asp.nonLocal),
 oc(asp.Local,
    ilxtr.aspect),  # aka unqualified or does not need qualification
 olit(asp.Local, rdfs.label, 'aspect unqualified'),
 olit(asp.Local, definition,
      'aspect of thing that is invariant to context'),
 oc(asp.nonLocal, ilxtr.aspect),  # qualified
 olit(asp.nonLocal, rdfs.label, 'aspect qualified'),
 oc_(asp.nonLocal, restriction(ilxtr.hasContext, BFO['0000002'])),
 # FIXME context isn't just the material entity it is the aspects thereof
 # the context probably also needs to be a technique that binds all
 # intersectionOf for multiple aspects? hrm
 # the additional aspects?
 # context dealt with below
 # binding a nonLocal aspect to a single entity will
 # lead to construction of a context
 olit(asp.nonLocal, definition,
      'aspect of thing that varies depending on context'),
 oop_(hasParticipant,
      propertyChainAxiom(ilxtr.processHasAspect, ilxtr.hasContext)),
 restG(
     blankc(owl.onProperty, ilxtr.hasPrimaryAspect_dAdT),
     blankc(owl.someValuesFrom, ilxtr.nonZero),
     blankc(rdfs.subClassOf,
示例#2
0
    (ilxtr.resultAspect, rdfs.range,
     ilxtr.aspect),  # these are preferably units?
    odp(ilxtr.resultValue),
    oop(ilxtr.hasResult),  # or hadResult ...
    (ilxtr.hasResult, rdfs.subClassOf, prov.generated),
    (ilxtr.hasResult, rdfs.domain, ilxtr.protocolExecution),
    # FIXME this domain restriction may not work quite like we want it to
    # ideally we would like to take an instance of a material entity + an aspect
    # and bind the result to that pair, with some additional sematics outside owl
    # you could use [ a protc:Result; protc:onAspect asp:myAspect; protc:resultValue 100; protc:impl <some impl id>; protc:prov <id>]
    # we could then and lift that to [ a owl:Restriction; owl:onProperty asp:myAspect; owl:hasValue 100]
    # or we could create a new iri from the intersection of the aspect and the implementation or better yet the execution prov id ...
    (ilxtr.hasResult, rdfs.range, ilxtr.result),
    oc_(
        ilxtr.protocolExecution,
        oec(ilxtr.technique,
            *restrictions((ilxtr.isConstrainedBy, ilxtr.protocol), )),
    ),
    (ilxtr.protocolExecution, rdfs.subClassOf, prov.Activity),
    olit(ilxtr.protocolExecution, rdfs.label, 'protocol execution'),
)

triples += (  # material entities

    ## material entity
    (ilxtr.materialEntity, owl.equivalentClass, BFO['0000040']),
    oc_(ilxtr.materialEntity, restriction(ilxtr.hasAspect, asp.livingness),
        restriction(ilxtr.hasAspect, asp['is'])),
    oc(ilxtr.compositeMaterialEntity, ilxtr.materialEntity),

    # more real than real