II Ol B n c 0 Informatica An International Journal of Computing and Informatics Spatial Data Management The Slovene Society Informatika, Ljubljana, Slovenia I-.H h- -4,' n! ■if ' '- ' - : ' f ! h' f I • i i; t il- Informatica An International Journal of Computing and Informatics Basic info about Informatica and back issues may be FTP'ed from ftp.ames.si in magazines/informatica ID: anonymous PASSWORD: FTP archive may be also accessed with WWW (worldwide web) clients with URL: http://www2.ijs.si/"mezi/informatica.html Subscription Information Informatica (ISSN 0350-5596) is published four times a year in Spring, Summer, Autumn, and Winter (4 issues per year) by the Slovene Society Informatika, Vožarski pot 12, 1000 Ljubljana, Slovenia. The subscription rate for 1999 (Volume 23) is - DEM 100 (US$ 70) for institutions, - DEM 50 (USS 34) for individuals, and - DEM 20 (US$ 14) for students plus the mail charge DEM 10 (USS 7). ■ Claims for missing issues will be honored free of charge within six months after the publication date of the issue. Tech. Support: Borut Žnidar, Kranj, Slovenia. Lectorship: Fergus F. Smith, AMIDAŠ d.o.o., Cankarjevo nabrežje 11, Ljubljana, Slovenia. Printed by Biro M, d.o.o., Žibertova 1, 1000 Ljubljana, Slovenia. Orders for subscription may be placed by telephone or fax using any major credit card. Please call Mr. R. Murn, Jožef Stefan Institute: Tel (+386) 61 1773 900, Fax (+386) 61 219 385, or send checks or VISA card number or use the bank account number 900-27620-5159/4 Nova Ljubljanska Banka d.d. Slovenia (LB 50101-678-51841 for domestic subscribers only). According to the opinion of the Ministry for Informing (number 23/216-92 of March 27, 1992), the scientific journal Informatica is a product of informative matter (point 13 of the tariff number 3), for which the tax of traffic amounts to 5%. Informatica is published in cooperation with the following societies (and contact persons): Robotics Society of Slovenia (Jadran Lenarčič) Slovene Society for Pattern Recognition (Franjo Pemuš) Slovenian Artificial Intelligence Society; Cognitive Science Society (Matjaž Gams) Slovenian Society of Mathematicians, Physicists and Astronomers (Bojan Mohar) Automatic Control Society of Slovenia (Borut Zupančič) Slovenian Association of Technical and Natural Sciences (Janez Peklenik) Informatica is surveyed by: AI and Robotic Abstracts, AI References, ACM Computing Surveys, Applied Science & Techn. Index, COMPENDEX*PLUS, Computer ASAP, Computer Literature Index, Cur. Cont. & Comp. & Math. Sear., Current Mathematical Publications, Engineering Index, INSPEC, Mathematical Reviews, MathSci, Sociological Abstracts, Uncover, Zentralblatt für Mathematik, Linguistics and Language Behaviour Abstracts, Cybernetica Newsletter The issuing of the Informatica journal is ßnancially supported by the Ministry for Science and Technology, Slovenska 50, 1000 Ljubljana, Slovenia. Post tax payed at post 1102 Ljubljana. Slovenia taxe Percue. Introduction: Special Issue on Spatial Data Management Guest Editors: Frederick E. Petry Department of Electrical Engineering & Computer Science Tulane University New Orleans, LA 70118 petrySeecs.tulane.edu Maria A. Cobb Department of Computer Science & Statistics University of Southern Mississippi Hattiesburg, MS 39406-5106 maria.cobbOusm.edu Kevin B. Shaw Digital Mapping, Charting & Geodesy Analysis Program Mapping, Charting k Geodesy Branch Naval Research Laboratory Stennis Space Center, MS 39529 shawSnrlssc.navy.mil leads to the development of a new interpretation of the database projection operator. The second set of papers provides techniques for processing and modeling spatial data. The first paper by Havran provides a new approach for memory mapping of binary search trees that can improve spatial locality of data and thus spatial query performance. In the next paper by Chung and Wu, some improved spatial data structure representations including linear quadtrees are presented. These representations are shown to have better compression performance. Finally, the paper by Forlizzi and Nardelli describes the lattice completion of a poset to model spatial relationships. They prove some of the needed conditions for valid intersection and union relations among spatial objects with this representation. This special issue of Informatica focuses on several research topics in the area of spatial data management. Spatial databases have developed as extensions to ordinary databases in response to rapidly developing applications such as Geographic Information Systems (GIS), CAD systems, and many multimedia applications. These applications dictate the need for (1) additional data types, including point, line and polygon; (2) spatial operations such as intersection, distance, etc.; and (3) the ability to handle some combination of objects (vector data) and fields (raster data). The nature of spatial data requires multi-dimensional indexing to enhance performance, and much research has been devoted to this topic. The first set of papers in this issue provides descriptions of extensions to the standard functionality in GIS databases. In particular, these first three papers discuss extensions for space-time visualization, sound as a spatio-temporal field and the inclusion of network facilities in a. GIS. A reahzation of visual aspects of the space-time conceptual framework of Hagerstrand is discussed in the first paper by Hedley, Drew, Arfin and Lee. They demonstrate one of the first examples of an implementation of this approach and provide a real-world case study of visualizing worker exposure to hazardous materials. In the second paper (Laurini, Li, Servigne, Kang) a field-oriented approach to auditory data in a GIS is described. The special semantics of auditory information are presented and some techniques for indexing of such data are indicated. The third paper in this set adds additional levels of abstraction to extend the semantics of GIS networks. The authors, Claramunt and Mainguenaud, then show this Hagerstrand Revisited: Interactive Space-Time Visualizations of Complex Spatial Data Nicholas R. Hedley*, Christina H. Drew**, Emily A. Arfin** and Angela Lee* *Department of Geography and National Research Center for Statistics and the Environment, University of Washington, Seattle, WA 98195-3550, USA. **Department of Geography, University of Washington, Seattle, WA 98195-3550. Phone: USA-h 206 616 3409 E-mail: nix@u.washington.edu Keywords: visualization, spatial databases Edited by: FYederick E. Petry, Maria A. Cobb and Kevin B. Shaw Received: December 1, 1998 Revised: May 28, 1999 Accepted: April 15, 1999 Technological advances have rapidly changed the nature of spatial analytical tools in recent years. A tendency is for tool development to outpace theoretical and conceptual development. Occasionally, some conceptual frameworks must await the arrival of tools that can operationalize the elegance and sophistication they embody. This paper calls for reconsideration of a conceptual framework introduced by Hagerstrand (1970). It has taken until the late 1990s for tools appropriate for implementation of Hagerstrand's framework to develop, so that we may apply it in a meaningful and accessible manner that is grounded in pragmatic applications. This paper shows that the visual component of Hagerstrand's space-time conceptual framework may now be oper-ationalized, using advanced spatial analytical visualization techniques. We demonstrate a robust visual representation, its value in a real-world case study, and discuss the potential for future applications of this technique. A key theme in this work is that the fusion of space-time conceptual frameworks and appropriate spatial analytical visualization techniques (such as GIS) can make signifìcant progress in facilitating user access to spatial data bases (in terms of understanding the data, as well as physical access). This is necessary to foster more democratic processes in collaborative settings. The project described in this paper meets that challenge, and appears to be the fìrst example of an implementation that explicitly attempts to bridge this gap. 1 Introduction This work demonstrates the potential of space-time visualizations as a powerful tool for facilitating user ac- Spatial databases are powerful tools. When paired databases. Space-time representations with rigorous spatial analysis, new understandings ^^ implemented m a manner tha reflects the visual J -11 • J X J I, component of Haeerstrand s (1970) conceptual frame- 01 previously unknown or misunderstood phenomena , . ° . ,, ., ,, ^^r, ^ , . may be gained. Spatial data are widely used in re- commercially-avaüable GIS (geographic search and commercial settings. This is facilitated by ^^t^^n system) software. This work suggests that ^ . r J i r the use or this approach to representing information ongoing improvements m the performance and cost of , , . , ,, . ,,7 , . , ■ , , J ri. J • • has value m real-world settings. We suggest that this computer hardware and software, and an increasing , , . , , . , . r J.. r ,. ,11 1 -, approach has particular value m the representation oi acceptance oi information technology by society. . , , , . ^ , . , . interactions between mobile and stationary objects in However, while tool development has progressed, multiple levels of abstraction of time and space. This the greatest advances are to be made where a fu- work is one of the first projects to fuse Hagerstrand vision of technological and conceptual innovation occur, guai space-time concepts, advanced spatial analytical In the geographic domain, a clear conceptual innova- tools, and a contemporary real-world application. Fition occurred in 1970, when Torsten Hagerstrand in- nally, this work shows a methodological approach that troduced his space-time geography concepts (Hager- ^ay enhance spatial databases accessibility by users strand, 1970). This paper discusses the elegance and in both expert and non-expert domains, utility of Hagerstrand's framework, how it was appropriated, and also why its implementation was not as frequent as it might have been. 2 Time Geography - A Neglected Framework Torsten Hagerstrand (1970) is known in geography for research in spatial diffusion processes (Mark, 1997). His most lasting contribution to geography is known as 'time geography'. Associated with spatial diffusion processes, the space-time framework provides a conceptual framework of space and time as (limiting) constraints on spatial interaction and accessibility (Miller, forthcoming; Mark, 1997; Hagerstrand, 1970). In 1970, Hagerstrand presented "space-time prisms", as a component of new time-geography conceptual frameworks . Lenntorp (1976), Parkes and Thrift (1980), Miller (1991), Chai and Wang (1997), Chrisman (1997) and Mark (1997) acknowledge its value as a means to conceptuahze space and time. While the framework had great potential, actual implementations were infrequent (Miller, 1991). By 1998, they numbered less than ten. Of those ten, the majority aim to develop methodological tools to predict spatial diffusion ba^ed on alternative constraint models. Insufficient work has been done on the descriptive visualization of spatial data in the context of space-time representation. 3 Purpose and Function of the S pace-Time Framework Hagerstrand's (1970) approach joins space and time in a reference system for phenomena.: "...we need to understand better what it means for a location [or individual] to have not only space coordinates but also time coordinates." (Hagerstrand, 1970: p.9-10). A more recent articulation of space and time (based on time-geography), is: "Time and space act as containers of the material world; thus space and time are external or absolute." (Chrisman, 1997). Hagerstrand's framework has a highly visual conceptual design. Geographic space is collapsed into a two-dimensional plane, and the vertical (z) dimension represents time (increasing with height). It is in this setting that he proposed the representation of interacting life histories of individuals (Mark, 1997). Hagerstrand's framework (1970) proposed the representation of 'paths' of mobile objects through space and time (see Figure 1 (i)). Focusing on spatial diffusion models, he extends this to 'space-time prisms', where a space-time volume bounds the maximum extent of all space-time paths of an individual based on space, time and accessibility constraints (Figure 1 (ii)). The space-time 'prism' is acknowledged as a central idea in time geography (Mark, 1997). Space-time prisms have been applied in spatial diffusion, transportation, and planning settings (Miller, 1999; Kwan 1998; Kwan and Hong, 1998; Miller, 1991; Lenntorp, 1978). Its use of space-time prisms is most beneficial in predicting individuals' behavior and potential for movement in space, in the face of constraining factors. The research presented here focuses on space-time trajectory visualization as a mechanism by which the spacetime interaction of individuals in a real-world geographic space may be described. The adoption of Hagerstrand's framework has been infrequent in the literature. Although much of the work done has great utility to measure, calculate, and predict individual movement based on constraining factors in an environment, examples are needed to demonstrate the value and utility of space-time representation for the communication of complex spatial data in applied settings. While the framework was acknowledged as both powerful and elegant (Miller, 1999), a challenging duahty also surrounded the framework. Allen Pred (1977) articulated this concern, while addressing the time-geography concept as a whole: "...the time-geography framework is at the same time disarmingly simple in composition and ambitious in design." (Pred, 1977). At the time of their introduction, space-time representations, while innovative and elegant, represented a major challenge to implement. The framework was highly visual and was commonly depicted as a perspective (or "2.5-D") sketch as shown by Figure 2, above. Perspective representations give the impression of three dimensions, by projecting three dimensions onto two. So, the space-time illustrations of Lenntorp (1978), Parkes and Thrift (1980), and Chrisman (1997) (see Figure 2) are 2.5-D representations. This is problematic. While the concept developed by Hagerstrand is useful, depiction of space-time trajectories has typically been presented as a perspective sketch (Chrisman, 1997). While skilled artists may be able to give perspective (2.5-D) views, this approach makes some significant assumptions about the audience's ability to extract meaning from the diagram. These assumptions might include user experience with technology, information representation, or perhaps perceptual differences. In the version found in Chrisman (1997: 7, displayed in Figure 2 in this paper), where is the route taken by the woman on the bicycle with the child? Which objects move along which vectors? How do the movement vectors relate to possible routes in the road network shown. It is simply not clear or easy to determine this. An inherent Umitation of 3D-to-2D projections is that information will invariably be lost. This difficulty must be resolved in order for the full utility of space-time representation to be seen. Space-time implementations using Hagerstrand's (1970) space-time conceptual framework have been infrequent in the literature. This appears to be largely (U a • iH Eh (D a • «H h dj a • ^ H ipace (i) (ii) (iii) Figure 1: Principle space-time trajectory (i) and prism (ii) concepts, and application of trajectories to collocation (iii). Note: i and ii redrawn based on Miller (1991, p.290). due to technical and technological difficulties in op-erationalizing the framework in a form that truly reflects the source concept (Mark, 1997; Pred, 1977). The examples that do exist in the literature (Miller, 1999; Miller, 1991; Lenntorp, 1976; Lenntorp, 1978; Kwan, 1998; Kwan and Hong, 1998) appear to focus on predictive, calculative modeling applications in the research domain (versus applied real-world settings). Our response to this challenge is to produce manip-ulable dynamic 3D space-time visual representations. Three-dimensional representation is not an adequate response on its own. For to respond only with static 3-D would be to effectively produce the same end product but with a different generative procedure. To fully employ the power of Hagerstrand's conceptual framework, we employed 3-D representation tools in which the user can move around and visually query the objects in view. This is especially useful to examine objects that appear to float or are difficult to locate in space-time (such as the bicycle in Figure 2). 4 Case Study: A Recent Implementation based on Hagerstrand Objectives. This research focuses on visualizing the space-time paths of workers and their exposure to radiological waste at Hanford Reservation, using the visual component of Hagerstrand's conceptual framework (Hagerstrand, 1970). The practical application of this is to allow a diverse stakeholder audience to understand the vulnerability of workers as they move about a site during spent nuclear fuel cleanup and relocation activities. The primary target user group of these visualizations are human resource managers (those who plan the roles, tasks and movements of workers in the cleanup process at Hanford). Substantive challenge: Visualizing worker exposure to hazardous material The Hanford Nuclear Weapons Production Facility (known as the 'Hanford Site') is a former nuclear weapons manufacturing facility that occupies approximately 560 square miles in south-central Washington State, in the Northwest of the United States. Prom 19431989 Hanford produced weapons grade plutonium for nuclear weapons. In 1989, with the end of the Cold War, the mission of Hanford was dramatically changed from plutonium production to Waste Management (safe disposition of residual radioactive materials) and Environmental Restoration (clean-up of the contaminated areas on the site) (http : / / www .hanford. gov/top/welcome .html, 1998). The cleanup effort at Hanford is a highly complex human and environmental resources management system. By definition the project necessitates the production and dissemination of complex interrelated spatial and temporal information to range of end-users. This work focuses on the lOOK area which is located close to the Columbia River (see center of. Figure 3). Preparations are underway to move spent nuclear fuel rods from the lOOK to the 200 East site, to reduce risks of environmental contamination due to the encroaching water table close to the Columbia River. A key element of planning, strategy and evaluation for the lOOK to 200 East project is to determine expected CWJADfv Washington State Figure 3: Map showing location within Washington State, map of the Hanford Reservation (center), and its representation in a 3D GIS (right). radiological exposure for workers at all stages and locations of the spent nuclear fuel relocation process. The location and character of radiological hazards at Hanford is information which must be accessible to a range of end users, or 'stakeholders'. Stakeholders include (but are not hmited to) research scientists, decision and policy makers, and interested and affected public groups alike. There is a distinct need to move towards a situation in which information from data may be presented to audiences in a variety of settings. Such settings might include round-table 'openness' meetings of technical specialists, interested and affected parties, decision and policy makers. Alternatively, information may be disseminated within each of these primary stakeholder types. A fundamental concern at Hanford is communication of information. As a result, information architecture that facilitates the efficient transmission of information within and between groups is a major interest. This is particularly critical at Hanford, as a very diverse range of stakeholder groups (including government, research and public interest groups) uses information. This work focuses on a particular case study at Hanford (worker paths) to demonstrate the value of operationalizing Hagerstrand's space-time representation. This has significant potential to foster semantic consistency in and across diverse information user groups. Conceptual Basis. Employing Hagerstrand's (1970) space-time path concept, we can visualize the space-time trajectories of workers, groups and spatial entities (objects that have a spatially-located compo- nent, including people, buildings. Spent Nuclear Fuel handling rooms). More significantly, we may analyze the space-time intersections of people and radiological hazards. The space-time path (or trajectory) approach is particularly significant for the Hanford case study. By being able to co-locate the space-time paths of workers and the spatial entities they interact with, we may quickly understand and communicate the character of their exposure at locations with known radiological doses. The cumulative radiation dose received by an individual is determined primarily by location relative to source, and duration of exposure. Using space-time trajectories, we may represent data and information in a way that makes their space-time relationship explicit. This allows us to express often difficult to access data in a form that requires less 'unpacking' (such as how data from a specific table relate to a management report of worker behavior). The data for worker exposure to radiological hazards have not to our knowledge been brought together in this manner previously. By identifying the trajectory segment that represents a given individual's co-location with a known hazardous source, we may quickly see the spatio-temporal intersection of the two (see Figure 4, below). 5 Data and Tools Data were acquired from a variety of sources in order to develop the 3D GIS representation of the Hanford Reservation, the Department of Energy buildings, the radiological exposures associated with specific build- Space-time path of worker Space-time path of building with ktuDwn radiation dose chaiacteiistics ^ Worker rnoving within/exiting building Worker stationary within bvuMing Worker enteringf moving within building Building 'footprint' Figure 4: Applying Space-Time Trajectory Concept to Radiological Hazard Exposure. ings, and finally the prescribed route of a generalized worker. Bechtel Hanford Ine, the Hanford site contractor for Environmental Restoration (remediation/cleanup of contaminated areas), maintains the Hanford Geographic Information System (HGIS) and has made it available to the public through their internet site. Also, the Hanford Remedial Action Environmental Impact Statement, available on CD-ROM, represents the best publicly available characterizations of Hanford's environmental conditions. We also obtained the Radiation Exposure System, which contains historical radiation dosimetry data for over 150,000 people who have worked at the Hanford site. Several text-based reports were also used to develop the worker trajectory and the databases that corroborated it. They include the Spent Nuclear Fuels Operational Staffing Plan, The Spent Nuclear Fuels/Idaho National Environmental Engineering Laboratory Environmental Impact Statement, The Waste Inventory Data System, and the Columbia River Comprehensive Impact Assessment (see Data Sources at the end of this document). The tools employed for this research included a single SOOMhz Pentium class desktop computer equipped with 64MB RAM. The software used was Environmental Research Systems, Inc.'s Arc View GlS(tm) version 3.1, plus the software extension Ar-cView GlS(tm) 3D Analyst(tm). 6 Method The visualization of a space-time trajectory for workers in the lOOK area at Hanford was developed from a model day "scenario" for workers handling spent nuclear fuel in the 105KE building. This scenario was developed based on interviews with members of the Consortium for Risk Evaluation with Stakeholder Participation (CRESP) personnel based at Richland , Washington, and integrated with an existing set of GIS data using Arc View GIS( 3.1. Each worker 'behavior' (such as "walk from A to B along route X") was associated with line and/or polygon features from existing data in Arc View GIS( shapefiles. This was done in order to preserve the shape and orientation of transportation routes especially (so that the space-time trajectory did not end up being straight-line vectors between floating z-value points). A time index for a given behavior (such as moving an object from location A to location B) was added to this data. Due primarily to the fact that the ArcView GIS( extension 3D Analyst ( is relatively new and that »-«»»J.ti livw.tWfi«»&nrM'.s ftdSäJl. Figure 2: Illustration in Chrisman (1996) providing a conceptualization of space-time trajectories. Note: this diagram was redrawn from Parkes and Thrift (1980), which itself was based on Lenntorp (1978).Courtesy of John Wiley & Sons. this research approach adopts a specialized conceptual framework, implementing the space-time trajectory visualization using this package required creativity to sidestep the package's limitations. A distinct challenge was the vertical sections of the space-time vector. One possibility in 3D Analyst( was to create a surface from data, bring it into a project view as a theme, then to drape a vector theme over the surface as a 3D shapefile. Making the surface transparent (invisible) would result in the illusion of the remaining vector hovering above the x, y geographic plane. This approach is problematic. The main problem has to do with a worker using the same x, y route at different times (z-values) during the course of the period represented. While a worker route that never crosses an earlier segment can be represented using the surface-draping technique described earlier, it is very difficult to implement this for instances where the same routes are used at different times. Using the procedure just described, problems are quickly encountered when one surface is superimposed on another. The solution to these implementation problems was to decompose the task duration information (from the CRESP interviews) into minute-by-minute elements. For each time step, a z-value was associated. This allowed the derivation of individual vector segments for each minute spent by workers in that location. The result was the ability to 'stack' vector segments on top of each other, according to the space-time already derived in the *.dbf file. The theme table for the resulting shapefile ended up having over 600 records, each corresponding to one minute of time in a worker's day. In this section, the visualization products produced in Arc View GIS( 3D Analyst ( are presented in a logical sequence that reflects the movement of workers through time and space according to the data gathered from CRESP personnel interviews. 7 Results of Implementation The result of our work is the visualization of a generalized 'worker' trajectory based on prescriptive guidelines laid down by management at Hanford. The trajectory exists in a full-color 3D GIS environment that may be dynamically explored by the movement of the user using Arc View GlS(tm) 3D Analyst(tm). The reproductions presented here are illustrative, and readers are encouraged to contact the primary author for color imagery and demonstrations of the dynamic environment. The appearance of the worker trajectory in the space-time visualizations shown must be explained. Reconstruction and representation of the physical landscape and the structures on it (such as buildings) at Hanford is straightforward from the sources already mentioned in the Data and Tools section. Data on the space-time behavior of specific worker roles is far harder to come by. There is no formal data produced to track worker behavior in Hanford project tasks. As a result, the worker trajectory seen in the case study shown had to be constructed from information given by Hanford personnel management, during interviews via email. This information was limited in that it gave no indication of rates of movement. The information only indicated locations and route segments within which a worker would be during a given stage of a shift. The appearance of the trajectory - that of vertically 'extruded' trajectory segments - results from temporal aggregation inherent in the information extracted from personnel manager interviews. On the right side of Figure 3, we see an obliqueangle view of the Hanford Reservation. This image was produced to provide readers with a modest introduction to the appearance of objects in 3D Analyst(. This view demonstrates the ability to fairly realistically represent the 'lay of the land' at Hanford, using an elevation model over which objects are draped and encoded. Figure 5 (above) presents the main section of the space-time trajectory. The time is the vertical (z) axis. Figure 5: Worker Space-Time trajectory entering lOOK area at Hanford. The additional white arrows indicate the space-time 'flow' of the worker trajectory. There are some interesting features to note here: — One can see the difference in time taken (vertical dimension of trajectory segment) to get from the Hanford entrance (off image, to the right) to the entrance of the lOOK area (Figure 5, item i), compared with the time taken to get from the lOOK entrance to the parking area (Figure 5, item ii). This is a good illustration of the logic structure operating in our implementation of Hager-stand's visual components using Hanford management infirastructure-based worker information. We were provided only a generalized account of : worker movements around the lOOK area. As a result of this, it was only possible to represent this in terms of time spent by a worker in a given route segment or building based on typical time taken to complete the entire task at/in that location. This explains the abrupt transitions between adjacent space-time trajectory segments. - Along the left edge of the image, we see the main portions of a worker's day. Prom the parking lot (the right-hand green area), the workers follow the magenta surface route to the 105KE building, via offices and dressing area. The thick trajectory segment that joins with the bottom of the vertical space-time trajectory structure reflects this latter transition. In this vertical segment of the trajectory, we see the workers' first main shift of the day represented by the first segment of the trajectory (a 3-hour shift, item iii in Fig. E). The slight displacement to the right, half-way up the vertical stretch (item iv, Fig. E), indicates workers dressing down, going to lunch, and dressing up again ready for the afternoon shift (2 hours and 20 minutes). Note the stability of location in space during the main shifts of the day. Next, workers are debriefed and make their way to the parking lot and then to the entrance of lOOK. Figure 6 (above) completes the day's space-time-trajectory for a worker, joining the lOOK area with the Hanford entrance along the previously traveled route. Note the spatial (x, y, z) relationship between the entry space-time trajectory segment (lower) and the departure space-time trajectory segment (upper). This illustrates the problem of using the same path in space in two or more different time periods discussed earlier. Up until this point, we have shown the construction of the workers' space-time trajectory. The images in figures E and F begin to demonstrate the power of adopting the space-time representation in identifying the spatio-temporal relationship between workers and potential exposure to hazardous material. Figure 6; Complete Space-Time Trajectory for one worker). The fifth image (Figure 7, above left) shows the addition of the space-time trajectory of the 105KE building, where workers spent most of their working day. Notice that the worker trajectory remains within the 105KE trajectory volume for a lengthy period. This represents the workers' vulnerability to hazard exposure for this duration. The next image (Figure 8, above right) does not represent the trajectory of 105KE (though it is still there). The green volume represents the space-time trajectory of the spent nuclear fuel handling room within the 105KE building. However, notice that examination of the intersection of the worker trajectory and the handling room trajectory reveals that more of the worker time is spent in the handling room than is spent in the 105KE building alone. We know that worker vulnerability to hazard exposure is greater in this area than in the general 105KE building. This visualization approach is useful to express this difference. Combining radiological dose for this particular building and area with space-time information allows us to observe space-time intersections of workers with areas of different radiological exposure within the same building. This can be seen in Figure 9 (above). The space-time trajectory of workers passes through the 105KE building, but while inside, it also passes through the spent nuclear fuel handling room. This is a highly significant application for determining cumulative worker exposure, and understanding the space-time composition of that exposure. Finally, Figure 10 (above) visualization work provides a sense of the relative proportions of the space-time trajectory for workers at the lOOK area with respect to the larger Hanford landscape. 8 Discussion Visualization in 3D GIS The images shown in this paper do not do justice to the real environment in which this space-time visualization has been conducted. Using the mouse, a user may freely navigate through all environments shown in these images, viewing them from any angle. We suspect that the ability to manipulate rotation about three axes is more powerful for information exchange than previous static, perspective, non-3D space-time depictions. The ability to interactively switch themes (essentially objects) in the view on and off allows focused subsets of data to be viewed and minimizes occlusion difficulties. This is Figure 7: Addition of Space-Time trajectory of 105KE building and resulting intersection with worker SpaceTime trajectory. often encountered when information is presented using three dimensions, and clearly a problem for earlier 2.5-D representations. Evaluating Utility: Initial Responses There is great value in presenting the spatio-temporal relationship between worker movement and hazardous material location and extent as we have done here. Once the basic 'rules' are explained (e.g., that the z-dimension is time), users may determine the intersection of objects. Early findings suggest that users become rapidly engaged by these representations. This is obviously something that should be empirically tested in a more thorough study of user interactions with this tool. Our working 3D GIS visualization was formally presented to research and management personnel from Hanford, primarily from the Consortium for Risk Evaluation with Stakeholder Participation (for more information, see http://www.cresp.org). Initial feedback was positive, and points to the value of such visuahzations for technical specialists (e.g., scientists) and decision and policy makers. These responses indicate that in a more developed state, these visualizations would aid decision-making, policy analysis, and human resource and safety management at Hanford. The greatest unknown at this point seems to be the value to general public stakeholders. These unknowns include the ability to engage stakeholders with space-time data without ahenating them as a result of the technology used, or the conceptual frameworks underpinning the representations. Collaborative Applications Analyses using space-time geography are useful in the Hanford context for several reasons. They could provide a better way to build shared understanding among groups discussing occupational health vulnerabilities on site. Our approach provides a different way to introduce complex issues to those unfamiliar with the problems and circumstances at Hanford. This approach could be used for capturing and tracking cumulative exposures to radiation for individuals. The apparent potential for this approach to be extended to networks of workers, additional hazardous materials, and different occupational risk data, is great, as shown in the future directions discussion. Using 3D GIS allows powerful expression of the time dimension, it helps keep track of project status and progress, and it can combine individual trajectories to aggregated expressions of risk or vulnerability. Real-world settings that strive to attain ideal semantic consistency conditions in collaborative settings may find this conceptual framework an invaluable tool to illustrate and make accessible important environmental characterization and remediation information in public forums. Data Considerations, Aggregation, and Misinterpretation Our visualization development was tailored to less-than-ideal data. While we were able Figure 8: Spent Nuclear Fuel (SNF) Handling Room. to represent the worker data we were provided, this involved significant temporal aggregation.. This raises questions about how 'better' (less aggregated) data would look, and impact users' spatial reasoning processes. It is suspected that above a certain temporal resolution, the resulting space-time trajectories may become challenging to interpret. With more detail, one might anticipate finer, smoother characteristics of the trajectory. While this would be beneficial in terms of precision, information such as rates of motion might cause difficulties in the interpretation of these visualizations. Different rates of motion might give an inaccurate impression of what is going, when viewed by the user. There is significant risk of misinterpretation of rate-of-motion slopes in the trajectory for route curvature.. The trajectory suspended in the time (z) dimension above the flat landscape might confuse users in mentally referencing different trajectory segments to the on-the-ground roads and pathways. Curved roads and pathways might compound this problem still further. Curved trajectories are likely to be more difficult for users to detect and reference to space-time metrics. There certainly appears to be a tradeoff to be made between revealing more information with linear trajectory segments instead of aggregated ones, versus misinterpretation of linear trajectory segments due to illusions caused by different rate-of-motion slopes and viewing angles. Another opportunity for misinterpretation might arise from the use of conventional cues in unfamiliar ways. This is an observation that has been made in the cartographic literature (MacEachren, 1995). An example in the space-time visualizations discussed so far, might be the 'extruded' space time paths of building footprints being mistaken as volumetric buildings themselves. This issue could be addressed in the next stage of development, by developing a basic visual coding system for possible objects in a given 3D visualization. Use of 3D GIS The implementation described in this work collapses the elevation dimension of the real-world landscape into a flat two-dimensional plane. A common use of 3D GIS is the representation of topography using some geometric model. This raises a challenging question for the space-time visualization presented here: Is it possible to represent both elevation and time simultaneously in the same z-dimension? We suspect that landscapes with large variations in elevation will complicate the process of efficiently representing time on the z-axis, while landscapes with minimal variations in elevation (such as the Bonneville Salt Flats in Utah, USA), would have negligible impact on the space-time trajectory. Bear in mind however, that 'large' and ' minimal' variations would be defined by the investigator and would depend upon the specific case. The general idea however, would be Fiffure Figure 9: Space-time trajectory of the spent nuclear fuel. that the start time would coincide with the maximum landscape elevation for that spatial location. All time dimensions would be added to that z-value. Our case study at Hanford dealt with buildings. Fortunately for us, the buildings were single-level. What if they had multiple levels where a worker could move through? How would that situation be dealt with? This is particularly problematic to represent using the strategy we have proposed so far. The use of elevators or stairs (especially descending) would greatly complicate the meaning of the trajectory. At this time, there is no easy solution to this challenge. Perhaps instead, this is a situation whose characteristics are incompatible with the space-time trajectory strategy we use. This situation may help us identify the boundaries of an 'ideal' or appropriate operating resolution of information for workers. This might be a situation where an alternative representation strategy is used. 3D GIS and not VRML A natural question arises from this work: why 3D GIS and not something like VRML as a tool to represent the space-time trajectories of data at Hanford? VRML could comfortably deal with the geometric challenge posed by the same spatial path being used in multiple time periods. However, it was our intention from the beginning to maintain as much accessibility to the underpinning GIS data. VRML has distinct advantages over Ar-cView GlS(tm) 3D Analyst (tm) in terms of ability to manipulate 3D geometric models. Although 3D Ana-lyst(tm) is equipped with a VRML conversion macro, being a new extension it is not fully reliable in transforming input data into VRML worlds yet. This was unacceptable. The next stage of development would most likely take place in a VRML world, with custom-built metrics and interfaces to ensure representative transformation of GIS data into manipulable geometric models. 9 Conclusions This research has proposed space-time visualizations as a powerful tool for facilitating user access to complex spatial databases. This approach has potential in complex settings. We have provided an example of this in our Hanford case study, where it allows us to clearly represent the intersections of humans and hazards in space-time. This is a fundamental aspect of radiological exposure, and a valuable application of these techniques to a real-world. The research undertaken here shows a robust methodology with a sound conceptual basis, implemented using readily available software. This research is one of few projects to fuse Hager-strand's visual space-time components, advanced spatial analytical tools and a contemporary real-world application. It may be considered a stepping stone to a larger integrated undertaking to visualize the spacetime trajectories of spatial entities (as suggested in Figure 12). We have presented a methodological approach that may make spatial databases more accessible visually and conceptually to wider user audience, where fostering fairness and communication between groups is a fundamental requirement for democratic progress to occur. This visualization has already been enthusiastically received by task group members of the Consortium for Risk Evaluation with Stakeholder Participation. The logical next step is to perform formal subject testing of this representation approach and to compare its performance as an information tool with existing representation approaches, before moving to the next stage of development. In the next stage of development, several findings of this work will be applied. Firstly, 3D implementation of the visual components of Hagerstrand's space time framework appear to have great potential as a foundation for information tools used in complex human and resources management systems. Secondly, landscapes simplified to flat planes are likely to interfere least with the conceptual basis of space-time visualization where the z-dimension is time. Another consideration is that perhaps the space-time visualization strategy presented in this paper is unsuitable for multi-story structures through which trajectories pass. Careful consideration must be given before this specific situation is integrated into the existing approach. Fourthly, the next stage of development should attempt to integrate GIS and geometry-based visualization environments other than the standard ArcView GlS(tm) 3D Analyst(tm) environment. This environment inhibits user interaction and exploration in several ways, many of which are linked to the navigation through and manipulation of 3D space. The authors believe that development in this direction may produce tools and techniques that most efficiently maintain the conceptual underpinnings of the research strategy, while providing appropriate information tools to the real-world case study situation. One final consideration, is that this approach to representing landscapes, individuals, hazards and structures in space-time requires fairly specific data. While it is possible to think of this as a constraint, we choose to consider it a tool that may facilitate the integration of formerly isolated data into an information system from which many will benefit. abilities than others, based on exposure/proximity to waste, duration of shifts in specific locations, and so forth. Users of the tool would be able to define the desired information to be shown, using specific databases, variables and models. The tool would have several modes of operation (such as different scales at which to view and interact with trajectories and data), also allowing the user to focus on subsets of the Hanford site (in the same way this research has), simply by selecting the appropriate icon. This is conceptualized in the 'exploded' views projecting from the main body of Figure 12. Essentially the tool would become a mechanism by which all parties involved at Hanford might gain access to relevant spatial databases. It would be possible to view the site at one of several levels of abstraction, defined by the user. Ultimately, we are aiming for technological transparency - where diverse stakeholder groups (as at Hanford) - view data, and understand it in the same way as any other user. This is an issue that requires extensive empirical testing in future work. The development of techniques and methodologies such as the one presented here are necessary if we wish to facilitate eventual semantic consistency in and across collaborative groups. The question remains however, whether we will able to determine this through empirical testing. Equally important is whether this particular technology (desktop 3D CIS) is capable of presenting information in ways that allow people to develop semantically consistent mental models of the world. References 10 Future Work There are many potential applications for this approach that could be developed in the future. These include: moving beyond vulnerability assessment (worker exposure to hazards) to more detailed analyses; incorporating elements such as exposure, impacts, land use, documentation, uncertainty, institutional structures, and so forth. An example of improving the space-time visualization would be to add hazard values to the trajectory, which would allow us to display cumulative worker exposure to radiological hazards (see Figure 11, below). At a larger scale, our approach to representing behavior, task and process at Hanford in space-time visualizations could be developed into a fully integrated tool (see Figure 12, next page). The tool would allow multi-scale visualization of multiple synchronous worker, group, and object (such as hazardous waste material) space-time trajectories. This may allow us to determine specific tasks that involve greater vulner- [1] Carlstein, T., Parkes, D.N., and Thrift, N.J., (Eds.). 1978. Human Activity and Time Geography, Volume IL London, Edward Arnold. [2] Chai, Y. and E. Wang. (1997). The Basic Concept and Presentation of Time Geography, Economic Geography, 1997 (3), Vol. 17, p. 55-61. [3] Chrisman, N.R. (1997). Exploring Geographic Information Systems. New York: John Wiley & Sons. [4] Hagerstrand, T. (1970). What about people in regional science? Papers of the Regional Science Association, 24, 7-21. [5] Kwan, M-P. (1998), Space-Time and Integral Measures of Individual Accessibility: A Comparative Analysis Using a Point-based Framework. Geographical Analysis, Vol. 30, No. 3 (July 1998), Ohio State University Press. Traiectoty exposure level I Extreme High Moderate Low- Negligible ; Trajectory \ 'footprint' Figure 10: Space-Time Trajectory showing Cumulative Radiological Exposure. [6] Kwan, M-P. and X-D. Hong. (1998). Network-Based Constraints-Oriented Choice Set Formation Using GIS. Geographical Systems, forthcoming (manuscript). [7] Lenntorp, B. (1978). A time-geographic simulation model of individual activity programmes, in Carlstein, T., Parkes, D.N., and Thrift, N.J., (Eds.) Human Activity and Time Geography, Volume II. London, Edward Arnold, 162-180. [8] Lenntorp, B. (1976). Paths in Time-Space Environments: A Time Geographic Study of Movement Possibilities of Individuals. Lund Studies in Geography B: Human Geography, Lund: Gleerup. [9] MacEachren, A.M. (1995). How Maps Work. The Guilford Press: New York. [10] Mark, D.M. (1997). Cognitive Perspectives on Spatial and Spatio-temporal Reasoning. In Craglia, M. and H. Couclehs, H., (eds.) Geographic Information Research: Bridging the Atlantic. London: Taylor and Francis. [11] Miller, H.J. (1999). Measuring Space-Time Accessibility benefits within transportation Networks: Basic Theory and Computational Procedures. Geographical Analysis [Columbus] Vol. 31. No. 1. January 1999. p. 1-26. [12] Miller, H.J. (1991). Modelling accessibility using space-time prism concepts within geographical information systems. International Journal of Geographical Information Systems, 5(3), 287-301. [13] Parkes, D. and Thrift, N. (1980). Times, spaces and places: A chronogeographic perspective. New York: John Wiley & Sons. [14] Pred, A. (1977). The Choreography of Existence: Comments on Hagerstrand's Time-Geography and its Usefulness, Economic Geography, Vol. 53 (2), 207-221. [15] Webler, Thomas. 1995. "Right discourse in citizen participation: An evaluative yardstick" in Ortwin Renn, editor. Fairness and competence in citizen participation. Kluwer Academic Publishers: Dordrecht. 11 Data Sources Columbia River Comprehensive Impact Assessment (CRCIA) is a study to assess the effects of Hanford- derived materials and contaminants on the Columbia River environment and to evaluate the potential risk N. R. Hedley et al. inoK Figure 11: An Integrateci Space-Time Tool, capable of handling multi-scale data, and user-defined data visualization. to the environment and human health. The report divides the area into specific river segments looking at contaminants and receptors and includes various spatial files on the Hanford and the Columbia River. Hanford Geographic Information System (HGIS) provides detailed maps of the Hanford Site and main features, including buildings, roads, topography, geology, wells, rivers, and so forth. It is currently available at the Bechtel Hanford web site. Hanford Remedial Action Environmental Impact Statement and Comprehensive Land Use Plan (HRAEIS) is a report by Department of Energy to establish future land-use objectives for the Hanford Site. The scope of this HRAEIS includes RCRA and CERCLA-regulated waste sites in the Columbia River, Reactors on the River, Central Plateau, and all other geographic areas of the Hanford Site. The report includes spatial files for various waste and land use topics such as air emissions, areas, chemicals, elevations, rivers, roads, water, etc. Radiological Exposure System (REX) maintains and reports individual Hanford worker, subcontractor and visitor radiological records since 1944- REX contains internal dosimetry and limited demographic information. A total of 150,000+ records currently exist on this database which is held by Battelle Pacific Northwest National Laboratory. 12 Acknowledgements The authors would like to thank Dr. Timothy .L. Ny-erges for his encouragement, and the anonymous reviewers for their suggestions. This research was supported in part by the National Research Center for Statistics and the Environment (NRCSE), funded by the United States Environmental Protection Agency through agreement CR825173-01-0 to the University of Washington. This support does not constitute an endorsement by the Agency of the views expressed. This research was also supported in part by the Consortium for Risk Evaluation with Stakeholder Participation (CRESP) by the United States Department of Energy (DOE) Cooperative Agreement #DE-FC01-95EW55084. This support does not constitute an endorsement by DOE of the views expressed. Modeling an Auditory Urban Database with a Field-Oriented Approach Robert Laurini*, Ki-Joune Li**, Sylvie Servigne*, Myoung-Ah Kang* *Laboratory for Information System Engineering Claude Bernard University of Lyon / National Institute for Applied Sciences of Lyon INSA - 404 - 69621 Villeurbanne Cedex - Prance Email: {Robert.Laurini, Sylvie.Servigne, Myoung-Ah.Kang}@lisi.insa-lyon.fr **Computer Science Department, National Pusan University Kumjeong-Ku, Pusan - South Korea Email: lik@spatios.cs.pusan.ac.kr Keywords: Multimedia databases, auditory databases, geographic information systems, field-oriented approach, field indexing, continuous indexing Edited by: Frederick E. Petry, Maria A. Cobb and Kevin B. Shaw Received: January 4, 1999 Revised: May 25, 1999 Accepted: June 10, 1999 The goal of this paper is to give some elements in order to design a database dedicated to auditory information-in cities. Auditory information is much more larger than traffic noise, because its......... includes all aspects of sounds which can be found in a city soundscape. Sounds levels can be modeled as a continuous spatio-temporal phenomenon, by means of the fìeld-oriented approach which is very relevant for this kind of database. Indeed its allows the user to see really sounds as continuous phenomena when querying even if they come from samples captured in the city. In this paper, after having introduced the special semantics of auditory information, we will overall present the fìeld-oriented approach and its characteristics. Finally, we will give some indications about the continuous indexing of such data in order to accelerate the queries. 1 Introduction ing action plans along motorways. Bearing those considerations into account, it looks very interesting to Sounds are very important in our daily life with a develop a system for knowing objectively soundscape twofold attitude for any citizen. In one hand, when in order to act where and when necessary (KRYGIER music, sounds are considered as enhancing the quality 1994, SERVIGNE 1998). The French National Insti- of life, but in the other hand, traffic noise deteriorates tute of Urban Engineering (INGU) has commissioned the quality of life. Due to those contradictory char- us to design an auditory information system in order: acteristics, the new concept of soundscape tries to combine both positive and negative aspects of the au- - to better know soundscape, everywhere in a city; ditory environment. Presently, and more and more in e.g. to have information everywhere in order the future, any urban planning activities try and must to perform comparisons, to detect very noisy try to diminish noise levels everywhere in the cities precincts, and to propose priorities to the city and perhaps outside, for instance at the vicinity of council; airports. Sounds are not only a physical phenomenon, but several psychological and physiological aspects must be taken into account when considering soundcapes. _ to estimate or simulate sounds impacts, especially For instance any local government, and practically ^^ new urban developments, everywhere in the world, receives daily several complaints regarding noise, but with a very biased distri- In order to perform these tasks, measures were made bution such as along very noisy motorways, no people along the city. Several sound recordist teams were sent complaint. In contrast, in very quiet residential zones, throughout the city to measure not only sounds levels, people send regularly complaints regarding any kind but also to tape-record the acoustic signals, typically of noise. So, if a city major wants to construct his/her during one to two minutes. Conceptually, those mea-noise reduction policy only on complaints, he/she will sures will be considered as samples of a continuous primarily act on very quiet precincts instead of carry- phenomenon, taken randomly across space and time - to propose a system for visualizing auditory information, perhaps with animated cartography; as illustrateci in Figure 1. But, in this paper, only sounds level values will be considered. Figure 1: Example of visualisation of auditory information. (a) Using bubbles to locate where the measures were made, (b) Location of the tape recorded auditory signals. One of the difficulties when designing such a computer system is that sounds constitute a continuous physical phenomenon. Usually information systems, and especially geographic information systems store entities representing land features. And the object-oriented model is an interesting tool for modeling geographic features. Mathematically speaking, sounds can be modeled by mathematical fields, which is an interesting way of modeling continuous information (COUCLELIS 1992, KEMP 1993). More and more geographic phenomena are considered and modeled as spatio-temporal continuous fields. Look for instance at the modeling of temperature: it is easy to see that temperature cannot be modeled as an object, but as a field more precisely a scalar field, whereas winds are modeled as vector fields. One of the problems in field database is indexing. Whereas conventional indexing techniques were developed for discrete data, the apphcation implies to design techniques for indexing continuous data, i.e., functions or more exactly spatio-temporal functions, and let us call it continuous indexing. The goal of this paper will be to present an urban database especially devoted to store and query urban auditory information based on the field-oriented approach. The paper is organized as follows. After this short introduction, we will define the field-oriented approach, especially by comparing it to the entity approach. Then we will give the key-elements for designing a field-oriented database for sounds. And we will finish by some considerations regarding field indexing. 2 Entity Modeling versus Field Modeling In our worlds, not all objects are clearly defined. As H. Couclehs (COUCLELIS 1996) said " Is the world ultimately made up of discrete, indivisible elementary particles, or is it a continuum with different properties at different locations ? This question, already debated by the ancients Greeks, remains one of the major unanswered problems in the philosophy of physics". For us, a house, a car can be considered as elementary particles, or atomic objects; but a lake, a sea, a mountain can be divided in portions depending of the human activities. Later she continued "somehow boundaries are intrinsic to the notion of atom, whereas in the case of extensive entities they are contingent. In other words, the notion of boundary a priori sits better with the atom view of things (and vector GIS) than the plenum view (and raster GIS), whereas the real geographic world forces us to consider both discrete and extensive entities". 2.1 What's in a field? The term of field refers to the plenum, i.e. a spatial-temporal continuum which is common in domains such as electricity (electric field), magnetism (electromagnetic field), physics (gravity filed) and so on. Mathematically speaking, a field is defined by functions over space and time. See PARIENTE 1994, KEMP 1993-97, GORDILLO 1997. When the field is scalar, then we have / = F(x, y, z, t). In other words, a function is defined in any place at any time. To illustrate the problem, let us speak about heat and thermal fields. At any place, at any time, a temperature (scalar) exists and it is possible to find a function able to describe temperatures everywhere and every time. In geoprocessing, the concept of fields can be elegantly used to model several features: — the first one is terrain. Indeed elevation z can be defined as a function of x and y, such as ^ = F(x, y); - some other attributes such as acidity or permeability of soils, flows in hydrology, infiltration, population densities and so on. In neighboring domains, such as meteorology, fields are very commonly used, for instance for winds, pressure, rain, humidity and so on. Figure 2 illustrates the general problem. In Figure 2a, starting from some sampling points, we can imagine the concept of a field as a continuous phenomenon. Even so (2b), some sampled temperatures are not stored, by interpolating between previous information, an estimation can be given for any point (eO^aidstribUicnof rreasuEscftenperalures (b)Wiđisthe terrpsfabjre alAatJB (c)TerTpetBlijB asafield Vs { 0 Figure 2: Temperature as a field, (a) Spatial distribution of some temperature points, (h) What is the temperature of some villages, namely A and B? (c) Smooth representation of temperatures. located in the convex hull (See Preparata & Shamos 1986). Finally, Figure 2c portrays a continuous field as shaded values. More generally, temperatures can be considered as a scalar field (Figure 3a), whereas wind as a vector field as given in Figure 3b. The field attributes can be issued from different domains. We can generally distinguish: - nominal, which correspond to integer or real value on which any arithmetic operations can be done; - ordinal, for which an order of magnitude can be defined, for instance the gravity of risks. we will use the density instead of the average in order to generate the field. 2.2 Field Properties Mathematically fields are defined by continuous functions. It is possible to distinguish several types of fields, at 2D or at 3D, scalar or vectorial. For example, a function h = f(x,y) represents a scalar 2D field. For instance, for a digital terrain, elevation is a scalar 2D field which can be written as 2 = f(x,y), and annual rain level can be written as r = f(x,y) and daily rain as r = f(x,y,t) where t corresponds to time. The wind is a vector 3D field with time, i.e. it needs three coordinates the represent the direction of the wind; it can be written as a vector such as wx = f(x,y,z,t), wy = f(x,y,z,t), wz = f(x,y,z,t). But if we want to work with the wind velocity, we need to differentiate those functions according to time. Dimension/ Type Scalar Vector 21) h = f(x,y) hx = f(x,y) hy = f(x,y) hz = f(x,y) 3D h = f(x,y,z) hx = f(x,y,z) hy = f(x,y,z) hz = f(x,y,z) Table 1: Different kinds of fields Figure 3: Some examples of fields, (a) Scalar field, (b) Vector field. But in reality, a field is never totally a priori known by global acquisition. Generally, it can be measured in some points, or its average or integral can be measured in some zones. In this case, one has to find a function incorporating the previous values. In Figure 4 is given an example illustrating a case of temperatures (Figure 4a) for which a function, or a sort of smoothing must be performed in order to estimate values anywhere. So, along a cross-section, the shape of this function can be depicted (Figure 4b). Similarly, instead of temperature, a population field can be used. In this case. In the sequel, to alleviate the text, we will speak about the coordinates of a field. By coordinates, we mean be either x,y or x,y and z, or even x,y,z and i, depending of the number of variables in the field. For the determination of a field, some elements are need: - to have a set of points together with their value. Starting from those values, the function can be defined contingent to have a mathematical model. In the absence of such a model, some conventional estimation procedures can be launched. - in some cases, not point values are known, but some zonal local densities or means: let us define them as statistical constraints. - in some cases, some local characteristics lead to a very strong modification of the field; for instance a cliff in a digital terrain model; those are called morphological constraints. Let us call seeds the sample points which are used to generate the field. And starting from those characteristics, the field can be estimated. An interesting system was made by Pariente for estimating fields with statistical and morphological constraints based on a (a) Average temperatures of some regions (b) Cross-section of temperature along the previous line Temperature ^ Smooth representation of temperature Peak at 27 B Figure 4: Prom averaging to real values, (a) Some regions and their average temperatures, (b) Smooth temperature along a cross-section. neural network with a pyramid accelerator (PARIENTE & LAURINI 1993, PARIENTE 1994b, PARIENTE & SERVIGNE & LAURINI 1994). 2.3 Constraints A Geographic Information System (LAURINI & THOMPSON 1992) should model reality as closely as possible. When attribute values have only been measured at a subset of all grid points, the values at the remaining grid points need to be estimated as accurately as possible, at the same time preserving salient features of the observed reality. The interpolation model must satisfy the user's needs, but must also respect morphological and mathematical constraints as well as information arising from a statistical study of the environment: all these constraints must be taken into account. The following section describes four main constraints, not all of which are taken into account by existing interpolation methods. 2.3.1 Morphological discontinuities The system must be able to take into account the possible discontinuities in the studied phenomenon (modeled by means of a continuous field). A number of geographic objects can be considered as discontinuities, such as cliffs, roads, rivers, walls, geological fractures and political frontiers. These objects depend on the category of the phenomenon, and describe the relationships between geographic objects. If the boundary of a geographic entity corresponds to a discontinuity, it will be taken into account in the continuous field estimation process. The system must be able to take into account the possible discontinuities in the studied phenomenon (modeled by means of a continuous field). A number of geographic objects can be considered as discontinuities, such as cliffs, roads, rivers, walls, geological fractures and political frontiers. These objects depend on the category of the phenomenon, and describe the relationships between geographic objects. If the boundary of a geographic entity corresponds to a discontinuity, it will be taken into account in the continuous field estimation process. 2.3.2 Continuity and diflFerentiability The general trend of attribute values should be continuous, regular and differentiable (in order to avoid a crisp fracture in the values, unless it corresponds to a discontinuity discussed above). Values at sites that are close together in space are more likely to be similar than others located further away, and to depend on each other from a statistical point of view (spatial autocorrelation). 2.3.3 Preserving sample point attribute values The estimation method must return the exact value of a sample point, and not an estimated one. Thus exact interpolation methods (returning exact values) are preferred to approximate ones (yielding estimates). Some mathematical methods do not meet this constraint, overall cause preference is given to differentiability rather than precision. It is important to preserve the original values of sample points because of possible problems of database integrity. 2.3.4 Attribute values for points or zones (statistical constraints) Attribute values can be either the mean value of a zone (or the standard deviation), or can refer to the attribute value at one particular point. In the first case (attribute of a zone) it is useful to include statistical constraints in the estimation process, allowing constraints to be specified using the standard deviation, or regression parameters, or the mean value of a region. In this way, measurement errors can be reduced. This (by no means exhaustive) list of constraints for a satisfactory interpolation method has been presented in order to meet precise requirements. In general, classical interpolation methods meet only a small subset of these constraints, which is why new methods of estimation are needed, together with a language including all specifications to improve the quality of estimates. See PARIENTE 1994a for details. 2.4 Field as an Abstract Data Type As previously explained, fields, or more exactly field values are a new sort of attributes for object. So the key-idea is to consider fields as an abstract data type, in which we must mention: - the nature of the field (temperature, altitude, hy-grometry, sounds, etc.); - the dimensions of the field where, e.g. a 2 or 3D, or 3D -I- time scalar field corresponds to spatial coordinates x, y and possibly z and t and one spatial variable (attribute value) w. If the field is a vector field, the dimension is greater, and this field can be described as x, y, z, t, wi, W2, ■■■ , Wn where 'Wi,-W2, ... , t/;« is the attribute vector of point X, y, z and t; - the list of intervals of definition for each spatial dimension; for example, for a scalar field, the dimensions can be defined as [-3.4975, -M28423.1] for X, and [5479.12, 10000] for y; so a sort a multidimensional bounding box will be defined; - an interval of dates, corresponding to the validity of the different components of the field. Only components with a validity interval corresponding to that of the field will be taken into account (or with an infinite interval of validity); - a set of sample points; - a set of statistical constraints; - a set of discontinuities. Type FIELD Representation nature.of_field : string, dimension : integer, interval-for.each-dimension : list of (Interval), intervaLof-validity : Interval, samples : set of (Sample_Point), statistical-constraints : set of (StatisticaLArea), morphological-constraints : set of (Discontinuity) Methods Interpolation Interval is an abstract data type corresponding to intervals of real numbers (such as [2.3, 78.23]; note that it is possible to specify an infinite interval by indicating an interval value R (set of real numbers) corresponding to ]-oo, +00 [. The class Sample_Point can described such as: Class Sample-Point inherit Point Representation PointJD : Point, attribute-vector : list of (real), validity-Sample : Interval Class Statistical-Area inherit Geographic-Area Representation Geographic-areaJD : Geographic-Area, mean-of-the-geographic.^ea : real, validity-stat : Interval The attributes correspond to: - the name of the geographic area concerned with the statistical constraint; - the value of the mean to be reached; - the period of validity of the statistical constraint. The class Discontinuity allows the modelling of morphological constraints i.e. barriers. Class Discontinuity inherit Line, Polyhne Representation GeographicJineJD : GeographcXine nature-of.discontinuity : string validity-discontinuity : Interval Each object of class Sample_Point possesses attributes, such as: - the point coordinates (x, y and possibly z)-, - the vector of attribute values (temperature, altitude, etc.); if it is a scalar field, this vector will contain only one element. In the case of a vector field, this vector will contain several attribute values according to the dimensions of the field; - the period of validity of sampling. The class Statistical_Area: modeling statistical constraints (here, only on the mean value of a zone, but it can be extended to standard deviation): The attributes correspond to: — the geographical line; — the nature of the discontinuity (a wall, river, road, frontier, etc.); — the period of validity of the discontinuity constraint In addition, some functions and operators will allow us to handle the objects needed to represent the continuous field, as described above. The main operations can be classified as basic management (adding, removing or modifying objects, fields or attributes) and queries. Let F be a continuous field of data. Now Field is regarded as a new abstract data type, providing the definitions of continuous scalar or vector fields. Declaration of scalar and vector fields with their components (sample points, statistical areas and discontinuities): Field F ( naine_of_field, nature_of_field, dimension, /* of the field */ (interi, inter2), /* intervals of def for each dim */ [begin_date, end\_date], /* interval of validity */ (Sample.IDl,...), /* list of sample point */ (Stat_area_IDl,...), /* list of constraints */ (Discontinuity_IDl,...) /* discontinuities */ ) Other classes could be introduced in this model, like for the support of acquired data, such as the class of spatial models used (grid cell, polygons, triangular irregular networks, a regular grid of points, irregularly spaced points or contour lines) or the class of interpolation method used (see KEMP 1993) and these classes would be aggregated to the class Field. In this model (Figure 5), interpolating techniques are not mentioned, so classes like spatial data models and interpolation methods are not included in the specification of the object-oriented model. For another model of field data, refer to (GORDILLO & BALAGUER 1998). Object." / \ Ljne Polyline Polygon rant ' GeograpNc Line A Discontinuity |||||||||||li|5i / \ Geographic Area / \ Statistical " Area Sample Points Relds Figure 5: Object-oriented model emphasizing the links between geographic objects and continuous fields 2.5.1 Definitions of Field Operators The first operation is to compute the value of the field at a given location starting from the coordinates. In other terms, we need an interpolation mechanism in order to estimate the value of the field. Once the value is determined, it is possible to estimate the gradients and the integral over a zone. Finally, queries must return the estimated attribute value or the gradient of a point, or the integral or the density of a zone. For the attribute value of a point. Estimation (F, #point ) returns a real value, the attribute value of the specified point, if the field is scalar. If it is vector field, it returns a vector. For the gradient of a point. Gradient (F, #point ) returns a vector of three elements, which is the gradient of the specified point. For the integral of a zone, Integral (F, #geographical_area ) returns the integral of the domain specified by the area. For the density of a zone. Density (F, #geographical_area ) returns the density of the domain specified by the area. When the field is temporal, all operators must include generalized dates (year, month, day, hour, minute, etc.) as parameters such as: Estimation (F, #point, date ) Gradient (F, #point, date ) Integral (F, #geographical_area, date ) Density (F, #geographical_area, date ) In some cases, the integral and the density may be computed not only for a precise date, but for a period of time, so giving expressions as follows: Integral (F, #geographical_area, period) Density (F, #geographical_area, period) The last functionalities refer to spatio-temporal continuity. in order to estimate those values, in addition to spatial interpolation some temporal interpolation procedures must be realized. This list of query operators is by no means exhaustive; other operators can be defined in order to construct a complete for continuous fields. 2,5 Field Operators For the manipulation of a field, among others we need to add or remove constraints. In addition, we need to compute the gradients, the derivatives, and the integrals. 2.5.2 Operators for Constraint Management The second set of operators is linked to the management of constraints. For statistical constraints, we can add or remove samples and, means. For morphological constraints, we can add or remove some discontinuity. In some cases, we can modify some elements such as discontinuities. See PARIENTE (1994a) or LAURINI k PARIENTE (1996) for details. 2.6 Physical representation of fields There are several ways to represent field data into a computer, especially depending on the structure of input sampling data. They can be represented by a generalization of well-known techniques for storing digital terrain models (see Laurini & Thompson 1992 for details). Among them, let us mention: - when the input data ace regularly distributed over space, for instance a grid, the raster format can be chosen. In this case, it is sometimes nicknamed as devil staircase or giant causeway; - when the data are irregularly distributed, a De-launay triangulation and a Voronoi tessellation can be constructed (Preparata & Shamos, 1986); this representation can be seen as an extension of TIN (Triangulated Irregular Networks); - in some cases, isolines are interesting as a generalization of contour levels. In general, grid and triangulation systems look very interesting for storing and querying, whereas isolines look more interesting for visualisation. In the case of sounds, all these models can be used: in small places, or in the countryside, isolines (here called isophones) are the more relevant way. However, in cities due to the existence of barriers such as fa^des, isophones are not very convenient. Due to the spatial distribution of sampling points, a technique based on constrained triangulation can be used. 3 Design of a Field-oriented System for Sounds For designing a relevant database systems for auditory information, we need to capture their semantics. Among the characteristics, we can mention: - due to physiological aspects, sounds levels are measured logarithmically in decibels; - sounds generally diffuse radially when there are no obstacles; but in cities due to the existence of lot of objects (car, trees, fa§,des, and so on), we have some difficulty to accept this assumption. In other words, for making interpolation between samples, a very sophisticated model will be necessary; - in this study, after discussion with acoustic experts, linear interpolation (Figure 6) of values in decibels will be implemented as a first step. When acoustic experts will give us the more sophisticated model, we will replace the linear interpolation method by this new one. In addition to conventional queries, we can give three kinds of very specific soundscape queries: Sounds Level / / Street axis / / ipling Figure 6: Linear interpolation method for noise evaluation. - spatio-temporal queries based on field-oriented approach and interpolation methods. An example of this kind of query can be "what is the mean sounds level in the 12th street at 4 o'clock am ?" - queries to identify similarity between sounds records based on signal similarity. In this cases, an example of sound is given in the framework of "sounds by example". See FALOUTSOS 1996. - queries based on key-words as criteria. Only the first query will be addressed in this paper. In this section, after having given some fundamentals in acoustics, we will only explain some elements in the acquisition, the updating of auditory information and the necessary operators. 3.1 Some Elements on Acoustics One of the ultimate goals of an urban sound information system is to detect noisy places where people are hindered so as to enhance their environment. Indeed people trouble is not necessary proportional to the noise level but depends also on physiological aspects, and that it is unavoidable to try to describe noise not also with quantitative aspects but with qualitative aspects. In this paper, only quantitative aspects will be considered. Two types of quantitative criteria characterize a sound : - the equivalent continuous noise (Leq) which need different measures during a day to obtain a representative average of noise environment. The Leq depends on: - delay of analysis period - level of instantaneous noise. - the three statistical levels : - Lso : level of average noise obtained during 50% of the analysis period, - Liop, L99 '■■ level of background noise, - Li : level of peak noise. 3.2 Data acquisition A lot of various information must be required to characterize a SoundScape. Information can be quantitative (ex: sounds level) but also qualitative to be more realistic (ex: pleasant or not). The numerous information which is needed leads to difficulties, first to identify them as key variables, then to make data acquisition, and to finally model them. Among others information required concerns : - physical description of space: topography, buildings, road networks..., - description of space occupation (sound impact): animals, buildings (ex: school), public places (ex: gardens, parks)..., - urban acoustic data (sounds level of traffic, variation...), - indicators of sound identity based on socioeconomic and psychological information, - sounds records. Data acquisition is achieved by : - collecting data in existing urban databases, - sounds measurements and collecting in decibels (db) by sound recordists, - organizations of surveys (city-d wellers, sites), - recording sounds on various places (typically 1 to 2 mn). 3.3 Updating Cities evolve and so sounds do. In the design of an information system, updating is a crucial issue. ; Prom a computer point of view, two aspects are emerging: - the necessity to store and update spatio-temporal information, implying perhaps the use of versions in the database, - the requirements of simulation of the future imply to work with different scenarios of evolution; here also the concepts of versions is a key-component. Presently, the measures are daily stored with bulk updates. But in the future, one can imagine a realtime system with sensors distributed in selected places throughout the city. But this aspect is outside the goal of this paper. 3.4 Conclusions To conclude this section about the modeling of sounds using the field-oriented approach, let us say that this approach is very interesting. However fa9,des appear to act like barriers in the diffusion of sounds. So, the goal of this project is only to consider the storing and retrieving of auditory information in public spaces. As an example of field-orientation, let us give very rapidly the declaration of a city in which we can find several zones, the city itself, downtown and the main square, and two punctual zones (town-hall and hospital). In addition, three fields are used, namely for modeling population, temperature and for auditory information, anywhere in the city. City Elasty-City ( town_area : Geographic_Area, downtown_area : Geographic.Area, town_hall_location : Point, hospital_location : Point, main_square : Geographic_Area, city_hall_temperature:.......... TEMPERATURE (town_hall_location), hospital_temperature : TEMPERATURE (hospital_location), town_population : POPULATION(town.area), downtown_population : POPULATION(downtown.area), town_soimdscape : SOUNDS(town.area), main_square_soundscape: SOUNDS(main_square), ....) Now that we know more about the modeling and the querying of auditory information, let us give some elements regarding the indexing of sounds levels. 4 Field Indexing for Sounds Levels As previously said, field databases consist of a large amount of data, like other types of geographical data, which requires to be stored on secondary memory. And, if the structuring is not adequately done, it may considerably degrade the performance of the system, especially due to the disk access time. It is, therefore very important to index field data for accelerating the access and processing time. The main goal of indexing is to find where requested data are stored on disk, without scanning the whole disk space. Each type of data needs its proper indexing method, and field data also requires a specific indexing method. However, as far as we know in the literature, no proper indexing method has been proposed or developed. In this section, we will investigate the problems and possible approaches of field indexing for sounds. 4.1 Typical Field Queries for Sounds In order to develop an indexing method for a system, we need first to clarify its purpose, which may be described by a set of operators, or a set of typical queries. While operators for alphanumeric or one-dimensional data are simple, those for spatial data are complex and diverse, and they are even more complex for field data. It is nearly impossible to investigate indexing method for all kinds of field data and we therefore restrict our focus on field operators only for sounds. And even sound field has several aspects, such as levels, directions or signal of sounds, in this section, we will deal only with the level of sounds as field data and leave other aspects as open issues. In this section, we examine a list of typical field queries for sounds. It may be incomplete but long enough to show the problems and motivation of the field indexing for sounds data. Suppose that we have field data for noise levels within a certain region: they may be represented such as terrain models, for example contour lines, DEM (Digital Elevation Model) or TIN (Triangulated Irregular Network) (LAURINI & THOMPSON 1992). But we do not treat details on the physical representation of field in this section. A field query consists of three variables, namely spatial variable S, temporal variable T, and level variable L concerning sounds level. Since a field can be defined by an mathematical equation, f(L, S, T) = Ö, a field query can be represented by a function of one or two specified variables for calculating the other variables. Each variable can be a value or a set of values. First 5 is a point, a line or a region. Second, time T is also a value t, an interval I=(tl, t2) or a recurrence C = (I, P) where / is an interval within given period P. By recurrence, we mean, for instance, Tuesdays afternoon, summer nights, and so on. For example, a temporal condition for "every day at 3:00 a.m." can be described as (3:00, 24), which means 3:00 per every 24 hours. And L can be also a value or an interval. The response of the query depends on the type of S, T and L. Now we can classify the types of queries according to the types of query returned values as follows: Q1 : /"^S, T) = L, (Estimation Query) Find sounds level on a given area S for a given time T. Q2 : /-HL, T) = S, Find region with sounds level L for a given T. Q3 : /-i(L, S) = T, Find time with sounds level L on a given region. Q4 : /-i(L) = (S, T), Find time and region (S, T) with sounds level L. Q5 : /-^Lmax) = (S, T) (Aggregation Query) Find time and region (S, T) with maximum sounds level L. Ql, the estimation query, is the most simple among the above query types, and the result depends on the types of S and T. For example, it is a surface, when 5 is a region and may be a value when S reduces to a point. The second type of query, Q2 is to find the region from conditions about time and sounds level. In contrast, Q3 is to find temporal set with spatial and sounds level conditions. While we inquire the region and corresponding time with a given sounds level by Q4, Q5 is to find the same thing but with maximum sounds level. And when 5'in Q5 is a region, one intends to find region and time that the average of the sounds level is maximum, as shown by Figure 7. Figure 7: Regions with maximum sounds level. Note that the queries listed above have only spatial aspect, if the value of temporal variable is infinite. For example, if T in Ql is [0, oo), Ql becomes only field query with only spatial aspect. Also if the value of spatial variable is infinite, the queries have only temporal aspect. 4.2 Field data indexing versus field indexing The concept of field for modeling continuous phenomena is essentially an intensional way of modeling the real world based on seed points. Let us remind that an extensional view of a set is based on the declaration of all objects belonging to a set, whereas in an intensional view, the objects are described by properties. In our case, it is impossible to define the infinite number of objects (field points) belonging to the field. But those objects have in common to follow the Laplace equation of the field. As a consequence, when the space is described with only with "all-fashioned" (i.e. extensional) spatial objects, conventional indexing are adequate, whereas since fields are described intensionnally, fresh indexing techniques must be used. So, now the question is: do we have to index the field itself or the field data? What are the difference between those two indexing techniques ? - field data indexing means that we want to index all the data supporting the field (field seeds); in this case, all conventional techniques used for indexing spatial and spatio-temporal data can be re-utilized. But if some peaks (for instance the peak at 27 degrees in Figure 4) and pits of the field are not present in the sample, they will never be retrieved by the user. In this case, field data indexing is equivalent to the indexing of only sampled data used in the field (seeds). in the other hand, field indexing means the indexing of the whole field, i.e. not only the seeds, but also all other field points, the number of which is infinite. In this case, since it is impossible to index an infinite number of points, new techniques must be introduced, for instance based on sub-fields. By subfield, we define a finite number of subsets of the field, each of them being described, for instance by a sort a multidimensional bounding box. So now, all peaks and pits will be either retrieved or estimated, and finally provided to the user. But the main difficulty remains the optimal splitting of the field into subfields. Irjdeed let us examine some common spatial indexing techniques (GAEDE & GUENTHER 1998), temporal indexing techniques(SALZBERG k TSOTRAS 1997) or spatio-temporal indexing techniques. Their goal is to index discrete data never continuous data; in other words, they are valid to store field seeds but not the complete continuous field. Obviously some assumptions behind discrete indexing methods can be reused for continuous indexing. Taking this idea into account, some spatial or spatio-temporal techniques can be used as a basis to field indexing, but with the difference that we are not indexing isolated objects, but continuous subfields and, the corresponding seeds. 4.3 Indexing Structure Before mentioning field indexing method for sounds, we need to explain the physical representation for field data of sounds. Since we treat only level of sounds, they may be represented as a surface like terrain. And terrain model such as DEM and TIN could be a good representation method for the field data for sounds. However, when we take into account the temporal aspect, its representation becomes very complex. Suppose that we have a TIN to represent a field, each vertex of triangle has a series of values according to time. However, we do not deal with detail method for field representation in this section, and rather generalize it to survey the indexing method. The only assumption that we make is that the field is divided into a number of auditory subfields, which are simplified by a tuple as follows. Fs = {Ix,Iy,lL,It) (1) where each I represents an interval of x, y, sounds level L and time t, respectively. In fact, this tuple means a minimum bounding box of a subfields in 4-D. Therefore, a field can be described by a set of minimum bounding boxes. This simplification implies that we are going to apply the filtering and refinement strategy to process queries. This strategy is very efficient in reducing the number of disk accesses by comparing only minimum bounding boxes during the filtering phase without examining the complex spatial objects stored on disk. Only the candidate objects selected during filtering phase are to be carefully examined during the refinement phase. The improvement of performance is considerable and it has become a common strategy in processing spatial operators. And the simplification also means that it may be possible to apply one of traditional spatial indexing methods, such as R-tree (GUTTMAN 1984), Grid-File (NIEVERGELT et al. 1984), Quadtree (SAMET 1984), etc., to index field data for 4-dimension. But as mentioned by (THEODORIDIS et al. 1998), temporal dimension is not just like another dimension due to its peculiarity. For example, some properties such as the ordinality or the recurrence that we explained in the previous section, cannot be found in other dimensions. We will discuss on field indexing methods by separating them into two categories. First we are going to examine the field indexing methods without considering temporal aspect. And then we will try to investigate the indexing method taking temporal aspect into account. 4.3.1 Without temporal aspects As we ignore the temporal aspect in a field database, the field reduces to a set of 3-dimensional auditory subfields Fs = {IxJyJi)- Two approaches are possible to index field data without temporal aspect. The first is to generalize spatial access methods which are divided into two classed; PAMs (point access methods, for example, grid file) and SAMs (space access methods, for example, iž*-trees) (GAEDE k GUENTHER 1998). For indexing field data, 3-D SAM such as 3-D i?*-tees (BECKMANN et al. 1990) can be used because the subfields can be considered as 3-D rectangles. However this approach has weak issues. The auditory subfields are not uniformly distributed along the axis of sounds level, but skewed around specific values as shown by Figure 8. It may lead to many overlaps between minimum bounding boxes of 3-D i?*-trees and may degrade the performance of indexing in comparison with the case of the uniform distribution of data (KIM et al. 1995). The second problem comes from the consideration of the dimension for sounds level as other dimension(a;, y). In fact, the spatial operators or queries, such as containment, nearest neighbor, and spatial join differ from those for field data, described in the previous section. Sound level ' Skewed area Space (X, y) Figure 8: Distribution of auditory subfields The second possible approach, called Hybrid Indexing, is to separate the dimension of sounds level from spatial dimensions. It means that we build two indexing structures, one for sounds level and one other one for spatial dimension. As far as spatial dimension is concerned, we simply use one of traditional spatial indexing method. And there are several possibilities for indexing sounds level, which are normally represented as an interval lL-[Lmin, Lmax]- First, indexing methods for temporal data, such as AP-tree (GU-NADHI 1993), IP-index (LIN et al. 1996) and interval B-tree (ANG 1995) may be employed. But since the temporal interval differs that of sounds level and they could give a bad performance. An example of such difference is that the intervals of sounds levels are skewed around some specific values as shown by Figure 8, while temporal intervals are relatively uniformly distributed. The second possibility is to transform each interval lL=[Lmin, Lmax] ^o 2-dimension of (Lmin, Lmax)- Each interval becomes a point in transformed space then any PAM can be used. The transformation gives an interesting property. For example, Q2 can be simply processed by the indexing with transformation method as Figure 9 shows. When a query such as "find the region where sounds level is between 50db and 60db" is given, the subfields in area VI satisfy the query and those in area IV and V will be the candidates. The careful refinement on the candidates will give a correct answer. Now we will examine how the 3-D SAM and hybrid method work to process the typical queries listed in the previous section. Suppose that we have a query of Ql type, for example, "find the sounds level for a given area W". With 3-D SAM and hybrid method, it is straightforward to find the result. By 3-D SAM, for example 3-D ii*-tree, we can easily find the minimum bounding boxes intersecting with area W by recursive manner. And the leaf nodes in i?*-tree point the candidate subfields which are eventually refined for the correct answer. It is also easy to process such query by hybrid method. It is sufficient to apply any PAM to find subfields intersecting with given region W. For the second query type Q2, we need a more sophisticated processing than Ql. Suppose that a query "find the region where sounds level is between 50db and 60db" is given. By 3-D SAM, the query processing is also straightforward hke Ql. We can find the candidate subfields by filtering minimum bounding rectangles whose values of sounds level intersect with [50db, 60db]. But the processing method of this query type by hybrid indexing differs from that of Ql. While the processing of Ql uses the index for spatial dimension, we need to employ the index for sounds level dimension. For example, we can easily find the subfields satisfying the query condition, that is, falling on zones IV, V, and VI in Figure 8, by the transformation method. By other methods belonging to this catergory, such as AP-tree, interval B-tree, IP-tree or MAP 21 (NASCIMENTO & DUNHAM 1997), it is possible to find the subfields, though the performance may vary more or less. Since the query types Q3 and Q4 are related with temporal aspect, we discuss on the corresponding methods in the end of the section. Instead, we see the indexing method for processing Q5 with 3-D SAM or hybrid method. Suppose that we have a query "find the point where the sounds level is maximum". First, we can also employ 3-D SAM to process this query. With 3-D iž*-tree, we can easily find the subfield with maximum sounds level, which is in fact the minimum bounding box whose upper bound of sounds level is maximum. However when we want to find the region of given area (for example, lOOm^) with maximum sounds level, the processing method becomes a little complicated. We select the minimum bounding box whose upper limit is maximum (bounding box A in Figure 10). And we remove the minimum bounding boxes whose upper limit is less than that of the selected bounding box. By repeating this procedure in recursive way, we can finally find the candidate auditory subfields that are to be carefully examined on refinement phase. This mechanism is in fact a typical example of filtering and refinement strategy based on i?*-tree and we can apply the similar process for other Zone VI Zone IV Zone V Zone I Zone II 7nne> r 1 -max 50 db 60 db Sound level L Original Sound Dimension VI • • V • » 1 ■1 ■ • / Y IV 50,60} 7...... • 1 L.........y / K Transformed Space ^min ^max ^min * The points in the transformed space are indexed with grid file, where grids are represented by dotted lines. In order to find out the points in zone VI, it is sufficient to find the grids intersecting with zone VI Figure 9: Indexing by Transformation Method. Sound level I Upper limit Lower limit ■ Selected minimal bounding rectangles as candidate objects . y Figure 10: Indexing for Q5 with 3-D R*-tree. 3-D SAM. As far as hybrid method is concerned, the processing method for this query depends on the type of index on sounds level. For example, we can find the subfield with maximum subfield by accessing to the rightmost leaf node on AP-tree or interval B-tree. And when transformation is employed, the uppermost point on transformed space corresponds to the subfield inquired. 4.3.2 Taking time into account When we consider temporal aspect, the indexing method becomes much more sophisticated. The field indexing method with temporal aspect is related with spatio-temporal indexing, as field indexing without temporal aspect is with spatial indexing. It means that the indexing method on spatio-temporal data is an emergent research area and no remarkable researches have been done (THEODORIDIS et al. 1998). For the same reason, it is difficult to find any satisfactory work on field indexing with temporal aspect. A number of spatio-temporal indexing methods has been proposed and they are distinguished into two categories with respect to the basic spatial index structure used as follows. The methods belonging to the first category are the extensions of R-tree (GUTTMAN 1984), which simplifies spatial objects by their minimum bounding boxes for spatial index: 3D R-trees (THEODORIDIS et al. 1996), MR-trees and RT-trees (XU & LU 1990), and HR-trees (NASCIMENTO & SILVA 1998). - 3D R-trees treat time as another dimension and is used for the management of spatio-temporal multimedia objects in a authoring tool. - MR-trees and HR-trees construct R-tree at each time-stamps and overlap them to obtain the advantage of utilization of common node and path. - RT-trees incorporate the time information into the node of the index, in order words this method couples time intervals with the spatial ranges in each node of the tree in order to overcome the disadvantage of MR-trees when there is not many common path. THEODORIDIS et al. (1998) introduce the specifications of spatio-temporal index structure, evaluates and compares the spatio-temporal access methods of this category with respect to the specifications. The second category includes the methods which use quadtrees and the idea of overlapping B-tree in order to represent successive states of the objects according to the change of the time: Overlapping Linear Quadtrees (TZOURAMANIS et al. 1998). This method is used to store consecutive raster images according to transaction time by means of overlapping R-Tree Quadtree (a) Extension of temporal dimension 3D R-trees Octree (b) Overlap the spatial indexing structure MR-trees, HR-trees Overlapping Linear Quadtrees (c) Modification of spatial index structure RT-trees Table 2: Comparing various indexing techniques lineax quadtrees in order to avoid storing identical sub-quadrants of successive instances of image data evolving over time. If we classify the spatio-temporal access methods mentioned above according to the spatial access method used and to the technique for incorporating time information, the following table (Table 2) can be obtained. In Table 2, the columns (R-Tree, Quadtrees) represent the used spatial indexing methods for spatio-temporal indexing method. And the rows ((a), (b), (c)) represent the tecniques for temporal information in spatio-temporal indexing method. In general, the variants of R-tree, in special the case of (a) in the above table, are not efficient in cases where minimum bounding boxes include a large amount of dead space, i.e., the case of moving objects, for example the navigation of a car. By contrast, the methöä§i employing overlapping technique are not suitable if a number of objects move from a temporal instant to another. The reason is that there is no many common paths between the index structures to be overlapped. The case (c) requires the good and sophisticated strategies which have not been well proposed and tested until now for node splitting considering the spatial and time characteristics in the same time. However, it is practically impossible to directly employ spatio-temporal indexing methods to temporal field indexing due to the peculiarity of field and temporal data. And the spatio-temporal methods mentioned above did not pay a full attention on such characteristics. For example, the recurrence makes it difficult to represent and index field data. Suppose a query "find sounds level on a region for every Sunday", which is a typical example of Ql. The simplest way to represent the recurrence is to extend the dimension to 4-D including temporal dimension and respectively locate all recurrences on the dimension. By this approach, we treat temporal data as others without any specific consideration, and it may simplify the method in a considerable way, but it is supposed to give a bad performance. However, the temporal data possesses different properties from other kinds of data and a careful understanding and exploitation of them may facilitate to develop a good temporal field indexing method. It remains as an open issue to develop temporal field indexing methods. 5 Conclusions The goal of this paper was to give on overview of a new kind of database systems allowing to deal with spatio-temporal continuous data, and an application especially devoted to urban sounds. Due to the physical characteristics of sounds, and the psychological and physiological impacts over humans, it is very important to propose a new kind of database. By considering sounds levels as mathematical fields, and sounds values as a new abstract data type, the key-elements of a new modeling technique were given in this paper, one of the difficulty being the indexing not only of sampling values, but also of other elements for speeding up queries. Field-oriented models can thereof be considered as an interesting approach for all spatio-temporal continuous phenomena. Sounds are one of them if we consider level values. Here only a very simple linear interpolation mechanism was used. But in the future, when acoustic models will better mimic the diffusion of sounds especially in cities, more relevant information systems will be offered to urban decision-makers. In addition, we have tried to present a solution of a new problem, i.e., continuous indexing method. Starting from ideas for discrete spatio-temporal indexing methods, we have extended those techniques in order to index continuous spatio-temporal data, namely sub-fields. Back to auditory database, one of the main difficulty is the visualisation of sounds, and an example is given Figure 11. Another very challenging aspect is the modeling of tape-recorded auditory information. Here the problem will not be anymore the simple interpolation between sounds values, but also the interpolation of signals. Presently, we are finalizing the specifications of a prototype. When the prototype will be in use, some other interesting research problems must be carried out, especially for the storing and retrieving of tape-recorded acoustic signals and their interpolation throughout the public space. References [1] ANG C., TAN K. (1995) The Interval B-tree. Information Processing Letters, 53(2), pp.85-89. [2] BECKMANN N., KREIGEL R., SCHNEIDER R., SEEGER B. (1990) The R*-tree: An efficient and robust access method for points and rectangles. Proceedings of 1990 SIGMOD, pp. 322-331. f f fi '' 1 HI) 1 n iislpB. 1 >(.1 Mmmmmià A/ Measure points are invisible, noise levels are represented with line of variable thickness lA B/ Measure points are visible and constant, noise levels are represented with line of variable thickness 0/ Measure points are proportional to noise levels, noise levels are represented line with variable thickness D/ Measure points are invisible noise levels are represented with lines of coloured ranges_ Figure 11: Different representations of sounds levels in streets [3] BURROUGH PA, FRANK AU (1996) Geographie Objects with Indeterminate. Boundaries. Taylor and Francis. 345p. [4] COUCLELIS, H. (1992) People Manipulate Objects (but Cultivate Fields): Beyond the Raster-vector Debate in GIS, in: Prank, A. U., Campari, I. and Formentini, U. (Eds), Theories and Methods of Spatio-temporal Reasoning in Geographic Space, Lecture Notes in Computer Science 639, pp. 65-77, Berlin: Springer. [5] COUCLELIS, H. (1996) Towards an Operational Typology of Geography Entities with Ill-defined Boundaries, in Geographic Objects with Indeterminate Boundaries. Edited by Peter A. Burrough and Andrew U. Frank, 1996, Taylor and Francis, pp. 4555. [6] FALOUTSOS C. (1996) Searching Multimedia Databases by Contents. Kluwer Academic Press. 155p. [7] GAEDE v., and GUENTHER 0. (1998) Multidimensional Access Methods. ACM Computing Surveys 1998, Vol.30, No.2, pp.170-231 [8] GORDILLO S. (1997) Modelización de Campos Continuos en Sistemas de Información Geogràfica. Master in Computing. National La Plata University, Buenos Aires, Argentina. 77 p. [9] GORDILLO S., BALAGUER F. (1998) Refining an Object-oriented GIS design Model: Topologies and Field Data. Proceedings of the International Symposium on Advances in Geographic Information Systems (ACM-GIS), pp.76-81, Washington, D.C., USA. [10] GUNADHI H., SEGEV A. (1993) Efficient Indexing Methods for Temporal Relation, IEEE Transaction on Knowledge and Data Engineering, 5(3) pp.496-509. [11] GUTTMAN A. (1984) R-trees - a Dynamic Index Structure for Spatial Searching, Proceedings of the ACM SIGMOD Conference, pp.47-57, Boston MA. [12] KEMP, K. (1993) Environmental Modelling with GIS: A Strategy for Dealing with Spatial Continuity. Technical Report No. 93-3, National Center for Geographical Information and Analysis, University of California, Santa Barbara. [13] KEMP K. (1997) Fields as a Framework for Integrating GIS and Environmental Process Models. Part 1: Representing Spatial Continuity; Part 2: Specifying field variables. Transactions in CIS, Vol 1, n 3, pp 219-234 and pp. 235-246. [14] KIM M.S., SIN Y.S., CHO M.J. and LI K.J (1995) A Comparative Study on Spatial Access Methods. Proceedings of the 3'"'^ ACM-GIS, Baltimore, USA, 1995. [15] KRYGIER J. (1994) Sound and Geographic Visualization. In Visualization in Modern Cartography. Edited by A. K. Mac Eachrew, D R Fraser-Taylor. [16] LAURINI R, PARIENTE D. (1996) Towards a Field-oriented Language: First Specifications. In Geographic Objects with Indeterminate Boundaries. Edited by Burrough PA, Frank AU. Taylor and Francis, pp 225-235. [17] LAURINI R., THOMPSON D. (1992) Fundamentals of Spatial Information Systems. Academic Press. [18] LIN L., RISCH T., SKOLD M. (1996) Indexing Values of Time Sequences. Proceedings of CIKM, 1996. [19] NASCIMENTO MA, DUNHAM MH (1997) Indexing Valid Time Databases Via B+-trees - The MAP21 Approach. Technical Report 97-CSE-08, Southern MethodistUniversity [20] NASCIMENTO MA, SILVA JRO (1998) Towards Historical R-trees. Proceedings of ACM Symposium on Applied Computing (ACM-SAC), 1998. [21] NIEVERGELT J, HINTERBERGER H., SEV-CIK KG (1984) The grid file: An adaptable Symmetric Multikey File Structure. ACM TODS, 9(1), pp. 38-71, March 1984. [22] PARIENTE D. (1994) Estimation, Modélisation et Langage de Declaration et de Manipulation de Champs Spatiaux Continus. PhD, Institut National des Sciences Appliquées de Lyon, 6 December 1994. 192p. [23] PARIENTE D. (1994) Geographie Interpolation and Extrapolation by Means of Neural Networks. Proceedings of the 4th European Conference on GIS, EGIS'94, Paris, March 29-April 1, 1994. Utrecht: EGIS Foundation, 1994. p 684-693. [24] PARIENTE, D. and LAURINI, R. (1993) Interpolation and Extrapolation of Statistical Spatio-Temporal Data Based on Neural Networks. Presented at the Workshop on New Tools for Spatial Analysis, DOSES/EUROSTAT, Lisbon, Portugal, November 18-20, 1993, pp 92-101. [25] PARIENTE D., SERVIGNE S., LAURINI R.(1994) A Neural Method for Geographical Continuous Field Estimation. In: Neural Processing Letters, 1994, Vol. 1, No 2, p 28-31. [26] PREPARATA F., SHAMOS M. (1986) Computational Geometry, an Introduction, Springer-Verlag. [27] SALZBERG B. and TSOTRAS V.J. (1997) A Comparison of Access Methods for Temporal Data, to appear in ACM computing Surveys. [28] SAMET H (1984) The quadtree and related hierarchical data structure. ACM Computing Surveys, Vol.16 No.2, pp.187-260. [29] SERVIGNE S. (1998) Towards a Sonorous Urban Information System. In Proceedings of the COST-UCE C4 Rome Workshop: Information Systems and processes for Urban Civil Engineering Applications. Edited by U. Schiavoni. Luxembourg: Office for Official Publications of the European Communities 1998, EUR 18325 EN, pp. 191-202. [30] THEODORIDIS Y., VAZIRGIANNIS M., SEL-LIS T. (1996) Spatio-Temporal Indexing for Large Multimedia Applications. Proceedings of the 3'"'^ IEEE Conference on Multimedia Computing and Systems (ICMCS). [31] THEODORIDIS Y., SELLIS T., PAPADOPOU-LOS A., MANOLOPOULOS Y. (1998) Specifications for Efficient Indexing in Spatiotemporal Databases. Proceedings of the 7th Conference on Statistical and Scientific Database Management Systems (SSDBM), pp.123-132, Capri, Italy. [32] TZOURAMANIS T., VASSILAKOPOULOS M., MANOLOPOULOS Y. (1998) Overlapping Linear Quadtrees : a Spatio-temporal Access Method. Proceedings of the 6th International Symposium on Advances in Geographic Information Systems (ACM-CIS), pp.1-7, Washington, D.C., USA.. [33] XU X., HAN J., LU W. (1990) RT-tree -an Improved R-tree Index Structure for Spatio-temporal Databases. Proceedings of the 4th International Symposium on Spatial Data Handling (SDH), pp. 1040-1049. A Revisited Database Projection Operator for Network Facilities in a GIS C. Claramunt The Nottingham Trent University Department of Computing Burton Street, Nottingham NGl 4BU, UK Email: clacSdoc.ntu.ac.uk AND M. Mainguenaud Institut National des Telecommunications 9 rue Charles Fourier, F91011, France Email: Michel. Mainguenaud®int-evry. fr Keywords: GIS networks, data models Edited by: Frederick E. Petry, Maria A. Cobb and Kevin B. Shaw Received: December 15, 1998 Revised: May 14, 1999 Accepted: June 10, 1999 Within GIS, networks have been mainly represented at the geometrical level. This paper demonstrates that the deßnition of additional levels of abstraction extend the semantics of GIS networks. Networks are analysed and modelled at the conceptual and logical levels, independently of the underlying geometrical representation. The management of this two-levels representation leads to the development of a new interpretation of the database projection operator. This new operator is oriented to a semantic representation of a network. Network component properties are identified at the node and link component levels. We define four semantic constants: Global, Subsetiv, Subseti and Subsetjv,L- The semantic of alphanumeric properties are identified and their propagation with the application of network operators is characterised in function of the semantic constants. The closure of network manipulations on the database schema supports the definition of a data model that integrates the result of a network operator. This data model is buiJt as a subset of the data models involved in network operators. 1 INTRODUCTION tion of electricity, gas, water or telecommunication resources. Influence networks describe economical or so- A lot of efforts are under progress to elaborate innova- cial patterns in space. Network can be also used to rep- tive solutions for the representation and exploration of resent spatial navigation processes in space and time, complex database applications. In the context of geo- i.e., a movement, generally a human one, between sev- graphical databases, several spatial data models have eral locations in space. Such processes are represented been identified through the integration of geometrical throughout cognitive representations of space that in- and topological principles (e.g., David 1993, Guting tegrate complementary levels of abstraction (i.e., large 1989,1993 and 1995, Haas 1991, Kolovson 1993, Larue and local scales according to (Kuiper, 1978). In this 1993, Scholl 1989, Van Oosterom 1993). Similarly, case, network nodes represent symbolic and discrete many proposals have been defined to formalise spa- location in space, edges displacements between these tial query languages within databases (e.g., Brossier- places (Claramunt 1995). Wansek 1995, Egenhofer 1990, Frank 1982, Orenstein 1988). The common and accepted model representa- If several spatial database models and query lan- tion of discrete entities in space integrates the underly- guages have been proposed to represent the properties ing structural constraints that organise the geograph- of networks in space (Claramunt 1996, Guting 1989, ical representation. For instance, cartographic models Haas 1991), the definition of a data manipulation lan- use topological relationships to structure entities in guage that operates, organises and presents a set of space (Peuquet 1984). Similarly, graph structures are network queries within their geographical context is introduced into database models to model networks still an important research challenge to be addressed. (Mainguenaud 1995). Network structures are particu- Surprisingly, the definition of operators that address larly useful to represent physical or influence relation- the presentation of query results has been hardly in- ships in space. Physical networks include the distribu- vestigated within classic databases. Database query languages are mainly based on a logic of predicates that restrict a query result to a set of tuples or objects. The projection operator restricts a query result to some of the relation attributes. To extend the semantics of the projection operator, aggregate functions have been proposed (e.g., sum, average, maximum, minimum, count). These functions can be integrated within the projection operator in order to extend the semantics delivered by the query result. In a GIS context, a query result combines network, spatial and alphanumerical properties. A first extension proposed to handle spatial data in query languages is the introduction of spatial predicates (e.g., in the where clause of an extended SQL-like query language). However, the semantics of these languages is not adapted to the complexity of geographical applications in which query operations are often oriented toward the spatial and logical manipulation of entities. The introduction of spatial operators, (e.g., in the select clause), improves the benefit of spatial operators as a new spatial semantics may be derived from their application (Gut-ing 1989 and 1993, Haas 1991, Larue 1993, Orenstein 1988). For alphanumeric attributes, current spatial query languages assume that the semantics of the operand components is still vaHd for the alphanumeric attributes delivered by a projection operator. This assumption is correct for queries based on the application of predicates in which the resulting semantics is not changed (i.e., no new attribute nor spatial representation are created). However the introduction of spatial operators within database queries change the resulting semantics as the spatial component of the query result may be derived (e.g., application of a spatial intersection operator). The propagation of alphanumeric properties within spatial operators have been studied in a previous work (Mainguenaud 1994). A classification defines the semantics of spatial entities at the topological level (i.e., an alphanumeric attribute is valid at either the interior, boundary or global spatial representation) and at a partial or global spatial representation (i.e., an alphanumeric attribute is valid, or not, for a subset of the spatial representation of this entity). The entity level defines the possible overlap, or not, in space for two instances of a same entity. Accordingly, a data definition language must identify (1) an appropriate semantics of alphanumeric attributes and (2) rules for the propagation of these attributes within network operators. We can make a distinction between network operators that generate or not a new semantics (i.e., creation of new entities or not). That is a mandatory requirement to avoid inconsistencies or false interpretations in the analysis of network query results. This paper proposes an analysis of the semantics of GIS network operators and the definition of propagation rules that monitor the propagation of network component attributes. This analysis will support the redefinition of a projection operator suited for the presentation of query results that involve the manipulation of spatial data networks. Prom the database point of view, this application context represents a case study which may act as a reference and can be generalised with some minor adaptations to any network representations. Prom a GIS point of view, the context is of particular interest for applications oriented toward the representation of physical and semantic networks. The remainder of this paper is organised as follows. Section II presents the data model we use to explain the manipulations of networks. Section III discusses network operators and their semantics. Section IV develops the identification and application of a revisited projection operator. Section V draws the conclusion. 2 DATA MODEL SUPPORT The definition of a network data model imphes the integration of logical, geometrical and alphanumeric properties into a user-defined network representation. Therefore, modelling a network application requires the identification of the following elements: - logical connections between network entities. The concept of graph is well adapted to model such connections. - geometrical properties of the network and its component entities. In the context of our model, the geometrical level is defined by the concept of Abstract Data Type that allows an independent representation of the physical data model (Stemple 1986). - alphanumerical properties of the network described within a so-called data structural model. We use a complex object data model for the description of alphanumerical properties with three constructors: [ ] for tuple, { } for set and < > for enumerated type (similar models with a matching semantics could be used without loss of generality). - logical, geometrical and alphanumeric levels represented by an homogeneous user-defined network model. We model a network with the concept of graph. A graph is a pair (V, E) where V is a set of vertices and E is a sub-set of V x V. An incident function maps an edge to a couple of vertices. This basic definition is completed by labelling functions. Two labelling functions allow the introduction of alphanumeric properties for vertices and edges. A node models a vertex with its labelling function. A link models an edge G(V, E, V, V is a set of vertices, v is a labelling function for vertices E is a set of edges, e is a labelling function for edges ^ is an incident function E -> V x V Figure 1: Definition of a graph with its labelling function. Let us consider a graph as defined in (Cruz 1987): In order to simplify the notation, a network built on a graph G (V, E, u, e, with labelled vertices and labelled edges is denoted N (N, L). For example a node is used to model an airport, a link to model a connection between two airports. Networks can be defined from one to many level of abstractions depending on the application semantic. The integration of networks defined at complementary scales can be realised by the application of logical operators that allow to compose and decompose network subsets (Claramunt 1996, Frank 1982, Mainguenaud 1996). For the purposes of this research, we restrict the domain of study to a set of networks defined at a same abstraction level (the same principles can be easily extended to multilevel representations). 3 Logical and geometrical levels A network is structured through two complementary logical and geometrical levels which are defined as follows: — logical level: A network is logically defined by a set of nodes and by a set of links. This level is independent of the underlying geographical representation. The logical level supports the application of network operators (e.g., path, paths) — geometrical level: This level describes the geometrical properties of the network entities. It permits the application of metric operators (e.g., distance, area). Spatial constraints and operations are generally derived and defined from the geometrical level. They allow to manipulate the geometrical and topological properties of network entities (e.g., adjacency, inclusion). This two-levels structure leads to the manipulation of spatial entities at two distinct levels (1) the logical level and the application of logical operators (e.g., logical connection) (2) the geometrical level and the application of spatial operators (e.g., spatial intersection). For instance, two distinct flight routes that in- tersect in space may be not logically connected. The distinction between these two structural levels are generally not represented and integrated within current database models and applications. However, a distinct representation of the geometrical and logical levels is more adapted to a finer representation of the semantics of spatial networks, particularly for applications which are oriented to the modelling of logical connections (e.g., maritime or aerial navigation). A spatial network includes two orthogonal logical and geometrical levels. The logical level is mandatory by definition. The geometrical level is optional. We propose a definition of a network in function of the completeness of its geometrical level, with the definition provided in (Guptill 1995), that is, depending on the availability or not of the spatial representation instances. Let us define two Boolean functions to handle the existence or not of a spatial representation for a node and for a link, respectively: IsSpatialNode: Node.type -> Boolean IsSpatialLink: Link.type -> Boolean Definition: A network is spatially complete whenever a spatial representation is available for all nodes and all links. N (N, L) build on a graph G (V, E, i/, e, is spatially complete <=> V ni e N, V li e L / IsSpatialNode (n^) = True A IsSpatialLink (Ij) = True Definition: A network is spatially incomplete whenever at least one spatial representation is not available for a node or a link and at least a spatial representation is available. N (N, L) build on a graph G (V, E, u, e, is spatially incomplete <=> (3 ni € N/ IsSpatialNode (n») = False V 3 li 6 L / IsSpatialLink (1,) = False) A (3 ni € N/ IsSpatialNode (n») = True V 3 1, e L / IsSpatialLink (li) = True ) Definition: A network is a-spatial whenever no spatial representation is available for all nodes and all links. N (N, L) build on a graph G (V, E, u, e, $) is a-spatial <=> V n; € N, V li € L / IsSpatialNode (ni) = False A IsSpatialLink (li) = False From an application point of view, spatially complete networks allow to represent networks which are described by a complete geometry in space at both the node and link levels. On the other hand, spatially incomplete networks are oriented toward the representation of schematic or immaterial networks in space (i.e., spatial networks that describes influence or gravitational forces with no link geometry) or networks that are constituted by some incomplete data (i.e., some spatial representations are missing). 4 User defined level Network applications require to handle the logical representation of a network (e.g., in order to define a query that delivers the flight connections or the paths between two airports), the alphanumeric properties (e.g., a query that delivers Air France flights) and the visualisation of a geometrical representation (e.g., a query that displays a map that presents the flight connections between two airports). The representation of a network must handle these complementary model levels and their semantic relationships in order to process and combine the semantics of these queries. Let us consider an abstract data type modelling an object identifier, named Oid-type (e.g., a name, a number). Using the notations of complex objects, a graph and a network are defined with Abstract Data Types as follows: Vertex_type = [ Oid: Oid-type] Vertices-type = { Vertex.type } Node-type = [ Oid: Oid-type, Representation: Spatial-Representation-type] Nodes_type = { Node.type } Edge-type = [ Oid: Oid.type, Origin: Vertex-type, Destination: Vertex-type ] Edges.type = { Edge.type } Link-type = [ Oid: Oid-type, Origin: Node.type, Destination: Node.type, Representation: SpatialJlepresentation-type] Links-type = { Link.type } Graph-type = [ Vertices: Vertices-type, Edges: Edges-type ] Graphs-type = { Graph-type } Network-type = [ Nodes: Nodes-type, Links: Links.type ] Networks-type = { Network-type} Node-type, Link-type and Network-type can be respectively considered as sub-types of Vertex.type, Edge-type and Graph-type. To simplify the presentation, the set of integrity constraints defined on such a schema is not presented. Using the previous network definitions, we define an example database that describes an international flight network between some European airports: London, Brussels, Amsterdam and Paris (Figure 1). To explain by example the different logical and geometrical configurations of a network, let us consider that this database may be a-spatial (Figure lA), spatially complete (Figure IB) or spatially incomplete (Figure IC). Using the notations of complex objects, the network and its components are defined with Abstract Data Types as follows (note that the logical representation of this network and its components is still valid if the spatial attributes Representation are not included in the network and component types): Airport.type = [ Oid: Oid-type, Representation: Spatial-Representation.type, Category: string ] Flight-type = [ Oid: Oid.type, Representation: Spatial-Representation-type, Origin: Airport-type, Destination: Airport-type, Duration: float. Price: float ] EU-Network.type = [ Airports : {Airport.type}, Flights ; {Flight-type} ] Airport-type represents the nodes of the netowrks. Flight.type the links of the network. Alphanumerical and spatial attributes for Airport.type (e.g.. Category) and for Flight.type (e.g., Duration) correspond to the introduction of the functions n and e in the definition of a graph, respectively. They constitute a network modelled by the EU-Network.type. In particular, the a-spatial network may represent the point of view of a user which is only interested in the logical connections of the flights. The Paris - Brussels and Paris - Amsterdam links overlap in the geometrical level dthough they are logically distinct (Figure IB/IA). Symbolic representations in Figure IC such as Paris or the link Paris-Amsterdam have no particular spatial location. A link such as the London-Brussels one has a spatial location which is only relevant for its origin and destination (e.g., London and Brussels). 5 NETWORK OPERATORS Several database query languages have been proposed for the manipulation of networks (e.g., Brossier-Wansek 1995, Cruz 1987, Guting 1989)). We analyse query operators that manipulate and derive the semantics of spatial networks. The definition of a minimal set of network operators is far away the scope of this paper. We propose a classification of network operators based on a distinction of the query results in order to identify different semantic levels in the re-analysis of the projection operator. That leads to a distinction between operators that manipulate networks and network components (i.e., nodes and/or links). We analyse these network operators from a structural, topological, semantic or set-oriented points of view: — Structural operators correspond to the manipulation of graph components - network to node and link or node and link to network (i.e., decomposition or composition operations) -. They are applied on networks or network components. — Topological operators manipulate graph properties (e.g., paths operator), they manipulate networks or a network and some of its components and deliver a network (or a set of networks). — Semantic operators manipulate the semantics of alphanumerical attributes for networks or network London Brussels Paris Amsterdam Figure lA Logical level of a graph London Paris Brussels Figure IB Geometrical (spatially complete) level of a graph London Amsterdam Paris Figure IC Geometrical (spatially incomplete) level of a graph Figure 2: Example database components. They correspond to classic database operators. - Set-oriented operators are conventional set theory operators (e.g., intersection). They are applied on networks or network components. 6 Network-oriented operators The main objective of network-oriented operators is to provide one (or several) network(s) as a result. We hereafter detail the classification (structural, topological, semantic and set-oriented). The BuildJn operator is an example of a structural network-oriented operator applied on a set of links and on a set of nodes to define a network, i.e., composition. The BuildJn operator is the equivalent of the Insert operator in a conventional database. Nodes and Links may exist in the database without being regrouped in a network (similar to an association relationship in a Entity-Relationship model). The signature of the BuildJn operator is as follows: Build-in: Links.type x Nodes.type -> Network.type The path operator is one of the most frequent topological network-oriented operator used in network applications. However, evaluating all possible paths in a network between an origin and a destination is not a relevant query in a GIS context (i.e., from a user point of view). A limitation must therefore be introduced (Mainguenaud 1996). Two levels of requirements can be defined: - The first level operates at the link level (e.g., a query that delivers a path whose flight links are restricted to a specific company: Air Prance flights). Let us define an abstract data type Criteria_type to model such requirements. - The second level operates at the path level (e.g., the global duration is less than 4 hours). Let us define an abstract data type ConstraintS-type to model such requirements. A path is evaluated on an underlying network. Defining the most efficient algorithm to compute the transitive closure for the evaluation of a path operator is not relevant in our context. Let us define a generic path operator. In the context of a GIS query, several origins or destinations may be defined. A constrained definition is introduced on the path operator. The evaluation must be restricted to insure a realistic time of computation. The path evaluation can be required between a single origin and a single destination, between a single origin and a set of destinations or between a set of origins and a single destination. Conventional path operators, such as defined in Gral (Guting 1989) or Starburst (Haas 1991), have the following signature: Path: Node-type x Node.type x Constraints-type x Criteria-type x Network-type -> Graph-type the result is a unique path (e.g., shortest path) In order to provide a realistic solution for GIS applications, a relevant signature is: Paths: Nodes-type x Nodes.type x ConstraintS-type X Criteria-type x Network.type -> Graphs-type the result is a set of possible paths The result of the second signature is a set of graphs. Each graph from this set is a path without a cycle (an origin, a destination and the set of links between the origin and the destination). The application of a constraint such as "the path duration is less than four hours" may be verified but the real duration is not provided. However, we argue that a valuable decision must be taken depending on several selection criteria. A shortest path may not be the most convenient criteria as additional thematic parameters may be applied. Such a query is difficult to formulate from a computational point of view. Therefore, a human interaction with the query result is highly recommendable. In the case of our example database, a query delivering a set of paths between Paris and London is the most appropriate solution as a relevant choice implies a human decision process that combines additional criteria (e.g., company preferences, timetables). However, this objective implies the introduction of additional information that represent the network semantic in order to support such an interactive decision process. Then we introduce a labelling function in the definition of a network as follows: N (N, L, a) where a is a labelling function that complements the network semantic. Using the function a, the limitation of the context in which a network is embedded (Figure 1) disappears. Our example database can now be extended. Alphanu-merical and spatial attributes for EU_Network_type (e.g., Condition) correspond to the introduction of the function a in the definition of a network. EU-Network.type = [ Oid: Oid.type, Airports : {Airport-type}, Flights : {Flight.type} Condition: string, Cumu- lated-Length: float, Companies: (string), Length-Air.Traific-Corridor: float, Air-Traffic-Noise: float. Context : Spa- tial.Representation.type ] Accordingly the signature of the path operator is as follows: Paths: Nodes-type x Nodes.type x Constraints-type X Criteria-type x Network-type -> Networks-type The Largest.Common_Subgraph operator is a second example of a topological network-oriented operator. This operator is applied on two networks, and returns a network. Its signature is as follows: Largest.Common_Subgraph: Network-type x Net-work.type -> Network-type Such operators are often NP-complete. In the case of a GIS query, a network mostly represents a path. A path (without cycle in our case) is a Directed Acyclic Graph (DAG). In a path a node has at most one predecessor and one successor. This topology allows the application of operators that are in theory NP-complete but with a realistic complexity in the context of our network model (even with a large graph). The Networks-Selection operator is an example of a semantic network-oriented operator applied on a set of networks. This operator manipulates the semantics of a set of networks verifying some selection criteria. It is similar to the relational selection operator. Its signature is as follows: Networks-Selection: Networks-type x Criteria-type -> Networks-type The NetworksJntersection operator is an example of a set-oriented network-oriented operator applied on two sets of networks. The resulting networks belong to the two sets of networks from the left part of the signature (e.g., same Oid). Its signature is as follows: NetworksJntersection: Networks-type x Networks-type -> Networks-type Table 2 summarises relevant configurations for network-oriented operators with an operator example for each identified class (structural, topological, semantic and set-oriented). The left part of a signature is presented as a regular expression on the different types. This table represents the possible operator configurations. No other left part of the signature can be involved since the pair (Links-type, Network-type) implies the definition of Nodes.type to validate Links-type, and therefore corresponds to (Network-type)-!-. By definition, a structural operator can only be defined from its network components in order to compose a network (i.e., applies for nodes and links). Structural operators correspond to the manipulation of graph components from a level of abstraction to another one. In the context of our model, only nodes or links (i.e., composition: BuildJn operator) can be involved in the left part of the signature to provide a network. This configuration delivers for example a network from a sequence of nodes and links. By definition, topological operators involve at least a network in the signature. No topological operator can be defined with a signature that does not involve at least one network. Semantic and set-oriented operators provide a set of networks and therefore can only be defined with (Networks-type)-l- in their left part of the signature. 7 Node-oriented operators The main objective of node-oriented operators is the extraction of nodes. They can be applied on a network or on one (or several) set(s) of nodes or links. The choice of relevant nodes is based on structural, semantic, or set-oriented purposes. The Nodes-Projection operator is an example of a structural node-oriented operator applied on a network, i.e., decomposition (e.g., a query that delivers the cities of a network). This operator transforms a network into its unique set of nodes. Its signature is as follows: Nodes-Projection: Network-type -> Nodes-type The Nodes-Projection operator is applied on a Network-type (i.e., a unique network). The Origins (resp. Destinations) operator is a second example of a structural node-oriented operator. It is applied on a set of links, i.e., decomposition. This operator manipulates the structural properties and returns a set of nodes verifying that resulting nodes are the origin (resp. destination) of a link (e.g., a query that delivers the airport which is the departure of a flight). Its signature is as follows: Origins: Links-type -> Nodes-type The Nodes-Selection operator is an example of a semantic node-oriented operator applied on a set of nodes. This operator manipulates the semantics of nodes and returns a set of nodes that verify some selection criteria from a set of nodes (e.g., a query that delivers a set of airports of a particular category). Its signature is as follows: Nodes-Selection: Nodes-type x Criteria.type -> Nodes-type The Nodes-DifFerence operator is an example of a set-oriented node-oriented operator. It is applied on two sets of nodes and delivers a set of nodes that verify that these nodes belong exclusively to the first set of nodes in the left part of the signature. Its signature is as follows: Nodes-Difference: Nodes.type x Nodes-type -> Nodes-type Table 3 summarises the relevant configurations for node-oriented operators with an operator example for each class (structural, semantic and set-oriented). This table represents the possible configurations. As a node can be derived from a network or a link, structural operators are defined from Network.type and Links-type. By definition no structural operator can be defined with Nodes-type in its signature. Topological operators are not relevant for node-oriented operators since a node is an atomic component of a network. Semantic and set-oriented operators provide a set of nodes and therefore can only be defined with Nodes-type in their left part of the signature. Left part of the signature structural topological semantic set-oriented (Nodes_type)+ (Links_type)+ Build_In (Nodes_type)+ Network_type Paths (Network_type)+ Largest_Common_ Subgraph Networks_ Selection Networks_ Intersection Table 1: Network-oriented operators Left part of the signature structural semantic set-oriented Network_type Nodes_Proj action (Nodes_type)+ Nodes_Selection Nodes_Difference (Links_type)+ Origins V V Table 2: Node-oriented operators 8 Link-oriented operators The main objective of link-oriented operators is the extraction of links from a network. They deliver a set of links. They can be applied on a network or on one (or several) set(s) of links or nodes. The choice of relevant links may be based on structural, semantic or set-oriented purposes. The Links-Projection operator is an example of a structural link-oriented operator applied on a network, i.e., decomposition. This operator transforms a network into a set of links (e.g., a query that delivers the links of a network). Its signature is as follows: Links_Projection: Network-type -> Links.type The Build JnXink operator is a second example of a structural link-oriented operator applied on two sets of nodes, i.e., composition. This operator derives a set of links from two sets of nodes. The semantics of the BuildJnXink operator is similar to the BuildJn operator but the level of interaction is the link instead of being the network. Its signature is as follows: BuildJn_Link: Nodes.type x Nodes_type -> Links-type. The Links-Selection operator is an example of a semantic link-oriented operator applied on a set of links. This operator manipulates the semantics of a set of links verifying some selection criteria from a set of links (e.g., a query that delivers the flights that take less than two hours). Its signature is as follows: Links-Selection: Links_type x Criteria-type -> Links-type The Links Jntersection operator is an example of a set-oriented link-oriented operator applied on two sets of links. This operator delivers a set of links that belongs to the two sets of links of the left part of the signature. Its signature is as follows: Links Jntersection: Links-type x Links-type -> Links-type Table 4 summarises the relevant configurations for link-oriented operators with an operator example for each class (structural, semantic and set-oriented). As a link may be derived from a higher abstraction level, i.e., a network, or from a lower abstraction level, i.e., a set of nodes, structural operators are defined from Nodes-type or Network.type. By definition, no structural operator can be defined with Links-type in its signature. Topological operators are not relevant for link-oriented operators since a link is an element of the Cartesian product of atomic components, i.e., nodes. Semantic and set-oriented operators are applied on sets of links and therefore can only be defined with Links-type in their left part of the signature. 9 Derived operators The efficiency of a network query language can be improved by the definition of derived operators that combine the semantics of network, nodes and links operators. The signature of these operators may involve types such as Criteria-type, Constraints-type, Net-work(s)-type, Nodes-type or Links-type in the left part (i.e., operands) and types Nodes-type, Links-types or Network(s)_type in the right part (i.e., result). As an example, let us define the operator Starting_Places with the following signature: Starting-Places: Network-type -> Nodes.type. The Starting-Places operator returns the set of nodes which have no predecessor in a given network. This function does not increase the expressive power of the query language since it can be expressed by a composition of operators, on a network. Ne, using a functional notation by: Nodes-Difference (Origins (Links-Projection (Ne)), Destinations (LinksJProjection (Ne) ) ) Furthermore, it does not change the problematic of managing network operators as the right part of the signature is still based on the same concept: a node. However it provides a user-oriented and user-friendly operator in the context of network queries. 10 PROJECTION OPERATOR 11 Network semantic A network is a composite entity (nodes and links) whose alphanumerical properties are constrained at the internal (within the network components) or at the external levels (e.g., by another network logically connected to one or many nodes of this network). These properties convey some analogies with the spatial domain whereas the alphanumeric properties of entities may be constrained either at the internal (e.g., interior, boundary) or external levels (e.g., merge of independent spatial maps that share some common entities). Within network representations, the semantics of al-phcuiumeric properties have to be analysed with respect to their node and hnk components. This leads to separate attributes defined (and restricted to) at the composite (i.e., network or link levels) and component levels (i.e., node, link, node and link levels). From the following three sorts. Network, Node and Link, we define the notion of derived attribute and inherited attribute. Network operators allow transformations between these three sorts: Network to Node or Link, Link to Node, and Link and Node to Network. The data model associated with the result of these operators is built from the original data model (i.e., functions a, n, e) and attributes that can be provided by the operand(s). An attribute is said to be derived whenever its definition is provided by the application of an aggregate function on operand(s) (i.e., creation of a new semantics). An attribute is said to be inherited whenever its definition is provided by the conventional projection operator or by a composition or decomposition operation (i.e., propagation of an existing semantics). We introduce a set of semantic constants associated with network and network component attributes: - A "Global" network attribute is an attribute whose semantics is restricted to the composite network as a whole, i.e., no inheritance of such an attribute is authorised at the node and link component levels from the network level. A " Global" network attribute is relevant for the representation of qualitative data (e.g., an attribute that represents the general condition of a network) as well as for a network attribute derived from the application of an aggregated function on nodes and links (e.g., a cumulated length attribute of a network). Similarly a "Global" link attribute is an attribute whose validity is relevant for the link as an element of the Cartesian product N x N, i.e., this attribute is not relevant for any node component (e.g., a duration attribute for a flight link). By default node attributes are classified as "Global". - A "SubsetAT,i" network attribute is an attribute whose semantic is also relevant at the node and link composite levels, i.e., inheritance of such an attribute is authorised at the node and link component levels from the network (e.g., an attribute that represents the list of companies that use a network). - A " Subsetnetwork attribute is an attribute whose semantic is also relevant at the node composite level, i.e., inheritance of such an attribute is authorised at the node component level from the network level (e.g., an air traffic noise attribute). A "Subsetat" link attribute is an attribute whose validity is relevant for a subset of the element of the Cartesian product N x N (i.e., based on origin and/or destination). - A "Subset/," network attribute is an attribute whose semantic is also relevant at the link composite level, i.e., inheritance of such an attribute Left part of the signature Structural Semantic Set-Oriented Network_type Liiiks_Proi ection (Lmks_type)+ Links_S election Links_Intersection Nodes_type (Nodes_type)+ Build_In_Link Table 3: Link-oriented operators Let 84 be an attribute of A^ we qualify the characterisation of &i as either a Global or Subsetiv attribute depending on its semantics. Let aj be an attribute of Ajv, we qualify the characterisation of ai as a Global attribute. Let C be a function that provides the classification of an attribute Sort-type = C: string x Sort.type -> Figure 3: Semantic constants, static definitions is authorised at the link component level from the network level (e.g., length of an air traffic corridor attribute). A semantic constant "Subset/," link attribute is not directly defined at the link level as it needs an origin and a destination to exist (i.e., equivalent to a global semantics). The only way to provide a "Subset/," Unk attribute is an inheritance from the network level. No " Subsetiv" semantic constant is defined for a node attribute from the static point of view as a node represents an atomic component for network operators. The only way to provide a "Subsetat" node attribute is an inheritance from the network or link levels. Figure 2 describes the static definition of semantic constants for network component attributes. We introduce the semantic properties of the network components, from the static point of view, as follows: Let N (N, L, a) represents a network with its la-belhng function Let An,L be the set of Network attributes provided by the labelling function a Let Ax, be the set of Link attributes Let Aat be the set of Node attributes Let a, be an attribute of A^^i we qualify the characterisation of ài as either a Glolsal, SubsetAr.z,, Subset;v or Subsetjr attribute depending on its semantics. 12 Network operators The left part of a signature of an operator is built with one to several sorts (Network, Link, Node). A basic right part of a query (i.e., a result) is defined as a sort. The data model associated with the result is built from the different data models involved in the left part of the signature. Semantic constants are associated with each attribute involved in the data model (i.e., in the left part of the signature). A transfer rule is applied from the left part to the right part of the signature in order to define the result data model (i.e., a set of data model attributes and their semantic constants). The data model of the result is built with a subset of the respective data models involved in the left part and the derived attributes involved in the query. Conventional problems of database schema integration such as homonyms (i.e., two attributes with the same name but a different application semantics) are not relevant in the context of our model since the operators identified are closed on the same database schema. The unique source of conflict may be between two attributes with a same application semantic but different semantic constants. Therefore, we define an order for the semantic constants: from the lower level of abstraction to the higher: Global, Subsetjv, Subset/,, Subsetjv,L- Whenever a conflict arises, the priority is given to the higher level of abstraction (manipulations are closed on the database schema). We classify network operators into two groups: Network (ay/ Node <- (b) Link Figure 4: Decomposition Figure 5: Composition intra-component and heterogeneous operators. Intra-component operators involve the same sort in the left part and in the right parts of the signature. Intra-component operators regroup semantic and set-oriented operators. They do not provide a transfer of data models from the left part to the right part of the signature cis the semantics of the data models is similar. The data model result is defined as the union as some attributes may appear in the data model of the sub-set of the operands, nevertheless the semantics is similar since the sorts are identical. Heterogeneous operators regroup structural and topological operators and therefore involve different sorts in the left part. The definition of transfer rules is relevant to define the data model of the result. Figure 3 and Figure 4 illustrate the different levels of abstraction involved in network operators. The decomposition reflects the different levels of abstraction from networks to nodes (Figure 3). The composition reflects the different levels of abstraction from node to link - to build a link -and node and link to network - to define a network -(Figure 4). 13 Heterogeneous operators These operators provide a transfer since they manipulate network components rather than instances. Therefore transfer rules are defined from the conceptual point of view and are independent of the operator semantic (the approach is far different from spatial oriented operators as no creation of spatial representation is involved). Node-oriented operators classified as structural deal with a decomposition and lead to a transfer from the network level or the link level. An attribute for a node is derived (arrow (a) Figure 3) from a network attribute classified as Subsetat^l or Subset/^r Aat = Aat U { ai e An,l / C (a,, Network) = Subset;v,L V C (a.i, Network) = SubsetAr} An attribute for a node is derived (arrow (b) Figure 3) from a link attribute classified as Subset at,/, or Subset Ajy = Ajv u { at e A/, / C (aj, Link) = Subsetjv,/, V C (aj, Link) = Subsetjv) Link-oriented operators classified as structural deal with a decomposition and lead to a transfer from the network level. An attribute for a link is derived (arrow (c) Figure 3) from a network attribute classified as Subset AT,i, Subset AT or Subseti Ai = Ai U {ai e Ajv,l / C (ai, Network) = SubsetAf,x, V C (ai. Network) = Subset N V C (a», Network) = Subseti} Network-oriented operators classified as structural deal with a composition and lead to a transfer from the left part to the right part of a signature. Functions £ and a are involved. A signature defined with at least a Node(s)-type sort (resp. Link(s)-type) in the left part implies a transfer of attributes firom the Node(s).type (resp. Link(s)_type), i.e., the function V (resp. e), to the result. The extension of the data model - from the network on which the operator is applied or from the query definition process - is provided by aggregate constraints (i.e., function a). A network attribute is inherited from a node attribute classified as SubsetAr. A network attribute is inherited from a link attribute classified as Subseta^,i, SubsetAr or Subseti. A network attribute is derived from the query when it is required (e.g., calculated from an aggregate function) and is classified as Global. An,L = An,L U { ai e A AT / C (ai. Node) = SubsetA^} U {ai 6 Ai / C (ai, Link) = Subsetat,i V C (a,, Link) = Subsetjv V C (a^, Link) Subseti } U. { ai / ai is obtained by an aggregate function on N and/or L} Network-oriented operators classified as topological with a more complex signature than (Network_type)-l-(e.g., path operator) can be considered as a special case of network-oriented operators providing a network from a network. The nodes or the links involved in the signature must already belong to the networks involved in the left part of the signature (e.g., the origin and the destination of a path operator). Table 5 summarises the transfer function for heterogeneous operators which involve a decomposition (i.e., from a network to a link or from a link to a node). The semantic constant associated with an attribute in the result data model may be different from its initial one. Subset AT,i classification is concerned by this change as the link properties is not valid anymore when the result is a node sort. The new semantic constant is Subsetjv in this case. We extend the definition of derived attribute as follows: an attribute is said to be derived when its classification changes when its sort changes. 14 Dynamic of network operators A sequence of network operators is realised at either a same (e.g., a sequence of Node-Difference operators applied on several node sets) or different abstraction level (e.g., a sequence of operations that successively decompose a network to links and these links to nodes - arrow (c) then (b) Figure 3). We qualify these sequences as horizontal and vertical, respectively. The sequence of operators may be interpreted as the evaluation of a path in a graph G (V, E, u, e, (Figure 5). Vertices are the different sorts involved in a signature. Edges model the transition from the left part of a signature to the right part. The node labelling function models the sorts involved in a signature. The edge labelling function models the classification of attributes involved in the transfer function. V = {Network, Node, Link} E = { (Network, Network), (Network, Link), (Network, Node), (Link, Link), (Link, Node), (Node, Node) } V = sorts £-. semantic constants concerned with the transfer function from the left part to the right part 15 APPLICATION The semantic of derived results is provided by the successive propagation of semantic constants. Let us consider as an example, the Starting_Places operator. Its functional expression is: Nodes-Difference (Origins (Links.Projection (Ne)), Destinations (Links-Projection (Ne) ) ) The successive propagation of attributes throughout the application of network operators (Table 5) within this Starting-Places composed operator is as follows: Links-Projection: (Global, Subset;v, Subset/,, Subset7v,i) -> ( -) Subsetjv, Subset^ , Subset^v.^) Origins: ( -, Subsetjv, Subset^ , Subset;v,L) -> (-, Subsetjv , -, Subsetysr) Destinations ( -, Subset^v, Subset^ , Subsetjv.i) -> (-, SubsetTV , -, Subset AT ) Nodes-Difference (-, Subset^, -,-)->(-, Subset^r, Resulting node attributes are original network attributes which have Subset at or Subset iv,z, semantic constants (Subset^r.L is transferred as a Subsetjv semantic constant by the Origin and Destination operators at the links level). Let us illustrate the semantic constants and the propagation rules for network operators with our example database. The application of the Starting-Places operator on a network requires the application of the Links-Projection operator. Table 6 presents the data model transfer. Once the Links-Projection operator has been applied, the Origins and Destination operators are performed to transform a set of links into two sets of nodes. Table 7 presents the second data model transfer. The Nodes-Difference operator is applied. The data model of a node is not changed as the Nodes JDifference operator belongs to the intra-component operators. Table 8 presents the final data model associated with the nodes. This data model is enriched with a subset of the Network-type (i.e., Companies, Air-Tra0ic_Noise and Context attributes). 16 CONCLUSION The large diffusion of spatial database applications in scientific, planning and business domains implies the emergence of new requirements in terms of data representation and derivation. Particularly, current spatial data models and query language operations have to be extended in order to integrate a more complete semantic representation of complex domains. The integration and representation of graph structures within spatial data models is of particular interest for many application areas involved in the management of physical or immaterial networks. This paper proposes the study of spatial network properties and their dynamic integration (i.e., using network operators) within the database projection operator. In order to represent the semantics of spatial network, we propose a classification that distinguishes the logical, spatially complete and spatially incomplete networks. The semantic of network components are studied at the network, link and node levels. The proposed model qualifies the semantics of alphanumeric attributes by a set of constants (i.e.. Global, Subsetjv and SubsetL, SubsetAr.z,). These constants allows, or not, their propagation upward at a higher abstraction level (i.e., from nodes to link or network), downward at a lower abstraction level (i.e., from network to links / links to nodes / network to nodes) or at the same abstraction level. The propagation of these semantic properties are characterised and illustrated throughout the application of network operators that manip- Network -> Link Link -> Node Global _ Subset N Subset N Subset N Subset L Subset L - Subset n,l Subset n,l Subset N Table 4: Transfer data model for heterogeneous operators Subset n,L Subset Subset Network Suh^iet Tk.T T Subset Subset L 1 Subset L Subset Subset L Node Subset Subset 1 Link 1 Subset L Subset Figure 6: Dynamic of operators ulate network components. Further work concerns the identification of an integrated semantic model that combines geometrical and network properties. References [1] Brossier-Wansek A. and Mainguenaud M. (1995) Manipulation of graphs with a visual query language: application to a Geographical Information System. In Proceedings of the 3rd IFIP Conference on Visual Database Systems, Spaccapietra, S. and Jain, R. Eds. Chapman and Hall, London, UK, pp. 227-246. [2] Claramunt C. and Mainguenaud M. (1995) Dynamic and flexible vision of a spatial database. In Proceedings of the DEXA95 International Workshop on Database and Expert System Applica- tions, London, UK, Revell, N. and Min Tjoa, A. Eds., Omnipress, pp. 483-492. [3] Claramunt C. and Mainguenaud M. (1996) A spatial data model for navigation knowledge. In Advances in GIS Research II, Delft, The Netherlands, Kraak, M-J. and Molenaar, M. Eds., Taylor and Francis, pp. 345-357. [4] Cruz I. F., Mendelzon A. 0. and Wood P. T. (1987) A graphical query language supporting recursion. In Proceedings of the ACM SI G Management Of Data -SIGMOD- Conference, San-Francisco, USA, pp. pp. 323-330. [5] David B., Raynal L., Schorter G. and Mansart V. (1993) Ge02: Why objects in a geographical DBMS. In Advances in Spatial Databases, Abel, D. J. and Ooi, B. C. Eds. Springer-Verlag, Singa- Attributes Semantic constant Links_Projection Oid Global - Condition Global - Cumulated_Length Global _ Companies Subset n,l Subset n,l Length_Air_Traffic_Comdor Subset L Subset L Air_TrafFic_Noise Subset N Subset n Context Subset n,l Subset n^l Table 5: Data model transfer for the Links-projection operator Attributes Semantic constant Origins/Destinations Companies Subset n,l Subset n Length_Air_Traffic_Comdor Subset l - Air Traffic Noise Subset n Subset n Context Subset n,l Subset N Table 6: Data model transfer for the Origins/Destination operators pore, Lecture Notes in Computer Science, n. 692, pp. 264-276. [6] Egenhofer M. (1990) Manipulating the graphical representation of query results in geographic information systems. In Proceedings of the IEEE Workshop on Visual Languages, Skokie, Illinois, pp. 119-124. [7] Frank A. U. (1982) Mapquery - Database query language for retrieval of geometric data and its graphical representation, ACM Computer Graphics, 16 (3), pp. 199-207. [8] Guptill S.C., Morrison J.L. (1995) Elements of Spatial Data Quality, Elsevier Science and the International Cartographic Association, Oxford, UK. [9] Guting R. H. (1989) GRAL: An extensible relational database system for geometric applications. In Proceedings of the 15th International Conference on Very Large Data Bases, VLDB, Amsterdam, The Netherlands, pp. 33-44. [10] Guting R. H. and Schneider M. (1993) Realms: A foundation for spatial data types in database systems. In Advances in Spatial Databases, Abel, D. and Ooi, B. C. eds, Springer-Verlag, Singapore, Lecture Notes in Computer Science, n. 692, pp. 14-35. [11] Guting R. H., de Ridder T. and Schneider M. (1995) Implementation of the ROSE algebra: Efficient algorithms for Realm-based spatial data types. In Advances in Spatial Databases, Egenhofe, M. J. and Herring J. R. eds., Portland, USA, Springer-Verlag, pp. 216-239. [12] Haas L. and Cody W. F. (1991) Exploiting extensible DBMS in integrated GIS. In Proceedings of the 2nd International Symposium on Large Spatial Database, Gunther 0. and Schek H.-J. eds, Springer-Verlag, Zurich, Lecture Notes in Computer Science, n. 525, pp. 423-450. [13] Kolovson P.C., Neimat M. and Potamianos S. (1993) Interoperability of spatial and attribute data managers: A case study. In Advances in Spatial Databases, Abel D. J. and Ooi B. C. eds. Springer-Verlag, Singapore, Lecture Notes in Computer Science, n. 692, pp. 239-263. Attributes | 1 Semantic constant Oid Global Representation Global Category Global Companies Subset N Air_Traffic_Noise Subset N Context Subset N Table 7: Final data model [14] Kuiper B. (1978) Modelling spatial knowledge. Cognitive Science, 2, pp. 129-153. [15] Larue T., Pastre D. and Viemont Y. (1993) Strong integration of spatial domains and operators in a relational database system. In Advances in Spatial Databases, Abel D. J. and Ooi B. C. eds., Springer-Verlag, Singapore, Lecture Notes in Computer Science, n. 692, pp. 53-71. [16] Mainguenaud M. (1994) Consistency of geographical information system results. Computers, Environment and Urban Systems, Vol. 18,Pergamon Press, pp. 333-342, . [17] Mainguenaud M. (1995) The modelling of the geographic information system network component. International Journal of Geographical Information Systems, 9 (6), Taylor and FVancis, pp. 575593, . [18] Mainguenaud M. (1996) Constraint-based queries in a geographical database for network facilities. Computers, Environment and Urban Systems, Pergamon Press, Vol. 20, pp. 139-151. [19] Orenstein J. A. and Manola, F.A. (1988) PROBE spatial data modeling and query processing in an image database application. IEEE Transactions on Software Engineering, 14 (6), pp. 611-629. [20] Peuquet, D. J. (1984) A conceptual framework and comparison of spatial data models. Carto-graphica, 21 (4), pp. 66-113. [21] Scholl M. and Voisard A. (1989) Thematic map modelling. In Proceedings of the 1st International Symposium on Large Spatial Databases, Santa Barbara, USA, Springer-Verlag, Lectures Notes in Computer Science, n. 409, pp. 167-190. [22] Stemple D., Sheard T. and Bunker R. (1986) Abstract data types in databases: Specification, Manipulation and Access. In Proceedings of the 2nd Int. Conference on Data Engineering, Los Angeles, pp. 590-597. [23] Van Oosterom P. J. M. (1993) Reactive Data Structures for Geographic Information Systems, Oxford: Oxford University Press. Analysis of Cache Sensitive Representation for Binary Space Partitioning Trees Vlastimil Havran Czech Technical University in Prague Dept. of Computer Science and Engineering Faculty of Electrical Engineering Karlovo nam. 13, 12135 Prague Czech Republic Phone: +420 2 24357432, Fax: +420 2 298098 E-mail: havran@fel.cvut.cz Keywords: binary tree, binary space partitioning, kd-tvee, cache, spatial locality Edited by: Frederick E. Petry, Maria A. Cobb and Kevin B. Shaw Received: November 15, 1998 Revised: May 21, 1999 Accepted: June 10, 1999 Several variants of binary search trees were designed to solve various types of searching problems including geometrical ones as point location and range search queries. In complexity analysis we usually abstract from the real implementation and easily derive that the time complexity of traversal from the root of a balanced tree to any leaf is 0(log m), where m is the number of leaves. In this paper we analyse a new method for memory mapping of a binary tree aiming to improve spatial locality of data represented by binary trees and thus performance of traversal algorithms applied on these data structures. 1 Motivation The basic motivation for this research comes from binary search trees for computer graphics applications, where they are used to accelerate ray-shooting. To solve this problem space subdivision schemes are used, see [Watt92] for survey. One space subdivision is an orthogonal binary space partitioning tree {BSP tree or BSPT in the following text). It is often referred to as fcd-tree in the context of computational geometry [Berg97]. It was initially developed to solve the hidden surface problem in computer graphics [FuchsSO]. A BSPT is a higher dimensional analogy to a binary search tree. The BSPT for a set S of objects in 5R" is a binary tree defined as follows. Each node v in BSPT represents a non-empty box (rectangular parallelepiped) Ry and set of objects that intersects Ru. The box associated with the root node is the smallest box containing all the objects from S. Each interior node of BSPT is assigned cutting plane Hy that splits Ry into two boxes. Let be the positive halfspace and H~ the negative halfspace bounded by Hy. The boxes associated with the left and the right child of V are Ry Pi H^ and Ry n Hy , respectively. The left subtree of u is a BSPT for a set of objects S~ = {s n e Su}, the right subtree is defined similarly. The leaves of the BSPT are either occupied by the objects or vacant. The BSPT is constructed hierarchically step by step until termination criteria given for leaf are reached. There are usually two termination criteria. First, maximum depth of BSPT is specified. Second, a node becomes a leaf if the number of objects associated with the node is smaller than a constant. The cutting plane H is for ease of computing search queries perpendicular to one of coordinate axes {orthogonal cutting). The example of BSPT in space is depicted in Fig. 1. The most important operation carried out for any BSPT in any application is exhaustive traversal; for example the traversal in depth-first-search (DFS) order. It occurs when BSPT built for n-dimensional data is used for point location and range search queries [Samet90]. Several variants of BSPT are thus extensively used in GIS and other spatial database systems. This decade I/O efficient algorithms and data structures for memory hierarchies have acquired noticeable research interest. The design of these data structures is driven by properties of external/internal memory hierarchy. Some achieved results are given for example in [Chiang95]. The example of design for sorting algorithm which takes into account the memory hierarchy is [Nyberg95]. In this paper we do not deal with external memory data structures, but with the internal memory hierarchy between the processor and the main memory including either on-chip cache or second-level cache. The main difference between this hierarchy and exter- tree lists of links to objects object data 1 2 3 4 5 6 CO ® 12 3 4 t 5 6 CO ® ^CO ® fh 1 2 3 4 5 6 Figure 1: Binary space partitioning tree in space nal memory one is the size of and the access time to one data block. Those for external memory hierarchy are much larger than the ones between the processor cache and the main memory. Second, techniques for external memory data structures were developed mostly for one-dimensional search problems. For example, well known j5-tree [Cormen90] cannot be used to decrease time complexity of the BSPT traversal for n > 1, since the ß-tree cannot represent n-dimensional data. In this paper we analyse novel methods to increase spatial locality of data in the cache and thus to decrease the execution time of any algorithm that uses BSPT. For the sake of simplicity we assume traversing BSPT in DFS order from root to a leaf. 2 Preliminaries In this section we recall several facts necessary to understand the concept of BSPT nodes memory mapping. This includes memory allocation techniques and the structure of the memory hierarchy. 2.1 Memory Allocation The key idea of this paper is mapping BSPT nodes to addresses in the main memory. Allocation of dynamic variables is always provided by a memory allocator. Let us suppose the contiguous block of the unoccupied memory is assigned to the memory allocator at the beginning. This is used to assign the addresses within the block to the variables allocated so the variables do not overlap. We call this memory block a memory pool. Since the mapping is crucial for the main contribution of this paper, we discuss it in detail. Common solution is to use a general memory allocator. Each BSPT node is then represented as a specially allocated variable. Let 5/ denote the size of memory to store information in a node. This is the position and the orientation of the splitting plane. Let Sp be the size of a pointer. Then the size required to represent one interior BSPT node is Sj^ = Si + 2.Sp. Use of the general memory allocator requires to store two additional pointers with each allocated variable that are used later to free this variable from memory pool. In this paper we also use another strategy to allocate the BSPT node. We use a special memory allocator described for example in [Stroustrup97] to allocate variables of the same type and thus of the same fixed size Sv- We use BSPT nodes of fixed size and dedicate them a special memory pool. During building up BSPT the nodes are allocated from the memory pool as from an array in linear order. 2.2 Memory Hierarchy The time complexity of a traversal algorithm using BSPT is connected with the hardware used. Let us recall the organisation and the properties of the memory hierarchy. For analysis we suppose Harvard architecture with separated caches for instructions and data. Let Tmm denote latency of the main memory (time to read/write one data block). The larger the memory and the smaller the access time, the higher the cost of the memory. The instruction/data latency of processors is smaller than Tmm-That is why a cache is placed between the memory and the processor. The cache is a memory of relatively small size with respect to the size of the main memory. The cache latency Tc is smaller than Tmm- This solution is economically advantageous; it uses temporal and spatial locality of data exposed by a typical program and the average access time can be significantly reduced. Data between the cache and the main memory are transferred in blocks. The size of the block transferred is referred to as cache line size Scl- Typical memory hierarchy is depicted in Fig. 2. Size Access time [words] [cycles] 64 to 256 ! 8 K 256 K 32 M to 256 M < 1 1 to 2 Sto 15 40 to 100 Figure 2: Typical memory hierarchy In this paper we use for analysis only the one cache placed between the processor and the main memory. We denote the time consumed by operations in terms of cycles. Let Tw denote the average processing time on a BSPT node to decide whether to follow its left or right descendant. Typical values for today's superscalar processors and typical application are Tmm = 55,70 = 4, Tiv = 5,5c/, = 128 Bytes for MIPS R8000. These values are taken from [SGI96]. They are used further in the paper. Note that for a typical search algorithm on BSPT holds Tw ^ Tmm- 3 BSPT Representations As we already stated the BSPT is actually represented by a binary tree. In general, a binary tree does not represent a valid instance of BSPT, since the splitting plane has to intersect the bounding box associated with the node. This is one of the reasons why the decomposition induced by BSPT cannot be simply replaced by B-trees or some hashing scheme commonly used for one-dimensional search problems. The information stored in BSPT node is the orientation and the position of splitting plane. The axis aligned bounding box is known explicitly for a root node only. The axis aligned bounding boxes associated with interior and leaf nodes are not stored explicitly in these nodes, but they can be derived by traversing down the tree. Let us recall some terminology concerning binary trees. The depth of a node A in the tree is the number of nodes on the path from the root to the node A. The depth of root node is zero. We call a binary tree complete if all its leaves are positioned in the same depth d from the root node and thus the number of leaves is 2'^. An incomplete binary tree is the one that is not complete. Let he define complete height of a binary tree A as the maximum depth for which the binary tree constructed by the nodes of A is complete. The same definitions hold for BSPT. The next four subsection gives details of BSPT representations in the memory. This includes a usual method to represent BSPT nodes using general memory allocator. We call this random representation. The less used method is DPS order representation. Finally, we describe two forms of a subtree representation that we designed to decrease further the average traversal time on BSPT tree. 3.1 Random Representation A common way to store the arbitrary BSPT in the main memory is to represent each node as a special variable using general memory allocator. The representation is depicted in Fig. 3 (a). This representation requires additional memory for pointers used by general memory allocator for each allocated variable, but it is the simplest technique to implement. The addresses of nodes in the main memory have no connection with their location in the BSPT. Assume that two additional pointers are needed to allocate the variable. Then the memory size Ms consumed by random representation to store A^atq nodes of BSPT is: 3.2 Depth-First-Search (DFS) Representation (1) A DFS representation is implemented by using the allocator for fixed size variables described in subsection 2.2. In this representation the nodes are put subsequently in the memory pool in linear order, when BSPT is built up in the DFS order, see Fig. 3 (b). The size of the memory consumed to represent N^o nodes of BSPT is: Mf ^^ = iV;vo.(2.Sp + 5/) (2) Then 2.Nno-Sp of memory taken by pointers to implement general memory allocator is saved in comparison with random representation. 3.3 Subtree Representation The main goal of this paper is the analysis of BSPT representation proposed originally in [Havran97] to reduce the time complexity of ray-shooting query per- 6 11 15 13 8 1 12 5 9 14 2 7 4 10 3 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 1 2 3 4 5 6 7 8 9 10 1l|l2 13 14 15 (a) (b) (c) Figure 3: BSPT representations (cache line size Sgl = 3.sÌ2:e(node of BSPT)) (a) Random (b) DFS (c) Subtree formed on BSPT. Let us describe the representation in detail. We also use allocator for fixed size variables, but the size of one allocated variable is equal to cache line size SsL- The variable is subsequently occupied by the nodes organised into subtree. The whole BSPT is then decomposed to subtrees, see Fig. 3 (c). Once the subtree is read to the cache, the access time to its nodes is equal to cache latency Tc- The subtree need not be complete. We distinguish between two subtree representations, see Fig. 4. An ordinary subtree has all nodes of the same size, with two pointers to its descendants, regardless of whether the descendant lies in the subtree or not. A compact subtree has no pointers among the nodes inside the subtree because their addressing is provided explicitly by a traversal program. The pointers are needed only to point between the subtrees. The leaves in an incomplete subtree have to be marked in a special variable stored in each subtree (one bit for each node). The size of the memory described by both subtree representations is given in the next section. 4 Time Complexity and Cache Hit Ratio Analysis In this section we analyse the time complexity of a DFS order traversal for all the BSPT representations described in previous section. The theoretical analysis assumes that the BSPT nodes data stored in the main memory are not loaded into the cache, i.e., cache hit ratio Chr = 0.0. Further, we suppose that the BSPT is complete and its height is hi. An incomplete BSPT requires to compute its average depth hi and substitute it for hi- These simplifications enable us to express the average traversal time Ta on BSPT in DFS order from its root to a leaf. We compute the Ta for an example of BSPT of height hi = 23. Further, we suppose random traversal and the probability that we turn left in a node is equal to pL = 0.5. If some data are already located in the cache {Chr > 0.0), the analysis can be very difficult or even infeasible. The interested reader can follow e.g. [ArnoldQO]. Since the cache has asynchronous behaviour, we analysed the case by means of simulation. 4.1 Random Representation We suppose Chr = 0.0 during the whole traversal, i.e., the processing time of each BSPT node is Tmm + Tw- As we know that the number of nodes along the traversal path from root to the leaf is /ij 4-1, we can express the average traversal time Ta as follows: TA = {hi + l).{TMM+Tw) (3) For values given above (Tmm = 55, Tw = 5, hi = 23) we obtain Ta = 1392.0 cycles. 4.2 DFS Representation The DFS representation increases the cache hit ratio by involuntary reading the descendant nodes for next traversal step(s) if traversal continues to the left de-scendant(s) of the current node. Assuming the size of the BSPT node is Sin = 5/ + 2.Sp, we derive the average traversal time Ta as follows: Ta = {hi + + Tw ScL Sin +Tc.{l - + (1 - Pl).Tmm] (4) For 5/Ar = 4 + 2.4 = 12, Scl = 128, and pi = 0.5 we obtain Ta — 859.1 cycles. 4.3 Ordinary Subtree Representation Assume that Scl and Sin are given. Let Sst be the size of the memory needed for each subtree used to represent subtree type identification. We express the size of the memory taken by a complete ordinary subtree of the height h: TUJ rrm g ¥ girn m[i7] Dni ¥ W ¥ w * i 1 2, 1 X J 5 1 I'elil Il7 1 III 1 II10I 1 1 1111 1 1 1 ^ y y (a) (b) Figure 4: Subtree representation: (a) Ordinary (b) Compact 4.4 Compact Subtree Representation Mih) = {2''+'-l).Sm + SsT M{h) < ScL (5) Prom Eq. 5 we derive the complete height of the ordinary subtree he'- = + + (6) JIN The number of nodes in the incomplete ordinary subtree in the depth d = /ic + 1 is then: M , ScL - - l).SiN - SsT I Nodk = L--J (7) Let Si be the size of the memory to represent the information in the BSPT node, Sp the memory taken by one pointer. The size of the memory consumed by a complete subtree of the height h is expressed as follows: Mih) = (2''+^ - 1).5/ + +SsT (11) Mih) < Sgl The complete height he of subtree is from Eq. 11 derived similarly to Eq. 6 as follows: Si + Sp In the same way as for the ordinary subtree rep-The average height of the subtree ha > he for resentation we derive the number of nodes Nodk lo- Nodk > 0 is computed as follows: /lA = -1 + log2(2''^+i + Nodk) (8) Finally, the average traversal time for the whole BSPT of height hi is: cated in the depth d = he + 1 in the subtree: , ScL - 2'^o+\iSi + Sp) +Si- SsT , Nodk = L--J (13) The unused memory for one subtree in the cache line can be derived similarly as for ordinary subtree: Ta = ihi + l).iTw + Tmm +Tc.ha hA + 1 ) (9) ^CSR unused The subtrees are placed in the main memory so they are aligned with the cache lines when read to the cache. Each subtree corresponds to one cache line. The size of the unused memory in the cache line is then: M^ni^'seä = ScL -1 + Nodk).Sin -SsT (10) For Sin = 12, Sst = 4, we get he = 2, Nodk = 3, hA = 2.46, M^^J^^^ = 4, and the average traversal time Ta = 555.9 cycles. ScL - -1 + Nodk).Sn -2.Sp.iNoDK + - NodkI2) -Sst (14) The average height of the subtree hA and the average traversal time Ta are computed using Eq. 8 and Eq. 9. Given Sp = 4, 5/ = 4, and Sst = 4 we compute he = 3, Nodk = 0, = 3.0, ^ = 0, and Ta = 510.0 cycles. The he, Nodk, hA as the function of the cache line size for ordinary and compact subtree representations and T A for all BSPT representations are depicted in Fig 5. NodkI-: Figure 5: The analysis: (A) Average traversal time Ta{Scl) for all BSPT representations, (B) HaÌScl), (C) Nodk{CL), (D) hc{CL) for subtree representations; Representation (a) Random (b) DFS, (c) Ordinary subtree, (d) Compact subtree 5 Simulation Results We implemented a special program simulating the data transfer in a typical memory hierarchy for the DFS traversal on a complete BSPT. The simulation was carried out for the same memory hierarchy and BSPT properties as in previous section: Tmm = 53, Tc = 4, Tw = 5, hi = 23, Sp = 4 Bytes, 5/ = 4 Bytes, SsT = 4 Bytes, four-way set associative cache with cache line size Scl = = 128 Bytes, the size of the cache was 2^° Bytes. The cache placement algorithm and its structure correspond to those found in current superscalar processors, e.g., MIPS R8000 or MIPS RIOOOO (see [SGI96]). The theoretical, simulated times, and their ratio are summarised in Table 1. The parameter Chr is the average cache hit ratio to access a BSPT node in the cache during traversal. The average cache hit ratio for the node as the function of its depth in BSPT is in Table 2. Note that for Scl = 128 the compact subtree is complete, so the cache hit ratio for all the nodes at the same depth in the BSPT is equal. This is the reason why Chr for depth 12, 16, and 20 are quite different from neighbour values, since these BSPT nodes are often read from the main memory. The probability that these nodes are already loaded in the cache is smaller with the increasing depth. The average traversal times obtained by simulation correlate well with those computed theoretically. It is obvious the times obtained by the simulation are smaller than these derived theoretically, since the theoretical analysis supposes in each step an initial value of Chr = 0.0. 6 Conclusion In a previous paper [Havran97] we showed experimentally that ordinary subtree representation can decrease traversal time for ray-shooting using BSPT by 40% in a ray tracing application. In this paper we have analysed the time complexity and cache hit ratio of different BSPT representations for DFS order traversal in detail. We have shown the time complexity of traversing of a BSPT is reduced by organising its inner representation that matches better the memory hierarchy. The subtree representation decreases the traversal time for DFS order by 62% and increases hit ratio from 35% to 90% for a given example of common Representation Random DFS Ordinary subtree Compact subtree Ta (theoretical) T'a (simulated) 1392.0 987.1 859.1 629.4 555.9 445.6 510.0 379.3 ratio = Ta/T'a 1.41 1.36 1.24 1.34 Chr% 35.8 69.8 83.5 90.3 Table 1: The average traversal time computed theoretically and obtained by the simulation Depth 0 1 2 3 4 5 6 7 8 9 10 11 Chr (Random) 100 100 100 100 97 91 62 52 39 25 21 18 Chr (DPS) 100 100 100 100 100 93 79 84 58 56 63 51 Chr (Ordinary subtree) 100 100 100 100 100 100 97 73 90 85 53 79 Chr (Compact subtree) 100 100 100 100 100 100 100 100 69 100 100 100 Depth 12 13 14 15 16 17 18 19 20 21 22 23 Chr (Random) 21 19 19 0 0 0 0 0 0 0 0 0 Chr (DPS) 57 59 47 59 54 48 51 49 47 54 43 54 Chr (Ordinary subtree) 80 64 66 79 66 70 72 74 61 75 74 62 Chr (Compact subtree) 7 100 100 100 1 100 100 100 0 100 100 100 Table 2: The cache hit ratio Chr[%] as the function of node depth in BSPT memory hierarchy. Moreover, proposed representation decreases the memory required to store BSPT in the main memory by 57%. 7 Future Work The presented technique is widely applicable to other hierarchical data structures as well. Future work should include research of variants of multidimensional binary trees and hierarchical data structures in general. Dynamization of these data structures with regard to cache sensitive representation is also interesting topic to be researched. ACKNOWLEDGEMENTS I would like to thank Jan Hlavička for delivering the subject of Advanced Computer Architectures and thus compelling me to write a report on this topic. Further, I wish to thank Pavel Tvrdik and all the anonymous reviewers for their remarks on the previous version of this paper. This research was supported by Grant Agency of the Ministry of Education of the Czech Republic number 1252/1998 and by Internal Grant Agency of Czech Technical University in Prague number 309810103. References [ArnoldQO] Arnold, O.A. Probability, statistics, and queuing theory with computer science applications, Second edition, Academic Press, San Diego, 1990. [Berg97] de Berg, M., van Kreveld, M., Overmars, M., Schwartzkopf, 0. Computational Geometry, Algorithms and Applications, Springer Verlag, 1997. [Chiang95] Chiang, Y.-J. Dynamic and I/O-Efficient Algorithms for Computational Geometry and Graphs Problems: Theoretical and Experimental Results, Ph.D. Thesis, Dep. of Comp. Sci., Brown University, 1995. [Cormen90] Gormen, T.H., Leiserson, C.H., Rivest, R.L. Introduction to Algorithms, The MIT Press, Cambridge, Massachusetts, 1990. [FuchsSO] Fuchs, H., Kedem, M.Z., Naylor, B. On Visible Surface Generation by A Priori Tree Structures, Proceedings of SIGGRAPH'80, Vol. 14, No. 3, July, pp. 124-133, 1980. [Havran97] Havran, V., Cache Sensitive Representation for ESP trees, Compugraphics- 'P7, International conference on Computer Graphics, Portugal, December 15-18, pp. 369-376, 1997. [Nyberg95] Nyberg, C., Barclay, T., Cvetanovic, Z., Gray, J., Lomet D.B. AlphaSort: A Cache-Sensitive Parallel External Sort, VLDB Journal, Vol. 4, No. 4, pp.603-627, 1995. [Samet90] Samet, H. The Design and Analysis of Spatial Data Structures, reprinted with corrections in 1994, Addison-Wesley, 1990. [SGI96] Silicon Graphics Power Challenge, Technical Report, 1996. [Stroustrup97] Stroustrup, B. The C++ Programming Language, 3rd ed., Addison-Wesley, 1997. [Watt92] Watt, A., Watt, M. Advanced Animation and Rendering Techniques, ACM-PRESS, Addison-Wesley, 1992. Improved Representations for Spatial Data Structures and Their Manipulations Kuo-Liang Chung Department of Information Management and Institute of Information Engineering National Taiwan University of Science and Technology No. 43, Section 4, Keelung Road, Taipei, Taiwan 10672, R. 0. C. Phone: +886 2 27376771, Fax: +886 2 27376776 E-mail: klchung@cs.ntust.edu.tw AND Jung-Gen Wu Department of Information and Computer Education National Taiwan Normal University No. 162, Section 1, Hoping E. Road, Taipei, Taiwan 10610, R.O.C. Phone: +886 2 23622841 ext 19, Fax: +886 2 23512772 E-mail: jgwu@ice.ntnu.edu.tw Keywords: Bintrees, Image Compression, Image Manipulations, Quadtrees, Spatial Data Structures Edited by: Frederick E. Petry, Maria A. Cobb and Kevin B. Shaw Received: November 16, 1998 Revised: May 19, 1999 Accepted: June 10, 1999 Based on some observations on quadtrees, this paper fìrst presents two improved representations for the Unear quadtree and D F-expression. Then, we present three improved representations for the S-tree, bincodes, and logical bincodes. Some experiments are carried out to evaluate the performance of the five proposed improved representations and the existing corresponding representations. Experimental results show that all the proposed improved representations have better compression ratios when compared to the existing ones. Especially, the improved representations for the linear quadtree, bincodes, and logical bincodes have some significant compression performance. Finally, a few image manipulations, such as area calculation, centroid calculation, and set operations, on the proposed improved representations are discussed. 1 INTRODUCTION gorithms on BCs for GIS applications were presented in [3]. Using BCs as the input, Wu and Chung [14] pre- The quadtree [4] (QT) is a well-known binary image sented the logical bincodes (LBCs), which employ the representation and can reduce the memory require- logical expression, and can support some fast image ment through the use of aggregation of homogeneous manipulations. blocks. It also can speedup many related image manip- ^ , , ^r^ , ulations. Samet [9] has surveyed many applications in ^^^^^ observations on QT, this paper first image processing, pattern recognition, computational representations for LQ and geometry, computer graphics, spatial databases, geo- ^^^^-expressions. Following the similar observations graphic information systems (GIS), etc. f P^^^®®^* improved representations Instead of using a pointer-type data structure to ^^^ ^T BCs, and LBCs. Some experimentations represent a QT, Gargantini [1] presented a pointerless out to evaluate the performance of the spatial data structure (SDS), called the linear quadtree P"^®?«®®^ five improved representations and the cor- (LQ), which uses a set of codes to encode the leaf nodes responding existing ones. Experimental results show in the QT. The LQ improves the memory efficiency of ^^^^ ^^^ ^^^ P'^^P"®®^ representations have the QT. Another approach called the DF-expression compression ratios when compared to the ex- [6, 11] represents the QT as a string by traversing the f improved representations QT in a preorder manner. Based on the bintree (BT) ^^^ ^Q, BCs, and LBCs show a better compres- [5], Jonge, Scheuermann, and Schijf (1994) [2] pre- sion performance. Finally, a few imap manipulations, sented the S-tree (ST) image representation. Bincodes calculation, centroid calculation, and set (BCs) were proposed by Ouksel and Yaagoub [8] and operations (union, intersection, and complement), on were shown to have some space improvement over the ^he proposed improved representations are discussed. LQ in empirical comparisons [10]. Some fast image al- The remainder of this paper is organized as follows. Fig. 1. An image example. Section 2 reviews the existing five tree-based SDSs mentioned above in more detail. Some observations on QT and the proposed improved representations are presented in Section 3. In Section 4, some experiments on real images are carried out to demonstrate the compression performance. Some image manipulations on these proposed representations are discussed in Section 5. Some concluding remarks are given in Section 6. 2 TREE-BASED SPATIAL DATA STRUCTURES In this section, we use a simple example to explain the five existing SDSs mentioned above. For a QT, if the entire image is totally black or white, it is represented by a root node; otherwise, the root node is grey and the image is split into four equal-sized subimages, one for each quadrant, that are labeled sw (southwest), se (southeast), nw (northwest), and ne (northeast), respectively. This subdivision process is then repeated recursively for each of the four subimages until the subimage is totally black or white. A leaf node in a QT is called an external node; an internal node is called a grey node. Given a binary image with x 2^ pixels as shown in Fig. 1, where each black block is represented by a. square box, the corresponding QT is shown in Fig. 2. 2.1 Linear Quadtree (LQ) Without using pointers, an LQ [1] represents a QT by a set of codes, and each code is obtained by encoding a path from the root to that black node in the QT. Let the sw quadrant, the se quadrant, the nw quadrant, and the ne quadrant be encoded with 0, 1, 2, and 3, respectively. Then, the external node Hi in Fig. 2 is encoded by 01; F is encoded by 02; H2 is encoded level 0 e hi f h2 Fig. 2. The QT of Fig. 1. by 03; P is encoded by IX, where X is a don't-care symbol, and so on. The LQ only encodes all the black nodes in the QT using a preorder traversal. Suppose the given image is of size 2^ x 2^. For each black node in the QT, the length of the corresponding code in LQ is N. On the other hand, the code for a black node at level I will have N -1 consecutive X's in the rightmost part of that code. For each code, the first symbol in the LQ needs two bits, and each of the remaining symbols needs three bits since no symbol can start with an X symbol. Thus, it requires 2 H- 3 x (A'' - 1) bits to represent any black node in the QT. Using the above LQ encoding scheme by traversing the QT in a preorder way, the black nodes in Fig. 2 are encoded by the sequence 0102031X202123. 2.2 DF-expression Given a QT, the corresponding DF-expression [6] is based on a preorder traversal of the QT. During the traversal, if the encountered node is a black node, we append the symbol 'B' to the jDF-expression; if the encountered node is a white node, we append the symbol W; we append the symbol '(' when the encountered node is a grey node. Suppose the number of nodes in the given QT is q, both the DF-expression and the LQ can be obtained in 0{q) time. The £>F-expression of Fig. 2 is i{WBBBB{BBWBW. n h 2.4 Bincodes (BCs) The BCs are obtained based on the BT structure and represent the BT as an ordered collection of black nodes in the BT. Given a, x binary image, each black node at level I and at location {x,y), which is located at left-bottom corner of the corresponding block, is encoded as b{l,x,y) = x 24/=+3) + X 2^'=+!) + X where xn^iXn-2.....a;o and yN-iyN-2.....yo denote the binary representations of x and y, respectively, and s = - = (s2JV-iS2JV-2.....so}2 with sub- levefecript 2 denoting base 2. In fact, the encoded BC 0 for that black node is expressed as the sequence (xjV-lS2N-iyN-lS2N-2XN-2S2N-3—XoSiyoSo)2- In Fig. 3, the block H at location (1,0) and at level 3 is encoded as (01011100)2 = 92 since i = (01)2, j = (00)2, and s = (1110)2- By traversing all the black nodes in the BT in a preorder fashion, the BCs of Fig. 3 are represented by the strictly increasing ordered sequence (87,92,117,124,208). Fig. 3. The BT representation of Fig. 1. linear-tree table :000011100111011 color table : 0 1 1 1 0 1 1 0 Fig. 4. The ST of Fig. 3. 2.3 S-tree (ST) The three image representations described in this and the following two subsections are based on the BT structure. In this subsection, we first introduce the BT, then describe the ST [2], The BT [9] is based on the recursive subdivision of the image into two equal-sized subimages. At each step, the splitting alternates between the horizontal i-, and vertical j-, axis. If the subarray does not consist entirely of I's or entirely of O's, it is.further subdivided into two equal-sized subimages until blocks that consist entirely of I's or entirely of O's are obtained. The corresponding BT of Fig. 1 is shown in Fig. 3. The ST consists of two array tables, namely, the linear-tree table and the color table. During a preorder traversal of the BT, at each time, we append a '0' when a grey node is encountered, and a T when a leaf node is encountered to the linear-tree table. Furthermore, we append a '1' ('0') when a black (white) leaf node is encountered to the color table. The ST for the BT of Fig. 3 is shown in Fig. 4. 2.5 Logical Bincodes (LBCs) Observing the process in building the BT, we first divide the original image into two equal-sized subimages in the ar-direction. All the pixels in the left (right) subimage have their xn-\ to be 0 (1); the other coordinate-variables xn-2,-", Un-i, yN-2,---, and yo are viewed as don't-care symbols. _ Logically, we denote the left (right) subimage as Xjv-i (X;v_i). Then, we divide the two resulting subimages in the y direction. The resulting four subimages, namely, the left-lower part, left-upper part, right-jower part, and right-upper part, are denoted by Xn-iYn-i, Xn-iYn-i, Xn-iYn-1, and Xm-iYn-i, respectively. In [14], each pair of bits XkS2k+i or ykS2k in one BC is interpreted as a logical function of variable Xk or Yk- (01)2 is used to represent Xk or Yk, (11)2 is used to represent Xk or Yk, and (00)2 is used to represent the don't-care symbol 'J'. The BC of the block H in Fig. 3 is represented by (01011100)2 and using this interpretation, the corresponding LBC is represented by Xil^iXo^. Some block whose logical representation has more than one '5'. For example, the block P in Fig. 3 is represented logically by Since all the '(5's are at the end of the logical expression, only one 'J' is needed to show the ending of one LBC, and this can save some storage space. Consequently, the LBCs of Fig. 3 can be represented by a logical expression X^Y^XqYO + XiY^XoS + X^YiXoYo + XiYM + XifiJ. 3 IMPROVED REPRESENTATIONS Let us consider the example shown in Fig. 5. The subtree from level 0 to level 3 is a complete subtree. Obviously, the codes used in the tree-based SDS mentioned in Section 2, e.g. LQ, only used to encode the information in the edges and nodes in the QT ranging from level 2 to level 4, but it is unnecessary to encode the information in the subtree from level 0 to level 1. Therefore, the topmost two levels can be discarded; this leads to an improved representation and has a storage-saving effect. Similarly, the DF-expression can discard the topmost levels in the QT. However, the DF-expression can discard one more level than that of the improved LQ representation since the LQ representation encodes only the black nodes and we need to preserve the information one level above the bottom level of the complete subtree to maintain the order of the resulting LQ codes, which will be used to recover the original codes. The DF-expression stores both the white and black nodes, so one more level can be discarded without losing any information when compared to the improved LQ representation. By the same arguments, for the ST, BCs and LBCs, we can use the above observation to reduce the memory requirement for representing them. In what follows, the QT as shown in Fig. 5(b) and the BT as shown in Fig. 6(b) are used to demonstrate the proposed five improved representations. In order to simplify the presentation, only the first quadrant of Fig. 5 is depicted in detail. 3.1 Improved LQ (ILQ) For the first quadrant of Fig. 5(a), the codes of LQ are 0003, 0012, 0013, 0021, 0023, 003X, 0102, 0103, 0112, 0113, 012X, 013X, 0201, 0203, 021X, 0221, 0223, 023X, and 033X. Looking at these 19 codes, the leftmost significant digit, say the first digit, of each code is 0 since these codes all branch from the leftmost edge encoded by (0)4 = (00)2 from the root node of Fig. 5(b). Similarly, the second digit of the first six codes is 0; the second digit of each code from the 7th (13th) one to the 12th (18th) one is 1 (2); the third digit of the last code is 3. For this quadrant, if we discard the first digit, say 0, of these 19 codes, the resulting codes are 003, 012, 013, 021, 023, 03X, 102, 103, 112, 113, 12X, 13X, 201, 203, 21X, 221, 223, 23X, and 33X. This new representation is called the improved LQ (ILQ) for the first quadrant. By the same arguments, for the LQ codes in the second quadrant, the third quadrant, and the fourth quadrant, the corresponding ILQ codes can be obtained by discarding the digits 1, 2, and 3, respectively. 8 10 12 14 16' (a) A binary image. Fig. 5. An example and its QT representation. To recover the LQ codes from the ILQ codes, we process the ILQ codes sequentially. For the first quadrant, the digit 0 is added to the left of each processed code unless it occurs that the leftmost digit of the processed code is 0 but that of its predecessor is 3. Afterwards, the digit 1 is added to the left of each processed code unless it occurs that the leftmost digit of the processed code is 0 but that of its predecessor is 3. Continuing this way, the LQ codes can be recovered from the LQ codes. In general, given a QT with depth d, suppose there is a complete subtree rooted at the root node of the QT, which ranges from level 0 to level h. The ILQ only needs the information in the edges and nodes in the QT ranging from level /1 - 1 to level d. We now analyze the storage-saving performance of ILQ over LQ. Given a 2^ x 2^ image, each LQ code needs 2 -I- 3(A^ — 1) bits. We see that the complete subtree in the corresponding QT ranges from level 0 to level h. For each ILQ code, it needs 3N -3h + 5 = (2 -I- 3{N - 1) - 3(/i - 2)) bits, so we have the following result: Result 1. Given a QT whose topmost h levels form a complete subtree, for each code in the corresponding ILQ representation, the storage-saving performance over the one in the LQ representation is equal to /_ 3N-l-3N+3h-5\ V- 2+3(JV-l) /• In Fig. 5, it is known that A*" = 4 and h = 3, so each ILQ code has 27.2% (= storage-saving performance over the corresponding LQ code. Considering the first 'X' symbol from the left in each LQ code as a delimiter, Gargantini [1] encodes a black node in QT by using only one 'X' symbol in each LQ code. In Section 4, this version of LQ will be employed in experiments to demonstrate the storage-saving advantage of the proposed ILQ. For this simpler version of LQ, theoretically, we have the following result: Result 2. Given a QT whose topmost h levels form a complete subtree, suppose a code in the corresponding LQ representation is at level I. For this code in the ILQ representation, the storage-saving performance over the one in the LQ representation is equal to ^fy C_ 3f-l-3Af+3ft-5\ v— 2+3(i-l) y- 3.2 Improved DF—expression (IDF—expression) The DF-expression of the image in Fig. 5 is represented by {{((WWWB {WWBB [WBWBB {{WWBB {WWBBBB {{WBWBB {WBWBB {WWWB.... Using the observation on QT mentioned above, the symbols '('s, which are used to represent the internal nodes in the top three levels, i.e. level 0, level 1, and level 2, in the original DF-expression can be discarded without losing any information. Thus, the improved DF-expression (IDF-expression) is represented by {WWWB {WWBB {WBWBB {WWBB {WWBBBB {WBWBB {WBWBB WWWB..., and totally 21 '('s are discarded. The IDF-expression discards one more level than the ILQ representation since the ILQ representation encodes only the black nodes, so we need to preserve the information one more level to maintain the preorder order and to be able to recover the original codes. Besides storing the internal nodes as '('s, the DF-expression also stores both the white and black nodes, thus one more level can be discarded than in the ILQ. Suppose we use two bits 00 to represent a '(', two bits 10 to represent a 'W, and one bit 1 to represent a 'B'. Using the same condition of the complete subtree as described in Subsection 3.1, we have the following result since the IDF-expression can discard ^ '('s in the DF-expression: Result 3. Given a QT whose topmost h levels form a complete subtree, suppose it needs / bits to represent the corresponding DF-expression. Then, it needs / — bits to represent the IDF-expression. How- ever, we need to store a number to indicate the number of levels been discarded, and assume we use four bits to represent this number since it is large enough for denoting the maximal levels allowable in any 2^® x 2^® image. The storage-saving performance is {= i_4 The DF-expression of Fig. 5(b) needs 322 bits, but the corresponding IDF-expression needs 284 bits, the storage-saving performance of IDF-expression over DF-expression is about 11.8% (= 3.3 Improved S-tree (1ST) The ST representation of the image in Fig. represented by 6 is linear-tree table: color table: 00000001011011000110 1110001101110000011 011100011011101011... 00101010110101101011 01011001... Using the above observation on BT, the symbols O's, which are used to represent the internal nodes in the top five levels, i.e. level 0 to level 4, in the linear-tree table of the original ST representation can be discarded without losing any information. Thus, the linear-tree table of the compact S-tree (1ST) is represented by 00101101100011011100110111000110111000 1101111011... while the color table remains the same, and totally 31 O's are discarded. Basically, the storage-saving concept used in 1ST is very similar to the one in IDFexpression. Only one bit is needed to represent 0 or 1 in the linear-tree table and the color table. Given a BT with depth d, suppose there is a complete subtree rooted at the root node in the BT, which ranges from level 0 to level h. We then have the following result since the 1ST can discard 2'' - 1 O's in the ST. Same as what described in Subsection 3.2, an extra 4-bit number is used to indicate the number of discarded levels in ST. We then have the following result: Result 4. Given a BT whose topmost h levels form a complete subtree, suppose we need s bits to represent the corresponding ST. Then, we need s - (2'' -f- 3) (= s - 2'' -h 1 - 4) bits to represent the IST-expression. The storage-saving performance is The ST of Fig. 6(b) needs 337 bits, but the corresponding 1ST needs 310 bits. Therefore, the storage-saving performance of 1ST over ST is about 8% (= B 0 Ih q b[| e k n (a) The image subdivided to form a BT. (b) The BT. Fig. 6. The example of Fig. 5(a) and its BT representation. 3.4 Compact Bincodes (CBCs) For the first quadrant in Fig. 6(a), the corresponding BCs are ( 21855, 21884, 21975, 21983, 22000, 22364, 22396, 22464, 23895, 23903, 23920, 24023, 24031, 24048, 24560 ) ( = ( 0101010101011111, 0101010101111100, 0101010111010111, 0101010111011111, 01010101 11110000, 0101011101011100, oloionioiiiiloo, 0101011111000000, 0101110101010111, 01011101 01011111, 0101110101110000, 0101110111010111, 0101110111011111, 0101110111110000, 01011111 11110000 )2). Looking at the binary representation of these 15 BCs, the leftmost four bits of them are all OlOl's since they all branch from the left edge (1/3 = 0) and from the left son (0:3 = 0) of the root node of Fig. 6(b). By the same arguments, the next lower four bits in the first five codes are 0101; that of the codes from the sixth (ninth) code to the eighth (14th) code are Olli (1101); that of the last code is 1111. For this quadrant, if we discard the leftmost six bits of each code among these 15 codes, the resulting codes are { 351, 280, 471, 479, 496, 860, 892, 960, 343, 351, 360, 471, 479, 496, 1008 ) ( = ( 0101011111, 0101111100, OlllOlplll, 0111011111, 0111110000, 1101011100, 11011 11100, 1111000000, 0101010111, 0101011111, 0101110000, 0111010111, 0111011111, Olili 10000, 1111110000 )2). As a result, two subtrees are formed. The first subtree contains the first eight codes that discard their leftmost leading bits 010101; the second subtree contains the remaining codes that discard their leftmost leading bits 010111. The codes in each subtree are still listed in preorder. This new representation is called the compact BC (CBC) for the first quadrant. By the same arguments, for the BCs in the second quadrant, third quadrant, and the fourth quadrant, the CBCs can be obtained by discarding the leftmost six bits 011101, 110101, 111101, in the first BCs, and discarding the leftmost six bits 011111, 110111 and mill in the last BCs, respectively. To recover the BCs from CBCs, we process the CBCs codes sequentially in a preorder order. Each time, six bits 010101 are added to the left of the processed code unless it occurs that the predecessor is less than or equal to its preceding one. Afterwards, each time six bits 010111 are added to the left of the processed code unless it occurs that the processed code is less than or equal to its predecessor. Similarly, six bits 011101, 011111, 110101, 110111, 111101, and 111111 are added to the left of processed code sequentially started whenever the processed code is less than or equal to its predecessor. Using the same condition of the complete subtree as described in Subsection 3.3, the CBCs only needs the information in the edges and nodes in the BT ranging from level h—lto level d. We now analyze the storage-saving performance of CBC over BC. Given a 2^ x image, each BC needs 4N bits. For each CBC, it needs iN -2h + 4 (= 4iV - 2{h - 2)) bits, so we have the following result: Result 5. Given a BT whose topmost h levels form a complete subtree, for each code in the corresponding CBCs, the storage-saving performance over the one in the BCs is equal to ^ (^ìn-m-^w)) In Fig. 6, it is known that N = 4 and h = 5, so each CBC has 37.5% (= |) storage-saving performance over the corresponding BC. 3.5 Compact LBCs (CLBCs) The LB C representation don't-care symbol, (00)2, BC. The LBCs of the 6_ are represented by X3Y3X2Y2XIY^XOS, X3Y3X2Y2X1Y1X0Y0, X3Y3X2Y2X1Y1X0, X3Y3X2Y2X15, X3Y3X2Y2XiYiXoYo, X3Y3X2Y2XiYiXoYo, stores at most one at the end of each first quadrant of Fig. ( X3Y3X2Y2X1Y1X0Y0, X3Y3X2Y2X\YiXoYo, JČ3Y3X2Y2XIYI0, _ X3Y3X2Y2%YIXO, X3 Y3X2Y2 XiYi Xo io ) X3Y3X2Y2XIYX5, X3Y3X2Y2X1Y1X0Y0, X3Y3X2Y2X1Y1S, X3Y3X2Y2X1Y1S ). After discarding the leftmost three symbols X3, Y3, and X2 {X2) in the first eight (last seven) LBCs, the resulting Table 1: Performance of ILQ. .«ttjtujajL TeöTayr O C3 O «TeeTee^ ytA ■ + o cu o [la Z« Q31 03T OST C3T 031 •O O öoümoo □] o« □ QOl []' ca -^a KD set fD MC 0e« Bee oec aee c^czioormo ODO ecuQc^ao au Q« GH . Fig. 7: A sample image. coinpact LBCs (CLBCs) become ( Y2XiYiXoS, raXiFiXo^o, FaXin^o^o, Y2XiY^Ö, Y2X1Y1X06, Y2X1Y1X0S, Y2X1Ö, Y2XiYrXoYo, F2X1Y15, ysXin Xoio, Y2XiYrXoYo, Y2XiYx5, Y2X1Y1Ö ). By the similar arguments, for the other three quadrants, the corresponding LBCs can be compressed further. Under the same condition of the complete subtree as described in 3.4, we have the following result: Result 6. Given a BT whose topmost h levels form a complete subtree, suppose one code in the LBCs is at level /. For this code in the CLBC representation, the storage-saving performance over the one in the LB C representation is equal to ^^ (= 4 EXPERIMENTAL RESULTS We take 16 reaLimages to show the performance of the proposed five compact representations when compared to the existing ones. Among these sample images, Samples 1-5 are Chinese texts; Samples 6-10 are English texts; Samples 11-16 are figures and pictures. In our experiments, all images have 256 x 256 pixels, i.e. it needs 8K bytes of memory to save it. Fig. 7 illustrates Sample 16. Tables 1, 2, 3, 4, and 5 illustrate the performance of ILQ, IDF-expression, 1ST, CBCs, and CLBCs over the existing LQ, DF-expression, ST, BCs, and LBCs, respectively. In each table, the column '/i' represents the number of the topmost levels that form a complete subtree. The column 'EXF lists the number of 1 Sample # #(codes) h 1 EXI 1 COM 1 COM/EXI | SP | 1 4006 3 86540 . 74526 86% 14% 2 2818 3 59777 51327 86% 14% 3 5633 3 121642 104747 86% 14% 4 3616 3 82535 • 71691 87% 13% 5 6326 3 144925 125951 87% 13% 6 8393 5 191380 115847 61% 39% 7 4702 3 107222 93120 87% 13% S 6662 3 151828 131846 87% 13% 9 5625 3 127245 110374 87% 13% 10 79S7 3 176072 152205 86« 14% 11 6844 3 155936 135408 87% 13% 12 1905 3 43392 37681 87% 13% 13 2337 3 53535 46528 87% 13% 14 1479 2 31242 31246 100% 0% 15 7234 3 164246 142648 87% 13% 16 6563 4 139717 100343 72% 28% Table 2: Performance of IDF-expression. 1 10940 3 17680 17640 99.77% 0.23% 2 7675 3 12407 12367 99.68% 0.32% 3 14672 3 23972 23932 99.83% 0.17% 4 13112 . 3 20005 19965 99.80% 0.20% 5 22512 3 34465 34425 99.88% 0.12% 6 30100 5 46017 45337 98.52% 1.48% 7 16756 3 25646 25606 99.84% 0.16% 8 23676 3 36256 36216 99.89% 0.11% 9 18536 3 28794 28754 99.86% 0.14% 10 - 21432 3 34746 34706 99.88% 0.12% 11 23700 3 36468 36428 99.89% 0.11% 12 6612 3 10169 10129 99.61% 0.39% 13 9380 3 14061 14021 99.72% 0.28% 14 4216 2 6748 6740 99.88% 0.12% 15 23292 3 36348 36308 99.89% 0.11% 16 16176 4 26782 26614 99.37% 0.63% bits needed to represent the original existing representation. The column 'COM' lists the number of bits needed to represent the proposed compact representation, and the column 'COM/EXI' lists the ratio of the number of bits required in the proposed compact representation over the original existing one. The storage-saving performance is listed in the last column 'SP' . CpMx Tables 1, 4, and 5 show that the average storage-saving performance of ILQ, CBCs, and CLBCs over LQ, BCs, and LBCs is 15%, 21%, and 24%, respectively. However, Tables 2 and 3 show that the average storage-saving performance of IDF-expression and 1ST over DF-expression and ST is only 0.29% and 0.16%, respectively. The two proposed compact SDSs have a little compression improvement, but the storage-saving performance can be improved much more if the level of the related complete subtree becomes quite large. Table 3: Perl brmance of 1ST. S«mplcy(al, òl, Z); al = aV2"-'-i; òl = ò; Traverse-aJid-find_xy(al, òl, i); al = a; òl = ÒV2"-'-i; Traverse.^ind_find_xy(al, òl, l); al = o òl = ÒV2"-'-i; Traverse-and-find_xy(al, òl, /); } else If DF[i]='r { a; = ar + a + ; 2/= ?/+ ò + 2("-'-i) ; } i = i + 1; } For a black block represented by a BC, (Ò4„_iÒ4„_2....Ò2ÒiÒ0)2, we Can extract the x-and ^-coordinates of its left-bottom corner and level I. The ar-coordinate and y-coordinate of the BC are (Ò4n_iÒ4„_5...0703)2 (Ò4„_3Ò4„_7...Ò5Òi)2, respectively. The centroid of the corresponding block is {x + 2L'/2J,2/ + 2r'/2l). The CBC discards some highest order bits of BC. We need to recover these highest bits in the x- and y- coordinates to find the centroid. If only the root of the BT is discarded, then two sub-BTs are generated. We need to add a 0 to the highest bit of the x-coordinate for the CBCs in the left sub-BT, and add a 1 to that of the right sub-BT. If the topmost two levels of the BT are discarded, then we need to add one bit to the leftmost bit of the x-coordinate and one bit to that of the jz-coordinate. The added bits for the four split sub-BTs are (0,0), (0,1), (1,0), and (1,1), respectively. If the topmost h levels of the BT are discarded, then there are 2'' generated sub-BTs. We need to add bits {xn-iXn-2---^n-\h/2'\) to the leftmost bits of the x-coordinate and 2L''/2J bits (?/„_iy„_2...j/„_Lh/2j) to the 2/-coordinate in the CBC. The sequence of Xn-iyn-lXn-2yn-2--Xn-\h/2-\yn-[h/2\'^ tO be added to the CBCs in the 2'» sub-BTs are 0...0, 0...01, ..., and 1...1. The algorithm for finding the centroid on CBCs is shown below. /* Finding the centroid {x,y) of an image represented by k CBCs */ x = 0-,y = 0-, For i = 1 to k I = the number of don't-cares of CBC[i\, a = the x-coordinate of CBC[i]\ b = the 2y-coordinate of CBC[i] ; ar = a; + a + 2L'/2J ; ^ = ^ + 0 + 2r'/2l ; Next i X = xjk\ y = y/k] 5.2 Set Operations We only sketch the set operations on BTs since the detailed algorithms for set operations on split sub-BTs mentioned above can be obtained by calhng the existing related algorithms. If we discard the topmost h levels of a BT, then sub-BTs are generated. Each sub-BT is a BT which represents 1/2'' of the original image. To find the intersection and union of the two images, we can perform the related operations on the corresponding subimages. If the compact SDSs of the images, say 1ST, CBC, and CLBC, discard the same number of levels, set operations can be performed on the corresponding sub-BTs. However, if the improved SDSs of an image discards more levels than the other one, we need to add some levels back in order to make the two improved SDSs have the same number of sub-BTs. The related process for finding the intersection of two images represented by one improved SDS is listed below. /* Finding the intersection of two images represented by BTs, one discards the topmost di levels and the Other discards the topmost d2 levels. */ If di d2 { Recover |di - ^2] levels to the improved SDS with d = max(di,d2); ' For i = 1 to Find the intersection of the corresponding z-th sub-BTs; Next i The intersection of two images represented by sub-BTs can be found using the algorithms described in [3, 14]. The number of arithmetic operations in the intersection of the corresponding sub-BTs is proportional to the total number of black leaf nodes in the two sub-BTs, so the time complexity for the intersection of two images is proportional to the total number of the black nodes in the two given BTs. The union of two images can be found in a similar way. We first find the union of corresponding subimages. Then, we check whether there are two neighboring subimages, that are both whole black, if so, they can form a larger black block. The related procedure is listed below. Ifdl ^<Ì2 { Recover - ^2! levels to the improved BT with less d; For i = 1 to Find the union of the corresponding sub-BTs; Next i Check each of the resulting sub-BTs to find the whole black ones and combine them if possible. To find the complement of an image, we just find the complement of all the subimages separately. The algorithm for finding the complement of a subimage represented by BCs is presented in [3]. Note that for the DF-expression, we need only change each symbol '0' to a '1', and change each for symbol '1' to a '0'. The algorithm is listed below. For i = 1 to /* d denotes the number of levels been discarded */ Find the complement of the sub-BTs; Next i 6 CONCLUSIONS We have presented five improved SDSs to represent binary images. Experimental results show that the proposed methods have better compression performance when compared to the existing five well-known SDSs. In addition, some image manipulations on the proposed improved SDSs have been developed. It is an interesting research issue to apply our method to compress similar images [7] and to extend our method to color/gray images [13]. In addition, it is also an interesting research issue to analyze the savings of our new representation by using the analytical model [12]. ACKNOWLED GEMENT The authors would like to thank the two refrees and Prof. M. A. Cobb for their valuable comments. References [1] I. Gargantini, An effective way to represent quadtrees. Comm. ACM, 25 (12), 905-910 (1982). [2] W. D. Jonge, P. Scheuermann, and A. Schijf, S+-trees: an efficient structure for the representation of large pictures, CVGIP: Image Understanding, 59, 265-280 (1994). [3] C. Y. Huang and K. L. Chung, Fast operations on binary images using interpolation-based bintrees. Pattern Recognition, 28 (3) 1995, pp. 409-420. [4] G. M. Hunter and K. Steiglitz, Operations on images using quad trees, IEEE Trans, on Pattern Analysis and Machine Intelligence, 1 (2), 145-153 (1979). [5] K. Knowlton, Progressive transmission of grayscale and binary pictures by simple, efficient, and lossless encoding schemes, Proc. IEEE, 68 (1980) 885-896. [6] E. Kawaguchi and T. Endo, On a method of binary-picture representation and its application to data compression, IEEE Trans, on Pattern Analysis and Machine Intelligence, 2 (1), 27-35 (1980). [7] T. W. Lin, Compressed quadtree representation for storing similar images, Image and Vision Computing, 15 (11), 833-843 (1997). [8] M. A. Ouksel and A. Ytiagoub, The interpolation-based bintree and encoding of binary images, CVGIP: Graphical Models and Image Processing, 54 (1), 75-81 (1992). [9] H. Samet, The Design and Analysis of Spatial Data Structures, Addison Wesley, New York, 1990. [10] C. A. Shaffer, R. Juvvadi and L. S. Health, Generalized comparison of quadtree and bintree storage requirements, Image and Vision Computing, 11 (7), 402-412 (1993). [11] M. Tamminen, Encoding pixel trees, Computer Vision, Graphics, and Image Processing, 28 (1), 44-57 (1984). [12] M. Vassilakopoulos and Y. Manolopoulos, Analytical comparison of two spatial data structures, Information Systems, 19 (7), 569-582 (1994). [13] J. R. Woodwark, Compressed quadtrees, The Computer Journal, 27 (3), 225-229 (1984). [14] J. G. Wu and K. L. Chung, A New Binary Image Representation: Logicodes, J. of Visual Communication and Image Representation, 8 (3), 291298 (1997). Characterization Results for the Poset Based Representation of Topological Relations - I: Introduction and Models Luca Forlizzi^ and Enrico Nardelli^'^ ^ Dipartimento di Matematica Pura ed Applicata, Univ. of L'Aquila, Via Vetoio, Coppito, 1-67010 L'Aquila, Italia. E-mail: {forlizzi,nardelli}@univaq.it ^ Istituto di Analisi dei Sistemi ed Informatica, Consiglio Nazionale delle Ricerche, Viale Manzoni 30, 1-00185 Roma, Italia. Keywords: Multimedia databases, auditory databases, geographic information systems, field-oriented approach, field indexing, continuous indexing Edited by: Frederick E. Petry, Maria A. Cobb and Kevin B. Shaw Received: December 24, 1998 Revised: May 25, 1999 Accepted: June 10, 1999 Formal methods based on the mathematical theory of partially ordered sets (i.e., posets) have been used for the description of topological relations among spatial objects since many years. In particular, the use of the lattice completion (or normal completion) of a poset modeling a set of spatial objects has been shown by Kainz, Egenhofer and Greasley to be a fundamental technique to build meaningful representations for topological relations. In this paper and in the companion one [9] we discuss the expressive power of the lattice completion as a formal model for a set of spatial objects, by proving sufficient and necessary conditions for its use to give a correct representation of intersection and union relations among spatial objects. We also show how to use lattice completion when working on a subset (i.e., a view) of the set of spatial objects so that the computation only considers objects relevant to the view itself. 1 Introduction With this modeling approach many natural operations in the modeled reality correspond to operations Spatial databases for applications in which is only im- of set-union and set-intersection among elements of the portant to represent knowledge about the relative po- representation, sitions of spatial objects while precise data about their ^ , , , . absolute position can be discarded, e.g. a railway net- ^^f^P^®' overlapping among the spatial rework for travelers, can be suitably modeled by the so- where ram is heavy and the spatial regions where called topological data model. In such a model two operation for building a map spatial objects are considered the same if there exists potentially dangerous zones from a geological point an isotopy that transform one of them into the other. " directly corresponds to set-intersection in T . 1 1 iu r J 1 1 -xi. X 1 • 1 the representation by means oi a class of sets with a In this work^ we therefore deal only with topological . , . set-containment relation. spatial information associated to a collection of spatial objects, ignoring both non-topological spatial informa- , , ,. , J,- 1 • r .L- rxv, u- i. can be mapped to set-union m the representation, ex- tion and non-spatial information of the objects. For n • n v, • u i • u Concerning operations on the reality of interest that ,, . f J ^ 11 f amples are collecting all the countries belonging to the this reason from now on we denote a collection oi spa- , . , , ., . ^ . , , , . ^ -il xu i_ X i J. e 1 1 same state, which corresponds to identifying the state tial objects with the more abstract term of class of ' ^ ^ ^ sets and use a set-theoretical terminology. The topological data model was introduced in 1979 by A class of sets together with a set-containment rela- Sorbett, and called PLA data model, in the context tion among them models many common situations in modeling data for the Census Bureau of the United spatial databases. For example it may represent a con- gtates [5]. A database theory formalization was given tainment relation between geographical objects of the ^y Paredaens and co-workers [26, 24, 23] in terms of plane or a hierarchical relation between administrative ^he concepts of a finite number of points, continuous curves between these points, and areas formed by these ^Research partially supported by the European Union TMR curves in the real plane. Their formalization has a project "Chorochronos". planarity constraint, i.e. curves may only intersect in their endpoints. Another formalization of the PLA-model using combinatorial topology was given by Worboys [33]. He used the topological notions of 0-, 1-, 2-simplex and sim-plicial 2-complex in the real plane. A 0-simplex is a point, a 1-simplex is a segment line, and a 2-simplex is a triangle. A simplicial 2-complex is a collection of 0-, 1-, and 2-simplices with the constraint that the intersection of any two simplices is either empty or is a face of both simplices. Also in this formalization a planarity constraint is assumed. Using the combinatorial topology formalization, Kainz et al. [22] discussed how to use partially ordered sets (i.e. posets) as a representation structure for spatial data in the topological data model. They showed how the use of a poset operator called lattice completion (or normal completion) allows to model the important topological relations of containment, adjacency, and connectivity in terms of the set relations of intersection, union and containment and of the closure of these. A more extended treatment of these aspects is given in Sect. 2. Discussions on the use of posets and lattices to represent spatial relations and their connections with topological models are also provided by Saalfeld [28] and Kainz [19, 20, 21], Lattice completion transforms a given poset in a lattice by adding to the poset new objects and relations so that, informally speaking, every set of objects has unique representatives for their intersection and union, while maintaining order relations. As an example of the use of lattice representation to compute topological relations, consider the instance of the topological data model in Fig. l(left) and its (transitively reduced and with top and bottom elements omitted for clarity) lattice representation in Fig. 1 (right). You can now detect, as an example, that: (1) regions D and E intersect in the plane since they have as intersection in the lattice representation A (a region); (2) regions A and B are adjacent in the plane since they have as intersection in the lattice 7 (a line) ; (3) lines ß and e are not connected by a common point since their intersection in the lattice representation is empty. The importance of a poset-based representation and lattice completion is twofold [1, 2, 12, 16, 17, 31, 32]: on one side they give a formal basis for representing and reasoning about spatial relations, on the other side very efficient data structures can be defined to represent and manipulate them. Also, a poset based representation can be used as a formalization device for spatial query languages [8]. Using the combinatorial topology formalization, Kainz et al. [22] showed that the lattice completion of a poset modeling a set of spatial objects is a fundamental technique to build meaningful representation for topological relations. In fact they proved that the new elements introduced by the normal completion process can (and have to) be interpreted as being the intersection of spatial objects. This is fundamental, from a mathematical point of view, since it means that the lattice resulting from the normal completion is the closure of the given set of spatial objects with respect to the intersection operation. This result, however, leaves it open the question of the closure of the set of spatial objects with respect to the other fundamental operator to manipulate spatial entities, namely the union operator. In this paper we precisely clarify the limitations for the use of a lattice as a formal model for a set of spatial objects, by proving sufficient and necessary conditions. In the companion paper [9] we show that a technique already known in lattice theory, namely the construction of the maximal antichain lattice of a given poset, can be used to define another completion operator that builds the closure of the given set of spatial objects with respect to the union operation. We also show that this new completion operator commutes with the normal completion and that the lattice obtained from the application of both completion operators is minimal and unique up to isomorphism. Finally we show how to apply these operators when working on a subset (i.e., a view) of the set of spatial objects so that the computation only considers objects relevant to the view itself. Our results give further theoretical motivations to the use of lattices built on simplicial complexes as a model for spatial objects and topological relations, since this kind of lattices are, by construction, closed with respect to both the union and the intersection operations. The structure of the two papers is the following. In Sect. 2 we review the poset-based representation for the topological data model, examine problems arising from a naive extension to the most general case, and shortly describe how we tackle them. This section is a synthesis of all the results of the two papers. Section 3 introduces definitions related to posets and lattices and some basic facts about them. More advanced results are recalled in Appendix A. In Sect. 4 we introduce formally the definition of closure of a class S of objects with a set-containment relation with respect to a certain set operator, of representation and of universal partition. Advanced technical details are contained in Appendix B. The companion paper [9] is dedicated to the study of the representation of the closure of a class with respect to set-intersection and set-union operators. It also contains conclusions and final remarks. Figure 1: (left) A class S of spatial objects in the topological data model, (right) A lattice representation for this class. A Poset Representation for the Topological Data Model In this section we discuss in more details the use of posets to represent a collection of spatial objects in the topological data model approach and highlight its shortcomings. Note that since we focus on set-union and set-intersection operations on spatial regions, it is not necessary to explicitly consider the lowest two levels of the poset representation of the topological data model, see Fig. 1 (right), i.e. the levels modeling curves and points. A0 bS C D A poset representation is not always rich enough to represent the closure of set-intersection and set-union on the sets of the class. Kainz et al proposed to transform the poset representing a class of spatial sets in the topological data model in a lattice. This transformation can be obtained by means of a well-known operator of poset theory, namely the lattice completion (or normal completion) [4, 6]. Kainz et al. suggested to represent the result of set-intersection between spatial sets by means of the. new elements added by the lattice completion operator . In such a way it is possible to compute topological properties via set-intersection and set-union on the lattice representation. Consider for example the class of sets S containing the four sets A, B, C, and D shown in Fig. 2. Each set is represented by means of a different filling pattern. Zones filled with more than one pattern belong to more than one set. We can represent the class S with the poset P shown in Fig. 3(left). Note that elements of P have the same labels of the sets they represent. Figure 2: A class of spatial objects in the topological data model 2.1 Representing Set-Intersection Closure Now suppose we want: a representation of the closure. S'^ of the class S with respect to the set-intersection operator (i.e. the class obtained intersecting each possible pair of sets taken from S). The only element of the closure that is different from sets in S and from the empty set is AC\B. The set A PI ß is contained in the sets A and B and it contains the sets C and D. The normal completion of poset P is the lattice L, shown in Fig. 3(right). We always represent posets and lattices by a drawing showing their transitive reduction. The lattice L is composed by the elements of P plus a top (T) and a bottom (0) element, and a new element labeled X, which is smaller than the elements (representing the sets) A and B and greater than those (representing the sets) C and D. Therefore, since the iiiiiisi^ iiiiiir ili B D E -. V • Figure 4: (left) A class S of spatial objects in the topological data model, (right) A poset representation P for this class. Figure 3: (left) A poset representation of the class S of Fig. 2. (right) The normal completion of the poset to the left. relation of set A n ß with respect to other sets of S is analogous to that of the element X with respect to other elements of L, the lattice L can represent the class of sets provided that the element X represents the set AnB. This was the proposal of Kainz et al. [22]. In the general case, however, using the normal completion operator to represent the set-intersection operator, may lead to wrong results [10, 11]. Consider the example shown in Fig. 4(left) containing the five sets A, B, C, D, and E. Its poset representation is shown in Fig. 4(right), where elements of P have the same labels of the sets they represent. Suppose we want a representation of 5'^. The only elements of the closure that are different from sets in S and from the empty set are the sets AnB, B nC, AnC, and AnBnC. The normal completion of poset P is the lattice L, shown in Fig. 5(left). The lattice L is composed by the elements of P plus a top (T) and a bottom (0) element, and one new element labeled X. But lattice L cannot represent 5'^, since a correct representation of S'^, shown in Fig. 5(right), has three new elements, labeled F, G and H. Element F represents AnB, element G represent BnC, while element H represent two coincident sets of namely AnBnC and AnC. This example shows that to represent set-intersection operator by means of a poset operator we have to provide more information to our representation. A way to do this is to include in the class S a partition of the whole domain on which S is defined, that we call universal partition of S. Note that a basic reference layer analogous to our universal partition, is commonly used in the modeling of geometrical entities [15, 7]. Such a basic reference layer is indeed the starting point for many efficient data structures based on a space-partitioning criteria, e.g. quadtree [29], grid-file [25], k-d tree [3], cell-tree [14], Also note that in [7] it is shown that the mathematical definition of a partition and the spatial one disagree. In fact, since geometrical objects are closed sets in the spatial view, their boundaries can be common to more than one object. This is not possible in the mathematical view of a partition. But this does not affect our work, since if we consider the extended poset model of a class of spatial object, where also the two lowest layers are present (see Fig. 1 (right)), we note that such a model represents also the spatial view of geometrical object, where common intersections exist. In a poset representing a class that has a universal partition there is a representative element for each of the element of the partition of the domain of S. In Fig. 6 we show a class S of sets containing five sets A,B,C,D, and E which have exactly the same containment relations as the regions in Fig. 4. But the ) © Figure 5: (left) The lattice completion of poset P representing class S of Fig. 4. (right) A poset representation of the set-intersection closure for class S. ABC ^ S D a b C d e Figure 6: A class 5 of spatial objects with a universal partition class also contains a universal partition, whose elements coincide with the unit squares of the grid, denoted la,!&,... ,5e. Sets A,B,C,D, and E are distinguished by means of different filling patterns. A poset representation P for this class of sets is shown in Fig. 7. We want to construct a representation of S'^, namely a representation which contains also elements that represent sets AnB, BnC and ACiBPiC. Comparing P with the poset in Fig. 4 (right) we can see that the universal partition provides information on the class S that were missing in the poset in Fig. 4(right). For example elements Id, 2d, and 3d represent elementary areas contained in both sets A and B but not in set C. This fact means that AnB and ^nßnC are different sets. Figure 8 shows the normal completion M{P) of poset P (in Fig. 8 also, the top and the bottom of the lattice completion have been omitted for clarity). Inspecting Fig. 8 (and recalling Fig. 5(right)) we can see that M{P) is a correct representation of class 5'^, since elements labeled X, Y and Z represent respectively sets AnB, BOC and An BnC. In the companion paper [9] we formally prove that the existence of a partition of the domain on which a class of sets is defined is a sufficient but not - in general -necessary condition for the normal completion of the representation of the class to be a correct representation of the closure of the class with respect to the set-intersection operator. In the same section we also give necessary conditions for a correct representation of the closure of the class with respect to the set-intersection operator by means of the normal completion. Finally, we show that for classes of sets satisfying a reasonable assumption (informally, that the union of the smallest elements in the class is equal to the union of the greatest ones), the existence of a partition of the domain on which a class of sets is defined is a necessary and sufiicient condition to this aim. 2.2 Representing Set-Union Closure We also study the problem of representing the closure of a class of sets with respect to the set-union operator. To represent the closure with respect to the union op- OOOÒOOOO 1e 2e Se Id 2d 3d 1b 1c 2b 2lc 4d la 3a 4a 3b 3c 4b 4c 5b 5c 5a 5d 5e 4e Figure 7: A poset representation of the class S of spatial objects of Fig. 6 oooo 1 e 2e 3e 1 d 2d 3d 1 b 1 c 2b 2(; 4d 1 a 2a 3a 4a 3b 3c 4b 4c 5b 5c 5a 5d 5e 4e Figure 8: The normal completion of the poset in Fig. 7 erator of a class of sets S, we need a new poset operator since lattice completion does not provide a correct answer. The following example illustrates the problem. Let us consider the class of sets S in Fig. 9. The poset representation P for S is shown in Fig. lO(left) where elements of P have the same labels of the sets they represent. Suppose now we want to introduce in P an element, denoted C U D, to represent the union of sets C and D. The union of C and D is the smaller set containing both C and D. Hence the representative of C U £> should be the least upper bound in P of C and D. We could provide such a least upper bound extending the poset in Fig. lO(left) to a lattice by means of the normal completion. In this way we obtained the lattice in Fig. 10{center). The newly created element X would be the desired least upper bound of C and D. However X would also be greater than E in the poset. Hence X cannot represent the union of C and D since such a union does not contain E. So to represent C U £> we need to provide a least upper bound to representatives of C and D by means of a different poset-operator. More exactly we need a poset-operator that applied to the poset in Fig. lO(left) provides a least upper bound for C and D that is greater than only the representatives of sets contained in Cud. The correct representation is the lattice shown in Fig. lO(right), where element X is the representative of C U -D. For this purpose we introduce a poset operator, called by us U-completion, that builds the quotient lattice modulo a certain congruence relation of the an-tichain lattice of P. We give necessary and sufficient conditions for the U-completion to represent S^, the closure of a class of spatial sets 5 with respect to the set-union operator. We address also the issue of the simultaneous application of the lattice completion and U-completion opera- ABC ^ S D E Figure 9: A class S of spatial objects in the topological data model. tors. We prove that U-completion and lattice completion can be applied in whatever order, always producing the same outcome. Namely, we show that for any class S, (S^)" = S"^ and (S^)^ = and that the lattice obtained by the application of both completion operations is minimal and unique up to isomorphism. Hence, starting from a representation of class S, we can apply in in whatever order the normal completion and the U-completion obtaining a representation of We finally show that the existence of a universal partition is a necessary and sufficient condition for the simultaneous application of the U-completion and the lattice completion to represent 2.3 Working on a View Note that one is often interested in applying the intersection and union operator only to a subclass T of a given class S of spatial sets, for example when a view to operate on a subclass T of 5 has been defined in the spatial database. In such a case it is not convenient to build the normal completion or the U-completion of the whole representation of the class, since it is likely that it contains much more elements than the ones we are interested to. Consider that, in general, the completion of a given poset P has in the worst case a size which is exponential with respect to the size of P. The naive solution of building only completions of a poset representation of the subclass T has the disadvantage of producing poset representations for closures of T of that are disjoint from the representation of S. We give in the companion paper [9] necessary and sufficient conditions so that the poset representation of S and those of closures of subclasses can be joined together into a correct poset representation of the whole reality of interest. As an example, let us consider the class S of sets in Fig. 11, where 5 contains also the elements of a universal partition. Namely, the elements of the universal partition are the small unit squares and are denoted using a matricial notation la, 1&,..., 4e, 4/. The remaining sets are each distinguished by a filling pattern. Areas filled with more than one pattern are contained in more than one set. Suppose now we are interested in building a representation of the closure with respect to both set-union and set-intersection operators for the view consisting only of elements {A, B, C, D}. In Fig. 12(left) we can see a poset representation of S, where representatives of elements of the universal partition not contained in any other set have been omitted for clarity. We apply normal completion and U-completion to the subposet representing the view {A,B,C,D} and we merge the obtained lattice with the original poset obtaining the desired result, shown in Fig. 12(right), where X represents ^ n ß, y is the representative of C U £>, and the top and bottom elements have been omitted for clarity. 3 Poset Basics In this section we recall definitions regarding posets and lattices and some basic facts about them. It can be skipped by a reader with some knowledge of the field. More advanced results are recalled in Appendix A. Definition 3.1 A partial order relation SR is a binary relation which is reflexive (a^a), antisymmetric (a^b and 65Ra implies a = b) and transitive (aSRò and òKc implies alkc). Definition 3.2 A partially ordered set, i.e. a poset (P, <) is an algebraic structure formed by a set P and a partial order relation (normally indicated with the symbol <), among the elements of P. Posets are well known mathematical structures. This fact allows us to lean on a well founded theory. Figure 10: (left) A poset representation P of the class S of sets of Fig. 9. (center) The lattice completion of poset P. (right) The correct lattice representation of class S plus the set C U D. A B C D a b C d e f Figure 11: A Class S of sets containing a universal partition. 4c4d4e2o3oad3d2e3e2b3b ac 4d4e2c 3cad3d2B3e 2b 3b Figure 12: (left) A poset representation of the class S of sets of Fig. 11. (right) A representation of the closure with respect to both set-union and set-intersection operators of the class S. covered by an extensive amount of literature. We signal for the interested reader Birkhoff's and Gratzer's classic books [4, 13]. Finite posets can be graphically represented by a Hasse diagram. In a Hasse diagram, each poset's element is represented by a dot; also, given A,B & P such that A< B, and for no C e P we have A < C < B, then the dot that represents B is drawn in a position higher than those^of the dot that represents the element A, and the two dots are connected by a line. Note that the Hasse diagram of the poset {P, <) is a representation of the transitive reduction of the relation <. Definition 3.3 Let {P, <) be a poset and let Q C P. Then: 1. a e Q is a maximal element ofQ ifVy € Q, a• P. Of course there exists Rep~^ : P S. Note that since the classes of sets with a setcontainment relation we consider have a greatest and a least set, their representations have a greatest and a least element. For any s £ 5 we say that Rep{s) is the representative of s in P. Among the elements of P, representatives of set contained in Bs play a special role. Hence it is useful to introduce a notation for them. References [1] H. Ai't-Kaci, R. Boyer, P. Lincoln and R. Nasr, "Efficient Implementation of Lattice Operations", ACM TOPLAS, 11(1);115-146, Jan 89. [2] E. Apolloni, F. Arcieri, S. Ercoli, E. NardelU, M. Talamo, "Un modello di riferimento per l'interazione con sistemi per la gestione di dati geografici", (in italian), Convegno Nazionale Sistemi Evoluti per Basi di Dati, Gizzeria Lido, Giugno 1993. [3] J.L.Bentley, "Multidimensional binary search trees used for associate searching", Communications of ACM, 18, 509-517, 1975. [4] G. Birkhoff, "Lattice Theory", American Mathematical Society Colloquium Publications Vol. 25, (Providence, RI: American Mathematical Society), 1967. [5] J.P.Corbett, "Topological Principles in Cartography", Technical Paper 48, US Bureau of Census, Washington DC, 1979. [6] B.A.Davey, H.A.Priestley, "Introduction to Lattices and Order", Cambridge University Press, 1991. [7] M.Erwig, M.Schneider, "Partition and Conquer", in Spatial Information Theory: A Theoretical Basis for GIS, Vol. 1329 of LNCS, Springer Verlag 1997. [8] L.Forlizzi, B.Kuijpers, E.Nardelli, "Region-based query language for spatial databases in the topological data model", manuscript. [9] L.Forlizzi, E.Nardelli, "Characterization Results for the Poset Based Representation of Topological Relations - II: Intersection and Union", to appear on Informatica. [10] L.Forlizzi, E.Nardelli, "On the use of posets as a formal model for spatial data", Technical Report 1/98, Dip. di Matematica, Univ. di L'Aquila, Feb 1998. [11] L.Forlizzi, E.Nardelli, "Some Results on the Modelling of Spatial Data", 25th Annual Conference on Current Trends in Theory and Practice of Informatics (SOFSEM'98), Vol. 1521 of LNCS, Springer Verlag 1998. [12] D.D.Ganguly, C.K.Mohan, S.Ranka, "A Space-and-Time Efficient Coding Algorithm for Lattice Computations", IEEE TKDE, 6(5):819-829, Oct. 1994. [13] G.Gratzer, "General Lattice theory", (New York, NY: Academic press),1978. [14] O.Günther, J.Bilmes, "Tree-based access methods for spatial databases: implementation and performance evaluation", IEEE TKDE, 3(3):342-356, 1991. [15] R.H. Giiting, M. Schneider, "Realm-based spatial data types: the ROSE algebra", VLDB Journal, 4(2), 213-289, April 1995. [16] M.Habib, L.Nourine, "Bit-Vector Encoding for Partially Ordered Sets", Int. Workshop on Orders, Algorithms and Applications (ORDAL'94), Lyon, France, Jul.94, LNCS 831, V.Bouchitté and M.Morvan (Eds.). [17] S.C.Hirtle, "Representational Structures for Cognitive Space: Trees, Ordered Trees and Semi-Lattices", in Spatial Information Theory: A Theoretical Basis for GIS, Vol. 988 of Lecture Notes in Computer Science, Springer Verlag 1995. [18] C.Jard, G.V.Jourdan, J.X.Rampon, "Some online computation of the ideal lattice of posets", IRISA Research Report n.773, 1993. [19] W.Kainz, "Application of Lattice Theory in Geography", 3rd Int. Symp. on Spatial Data Handling, 135-142, 1988. [20] W.Kainz, "Order, Topology and Metric in GIS", ASPRS/ACSM Annual Convention, vol. 4, 154160, 1989. [21] W.Kainz, "Spatial Relationships - Topology Versus Order", 4th Int. Symp. on Spatial Data Handling, 814-819, 1990. [22] W.Kainz, M.Egenhofer, I.Greasley, "Modelling spatial relations and operations with partially ordered sets", Int. J. of GIS, vol. 7, no. 3, 215-229., 1993. [23] B.Kuijpers, J.Paredaens, J.Van den Bussche, "Lossless Representation of Topological Spatial Data", 4th Int. Symp. on Large Spatial Databases (SSD'95), LNCS 951, 1-13, 1995. [24] B.Kuijpers, J.Paredaens, J.Vandeurzen, "Semantics in Spatial Databases", LNCS 1358, 1998. [25] J.Nievergelt, H.Hinterberger, K.C.Sevcik, "The grid file: an adaptable symmetric multikey file structure", ACM TODS, 9(1):38-71, March 1984. [26] J.Paredaens, "Spatial Databases, the Final Frontier", ICDT'95, LNCS 893, 14-32, 1995. [27] L.M.Perry, "Extending (Finite) Partially Ordered Sets to Lattices: An Incremental Approach", Master's Thesis, Univ. of Maine, Dep. of Surv. Eng., Orono, ME, 1990. [28] A.Saalfeld, "Lattices Structures in Geography", 7th Int. Symp. on Computer-Assisted Cartography, AUTOCARTO 7, 482-489, 1985. [29] H. Samet, "The design and analysis of spatial data structures", Addison-Wesley Reading, MA, 1990. [30] G. Steiner "An algorithm to generate the ideals of a partial order", Operation Research Letters, vol.5 n.6, 1986. [31] M. Talamo, P. Vocca, "A Data Structure for Lattice Representation", TCS, 175(2):373-392, 97. [32] M.Talamo, P.Vocca, "An Optimal Timex Space Data Structure for Lattices Representation", to be published on SIAM Journal on Computing. [33] M. F. Worboys, "A generic model for planar geographical objects". Int. J. Geographical Information Systems, vol 6, n.5, 353-372, 1992. A Properties of Posets In this section we recall some more advanced results on posets that are needed in our proofs. It can be skipped by the reader that has a working knowledge of the field. Upper-star and lower-star ideals,, introduced at page 231, have interesting properties, stated in the following lemma. We refer to [6, 27] for proofs of these properties. Lemma 7 Given a poset (P, <) and Qi,Q2 € P, we have: 1- Qi C {Qi'), andQ^ C (QiJ*; 2. if Qi C Q2, then Q2* C Q^*, Qz, C Qi^ and {Qil* C (Q2*).; 3. Qu = {{Qi*Y)* andQ,* = {{Q^*).Y; 4. pe {p}. and p e {p}*, ypeP; 5. (W). = VpeP; _ 6. if p < q, then {p}, C {9}» and {qr}* C {p}*, yp,qeP; 7. {p}, = {g}, if and only ifp = q, Vp, q e P. The next Lemma shows important properties of join-dense and meet-dense subsets, introduced at page 232. For proofs of this and other properties see [6]. Lemma 8 Let P be a poset and let Q C P. If Q is join-dense in P then for each x E P we have x = lubp{{i.x)Q). If Q is meet-dense in P then for each X £ P we have x = glbp{{-\.x)Q). The following lemma shows that a poset (via the canonical order embedding) is both join-dense and meet-dense in its MacNeille completion. For proofs of this and other properties of the MacNeille completion see [6]. Lemma 9 Let (P, <) be a poset and let (M(P), C) be its MacNeille completion. The set v(P) is both join-dense and meet-dense in M{P). The definition of the MacNeille completion may also be used to define an algorithm for its construction. Such an algorithm has an exponential worst-case time complexity with respect to the number of elements of the poset. Recently, Perry [27] has proposed an incremental algorithm that has a polynomial complexity with respect to the number of elements of the produced lattice. In general, in a poset there can be elements that are not related to each other. Definition 1 Let (P, <) be a poset and let Q C P. We say that Q is an antichain if'ix^y G Q, x < y implies x = y. Note that for each R C P, the set R° of the maximal elements of R and the set Ro of the minimal elements of R are antichains. It is possible to define an order relation among the antichains of a poset. The resulting poset is indeed a lattice, as it is shown by the next Lemma. For its proof see [4, 18]. Lemma 10 Let (P, <) be a poset and let A{P) be the set of all the antichains of P. The poset {A{P),<), where < is the order relation defined, S A{P), as AiFIFO{c,c') Protocol message transmission a,9 sendr r' !m where FIFO(c, a') Protocol message reception a,9 recr ri \m where FIFOic, c') Sequential composition b bi » 62 Action prefix b 0; Ò2 Choice b bi b2 Parallel composition b bi\G\b2 Disabling b bi > Ò2 Hiding b hide G in Gate renaming r 9^9' Renaming b ven R in bi Process definition p{n) := bi Process instantiation b piv) Table 1: The specification language abstract syntax are only allowed in the derived protocol specifications. "òi >> 02" denotes a process behaving after successful termination of &i as 62, where S of &i is interpreted in "&i >> 62" as i. "a; 62" is the special case of the sequential composition where bi is an individual action, so that no i is needed for transfer of control to b2. "&1Q&2" denotes a process ready to behave as 61 or as 62- "Òi|G|&2" denotes parallel composition of processes bi and 62- Actions listed in G and ö are only executable as common actions of the two processes, while other actions the processes execute independently. By connecting processes by "|||" or "||" one shortly specifies their minimal or maximal synchronization, respectively. Specification of a parallel composition of an empty list of processes is an empty string identifier e, while parallel composition of a singleton set of processes equals the only member of the set. "&i[> Ò2" denotes a process with behaviour bi potentially disrupted by behaviour 62- While òi is still active, the process might terminate by executing 5 in bi. "hide G in bi' denotes a process behaving as bi with its actions listed in G renamed into i, i.e. the gates made internal to the process (hidden from its environment). Hiding of an action doesn't infiuence its location, i.e. hiding of a u'' results in "ren R in 61" denotes a process behaving as bi with its visible gates renamed as specified in R. p{n) := &i defines a process p with behaviour bi, and a p{v) defines an instantiation of the process. Parametrization of processes constituting a service specification is not allowed, while in the derived protocol specification, the local mappings of the processes might need input parameters. Process parametrization is not allowed in Basic LOTOS, but we don't consider that a problem, for parameters can usually be avoided, if so desired, by switching to a less concise specification style interpreting the parameter value as a part of the process name. Anyway, in the full LOTOS, parametrization is legal. A specification is a list of process definitions. The first process on the list is supposed to denote the behaviour that the specification is defining, i.e. the main process. As such, it must never be instantiated within the specification. Specifically, let Server denote the main process in the specification of the service that is being implemented. In the original LOTOS syntax, explicit processes are defined on formal gates, that are associated with actual gates upon process instantiation. In our simplified language, the gate instantiation can be expressed as renaming of the gates on which a process is originally defined applied to the particular process instance (see for example the instantiation of process "Proc" in Table 22). The relation used throughout the paper for judging equivalence of behaviours is observational equivalence PS (Bolognesi and Brinksma, 1987), i.e. we are interested only into the external behaviour of processes, that is into the actions that they make available for synchronization with their environment (all actions except i and actions transformed into i by hiding). The protocol derivation mapping defined below in some cases introduces an e specifying no actions, e is equivalent to 5 (as execution of no actions is a success by definition), except for an additional absorption rule (introduced for the purposes of protocol synthesis) stating the (e » b) is equivalent to 6. Server := Loop Loop:= ((Idle[> (event^;((report^;S^)m(report^;ó^}))) » Loop) Idle := {ltest^-,Idle)WÌplay^-,ldle)) V{c,c'}:FIFO{c,c') Serven := {{Mei[> ((eueni^ ((send2!l;(5)|||(send3!l;<5))) » ((rec2!2;(5)|||(rec3!3;<5)))) » Serven) Mei := i(test^-,ldlei)\\{play^-,Idlei)) Server2 := {recill-, report^■,sendi\2-, Server2) Servers ■= {recill;report^^sendilSiServer3) Table 2: An example service and its derived protocol In many of the protocol examples given below, elimination of e is not the only simplification modulo observational equivalence that the specifications have undergone. In addition, process parametrization has been omitted where redundant. 3 Principles of Protocol Derivation 3.1 Problem definition The protocol derivation problem is defined as follows. Given • the above described system of components and channels for protocol interactions, with all FIFO channels initially empty, • a specification of the required system service (non-blocking, with no non-executable or otherwise irrelevant parts), and • a suitable (defined by the restrictions in Section 4) partitioning of the specified actions among the system components, derive such behaviour of individual components that, when the sync, send and ree actions are hidden, the overall system behaviour is observationally equivalent to the specified service and the server never stops with any of its FIFO channels non-empty. An illustrative example of a service and its protocol is given in Table 2. The protocol has been derived as suggested below and subsequently simplified. There is a server consisting of asynchronously communicating components 1 to 3, supporting users 1 to 3, respectively. Whenever user 1 signals a particular event, the server reports it to users 2 and 3, and subsequently becomes ready for a new signal from user 1. Protocol messages of type 1, issued by component 1, serve for reporting the signalled event to components 2 and 3, while messages 2 and 3 confirm to component 1 that the event has been reported to users 2 and 3, respectively. While there is no event to report, the server idles, i.e. allows user 1 to play and execute tests, both locally at component 1. 3.2 Mapping T We are looking for a mapping Tc(e,z) which would take any service specification subexpression e and translate it into its counterpart at any individual component c, within a given context z. The mapping of individual subexpression types is given in Section 4. A Tc(e,2) implements the service actions within e allocated to c and the necessary protocol interactions between c and the rest of the system components. During service execution, each instantiation of an explicit process p gives raise to a new instance of any b within the process body. Since the aim of mapping a specification e of such a ò is a proper implementation of each particular instance of b, z for mapping the e must be the identifier of the particular instance of p. The particular instance of b is then unambiguously identified by "z.Z{e)", where Z{e) identifies e within the specification of p's body. Protocol optimization by re-use of instance identifiers shall not be systematically considered, though often possible. 3.3 The basic principles of protocol construction Like (Kant et al., 1996) and previous similar algorithms, our algorithm is based on a small set of intuitive rules that can be easily expressed in an informal way: 1) Only the server components responsible for actions in the service specification should participate in the execution of the service. 2) An individual service action must always be implemented at the component to which it has been pre-assigned. 3) Every protocol message should unambiguously identify the behaviour that it helps to implement. 4) Service choices should always be resolved exclusively by service actions. Protocol actions only communicate the decisions between server components. 5) To simplify protocol derivation, we partition the service actions in such a way that • conflicts between distributed implementations of concurrent service parts are a priori avoided, and • all service choices can be resolved locally at individual components. 6) With the previous heuristics, the sole purpose of protocol actions is to report on local terminations of individual service parts. 3.4 Service behaviour attributes, particularly termination types Mapping T is guided by various pre-calculated attributes of individual service subbehaviours, actually (speaking in terms of the specification syntax) of the service specification subexpressions by which they are represented. Likewise, the attributes are also defined for each of the explicitly specified processes constituting the service. Computation and selection of attributes is the key activity in the protocol derivation process. After we find a set of attributes that is both consistent and known to lead to an efficient protocol, the protocol derivation itself (i.e. application of mapping T) is trivial. (That doesn't mean that the mapping has also been trivial to conceive and prove!) For any attribute ..) whose value is a set of elements x, let Xx{... ) indicate x e X{...), and vice versa. The basic attributes of a behaviour b are its starting components (SC), its ending components (EC) and its participating components (PC), respectively listing the system components executing a starting, an ending, or any service action within 6. E.g., for a behaviour b= (((((a'-,S')mh';ó')) » (c';stop))l}S')HI we have SC(b) = {1,2}, EC(b) = {1,4}, FC(b) = {1,2,3,4}. Boolean attribute IT(b) indicates whether b might immediately terminate (the above b can not, while its part "(... in isolation could). Boolean attribute ST(b) indicates whether b synchronizes its termination with its environment, i.e. its 6 is not "consumed" by a sequential composition operator (as is for example in the above 6). Boolean attribute DT(b) indicates whether a termination of 6 might be decision-making (as are in the above b both occurrences of All the above attributes are generic properties of behaviours. Solving a system of recursive equations for such an attribute, one should choose a solution minimizing all the process attributes, to respect the natural semantics of the attribute. There are two more attributes, T C and TC^, but they are not generic properties of behaviours. They are selected by a designer, to implement his/hers specific protocol derivation strategy. The exact role of TC and TC^ is to dictate the termination type of individual service parts within the distributed service implementation, as follows: An individual service action must of course be implemented at the component to which it is pre-allocated. At any other component, we propose that it is selec- tively mapped into a stop or an e (semantically equivalent to S). (Kant et al., 1996; Brinksma and Langerak, 1995) strictly map to e, and consequently the quality of the derived protocol suffers. Depending on the mapping of the ending actions of a particular b, in the case that the server is running a terminating alternative of b the behaviour Tc(ò, z) of a component c concludes either by stop (not preceded by J) or by 6. In the latter case, c is a terminating component of b, i.e. TCc(b). It is important that Tc(6, z) concludes for all terminating alternatives of b in the same manner, i.e. always by stop or always by (5. TCc(b) is always a consequence of TC^(b) indicating that the surrounding context of b requires c to conclude its implementation of b by Ö. Besides, ECc(b) implies TCc(b), for the ending components of a 6 are responsible for detecting its termination. If TCc(b), Tc(b,z) terminates on its own and so allows c to sequentially proceed to the subsequent activities. That is the usual behaviour-termination type in LOTOS-based protocol derivation. If -^TCc(b), Tc(b,z) concludes by inactivity, that is disrupted by a subsequent activity of c specified outside Tc(b,z). The opportunity for protocol optimization lies in the fact that setting TCc(b) to false renders the protocol messages serving solely for termination of Tc(b,z) unnecessary. For better understanding, observe that for a service behaviour >> Ò2", S in &i is invisible for the service users and hence its implementation is irrelevant, as long as control is properly transferred to the implementation of Ò2. As TC and TC+ are attributes that are rather selected than computed, we don't provide strict rules for them - just the restrictions that must be respected are stated in Section 4. Within those limits, TC and TC+ should be selected according to the relevant optimization criteria. An always present criterion is minimization of the (worst-case or average) inter-component communication. Another criterion, often conflicting with the former one, might be declaring for some service parts b and components c that TCc(b) is desirable, for c should terminate Tc (b, z) as soon as possible, e.g. to release some resources. A third criterion might be to make a pair of server components exchange a protocol message at a particular point of service execution, e.g. to convey some data. Moreover, scheduling of protocol exchanges on FIFO channels usually requires prevention of channel buffers overcrowding. When trying to find a solution better than the old (TC+(b) = TC(b) = C), one must be aware that in some cases a different solution might also result in a less efficient protocol, depending on subtle properties of the service structure. Thus the optimization should be performed by thorough analysis of the entire service specification. Nevertheless, one should never simply retreat to (TC+(b) = TC(b) = C), for that might re- Sendc(C, m) := |||({(sende'!m;J)|((c' e (C \ {c})) A F/FO(c, c'))}U {(s2/nc,,!m;5)|((c' E (C \ {c})) A-.^/^0(0,0'))}) ReCc(C,m) := |||({(recc'!m;<5)|((c' € iC\{c})) AFIFO{c,c'))}U {(s2/nc,,!m; J)|((c' £ {C \ {c})) A^FIFO{c,c'))}) Exchc{C, C',m) := (if (c € C) then Sendr(C\m) else e endif ||| if (c e C) then ReCr((C \ W\((c e C) A (Ć € C) A ^FIFO(c.c'))}).m) else e endif) VrojAG) := . e G)} := ■ -)■ ^ u") e R)} SelectiC, z) := a (within context z) deterministically selected element of C Terme (6, z) := T:erm'c{b,TC+{h),z) Term'c{b,C,z) := if {EC{b) = ) then Tc{b,z) else if ECÀb) then (Tr(b, z) » SendAiC \ TC(b)). z.Z(b]]) else if ((c e C) A -'TCAb)) then if (|£C(&)| = 1) then (Tc(ö,z)[> ReCciECib),z.Zib))) else ((T.(b,z)[> 6)\\\RecAECib),z.Zm endif else Tr(b,z) endif endif endif Altc{b, 6', z) -Alt'cib, {PC{b')nTCib')),z) Alt'c{b,C,z) := if {EC{b) = (j)) then Tc{b,z) else if (c = Select((TC+(b] n PC(b)), Z(b))) then {Term,{b,z) » Sendc{{C \iPCib)LlTC+{b))),z.Z(b))) else if ((c eC)A ^PCdb) A -TC+(6)) then ReCaiSelect{{TC+ib) n PC(Ò)), Z(ò)), z.Z(b)) else Ternirib, z) endif endif endif Table 3: Functions used in mapping T suit in protocol errors, as explained in Section 4, if not to mention that for some service types, that straightforward solution is extremely inefficient (as demonstrated by the example in Table 7, discussed in Section 4.1). To reduce the computational complexity, the rules for attribute evaluation in Section 4 are not exact, in the sense that they sometimes assume that the protocol derivation algorithm must pay attention to a service scenario that a more careful examination of the service specification would identify as non-executable. Particularly the rules neglect the positive impact of synchronization between parallel behaviours. Consequently, the decomposition transformation might generate some redundant protocol interactions, or the transformation might be unjustly declared inapplicable to a particular action partitioning. In other words, more exact attribute evaluation rules would result in a more generally applicable transformation generating more efficient protocols. But as the proposed rules are strictly pessimistic, they are nevertheless sufficient for protocol correctness (with the harmless exception that the generated component specifications might comprise some parts that are non-executable within the context of the system), provided that the mapping T itself is correct. Of course, computation of attributes might also fail, implying that it is impossible to satisfy all the given restrictions simultaneously, or result in a protocol not satisfying the adopted optimization criteria. In that case, one should try to find a better service action partitioning, or artfully insert in the service specification some dummy internal actions (as long as the service remains observationally equivalent to the original). 3.5 Some auxiliary specification-generating functions, particularly implementation of terminations Table 3 defines a set of auxiliary specification-generating functions for the mapping T. The first two functions implement sending or receiving at a c of a message m between c and any c' in (C \ {c}), independently for each c'. Exchc{C, C',m) implements the actions of c necessary to perform the task of each member of C" receiving m from each member of C other than itself. Since message exchanges in sync actions are bi-directional, that allows some optimizations. Projc(G) and Proj^C-R) respectively project onto the gates of c a set of gates and a set of renamings. Select{C, z) deterministically selects within context z a component in C. If the surrounding context of b requires a c to conclude its implementation of the terminating alternatives of b (if any) by 5, formally TC^{b), that might be implemented by the mapping Tc{b,z) itself, i.e. c included into TC{b). Alternatively, it might be better to have -TCcih) and to make c exit its implementation of b upon reception of special messages (sent by ifTC2(ö) then Term'i(&,{l,2},^) (((a^;sj/ncb.l;(5)[](b^;S2/nc!^.2;si/nc!^.3;d^;(5))||| ((al ; synàzA- 5)[](bi ; si/ndz.S; sync\z.&-, d^; (5))) Term'2(&, {1,2}, z) ~ {{{syndz.V, 6)[]{sync\z.2-, c^; sync\z.3; 5))||| {(syndzA; J)[](sync!2:.5; c^; syndz.G; (5))) else Term', {b, {1,2},z) := ((((a^; 5)ö(bi; s2/nc!z.2; syndz.3-, d^; S))\\\ ((ai;(5)ö(bi;sync!0.5;s2/nc!z.6;di;J))) » {syndz.7-,6)) Term'2{b, {1,2}, z) := {{{syndz.2\c^; syndz.3; stop)|||(s2/nc!z.5; c^; syndz.G] stop)) _[> {syndz.7-,6)) endif_ Table 4: A service behaviour b and some of its possible implementations wrt. its termination type b = , V{c,c'} : FIFO(c,c') , TC+{b) = {1,3,4} , TCjb) = WW Alt'i{b, {1,2,3}, z) := (((a^ ((send3!^-2; 5)|||(send4!^-2; 5)) » stop)[> |||((rec3b.l;<5)|||(rec4!z.l;5))) Alt'2{b,{l,2,3},z) Alt's{b,{l,2,3},z) = (recslz.l;^) = (reci!z.2; b^; sendih.V, send2\z.l-, 6) Alt'4{b,{l,2,3},z) := {Teci\z.2-,c^-,sendi\z.l-,S) Table 5: Illustration of function Alt' the ending components of b) together indicating global termination of b. Function Term, an extension of mapping T, implements the additional protocol interactions. Function Term' is a generalization of Term that signals the global termination to a component set C. For illustration of function Term, consider the service behaviour b in Table 4 with requirement TC} (b) ■ If we set TC2{b) to true, component 2 implements all the "a" actions as e. Consequently, whenever component 1 selects an "a" alternative, it must send a special indication to component 2, for component 2 does not participate in such an alternative and needs a message for its detection and subsequent proper local termination. In the worst case, execution of b requires two such messages. If we set TC2{b) to false instead, component 2 simply executes its part of b and then stops. Later its inactivity is disrupted by a message (a single one!) implemented by Term applied to b. Obviously, -iTC2Ìbi) is the more efficient solution. Function Alt is an extension of function Term in the sense that one of the components knowing that an alternative ò of a ö' has been activated (and terminated) indicates the fact to the yet non-informed participants of b' that need the information. Function Alt' is a generalization of Alt that sends the information to a component set C, where necessary. Note that both Alt' and Term' can serve for adding 6 to implementation of a & at a c, but there is a slight difference: Term' implements <5 upon c receiving messages from all the ending components of b and is thus also suitable if {Tc{b,z) ^ stop) or if c must detect global termination of b. Otherwise c may enable S already after receiving a single message from a selected participant of b (function Alt'), for the reception may disrupt Tc{b, z), supposed to be equivalent to stop, at any time. The effects of function Alt' are illustrated in Table 5. Because of {TC^{b) A -.TCi(6)), component 1 detects global termination of b by receiving messages from the ending components 3 and 4, introduced by the Term part of Alt'. On the other hand we have (^TC^(b) A -rPC2Ìb)), thus Alt' makes component 3 (selected among {1,3,4}) indicate activation of b to component 2. 1 and 3 in the second argument of Alt' are irrelevant, since both components participate in b, and component 3 even terminates on its own. 3.6 Assumptions (obligations) for mappings T, Term' and Alt' This section is only intended for readers deeply interested in technical details, while others are advised to refer to it only if having difficulties with the understanding of Section 4. Mapping T is compositional, i.e. a mapping of a behaviour b is defined in terms of the mappings of its subbehaviours b'. Thus when designing Tc{b,z), we always make some assumptions for each individual Tc{b',z). One level higher, analogous statements appear as proof obligations for Tc{b,z). As mapping Term' or Alt' shall often be used instead of T, the obligations (suitably adapted) also apply to them. Let Func{b, Arg) denote behaviour of the considered distributed system where every component c behaves like FitnCc{b,Arg), where Fune is T, Term' or Alt' and Arg are the remaining arguments of the mapping. Let Func{b,Arg)* denote Func(b,Arg) with protocol interactions hidden. Below we list the correctness criteria adopted for the system be- haviour Func{b,Arg) and the individuai component behaviours Funcdb, Arg) within its context, assuming that all the FIFO channels are initially empty. Most of the rules are just common sense or can be understood in the light of the protocol derivation guidelines stated so far, while the others support implementation of various individual behaviour composition operators, explained in Section 4. The obligations are indeed numerous, but the correctness proof (Kapus-Kolar, 1998) for the protocol derivation transformation has identified them as necessary, as will the reader if trying to thoroughly understand the mappings in Section 4. 1) If -.PCc(&), then {{{Fune = T) A -rCc(6)) V {{Funcib, Arg) = Term'(&, C,... )) A (c^(TC(ò)UC)))V {{Funcib, Arg) = AW{b, C,...)) A {c^{TC+{b)ö{C\PC{b))))) impUes FunCc{b, Arg) = stop and TCc{b) implies Funcc{b, Arg) = e. 2) Any visible action offered by FunCc{b,Arg) is either a service action pre-allocated to c within b, a protocol interaction associated with termination of ab' (reci!2;5))) Proc2 := = (c2;Proc2) Server3 := (reci!2;b«;(5) Table 7: An example implementation of a service combining finite and infinite alternatives within Func{b,Arg). 11) Any protocol message sent within Func{b, Arg) is also received within it. 4 Distributed Implementation of Individual Service Specification Subexpression Types In this section we describe distributed implementation of individual service specification subexpression types. Table 6 summarizes the rules valid for any subexpression of type b, while the more specific rules are given in separate tables, explained in Sections 4.2 to 4.8. Each of the tables is typically divided into four sections: 1) definition of the syntax of the expression e that is being mapped, 2) attribute calculation rules, 3) (optional) additional restrictions on e or its attributes, and 4) mapping T for e. Studying Tc(6, z) in the tables with the specific rules, the reader may with no harm pretend that the only server components are those participating in b. The explanations of the transformations have also been conceived from that viewpoint. 4.1 Rules applying to all behaviour types The generally applicable rules in Table 6 deserve some explanation. Rule {{EC{b) = (j)) ^ {TC+{b) = (f)) prevents server components from interpreting a non-terminating b as terminating (i.e. no c can ever terminate, if {EC{b) = (ß), for that might result in a protocol error, if b is alternative to a terminating 6' (Kapus-Kolar et al., 1991). With that rule, it is no longer necessary to report every process instantiation within the service to every component, as it is in (Kant et al., 1996). An illustrative example is given in Table 7. In comparison with the solution suggested in (Kant et al., 1996), there is an infinite saving in protocol messages - two per every instantiation of "Proc". if {EC{b) = (p) then TC+{b) = (j) else if 36' : ((6 < h') A ^PCc{b')) then --TC+{h) else TC+(6) defined in the corresponding one of the Tables 10,12,13,15,17,20 endif endif {DT{h) A ST{b)) => (( EC{b)\ = 1) A {TC+{h) = EC{h))) EC{h) C {TC+{b) \ {PCjb) \ EC{h))) C TC{b) C TC+{h) if ^PCc{b) then if TCo{b) then T^b, z) ~ e else Tc(6, z) := stop endif else Tc(ò, z) defined in the corresponding one of the Tables 9,10,12,13,15,17-19,20 endif Table 6: Rules valid for any service subexpression b introduced for the purpose of protocol synthesis The second row of Table 6 requires that a behaviour b whose termination might be both decision-making and synchronized has a single ending component that is also the only component regarding b as terminating. To understand the requirement, observe the service behaviour e = & = stop SCcib) = ECa(b) = PCc{b) = false IT{b) = DT{b) = false Table 8: The specific rules for stop e SCcib) = ECcib) = PCcib) - (c = Ć) IT{b) = true DT{b) = false Tc'(e,z) :=b Table 9: The specific rules for S'^ ponent 1 can't report them separately (only upon J of Ti(6,2;)), necessitating (TC+(öi) = rc+(&i[> &2) = TC(6i)). Hence the considered rule applies to "öi[> 62" • Also, (|rC+(6i[> 02)1 = 1) (not to speak of a decisionmaking (5 within 63) implies (TCib) ^ EC{b) = ECibi)), i.e. S oib must be in all its alternatives controlled by component 1 (and indeed it is). (Kant et al., 1996; Brinksma and Langerak, 1995) ignore the fact that a decision-making S of bi within a "&i[> &2" might be synchronized, thus they sometimes generate erroneous protocols. The two methods can only be amended by getting rid of the rule {PCc{b) ^ TC+{b)), as we have done. In the third row of Table 6, the not yet explained idea is that ~^PCc{b) should imply (TC+(&) = TCc{b)). That is because a non-participant c of a 6 should not participate in Termc{b,z), just as not in Tc(6, z), as stated in the last row of the table. The Tc{b, z) rule in Table 6 implies that if -^PCc{b), TC^lb') for any b' 62)|[b2]|63)". 6 of 61 is decisionmaking for (&i[> 62) and synchronized with ö of 63, hence both S must be controlled by the same component (in our case, it is the component 1). Thus ((|£C(&i)i = 1)A (rc(&i) = ECib,) = ECibs))). Moreover, as 5 of Ti (61, z) and the corresponding 6 of Ti(6i[> b2,z) are guarded by S of Ti(63,2;), com- 4.2 Implementation of inaction and termination The specific rules for stop and are defined in Table 8 and Table 9, respectively. 4.3 Implementation of choice For implementation of choice (Table 10) we adopt the usual restriction (Bochmann and Gotzhein, 1986) that alternatives must have an unique and common starting place. Provided that distributed implementation of individual alternatives is communication-closed and preserves their starting actions, the choice is entirely local. Let be the selected alternative. After its execution, one of its ending components proceeds to informing on the selected alternative the missing terminating participants of b. That is implemented by using function Alt instead of Term. If no message is sent to a missing participant c of b, Tc{b,z) is equivalent to Tc(&2, z), that is in the case of bi not enabled, so that b = FIFOic,c') = ({c,c'} e {1,2}) , TCjb) = {1,2} Ti (6, z) sync2lz.l-, 6)[]{c'-,send3\z.2-, recglz-S; e'; syncri z A; S)) T^jh^z) := {Teci\z.2-,à^\sendi\z.Z\stop)_ Table 11: An example implementation of choice e = h-hi»h2 SCcih) = SCcih) ECcjb) = ECcifi^) PCgih) ^ {PCc{bi)y PCc{h2)) IT(b) = ITjbi) DT{b) = DT{b2) 5T(òi) = false , STjbi) = ST{b) {{^PCc{b2) ATCc{b2))V ECcibi)) TC^bi) ^ iiECib) = cl>)VTCcib)WECc{bi)VSCc{b2)) TC+{b2)=TCeib)_ T.fe.^) :=i^TC+(b^) then (TerTnÀb^. z) » Exchr(EC(b,),SC(b'>.),z.Z(b^)) » TermÀb-,., z)) else if 5Cc(&2) then {Term'c{bi,{c},z) » Termcib2,z)) _else (Te(òi,2) > Termc(b2,z)) endif endif_ Table 12: The specific rules for sequential composition the component waits for a disrupting message issued at some point after completion of b. In the example in Table 11, component 2 is a missing terminating participant of the second alternative, thus it is notified of its execution. On the other hand, component 3 does not participate in the first alternative, but is not required to terminate it, thus it receives no notification. Initial (decision-making) terminations of b are no longer forbidden (see Table 16), as they are in (Brinksma and Langerak, 1995). That is because each initial S is now controlled by the component c' making the choice and guards termination of Tc(&, 2) for any other c e PC{b). 4.4 Implementation of sequential composition and action prefix Implementation of sequential composition is specified in Table 12. Proper sequencing of bi and Ò2 requires that each c e EC{bi) reports (by a message z.Z{bi)) termination of Tc(6i,z) to each c' € 5C(&2) (Kant et al., 1996). An analogous solution is employed for implementing action prefix (Table 13). 1) A c e TC"*"(61) executes TerTnc{bi,z), then its part of the exchanges of message z.Z{bi) sent from EC{bi) to SC{b2), and finally Termc{b2,z). 2) If (-.TC+(òi) A 5Cc(&2)), the receptions of z.Z{bi) at c are implemented by upgrading Tc{bi,z) into Term'c{bi,{c},z)-, afterwards, c proceeds to Termc{b2,z). 3) If (-.TC+(6i) A -i5Cc(&2)), c concludes Tc(&i, z) by inaction, that might be disrupted by Termc{b2,z) or some later activity. The various situations are illustrated by the example in Table 14, where one can also observe a situation of bi having both a terminating and a non-terminating alternative. As terminations of bi are not terminations of b, there is no strict rule for TC+(&i), but we require that 1) (-PCc(&2) a TCcib2)) implies TC+(òi), for otherwise Termc{b2,z), unguarded in T{b,z), could prematurely disrupt Tc(òi,z), and 2) TC+{bi) implies i{EC{b) = V TCc{b) V ECcibi) V SCc(Ò2)), to prevent disruption of Termdbijz) by actions upon termination of b in the alternatives where c doesn't participate in 62. 4.5 Implementation of disabling Implementing disabling (Table 15) we encounter similar problems as when implementing choice. The starting actions of the disrupting behaviour Ò2 are alternatives to the actions (including 6) in the potentially disrupted 61, thus we require (Brinksma and Langerak, 1995) &2 to have an unique starting component ć that is also the only participant of 61. (Kant et al., 1996) has tried to avoid the restriction, but unsuccessfully, with potential protocol errors (Kapus-Kolar, 1999). The difficult problem is that it is not sufficient to individually implement bi and Ö21 if bi is terminating. We need a special termination scheme, like the one explained in the following. If &2 is activated, a termination of b is always a termination of Ö2, and thus properly detected by all the participants of b needing the information, since by the adopted restriction, {PC{b) = PC(Ò2)). However, if Ò1 terminates without being disrupted by Ö2, c' must subsequently report, where necessary, the termination to the other participants of b. For a receiving c", the situation is exactly as in the case of "&iOÖ2"- At c', however, the transmission must not be attached sequentially to the 61 part (as in (Kant et al., 1996)), because in that position it would be disruptable by the &2 part (Kapus-Kolar, 1999). Hence it must be e = b = ■s^'-M SCcib) = {c = c') ECcib) = ECc{b2) PCe(&) = ((c = c')VFC7,(Ò2)) IT{b) = false DT{b) = DT{h2) ST{b2) = ST{b) TC+(&2) = TCa{b) Tc(e,z) :=if (c = c') then {s'='; iSendaiSC{b2), z.Z{bi)) » Termcib2, z))) else if SCJbo) then (Rec.({c'}.^.Z(òi)) » Termjbo.z)) else Termr(b9.,z) endif endif Table 13: The specific rules for action prefix FIFOjc, c') ^ ({c, c'} {1,2}) , TCjb) = {1,2,3,4}_ Ti{b,z) := {{{8}-,send3lz.l;Tec3\z.2-,c^-,S)\}{e^;sendi\z.3-,stop)) >> {sync2\zA; g^-,sendi\z.5-, Tec4\z.6-,i^-,S)) T3(ò,^) := {Teci\z.l-y-,{{sendilz.2;S)\\\{send2\z.2-,6))) T4(ò,z) := ((reci!2.3;f^stop)[> (recib.5; h^ sendil^.G; J))_ Table 14: An example implementation of sequential composition executed after c' exits both parts, implying that the message is also sent if &2 is executed (Brinksma and Langerak, 1995). Therefore -.TC^t,(6i), for the message reports completion of b rather than bi. If c' is also the only ending component of 02, c" needn't be a terminating component of &2 and interprets the reception as a disruption of Tc{b2,z) (see the example in Table 16). In the opposite case, components (including c') must first terminate Ò2 (if currently active), before sequentially proceeding to synchronization upon completion of b (Brinksma and Langerak, 1995). However, the second solution is only applicable if for every c" € i{TC{b)nPC{b))\{c'}), all the initial actions of Terme» ib2,z) are also receptions of messages sent by c'. The simplest way to secure that is to require \PC{b)\ = 2, as it is in (Brinksma and Langerak, 1995). Initial (decision-making) terminations of 62 are no longer forbidden, as they are in (Brinksma and Langerak, 1995). That is because each initial S is now controlled by c' and guards termination of Tc(6, z) for any other c G PC{b). 4.6 Implementation of parallel composition Parallel composition of service parts (Table 17), regardless of the extent of their synchronization, introduces no additional protocol messages. Each component simply executes in parallel its local implementations of individual service parts, locally synchronized as specified by the parallel composition operator. To minimize communication costs, we allow separate termination optimization of individual parallel service parts. If all components communicate synchronously (as for example in process "First" in Table 22), the cross- cut theorem (Eijk, 1990) for re-grouping of parallel processes applies: One may pretend that it is not that protocol interactions in the implementations of bi and 62 share internal system channels and differ only in the message contents, but that the message contents is also a part of the channel name, i.e. that the two implementations use different system channels. Hence as far as synchronization between the service actions in bi and Ò2 is ignored, the distributed server runs the parallel service parts' implementations independently. Moreover, synchronization upon a service action between the parallel service parts is at sole discretion of the component executing the action, i.e. a local matter. (Kant et al., 1996; Brinksma and Langerak, 1995; Kapus-Kolar, 1997) erroneously (Kapus-Kolar, 1999) presume that the cross-cut theorem also applies to asynchronous communication. The simplest way to establish virtual independence between the implementations of &i and 62 in the presence of FIFO channels is to require that there is no asynchronously communicating pair of components belonging to (PC(6i) n PC(Ò2)). (For example, for process "First" in Table 22 it is crucial that -ìFIF0{l,2).) If the parallel composition is pure interleaving, however, the above restriction is not necessary (as for example in process "Second" in Table 22). That is J because the components are known to always be able to receive protocol messages in the global order in which they have been sent, in both the implementation of 61 and of Ò2 (Kapus-Kolar, 1998) 4,7 Implementation of hiding and renaming Table 13 indicates that the only property of an action s"^ that is relevant for mapping T is its location. Hence hiding commutes with T and its implementa- e = b = 6i[> &2 SCcjb) = jSCcih) V 5Cc(&2)) ECcjb) = {ECcjbi) V ECc{b2)) PCcjb) = jPCcjbi) V PCc(Ò2)) STjbi) = ST{b2) = STjb)_ ITjb) = (JT(òi) V IT{b2)) DT{b) = {{ECjb,) ITjb^) V DTjb^)) TC+{bx) = ECcjbi) ; if {ECjb) = PC(bi)) then TC+jbj) = PCcjbi) else TC+{b2) = TCcjb) endif 3c' : ((PC(bi) = SC{b2) = {c'})A {{EC{b) C {c'}) V {{{TCjb) n PC(Ò)) \ {c'}) = 0) V (|PC(&)| = 2))) Tc(e,z) := if (ì;C(Òi) = (p) then if PCc(&i) then (òi[> Termc{b2,z)) else Termr(b->.z) endif elseif P(7e(&i) then ((6i[> Termc{b2,z)) » Sendc{{TC{h)r\PC{b)),z.Z{hi))) ^if rCc(6) then if {EC{b2) = PC(òi)) then (Te(&2,^)[> ReCe(PC(òi),z.Z(&i))) else(ReCc(PC(bi),2.Z(6i))D (Terme if {EC{b2) ^ (A) then » ReCc(PC(òi), z.Z(6i)) endif)) endif else Tc{b2,z) endif endif endif Table 15: The specific rules for disabling V{c,c'} : FIFO{c,ć) , rC7(6) = {1,3}_ Ti(ò,^) (((a^bi;(5)[> ((5ö(di; ((send2!^.2;<5)|||(senrf3!2-2; J)) » ((recsl^.S;5)|||(rec3!z.3;(5)) »(g^-J)))) >> (sendslz.l;^)) T2Ìb,z) := {Tecilz.2-,e'^;sendi\z.S-,stop) T3(6,z) := {{Teci\z.2-,P-sendi\z.3-,stop) > {Teci\z.l-,ö))_ Table 16: An example implementation of disabling tion is trivial (Table 18). To enforce the commuting for renaming, we require that all renamings are local to individual server components (Table 19). An example implementation of hiding and renaming is given in Table 22. 4.8 Implementation of process definition and instantiation An explicit process p is implemented at a component c as an explicit process pdn) (Table 20), where formal parameter n carries the process instance identifier (Table 21). For the main process Server we presume that it might be necessary for its termination to be a common action of the server environment and all the server components. An example implementation of multiple concurrent instances of a process is process "Second" in Table 22. Note that in the example, simplification of all z.Z{b) into Z{b), suggested for the example in Table 7, would result in an erroneous protocol. 5 Discussion and Conclusions We have proposed a correctness-preserving transformation for functionality decomposition based on specifications written in Basic LOTOS (Bolognesi and Brinksma, 1987), the core sublanguage of the stan- dard specification language LOTOS. Given a specification of the required external behaviour (the expected service) of a system and a partitioning of the specified service actions among the system components, the transformation derives behaviour of individual components implementing the service. A correctness proof is provided in (Kapus-Kolar, 1998). e = b= hide G in bi SCcib) = -- SCcib,) ECcib) = ECcibi) PCcib) -- = PCe(fel) IT{b) = ITibi) ST{bi) -- = 5T(Ò) DT{b) = DT{bi) TCcibi) = TCcib) Tc{e,z) := hide Proj^G) in Tc{bi,z) Table 18: The specific rules for hiding Our algorithm enhances and integrates the algorithms of (Kant et al., 1996; Brinksma and Langerak, 1995). As the two algorithms axe themselves a synthesis of the earlier similar approaches, and thoroughly compared to them, in the following we only compare our algorithm to the two algorithms. • Unlike (Brinksma and Langerak, 1995), our algorithm is applicable to multi-party servers. • It is applicable to servers with both synchronous and asynchronous inter-component channels, while (Kant e = b = bi\Gb2 SCc{b) = {SCc{bx)ySCc{b2)) ECc(b) = (ECc(b,) V ECc(b2)} PCc{b)^{PCc{bi)\/PC,{b2)) /T(ò)-(/r(6i)A/T(62)) STibi) = STib2) = true DT(b) = iDT{bi)W DT{b2)) TC^ib,) = TCTib2)=TCcib) [G = 0) V-3{c,c'} C (PC(fei) nPC(&2)) : FIFO{c,c') Tcie,z) := {Terrndbuz) Proj,(G}\Termaib2,z)) Table 17: The specific rules for parallel composition Server := (First|[a^,c'^^jlSecond) First := hide b^ in ((((a^;(5i)||l(b2;<5^)) » (c^; 52))|[b2]|(di;b^;<5^)) Second := ((ren A^ ^ a^ B^ ^ b^ C^ c^ in Proc)|||(ren A^ ^ x^ B^ y^ C^ ^ z^ p^^^)) Proc:=(((Ai;5i)|||(B^5='))»(C2;52)) FIFO{c,c') = i{c,c'} jt {1,2}) Server 1 := (Firsti(l) Firs^i(z) := {{a};sym Secondi{z) := ((ren A Proci(z) := (A^;sj/nc; |[a^]| Secondi (2)) ^!z.l;6)|||(di;s2/nc2!z.2;^)) a^ in Proci(z.l))|||(ren A^ x^ in Proci(z.2))) Ser?;er2 := (First2(l) Firs^2(z) := hide b^ i Second2{z) := ((ren C Proc2(z) := (((sž/ncjlz [c^] Seconda (2)) n ((b2; sync, !z. 1 ; c^; J)|[b^]|(sync, !z.2; b^; 5)) ^ c2 in Proc2(z.l))|||(ren C^ ^ z^ in Proc2(z.2))) ;.l;5)|||(rec3!z.l;<5))»(C2;5)) Servers Seconds (2) SecondsCz) := ((ren B^ ^ b^ in Proc3(z.l))||l(ren B^ ^ y^ in Proc3(z.2))) Proc3(z) := (B3;send2!z.l;5)) Table 22: An example implementation of parallel composition, hiding, renaming and process instantiation e = Ò = ren i? in fc '1 SCcib) = SCcibi) ECcib) = ECc{bi) PCcib) = PCo{bi) IT{b) = ■■ /T(6i) ST(òi) = ST{b) DT{b) -- = DT{b,) TCcibi) = TCcib) iiul 5) e fi) 3u2 : {g = Tc(e,z) := ren Proj^{R) in T cibi, z) Table 19: The specific rules for renaming et al., 1996) only supports asynchronous communication. As such, our algorithm has wide applicability (see the Introduction) and is also suitable for hardware/software co-design. • The algorithm corrects an error identified in (Brinksma and Langerak, 1995) and several identified in (Kant et al., 1996). It is also more general, in the sense that it supports implementation of decisionmaking terminations. • The algorithm provides means for the generation of more efficient protocols (with less intercomponent communication), based on the following observation: If there are two consecutive service parts bi and &2, the only server components that really must detect the termination of bi are those executing its ending e = (p 01 ) SCcip) = SCc(bi) EC dp) = ECcibi) PCcip) = : PCc(bl) IT{p) = IT{b,) ST(bi) = ST{p) DT(p) = DT{bi) rc+(6i) = TCcip) Tc(e,z): = (Pcin) := - Termc{bi,n)) Table 20: The specific rules for process definition actions. Other participants of &i can as well conclude its execution by inaction that is later disrupted by actions announcing execution of b^, for it is the start of Ò2 - not the formal termination of bi - that is relevant to the service users. Even if there is no Ò2 following bi, it might still be more efficient for a non-ending participant of bi not to care about its termination, but rather conclude its part of òi with inaction later disrupted by termination-signalling messages from the ending participants of 61. • The algorithm is more flexible, for it allows one to employ the above communication-reduction principle to an extent best meeting his/her various optimization criteria, reduction of inter-component communication often being just one of them. If the principle is only employed where mandatory for protocol correctness, e = l i = p SCcib) = SCcip) ECcib) = ECcip) PCcib) = PCcip) DT{h) = DTip) if {p = Server) then ST{p) = true else STiv) = iST(v) V ST(h)) if [p = Server) then TCc(p) = true else TCc{j>) = TCdb) Tc{e,z)-po{z.Z{h)) ■ Table 21: The specific rules for process instantiation best possible performance. Even optimization criteria are not well known; it would be convenient to have them derived automatically from a more detailed specification of the system and the service, particularly from requirements regarding action parameters and quantitative timing, and the information on the invocation probability for individual service parts. Thus we decided to postpone the implementation of the algorithm till completion of a thorough study on the subject. the algorithm reduces to a corrected version of (Kant et al., 1996; Brinksma and Langerak, 1995) adapted for multi-party servers with synchronous and/or asynchronous inter-component channels. It seems that one should prefer our algorithm to (Kant et al., 1996; Brinksma and Langerak, 1995), though it could be further improved by more exact computation of service specification subexpression attributes and restrictions, that would widen its applicability and/or increase the efficiency of the derived protocols. Other items for further study are the same as for the two former algorithms: • introduction of inter-component co-ordination schemes that would render the various restrictions on the service specification structure unnecessary, i.e. allow distributed decision-making, as for a very limited setting suggested in (Langerak, 1990). There is presently no adequate solution that would not ruin the compositionality of the algorithm, thereby making the service/protocol relationship difficult to understand. • extension to service actions with data parameters and to timed service actions. Our experience (Kapus-Kolar, 1991a,b) shows that it is typically possible to convey data and timing information piggybacked in the protocol messages already present if data and time are ignored, i.e. in the messages introduced by the above presented algorithm. Of course, provided that the messages are sent at appropriate points of service execution. Hence again the message-scheduling fiexi-bility of our algorithm proves convenient, particularly in the presence of real-time requirements and protocol channels with substantial transit delay. • generalization to unreliable protocol channels, though it presently seems that it would be better to solve the problem below the application layer of the system. For recovery from errors requires returning to previous states, but the concept of an explicit state is not defined in LOTOS. The algorithm as it is now is useful as a set of hints on how to systematically design correct and efficient distributed service implementations. To complete the work, it would be desirable to implement the algorithm within a CAD tool. The mapping itself is trivial to implement, but the communication optimization part is compUcated, if one wants to give the algorithm the References [1] Bochmann, G. v., Gotzhein, R., Deriving Protocol Specifications from Service Specifications, in Proc. ACM SIGCOMM'86 Symp., ACM, 1986, 148-156. [2] Bolognesi, T., Brinksma, E., Introduction to the ISO Specification Language LOTOS, Computer Networks & ISDN Systems 14(1), 25-59 (1987). [3] Brinksma, E., Langerak, R., Functionality Decomposition by Compositional Correctness Preserving Transformation, SACJ/SART 13, 2-13 (1995). [4] Eijk, P. v.. Tools for LOTOS Specification Style Transformation, in Formal Description Techniques 11(5. T. Vuong, ed.), North-Holland, 1990, 43-51. [5] Kant, C., Higashino, T., Bochmann, G. v.. Deriving Protocol Specifications from Service Specifications Written in LOTOS, Distributed Computing 10, 29-47 (1996). [6] Kapus-Kolar, M., Deriving Protocol Specifications from Service Specifications Including Parameters, Microprocessing and Microprogramming 32, 731-738 (1991). [7] Kapus-Kolar, M., Deriving Protocol Specifications from Service Specifications with Heterogeneous Timing Requirements, in Proc. 3rd lEE Int. Conf. on Software Engineering for Real-Time Systems, lEE, London, 1991, 266-270. [8] Kapus-Kolar, M., Employing Disruptions for More Efficient Functionality Decomposition in LOTOS, in Proc. 22nd EUROMICRO Conf., IEEE Computer Society, 1997, 464-471. [9] Kapus-Kolar, M., Employing Disruptions for More Efficient Functionality Decomposition in LOTOS, Technical Report 7878, Jožef Stefan Institute, Ljubljana, 1998. [10] Kapus-Kolar, M., Comments on Deriving Protocol Specifications from Service Specifications Written in LOTOS, to appear in Distributed Computing 12(4), 1999. [11] Kapus-Kolar, M., Rugelj, J., Bonač, M., Deriving Protocol Specifications from Service Specifications, in Proc. 9th lASTED Int. Symp. Applied Informatics (M. H. Hamza, ed.), Acta Press, Anaheim-Calgary-Zürich, 1991, 375-378. [12] Langerak, R., Decomposition of Functionality: A Correctness-Preserving LOTOS Transformation, in Protocol Specification, Testing and Verification X (L. Logrippo, R. Probert, H. Ural, eds.), North-Holland, 1990, 229-242. [13] Saleh, K., Synthesis of Communication Protocols: An Annotated Bibliography, Computer Communication Review 26(5), 40-59 (1996). [14] Turner, K. J. (ed.). Using Formal Description Techniques - An Introduction to ESTELLE, L O TOS and SDL, John Wiley, New York, 1993. [15] WELL - World-wide Environment for Learning LOTOS, "http://www.cs.stir.ac.uk/~kjt/research/-well/well.html". An Application-Level Dependable Technique for Farmer-Worker Parallel Programs Vincenzo De Florio, Geert Deconinck and Rudy Lauwereins Katholieke Universiteit Leuven, Electrical Engineering Dept, ACCA Group Kard. Mercierlaan 94, B-3001 Heverlee, Belgium Phone: +32 16 32 1142, Fax: +32 16 32 1986 E-mail: Vincenzo. DeFlorioSesat. kuleuven. ac. be Keywords: parallel computing, farmer-worker applications, fault tolerance Edited by: Rudi Murn Received: April 14, 1998 Revised: February 4, 1999 Accepted: May 15, 1999 An application-level technique is described for farmer-worker parallel applications which allows a worker to be added or removed from the computing farm at any moment of the run time without affecting the overall outcome of the computation. The technique is based on uncoupling the farmer from the workers by means of a separate module which asynchronously feeds these latter with new "units of work" on an on-demand basis, and on a special feeding strategy based on bookkeeping the status of each work-unit. An augmentation of the LINDA model is finally proposed to exploit the bookkeeping algorithm for tuple management. 1 Introduction Parallel computing is nowadays the only technique that can be used in order to achieve the impressive computing power needed to solve a number of challenging problems; as such, it is being employed by an ever growing community of users in spite of what we feel as two main disadvantages, namely: 1. harder-to-use programming techniques, programming models and development tools—if any,— which sometimes translate into programs that don't match as efficiently as expected with the underlying parallel hardware, and 2. the inherently lower level of dependability that characterizes any such parallel hardware, i.e., a higher probability for events like a node's permanent or temporary failure. A real, effective exploitation of any given parallel computer asks for solutions which take into a deep account the above outlined problems. Let us consider for example the synchronous farmer-worker algorithm, i.e., a well-known model for structuring data-parallel applications: a master process, namely the farmer, feeds a pool of slave processes, called workers, with some units of work. The slave processes then execute some job on their units. The master then polls the slaves until they return their partial results that axe eventually recollected and saved. Though quite simple, this scheme may give good results, especially in homogeneous, dedicated environments. But how does this model react to events like a failure of a worker, or more simply to a worker's performance degradation due, e.g., to the exhaustion of any vital resource? Without substantial modifications, this scheme is not able to cope with these events— they would seriously affect the whole application or its overall performances, regardless the high degree of hardware redundancy implicitly available in any parallel system. The same unflexibility prevents a failed worker to re-enter the computing farm once it has regained the proper operational state. As opposed to this synchronous structuring, it is possible for example to implement the farmer-worker model by de-coupling the farmer from the workers by means of an intermediate module, a dispatcher which asynchronously feeds these latter and supplies them with new units of work on an on-demand basis. This strategy guarantees some sort of a dynamic balancing of the workload even in heterogeneous, distributed environments, thus exhibiting a higher matching to the parallel hardware. The Live Data Structure computational paradigm, known from the LINDA context, makes this particularly easy to set up (see for example De Florio, Murgolo and Spinelli, 1994). With this approach it is also possible to add a new worker at run-time without any notification to both the farmer and the intermediate module— the newcomer will simply generate additional, non-distinguishable requests for work. But again, if a worker fails or its performances degrade, the whole application may fail or its overall outcome be affected or seriously delayed. This is particularly important when one considers the inherent loss in dependabihty of any parallel, {i.e., repHcated) hardware. Next sections introduce and discuss a modification to the above sketched asynchronous scheme, which inherits the advantages of its parent and offers new ones, namely: - it allows a non-solitary, temporarily slowed down worker to be left out of the processing farm as long as its performance degradation exists, and — it allows a non-solitary worker which has been permanently affected by some fault to be definitively removed from the farm, both of them without affecting the overall outcome of the computation, and dynamically spreading the workload among the active processors in a way that results in an excellent match to various different MIMD architectures. 2 The Technique For the purpose of describing the technique we define the following scenario: a MIMD machine disposes of n + 2 identical "nodes" (n > 0), or processing entities, connected by some communication line. On each node a number of independent sequential processes are executed on a time-sharing basis. A message passing library is available for sending and receiving messages across the communication line. A synchronous communication approach is used: a sender blocks until the intended receiver gets the message. A receiver blocks waiting for a message from a specific sender, or for a message from a number of senders. When a message arrives, the receiver is awaken and is able to receive that message and to know the identity of the sender. Nodes are numbered from 0 to n -1-1. Node 0 is connected to an input line and node n -(-1 is connected to an output line. - Node 0 runs: - a Farmer process, connected by the input line to an external producer device. In the following we consider a camera as the producer device. A control line wires again the Farmer to the camera, so that this latter can be commanded to produce new data and eventually send this data across the input hne; - a Dispatcher process, yet to be described. - Node n 1 runs a Collector process, to be described later on, connected by the output line to an external storage device, e.g., a disk; — Each of the nodes from 1 to n is purely devoted to the execution of one instance of the Worker process. Each Worker is connected to the Dispatcher and to the Collector processes. 2.1 Interactions Between the Farmer and the Dispatcher On demand of the Farmer process, the camera sends it an input image. Once it has received an image, the Farmer performs a predefined, static data decomposition, creating m equally sized sub-images, or blocks. Blocks are numbered firom 1 to m, and are represented by variables bi,l < i < m. The Farmer process interacts exclusively with the camera and with the Dispatcher process. — Three classes of messages can be sent from the Farmer process to the Dispatcher (see Fig. 1): class-1 message: a NEW-RUN message, which means: "a new bunch of data is available"; class-2 message: a STOP message, which means that no more input is available so the whole process has to be terminated; class-3 message: a couple {k,bk),l < k < m, i.e., an integer which identifies a particular block (it will be referred from now on as a "block-id"), followed by the block itself. — The only type of message that the Dispatcher process sends to the Farmer process is a block-id, i.e., a single integer in the range {!,..., m} which expresses the information that a certain block has been fully processed by a Worker and recollected by the Collector (see §2.3.) At the other end of the communication line, the Dispatcher is ready to process a number of events triggered by message arrivals. For example, when a class-3 message comes in, the block is stored into a work buffer as follows: receive {k, bk) Sk f- DISABLED Wk bk (Here, receive is the function for receiving an incoming message, s is a vector of m integers pre-initialized to DISABLED, which represents some status information that will be described later on, and li; is a vector of "work buffers", i.e., bunches of memory able to store any block. DISABLED is an integer which is not in the set {1,... ,m}. The sign is the assignment operator.) As the Farmer process sends a class-1 message, that is, a NEW-RUN signal, the Dispatcher processes that event as follows: s-f- 0 broadcast RESUME that is, it zeroes each element of s and then broadcasts the RESUME message to the whole farm. When the first image arrives to the Farmer process, it produces a series (6i)i N such that V[j] G S/R : /([i]) = Si. Now, first let us consider a = min/(5/iž); then we choose I S in any way, e.g., pseudo-randomly; finally, message {l,bi) is sent to Worker j, si is incremented, and the partition is reconfigured accordingly. If 5 is the empty set, a SLEEP message is generated. In other words, entry Si when greater than or equal to 0 represents some sort of a priority identifier (the lower the value, the higher the priority for block bi). The block to be sent to a requesting Worker process is always selected among those with the highest priority; after the selection, Si is updated incrementing its value by 1. In this way, the content of s i represents the degree of "freshness" of block it substantially counts the number of times it has been picked up by a Worker process; fresher blocks are always preferred. As long as there are "brand-new" blocks, i.e., blocks with a freshness attribute of 0, these are the blocks which are selected and distributed. Note that this means that as long as the above condition is true, each Worker deals with a different unit of work; on the contrary, as soon as the last brand-new block is distributed, the model admits that a same block may be assigned to more than one Worker. This is tolerated up to a certain threshold value; if any Sj becomes greater than that value, an alarm event is raised—too many workers are dealing with the same input data, which might mean that they are all affected by the same problem, e.g., a software bug resulting in an error when bi is being processed. We won't deal with this special case. Another possibility is that two or more Workers had finished their work almost at the same time thus bringing rapidly a flag to the threshold. Waiting for the processing time of one block may supply the answer. A value of DISABLED for any s» means that its corresponding block is not available to be computed. It is simply not considered during the selection procedure. 2.3 Interactions Between the Workers and the Collector Any Worker may send just one class of messages to the Collector; no message is sent from this latter to any Worker (see Fig. 1). The only allowed message is the couple {k, o) in which o is the fully processed output of the Worker's activity on the block. The Collector's task is to fill a number of "slots", namely pi,i = 1,... ,m, with the outputs coming from the Workers. As two or more Workers are allowed to process a same block thus producing two or more {k, o) couples, the Collector runs a vector of status bits, viz. /, which records the status of each slot: if fi is FREE then Pi is "empty," i.e., it has never been filled in by any output before; if it is BUSY, it already holds an output. / is firstly initialized to FREE. For each incoming message from the Worker, the Collector repeats the following sequence of operations: receive {k,o) from Worker if fk is equal to FREE then send k to Dispatcher Pk*r- o fk BUSY check-if-full else detect endif where: check-if-full checks if, due to the last arrival, all entries of / have become BUSY. In that case, a complete set of partial outputs has been recollected and, after some user-defined postprocessing (for example, a polygonal approximation of the chains of edges produced by the Workers), a global output can be saved, and the fiag vector re-initialized: if / is equal to BUSY then post-process p save p f 1 Rp{t) is always above Rs{t) except when R{t) = 0 (no reliable Worker) and when R{t) = 1 (totally reliable, failure-free Worker). Agent Properties In Multi-Agent Systems Mirko Maleković University of Zagreb, Faculty of Organization and Informatics Varaždin, Croatia E-mail: mmalekov@foi.hr Keywords: agent properties, knowledge operators, knowledge theory, multi-agent systems, temporal operators. Edited by: Matjaž Gams Received: May 25, 1998 Revised: April 24, 1999 Accepted: May 6, 1999 We consider agent properties in multi-agent systems. These properties are characterized by knowledge operators and temporal operators (the past and future temporal operators). The properties relate the knowledge of two agents, and can be very helpful in analyzing the respective multi-agent system. 1 Introduction The^ theory of multi-agent systems is described in [1], Incorporating knowledge and time in multi-agent system is given in [1], [2], and [4]. The temporal operators are described in [3]. In this paper, we consider in detail some new agent properties in multi-agent systems. These properties relate the knowledge of two agents, and can be very useful in analyzing the respective multi-agent system. The paper consists of five sections and an Appendix containing all the proofs of the stated propositions. In Section 2, we introduce the basic notions of multi-agent systems. In Section 3, we define the knowledge operators and the past and future temporal operators. Section 4 contains Proposition (more knowledgeable) the past propositions: Proposition (•), Proposition (♦), Proposition (■), Proposition (5), and Proposition {B). In addition, Section 4 contains the future propositios: Proposition (o). Proposition (0), Proposition (□), Proposition (U), and Proposition (W). The propositions state the relationship between the knowledge of two agents. Conclusions are given in Section 5. The Appendix contains the proofs of all the propositions mentioned above. 2 Basic notions In this section, we introduce some basic concepts and notations. Suppose we have a group consisting of m agents, named 1,2, ..,m. An agent may be a man (a real agent), a software module or a communicated robot (an artificial agent). Even, an agent may be a component of a computer system (a wire or a message buffer). We assume these agents wish to reason about ^M^Tech Support: Mr. Mirko Varga, Faculty of Organization and Informatics, Varaždin, CROATIA a world that can be described in terms of a nonempty set P of primitive propositions. A language is just a set of formulas, where the set of formulas LK of interest to us is defined as follows. (1) The primitive propositions in P are formulas, (2) If F and G are formulas, then so are V G),(F A G),(F G),{F ^ G), and Ki{F) for all i £ {1,2, ..,m}, where Ki is a modal operator. A Kripke structure M for an agent group {1,2,..,m} over P is a tuple M = {S,I,ki,k2,-,km), where S is a set of possible worlds, I is an interpretation that associates with each world in S a truth assignment to the primitive propositions in P, and kl, k2,.., km are binary relation on S, called the possibility relations for agents 1, 2,.., m, respectively. Given p £ P, the expression /[t/;](p) = true means that p is true in a world w in a structure M. The fact that p is false, in a world v of a structure M, is indicated by the exspression I[v](p) = false The expression (u, u) £ hi means that an agent i considers a world v possible, given his information in a world u. Since ki defines what worlds an agent i considers possible in any given world, ki will be called the possibility relation of the agent i. We now define what it means for a formula to be true at a given world in a structure. Let (M, w) \= F means that F holds or is true at (M, w). Definition of is as follows: (a) {M,w) t= p iff I[w]{p) = true, where p G P, (b) {M,w)\= F AG iff (M, tu) |= F and (M, w) [= G, (c) (M,w) \=FwGiS {M,w) \=Fox {M,w) \=G, (d) (M,u;) [= F G iff (M,w) ^ F implies (M,w) hG, (e) {M,w) ^ F ^ G iff {M,w) \= F ^ G anà IM,w) \=G^ F, (f) {M,w) -iF iff {M,w) ^ F, that is, {M,w) |= F does not hold, (g) M \= F iff (M, w) 1= F for all w E S. Finally, we shall define a modal operator Ki, where Ki{F) is read: Agent i knows F. (h) {M,w) 1= Ki{F) iff {M,t) \= F for alH G 5 such that (w,t) e ki- In (h) we have that agent i knows F in a world w of a structure M exactly if F holds at all worlds t that the agent i considers possible in w . Multi-Agent Systems A multi-agent system is any collection of interacting agents. In dealing with the complexity of a system, we focus attention on only a few of details, and hope that these cover everything that is relevant for our analysis. Next, we find good ways to think about a situation in order to minimize its complexity. It is known that reasoning about systems in terms of knowledge can be very helpful in this regard. To do that, we need a formal model of multi-agent systems. Our key assumption is that if we look at the system at any point in time, each of the agents is in some state. We refer to this as the agent's local state. We assume that an agent's local state encapsulates all the information to which the agent has access. For each agent has a local state, it is very naturally to think of the whole system as being in some (global) state. The global state includes the local states of the agents and the local state of an environment. Latter does play an important role. For instance, if we are considering a system of sensors observing a region, we might need to include features of the region in a description of the global state of the system. Accordingly, we devide a system into two components: the environment and the agents, where we view the environment as everything else that is relevant. Also, the environment can be viewed as just another agent. We need to say that a given system can be modeled in many ways. How to devide the system into agents and environment depends on the system being analyzed. Let Le be a set of possible local states for the environment and let Li be a set of possible local states for agent i,i = l,..,n. We define G = LeX-C-ix..xL„ to be the set of global states. A global state describes the system at a given point in time. For a system constantly changes (it is not a static entity), we are interested in how systems change over time. We take time to range over the natural numbers, that is, the time domain is the set of the natural numbers, N . A run over G is a function r : N G. Thus, a run over G can be identified with a sequence of global states in G. The run r represents a complete description of how the system's global state evolves over time. r(0) describes the initial global state of the system in a possible execution, r(l) describes the next global state, and so on. If r(m) = (se,Si,s«), then we define r[e](m) = Se and r[i](m) = Si,for i = l,..,n. A pair (r,m), where r is a run and m is time, will be called a point. We shall say that a global state r(m) = {se,si,..,sn) is the global state at the point (r,m). We shall also identified the point {r,m) with the global state r(m). Note that r[i](m) = Si is the local state of the agent i at the (global) state r(m). A system R over G is a set of runs over G. The system R models the possible behaviors of the system being modeled. The intuition that the system being modeled has some behaviors can be captured by the requirenment that the set of runs R be nonempty. 3 Knowledge and temporal operators We assume that we have a set P of primitive propositions, which we can think of as describing basic facts about a system R . Let I be an interpretation for the propositions in P over G , which assigns thruth values to the primitive propositions at the global states. Thus, for every p £ P and s e G,/[s](p) e {true, false}. An interpreted system IS is a pair (R, I) . Now, we define knowledge in an interpreted system IS . Let IS — {R,I) be an interpreted system. A Kripke structure for IS , denoted M{IS) = (5,7, fci,..,is defined in a straightforward way. S = {r(m)|r e R,m e N}, that is, S is the set of the global states at the points (r,m) in the system R. The possibility relations ki,k2,..,kn are defined as follows. Let r(m) = (se,si,..,s„), r'(m') = (s^, s'l,.., s^) be global states in S. We say that r(m) and r (m ) are indistinguishable to agent i iff Si = Thus, the agent i has the same local state in both r(m) and r' (m'). We define ki = {(r(m),r (m')) 6 SxS \ r{m) and r'{m') are indistinguishable to agent i},i = l,2,..,n. Accordingly, (r(m),r'(m')) e h iff Sj = = l,2,..,n. There is no the possibility relation kg for the environment because we are not usually interested in what the environment knows. Now, it is evident what it means for a formula F in LK to be true at a state r(m) in an interpreted system IS. For instance, we have (75, r(m)) |= p iff I[r{m)](p) = true, for all pep. _ , (75,r(m)) \= Ki{F) iff {IS,r (^m)) ^ F for all r'{m') e S such that (r(m),r'(m )) £ k^. The modal operators Ki,i = l,..,n are called knowledge operators. We say that a formula F in LK is valid in an interpreted system IS, denoted IS |= i^, iff {IS,r(m)) 1= F for all r(m) G S. Let us note that we do not assume that the agents compute their knowledge in any way, or that they can necessarily answer questions based on their knowledge. We interpret knowledge as an external one, ascribed to the agents by someone reasoning about the system. To be able to make temporal statements, we extend our language LK by adding temporal operators, which are new modal operators for talking about time. This language will be denoted by LKT , and will be used for reasoning about events that happen along a single run r in the system R. We define here five temporal operators for the future: o (next), □ (always), 0 (eventually), U (until), W (waiting-for or unless); and five temporal operators for the past: o (previously), ■ (has always been), ^ (once), S (since), and B (back-to). Future Operators The Next Operator o If F 6 LKT, then so is oF. oF, read next F, is defined by (75,r(m)) oF iflt {IS,r{m + 1)) \= F. Thus, o F holds at state r(m) iff F holds at the next state 7-(m + 1). The Always Operator □ If F € LKT, then so is DF. □F, read always F, is defined by (J5,r(m)) ^ UF iff (75,r(m')) F for all m > m. Accordingly, DF holds at state r(m) iff F holds at state r(m) (now) and at all later states. The Eventually Operator 0 If F e LKT, then so is OF. OF, read eventually F, is defined by {IS,r{jn)) \= OF iff {IS,r{m')) 1= F for some m > m. Thus, OF holds at state r(m) iff F holds at state r(m) or some state in the future. The Until Operator U If F € LKT, then so is F W F. F U Fl, read F until Fi, is defined by (/5,r(m)) ^ FU Fl iff (/5,r(m')) |= Fi for some m' > m and (75,r(m")) j= F for all m" with m 0 and (75,r(m-l)) Thus, oF holds at state r(m) iff r(m) is not the first state in the run r and F holds at state r(m — 1). In particular, oF is false at state r(0). This operator makes sense because our notion of time is discrete. All the other past temporal operators make perfect sense even for continuous notions of time. The Has-always-been Operator ■ ■F G LKT if F G LKT. It is read has always been F, and defined by (IS,rim)) 1= BF iff (for all m',0 < m' < m)[{IS,r{m'))^F] Thus, HF holds at state r(m) iff F holds at state r(m) and all preceding positions. The Once Operator ^ If F e LKT, then so is ♦F, read once F. Its semantics is defined by [IS,r{m)) |= ♦F iff (for some m',0 < m' < m)[(75,r(m')) \= F], Accordingly, ♦F holds at state r{m) iff F holds at state r(m) or some preceding state. The Since Operator 5 F5F1 G LKT if F,Fi G LKT. It is read as F since Fl and defined by (75, r(m)) |= F5F1 iff (for some m',0 < m' < m)[(75,r(m')) Fi] and (for all k,m < k < m)[{IS,r{k)) |= F]. Thus, F5Fi states that Fi has happened in the past and F has held continuously from the state following the last occurrence of Fi to the present. The Back-to Operator B FBFl G LKT if F,Fi G LKT. It is read F back to Fl and defined by {IS,r{m)) \= FBFi iff iIS,r{m)) ^ F5Fi or (75,r(m)) \= MF. The . operator B provides a weaker version of the since operator 5. Thus, the formula FBFi states that F holds continuously at all states preceding and including the present, or Fi has happened in the past and F has held continuously from the state of the last occurrence of Fi to the present. 4 Agent Properties In this chapter, we consider some important agent properties. These properties relate the knowledge of two agents. In the following propositions, we shall use the set 5[j,r](m') defined by 5[j,r](m') = {ri(mi)|(r(m'),ri(mi)) e kj}. Thus, 5[j,r](m') is the set of the states in S that agent j considers possible in state r(m ). Also, F S LKT is an arbitrary formula in LKT. Proposition ( more knowledgeable ) If S[i,r](Tn) C 5[t,r](m), then (JS,r(m)) h KijF) KjjF)._ Proposition ( more knowledgeable ) says that at state r'(m) agent j knows F if agent i knows F, under the condition that 5[j,r](m) C 5[z,r](m) holds. We can say that agent j is more knowledgeable than agent i if the stated premise is true. In the rest of this chapter, we first state past propositions, and after that future propositions. Past Propositions Proposition (•) If S[j,r]{m - 1) C 5[i,r](m), then (/5,r(m)) N Ki{F) •{KjjF)._ The proposition states that at state r(m) agent j previously knew F if agent i knows F, under the condition that 5[j,r](m - 1) C 5[i,r](m) holds. Proposition (♦) If (for some m',0 < m' < m)[5[j,r](m') C 5[i,r](m)], then (IS,r(m)) ^ Ki(F) ^ Proposition (♦) says that at state r(m) agent j has known F if agent i knows F, under the condition that (for some m , 0 < m < m)[5[j,r](m') C 5[i,r](m)] holds. Proposition (■) If (for all m , 0 < m < m) [5[j,r](m') C (5[ž,r](m)], then iIS,rim))\=KiiF)^mKjiF). Proposition (J5) (for all r{m) e 5)[(/5,r(m)) \= Ki{F) ^ Kj{F)BKi{F)._ Thus, the formula Ki{F) => Kj{F)BKi{F) is valid in IS = {R,I). Future Propositions Proposition (o) If S[j,r](m -I-1) C 5[«,r](m), then (75,r(m)) ^ KjjF) ^ oKjjF)._ Proposition (o) states that at state r(m) agent j will know F in the next step if agent i knows F, under the condition that r](m-l-l) C 5[i, r](m) holds. Proposition (0) If (for some m > m)[5{j, r](m ) C r](m)], then (/5,r(m)) |= Ki{F) <>{Kj{F). Proposition (0) says that at state r(m) agent j will eventually know F if agent i knows F, under the condition that (for some m' > m)[S\j,r]{m') C 5[i,r](m)] holds. Proposition (□) If (for all m > m)[5[j,r](m') C 5[i,r](m)], then (/5,r(m)) \= Ki{F) => mKj{F). Proposition (□) says that at state r(m) agent j will always know F if agent i knows F, under the condition that (for all m > m)[5[j,r](m') C 5[i,r](m)] holds. Proposition ^U) If (for some m' E {m,m+ l})[5[j,7-](m') C S[i,r](m)], then (J5,r(m)) |= Ki{F) Ki{F)UKj{F). Thus, the formula Ki{F) Ki{F)UKj{F) holds in {IS,r{m)) if the condition (for some m € {m,m-t- l})[S[j,r](m') => 5[j,r](m)] holds. Proposition (■) says that at state r(m) agent j has always known F if agent i knows F, under the condition that (for all m , 0 < m' < m)[5[j,r](m') C 5[i,r](m)] is true. Proposition (5) (for all r(m) £ S)[{IS,r{m)) \= Ki{F) ^ Kj{F)SKi(F)._ Proposition (5) states that the formula KiiF) Kj{F)SKi{F) is valid in IS = {R,I). Proposition {W) If [(for some m e {m,m+ 1}) [5[j,rKm') CS[i,r](m)] or (for all m' > m)[S[),r](m') C (S[i,r](m)]], then (J5,r(m)) ^ Ki(F) Ki(F)WKj(F). Thus, the formula Ki(F) Ki(F)WKj(F) holds in (/5,r(m)) if the condition [( for some m' e {m,m + l})[5[j,7-](m') C 5[i,r](m)] or (for all m > Tn)[S[j,r]{m) C 5[i,r](m)]] holds. 5 Conclusions We have considered some important agent properties in multi-agent systems. These properties relate the knowledge of two agents, and can be very helpful if we analyze the respective multi-agent system. We have stated Proposition ( more knowledgeable ), the past propositions: Proposition (•), Proposition (♦), Proposition (■), Proposition (S), and Proposition (B) ; and the future proposition: Proposition (o), Proposition Proposition (□), Proposition (W), and Proposition (W). The proofs of all the propositions are given in the Appendix. APPENDIX Proof (Proposition (more knowledgeable)) Assume [/ : S[j,r](m) C S[i,r](m). We would like to show (IS,r(Tn)) |= Ki(F) ^ Kj{F). Suppose V : (/5,r(m)) [= Ki{F). We have to show (75,r(m)) |= Kj{F). Let nirui) e 5 be an arbitrary state such that (r(m),ri(mi)) £ kj. We need to prove {IS,ri{mi)) 1= F. Prom (r(m),rj(mj)) e kj it follows ri{mi) e 5[j,r](m). We have (by the assumption U) nirrii) e 5[i,r](m). Therefore, {r{Tn),ri{mi)) G ki. Because V holds, we obtain {IS,ri{mi)) \= F. Accordingly, we have (75, r(m)) |= Kj{F), as desired. Proof (Proposition (•)) Assume U1 : S[j,r]{m - 1) C S[i,r]{m). We would like to show (/5,r(m)) ^ Ki{F) »KjiF). Assume VI : {IS,r{Tn)) ^ ^i(^)- We have to show (IS,r{m)) |= •Kj{F), that is, (/S,r-(m - 1)) \= Kj{F). Let ninu) e S be an arbitrary state such that (r(m - l),rj(mi)) e kj. It follows nirtii) e S\j,r]{m - 1). We have (by the assumption Ul) ri{mi) £ S[i,r](m). Therefore, {r{m),ri{mi)) G ki. Because VI holds, we have {IS,ri{mi)) \= F. Consequently, we have {IS, r{m - 1)) t= Kj{F), as we wanted to show. Proof (Proposition (♦)) Assume U2: (for some m',0 < m' < m)[S[j,r](m') C 5[i,r](m)]. We would like to show (IS,rim)) \= Ki{F) ^Kj{F). Assume V2 : (/5,r(m)) [= Ki{F). We have to show {IS,r{m)) \= iKj{F). Let m',0 < m < m, be such a point that (by the assumption U2) U2' : S\j,r](m') C 5[i,r](m) holds. We shall prove iIS,r(m')) [= Kj{F). Let nirUi) G 5 be an arbitrary state such that (r(m'),ri(mj)) G kj, that is, ri{mi) G 5[j,r](m ). It follows (by the assumption U2) ri{mi) G S[i,r](m). Therefore, (r{m),ri{mi)) G h. We obtain (by the assumption V2) (/5,ri(mi)) |= F. Consequently, we have {IS,r{m')) ^ KjiF), that is, (/5,r(m)) ^ ^Kj{F)., as desired. Proof (Proposition (■)) Assume U3: (for all m',0 < m < m)[5[j,r](m ) C 5[i,r](m)]. We would like to show (/5,r(m)) \= Ki{F) mKj{F). Assume V3: {IS,r{m)) |= Ki{F) . We have to show {IS,r{m)) |= mKj{F). Let m' be an arbitrary point such that 0 < m < m. We need to prove {IS,r{m')) j= Kj{F). Let ri{mi) G 5 be an arbitrary state such that {r{Tn),ri{mi)) G kj. We have to prove {IS,ri{mi)) \= F. Prom {r{m),ri{mi) G kj, it follows ri(mi) G 5[i,r](m'). We have (by U3) Tiirni) G S[i,r](m). Therefore, (r(m),ri(mi)) G h. We have (by V3) (75,^(mi)) t= F. Consequently, we obtain {IS,r{m')) \= Kj{F), that is, {IS,r{m)) 1= MKj{F), as we wanted to show. Proof (Proposition (5)) We shall prove that the formula Ki{F) Kj{F)SKi{F) is valid in IS = {R,I). Let r(m) G 5 be an arbitrary state. We have to prove (/5,r(m)) ^ Ki{F) ^ Kj{F)SKi{F) Assume V4: (IS,r{m)) Ki{F). We need to show (IS,rim)) 1= Kj{F)SKiiF), that is, (for some m',0 < m < m)[(/5,r(m')) |= Ki{F)] and (for all m",m' < m" < m)[(75,r(m")) |= KjiF)]. It is easy to see that if we take m = m, then we have {IS,r(m)) ^ KiiF) (by V4), and (for all m",m < m" < m)[(/5,r(m")) |= Kj{F)] (because the requirenment that Kj{F) holds at all states r(m "), such that m < m" < m, is fulfilled vacuously. Proof (Proposition (B)) We would like to show that the formula Ki{F) ^ Kj{F)BKi{F) is valid in IS = {R,I). Because we have proved that the formula Ki{F) ^ Kj{F)SKi{F) is valid in IS = {R,I), and because {IS,r{m)) 1= Kj{F)BKi{F) iff {IS,r{m)) h Kj{F)SKi{F) or {IS,r{m)) ^ mKj{F), it follows that the formula Ki{F) ^ Kj{F)BKi{F) is valid in IS = {R, I) too. Proof (Proposition (o)) Assume U5: 5[j,r](m -I- 1) C 5[i,r](m). We would like to show (/5,r(m)) \= Ki{F) => oKj{F). Assume V5: {IS,r{m)) |= Ki{F). We have to prove (IS,rim)) \=: (KjiF), that is, {IS,r{m+l)) ^ Kj{F). Let ri{mi) G 5 be an arbitrary state such that (r(m -I- l),ri{mi)) G kj. It follows nirni) G S[j,r]im + 1). We have (by U5) riirrii) G S[i,r]{m). Therefore, (r(m),ri(mi)) G ki. We obtain (by V5) {IS,ri{mi)) \= Kj{F). Accordingly, we have {IS,r{m + 1)) \= Kj{F), that is, {IS,r{m)) \= {Kj{F), as we wanted to show. Proof (Proposition (0)) Assume U6: (for some m > m)[5[j, r](m') C 5[i,r](m)]. We would like to show {IS,rim)) ^ Ki{F) <>Kj{F). Assume V6: (/5,r(m)) [= Ki{F). We have to show {IS,r{m)) t= {Kj{F)- Let m' > m be such a point that (by U6) U6': 5[j,r](m) C 5[i,r](m) holds. We shall prove {IS,r{m')) \= Kj{F). Let nirm) G 5 be an arbitrary state such that {r(m ),ri{mi)) e kj, that is, ri(mi) € S[j,r]{m'). We have (by U6') ri(mi) € 5[i,r](7n). Therefore, (r(m),rj(mi)) G ki. iFrom V6 it follows {IS,ri{mi)) [= F. Consequently, we have {IS,r{m')) \= Kj{F), that is, (/5,r(m)) ^ OKjiF), as desired: Proof (Proposition (□)) Assume U7: (for all m' > m)[5[j,r](m') C 5[i,r](m)]. We would like to show (/5,r(m)) Ki{F) ^ BKjiF). Assume V7: {IS,r{m)) |= Ki{F). We have to prove {IS,r{m)) |= DKj{F). Let m > m be an arbitrary point such that U7': 5[j,r](m) C 5[i,r](m) holds. We need to show {IS,rim)) 1= Kj{F). Let nirm) e 5 be an arbitrary state such that {r{rn),ri{mi)) £ kj, that is, nirrii) e 5[i,r](m'). We have (by U7') riirrii) G 5[i,7-](m). Therefore, (r(m),ri(mi)) G ki. We obtain (by V7) (/5,rj(mi)) |= F. Thus, we have (IS,rim')) \= Kj{F), that is, (/5,r(m)) ^ as desired. ACKNOWLEDGMENT I am grateful to the anonymous referees for their careful reading and useful comments. References [1] Fagin, R. et al. (1995). Reasoning about Knowledge. The MIT Press. [2] Maleković, M. (1998) Multi-Agent Systems: Incorporating Knowledge and Time, International Conference on Information and Intelligent Systems IIS '98. [3] Manna, Z. and A. Pnueli (1992). The Temporal Logic of Reactive and Concurrent Systems. Springer-Verlag. [4] Moses, Y. and B. Bloom (1994). Knowledge, timed precedence and clocks. In Proc. 13*'' ACM Symp. on Principles of Distributed Computing, 294-303. Proof (Proposition (U)) Assume U8: (for some m G {m, m + l})[S[j,r]{m') C 5[i,r](m)]. We would like to show (/5,r(m)) \= Ki{F) ^ Ki{F)UKj{F). Assume V8: {IS,r{m)) |= Ki{F). We need to show iIS,r{m)) ^ Ki{F)UKj{F), that is, (for some ni > m)[{IS,r{m')) \= Kj(F)] and (for all m",m < m" < m')[(/5,r(m")) \= Ki{F)]. Let m' G {m, m -I- 1} be such a point that (by US) U8': 5[j,7-](m') C 5[i,r](m) holds. We shall show that {IS,r{m')) \= Kj{F) and (for all m",m < m" < m')[iIS,r{m")) \= Ki{F)]. Let ri{mi) G 5 be an arbitrary state such that ir{m'),ri{mi)) G kj, that is, rj(mi) G 5[j,r](m'). We have (by U8') nirm) G 5[i,r](m), that is, {r{m),ri{mi)) G h. It follows (by V8) (IS,riirrii)) [= F. It means that (IS,rim')) [= KjiF) holds. Because m' G {m, m + 1}, that is, m' = m or ni = m -I- 1, we have that VR: (for all m",m < ni' < m)[iIS,rini')) [= KiiF)] holds. Namely, if m = m, then VR is fulfilled vacuously, and if m' = m -f 1, then VR is reduced to V8. Proof (Proposition (PT)) Assume US (from Proposition {Ki KiUKj)) or U9: (for all ni > m)[S[i,r]im') C S[i,r](m)]. We would like to show (/5,r(m)) [= KiiF) ^ KiiF)WKjiF). Assume V9: (/5,r(m)) |= K-iF). We have to prove (W): (/5,r(m)) KiiF)WKjiF). Because (W) iff {IS,rim)) t= KiiF)LiKjiF) or (/5,r(m)) |= OKiiF), we have (by US or U9) that (W) holds, as we wanted to show. Extended Predicate Logic and Its Application in Designing MKL Language Honghua Dai School of Mathematics and Computer Sciences, The University of New England Armidale, NSW 2351, Austraha hdai@cs.une.edu.au Keywords: Extended Predicate Logic, MKL Language, Knowledge Representation, Expert System Tools, Weather Forecasting Systems Edited by: Xindong Wu Received: July 30, 1997 Revised: June 17, 1998 Accepted: August 8, 1997 In some cases, we may ßnd difEculties or inconveniences in representing rules in conventional logic, or sometimes the logical expressions are too complex. This paper gives two different kinds of new approaches to solve this problem. Firstly, we integrate the conjunction and disjunction using only one OA predicate Am ■ Secondly, by using extended predicates. As a consequence, an easier inference mechanism is introduced. Compared to the conventional logic and Prolog knowledge representation method, this approach enables us to greatly simplify an expression, and save a considerable amount of time and space in knowledge processing. It had been successfully applied in developing a specißc knowledge representation language: MKL (Meteorological Knowledge representation Language). The MKL has been applied in building a number of practical weather forecasting expert systems including the WMES I and II, the Wuhan heavy rain forecasting expert systems. Some of the systems have been in operation since 1985. On average, the predictive accuracy rate of the systems are very competitive with that made by a human domain expert. In all of these systems, the knowledge is provided by human experts and encoded using MKL. We expect that an MKL-based learning system can be developed for the automatic discovery of weather forecasting rules, and an MKL-based comprehensive system integrating learning, forecasting, data and knowledge applications can be further built. 1 Introduction edge with FOL. Therefore, several extended logics based on FOL were developed [12] [15, 16] [14, 3, 6]. Knowledge representation (KR) has traditionally been These extended logics include multi-valued logic, fuzzy thought of as the heart of artificial intelligence[2], and logic, modal logic, matrix logic etc. Some recent work first order logic(FOL) is the key to the heart. Unfor- in automated reasoning has further developed descrip- tunately, in some cases, it was not always convenient tion logics[10, 1]. to represent some kinds of rules. This caused a new For the purpose of improving knowledge represen- extension to the first order logic. tation in logical expressions, we introduced another First order logic, also called predicate calculus, is a extension to conventional logic, which integrates two formal language used to represent relations amongst FOL connection operations, conjunction and disjunc- objects and to infer new relations from existing ones. tion, with a single OA predicate Am- In the term OA It may be viewed as a formal language used to trans- predicate the O stands for logical connective OR and late English sentences and to derive new sentences the A for AND. This new extended logic is called from known ones[ll]. FOL is also called a classical, Argumented Predicate logic which can be applied to conventional or formal logic. solve some common logical representation problems in Usually first order logic plays a basic role in formal many areas such as, knowledge representation, infor- approaches to knowledge representation (KR). Espe- mation retrieval, functional programming and logical cially, FOL is very important in applications of arti- programming. The original contribution of this ap- ficial intelligence, such as rule based expert systems, proach is that it can (1) integrate two FOL connection theorem proving, and natural language understanding. operations as one, (2) extend the logical operations However, many difficulties arise in expressing knowl- AND and OR to the level where the logical opera- tion lies between disjunction and conjunction, and (3) significantly reduce logical operation time, and speed up logical inference. This approach also uses various functional representations to represent logical operations with arguments. In this way, it is easy to handle problems, such as, to satisfy m conditions amongst many conditions. In Section 2 we pose two problems which are dif^ ficult to handle with the conventional FOL. In Section 3 we describe a new method which uses Argu-mented FOL to solve the proposed problems, and we present the corresponding laws, lemmas and theorems of the argumented predicate approach. In Section 4 we look at an implemented application for the purpose of domain knowledge representations in Meteorological Knowledge Language(MKL). In section 5 we give a comparison between our Argumented predicate approach and other knowledge representation methods, e.g. conventional FOL. In the conclusion, we point out some further researches and applications. 2 Special Needs in Domain Knowledge Representation Using deep domain knowledge is one of the key points in the research frontier of knowledge based systems [2]. Domain knowledge representation is the kernel of domain knowledge discovery and its applications. The two problems we will indicate in this section are the two typical problems in some domain knowledge representation. Problem 1. m-out-of-n problem We also call the m-out-of-n problem the Condition-Arbitrary-Selection problem. Definition 2.1 m-out-of-n problem A problem is called an m-out-of-n problem if it is required to represent a rule that for n given goals, if at least any m (m < n) out of n are true, then the final goal is achieved. In general, this problem could be described as: succeed if at least any m of n goals are true. Suppose that we have n logical expressions, say. ei,e2,......,e„ and we expect to represent a rule say, Rule 2.1 If any m(m < n) of the n expressions hold true, then vi holds. where, ri is the consequence. If we represent RULE 2.1 in conventional first order logic, it could be represented as. (ei A 62... Cm—1 Cm A 62 . . . Cm—I A Cm+l) V . . (6i A 62 ... Cm-i A e„) V (62 A 63 ... e™ A e„+i) V ... (62 A 63 . . . Cm Cfi ) V ...V (en-m+1 A en-m+2 ■ ■ ■ «n-l A 6«) Ti (1) This expression is found to be very inconvenient and too complex as there are too many redundancies. In this expression, the connective A occurs (m - 1)(™) times. Each e» (1 < i < e) occurs (JJ^Ti^) times and connective V occurs (™) — 1 times. An improved expression is available which is called Polish Prefix Notion (PPN). In PPN, the m-out-of-n problem could be represented as, V(A(6I,62, ... ,em),A(ei,e2,... ,6m_ 1,6^-1-1), ... ,A(ei,62,... ,em-i,e„), A(e2,e3,... ,em,em+i),--- ,A(e2,63,... ,6m,e„),... , A(e„_m+i,en-m+2> • • • ,e„_i,e„)) ri (2) In the expression (2), the connective A occurs (JJ') times. Each 6j occurs the same times as in expression (1), and the connective V occurs once only. Now we consider this problem first: is it possible to find an equivalent expression, in which only one predicate is used and each 6, (1 < i < e) only occurs once? The answer is positive, and this will be dealt with in the following sections. In practice, let us take the logical programming language PROLOG as an example. In PROLOG, by using atJeast(M, [Goals...]) expression, which is true when at least M of the Goals are true. In this way the rrumtjof-n problem could be represented as, at_least(M. Goals) :-integer(M), M >= 0, length(Goals, N), M =< N, at_least(M, Goals, N). at_least(0, N) :- !. at_least(M, [GoalI Goals], N) :-call(Goal), Ml is M - 1, Ni is N - 1, at_least(Ml, Goals, Nl). at_least(M, [_IGoals],N) :-Nl is N - 1, M =< Nl, at_least(M, Goals, Nl). To insist that at least 2 of three goals succeed, we might write rl(X) :- at_least(2, [p(X), q(X)]). It is obvious that the representation is not as simple and clear as we desired. So we should find a better way to solve this problem. Problem 2. Two-Bound-Relation Problem Definition 2.2 Two-Bound-Relation problem A problem is called a Two-Bound-Relation problem if it is required to represent that for two given bounds a and b, there are n variables which lie between them. Suppose that we have n arguments, say, xi,x2, - ■■ ,Xn, and two constants (or arguments) a and b. We are required to represent a rule as, Rule 2.2 If ( a <= xl <= b) and ( a <= x2 <= b) and ( a <= xn <= b) Then r2. In first order logic, it could be represented as, ((a < Xl) A (xi <&))A... ... ((a < Xn) A {Xn < b)) => r2. (3) In this expression the connective A occurs 2n — 1 times, the relational operator < occurs 2n times and the two bonds a and b occur n times respectively. In PPN approach, it could be represented as, A(< (a,a;i), < {xi,b),... , < (a, b)) (4) In this PPN expression, the connective A occurs only once, but the relational operator ' <' occurs 2n times and the a and b happen n times each. Now, a similar question arises: can we use just one predicate instead of 2n - 1 times of A, and just 2 relational operators instead of 2n relational operators, and two bounds a, b only once, instead of n times? This is the problem we are going to solve. How can this twoJbond problem be processed in recent knowledge processing tools then? We will give a method of meeting these requirements. For the specific example a = 1, b = 10, and 3 variables, in PROLOG, it could be represented as. r2(Xl, X2, X3) :- 1 =< XI, XI =< 10, 1 =< X2, X2 =< 10, 1 =< X3, X3 =< 10. This expression is almost the same as expression (3). There is a library predicate called between/3. between{Variable, LowerBound, UpperBound) This PROLOG expression means that LowerBound < Variable < UpperBound in which, LowerBound, UpperBound and Variable are all integers. By using between(Variable, LowerBound, UpperBound) , the problem can be solved for its first argument. So, r2(Xl, X2, X3) :- between(XI, 1, 10), between(X2, 1, 10), between(X3, 1, 10). has 1000 possible answers. Or alternatively, it could be represented as, r2 :- vari(Xl), between(Xl, 1, 10), var2(X2), between(X2, 1, 10), var3(X3), between(X3, 1, 10). In this expression the 3-ary relational predicate between occurs n times, so do the lower bound and the upper bound. And the logical connective and occurs implicitly n — 1 times. Obviously, these expressions are not what we expected. None of them could express either of the two problems using only one operator, and either of the operands could appear only once. In the next section, we will give a method which meets these requirements. 3 Argumented Predicate Approach (APA) To solve the problems which we raised in §2, we suggest a new method of handling the difiiculties. First, let us give the definition of the argumented predicate. Definition 3.1 Argumented Predicate. A predicate is called an Argumented predicate if there is at least one argument attached to the predicate. In the Argumented predicate approach each of the above two rules can be simply represented as one very short and clear statement. For the m-out-of-n problem, the expression (1) could be simply represented as. ^m(ei,e2,...e„) rl. (5) For the second problem, i.e, the Two - Bound -Relation Problem, we may write the expression (3) as follows, ,X2, ■ ■ . , Xn ) r2. (6) In the specific example for n=3 , we have the following expression, A2ÌGei,Leio)ixi,X2,X3) r2. (7) 3.1 Integration of disjunction and conjunction Definition 3.2 n-overlapped predicate An Argumented predicate is called an n-overlapped predicate, if there are n arguments (some of them may be constants) attached to the Argumented predicate. An 0-overlapped predicate is a conventional predicate. In formula (5), Am is a 1-overlapped Argumented predicate in which is a predicate and m is an attached argument to the predicate A. For instance, in the problem of m out n, the one attached argument is m(in the general case, it is a constant). >ß (y) and >ß {xi,x2,x3) are all 1-overlapped Argumented predicate functions and ß is an attached argument. In which, >ß (y) is a 1-ary 1-overlapped Argumented predicate function, and >ß {xi,x2,x3) is a 3-ary 1-overlapped Argumented predicate function. BTaß{x) is a 2-overlapped Argumented Predicate function. Lemma 3.1 Transformation Law Let P(x,y) be a 2-ary conventional predicate function. It can be transformed into a 1-ary Argumented predicate function, denoted as Bß (a). Such that, P{x,y) = Bß{a) (8) where the Bß is a 1-overlapped Argumented predicate with its argument ß, and the a E {x,y}. In the special case, ß could be a constant. In general, ß e } - {a}} , r is a constant. In conventional predicate logic, "John is the son of James" is represented as Son-of{John, James) By 1-overlapped Argumented predicate, it could be represented as, Son.ofjamesi'John) Theorem 3.1 Extended Transformation Law An n-ary conventional predicate function P{xi,x2, ■ ■ ■ ,Xn) can be transformed into an (n-l)-overlapped 1-ary argumented predicate function such that, P{XI,X2,... .Xn) = .....a„-r{x) (9) where x e {xi,x2,--- ,Xn}. Proof; Suppose that a possesses B feature, according to the predicate logic, it could be represented as B(a). For a 2-ary conventional predicate function P(x,y), first, we let x stipulate n specific objects ßl,ß2,---ßn Thus, V^, 6 = • ■ • (1 < i < n), we get B{a,ßi){i = 1,2,... ,n). We take ßi out of B{a,ßi) and form an argumented predicate Bß.. Then, we have an argumented predicate function (i = l,2,... ,n) (10) This new expression is equivalent to B{a,ßi). We only change the form of the expression. Assume that the object domain of /3 is Aq. Let AAq, thus. Bi imA-tAo ß^{a)=Bß{a) (11) Thus, we transformed a 2-ary predicate function B(a,ßi) into a 1-ary argumented predicate function Bß{a). According to the inductive principle, repeat the procedure as above, we get, P{XI,X2, ... ,Xn) = Bai.aj,... ,a„_, {x) (12) □ Corollary 3.1 Transformation Law. An n-ary conventional predicate function P{xi,...,xn) can be transformed into an m- overlapped (n-m)-ary argumented predicate function in the form of Bqj,... {ßi, ■■■ , ßn-m)' that. P{xi,... ,Xn)=Bc„...,arr.ißl,--- ,ßn-m) (13) □ Among the Argumented predicates we introduced, there are two special cases which are the most significant. The first one is the one-overlapped Argumented predicate Ai, which is called an OA predicate. The second one is the combined Argumented relational predicate in the general form of = 1,2),where the = 1,2 are argumented relational predicates, such as ^2(> 16, <90). Similarly we can extend Lemma 3.1 to any n - ary conventional predicate function. We can transform it from 1 - overlapped argumented predicate function to (n — 1) — overlapped argumented predicate functions. Definition 3.3 OA Predicate An argumented predicate Ai is called an OA predicate if 1. Ai can and only can act upon n conditional expressions 61,62,......,en i.e., A(ei,e2,......,e„) which is denoted as Li. In which, i is any integer. Li is a logical expression. The case when i is a negative integer will be discussed after we introduce the defective restriction in Definition 3.5. 2. The truth value of the expression Li = •A.i(ei,e2,......,e„) is defined as follows, Li = true iff at least any i of n expressions 61,62,......,6„ are true false otherwise when i G {1,2,... ,n} (14) Lemma 3.2 Properties According to the definition of OA Predicate, we can derive four significant special properties of the OA predicate Ai : 1. i < 0, ^i(ei, ...,e„) = 1, in this case, none of the conditions is necessary. 2. i = 1, ^i(ei,...,e„) = ^i(ei,...,e„) = V(ei, ...,e„), any one of the conditions is needed. 3. i = n, Aniei,...,en) = A(ei,...,e„) = A(ei,...,e„), all the conditions must be met. 4. i > n, Ai(ei,...,e„) = 0, all then conditions plus i — n hidden conditions must be satisfied. i,Prom the above Definition 3.3 and Lemma 3.2, we find that the disjunction V and conjunction A are only two special cases of OA predicate Ai when i=l and i=n. That is to say, Ai =V, An = A. In the following example we will use Ai and A2, or any Ai. Therefore, the OA predicate Ai is regarded not only as an integration but also as an extension of disjunction and conjunction. Al OA axis Figure 1: Illustration of OA axis If we denote 3i(a) the restriction degree of predicate a, then we have the following relation 3?(V) < UiAi) < 3i(A) (15) No Predicate p Restriction Value 5i(p) 1 Not n 2 V 1 3 A n 4 Ai i{l n. By this definition, the logical connective V is a unique restriction operation, i.e. in the expression V(6i,e2,......,6„) = A(ei,e2,......,e„) the logical connective V or argumented predicate need and only need to find any one logical expression 6^ which is true if there is one. That is to say among the n logical expressions 61,62,......,6„, we need to have one and only one expression e^ to be true in order to achieve the final goal. In the expression A(ei,e2,......,e„) = A(ei,62,......,e„) the logical connective A or the equivalent argumented predicate An has to act upon all the logical expressions ei(l < i X3, . . . ,-'Xn) the defective restriction predicate Ai {i < 0) can have two physical explanations. First, for i = 0, it means in a rule, Ao(,ei,e2,... ,e„) => n the 'Vi holds true" has nothing to do with ej{l < j < n). Second, for i < 0, it means that except for thesen expressions, there are i more expressions, for which no matter whether they are true or no, ri will always hold. This expression is therefore also called a valid formula. The over restriction predicate Ai{i > n) means that the over restriction predicate function, A(ei,e2,......,e„) will be true if there are more than these n logical expressions ei, e2,...., e„ which hold true. In other words, A(ei,e2,......,e„) = 1 if and only if, MiAniex, ..., e„),An-miei,:; em-n)) where e~i,e2,......,em~-n are some other logical expressions. Becase, in fact, we do not know what ei,e'2,.......e^-n are. Here Xm(ei,e2,......,e„) is always false, which therefore, is called an invalid formula. 3.2 Properties of Argumented Predicate Logic The laws for this extended logic are as follows. Basic Laws Aiix,0)^x ^2(a;,0) = 0 (16) A(x,l) = l A2{x,1)^x (17) An{xi,... ,Xn-l,l) = An-l{xi,... ,Xn-l) (18) Associative laws Aiix,Aiiy,z)) = Ai{Ai{x,y),z) = Aiix,y,z). (20) A2Ìx,A2Ìy,z)) = A2ÌA2{x,y),z) = A3{x,y,z) (21) Eliminative Laws 1. First Eliminative Laws Ai{x-i_,Ai{x2,Ai{... ,a;„))...) = A^{Xi,X2,...,Xn) (22) ^2(2:1, ^2(2:2,2:3)) = ^3(2:1, a;2,2:3) -42(2:1, ^2(2:2, A (2:3,2:4))) = ^2(2:1, .43 (2:2, 2:3, 3:4)) = Ai{xi,X2,X3,Xi) In general, we have 2. Second Eliminative Laws ^2(2;i,-42(a;2,^2(2;3,.-- ,2;n))...)) = «4n(2;i,2;2,2r3,a;4,... ,a;„) (23) Commutative Laws A (2:1,2:2) = ^1(2:2,2:1) .4m(a;i,2;2,2;3,X4,... ,2;„) (24) ^2(2;i,2;2) = yl2(2;2,2;i) (25) Extended Commutative Law (26) Where the xt^xt^,.-- , xt„ is any combination of the n subscripts 1, 2, 3, ... , n. Distributive Laws ^2(2:1, A (2^2,2:3)) = -4i (^2(2:1,2:2), ^2 (2:1, X3)) (27) An{Xl,X2,... ,2;„_1,0) = 0 (19) ^l(2;i, ^2(2:2, 2:3)) = A2{AI{XI,X2),Ai{XI,X3)) (28) Absorptive Laws A2Ìx,Ai{x,y)) = x (29) Ai{x,A2{x,y))^x (30) Extended Absorptive Laws Ai{x,Ai{x,xi,X2,X3,Xi,... ,x„)) =x (31) A2(x,AI(X,XI,X2,X3,X4,... , X„)) = X (32) De Morgan's Law -'Ai(x,y) = A2(-'X,^I/) = A2--(x,y) (33) -^A2(x,y) = Ai(-'X,-'y) = Ai-^(x,y) (34) ^Prom De Morgan's Law, we can get the following extensions, -'AI(XI,X2,... ,Xn) = An(-'Xi,-iX2,... ,-'Xn) = An-^(X1,X2,... ,Xn} -'A2{xi,X2, ■ ■ ■ ,Xn) = An-l^ixi,X2, ... ,Xn) i,Prom the above two formulas, we can prove the following extended De Morgan's Law is true, i.e., Extended De Morgan's Law -'Am{Xi,X2,-- - ,Xn) = An-mhxi,... ,^Xn) = An-m-'ixi,. . . ) (35) 3.3 Argumented Relational Predicates An Argumented Relational Predicate, sometimes, is simply called an AR predicate. If there axe n arguments attached to an Argumented relational predicate, it is called an n-overlapped Argumented relational predicate (n=0,l,2,... ), In particular, the 0-overlapped relational predicates are conventional relational predicates. Definition 3.6 Argumented Relational Predicates. A relational predicate is called an Argumented Relational Predicate if there is at least one argument(or constant) attached to the relational predicate. A conventional relational expression e > a can be represented as an Argumented relational expression Gt aC. But in conventional predicate logic, it should be represented as GT(e,a). Here, the predicate GT is a 0-overlapped relational predicate, i.e., conventional relational predicate. Gta is an 1- overlapped relational predicate with an argument a attached to the 0-overlapped relational predicate Gt. Basic Argumented Relational Predicates There are five basic argumented relational predicates, Gtb,Ltb,Geb,Let, and Éqf,. The following is a list of the expressions of these five basic argumented relational predicates and their equivalents in conventional logic and in predicate logic. 1. a> b<= GT{a,b) ^ Gtba 2. ^ LT{a, b) <= Ltba 3. a>b<= GE{a, b) ^ Geba 4. => Le{a, b) 4= ^ Leba 5. a — b <= Eqta Argumented Two-Bound-Relational Predicates Suppose that [a,b] is a real interval and x,y are real variables. The general form of the combined Argumented predicates is as follows. -■<{ t Gea J I Leß i=l,2, ... Ltß (36) So, the general form of an argumented Two-Bound-Relational Predicate function is, •^'({SlIlrMx'"'"'......'''' The above general form of the predicates can be rewritten as the following eight separated formulas, 1. a A2(Gia, Ltb)x 5. x b Ai {GU, Lta)x 6. X b Ai {Gtb, Lea)x 7. X < a or X Ai{Geb,Lta)x 8. X < a or X > b Ai (Get, Lea)x Corresponding to conventional relational predicates, there are several equivalent relations, such as, 1. GtaS e> a 2. Gta{ei,e2,......,en ) ^ (ei > a) A (62 > a) A (ea > a)... A (e„ > a) Nl=M > 3. Lea (61,62,......,e„) Ar=i(et < a) A. A,{GTaLT ß){eue2,......,e„) ^ Ai{Gta,Leß){ei,e2,......,e„) ^Ar=i((ei>«)V(ei a) A (e < ß)) 6. A2{.GE a_LT ß){ei,62,......,e„) ^ A2{Gta,Le0){ei,e2,......,e„) ((ei > a) A (ei < ß)) A ((ea > a) A (ea < ... A ((e„ > a) A (6„ < ß)) ^ Ar=i((ei > V (ei < ß)) 4 MKL Language The Meteorological Knowledge Representation Language(MKL)[3, 5] is a functional knowledge representation programming language which is based on the argumented predicate logic we discussed above. A full discussion about the application of MKL appeared in [3, 4, 7, 9]. The theoretical part of MKL is represented in [3, 8, 6, 5]. In MKL, a statement is composed of two parts, the operator(s) and the operand(s). Thus, a rule in MKL could be represented in the general form, r 0(P). (38) where 0 is an operator list, P is an operand list and r is the consequence part of the rule which may include a confidence. This representation method has several advantages which will be discussed later. In this article, we are not going to give a full description of MKL. We only list some examples to show how the argumented predicates are applied in the implementation and application of the MKL language. The first problem, i.e, the ni-out-of-72 problem, in MKL, is simply represented as arb*m{ei,e2,... ,e„) n (39) The second problem, i.e, the Two-Bound-Relation Problem, in MKL[5, 3] can be represented in the following general form ■^«(j }"'{ is ,Xn) (40) m = l,2,... That is. ar&*m(| ^^ | a, | ^^ ^ ß){xi,x2,... ,Xn) (41) m = 1,2,... For example, to represent a rule, if all the n variables xi,x2,--- , a;„ are greater than a and less than b, then r2 holds. In MKL, we simply represent it as A2ÌGE a LE b){xi,... ,xn) =^r2. (42) Specifically, let a be 1, b be 10 and n=3, then in MKL, we have, A2ÌGE 1 LE 10)){xi,x2,x3)^r2. (43) One limitation of this new representation is that if Xi have different ranges such representation would not be very helpful. However, in the case that Xi have the same range this representation would be very helpful. Given Rule 4.1 If any two of the differences of the geopoten-tial height on the 500 hPa between the stations 58847 and 58456, 55585 and 59463 are greater than or equal to 9 geopotential deca-meter height, THEN NTR occurs with confidence 0.86. It could be represented in MKL as, NTR(0.86) ^ ^zGeg - if5(58847,58456,55585,59463). (44) Rule 4.2 If the wind directions on the 500hPa layer over 29612 and 36003 stations are all greater than 270" or, less than or equal to 90°, and the wind directions on same layer over any two of the three stations 29231, 29634 and 29838 are greater than 90° and less than or equal to 270°, THEN the weather event NTCS occurs. Comparison items FOL PPN APA A (m-l)(-) (n) - V 1 - OA predicate - - 1 each e. C-7) 1 Table 2: Costs in representing m-out-of-n problem In MKL, it is represented as, NTCS arb * 2{arb * 1{GT 270 LE 90)-D5(29612,36003); art * 2{arb * 2[GT 90 le 270)£)5(29231,29634,29838)). (45) or, in the extended predicate logic, it is represented as, NTCS Ä2 (^1 (0^270,^690)155(29612,36003); A^iGho, £e27o)^5(29231,29634,29838)). (46) 5 Analysis and Comparison First of all, we compare the argumented predicate ap-proach(APA) with the conventional first order logic method(FOL) and the Polish Prefix Notation(PPN). The following tables show how many times the operators and operands are used in dealing with the two problems. Compared with the FOL expression and the PPN expression, the differences are listed in Tables 2 and 3. Compared to the traditional logic, our extended logic has three main advantages. 1. expressed succinctly The following is the same rule in different expressions. (47) is in extended logic expression. NGHR^ ^2(iÌ589fi'5(47936,58847,59316,59289); Gf_3^j/ì5(55299,55591,56004,56029,56046, 56080,56096,56137)). (47) In coriventional logic, it could be represented as, NGHR<= Comparison items FOL PPN APA A 2n-l 1 - < 2n 2n - AR predicate - - 1 a n n 1 b n n 1 Xi 2 2 1 Table 3: Costs in representing two-bound-relation ((i?5(47936) < 589) A (H5(58847) < 589)A (i?5(59316) < 589) A (i?5(59287) < 589))A (((F5(55299) - F51(55299)) > -3)A ((F5(55591) - ^"51(55591)) > -3)A ((F5(56004) - i?51(56004)) > -3)A ((if5(56029) - i?51(56029)) > -3)A ((i?5(56046) - 7151(56046)) > -3)A ((775(56080) - i?51(56080)) > -3)A ((F5(56096) - 7751(56096)) > -3)A ((775(56137) - 7751(56137)) > -3). (48) It is very obvious that the extended logic expression (47) is much shorter and clearer than the conventional logical expression (48). 2. Integration and extension of disjunction and conjunction The OA predicate Ai is an integration and extension of disjunction V and conjunction A in conventional logic. As mentioned earlier, disjunction, V and conjunction, A in conventional logic are only two special cases of the OA predicate when i=l or i=n, that is, -4i(ei,e2,......,e„) = V(e:,e2,......,e„) An{ei,e2,......,e„) = A(ei,e2,......,e„) We have yli = V and An = A. 3. Saving time and space Obviously, the Argumented predicate approach improves substantially on the conventional FOL method. Prom Tables 2 and 3, we can see that for processing the same rule, in APA only one operator is needed. But in FOL m(Jf) - 1 operators are needed. And in PPN (™) + 1 operators are needed. We find from the computational point of view, the argumented method can reduce relational operations, retrieval time, and logic operations. For example, in the problem of m out of n, the average operation is 0(n(™)), however, in our approach it is only 0(n). However, MKL is a special language for the representation of meteorological knowledge. Whereas, FOL, APA, Prolog are the tools for more general purposes. The MKL language is interpreted by the interpreter written in C. The idea , the design strategy and implementation technology of MKL are applicable to many other problems. But to the language itself, the introduced predicates and the functions are mainly for convenient of meteorological knowledge representation and processing. As the MKL interpreter is written in the high language C, the size of the interpreter is very small. As a specific purpose language, it well fit the needs of meteorological knowledge representation, and is convenient for meteorologists. The language adopts logic construction method. It considers both the needs in solving meteorological problems and the advantage of logical expressions. At the meantime it also takes the advantage of Prolog in inference. MKL focuses on the processing of the representation of index type knowledge and the character type knowledge. A meteorological expert system can directly accept, recognize and process the knowledge represented in MKL. Such processing include understanding, explanation and applications in solving real world problems in the area of weather forecasting. The MKL language has been applied in building a number of weather forecasting expert systems which include the WMES I and II, the Wuhan heavy rain forecasting expert systems. These systems have been in operation since 1995. On average, the predictive accuracy rate of the systems are very competitive with that made by a human domain expert. It was very interesting that in the summer of 1985, two heavy rain events were predicted correctly by the system, but were failed by human experts due to the careful analysis carried out by the system. Later on we discovered the same case. In all of these systems, the knowledge is provided by human experts and encoded in MKL. We expect that a learning system based on the MKL knowledge representation can be developed for the discovery of weather forecasting rules from observational data. Further, an integrated comprehensive system can be built using MKL representation which combines learning, forecasting, data and knowledge analysis and applications. 6 Conclusion This paper introduced a new approach for handling specific domain knowledge representation difficulties and inconveniences using Argumented predicates. This method can significantly speed up the logical operation process and save a considerable time and space. The idea of the approach is to transform conventional first logic into a flexible Argumented predicate representation, which can greatly reduce the descriptive complexity of a rule and thereby greatly reduce the times of logical operations. We also provide a number of definitions and corresponding lemmas and corollaries. This research demonstrated some potential benefits to further research in knowledge processing. In particular, for other informal logics, such as fuzzy logic, matrix logic and model logic. Future research will extend the argumented logic to other informal logics, and apply them to solve real application problems. The uncertainty problem [13, p415-467] processing strategies can also be incorporated in the approach. We expect that the application of the OA predicate in machine learning and automatic reasoning could be very fruitful. References [1] Liviu Badea. Reifying concepts in description logics. In Martha E. Pollack, editor, Proceedings of the 15th International Joint Conference on Artificial Intelligence (IJCAI'97), pages 142147, Nagoya, Japan, August 23-29, 1997. [2] Ronald J. Brachman. The furture of knowledge representation. AAAI-90 Proceedings, 1(1):1082-1092, 1990. [3] Honghua Dai. The development of the WMES system and a study to its theoretical problems. M.Sc. Thesis, lAP of Academia Sinica, 1985. [4] Honghua Dai. A regional heavy rain forecasting expert system— WMES. China Meteorology, 3(2), 1986. [5] Honghua Dai. A study on the WMES system and its theoretical problems. Technical report, lAP, Academia Sinica, 1986. [6] Honghua Dai. The Foundations of Meteorological Expert Systems, volume I & II. lAP, Academia Sinica, Beijing, China, 1986 (in Chinese). [7] Honghua Dai. The general design scheme of VS-RFES project. Technical report, Wuhan National Regional Weather Centre, 1987. [8] Honghua Dai. Several properties of meteorological knowledge used for expert systems. Advances in Atmospheric Sciences, 5(4):515-521, 1988. [9] Honghua Dai, Qi Song Zheng, and Zhao Xi Zhao. An expert system for predicting heavy rain. Advances in Atmospheric Sciences, 4(4):496-505, 1987. [10] F. Donini, D. Nardi, and R. Rosati. Autoepis-temic description logics. In Martha E. Pollack, editor. Proceedings of the 15th International Joint Conference on Artificial Intelligence (IJCAI'Ol), pages 136-141, Nagoya, Japan, August 23-29, 1997. [11] Patrick Valduriez Gorges Gardarin. Relational Database and Knowledge Bases. Addison-Wesley Publishing Company, Inc., Reading, Massachusetts, 1989. [12] W. Marek and M. Truszczynski. Modal logic for default reasoning. Annals of Mathematics and Artificial Intelligence, 1:275-302, 1990. [13] Stuart Russell and Peter Norvig. Artificial Intelligence: A Mordern Approach. Prentice Hall, Englewood Cliffs, New Jersey 07632, 1995. [14] August Stern. Matrix Logic. ElsevierScience Publishers B.V., P.O.Box 1991, 1000 BZ Amsterdam, The Netherlands, 1988. [15] L. A. Zadeh. Fuzzy sets. Information and Control, 8:338-353, 1965. [16] L. A. Zadeh. Fuzzy sets as a theory of possibility. Int. J. Man-Machine Stud., l(l):3-28, 1978. THE MINISTRY OF SCIENCE AND TECHNOLOGY OF THE REPUBLIC OF SLOVENIA Address: Slovenska 50, 1000 Ljubljana, Tel.: +386 61 1311 107, Fax: +386 61 1324 140. WWW:http: //www.mzt.si Minister: Lojze Marinček, Ph.D. The Ministry also includes: The Standards and Metrology Institute of the Republic of Slovenia Address: Kotnikova 6, 61000 Ljubljana, Tel.: +386 61 1312 322, Fax: +386 61 314 882. Slovenian Intellectual Property Office Address: Kotnikova 6, 61000 Ljubljana, Tel.: +386 61 1312 322, Fax: +386 61 318 983. Office of the Slovenian National Commission for UNESCO Address: Slovenska 50, 1000 Ljubljana, Tel.: +386 61 1311 107, Fax: +386 61 302 951. Scientific, Research and Development Potential: The Ministry of Science and Technology is responsible for the R&D policy in Slovenia, and for controlling the government R&D budget in compliance with the National Research Program and Law on Research Activities in Slovenia. The Ministry finances or co-finance research projects through public bidding, while it directly finance some fixed cost of the national research institutes. According to the statistics, based on OECD (Frascati) standards, national expenditures on R&D raised from 1,6 % of GDP in 1994 to 1,71 % in 1995. Table 2 shows an income of R&D organisation in million USD. Objectives of R&D policy in Slovenia: — maintaining the high level and quality of scientific technological research activities; - stimulation and support to collaboration between research organisations and business, public, and other sectors; Total investments in RfcD (% of GDP) 1,71 Number of R&D Organisations 297 Total number of employees in R&D 12.416 Number of researchers 6.094 Number of Ph.D. 2.155 Number of M.Sc._1.527 Table 1: Some R&D indicators for 1995 Ph.D. M.Sc. 1993 1994 1995 1993 1994 1995 Bus. Ent. 51 93 102 196 327 330 Gov. Inst. 482 574 568 395 471 463 Priv. np Org. 10 14 24 12 25 23 High. Edu. 1022 1307 1461 426 772 711 TOTAL 1565 1988 2155 1029 1595 1527 Table 2: Number of employees with Ph.D. and M.Sc. — stimulating and supporting of scientific and research disciplines that are relevant to Slovenian national authenticity; — co-financing and tax exemption to enterprises engaged in technical development and other applied research projects; ' — support to human resources development with emphasis on young researchers; involvement in international research and development projects; — transfer of knowledge, technology and research achievements into all spheres of Slovenian society. Table source: Slovene Statistical Ofiice. Basic Research Applied Research Exp. Devel. Total 1994 1995 1994 1995 1994 1995 1994 1995 Business Enterprises 6,6 9,7 48,8 62,4 45,8 49,6 101,3 121,7 Government Institutes 22,4 18,6 13,7 14,3 9.9 6,7 46,1 39,6 Private non-profit Organisations 0,3 0,7 0,9 0,8 0,2 0,2 1,4 1,7 Higher Education 17,4 24,4 13,7 17,4 8,0 5,7 39,1 47,5 TOTAL 46,9 53,4 77,1 94,9 63.9 62,2 187,9 210,5 Table 3: Incomes of R&D organisations by sectors in 1995 (in million USD) JOŽEF STEFAN INSTITUTE Jožef Stefan (1835-1893) was one of the most prominent physicists of the 19th century. Bom to Slovene parents, he obtained his Ph.D. at Vienna University, where he was later Director of the Physics Institute, Vice-President of the Vienna Academy of Sciences and a member of several scientific institutions in Europe. Stefan explored many areas in hydrodynamics, optics, acoustics, electricity, magnetism and the kinetic theory of gases. Among other things, he originated the law that the total radiation from a black body is proportional to the 4th power of its absolute temperature, known as the Stefan-Boltzmann law. The Jožef Stefan Institute ( JSI) is the leading independent scientific research institution in Slovenia, covering a broad spectrum of fundamental and applied research in the fields of physics, chemistry and biochemistry, electronics and information science, nuclear science technology, energy research and environmental science. The Jožef Stefan Institute (JSI) is a research organisation for pure and applied research in the natural sciences and technology. Both are closely interconnected in research departments composed of difiFerent task teams. Emphasis in basic research is given to the development and education of young scientists, while applied research and development serve for the transfer of advanced knowledge, contributing to the development of the national economy and society in general. At present the Institute, with a total of about 700 staff, has 500 researchers, about 250 of whom are postgraduates, over 200 of whom have doctorates (Ph.D.), and around 150 of whom have permanent professorships or temporary teaching assignments at the Universities. In view of its activities and status, the JSI plays the role of a national institute, complementing the role of the universities and bridging the gap between basic science and applications. Research at the JSI includes the following major fields: physics; chemistry; electronics, informatics and computer sciences; biochemistry; ecology; reactor technology; applied mathematics. Most of the activities are more or less closely connected to information sciences, in particular computer sciences, artificial intelligence, language and speech technologies, computer-aided design, computer architectures, biocy-bernetics and robotics, computer automation and control, professional electronics, digital communications and networks, and applied mathematics. The Institute is located in Ljubljana, the capital of the independent state of Slovenia (or S^nia). The capital today is considered a crossroad between East, West and Mediterranean Europe, offering excellent productive capabilities and solid business opportunities, with strong international connections. Ljubljana is connected to important centers such as Prague, Budapest, Vienna, Zagreb, Milan, Rome, Monaco, Nice, Bern and Munich, all within a radius of 600 km. In the last year on the site of the Jožef Stefan Institute, the Technology park "Ljubljana" has been proposed as part of the national strategy for technological development to foster synergies between research and industry, to promote joint ventures between university bodies, research institutes and innovative industry, to act as an incubator for high-tech initiatives and to accelerate the development cycle of innovative products. At the present time, part of the Institute is being reorganized into several high-tech units supported by and connected within the Technology park at the Jožef Stefan Institute, established as the beginning of a regional Technology park "Ljubljana". The project is being developed at a particularly historical moment, characterized by the process of state reorganisation, privatisation and private initiative. The national Technology Park will take the form of a shareholding company and will host an independent venture-capital institution. The promoters and operational entities of the project are the Republic of Slovenia, Ministry of Science and Technology and the Jožef Stefan Institute. The framework of the operation also includes the University of Ljubljana, the National Institute of Chemistry, the Institute for Electronics and Vacuum Technology and the Institute for Materials and Construction Research among others. In addition, the project is supported by the Ministry of Economic Relations and Development, the National Chamber of Economy and the City of Ljubljana. Jožef Stefan Institute Jamova 39, 61000 Ljubljana, Slovenia Tel.:-t-386 61 1773 900, Fax.:-t-386 61 219 385 Tlx.:31 296 JOSTIN SI WWW: http://www.ijs.si E-mail: matjaz.gams@ijs.si Contact person for the Park: Iztok Lesjak, M.Sc. Public relations: Natalija Polenec NT' INFORMATICA AN INTERNATIONAL JOURNAL OF COMPUTING AND INFORMATICS INVITATION, COOPERATION Submissions and Refereeing Please submit three copies of the manuscript with good copies of the figures and photographs to one of the editors from the Editorial Board or to the Contact Person. At least two referees outside the author's country will examine it, and they are invited to make as many remarks as possible directly on the manuscript, from typing errors to global philosophical disagreements. The chosen editor will send the author copies with remarks. If the paper is accepted, the editor will also send copies to the Contact Person. The Executive Board will inform the author that the paper has been accepted, in which case it will be published within one year of receipt of e-mails with the text in Informatica Ifl^jX format and figures in .eps format. The original figures can also be sent on separate sheets. Style and examples of papers can be obtained by e-mail from the Contact Person or from FTP or WWW (see the last page of Informatica). Opinions, news, calls for conferences, calls for papers, etc. should be sent directly to the Contact Person. QUESTIONNAIRE Send Informatica free of charge Yes, we, subscribe Please, complete the order form and send it to Dr. Rudi Murn, Informatica, Institut Jožef Stefan, Jamova 39, 61111 Ljubljana, Slovenia. Since 1977, Informatica has been a major Slovenian scientific journal of computing and informatics, including telecommunications, automation and other related areas. In its 16th year (more than five years ago) it became truly international, although it still remains connected to Central Europe. The basic aim of Informatica is to impose intellectual values (science, engineering) in a distributed organisation. Informatica is a journal primarily covering the European computer science and informatics community - scientific and educational as well as technical, commercial and industrial. Its basic aim is to enhance communications between different European structures on the basis of equal rights and international refereeing. It publishes scientific papers accepted by at least two referees outside the author's country. In addition, it contains information about conferences, opinions, critical examinations of existing publications and news. Finally, major practical achievements and innovations in the computer and information industry are presented through commercial publications as well eis through independent evaluations. Editing and refereeing are distributed. Each editor can conduct the refereeing process by appointing two new referees or referees from the Board of Referees or Editorial Board. Referees should not be from the author's country. If new referees are appointed, their names will appear in the Refereeing Board. Informatica is free of charge for major scientific, educational and governmental institutions. Others should subscribe (see the last page of Informatica). ORDER FORM - INFORMATICA / Name: .................................................. Office Address and Telephone (optional): Title and Profession (optional): .................................................................. ......................................................... E-mail Address (optional): ............. Home Address and Telephone (optional): ............... ......................................................... Signature and Date: .................... Informatica WWW: http://ai.ijs.si/Mezi/informatica.htm http://orca.st.usm.edu/informatica/ Referees: Witold Abramowicz, David Abramson, Kenneth Aizawa, Suad Alagić, Alan Aliu, Richard Amoroso, ' John Anderson, Hans-Jurgen Appelrath, Grzegorz Bartoszewicz, Catriel Beeri, Daniel Beech, Fevzi Belli, Istvan Berkeley, Azer Bestavros, Balaji Bharadwaj, Jacek Blazewicz, Laszlo Boeszoermenyi, Damjan Bojadžijev, Jeff Bone, Ivan Bratko, Jerzy Brzezinski, Marian Bubak, Leslie. Burkholder, Prada Burstein, Wojciech Buszkowski, Netiva Cafitori, Jason Ceddia, Ryszard Choras, Wojciech Cellary, Wojciech Chybowski, Andrzej Ciepielewski, Vie Ciesielski, David ClifF, Travis Craig, Noel Craske, Matthew Crocker, Tadeusz Czachorski, Milan Češka, Honghua Dai, Andrej Dobnikar, Sait Dogru, Georg Dorfner, Ludoslaw Drelichowski, Matija Drobnič, Maciej Drozdowski, Marek Druzdzel, Jozo Dujmović, Pavol Duriš, Hesham EI-Rewini, Pierre Flener, Wojciech Fliegner, Vladimir A. Fomichov, Terrence Forgarty, Hans Praaije, Hugo de Garis, Eugeniusz Gatnar, James Geller, Michael Georgiopolus, Jan Golinski, Janusz Gorski, Georg Gottlob, David Green, Herbert Groiss, Inman Harvey, Elke Hochmueller, Rod Howell, Tomas Hruška,'Alexey Ippa, Ryszard Jakubowski, Piotr-Jedrzejowicz, Eric Johnson, Polina Jordanova, Djani Juričič, Sabhash Kak, Li-Shan Kang, Roland Kaschek, Jan Kniat, Stavros Kokkotos, Kevin Korb, Gilad Koren, Henryk Krawczyk, Ben Kroese, Zbyszko Krolikowski, Benjamin Kuipers, Matjaž Kukar, Aarre LaaJjso, Phil Laplante, Bud Lawson, Ulrike Leopold-Wildburger, Joseph Y-T. Leung, Alexander Linkevich, Raymond Lister, Doug Locke, Peter Lockeman, Matija Lokar, Jason Lewder, Andrzej Malachowski, Bernardo Magnini, Peter Marcer, Andrzej Marciniak, Witold Marciszewski, Vladimir Marik, Jacek Martinek, Tomasz Maruszewski, Florian Matthes, Timothy Menzies, Dieter Merkl, Zbigniew Michalewicz, Roland Mittermeir, Madhav Moganti, Tadeusz Morzy, Daniel Mossé, John Mueller, Hari Narayanan, Elzbieta Niedzielska, Marian Niedq'zwiedziriski, Jaroslav Nieplocha, Jerzy Nogieć, Stefano Nolfi, Franc Novak, Antoni Nowakowski, Adam Nowicki, Tadeusz Nowicki, Hubert Osterle, Wojciech Olejniczak, Jerzy Olszewski, Cherry Owen, Mieczyslaw Owoc, Tadeusz Pankowski, Mitja Perus, Warren Persons, Stephen Pike, Niki Pissinou, Ullin Place, Gustav Pomberger, James Pomykalski, Gary Preckshot, Dejan Rakovič, Cveta Razdevšek Pučko, Ke Qiu,'Michael Quinn, Gerald Quirchmayer, Luc de Raedt, Ewaryst Rafajlowicz, Sita Ramakrishnan, Wolf Rauch, Peter Rechenberg, Felix Redmill, David Robertson, Marko Robnik, Ingrid Rüssel, A.S.M. Sajeev, Bo Sanden, Vivek Sarin, Iztok Savnik, Wa;lter Schempp, .Wolfgang Schreiner, Guenter Schmidt, Heinz Schmidt, Denis Sever, William Spears, H^tinvit'Stadtler, Olivero Stock, Janusz Stoklosa, Przemyslaw Stpiczynski, Andrej Stritar, Maciej Stroinski, Tomasz Szmuc, Zdzislaw Szyjewski, Jure Šile, Metod Škarja, Jin Šlechta, Zahir Tari, Jurij Tasič, Piotr Teczynski, Stephanie Teufel, Ken Tindell, A Min Tjoa, Wieslaw Traczyk, Roman Trobec, Marek Tudruj, Andrej Ule, Amjad Umar, Andrzej Urbanski, Marko Uršič, Tadeusz Usowicz, Elisabeth Valentine, Kanonkluk Vanapipat, Alexander P. Vazhenin, Zygmunt Vetulani, Olivier de Vel, John Weckert, Gerhard Widmer, Stefan Wrobel, Stanislaw Wrycza, Janusz Zalewski, Damir Zazula, Yanchun Zhang, Robert Zorc, Anton P. Železnikar EDITORIAL BOARDS, PUBLISHING COUNCIL Informatica is a journal primarily covering the European computer science and informatics community; scientific and educational as well as technical, commercial and industrial. Its basic aim is to enhance communications between different European structures on the basis of equal rights and international refereeing. It publishes scientific papers accepted by at least two referees outside the author's country. In addition, it contains information about conferences, opinions, critical examinations of existing publications and news. Finally, major practical achievements and innovations in the computer and information industry are presented through commercial publications as well ais through independent evaluations. Editing and refereeing are distributed. Each editor from the Editorial Board can conduct the refereeing process by appointing two new referees or referees from the Board of Referees or Editorial Board. Referees should not be from the author's country. If new referees are appointed, their names will appear in the list of referees. Each paper bears the name of the editor who appointed the referees. Each editor can propose new members for the Editorial Board or referees. Editors and referees inactive for a longer period can be automatically replaced. Changes in the Editorial Board are confirmed by the Executive Editors. The coordination necessary is made through the Executive Editors who examine the reviews, sort the accepted articles and maintain appropriate international distribution. The Executive Board is appointed by the Society Informatika. Informatica is partially supported by the Slovenian Ministry of Science and Technology. Each author is guaranteed to receive the reviews of his article. When accepted, publication in Informatica is guaranteed in less than one year after the Executive Editors receive the corrected version of the article. Executive Editor - Editor in Chief Anton P. Železnikar Volaričeva 8, Ljubljana, Slovenia E-mail: anton.p.zeleznikarSijs.si WWW: http://lea.haBiradio.si/~s51ein/ Executive Associate Editor (Contact Person) Matjaž Gams, Jožef Stefan Institute Jamova 39, 61000 Ljubljana, Slovenia Phone: +386 61 1773 900, Fax: +386 61 219 385 El-mail: inatjaz.gams0ijs.si WWW: http : //www2. i j s. si/"inezi/mat j az. html Executive Associate Editor (Technical Editor) Rudi Murn, Jožef Stefan Institute Publishing Council: Tomaž Banovec, Ciril Baškovič, Andrej Jerman-Blažič, Jožko Čuk, Jernej Virant Board of Advisors: Ivan Bratko, Marko Jagodic, Tomaž Pisanski, Stanko Strmčnik Editorial Board Suad Alagić (Bosnia and Herzegovina) Vladimir Bajić (Republic of South Africa) Vladimir Batagelj (Slovenia) Francesco Bergadano (Italy) Leon Birnbaum (Romania) Marco Botta (Italy) Pavel Brazdil (Portugal) Andrej Brodnik (Slovenia) Ivan Bruha (Canada) Se Woo Cheon (Korea) Hubert L. Dreyfus (USA) Jozo Dujmović (USA) Johann Eder (Austria) Vladimir Pomichov (Russia) Georg Gottlob (Austria) Janez Grad (Slovenia) Francis Heylighen (Belgium) Hiroaki Kitano (Japan) Igor Kononenko (Slovenia) Miroslav Kubat (USA) Ante Laue (Croatia) Jadran Lenarčič (Slovenia) Huan Liu (Singapure) Ramon L. de Mantaras (Spain) Svetozar D. Margenov (Bulgaria) Magoroh Maruyama (Japan) Angelo Montanari (Italy) Igor Mozetič (Austria) Stephen Muggleton (UK) Pavol Navrat (Slovakia) Jerzy R. Nawrocki (Poland) Roumen Nikolov (Bulgaria) Marcin Paprzycki (USA) Oliver Popov (Macedonia) Karl H. Pribram (USA) Luc De Raedt (Germany) Dejan Raković (Yugoslavia) Jean Ramaekers (Belgium) Paranandi Rao (India) Wilhelm Rossak (USA) Ivo Rozman (Slovenia) Claude Sammut (Australia) Sugata Sanyal (India) Walter Schempp (Germany) Johannes Schwinn (Germany) Zhongzhi Shi (China) Branko Souček (Italy) Oliviero Stock (Italy) Petra Stoerig (Germany) Jin Šlechta (UK) Gheorghe Tecuci (USA) Robert Trappl (Austria) Terry Winograd (USA) Stefan Wrobel (Germany) Xindong Wu (Australia) Volume 23 Number 2 May 1999 ISSN 0350-5596 An International Journal of Computing and Informatics Introduction 153 Hagerstrand Revisited: Interactive Space-Time Visualizations of Complex Spatial Data N.R. Hedley C.H. Drew E.A. Arfin A. Lee 155 Modeling an Auditory Urban Database with a Field-Oriented Approach R. Laurini ' K.-J. Li : S. Servigne M.-A. Kang 169 A Revisited Database Projection Operator for Network Facilities in a GIS C. Claramunt M. Maingueiiaud 187 Analysis of Cache Sensitive Representation for Binary Space Partitioning Trees V. Havran 203 Improved Representations for Spatial Data Structures and Their Manipulations K.-L. Chung J.-G. Wu 211 Characterization Results for the Poset Based Representation of Topological Relations - I: Introduction and Models ■ . Luca Forlizzi Enrico Nardelli 223 Asynchronous Microprocessors J. Šile B. Robič 239 Discrete-Event Simulation Software : A Comparison Of Users' Surveys V. Hlupic 249 More Efficient Functionality Decomposition in LOTOS M. Kapus-Kolar 259 An Application-Level Dependable Technique for Farmer-Worker Parallel Programs V. De Florio G. Deconinck R. Lauwereins 275 Agent Properties In Multi-Agent Systems M. Maleković 283 Extended Predicate Logic and Its Application in Designing MKL Language H. Dai 289 Reports and Announcements 301