< ^  >

Example Animal Query #4

Query:

  Find scenes where some animal passes through region R.

Strategy:

  • define operation for "passes through"

  • select scenes that contain at least one animal doing this

Expressed as:

  PassThrough = [ (disjoint,?,?) .. (~contains,?,?) .. (disjoint,?,?) ]

  [ S | S <- AnimalDB,
        exists [ A | A <- Objs(S), S.st-seq(A,R).matches(PassThrough) ]
  ]


< ^  >