Presentation is loading. Please wait.

Presentation is loading. Please wait.

Complex Reasoning with Logic Database Languages F. Giannotti 1, A. Raffaetà 2 and C. Renso 1 1 CNUCE - CNR Italy 2 Dep. Computer Science - University of.

Similar presentations


Presentation on theme: "Complex Reasoning with Logic Database Languages F. Giannotti 1, A. Raffaetà 2 and C. Renso 1 1 CNUCE - CNR Italy 2 Dep. Computer Science - University of."— Presentation transcript:

1 Complex Reasoning with Logic Database Languages F. Giannotti 1, A. Raffaetà 2 and C. Renso 1 1 CNUCE - CNR Italy 2 Dep. Computer Science - University of Pisa Italy

2 Revigis Meeting, Quebec2 Plan of the talk Spatio-temporal reasoning in GIS: The logical language MuTACLP  Informal definition of the language  Design of architecture The case study: animal behavior analysis Uncertainty handling with MuTACLP

3 Revigis Meeting, Quebec3 Activity context Study of formalisms for spatial data handling Formalisms for spatio-temporal reasoning [DeduGIS]  AIM: design of an architecture where the logic component of spatio-temporal reasoning is integrated with existing GIS technologies. Issues of imperfection (uncertainty/imprecision/qualitative reasoning) in spatial data [Revigis]  AIM: extension of existing formalisms to deal with these aspects

4 Revigis Meeting, Quebec4 The idea of the formalism modularity features in (Constraint) Logic Programming  We allow meta-level combination of knowledge represented as (constraint) logic programs. spatio-temporal representation  The logic language provides support for spatio- temporal handling.

5 Revigis Meeting, Quebec5 Modularity: Meta-Level Composition of KBs Union of Knowledge Bases KB 1KB 2 KB1  KB2  = KB 1KB 2  KB1  KB2 = Intersection of Knowledge Bases Message Passing KB1 KB2 wrt

6 Revigis Meeting, Quebec6 The spatio-temporal language MuTACLP Knowledge is represented by rules. Each atom in rules can have an annotation that represents temporal information. Each rule can have a constraint component to represent spatial objects. habitat(hares,X,Y) th [april, october] ← vegetables(oil_seed, X,Y) wrt V EGETATION,… lake(X,Y) ← X ≤ 100, Y ≥ 25, …..

7 Revigis Meeting, Quebec7 Application: Spatio-Temporal analysis of geographical data Typical geographical analysis queries: Where can a road/hospital/building be built? Find a favorable habitat for a given animal depending on the season.

8 Revigis Meeting, Quebec8 The Analysis Process The analysis process is based on the criteria used by the expert of the domain. Such criteria can be encoded as rules and grouped in knowledge bases.

9 Revigis Meeting, Quebec9 Spatio-Temporal analysis of geographical data Queries Analysis rules GIS Find the favourable habitat for an animal A in winter An area X is good for the animal A during winter if it contains vegetation Y, water and no predators

10 Revigis Meeting, Quebec10 Spatio-Temporal analysis of geographical data (cont’d) We express both queries and spatio-temporal rules in the MuTACLP language Queries Analysis rules GIS ?- habitat(animal, X) th[nov,mar] habitat(Animal,X) th[nov, mar]  vegetation(X,corn), near_water(X,100), nopredators(X)

11 Revigis Meeting, Quebec11 Architecture Logical representation of geographical data. Data are translated into a constraint data model. Invocation of GIS functions Data are kept in the GIS and system functions are invoked from the logical programs expressing analysis rules Towards the design of an integrated architecture that includes both these approaches Add a ST reasoning component to current GIS technology

12 Revigis Meeting, Quebec12 Logical Representation of Spatial Data User KB1 KB2 KB3 Analysis Rules Translation process GIS Constraint-based model 2-spaghetti model

13 Revigis Meeting, Quebec13 Direct invocation of GIS functions GIS KB1 KB2 KB3 User Mapping Primitives

14 Revigis Meeting, Quebec14 Implementation and use of the language The language MuTACLP has been implemented in Sicstus Prolog It has been used within the DeduGIS European WG to model spatio-temporal reasoning in a real application on animal behavior (in collaboration with A. Massolo of University of Siena).

15 Revigis Meeting, Quebec15 Crested Porcupine Habitat use and mating system A. Massolo University of Siena, Dept. of Evolutionary Biology OPEN QUESTIONS MATING SYSTEM: Monogamy ? Is the crested porcupine a territorial species ? If so, which are the critical resources ? Study Area: Natural Park of Maremma

16 Revigis Meeting, Quebec16 Animal localization- Radio tracking

17 Revigis Meeting, Quebec17 Data Sources and Methods ANIMAL LOCALIZATION DATA Data about localization is collected in a table that represent FIX data Fix(date, hour, Animal ID, coordinates X Y, other data of interest) DENS BIMONTHLY homing in HABITAT CHARACTERISATION Features (spatial objects) from digitised raster images Attributes from field data collection SPATIAL ANALYSES ESRI ArcView 3.1 (Spatial Analyst, Movement, etc.) ERROR ESTIMATE Trials on Radio-collars (25 positions; >400 bearings) Direction: -/+ 5°; distance: 62 m

18 Revigis Meeting, Quebec18 Spatio-Temporal Queries Deduce the localization of dens in periods of time when there is no “homing in”. Identification of the changes in home range estimates (T overlap). What are the ST relationships between individuals (sex, reproductive pairs, etc.) in contemporary fixes (15/20 minutes). ST distance (mt, dd) of individuals to ST defined events (e.g. changes in environment: rain events, cultivated lands) MuTACLP Arc View

19 Revigis Meeting, Quebec19 An Example of ST Query in MuTACLP Deduce the localization of dens in periods of time when there is no “homing in”. An animal is inside or very close to the den during the day and at dawn/sunset User Expert

20 Revigis Meeting, Quebec20 An Example of ST Query in MuTACLP (cont’d) Analysis prob_den(Id,Rad,Prob,L) in [T1,T2] :- possible_loc(Id,Lloc) in [T1,T2], neighbour_list(Lloc,Rad,Prob,L). possible_loc(Id,Lloc) th [T,T] :- constr(( findall(loc(X,Y), demo(dataPor+sun+aux,(fix(Id,X,Y,Hour) th [T,T], dawn_sunset(Hour)th[T,T])), Lloc))). Query ?- prob_den(Id, Rad, Prob, L) th [T,T] Knowledge is structured in different programs

21 Revigis Meeting, Quebec21 An Example of ST Query in MuTACLP (cont’d) Sun dawn_sunset(Hour) th [T,T] :- light(D,S) th [T,T], constr((T1 is T mod 365+1)), between_ds(D,S,Hour). light(25470,63910) th [[1,1,1998],[31,1,1998]]. light(25530,62820) th [[1,12,1999],[31,12,1999]]. dataPor fix(f1,62060.0,1669490.0,4724115.0) th [[01,01,1998],[01,01,1998]]. fix(f3,62120.0,1669740.0,4724100.0) th [[01,01,1998],[01,01,1998]].

22 Revigis Meeting, Quebec22 Aim: to experiment standard GIS technologies to deal with spatio- temporal applications - Porcupine Software: Arc View 3.1 (ESRI) + Spatial Analyst + Movement (USGS Alaska) Developed with the Arc View script language Avenue Allows the programmer to personalize the Arc View application (menu…) and offers some primitives to manipulate (spatial) data As expected, it offers Efficient spatial computation and good visualization features...but… Programming ST queries in Avenue is extremely complex because of the lack of high level programming primitives It is an on-going work of A. Brandini for his Master thesis. Experimenting Arc View in Porcupine Application

23 Revigis Meeting, Quebec23 Uncertainty and Qualitative Reasoning Our activity in Revigis follows three main directions:  Uncertainty handling: Use of the annotation framework to express deductive rules with levels of certainty (fuzzy logic).  Revision/amalgamation issues: The composition mechanism already provides forms of merging or updating, (preference on atoms - amalgamation by Subrahmanian). Study how to handle conflicts.  Qualitative Reasoning: Investigate how to represent with this formalism the qualitative “nearness” relation introduced by Mike Worboys.

24 Revigis Meeting, Quebec24 Uncertainty handling with annotations ACL language: Annotations instantiated to elements of uncertainty lattices Lattice ([0,1],  ) represents fuzzy logic Each numeric annotation represents degree of certainty of the atom. den(m15, X, Y):0.3 means that a den for animal m15 is a location X,Y with 0.3 level of certainty. This language has an immediate implementation by means of a meta-interpreter.

25 Revigis Meeting, Quebec25 Example rain:0.9 <- grass_wet:0.8 rain: V <- clouds:V grass_wet:1.0 <- clouds:0.5 <- If we want to know which is the certainty level of rain, we ask the system the query ?- rain: V We obtain the answer V = max(0.9,0.5)

26 Revigis Meeting, Quebec26 Conflict handling The composition mechanisms offer a way to combine knowledge represented in several knowledge bases. What about possible conflicts? Conflicts can arise: information has different certainty levels in different KBs Inconsistent information coming from different KBs

27 Revigis Meeting, Quebec27 Example KB1 rain:0.9 <- grass_wet:0.8 rain: V <- clouds:V grass_wet:1.0 <- clouds:0.5 <- KB2 rain:0.3 <- humidity:0.1 humidity:0.1 <- rain:max(0.9,0.5) rain:0.3 Query rain:V ?

28 Revigis Meeting, Quebec28 Definition of conflict handling policies Combination of annotations to define the conflict resolution policy The most certain: Max The less certain: Min Both: Average Give more relevance to one data source respect to the other one: weighted average Example rain:max(V1,V2) <- rain:V1 wrt KB1, rain:V2 wrt KB2 rain:V<-V=op(V1,V2), rain:V1 wrt KB1, rain:V2 wrt KB2

29 Revigis Meeting, Quebec29 Towards qualitative reasoning Nearness relation proposed by M. Worboys This relation is characterized by weak forms of symmetry and transitivity Three approaches have been proposed to model experimental data: Three-valued logics (T,N,F) Fuzzy logics Four-valued logics (T, N, B, F) We are investigating how to represent both the relations and the models in our language to provide a reasoning mechanism

30 Revigis Meeting, Quebec30 Applications Flood application We are studying how to represent the Flood application in Constraint Logic Programming (with uncertainty?) Other applications to test our MuTACLP formalism???


Download ppt "Complex Reasoning with Logic Database Languages F. Giannotti 1, A. Raffaetà 2 and C. Renso 1 1 CNUCE - CNR Italy 2 Dep. Computer Science - University of."

Similar presentations


Ads by Google