06.08.2015 Views

New Developments in Artificial Intelligence and the Semantic Web

New Developments in Artificial Intelligence and the Semantic Web

New Developments in Artificial Intelligence and the Semantic Web

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Publications of <strong>the</strong> F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Society - 23<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong><strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12 th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong>Conference STeP 2006, Hels<strong>in</strong>ki University ofTechnology, Espoo, F<strong>in</strong>l<strong>and</strong>, October 26-27, 2006.Edited by Eero Hyvönen, Tomi Kaupp<strong>in</strong>en, Jukka Kortela,Mikko Laukkanen, Tapani Raiko, <strong>and</strong> Kim ViljanenF<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Society – Hels<strong>in</strong>ki University ofTechnology – University of Hels<strong>in</strong>ki


Publications of <strong>the</strong> F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> SocietyThe F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Society publishes national <strong>and</strong> <strong>in</strong>ternationalconference papers on <strong>the</strong>oretical <strong>and</strong> applied artificial <strong>in</strong>telligence research <strong>and</strong>popular multidiscipl<strong>in</strong>ary symposium papers on <strong>in</strong>telligence <strong>and</strong> relatedstudies <strong>in</strong> F<strong>in</strong>nish <strong>and</strong> o<strong>the</strong>r languages.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>The 12 th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006Hels<strong>in</strong>ki University of Technology, Espoo, F<strong>in</strong>l<strong>and</strong>, October 26-27, 2006.Organizers:Sponsors:F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> SocietyHels<strong>in</strong>ki University of TechnologyUniversity of Hels<strong>in</strong>ki<strong>Semantic</strong> Comput<strong>in</strong>g Research GroupTeliaSonera F<strong>in</strong>l<strong>and</strong> OyjCity of EspooNokia OyjProgram Committee <strong>and</strong> Editors:Eero Hyvönen, Hels<strong>in</strong>ki University of Technology, University of Hels<strong>in</strong>ki, ChairTomi Kaupp<strong>in</strong>en, University of Hels<strong>in</strong>ki, Hels<strong>in</strong>ki University of TechnologyJukka Kortela, <strong>Artificial</strong> <strong>Intelligence</strong> Technologies, University of OuluMikko Laukkanen, TeliaSonera F<strong>in</strong>l<strong>and</strong> OyjTapani Raiko, Hels<strong>in</strong>ki University of TechnologyKim Viljanen, Hels<strong>in</strong>ki University of TechnologyOrganiz<strong>in</strong>g Committee:Tapani Raiko, Hels<strong>in</strong>ki University of Technology, ChairTomi Kaupp<strong>in</strong>en, University of Hels<strong>in</strong>ki, Hels<strong>in</strong>ki University of TechnologyJukka Kortela, <strong>Artificial</strong> <strong>Intelligence</strong> Technologies, University of OuluEero Hyvönen, Hels<strong>in</strong>ki University of Technology, University of Hels<strong>in</strong>kiMikko Laukkanen, TeliaSonera F<strong>in</strong>l<strong>and</strong> OyjKim Viljanen, Hels<strong>in</strong>ki University of TechnologyI<strong>in</strong>a Tarnanen, Hels<strong>in</strong>ki University of TechnologyPentti Haikonen, Nokia Research CenterHarri Valpola, Hels<strong>in</strong>ki University of TechnologyKrista Lagus, Hels<strong>in</strong>ki University of TechnologyOtto Lappi, University of Hels<strong>in</strong>kiMatti Miett<strong>in</strong>en, RD-TechCover:Series Editor:Tomi Kaupp<strong>in</strong>en, Kim Viljanen, <strong>and</strong> AITapani Raiko, Hels<strong>in</strong>ki University of TechnologySeries: Conference Series – No 23 – Proceed<strong>in</strong>gs of STeP 2006Publisher:Pr<strong>in</strong>ted by:F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> SocietyTSF Vallilan kopiopalvelu, Hels<strong>in</strong>kiISBN-13:ISBN-10:ISSN:ISBN-13:ISBN-10:ISSN:URL:978-952-5677-02-7 (paperback)952-5677-02-8 (paperback)1238-4658 (Pr<strong>in</strong>t)978-952-5677-03-4 (PDF)952-5677-03-6 (PDF)1796-623X (Onl<strong>in</strong>e)http://www.stes.fi/step2006/proceed<strong>in</strong>gs.pdfii


Sponsors <strong>and</strong> Partners of STeP 2006iii


Welcome to STeP 2006!These proceed<strong>in</strong>gs conta<strong>in</strong> <strong>the</strong> research papers presented at <strong>the</strong> 12 th F<strong>in</strong>nish <strong>Artificial</strong><strong>Intelligence</strong> Conference (Suomen tekoälytutkimuksen päivät, STeP) that has been heldbiannually s<strong>in</strong>ce 1984. In 2006, <strong>the</strong> twelth conference was organised alongside <strong>the</strong> n<strong>in</strong>thSc<strong>and</strong><strong>in</strong>avian Conference on <strong>Artificial</strong> <strong>Intelligence</strong> (SCAI 2006) at Hels<strong>in</strong>ki University ofTechnology, Espoo. The first half of <strong>the</strong>se proceed<strong>in</strong>gs is on <strong>the</strong> m<strong>in</strong>isymposium “<strong>Semantic</strong><strong>Web</strong> at Work” whereas <strong>the</strong> second half conta<strong>in</strong>s topics from various areas of artificial<strong>in</strong>telligence.The <strong>Semantic</strong> <strong>Web</strong> is a research <strong>and</strong> application area where artificial <strong>in</strong>telligence techniques,such as knowledge representation <strong>and</strong> reason<strong>in</strong>g techniques are comb<strong>in</strong>ed with webtechnologies, <strong>and</strong> applied to <strong>the</strong> doma<strong>in</strong> of shar<strong>in</strong>g <strong>and</strong> reus<strong>in</strong>g knowledge <strong>and</strong> services on<strong>the</strong> web. There are already many st<strong>and</strong>ards <strong>in</strong> use, such as RDF <strong>and</strong> OWL, <strong>and</strong> lots of tools<strong>and</strong> methodologies are be<strong>in</strong>g developed for creat<strong>in</strong>g applications. However, at <strong>the</strong> moment<strong>the</strong> number of practical semantic web applications on <strong>the</strong> web is not very large <strong>in</strong> comparisonwith <strong>the</strong> wide <strong>in</strong>terest <strong>in</strong> <strong>the</strong> area.The idea of this m<strong>in</strong>i symposium was to focus on <strong>the</strong> practical aspects of mak<strong>in</strong>g <strong>the</strong> vision of<strong>the</strong> <strong>Semantic</strong> <strong>Web</strong> through <strong>in</strong> practice. The papers presented expla<strong>in</strong> <strong>and</strong> discuss <strong>the</strong> benefits<strong>and</strong> drawbacks of us<strong>in</strong>g semantic web technologies <strong>in</strong> real life applications. The <strong>the</strong>me isdiscussed from two viewpo<strong>in</strong>ts. From <strong>the</strong> application developers' viewpo<strong>in</strong>t, best practices<strong>and</strong> methodologies of creat<strong>in</strong>g ontologies <strong>and</strong> semantic web systems are <strong>in</strong> focus. From <strong>the</strong>end-user's viewpo<strong>in</strong>t, <strong>the</strong> semantic services <strong>and</strong> <strong>in</strong>novative user <strong>in</strong>terface designs arediscussed, as well as issues related to <strong>the</strong> content creation <strong>and</strong> harvest<strong>in</strong>g processes on <strong>the</strong>web.The symposium programme was opened with a keynote talk by Ora Lassila, Nokia ResearchCentre Cambridge, <strong>and</strong> was followed by two consecutive sessions conta<strong>in</strong><strong>in</strong>g thirteenpresentations. The second day of STeP 2006 was opened with a keynote talk by Tom Ziemke,University of Skövde, followed by aga<strong>in</strong> two consecutive sessions conta<strong>in</strong><strong>in</strong>g elevenpresentations. We thank all contributors <strong>and</strong> participants of <strong>the</strong> conference <strong>and</strong> authors of<strong>the</strong>se proceed<strong>in</strong>gs for <strong>the</strong>ir activity <strong>in</strong> this exit<strong>in</strong>g field of technology <strong>and</strong> for smooth cooperation.The occasion was organized by <strong>the</strong> F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Society toge<strong>the</strong>r with <strong>the</strong>National <strong>Semantic</strong> <strong>Web</strong> Ontology Project (F<strong>in</strong>nONTO) 2003-2007, be<strong>in</strong>g conducted at <strong>the</strong><strong>Semantic</strong> Comput<strong>in</strong>g Research Group at <strong>the</strong> Hels<strong>in</strong>ki University of Technology (TKK),Laboratory of Media Technology, <strong>and</strong> at <strong>the</strong> University of Hels<strong>in</strong>ki, Department of ComputerScience.TeliaSonera F<strong>in</strong>l<strong>and</strong> Oyj has provided f<strong>in</strong>ancial support for pr<strong>in</strong>t<strong>in</strong>g <strong>the</strong> proceed<strong>in</strong>gs.October 16, 2006Eero Hyvönen, Tomi Kaupp<strong>in</strong>en, Jukka Kortela, Mikko Laukkanen,Tapani Raiko, <strong>and</strong> Kim Viljaneniv


Table of Contents<strong>Semantic</strong> <strong>Web</strong> at Work<strong>Semantic</strong> media application for comb<strong>in</strong><strong>in</strong>g <strong>and</strong> play<strong>in</strong>g with user created <strong>and</strong>professional content....................................................................................................................1Asta Bäck, Sari Va<strong>in</strong>ika<strong>in</strong>en, <strong>and</strong> Pirjo NäkkiDescrib<strong>in</strong>g <strong>and</strong> L<strong>in</strong>k<strong>in</strong>g Cultural <strong>Semantic</strong> Content by Us<strong>in</strong>g Situations <strong>and</strong> Actions............13Miikka Junnila, Eero Hyvönen, <strong>and</strong> Mirva Salm<strong>in</strong>enCultureSampo—F<strong>in</strong>nish Culture on <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>: The Vision <strong>and</strong> First Results...........25Eero Hyvönen, Tuukka Ruotsalo, Thomas Häggström, Mirva Salm<strong>in</strong>en, MiikkaJunnila, Mikko Virkkilä, Mikko Haaramo, Eetu Mäkelä, Tomi Kaupp<strong>in</strong>en,<strong>and</strong> Kim ViljanenOntology-based Model<strong>in</strong>g <strong>and</strong> Visualization of Cultural Spatio-temporal Knowledge..........37Tomi Kaupp<strong>in</strong>en, Riikka Henriksson, Jari Väätä<strong>in</strong>en, Christ<strong>in</strong>e Deichstetter,<strong>and</strong> Eero HyvönenImprov<strong>in</strong>g <strong>the</strong> Quality of Medication by <strong>Semantic</strong> <strong>Web</strong> Technologies...................................46Juha Puustjärvi <strong>and</strong> Leena PuustjärviRosettaNet <strong>and</strong> <strong>Semantic</strong> <strong>Web</strong> Services...................................................................................52Paavo Kot<strong>in</strong>urmi <strong>and</strong> Arm<strong>in</strong> HallerCASCOM: Context-Aware Service Coord<strong>in</strong>ation <strong>in</strong> Mobile Comput<strong>in</strong>g Environments........60Heikki Hel<strong>in</strong> <strong>and</strong> Ahti SyreeniDescrib<strong>in</strong>g Rich Content: Future Directions for <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>......................................143Timo Honkela <strong>and</strong> Matti Pöllä<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong>Towards reflective <strong>in</strong>formation management...........................................................................62Jari Yli-Hietanen <strong>and</strong> Samuli NiiranenElastic Systems: Role of Models <strong>and</strong> Control..........................................................................67Heikki HyötyniemiProlonged Spik<strong>in</strong>g Periods Pattern Detection Method by Us<strong>in</strong>g EMFit <strong>and</strong> SCSB Signals...75Jarmo Alametsä, Antti Saastamo<strong>in</strong>en, Eero Huupponen, Alpo Värri, Atte Joutsen,Joel Hasan, Esa Rauhala, <strong>and</strong> Sari-Leena HimanenObject-oriented declarative model specification <strong>in</strong> C++..........................................................82Risto LahdelmaSolv<strong>in</strong>g <strong>and</strong> Rat<strong>in</strong>g Sudoku Puzzles with Genetic Algorithms................................................86Timo Mantere <strong>and</strong> Janne KoljonenUs<strong>in</strong>g SOM based resampl<strong>in</strong>g techniques to boost MLP tra<strong>in</strong><strong>in</strong>g performance......................93Jussi Ahola <strong>and</strong> Mikko HiirsalmiData-Based Model<strong>in</strong>g of Electroless Nickel Plat<strong>in</strong>g................................................................97Hans-Christian Pfisterer <strong>and</strong> Heikki HyötyniemiLähdekood<strong>in</strong> symbol<strong>in</strong>en analyso<strong>in</strong>ti tekoälyn näkökulmasta...............................................103Erkki LaitilaScrap charge optimization us<strong>in</strong>g fuzzy chance constra<strong>in</strong>ed l<strong>in</strong>ear programm<strong>in</strong>g..................118Risto Lahdelma <strong>and</strong> Aiy<strong>in</strong>g RongSimulat<strong>in</strong>g processes of language emergence, communication <strong>and</strong> agent model<strong>in</strong>g.............129Timo Honkela, Ville Könönen, Ti<strong>in</strong>a L<strong>in</strong>dh-Knuutila, <strong>and</strong> Mari-Sanna PaukkeriProgram comprehension <strong>the</strong>ories <strong>and</strong> Prolog-based methodologies......................................133Erkki Laitilav


<strong>Semantic</strong> media application for comb<strong>in</strong><strong>in</strong>g <strong>and</strong> play<strong>in</strong>g withuser created <strong>and</strong> professional contentAsta BäckVTT Media <strong>and</strong> InternetP.O. Box 1000, FI-02044 VTT, F<strong>in</strong>l<strong>and</strong>asta.back@vtt.fiSari Va<strong>in</strong>ika<strong>in</strong>enVTT Media <strong>and</strong> InternetP.O. Box 1000, FI-02044 VTT, F<strong>in</strong>l<strong>and</strong>sari.va<strong>in</strong>ika<strong>in</strong>en@vtt.fiPirjo NäkkiVTT Media <strong>and</strong> InternetP.O.Box, FI-02044 VTT, F<strong>in</strong>l<strong>and</strong>pirjo.nakki@vtt.fiAbstractThere are two important trends br<strong>in</strong>g<strong>in</strong>g changes <strong>and</strong> new opportunities <strong>in</strong>to media consumption:<strong>the</strong> emergence of user-created content <strong>and</strong> <strong>Semantic</strong> <strong>Web</strong> technologies. In this paper we present anapplication that shows how <strong>the</strong>se technologies can be comb<strong>in</strong>ed to create an enjoyable mediaconsumption experience. The application development work served also as a feasibility test of <strong>the</strong>maturity of <strong>Semantic</strong> <strong>Web</strong> technologies for media sector applications. The application conta<strong>in</strong>smaterial relat<strong>in</strong>g to <strong>the</strong> historical Ox road of Häme. The results <strong>in</strong>dicated that users enjoyed us<strong>in</strong>g<strong>the</strong> application. Several ontologies were utilised, most of which were based on exist<strong>in</strong>g ontologiesor taxonomies. With <strong>the</strong>ir help, it was possible to offer multiple views <strong>and</strong> exploratory routes <strong>in</strong>to<strong>the</strong> available content. Fur<strong>the</strong>r development can, among o<strong>the</strong>r th<strong>in</strong>gs, be made <strong>in</strong> improv<strong>in</strong>g searchstrategies <strong>and</strong> <strong>in</strong> utilis<strong>in</strong>g user-created metadata for both for enrich<strong>in</strong>g ontologies <strong>and</strong> as an<strong>in</strong>dication of user <strong>in</strong>terests.1 IntroductionMedia sector is undergo<strong>in</strong>g huge changes as <strong>the</strong>cont<strong>in</strong>uously evolv<strong>in</strong>g electronic media gets astronger role <strong>in</strong> consumers' daily lives. Ano<strong>the</strong>rimportant change is <strong>the</strong> more active role of mediaconsumers. The active role does not only meancomment<strong>in</strong>g <strong>and</strong> discuss<strong>in</strong>g <strong>the</strong> content that mediacompanies publish but actively <strong>in</strong>teract<strong>in</strong>g with <strong>the</strong>content - publish<strong>in</strong>g one’s own content <strong>and</strong>comb<strong>in</strong><strong>in</strong>g self-created content with content fromo<strong>the</strong>r sources. Nei<strong>the</strong>r are users satisfied only withgood usability but <strong>the</strong>y expect enjoyableexperiences with a considerable element of play <strong>and</strong>fun.<strong>Semantic</strong> <strong>Web</strong> is an important trend chang<strong>in</strong>g <strong>the</strong><strong>Web</strong>. The vision of <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong> is to make <strong>the</strong>web more <strong>in</strong>telligent. <strong>Semantic</strong> <strong>Web</strong> technologiessuch as st<strong>and</strong>ards <strong>and</strong> tools relat<strong>in</strong>g to ontologies arecurrently be<strong>in</strong>g developed to reach this goal.The text is orig<strong>in</strong>ally published <strong>in</strong> Asta Bäck & al.<strong>Semantic</strong>ally supported media services with user participation.Report on <strong>the</strong> RISE-project. VTT Publications 612. Espoo 2006.Repr<strong>in</strong>ted with permission from <strong>the</strong> publisher.The work that we describe here was made <strong>in</strong> aproject that wanted to research what k<strong>in</strong>d of newopportunities <strong>the</strong>se two trends br<strong>in</strong>g to commercialmedia companies. In our view <strong>the</strong>se trends connectto each o<strong>the</strong>r. <strong>Semantic</strong> <strong>Web</strong> technologies make itpossible to make more enjoyable media contentexperiences because applications can be made more<strong>in</strong>telligent, <strong>and</strong> this way <strong>the</strong>y require less effort from<strong>the</strong> users. The research approach of <strong>the</strong> project wasprototyp<strong>in</strong>g, <strong>and</strong> a prototype application calledStorySlotMach<strong>in</strong>e was developed. The applicationhelps people <strong>in</strong> choos<strong>in</strong>g a travel dest<strong>in</strong>ation bylett<strong>in</strong>g <strong>the</strong>m explore background <strong>in</strong>formationrelat<strong>in</strong>g to sights. They can also comb<strong>in</strong>e differentmedia objects - both <strong>the</strong>ir own <strong>and</strong> o<strong>the</strong>rs’ - <strong>in</strong>topresentations. The assembled material can be takenalong to enrich <strong>the</strong> actual visit. The aim was to makean application that offers <strong>in</strong>teractivity opportunitiesfor <strong>the</strong> active users, but also gives an enjoyable userexperience for <strong>the</strong> less active ones. All this shouldbe built utilis<strong>in</strong>g rich metadata <strong>and</strong> <strong>Semantic</strong> <strong>Web</strong>technologies to test <strong>the</strong>ir applicability.1


2 Use scenarioOur <strong>in</strong>itial use scenario was <strong>in</strong>spired by a slotmach<strong>in</strong>e analogy: users are presented with somecontent <strong>in</strong> <strong>the</strong> topic of <strong>the</strong>ir <strong>in</strong>terest, <strong>and</strong> if <strong>the</strong>y arenot happy with <strong>the</strong> results, <strong>the</strong>y can try <strong>the</strong>ir luckaga<strong>in</strong>. An underly<strong>in</strong>g assumption was that if aperson does not know so much about a topic,explor<strong>in</strong>g <strong>and</strong> brows<strong>in</strong>g a media object collection ismore pleasant than mak<strong>in</strong>g explicit searches. Also,<strong>the</strong> results should not be shown as a typical list ofitems as usual <strong>in</strong> search eng<strong>in</strong>es, but as a page orcollection where different elements like images,videos <strong>and</strong> texts may be seen.The presented material may <strong>the</strong>n be taken as astart<strong>in</strong>g po<strong>in</strong>t to explore <strong>the</strong> topic more, a bit likewith a slot mach<strong>in</strong>e, where some of <strong>the</strong> items maybe locked <strong>and</strong> some redrawn to improve <strong>the</strong> result.The most active users may explore <strong>the</strong> topic frommany different po<strong>in</strong>ts of view whereas <strong>the</strong> lessactive ones are satisfied with what is <strong>in</strong>itially shown<strong>the</strong>m. This way both <strong>the</strong> more <strong>and</strong> less active usersare taken <strong>in</strong>to consideration.Our scenario also <strong>in</strong>cludes <strong>the</strong> opportunity tostore <strong>the</strong> presentation <strong>and</strong> show it to o<strong>the</strong>r people,because an important feature that many peopleappreciate is <strong>the</strong> opportunity to get feedback fromo<strong>the</strong>r users. O<strong>the</strong>r opportunities for utilis<strong>in</strong>gpresentations are ei<strong>the</strong>r export<strong>in</strong>g it <strong>in</strong>to a personaldevise or pr<strong>in</strong>t<strong>in</strong>g <strong>the</strong> content. Different templatesmay be offered to take <strong>in</strong>to consideration, whichmedia elements are emphasised <strong>and</strong> for whichdevice <strong>the</strong> presentation is generated for. If allowedby <strong>the</strong> orig<strong>in</strong>al creator, o<strong>the</strong>r users may utilise <strong>the</strong>sepresentations <strong>and</strong> <strong>the</strong>ir components <strong>in</strong> <strong>the</strong>ir ownones.We chose location related content for our pilotapplication with <strong>the</strong> emphasis on travell<strong>in</strong>g. Whenprepar<strong>in</strong>g for a trip, people often are <strong>in</strong>terested <strong>in</strong>explor<strong>in</strong>g content to f<strong>in</strong>d out about <strong>the</strong>ir dest<strong>in</strong>ation.Dur<strong>in</strong>g a trip, people take photos <strong>and</strong> videos, whichcan be used toge<strong>the</strong>r with content from o<strong>the</strong>rsources.The use scenario can be divided <strong>in</strong>to threeseparate cases: before, dur<strong>in</strong>g <strong>and</strong> after <strong>the</strong> trip.Before <strong>the</strong> trip <strong>the</strong> user can familiarise withpotential dest<strong>in</strong>ations <strong>and</strong> <strong>the</strong>ir sights to f<strong>in</strong>d outmore about <strong>the</strong>m. The material can be browsed<strong>the</strong>me wise, <strong>and</strong> <strong>the</strong> user can select <strong>and</strong> comb<strong>in</strong>e <strong>the</strong>most relevant items <strong>in</strong>to a collection that can beviewed ei<strong>the</strong>r on <strong>the</strong> web or pr<strong>in</strong>ted to be takenalong for <strong>the</strong> trip. After <strong>the</strong> trip, <strong>the</strong> user makes hisown travel story ei<strong>the</strong>r utilis<strong>in</strong>g his or her ownmaterial or by comb<strong>in</strong><strong>in</strong>g it with <strong>the</strong> material offellow users or <strong>the</strong> content that <strong>the</strong> media companyprovides. Also after <strong>the</strong> trip, <strong>the</strong> user may make<strong>the</strong>me stories like before <strong>the</strong> trip as well as alsonormal word based searches. The users areencouraged to add metadata <strong>in</strong> <strong>the</strong> form of keywordsor tags, which are utilised to propose additionalmaterial. The users may choose any words todescribe <strong>the</strong>ir content or choose from <strong>the</strong> ones that<strong>the</strong> system offers based on relevant ontologies.3 User <strong>in</strong>terfacesThis chapter presents screen shots of <strong>the</strong> user<strong>in</strong>terfaces <strong>and</strong> describes <strong>the</strong>ir functionality. Moredetailed descriptions of <strong>the</strong> implementation <strong>and</strong>utilisation of underl<strong>in</strong>g ontologies are presented <strong>in</strong>chapter “Ontologies”.The first step is to select <strong>the</strong> places of <strong>in</strong>terestfrom <strong>the</strong> map or list. The demonstration target areais <strong>the</strong> Ox road of Häme 1 , a historical route betweenHämeenl<strong>in</strong>na <strong>and</strong> Turku <strong>in</strong> <strong>the</strong> South of F<strong>in</strong>l<strong>and</strong>.After select<strong>in</strong>g a place, <strong>the</strong> user is shown a list of <strong>the</strong>sights located <strong>the</strong>re.The user can sort <strong>the</strong> sights by history, nature<strong>and</strong> culture, read short descriptions of <strong>the</strong>m, viewboth commercial <strong>and</strong> user imported pictures <strong>and</strong> add<strong>the</strong> sights he or she f<strong>in</strong>d most <strong>in</strong>terest<strong>in</strong>g <strong>in</strong>to apersonal item list (see Figure 1).The user can search background <strong>in</strong>formation of<strong>the</strong> selected sights as <strong>the</strong>me stories (Figure 2). A<strong>the</strong>me story is a collection of media content fromsome po<strong>in</strong>t of view (Figure 3). Our <strong>the</strong>me stories are“Life now <strong>and</strong> <strong>the</strong>n”, “Life stories”, “Nature <strong>and</strong>animals”, “Historical events”, “Fairytales <strong>and</strong>stories”, “Wars”, <strong>and</strong> “Art <strong>and</strong> culture”. Some of <strong>the</strong><strong>the</strong>mes are divided <strong>in</strong>to sub <strong>the</strong>mes. For example,historical events are divided accord<strong>in</strong>g to historicalperiods. Only <strong>the</strong> categories with some content areshown to <strong>the</strong> user. The user can play with <strong>the</strong>content: View commercial <strong>and</strong> user-created pictures<strong>and</strong> videos, <strong>and</strong> view <strong>and</strong> build <strong>the</strong>me stories. Theuser may <strong>in</strong>clude <strong>the</strong>me stories <strong>in</strong>to <strong>the</strong> travel planto be created for <strong>the</strong> trip, as well as photos <strong>and</strong>descriptions of <strong>the</strong> chosen sights. The travel plan isavailable as a slide show <strong>and</strong> as a web page suitablefor pr<strong>in</strong>t<strong>in</strong>g.1http://www.harkatie.net/english/<strong>in</strong>dex.html<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 2


Sort sights by history, nature, cultureView picturesShort description of <strong>the</strong> sightThe list of <strong>the</strong> chosensightsAdd sights that you are <strong>in</strong>terested <strong>in</strong> <strong>in</strong>to <strong>the</strong>listFigure 1: Choos<strong>in</strong>g sights to visit.After upload<strong>in</strong>g <strong>the</strong> content, <strong>the</strong> user is asked toadd some metadata. As <strong>the</strong> first step, <strong>the</strong> photos areconnected to <strong>the</strong> sights by dragg<strong>in</strong>g <strong>and</strong> dropp<strong>in</strong>g<strong>the</strong>m to <strong>the</strong> correct sight. After that, additionalmetadata can be given <strong>in</strong> <strong>the</strong> form of keywords ortags <strong>and</strong> by <strong>in</strong>dicat<strong>in</strong>g <strong>the</strong> genre of <strong>the</strong> photo (seeFigure 4). The keywords can be written freely or <strong>the</strong>user may utilise those that are suggested by <strong>the</strong>system based on relevant ontologies. The user mayalso add free text to his or her photos <strong>and</strong> change <strong>the</strong>visibility of <strong>the</strong> photos to o<strong>the</strong>r users.Users are offered commercial <strong>and</strong> o<strong>the</strong>r users’content, which <strong>the</strong>y can comb<strong>in</strong>e with <strong>the</strong>ir own (seeFigure 5). There are several ways to search foradditional content. The user can browse through <strong>the</strong>available photos, videos <strong>and</strong> texts. Content can alsobe searched with <strong>the</strong> help of tags, both user’s owntags <strong>and</strong> those suggested by <strong>the</strong> application based onontologies, or by mak<strong>in</strong>g a traditional free textsearch. The travel story is created automatically outof <strong>the</strong> content selected by <strong>the</strong> user. It can be viewedas a slide show or as a web page suitable forpr<strong>in</strong>t<strong>in</strong>g.Theme storiesChoose <strong>the</strong>meAdditional metadataThemes:Life before <strong>and</strong> nowLife storiesNature <strong>and</strong> animalsHistorical eventsFairytales <strong>and</strong> storiesWarsArt <strong>and</strong> cultureFigure 2: Mak<strong>in</strong>g <strong>the</strong>me stories to get background<strong>in</strong>formation relat<strong>in</strong>g to <strong>the</strong> selected sightWho <strong>the</strong> photocan be shown to(all, family)Keywords• Tags suggested basedon <strong>the</strong> ontology• User's own freelyselected tagsGenreTheme label: Life storiesInclude a <strong>the</strong>me story <strong>in</strong>toyour travell<strong>in</strong>g guideSaveFigure 4: Add<strong>in</strong>g metadataPlay with <strong>the</strong> content:• View pictures <strong>and</strong>videos (commercial<strong>and</strong> user created)• View <strong>and</strong> build<strong>the</strong>me stories• Try different <strong>the</strong>mesFigure 3: An example of a <strong>the</strong>me story.After <strong>the</strong> trip, <strong>the</strong> user may create his or her owntravel story by utilis<strong>in</strong>g his/her own material <strong>and</strong> <strong>the</strong>materials <strong>in</strong> <strong>the</strong> system. Photos can be uploadedafter select<strong>in</strong>g <strong>the</strong> visited sights. As part of <strong>the</strong>upload<strong>in</strong>g process, <strong>the</strong> user determ<strong>in</strong>es whe<strong>the</strong>r <strong>the</strong>photos can be viewed by o<strong>the</strong>r users, <strong>and</strong> accepts <strong>the</strong>licens<strong>in</strong>g terms.3


Comb<strong>in</strong><strong>in</strong>g owncontent withcommercial <strong>and</strong>o<strong>the</strong>r users'contentUser's owncontentTextFigure 5: Comb<strong>in</strong><strong>in</strong>g user-created content withcommercial <strong>and</strong> o<strong>the</strong>r users’ content. Additionalcontent can be found by brows<strong>in</strong>g available photos<strong>and</strong> videos by media types or tags.4 ContentMedia contentThe user canbrowse through <strong>the</strong>available photos<strong>and</strong> videos.They can be addedto <strong>the</strong> travel story.We Different types of media content, such asfacts, stories <strong>and</strong> news, are needed <strong>in</strong> order to beable to create versatile travel plans, <strong>the</strong>me stories<strong>and</strong> travel stories. Media content that is directlyrelated to <strong>the</strong> target area is preferred, but also moregeneral <strong>in</strong>formation is usable. A mixture of videos,photos, sounds <strong>and</strong> texts makes <strong>the</strong> presentationsmore appeal<strong>in</strong>g <strong>and</strong> <strong>in</strong>terest<strong>in</strong>g.The commercial media content of <strong>the</strong> pilotapplication consists of newspaper <strong>and</strong> encyclopaediaarticles with images, articles from <strong>the</strong> Häme Oxroad magaz<strong>in</strong>es, stories out of a book called“Hämeen Härkätiellä”, <strong>and</strong> photos from <strong>the</strong> HämeOx road website. In addition to <strong>the</strong> commercialcontent, <strong>the</strong> application has user-created photos. Thecontent is mostly general background <strong>in</strong>formation<strong>and</strong> not specific travel <strong>in</strong>formation like open<strong>in</strong>ghours or prices.This mixture of content <strong>and</strong> media formatsmeant that it was necessary to work with severalmetadata vocabularies. Different vocabularies areused to describe newspaper, magaz<strong>in</strong>e <strong>and</strong>encyclopaedia articles as well as short stories <strong>and</strong>users’ own content. Also different media formats(text, photos, <strong>and</strong> videos) have different needs <strong>and</strong>vocabularies for metadata.The content was delivered for our prototype <strong>in</strong>different formats <strong>and</strong> <strong>the</strong> amount of metadata varieda lot. The project did not address automatic methodsfor creat<strong>in</strong>g semantic metadata, <strong>and</strong> add<strong>in</strong>g metadata<strong>and</strong> convert<strong>in</strong>g it <strong>in</strong>to RDF required manual work.The newspaper articles <strong>and</strong> images had somemetadata that had been generated <strong>in</strong> <strong>the</strong> normalnewspaper production process, <strong>and</strong> some moremetadata like genre, scene <strong>and</strong> IPTC subject codeswere added by <strong>the</strong> media company persons for <strong>the</strong>prototype. We received <strong>the</strong> metadata <strong>in</strong> text format<strong>and</strong> it had a structure that helped us <strong>in</strong> convert<strong>in</strong>g it<strong>in</strong>to XML even though manual work could not beavoided completely.The encyclopaedia articles were delivered <strong>in</strong>XML <strong>and</strong> <strong>the</strong> structure of <strong>the</strong> articles could beutilised <strong>in</strong> convert<strong>in</strong>g <strong>the</strong>ir metadata <strong>in</strong>to RDF. Theencyclopaedia content also has <strong>the</strong> potential forpopulat<strong>in</strong>g <strong>the</strong> target ontology, for example withpersons relat<strong>in</strong>g to <strong>the</strong> F<strong>in</strong>nish history.The content received from <strong>the</strong> Häme Ox road didnot conta<strong>in</strong> any metadata so <strong>the</strong> metadata wascreated by h<strong>and</strong>. The articles of <strong>the</strong> Häme Ox roadmagaz<strong>in</strong>es were received <strong>in</strong> PDF format, <strong>and</strong> thatcaused also extra work.5 Ontologies5.1 The role of ontologiesThe prototype utilises a number of ontologies,each of which captures knowledge of some area thatis necessary to fulfil <strong>the</strong> required functionality.Ontologies are utilised when select<strong>in</strong>g content <strong>and</strong>also to produce some basic <strong>in</strong>formation to be shownto <strong>the</strong> users. The ontologies are also utilised whenusers add metadata to <strong>the</strong>ir own content such assuggestions to keywords.The Target ontology describes <strong>the</strong> knowledgerelated to places, routes <strong>and</strong> sights, <strong>and</strong> conta<strong>in</strong>s<strong>in</strong>formation that has relevance to <strong>the</strong>m such aspersons, events, objects <strong>and</strong> nature.The Media ontology describes <strong>the</strong> mediacontent. Relevant elements were selected out of <strong>the</strong>Dubl<strong>in</strong> Core (DC) <strong>and</strong> IPTC <strong>New</strong>scodevocabularies. The Media ontology <strong>in</strong>cludes <strong>the</strong>typical metadata fields, such as title, creator,publisher, date, media type, genre, scene, but alsorelations to <strong>the</strong> Time <strong>and</strong> Target ontologies, forexample relations to persons, sights, places, routes,events, objects, animals or plants. The subject ofmedia content was described with <strong>the</strong> YSA ontology(a general-purpose <strong>the</strong>saurus <strong>in</strong> F<strong>in</strong>nish) wheneverpossible, but for news articles also <strong>the</strong> IPTC <strong>and</strong> forencyclopaedia articles <strong>the</strong> Facta ontologies wereused.The Presentation ontology conta<strong>in</strong>s <strong>the</strong><strong>in</strong>formation on <strong>the</strong>mes <strong>and</strong> <strong>the</strong>ir subcategories <strong>and</strong>what k<strong>in</strong>d of content (subject, genre, scene, time) isto be searched for presentations. There are <strong>the</strong>meslike “Life now <strong>and</strong> <strong>the</strong>n”, “Life stories”, “Nature<strong>and</strong> animals”, “Historical events”, “Fairytales <strong>and</strong>stories”, “Wars”, <strong>and</strong> “Art <strong>and</strong> culture”.An ontology based on YSA (a general-purpose<strong>the</strong>saurus <strong>in</strong> F<strong>in</strong>nish) is utilised as a k<strong>in</strong>d of upperontology for classify<strong>in</strong>g <strong>the</strong> knowledge. Target,Media <strong>and</strong> Presentation ontologies are connected to<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 4


each o<strong>the</strong>r via <strong>the</strong> concepts of this upper YSAontology. The YSA ontology was created only to alimited extent because <strong>the</strong> idea was to replace it withYSO (F<strong>in</strong>nish General Ontology), which was underdevelopment <strong>and</strong> not yet available dur<strong>in</strong>g <strong>the</strong> timewhen <strong>the</strong> application was made.The Time ontology def<strong>in</strong>es a taxonomy of timeeras <strong>and</strong> periods by time <strong>in</strong>tervals, <strong>and</strong> it is based on<strong>the</strong> ontology developed <strong>in</strong> <strong>the</strong> MuseumF<strong>in</strong>l<strong>and</strong>project 2 . We added some time periods relat<strong>in</strong>g to <strong>the</strong>F<strong>in</strong>nish history as well as <strong>the</strong> seasons.The subject of <strong>the</strong> media content is determ<strong>in</strong>eddifferently for different content types: <strong>the</strong> IPTContology is used to determ<strong>in</strong>e <strong>the</strong> subject ofnewspaper articles. The ontology is based on <strong>the</strong>IPTC ontology 3 that was developed <strong>in</strong> <strong>the</strong> Neptunoproject.The content of encyclopaedia uses its owntaxonomy (Facta ontology). YSA-ontology is usableas a general subject ontology.5.2 Search<strong>in</strong>g content for <strong>the</strong>me storiesTheme stories consist of elements like a title,text, image <strong>and</strong> fact box, <strong>and</strong> <strong>the</strong>y are selected on<strong>the</strong> fly based on <strong>the</strong> knowledge <strong>in</strong> <strong>the</strong> ontologies.The fact box shows <strong>in</strong>formation retrieved out of <strong>the</strong>ontology. It may conta<strong>in</strong> knowledge about howevents, like a war, are related to <strong>the</strong> sight or basic<strong>in</strong>formation about a person who has a connection to<strong>the</strong> sight. Sometimes <strong>the</strong> user may wonder why acerta<strong>in</strong> article was shown, <strong>and</strong> <strong>the</strong> role of <strong>the</strong> factbox is to give some <strong>in</strong>dication about <strong>the</strong> connection.Media content is not l<strong>in</strong>ked directly to <strong>the</strong>various <strong>the</strong>mes. The knowledge <strong>in</strong> <strong>the</strong> Targetontology <strong>and</strong> <strong>the</strong> search rules are utilised <strong>in</strong>search<strong>in</strong>g <strong>and</strong> offer<strong>in</strong>g relevant media content. Thesearch rules are determ<strong>in</strong>ed with <strong>the</strong> Presentationontology, Java application <strong>and</strong> SPARQL queries.The criteria for how <strong>the</strong> media content is connectedto a <strong>the</strong>me, such as <strong>the</strong> subject, genre or time, aredeterm<strong>in</strong>ed <strong>in</strong> <strong>the</strong> Presentation ontology. Theadvantage is that <strong>the</strong> search criteria are not hidden<strong>in</strong>side <strong>the</strong> Java code, but that <strong>the</strong>y can be changedby modify<strong>in</strong>g <strong>the</strong> <strong>in</strong>stances of <strong>the</strong> ontology. Also,<strong>the</strong>mes may be created, changed or deleted bymodify<strong>in</strong>g <strong>the</strong> ontology classes or <strong>the</strong>ir <strong>in</strong>stances.The Java application creates SPARQL queriesfor search<strong>in</strong>g relevant media content based on <strong>the</strong>knowledge <strong>in</strong> <strong>the</strong> Presentation ontology. Searchesutilise <strong>the</strong> knowledge <strong>in</strong> <strong>the</strong> Target ontology (e.g.Life stories -> persons related to <strong>the</strong> sight) <strong>and</strong>/orsubjects related to <strong>the</strong>mes (e.g. Every day life now<strong>and</strong> before -> food, professions, cloth<strong>in</strong>g etc. orWars -> Great Nor<strong>the</strong>rn War, World War I & II etc.).In addition to that, some restrictions may be used,2http://museosuomi.cs.hels<strong>in</strong>ki.fi/3http://nets.ii.uam.es/neptuno/iptc/like time (e.g. Historical events), genre (e.g. Stories<strong>and</strong> fairy tails), place or sight.The subjects of <strong>the</strong> different <strong>the</strong>mes aredeterm<strong>in</strong>ed as relations to <strong>the</strong> YSA ontology. Also<strong>the</strong> subjects of <strong>the</strong> IPTC <strong>and</strong> Facta ontologies areconnected to <strong>the</strong>mes. Media content that is related tosame subjects is searched for. If content that isdescribed with some o<strong>the</strong>r ontology were brought<strong>in</strong>to <strong>the</strong> system, <strong>the</strong> subjects of this new ontologywould need to be connected to <strong>the</strong> exist<strong>in</strong>g <strong>the</strong>mes.5.3 Add<strong>in</strong>g metadata to user generatedcontentUsers can add metadata to <strong>the</strong>ir own content.Users are free to use any words <strong>the</strong>y want todescribe <strong>the</strong>ir content, but by utilis<strong>in</strong>g <strong>the</strong> availablecontextual <strong>in</strong>formation <strong>and</strong> <strong>the</strong> Target ontology,keywords are suggested. These suggestions relate toyearly events, objects, terms, o<strong>the</strong>r related sights<strong>and</strong> seasons. It was made easy to use <strong>the</strong>se terms– itis enough to click a word, <strong>and</strong> no writ<strong>in</strong>g is needed.Users are thus encouraged to use <strong>the</strong>se words thatcan <strong>the</strong>n be utilised to suggest additional relevantcontent from <strong>the</strong> system.In similar manner, users are encouraged to addkeywords relat<strong>in</strong>g to <strong>the</strong> genre based on <strong>the</strong>knowledge <strong>in</strong> <strong>the</strong> Media ontology. Genres have beendef<strong>in</strong>ed for all media types but only image genresare currently utilised. The genre <strong>in</strong>formation isuseful when <strong>the</strong> user generated media objects areutilised with future users.5.4 Search<strong>in</strong>g commercial content tocomplement user’s own contentOffer<strong>in</strong>g media content to complement user’sown content is based on <strong>the</strong> user-given metadata <strong>and</strong><strong>the</strong> knowledge of <strong>the</strong> Target ontology. First, <strong>the</strong>media content that is related directly to <strong>the</strong> sight issearched. After that, more general media contentrelat<strong>in</strong>g to events, persons <strong>and</strong> places is searchedfor. The relevance of <strong>the</strong> media content isdeterm<strong>in</strong>ed with <strong>the</strong> help of <strong>the</strong> search order start<strong>in</strong>gwith from exact searches <strong>and</strong> <strong>the</strong>n proceed<strong>in</strong>g tomore general searches.Additional content can be searched with <strong>the</strong> helpof tags. The tags suggested by <strong>the</strong> ontology mayalso be related persons or events <strong>in</strong> addition to tagsrelat<strong>in</strong>g to yearly events, objects, terms, o<strong>the</strong>r sightsrelat<strong>in</strong>g to sight <strong>and</strong> seasons. Already exist<strong>in</strong>g <strong>the</strong>mestories made by earlier users might be an additionalway to search <strong>in</strong>formation also when creat<strong>in</strong>g one’sown travel story. Theme stories give ready-madetext <strong>and</strong> image/video comb<strong>in</strong>ations that can easilybe added to a new travel story.6 Software <strong>and</strong> architecture5


The ontology editor Protégé 3.1 was used fordevelop<strong>in</strong>g ontologies. Ontologies were developedas RDFS-schema.The application is implemented as a Java client –server solution us<strong>in</strong>g Struts framework <strong>and</strong> JavaServer Pages (JSP). Tomcat 5.5 is used as <strong>the</strong> webserver. The user <strong>in</strong>terfaces were implemented withAJAX (Asynchronous JavaScript <strong>and</strong> XML) <strong>in</strong>order to offer good <strong>in</strong>teractivity <strong>and</strong> usability, <strong>and</strong> toadd new features, like drag-<strong>and</strong>-drop. Differentviews of <strong>the</strong> travel plan <strong>and</strong> travel story aregenerated utilis<strong>in</strong>g CSS style sheets.The ontologies <strong>and</strong> RDF-based data are h<strong>and</strong>ledby Profium SIR (<strong>Semantic</strong> <strong>in</strong>formation router). Abeta version with support for SPARQL-queries wasused. Profium SIR saved <strong>the</strong> RDF data <strong>in</strong>to aPostgres 7.4 database. Postgres 7.4 was used also formanag<strong>in</strong>g user <strong>in</strong>formation.The Sparql4j-jdbc driver 4 was used for quer<strong>in</strong>gRDF-data. Profium SIR created <strong>the</strong> result accord<strong>in</strong>gto <strong>the</strong> SPARQL Protocol for RDF specification 5 <strong>and</strong>forwarded it to a Sparql4j-jdbc driver, whichprovides <strong>the</strong> results via <strong>the</strong> Java ResultSetabstraction.It is not easy to choose <strong>the</strong> tools for applicationdevelopment with <strong>Semantic</strong> <strong>Web</strong> technologies.There are several open source tools, most of whichhave been created for research purposes. <strong>Semantic</strong><strong>Web</strong> related st<strong>and</strong>ards <strong>and</strong> recommendations are stillunder development, <strong>and</strong> different tools supportdifferent subsets of <strong>the</strong> st<strong>and</strong>ards. For example, weused one tool for develop<strong>in</strong>g <strong>the</strong> ontologies <strong>and</strong>ano<strong>the</strong>r for h<strong>and</strong>l<strong>in</strong>g <strong>the</strong> RDF-data, <strong>and</strong> this causedsome extra work to overcome <strong>the</strong> <strong>in</strong>compatibilities.Protégé 3.1 is a versatile ontology editor withmany useful features. It also has features formanag<strong>in</strong>g <strong>and</strong> develop<strong>in</strong>g multiple relatedontologies, but we had problems with this feature.Reopen<strong>in</strong>g a Protégé project file with connections too<strong>the</strong>r ontologies caused error messages <strong>and</strong>sometimes even meshed up <strong>the</strong> <strong>in</strong>stance data.The development of a st<strong>and</strong>ard query languageSPARQL for query<strong>in</strong>g RDF repositories is a step to<strong>the</strong> right direction. We wanted to use such a versionof Profium SIR that supported SPARQL eventhough it was <strong>in</strong> beta at <strong>the</strong> time. Java applicationdevelopment was speeded up by us<strong>in</strong>g <strong>the</strong> Sparql4jjdbcdriver with SIR, even though it supported onlyselect <strong>and</strong> ask type of queries at <strong>the</strong> time of <strong>the</strong>application development.Utilis<strong>in</strong>g AJAX made it possible to addimpressive features <strong>in</strong>to <strong>the</strong> web user <strong>in</strong>terface. Adownside was <strong>the</strong> lack of good development tools;debugg<strong>in</strong>g JavaScript code is troublesome. We alsoencountered <strong>the</strong> well-known problem for develop<strong>in</strong>gweb applications for different web browsers: what4http://sourceforge.net/projects/sparql4j5http://www.w3.org/TR/rdf­sparql­protocol/works <strong>in</strong> one browser does not necessarily work <strong>in</strong>ano<strong>the</strong>r.As a brief summary we can conclude that <strong>the</strong>realready are usable tools for develop<strong>in</strong>g semanticweb application, but currently many tools only havea partial support for <strong>the</strong> specifications. There isroom <strong>and</strong> need for fur<strong>the</strong>r development to make <strong>the</strong>implementation <strong>and</strong> management of <strong>Semantic</strong> <strong>Web</strong>applications easier.7 Results7.1 User testsThe user experience of <strong>the</strong> application was tested<strong>in</strong> two phases <strong>in</strong> <strong>the</strong> context of real schoolexcursions. The test group consisted of 33schoolchildren (12–18 years old) <strong>and</strong> 4 teachersfrom four different schools. In <strong>the</strong> first phase, userneeds <strong>and</strong> expectations were studied us<strong>in</strong>g artefact<strong>in</strong>terviews, observation, collages, metadata test <strong>and</strong>prototype tests. The prototype tests were made us<strong>in</strong>ga co-discovery method, where two participants used<strong>the</strong> prototype toge<strong>the</strong>r <strong>and</strong> discussed about <strong>the</strong>decisions <strong>the</strong>y made. Some users tested <strong>the</strong> travelplann<strong>in</strong>g part of <strong>the</strong> software before an excursion,whereas o<strong>the</strong>rs had already made a trip <strong>and</strong> createdtravel stories with <strong>the</strong> prototype.At <strong>the</strong> end of <strong>the</strong> project <strong>the</strong> functionalapplication was tested aga<strong>in</strong> with <strong>the</strong> same usergroup but with a smaller number of participants (6schoolchildren, 12 years old). The test users hadmade a trip to <strong>the</strong> Häme Ox road <strong>and</strong> <strong>the</strong>y used <strong>the</strong>application afterwards to store <strong>the</strong>ir own pictures<strong>and</strong> memories. The users were <strong>in</strong>terviewed bothbefore <strong>and</strong> after test<strong>in</strong>g. After <strong>the</strong> test session <strong>the</strong>yalso filled out a short questionnaire.As <strong>the</strong> result of <strong>the</strong> first <strong>in</strong>terviews, observation<strong>and</strong> collages made by users, follow<strong>in</strong>g requirementsfor <strong>the</strong> StorySlotMach<strong>in</strong>e were found. Theapplication should- arouse <strong>in</strong>terest <strong>and</strong> offer necessary factsbefore <strong>the</strong> trip- enable experienc<strong>in</strong>g <strong>the</strong> stories dur<strong>in</strong>g <strong>the</strong>trip- give additional <strong>in</strong>formation about <strong>the</strong><strong>the</strong>mes studied on <strong>the</strong> trip, as well as <strong>the</strong><strong>the</strong>mes about which no <strong>in</strong>formation wasavailable on <strong>the</strong> trip- support creat<strong>in</strong>g a personalised travel story- enable stor<strong>in</strong>g rich metadata about pictures,e.g. memories <strong>and</strong> feel<strong>in</strong>gs, as well ascomments <strong>and</strong> h<strong>in</strong>ts for o<strong>the</strong>r travellers.A metadata test was made <strong>in</strong> order to ga<strong>the</strong>r<strong>in</strong>formation about <strong>the</strong> mean<strong>in</strong>gs that <strong>the</strong> usersassociate with <strong>the</strong>ir travel photos. The aim was tof<strong>in</strong>d out, how semantic <strong>in</strong>formation could be added<strong>in</strong>to <strong>the</strong> pictures. The users were asked to addcaptions <strong>and</strong> keywords <strong>in</strong>to <strong>the</strong>ir own travel photos,<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 6


as well as select applicable tags from a list ofkeywords. The written captions were generally veryshort, <strong>and</strong> <strong>the</strong> users did not necessarily rememberanyth<strong>in</strong>g about <strong>the</strong> objects of <strong>the</strong>ir photos. The<strong>in</strong>tuitiveness of select<strong>in</strong>g keywords varied a lotamong <strong>the</strong> users. The users must underst<strong>and</strong> what<strong>the</strong> purpose of add<strong>in</strong>g metadata is <strong>in</strong> order to f<strong>in</strong>d iteasy to do. In addition, <strong>the</strong> user should seeimmediate advantage of add<strong>in</strong>g metadata.The keywords used to describe <strong>the</strong>ir photos canbe divided <strong>in</strong>to five groups: 1) description of anobject or an action, 2) memories <strong>and</strong> atmosphere, 3)background <strong>in</strong>formation about <strong>the</strong> place or object, 4)questions for additional <strong>in</strong>formation (history <strong>and</strong>/orpresent), <strong>and</strong> 5) h<strong>in</strong>ts for o<strong>the</strong>r travellers.The application functioned only partially <strong>in</strong> <strong>the</strong>first user tests. For that reason many of <strong>the</strong> test usersfound <strong>the</strong> user <strong>in</strong>terface somewhat confus<strong>in</strong>g <strong>and</strong> <strong>the</strong>idea of mix<strong>in</strong>g own <strong>and</strong> media content did notbecome clear to everyone. In addition, mediacontents were not presented attractively enough torouse <strong>the</strong> <strong>in</strong>terest of users. None<strong>the</strong>less, half of <strong>the</strong>users found <strong>the</strong> application engag<strong>in</strong>g <strong>and</strong> useful.Schoolchildren appreciated <strong>the</strong> idea of f<strong>in</strong>d<strong>in</strong>g <strong>the</strong>necessary <strong>in</strong>formation easily <strong>in</strong> one place. Imageswere regarded as <strong>the</strong> most <strong>in</strong>terest<strong>in</strong>g part of <strong>the</strong>content. The complete report of <strong>the</strong> first user testscan be read <strong>in</strong> Näkki (2006).The prototype was developed fur<strong>the</strong>r after <strong>the</strong>first user tests <strong>and</strong> tested aga<strong>in</strong> at <strong>the</strong> end of <strong>the</strong>project. In <strong>the</strong> second test, user attitudes towards <strong>the</strong>functional application were very positive. Thesystem was found useful, quick <strong>and</strong> easy to use.Users found <strong>the</strong> StorySlotMach<strong>in</strong>e more pleasantthan traditional search mach<strong>in</strong>es, because <strong>the</strong>relevant content could be found easily as stories.The users regarded photos as <strong>the</strong> core of <strong>the</strong>application <strong>and</strong> added both <strong>the</strong>ir own <strong>and</strong>commercial pictures <strong>in</strong>to <strong>the</strong>ir travel stories. Theusers were also eager to write short captions to <strong>the</strong>photos. Add<strong>in</strong>g metadata <strong>in</strong>to <strong>the</strong>ir own pictures was<strong>in</strong>tuitive <strong>and</strong> did not burden <strong>the</strong> users. O<strong>the</strong>r users’pictures from <strong>the</strong> same excursion were found<strong>in</strong>terest<strong>in</strong>g, as well.Some users wanted to create <strong>the</strong>ir travel storyquickly, whereas o<strong>the</strong>rs were ready to use a lot oftime to f<strong>in</strong>ish <strong>the</strong>ir stories. Interest<strong>in</strong>gly, <strong>the</strong>StorySlotMach<strong>in</strong>e was found to be suitable for both<strong>the</strong>se user groups. All participants of <strong>the</strong> last testssaid that <strong>the</strong>y would like to use <strong>the</strong> system aga<strong>in</strong>.Summary of user experiences <strong>in</strong> <strong>the</strong> both test phasescan be seen <strong>in</strong> Figure 6.Figure 6: User experiences of <strong>the</strong> system: a) after<strong>the</strong> first user test (N=22), b) after <strong>the</strong> second usertest (N=6).From <strong>the</strong> users’ po<strong>in</strong>t of view, <strong>the</strong> value ofsemantic content is <strong>in</strong> <strong>the</strong> quickness <strong>and</strong> eas<strong>in</strong>ess of<strong>in</strong>formation retrieval. The way to f<strong>in</strong>d <strong>in</strong>formationas stories was someth<strong>in</strong>g new for <strong>the</strong> users, but mostof <strong>the</strong>m found <strong>the</strong> idea easy to underst<strong>and</strong>. However,<strong>the</strong> users did not necessarily want to collect, store<strong>and</strong> pr<strong>in</strong>t stories, when plann<strong>in</strong>g <strong>the</strong> trip. The systemshould <strong>the</strong>refore better support pure brows<strong>in</strong>g of <strong>the</strong>content. After a trip it was seen more underst<strong>and</strong>able<strong>and</strong> useful to create a travel story, where ownmemories are l<strong>in</strong>ked to editorial material.When users create semantic content, onechallenge lies <strong>in</strong> <strong>the</strong> process of add<strong>in</strong>g metadata. Itwas discovered that <strong>the</strong> travel images <strong>and</strong> memories<strong>in</strong>clude a lot of mean<strong>in</strong>gs that are hard to put <strong>in</strong>towords as simple keywords. Users’ activeparticipation will be needed, even though automaticsemantic reason<strong>in</strong>g is used for creat<strong>in</strong>gpresentations. It is <strong>the</strong> user who decides whichcontent is valuable for her. However, <strong>the</strong>StorySlotMach<strong>in</strong>e can substantially help <strong>the</strong> user byoffer<strong>in</strong>g suggestions about <strong>the</strong> media content relatedto <strong>the</strong> <strong>the</strong>me of <strong>the</strong> user’s trip. The semanticprocess<strong>in</strong>g makes it possible to discover <strong>in</strong>terest<strong>in</strong>g<strong>and</strong> surpris<strong>in</strong>g relations between contents that wouldbe hard to f<strong>in</strong>d o<strong>the</strong>rwise.7.2 Ontologies <strong>and</strong> implementationCreat<strong>in</strong>g, updat<strong>in</strong>g <strong>and</strong> manag<strong>in</strong>g ontologies arenot easy tasks, but <strong>the</strong>re are clear benefits <strong>in</strong> thistype of an application:- Ontologies make it possible to searchcontent from multiple directions (sights,events, persons etc.).- Also general media content can be utilised.- It is possible to make different <strong>the</strong>maticpresentations or views for people withdifferent <strong>in</strong>terests.- For example, one user might be <strong>in</strong>terested <strong>in</strong><strong>the</strong> historical places <strong>and</strong> events of <strong>the</strong> Oxroad dur<strong>in</strong>g <strong>the</strong> 19th century <strong>and</strong> ano<strong>the</strong>r isonly <strong>in</strong> churches dur<strong>in</strong>g <strong>the</strong> trip. They caneasily be served with this k<strong>in</strong>d of anapplication.7


- Ontologies conta<strong>in</strong> knowledge that makes itpossible to create visualisations such astimel<strong>in</strong>es, cause-effect diagrams, dialogues,trees, <strong>and</strong> maps of related resources.- Ontologies support generat<strong>in</strong>g aggregationsautomatically.- The benefits of be<strong>in</strong>g able to l<strong>in</strong>k <strong>the</strong>content automatically <strong>in</strong>to different <strong>the</strong>mesbecome significant as <strong>the</strong> number of contentitems <strong>in</strong>creases <strong>and</strong> grows cont<strong>in</strong>uously.There already are usable tools for develop<strong>in</strong>gsemantic web applications, but currently many toolsonly have a partial support for <strong>the</strong> specifications.There is room <strong>and</strong> need for fur<strong>the</strong>r development tomake <strong>the</strong> implementation <strong>and</strong> management of<strong>Semantic</strong> <strong>Web</strong> applications easier.Theme stories were <strong>the</strong> most central part of <strong>the</strong>application for ontology deployment. Theme storiescould be easily generated for sights with a longhistory, but not so smaller sights. Theme storiesshould ra<strong>the</strong>r be offered at higher level like for atown or a village or as <strong>in</strong> our case, for <strong>the</strong> wholehistorical route, than for a s<strong>in</strong>gle sight.There were challenges <strong>in</strong> creat<strong>in</strong>g general searchrules for <strong>the</strong> <strong>the</strong>mes. Every <strong>the</strong>me had uniquerequirements <strong>and</strong> complicated <strong>the</strong> Presentationontology. Some examples are listed below:- “Every day life now <strong>and</strong> before” hassubcategories weekday, celebration <strong>and</strong>society. Subjects like food, professions,cloth<strong>in</strong>g, <strong>in</strong>habitation, celebrations, laws,<strong>and</strong> source of livelihood relate to this<strong>the</strong>me. These determ<strong>in</strong>e <strong>the</strong> ma<strong>in</strong>framework for search<strong>in</strong>g, but to get morerelevant content also <strong>the</strong> time periods<strong>and</strong> <strong>the</strong> type of <strong>the</strong> sight should bedeterm<strong>in</strong>ed to f<strong>in</strong>d relevant content for aparticular sight.- “Arts <strong>and</strong> culture” is divided <strong>in</strong>to <strong>the</strong>follow<strong>in</strong>g subcategories: persons, art <strong>and</strong>build<strong>in</strong>gs, <strong>and</strong> environment. Whensearch<strong>in</strong>g for content for <strong>the</strong> subcategory‘Persons’, it is required to f<strong>in</strong>d personswho have a connection to <strong>the</strong> sight <strong>and</strong>have or had a profession relat<strong>in</strong>g to art<strong>and</strong> culture, such as composer, writer,pa<strong>in</strong>ter, or architect.- “Historical events” are divided <strong>in</strong>tohistorical periods, <strong>and</strong> time restrictionsare needed <strong>in</strong> searches. There are severalways to do this: search <strong>the</strong> media contentthat relates to <strong>the</strong> time <strong>and</strong> <strong>the</strong>sight/place, utilise terms that describe<strong>the</strong> time period or events that happeneddur<strong>in</strong>g that time.- In <strong>the</strong> <strong>the</strong>me “Stories <strong>and</strong> fairy tails” <strong>the</strong>genre is used to restrict <strong>the</strong> contentselection.When mak<strong>in</strong>g ontology-based searches, severalsearch criteria can be used <strong>and</strong> <strong>the</strong>ir priority ordermust be determ<strong>in</strong>ed. Here, it is important to f<strong>in</strong>d <strong>the</strong>correct balance between <strong>the</strong> number of differentsearch criteria to use <strong>and</strong> <strong>the</strong> speed of <strong>the</strong>application. First, <strong>the</strong> most relevant content issearched <strong>and</strong> after that, <strong>the</strong> search can be exp<strong>and</strong>edto more general material. The challenge is to knowhow deep <strong>the</strong> searches should navigate <strong>in</strong>to <strong>the</strong> netof relations of <strong>the</strong> ontology <strong>and</strong> still f<strong>in</strong>d content thatis relevant to <strong>the</strong> user. We encountered this problemboth when mak<strong>in</strong>g <strong>the</strong>me stories <strong>and</strong> search<strong>in</strong>g foradditional content to complement users’ owncontent.When <strong>the</strong> application has more content, this willprobably be less of a problem, <strong>and</strong> <strong>the</strong> challenge is<strong>the</strong> order<strong>in</strong>g or group<strong>in</strong>g of <strong>the</strong> relevant mediaobjects <strong>in</strong> an <strong>in</strong>terest<strong>in</strong>g way. One of <strong>the</strong> challengesis to <strong>in</strong>form user of why certa<strong>in</strong> content is offered toher/him <strong>in</strong> this context. For example, pictures ofhistorical persons might be confus<strong>in</strong>g, if user doesnot know who <strong>the</strong> person is <strong>and</strong> how he/she isrelat<strong>in</strong>g to <strong>the</strong> sight. In connection to <strong>the</strong> <strong>the</strong>mestories, a fact box was used to give some <strong>in</strong>dicationabout <strong>the</strong> connection by utilis<strong>in</strong>g <strong>the</strong> knowledge <strong>in</strong><strong>the</strong> ontology, <strong>and</strong> a similar approach should be usedelsewhere <strong>in</strong> <strong>the</strong> application.The implementation uses an upper ontology thatcan be replaced with ano<strong>the</strong>r one, if needed. Thisgives flexibility to <strong>the</strong> application development. Weturned selected parts of YSA (a general-purpose<strong>the</strong>saurus <strong>in</strong> F<strong>in</strong>nish) <strong>in</strong>to ontology, <strong>and</strong> used it asour upper ontology. There is currently a project <strong>in</strong>F<strong>in</strong>l<strong>and</strong> mak<strong>in</strong>g a comprehensive ontology out of<strong>the</strong> YSA, <strong>and</strong> it should be used also here when itbecomes available.We had many different vocabularies fordescrib<strong>in</strong>g <strong>the</strong> subject of different type of mediacontent <strong>in</strong> <strong>the</strong> StorySlotMach<strong>in</strong>e application. Ourfirst idea was to map <strong>the</strong> IPTC <strong>and</strong> Factavocabularies to <strong>the</strong> concepts of our top YSAontology.Mapp<strong>in</strong>g different vocabularies to eacho<strong>the</strong>r turned out to be complicated s<strong>in</strong>ce it was notalways possible to f<strong>in</strong>d correspond<strong>in</strong>g concepts <strong>in</strong><strong>the</strong> different ontologies. Also, <strong>the</strong>re was a lack ofgood tools for ontology mapp<strong>in</strong>g.Instead of mapp<strong>in</strong>g ontologies to each o<strong>the</strong>r, wedecided to keep <strong>the</strong> different ontologies. Asdescribed earlier, <strong>the</strong> subjects of media objects weredescribed with <strong>the</strong> concepts of <strong>the</strong> YSA-ontologywhen ever possible, but we also stored <strong>the</strong> orig<strong>in</strong>alsubjects described with IPTC or Facta. The subjectsof <strong>the</strong> different <strong>the</strong>mes were also described with <strong>the</strong>YSA, IPTC <strong>and</strong> Facta ontologies. Several searchesmay be done for media objects dur<strong>in</strong>g a usersession: first utilis<strong>in</strong>g <strong>the</strong> YSA concepts <strong>and</strong> <strong>the</strong>subjects from o<strong>the</strong>r ontologies. In o<strong>the</strong>r words,ontologies are not mapped to each o<strong>the</strong>r but to someextent, <strong>the</strong> mapp<strong>in</strong>g is done via <strong>the</strong> different <strong>the</strong>mes.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 8


In order to better test <strong>the</strong> feasibility of this approachmore media content should be added to <strong>the</strong> system.This approach will probably work with mediacompanies’ own media services, where <strong>the</strong>y c<strong>and</strong>ecide which <strong>the</strong>mes are available. Of course, itmight be possible to offer users an <strong>in</strong>terface where<strong>the</strong>y can comb<strong>in</strong>e ontology concepts <strong>and</strong> create <strong>the</strong>irown <strong>the</strong>mes. One idea for <strong>the</strong> future development of<strong>the</strong> StorySlotMach<strong>in</strong>e is to let users create new<strong>the</strong>mes with <strong>the</strong> help of <strong>the</strong> tags <strong>the</strong>y have used.In general it is good practice to use one commonupper vocabulary or ontology for describ<strong>in</strong>g <strong>the</strong>metadata <strong>in</strong>side <strong>the</strong> media house <strong>and</strong> also usest<strong>and</strong>ardised vocabularies as much as it is possible.However it is realistic to assume that a media housewill have several vocabularies also <strong>in</strong> <strong>the</strong> future <strong>and</strong>one upper vocabulary or ontology cannot solve allissues <strong>and</strong> challenges. Better tools are needed tosupport ontology mapp<strong>in</strong>gs <strong>and</strong> even better ifmapp<strong>in</strong>gs could be made automatically by <strong>the</strong>system.8 Related workThe key idea <strong>in</strong> <strong>the</strong> StorySlotMach<strong>in</strong>e is toaggregate content <strong>in</strong> a way that lets users explore <strong>the</strong>content <strong>in</strong> an enjoyable manner. Related work isbe<strong>in</strong>g done <strong>in</strong> <strong>the</strong> various areas. The first dist<strong>in</strong>ctioncan be made between <strong>the</strong> aggregation level: is <strong>the</strong>aim a s<strong>in</strong>gle story to be created of out <strong>the</strong> availablecontent, or a collection of <strong>in</strong>dependent resources.Geurts et al. (2003) <strong>and</strong> <strong>the</strong> Artequakt project (Kimet al. 2002) work at <strong>the</strong> first area. Geurts et al.(2003) describe <strong>the</strong> system where <strong>the</strong> knowledge ofontologies is used to create multimediapresentations like artists' bibliographies.Presentations vary based on <strong>the</strong> genre (e.g.Biography <strong>and</strong> CV) <strong>and</strong> output format that can beselected by <strong>the</strong> user. The basic idea of <strong>the</strong>irDiscourse ontology is same than our Presentationontology. The ontologies def<strong>in</strong>e rules for search<strong>in</strong>gcontent. They have different genres, whereas wehave <strong>the</strong>mes. Our <strong>the</strong>mes use more versatile datathan what is needed for artists’ bibliographies <strong>and</strong>we also have more general content whichcomplicated <strong>the</strong> ontologies <strong>and</strong> rules. One differenceis that <strong>the</strong>y focus more on ready-made multimediapresentations, which conta<strong>in</strong> parts (e.g. address,private life <strong>and</strong> career) that are determ<strong>in</strong>ed <strong>in</strong> <strong>the</strong>Discourse ontology.Our work is more related to creat<strong>in</strong>g a collectionout of <strong>in</strong>dependent resources <strong>and</strong> turn<strong>in</strong>g <strong>the</strong>m <strong>in</strong>topresentations. However, we let users comb<strong>in</strong>eimages <strong>and</strong> texts <strong>in</strong> new ways <strong>and</strong> we do not aim atproduc<strong>in</strong>g one collection for <strong>the</strong> user to view but astart<strong>in</strong>g po<strong>in</strong>t for fur<strong>the</strong>r exploration with <strong>the</strong>content.Mc Schraefel et al. (2005) have developed anopen source framework called mSpace, which isavailable at mspace.sourceforge.net. The start<strong>in</strong>gpo<strong>in</strong>t for <strong>the</strong> mSpace development as well as for ourStorySlotMach<strong>in</strong>e is same: to offer an exploratoryaccess to content. The user should be able to browsecontent accord<strong>in</strong>g to <strong>the</strong>ir <strong>in</strong>terests <strong>and</strong> associations,to leave tracks on <strong>the</strong> way by stor<strong>in</strong>g <strong>the</strong> most<strong>in</strong>terest<strong>in</strong>g items, <strong>and</strong> to get multimedia as a resultra<strong>the</strong>r than l<strong>in</strong>ks to resources.The orig<strong>in</strong>al mSpace demonstrator was aClassical Music explorer , <strong>and</strong> it has s<strong>in</strong>ce beenutilised <strong>in</strong> o<strong>the</strong>r applications <strong>and</strong> doma<strong>in</strong>.mSpace is based on <strong>the</strong> idea of associativeexploration of <strong>the</strong> content <strong>and</strong> user-def<strong>in</strong>ed <strong>and</strong>manipulated hierarchies. mSpace lets <strong>the</strong> userexplore <strong>the</strong> material with <strong>the</strong> help of hierarchicalcolumns like periods, composers, arrangements <strong>and</strong>pieces: <strong>the</strong> selection <strong>in</strong> <strong>the</strong> first column constra<strong>in</strong>s<strong>the</strong> selections of <strong>the</strong> follow<strong>in</strong>g column. Users canarrange columns accord<strong>in</strong>g to <strong>the</strong>ir preferences <strong>and</strong>also add new dimensions or remove <strong>the</strong>m.mSpace provides preview cues (for exampleaudio clips) of some representative example <strong>in</strong> <strong>the</strong>various dimensions to help <strong>in</strong> explor<strong>in</strong>g <strong>and</strong>decid<strong>in</strong>g whe<strong>the</strong>r an area is <strong>in</strong>terest<strong>in</strong>g. This wayusers may f<strong>in</strong>d new <strong>in</strong>terest<strong>in</strong>g areas without priorknowledge of <strong>the</strong>m. mSpace also has <strong>in</strong>fo views toshow related <strong>in</strong>formation like for example adescription of a composer. Interest<strong>in</strong>g items may bestored <strong>in</strong> favourites for future reference.The preview cues <strong>in</strong> mSpace have <strong>the</strong> same aimas <strong>the</strong> <strong>the</strong>mes <strong>in</strong> <strong>the</strong> StorySlotMach<strong>in</strong>e: to give usersideas <strong>and</strong> h<strong>in</strong>ts as to what k<strong>in</strong>d of content isavailable relat<strong>in</strong>g to a topic.An <strong>in</strong>terest<strong>in</strong>g feature of mSpace is to let userssort <strong>and</strong> swap dimensions accord<strong>in</strong>g to <strong>the</strong>ir<strong>in</strong>terests. In <strong>the</strong> current StorySlotMach<strong>in</strong>e version,<strong>the</strong> users are tied to pre-made <strong>the</strong>mes, but one ideafor future development is to let users create new<strong>the</strong>mes with <strong>the</strong> help of <strong>the</strong> tags <strong>the</strong>y have used.Creation of different <strong>the</strong>me stories <strong>in</strong>StorySlotMach<strong>in</strong>e is based on associations that are<strong>in</strong>ferred automatically by utilis<strong>in</strong>g <strong>the</strong> knowledge <strong>in</strong><strong>the</strong> ontologies. For example, a <strong>the</strong>me story may tellabout a war that relates to a sight <strong>and</strong> story may<strong>in</strong>clude important historical persons. <strong>New</strong> <strong>the</strong>mestories are offered based on <strong>the</strong>se relations <strong>and</strong> o<strong>the</strong>r<strong>the</strong>me story may tell more about <strong>the</strong> person. Nowthis is made by <strong>the</strong> system, as our guid<strong>in</strong>g idea wasto give <strong>the</strong> users <strong>the</strong> opportunity to try <strong>the</strong>ir luck <strong>and</strong>get surprised, but as an alternative, users could begiven <strong>the</strong> opportunity to guide <strong>the</strong> process based on<strong>the</strong>ir own associations.One difference between <strong>the</strong> StorySlotMach<strong>in</strong>e<strong>and</strong> mSpace is that <strong>the</strong> StorySlotMach<strong>in</strong>e offer users<strong>the</strong> possibility to make exportable packages out of<strong>the</strong> content <strong>and</strong> also utilise <strong>the</strong>ir own content. ThemSpace user <strong>in</strong>terface is more formal <strong>in</strong> style than <strong>in</strong><strong>the</strong> StorySlotMach<strong>in</strong>e, where emphasis has been putto offer<strong>in</strong>g a user <strong>in</strong>terface with <strong>the</strong> element of play.The Bletchley Park Text application developedfor <strong>the</strong> Bletchley Park Museum (Mulholl<strong>and</strong> et al.9


2005) concentrates on post-visitors of museum.Dur<strong>in</strong>g <strong>the</strong>ir visit, people may express <strong>the</strong>ir <strong>in</strong>terestby send<strong>in</strong>g text (SMS) messages conta<strong>in</strong><strong>in</strong>gsuggested keywords relat<strong>in</strong>g to displayed objects.After <strong>the</strong> visit, <strong>the</strong>y can get a collection of contentrelat<strong>in</strong>g to <strong>the</strong> selected keywords as a personalisedweb site. The content can be explored <strong>and</strong> a numberof different views on <strong>the</strong> collection are provided.Bletchley Park Text application is made for aspecific museum <strong>and</strong> its specific content. In <strong>the</strong>StorySlotMach<strong>in</strong>e application, we have severalplaces <strong>and</strong> sights, <strong>and</strong> <strong>the</strong> material is general bynature, s<strong>in</strong>ce one of <strong>the</strong> major goals of our projectwas to study how <strong>the</strong> general media content can beutilised <strong>in</strong> new ways with <strong>the</strong> help of semanticmetadata. Both Bletchley Park Text application <strong>and</strong><strong>the</strong> StorySlotMach<strong>in</strong>e share <strong>the</strong> similar ideas ofus<strong>in</strong>g <strong>the</strong> application for learn<strong>in</strong>g, but <strong>the</strong> BletchleyPark Text does not <strong>in</strong>clude utilis<strong>in</strong>g users’ ownmaterial like we do.Bentley et al. (2006) have studied howconsumers use photos <strong>and</strong> music to tell stories. Theapplication is slightly different from ours, as <strong>the</strong>ycompare us<strong>in</strong>g only music <strong>and</strong> photos, but <strong>the</strong>re areimportant similarities <strong>and</strong> lessons to be learnt. Theyf<strong>in</strong>d that different media formats, photos <strong>and</strong> music<strong>in</strong> this case, <strong>and</strong> commercial <strong>and</strong> private contentshould not be stored <strong>in</strong> separate silos. Instead, <strong>the</strong>yshould be available with <strong>the</strong> help of similarmethods. Serendipitous f<strong>in</strong>d<strong>in</strong>g utilis<strong>in</strong>g available<strong>in</strong>formation like contextual cues should be utilisedto rem<strong>in</strong>d users of what is available <strong>and</strong> to help<strong>the</strong>m <strong>in</strong> f<strong>in</strong>d<strong>in</strong>g related resources. They also see aneed for systems that allow communication by us<strong>in</strong>gmedia.9 Discussion <strong>and</strong> future workThis chapter discusses future developmentopportunities of StorySlotMach<strong>in</strong>e <strong>and</strong> what are <strong>the</strong>benefits, opportunities <strong>and</strong> ma<strong>in</strong> challenges of <strong>the</strong>media companies <strong>in</strong> creat<strong>in</strong>g new semantic mediaservices, particularly <strong>in</strong> relation toStorySlotMach<strong>in</strong>e type applications.Easy access to electronic content <strong>and</strong> users’participation opportunities <strong>in</strong>to <strong>the</strong> media productioncycle are br<strong>in</strong>g<strong>in</strong>g about huge changes <strong>in</strong> <strong>the</strong> waythat media content is created, offered <strong>and</strong> consumed.The StorySlotMach<strong>in</strong>e explores <strong>the</strong> possibilities oflett<strong>in</strong>g people explore content <strong>in</strong> a playful <strong>and</strong> <strong>the</strong>mewise way <strong>and</strong> lett<strong>in</strong>g <strong>the</strong>m do <strong>the</strong> f<strong>in</strong>al touch <strong>in</strong>putt<strong>in</strong>g <strong>the</strong> presentation toge<strong>the</strong>r. <strong>Semantic</strong> metadata<strong>and</strong> ontologies are utilised to offer multiple views<strong>in</strong>to <strong>the</strong> available content <strong>and</strong> help <strong>the</strong> users toexplore <strong>and</strong> learn <strong>in</strong> a pleasant way of topics thatmay not be so familiar to <strong>the</strong>m. The application alsolets <strong>the</strong> users import <strong>the</strong>ir own content <strong>and</strong> mix itwith o<strong>the</strong>r people’s <strong>and</strong> commercial content.The application is most suited when <strong>the</strong> contentis available as relatively small units. The user tests<strong>in</strong>dicated that photos <strong>and</strong> videos are important <strong>in</strong>rais<strong>in</strong>g <strong>in</strong>terest, whereas particularly read<strong>in</strong>g longtexts requires more effort <strong>and</strong> is less attractive <strong>in</strong> aplayful use scenario. This implies that text should bewritten <strong>in</strong> a way that makes it quick <strong>and</strong> easy to seewhat <strong>the</strong> text deals with to arouse users' <strong>in</strong>terest. Inthis k<strong>in</strong>d of a context, <strong>the</strong> user is not look<strong>in</strong>g for aspecific answer to a specific question, but look<strong>in</strong>garound <strong>and</strong> check<strong>in</strong>g if someth<strong>in</strong>g <strong>in</strong>terest<strong>in</strong>g comesup, <strong>and</strong> <strong>the</strong> content that is presented should supportthis approach.The application makes it possible for people tomake <strong>the</strong>ir own narratives about a topic. This isrelevant at least <strong>in</strong> connection to learn<strong>in</strong>g <strong>and</strong>hobbies, like travell<strong>in</strong>g <strong>and</strong> mak<strong>in</strong>g memorabilia.The speciality here is <strong>the</strong> opportunity to comb<strong>in</strong>eself-created content with content from o<strong>the</strong>r sources.The f<strong>in</strong>al result must have an attractive <strong>and</strong>professional look <strong>in</strong> order to motivate <strong>the</strong> use. Theelectronic format also makes it possible to add livefeatures; for example, a user-made narrative may beupdated with current news <strong>and</strong> developments.It was not possible to carry out user tests to suchan extent that we would have seen how peoplewould like to use <strong>the</strong> materials <strong>and</strong> what new ideascome up. More research is also needed to see, howpurposefully prepared content users want, or do <strong>the</strong>yenjoy with a mix of material <strong>and</strong> modify<strong>in</strong>g itaccord<strong>in</strong>g to <strong>the</strong>ir own ideas.Serendipity is a concept that seems to bepopp<strong>in</strong>g up as a goal <strong>in</strong> search related application(Leong et al. 2005; Bentley et al. 2006; Lassila2006) <strong>and</strong> here <strong>Semantic</strong> <strong>Web</strong> technologies come<strong>in</strong>to play. Particularly <strong>in</strong> consumer applications easy,<strong>in</strong>tuitive <strong>and</strong> enterta<strong>in</strong><strong>in</strong>g user <strong>in</strong>terfaces <strong>and</strong>applications are needed. Also our work aims atprovid<strong>in</strong>g serendipitous f<strong>in</strong>d<strong>in</strong>g of <strong>in</strong>terest<strong>in</strong>gresources. We did not directly explore how thissensation emerges, <strong>and</strong> which factors contribute toit. One assumption is that if we know what <strong>the</strong>users’ <strong>in</strong>terests are, we’ll be able to suggestresources that he or she is <strong>in</strong>terested <strong>in</strong>, <strong>and</strong> canoffer experiences of serendipitous f<strong>in</strong>d<strong>in</strong>g.Many media companies have extensive archivesthat are not effectively utilised as end user services.The StorySlotMach<strong>in</strong>e is an example of how contentcan be offered <strong>in</strong> a more <strong>in</strong>terest<strong>in</strong>g context than asmere searches <strong>and</strong> search result lists. If <strong>the</strong> contentis not already modular <strong>and</strong> if <strong>the</strong>re is not muchmetadata about <strong>the</strong> content, an <strong>in</strong>vestment is neededto turn <strong>the</strong> content <strong>in</strong>to more usable format. Thecurrent production processes <strong>and</strong> practices should bechanged so that <strong>the</strong> content is directly processed <strong>in</strong>toa format that supports <strong>the</strong> reuse <strong>in</strong> this k<strong>in</strong>d ofapplications. The best start<strong>in</strong>g po<strong>in</strong>t for offer<strong>in</strong>g thisk<strong>in</strong>d of a new service is an area where <strong>the</strong> content isalready modular <strong>and</strong> where people may have longerterm<strong>in</strong>terest <strong>and</strong> personal material. These <strong>in</strong>cludeareas like travell<strong>in</strong>g, hobbies, encyclopaedia <strong>and</strong>news.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 10


O<strong>the</strong>r key questions that media companies needto agree on are descriptive metadata <strong>and</strong> terms forlicens<strong>in</strong>g <strong>the</strong> content for creat<strong>in</strong>g <strong>the</strong> narratives, <strong>and</strong>how strictly to guard <strong>the</strong>ir IPR. On <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>,network<strong>in</strong>g to freely available network resourcessuch as photos that are licensed under CreativeCommons licenses should be considered as a way toadd resources for users to choose.We can see at least follow<strong>in</strong>g bus<strong>in</strong>essopportunities with this type of an application:- some basic features could be free, but accessto more content could be available forpay<strong>in</strong>g customers- related materials could be available forbuy<strong>in</strong>g, such as books or maps, or additionalservices like back-up stor<strong>in</strong>g of images- co-operation with operators <strong>in</strong> <strong>the</strong>application area, for example with localtravel associations- targeted advertis<strong>in</strong>g, particularly if peoplecan be encouraged to longer term use, <strong>the</strong>n<strong>in</strong>formation about <strong>the</strong>ir <strong>in</strong>terests willaccumulate <strong>and</strong> opportunities for effectiveadvertis<strong>in</strong>g becomes better.There are several opportunities for utilis<strong>in</strong>g <strong>and</strong>develop<strong>in</strong>g <strong>the</strong> StorySlotMach<strong>in</strong>e applicationfur<strong>the</strong>r. The StorySlotMach<strong>in</strong>e application can beused as a platform to test user expectations <strong>and</strong>experiences of mix<strong>in</strong>g <strong>and</strong> play<strong>in</strong>g with mediacontent, <strong>and</strong> shar<strong>in</strong>g one’s own content with o<strong>the</strong>rusers’ content more extensively. More contentshould be added for additional test<strong>in</strong>g, <strong>and</strong> <strong>the</strong>conversion of metadata <strong>in</strong>to RDF format should bemade automatically.The application could be developed <strong>in</strong>to acommercial travel application or a learn<strong>in</strong>gapplication, e.g. for teach<strong>in</strong>g history. For <strong>the</strong> travelapplication, some additional features are needed,like exact travel <strong>in</strong>formation (open<strong>in</strong>g hours, prices),maps <strong>and</strong> mobile user <strong>in</strong>terface, <strong>and</strong> collect<strong>in</strong>gfeedback <strong>and</strong> recommendations from users. Alsonew features like collaborative storytell<strong>in</strong>g e.g.creat<strong>in</strong>g one travel story from <strong>the</strong> contents of allgroup members, <strong>and</strong> real time travel story that iscont<strong>in</strong>uously updated with topical <strong>in</strong>formation,could be added.Similar applications could be built relat<strong>in</strong>g too<strong>the</strong>r topics such as hobbies or collect<strong>in</strong>g ga<strong>the</strong>r<strong>in</strong>gpersonal memories from past. A new Targetontology may be needed for a new application, if itdoes not make sense to exp<strong>and</strong> <strong>the</strong> exist<strong>in</strong>g one. Thesearch criteria are not hidden <strong>in</strong>side <strong>the</strong> Java code,but <strong>the</strong>y can be changed by chang<strong>in</strong>g <strong>the</strong> <strong>in</strong>stancesof <strong>the</strong> ontology, which makes it easy to develop <strong>the</strong>current application fur<strong>the</strong>r, <strong>and</strong> to adapt it to newareas. Also, <strong>the</strong>mes may be created, changed ordeleted by chang<strong>in</strong>g <strong>the</strong> classes of ontology or its<strong>in</strong>stances.There is always room for improv<strong>in</strong>g <strong>the</strong> searchcriteria with help of <strong>the</strong> Presentation ontology, oreven a general tool for automatic generation of<strong>the</strong>me stories could be created. In <strong>the</strong> future,RuleML (Rule Markup Language) or SWRL(<strong>Semantic</strong> web rule language) may be <strong>the</strong> solution touse.At <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g of <strong>the</strong> application development,we considered us<strong>in</strong>g <strong>the</strong> CIDOC CRM culturalheritage ontology that is be<strong>in</strong>g developed speciallyfor describ<strong>in</strong>g <strong>the</strong> cultural heritage of museumcollections. We decided not to, because <strong>the</strong> ontologyseemed too specific <strong>and</strong> complicated for ourpurposes. CIDOC CRM is currently <strong>in</strong> <strong>the</strong> f<strong>in</strong>alstage of <strong>the</strong> ISO process as ISO/PRF 21127, <strong>and</strong> itcould be reconsidered as an option <strong>in</strong> a travelrelatedapplication like StorySlotMach<strong>in</strong>e todescribe cultural heritage. The challenge is to decidewhich level of <strong>the</strong> ontology to <strong>in</strong>clude <strong>and</strong> what toexclude as too detailed. Additional benefits could bega<strong>in</strong>ed if content or <strong>in</strong>formation can be <strong>in</strong>tegratedfrom various museums with <strong>the</strong> help of a commonontology.Automatic methods for creat<strong>in</strong>g metadata <strong>and</strong>convert<strong>in</strong>g it <strong>in</strong>to RDF format were not addressed <strong>in</strong>this project, but <strong>the</strong>y are important particularly whenexist<strong>in</strong>g media archives are utilised <strong>in</strong> semanticapplications. Once <strong>the</strong> number of concepts <strong>in</strong> ourYSA ontology has been <strong>in</strong>creased, or <strong>the</strong> nationalYSO becomes available, utilis<strong>in</strong>g automaticmethods will be easier. Additionally, users should beutilised as metadata creators, where feasible.One of <strong>the</strong> future needs is to <strong>in</strong>crease <strong>the</strong> amountof available content. In our application, <strong>the</strong> contentresources were moved to our server, but <strong>in</strong> acommercial application, content from differentsources should probably be utilised. This requiresthat <strong>the</strong>re is an agreement on what metadata to use<strong>and</strong> <strong>the</strong> content should have this metadata.There are many opportunities to develop <strong>the</strong>searches <strong>and</strong> <strong>the</strong> ways that search results are orderedfor presentation. Scene <strong>and</strong> genre <strong>in</strong>formation couldbe used for order<strong>in</strong>g images. Images from outside<strong>and</strong> <strong>in</strong>side a build<strong>in</strong>g, <strong>and</strong> general images <strong>and</strong>detailed close-ups could be alternated. <strong>New</strong> waysgroup<strong>in</strong>g media objects could be developed <strong>in</strong>addition to <strong>the</strong> current location-based presentation.User generated metadata could be utilised moreextensively. The words that people use to describe<strong>the</strong>ir content could be stored <strong>in</strong> case <strong>the</strong>y are notfound <strong>in</strong> <strong>the</strong> ontologies, <strong>and</strong> <strong>the</strong>y could be offered tofuture users visit<strong>in</strong>g <strong>the</strong> same sight. In <strong>the</strong> currentsystem, users can add tags only to describe <strong>the</strong>ircontent, but tags could be utilised more widely, forexample, to describe media content, travel plans,<strong>and</strong> sights. If we had mechanisms to comb<strong>in</strong>e tagswith more formal semantics <strong>and</strong> to analyse <strong>the</strong>reliability of user generated knowledge, this couldbe one way of add<strong>in</strong>g knowledge <strong>in</strong>to <strong>the</strong>ontologies.11


To summarise, we can conclude that <strong>the</strong>application lets users explore <strong>and</strong> comb<strong>in</strong>e varioustypes of media content, as well as virtual <strong>and</strong> reallife experiences. Utilis<strong>in</strong>g ontologies helps <strong>in</strong>mak<strong>in</strong>g <strong>the</strong> application more <strong>in</strong>telligent <strong>and</strong> givesopportunities to offer<strong>in</strong>g enjoyable user experiences.AcknowledgementsThe StorySlotMach<strong>in</strong>e was developed <strong>in</strong> <strong>the</strong> project“Rich <strong>Semantic</strong> Media for Private <strong>and</strong> ProfessionalUsers” (RISE). The two-year project was part of atechnology programme “Interactive Comput<strong>in</strong>gTechnology Programme” (FENIX) run by <strong>the</strong>F<strong>in</strong>nish Fund<strong>in</strong>g Agency for Technology <strong>and</strong>Innovation (Tekes).Besides <strong>the</strong> ma<strong>in</strong> f<strong>in</strong>ancier, Tekes <strong>and</strong> VTT, fourcompanies supported <strong>the</strong> project f<strong>in</strong>ancially <strong>and</strong> bygiv<strong>in</strong>g expertise <strong>and</strong> tools for <strong>the</strong> project, <strong>and</strong> <strong>the</strong>ywere represented <strong>in</strong> <strong>the</strong> project management group.The project steer<strong>in</strong>g group consisted of <strong>the</strong>follow<strong>in</strong>g persons: Eskoensio Pipatti(SanomaWSOY Oyj) <strong>and</strong> Tuomo Suom<strong>in</strong>en (WernerSöderström Osakeyhtiö), Hannele Vihermaa (firsthalf of <strong>the</strong> project) <strong>and</strong> Teppo Kurki (<strong>the</strong> second halfof <strong>the</strong> project) (Alma Media Oyj), Jouni Siren (Yle),Janne Saarela (Profium Oy), Keith Bonnici (Tekes),Caj Södergård (VTT) <strong>and</strong> Marko Turpe<strong>in</strong>en (HIIT).The project group members want to thank <strong>the</strong>steer<strong>in</strong>g group for <strong>the</strong>ir good support <strong>and</strong> feedback.We want to express our special thanks to <strong>the</strong> HämeOx Road project <strong>and</strong> project manager MattiKorola<strong>in</strong>en for <strong>the</strong>ir co-operation <strong>in</strong> <strong>the</strong> project - <strong>the</strong>materials <strong>and</strong> user contacts provided by <strong>the</strong>mcontributed to <strong>the</strong> successful completion of <strong>the</strong>project.web. Proceed<strong>in</strong>gs of <strong>Semantic</strong> Author<strong>in</strong>g,Annotation <strong>and</strong> Knowledge Markup Workshop<strong>in</strong> <strong>the</strong> 15th European Conference on <strong>Artificial</strong><strong>Intelligence</strong>. Lyon, France.Lassila, O. 2006. Shar<strong>in</strong>g Mean<strong>in</strong>g BetweenSystems, Devices, Users <strong>and</strong> Culture.Symposium on Digital <strong>Semantic</strong> Contentacross Cultures. Paris, The Louvre. May 2–5,2006.http://www.seco.tkk.fi/events/2006/2006-05-04-websemantique/presentations/friday-0900-Lassila-Ora-DSCaC.pdf.Leong, T., Vetere, F., Howard, S. 2005. TheSerendipity Shuffle. Proceed<strong>in</strong>gs of OZCHI,Canberra, Australia. November 23–25, 2005.ISBN 1-59593-222-4. 4 p.Mulholl<strong>and</strong>, P., Coll<strong>in</strong>s, T., Zdrahal, Z. 2005.Bletchley Park Text: Us<strong>in</strong>g mobile <strong>and</strong>semantic web technologies to support <strong>the</strong> postvisituse of onl<strong>in</strong>e museum resources.http://jime.open.ac.uk/2005/24/mulholl<strong>and</strong>-2005-24-paper.html.Näkki, P. 2006. Käyttäjäkokemuksen suunnittelusemanttiseen mediapalveluun – tarkastelussakouluretkien tar<strong>in</strong>at (<strong>in</strong> F<strong>in</strong>nish). Master’s<strong>the</strong>sis. Espoo: Hels<strong>in</strong>ki University ofTechnology.ReferencesBentley, F., Metcalf, C., Harboe, G. 2006. Personalvs. Commercial Content: The Similaritiesbetween Consumer Use of Photos <strong>and</strong> Music.In: CHI 2006. Montreal, Canada. April 22–27,2006. ACM. Pp. 667–676. ISBN 1-59593-178-3/06/0004.Geurts, J., Bocconi S., van Ossenbruggen, J.,Hardman, L. 2003. Towards Ontology-drivenDiscourse: From <strong>Semantic</strong> Graphs toMultimedia Presentations.http://homepages.cwi.nl/~media/publications/iswc2003.pdf.Kim, S., Harith, A., Hall, W., Lewis, P., Millard, D.,Shadbolt, N., Weal, M. 2002. Artequakt(2002): Generat<strong>in</strong>g tailored biographies withautomatically annotated fragments from <strong>the</strong><strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 12


Describ<strong>in</strong>g <strong>and</strong> L<strong>in</strong>k<strong>in</strong>g Cultural <strong>Semantic</strong> Content by Us<strong>in</strong>gSituations <strong>and</strong> ActionsMiikka Junnila⋆ <strong>Semantic</strong> Comput<strong>in</strong>g Research GroupHels<strong>in</strong>ki Institute for Information Technology (HIIT)University of Hels<strong>in</strong>kihttp://www.seco.tkk.fimiikka.junnila@uiah.fiMirva Salm<strong>in</strong>en‡ <strong>Semantic</strong> Comput<strong>in</strong>g Research GroupHels<strong>in</strong>ki Institute for Information Technology (HIIT)University of Hels<strong>in</strong>kihttp://www.seco.tkk.fi/mirva@pieni.netAbstractEero Hyvönen† <strong>Semantic</strong> Comput<strong>in</strong>g Research GroupHels<strong>in</strong>ki University of Technology (TKK)University of Hels<strong>in</strong>kihttp://www.seco.tkk.fi/eero.hyvonen@tkk.fiOntologies have been used to describe cultural objects, such as artifacts, by <strong>the</strong>ir physical or mediaspecific properties, or by <strong>the</strong> life cycle of <strong>the</strong> objects <strong>in</strong> collections. In contrast, this paper discusses <strong>the</strong>problem of creat<strong>in</strong>g ontological descriptions that allow describ<strong>in</strong>g different k<strong>in</strong>ds of cultural contentthrough <strong>the</strong> situations <strong>and</strong> actions that take place <strong>in</strong> <strong>the</strong> real world. This po<strong>in</strong>t of view is importantwhen semantic metadata is used as a basis for creat<strong>in</strong>g <strong>in</strong>telligent, educational, <strong>and</strong> enterta<strong>in</strong><strong>in</strong>g l<strong>in</strong>k<strong>in</strong>gof content on <strong>the</strong> semantic web. The idea is addressed not only <strong>in</strong> <strong>the</strong>ory but by present<strong>in</strong>g <strong>the</strong> firstprototype implementation of a cross-doma<strong>in</strong> semantic portal “CultureSampo—F<strong>in</strong>nish Culture on <strong>the</strong><strong>Semantic</strong> <strong>Web</strong>”. This system is able to automatically l<strong>in</strong>k toge<strong>the</strong>r different k<strong>in</strong>d of cultural resources<strong>in</strong> mean<strong>in</strong>gful ways with explanations. The content types considered <strong>in</strong>clude pa<strong>in</strong>t<strong>in</strong>gs, artifacts, photographs,videos, cultural processes, <strong>and</strong> stories .1 IntroductionThis paper <strong>in</strong>vestigates possibilities of exploit<strong>in</strong>g semanticcultural metadata <strong>in</strong> creat<strong>in</strong>g <strong>in</strong>telligent portals.The research is a cont<strong>in</strong>uation of <strong>the</strong> work beh<strong>in</strong>d<strong>the</strong> semantic portal MuseumF<strong>in</strong>l<strong>and</strong> 1 (Hyvönenet al., 2005a). This work showed that, based onontologies <strong>and</strong> associated metadata, semantic search<strong>and</strong> brows<strong>in</strong>g can be supported to enhance end-userservices. The content <strong>in</strong> MuseumF<strong>in</strong>l<strong>and</strong> was homogenous<strong>in</strong> <strong>the</strong> sense that only artifact metadataconform<strong>in</strong>g to a shared metadata schema <strong>and</strong> ontologieswas used. In this paper <strong>the</strong> ma<strong>in</strong> research problemis to create an ontology that can be used to describemany k<strong>in</strong>ds of cultural resources, so that <strong>the</strong>ycan still be searched with a unified logic <strong>and</strong> be l<strong>in</strong>kedtoge<strong>the</strong>r semantically <strong>in</strong> <strong>in</strong>sightful ways.We chose processes <strong>and</strong> actions (events) to be <strong>the</strong>basis of our ontology. In <strong>the</strong> context of cultural re-1 This application is operational at http://www.museosuomi.fiwith an English tutorial.sources, this proved out to be a fruitful start<strong>in</strong>g po<strong>in</strong>t.Many cultural objects of <strong>in</strong>terest, such as pa<strong>in</strong>t<strong>in</strong>gs,stories, <strong>and</strong> artifacts have a connection to <strong>the</strong> processesof human life <strong>and</strong> <strong>the</strong> actions of people.To get a concrete grip of <strong>the</strong> problems <strong>in</strong>volved,we created <strong>the</strong> first prototype I of <strong>the</strong> portal“CultureSampo—F<strong>in</strong>nish Culture on <strong>the</strong> <strong>Semantic</strong><strong>Web</strong>” system <strong>in</strong> 2005. This paper documents <strong>and</strong>summarizes experiences <strong>and</strong> lessons learned <strong>in</strong> thiswork documented <strong>in</strong> more detail <strong>in</strong> (Junnila, 2006;Salm<strong>in</strong>en, 2006). The vision <strong>and</strong> some o<strong>the</strong>r resultsof <strong>the</strong> CultureSampo project <strong>in</strong> <strong>the</strong> larger perspective2005-2007, <strong>in</strong>clud<strong>in</strong>g a later prototype CultureSampoII, is described <strong>in</strong> (Hyvönen et al., 2006). “Sampo”is a mach<strong>in</strong>e that fulfills all <strong>the</strong> needs of people <strong>in</strong><strong>the</strong> F<strong>in</strong>nish mythology. We try to fulfill <strong>the</strong> needs ofpeople <strong>in</strong>terested <strong>in</strong> gett<strong>in</strong>g a good picture of F<strong>in</strong>nishculture through <strong>the</strong> semantic web.The CultureSampo I prototype was built on top of<strong>the</strong> MuseumF<strong>in</strong>l<strong>and</strong> architecture <strong>and</strong> tools (Mäkeläet al., 2004; Viljanen et al., 2006; Mäkelä et al.,13


2006). The system is based on metadata of differentk<strong>in</strong>d of cultural objects, such as process descriptions,mythic poems, pa<strong>in</strong>t<strong>in</strong>gs, old photos, artifacts,<strong>and</strong> educational videos about F<strong>in</strong>nish culture. Theseresources have been described with match<strong>in</strong>g metadataschemas <strong>and</strong> shared ontologies, which enablessemantic search <strong>and</strong> brows<strong>in</strong>g. We <strong>in</strong>troduced a newtype of metadata for describ<strong>in</strong>g actions <strong>and</strong> situationsthat relate cultural objects with each o<strong>the</strong>r. The ma<strong>in</strong>goal of this paper is to <strong>in</strong>vestigate, how such descriptionscan be used to br<strong>in</strong>g <strong>the</strong> cultural context closerto <strong>the</strong> people look<strong>in</strong>g for <strong>in</strong>formation <strong>in</strong> cultural semanticportals.2 Describ<strong>in</strong>g <strong>the</strong> Cultural Contextof ResourcesThe motivation for describ<strong>in</strong>g cultural resources semanticallyis to make it easier to search for <strong>and</strong> automaticallyl<strong>in</strong>k culturally related th<strong>in</strong>gs toge<strong>the</strong>r. Themore <strong>in</strong>formation <strong>the</strong>re is on <strong>the</strong> semantic web, <strong>the</strong>more <strong>in</strong>terest<strong>in</strong>g <strong>and</strong> useful it can be to people. A prerequisiteof this is that <strong>the</strong> <strong>in</strong>formation is easy to f<strong>in</strong>d,<strong>and</strong> that <strong>the</strong> cross-l<strong>in</strong>ks from resource to resource arereally semantically <strong>in</strong>sightful <strong>and</strong> support <strong>the</strong> user <strong>in</strong>f<strong>in</strong>d<strong>in</strong>g <strong>the</strong> right <strong>in</strong>formation <strong>and</strong> connections.2.1 Towards Event-based Content DescriptionsInformation that connects to o<strong>the</strong>r <strong>in</strong>formation is easierto grasp, as for example constructivist learn<strong>in</strong>g<strong>the</strong>ories show (Holmes et al., 2001). In fact, manyphilosophers from Aristotle to Locke <strong>and</strong> Hume havestated that all knowledge is actually <strong>in</strong> <strong>the</strong> form of associations(Eysenc <strong>and</strong> Keane, 2002). All this leadsus to observe <strong>the</strong> fact that l<strong>in</strong>ks can be very useful fora person look<strong>in</strong>g for <strong>in</strong>formation about a particularsubject.In our work, actions <strong>and</strong> processes <strong>in</strong> <strong>the</strong> real life<strong>and</strong> fiction were chosen as <strong>the</strong> key enabler for connect<strong>in</strong>gdifferent resources semantically. There weretwo major reasons for this. Firstly, actions <strong>and</strong> processesconnect to many k<strong>in</strong>ds of different resources.Human culture is much about action, about peopledo<strong>in</strong>g th<strong>in</strong>gs. People look<strong>in</strong>g for <strong>in</strong>formation are alsolikely to be <strong>in</strong>terested <strong>in</strong> <strong>the</strong> <strong>the</strong>me of action. Actions<strong>and</strong> processes often tell us more about <strong>the</strong> life aroundcultural objects than o<strong>the</strong>r po<strong>in</strong>ts of view. Life, stories,<strong>and</strong> emotions are th<strong>in</strong>gs that everyone can easilyconnect to <strong>and</strong> are <strong>in</strong>terest<strong>in</strong>g for <strong>the</strong> end-user. Peoplewith vary<strong>in</strong>g specific needs are surely <strong>in</strong>terested<strong>in</strong> o<strong>the</strong>r po<strong>in</strong>ts of view, too, but generally speak<strong>in</strong>gactions are foundational <strong>in</strong> structur<strong>in</strong>g our knowledgeabout <strong>the</strong> world. As a result, event-based representationhave been widely developed <strong>and</strong> applied <strong>in</strong> <strong>the</strong>fields of artificial <strong>in</strong>telligence <strong>and</strong> knowledge representation(Sowa, 2000). CultureSampo builds uponthis research tradition <strong>and</strong> ideas developed with<strong>in</strong> semanticweb research.The second reason for us<strong>in</strong>g actions <strong>and</strong> processesis that <strong>the</strong> <strong>in</strong>formation about processes <strong>the</strong>mselves isvery important to preserve. For example, <strong>in</strong>formationabout cultural processes, such as “how to farml<strong>and</strong> with <strong>the</strong> traditional slash burn method procedure”,are important to preserve. By l<strong>in</strong>k<strong>in</strong>g o<strong>the</strong>r resourcesthrough action, <strong>the</strong> processes <strong>the</strong>mselves areresearched <strong>and</strong> <strong>the</strong> old know-how preserved <strong>in</strong> digitalformat for future generations (Kettula, 2005).Let us take an example of cultural resources <strong>and</strong><strong>the</strong>ir connection to each o<strong>the</strong>r through <strong>the</strong>ir culturalcontext <strong>and</strong> actions. Consider a pa<strong>in</strong>t<strong>in</strong>g depict<strong>in</strong>gpeople <strong>and</strong> burn<strong>in</strong>g trees. We know that <strong>the</strong> pictureis a part of an old cultural process, slash <strong>and</strong> burn,where trees are cut down <strong>and</strong> burned to make <strong>the</strong>soil richer for nutrition of <strong>the</strong> crop. There is also apoem <strong>in</strong> <strong>the</strong> national Kalevala epic 2 , where Kullervo,a tragic hero, is forced to cut down trees <strong>in</strong> <strong>the</strong> slash<strong>and</strong> burn process, but he ends up with curs<strong>in</strong>g <strong>the</strong>whole forest. An axe displayed <strong>in</strong> <strong>the</strong> National Museumof F<strong>in</strong>l<strong>and</strong> has been used <strong>in</strong> western F<strong>in</strong>l<strong>and</strong> forslash <strong>and</strong> burn, <strong>and</strong> <strong>the</strong>re may be o<strong>the</strong>r related tools,too. We also have some photos of people do<strong>in</strong>g slash<strong>and</strong> burn, <strong>and</strong> an educational video about <strong>the</strong> subject.All <strong>the</strong>se th<strong>in</strong>gs can be l<strong>in</strong>ked toge<strong>the</strong>r <strong>in</strong> <strong>in</strong>sightfulways, if <strong>the</strong>y have been annotated with metadata thattells about what is happen<strong>in</strong>g dur<strong>in</strong>g <strong>the</strong> slash <strong>and</strong>burn procedure.To accomplish <strong>the</strong> needed semantic annotations,we def<strong>in</strong>ed a set of doma<strong>in</strong> <strong>and</strong> annotation ontologies.We <strong>the</strong>n selected a representative set of heterogenouscultural contents of different k<strong>in</strong>ds <strong>and</strong> annotated<strong>the</strong>m with metadata conform<strong>in</strong>g to <strong>the</strong> designedontologies <strong>and</strong> annotation schemas. The resultwas a knowledge base <strong>in</strong> RDF(S) 3 , that was homogenizedbased on <strong>the</strong> shared action-based knowledgerepresentation scheme of <strong>the</strong> real world. Afterthis, <strong>the</strong> view-based semantic search eng<strong>in</strong>e <strong>and</strong> logicalrecommender system of MUSEUMFINLAND wasadapted <strong>and</strong> applied to <strong>the</strong> new content set, result<strong>in</strong>g<strong>in</strong> <strong>the</strong> prototype portal CultureSampo I.2 http://www.f<strong>in</strong>lit.fi/kalevala/<strong>in</strong>dex.php?m=163&l=23 http://www.w3.org/2001/sw/<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 14


2.2 Stories as ProcessesIn addition to describ<strong>in</strong>g general process types, wewanted to be able to describe specific process <strong>in</strong>stances,i.e., situations where someth<strong>in</strong>g actually happens.This leads us to a very classic content medium<strong>and</strong> type: stories. As processes are cha<strong>in</strong>s of actions,where someth<strong>in</strong>g is done, lead<strong>in</strong>g to ano<strong>the</strong>r action,<strong>and</strong> so on, stories are <strong>the</strong> same <strong>in</strong> many ways. Storiescan br<strong>in</strong>g separate facts <strong>in</strong>to life <strong>and</strong> place <strong>in</strong> <strong>the</strong> rightcontexts for <strong>the</strong> end-user, <strong>and</strong> <strong>in</strong> this way give a betterview to <strong>the</strong> culture that <strong>the</strong> resources are describ<strong>in</strong>g.Fur<strong>the</strong>rmore, many cultural content objects, such ashistorical events <strong>and</strong> biographies, are actually stories<strong>and</strong> often relate to o<strong>the</strong>r stories.People want to hear stories (Kelly, 1999): <strong>the</strong>y arean ancient method of spend<strong>in</strong>g time, educat<strong>in</strong>g <strong>and</strong>hav<strong>in</strong>g fun. Stories br<strong>in</strong>g new po<strong>in</strong>ts of view to <strong>the</strong>process descriptions, which are on a general level. AsAristotle states <strong>in</strong> Poetics (Aristotle, 2006), drama isabout action. This suggests that describ<strong>in</strong>g actions isa good way to describe drama. A process descriptionjust needs less <strong>in</strong>formation, as it is less precise. Fora process description, it may be enough to tell whatis done <strong>and</strong> <strong>in</strong> what order. A story needs additional<strong>in</strong>formation. For example, it may be important toknow who does what, what are <strong>the</strong> relations between<strong>the</strong> actors, <strong>and</strong> what goes possibly wrong. Based onthis, stories can be seen as a k<strong>in</strong>d of subclass of processes,that need more <strong>in</strong>formation <strong>and</strong> give a richer<strong>and</strong> more specific description of a situation or happen<strong>in</strong>g.Our ma<strong>in</strong> motivation to describe stories with metadatais not to represent <strong>the</strong> stories, but only to make<strong>the</strong> actual stories better accessible through bettersearch <strong>and</strong> l<strong>in</strong>ks from related resources. A story maybe <strong>in</strong> textual form or maybe depicted <strong>in</strong> a pa<strong>in</strong>t<strong>in</strong>g,a photo or a video. The stories lose much <strong>in</strong> contentwhen <strong>the</strong>y are reduced to metadata, but s<strong>in</strong>ce <strong>the</strong> storyresources <strong>the</strong>mselves can be put on <strong>the</strong> semantic web,people search<strong>in</strong>g for stories will f<strong>in</strong>d <strong>and</strong> experience<strong>the</strong> real stories.3 The OntologiesThree ontologies were used to create <strong>the</strong> action-basedmetadata for <strong>the</strong> resources. First, a situation ontologywas created <strong>in</strong> order to def<strong>in</strong>e how to describe one situationor moment, <strong>the</strong> smallest unit of a process or astory. Second, a process ontology was designed. Itwas used to put <strong>the</strong> moments <strong>in</strong> <strong>the</strong> right order <strong>in</strong> relationto each o<strong>the</strong>r: what is done first, what follows<strong>and</strong> so on. The third ontology was <strong>the</strong> content def<strong>in</strong>itionontology, that <strong>in</strong>cluded <strong>the</strong> concepts of <strong>the</strong> realworld, so that reason<strong>in</strong>g could be made also based on<strong>the</strong> th<strong>in</strong>gs that appear <strong>in</strong> <strong>the</strong> situations. For example,an axe is used <strong>in</strong> <strong>the</strong> slash <strong>and</strong> burn method, so <strong>the</strong>axe has its own place <strong>in</strong> <strong>the</strong> content def<strong>in</strong>ition ontology,as a subclass of tools. Also <strong>the</strong> actions, <strong>the</strong> verbs,<strong>and</strong> <strong>the</strong>ir relations to each o<strong>the</strong>r are an important partof <strong>the</strong> content def<strong>in</strong>ition ontology.In <strong>the</strong> follow<strong>in</strong>g, <strong>the</strong>se three ontologies will nextbe discussed <strong>in</strong> some more detail. We concentrate on<strong>the</strong> situation ontology that was <strong>the</strong> ma<strong>in</strong> focus of <strong>the</strong>research.3.1 The Situation OntologyThe situation ontology (cf. figure 1) is used to describemoments, where someone does someth<strong>in</strong>g. Itis actually not much of an ontology <strong>in</strong> <strong>the</strong> senseof a hierarchical network, but more of a metadataschema implemented with semantic web technology.The idea is to use <strong>in</strong>stantiated situations for semanticbrows<strong>in</strong>g <strong>and</strong> search.A situation, as def<strong>in</strong>ed <strong>in</strong> <strong>the</strong> situation ontology,is <strong>the</strong> moment start<strong>in</strong>g with someone start<strong>in</strong>g do<strong>in</strong>gsometh<strong>in</strong>g, <strong>and</strong> it ends when <strong>the</strong> action ends, <strong>and</strong>ano<strong>the</strong>r beg<strong>in</strong>s, or <strong>the</strong>re is a jump <strong>in</strong> time or space.These situations can be anywhere: <strong>in</strong> a process, astory, a pa<strong>in</strong>t<strong>in</strong>g, a video or <strong>in</strong> anyth<strong>in</strong>g else that representsa situation. There is an actor who does anaction. In <strong>the</strong> same situation, <strong>the</strong> actor can have o<strong>the</strong>ractions go<strong>in</strong>g on too, <strong>and</strong> <strong>the</strong>re can be o<strong>the</strong>r actorspresent, do<strong>in</strong>g <strong>the</strong>ir actions. Apart from <strong>the</strong> actor <strong>and</strong><strong>the</strong> action (that toge<strong>the</strong>r form an event) <strong>the</strong>re is also<strong>the</strong> surround<strong>in</strong>gs, which consists of absolute <strong>and</strong> relativetime <strong>and</strong> place, <strong>and</strong> possibly o<strong>the</strong>r elements of<strong>the</strong> situation. Also <strong>the</strong> mood <strong>and</strong> <strong>the</strong>me of <strong>the</strong> situationcan be annotated.When us<strong>in</strong>g <strong>the</strong> situation ontology, <strong>the</strong> philosophyis to leave <strong>the</strong> properties open if <strong>the</strong>y don’t existor one doesn’t know <strong>the</strong>m. The ontology is meantmostly to be used for creat<strong>in</strong>g l<strong>in</strong>ks <strong>and</strong> for help<strong>in</strong>g <strong>in</strong>search.Culture, for example art, is often much about <strong>in</strong>terpretations(Holly, 1984). This means that whenbr<strong>in</strong>g<strong>in</strong>g culture resources available to people on <strong>the</strong>semantic web, <strong>in</strong>terpretations cannot be left out of <strong>the</strong>system. For example, consider <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g “Kullervodeparts for <strong>the</strong> war” <strong>in</strong> figure 2 depict<strong>in</strong>g an event<strong>in</strong> Kalevala. In this case <strong>the</strong> <strong>in</strong>terpretation that <strong>the</strong>pa<strong>in</strong>t<strong>in</strong>g is <strong>in</strong> particular about Kullervo (<strong>and</strong> not aboutsome unknown man) depart<strong>in</strong>g for <strong>the</strong> war <strong>in</strong> Kalevala<strong>in</strong> order to take revenge on his enemies is of importance.Therefore we have made it possible to dis-15


Figure 1: The situation ontologyFigure 2: Kullervo departs for <strong>the</strong> war. A pa<strong>in</strong>t<strong>in</strong>g at <strong>the</strong> F<strong>in</strong>nish National Gallery. On <strong>the</strong> right, <strong>the</strong> orig<strong>in</strong>al keywordsdescrib<strong>in</strong>g <strong>the</strong> content are given as <strong>the</strong> value of <strong>the</strong> CIDOC CRM (Doerr, 2003) property P129F is about:Kalevala, event, Kullervo, birch bark horn, sword, ornament, animal, horse, dog, l<strong>and</strong>scape, w<strong>in</strong>ter, sky, stars,snow.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 16


t<strong>in</strong>guish between factual <strong>in</strong>formation <strong>and</strong> <strong>in</strong>terpretations<strong>in</strong> <strong>the</strong> annotations. Interpretations can be shown<strong>in</strong> a different way <strong>in</strong> <strong>the</strong> user <strong>in</strong>terface or even left out,if <strong>the</strong> person look<strong>in</strong>g for <strong>in</strong>formation wants to avoid<strong>in</strong>terpretations.3.1.1 Describ<strong>in</strong>g ActionIn one situation, <strong>the</strong>re can be many events. An eventrefers to one whole, that consists of an actor, anaction,anobject of action <strong>and</strong> an <strong>in</strong>strument. The actor,action <strong>and</strong> <strong>in</strong>strument are quite straightforward <strong>in</strong><strong>the</strong>ir semantics, but <strong>the</strong> object of action can vary depend<strong>in</strong>gon <strong>the</strong> situation. The object can vary frombe<strong>in</strong>g an object (e.g., hitt<strong>in</strong>g a ball), or a predicate(e.g., try to get up) to be<strong>in</strong>g an adverbial (e.g., sit on acouch). Because of this, <strong>the</strong> object of action is somewhatsemantically ambiguous <strong>and</strong> cannot be used soeasily for mach<strong>in</strong>e reason<strong>in</strong>g. However, when peopleuse <strong>the</strong> system, <strong>the</strong> natural mean<strong>in</strong>g of <strong>the</strong> relationscan usually be understood easily by <strong>the</strong> user.The action can also have an objective. The objectiveis an important part of <strong>the</strong> event, as what a persondoes may tell much less about what he is actuallydo<strong>in</strong>g than know<strong>in</strong>g <strong>the</strong> objective. In a generic processdescription, <strong>the</strong> objective isn’t used, as <strong>the</strong>re itis taken for granted that do<strong>in</strong>g one part of <strong>the</strong> processalways has <strong>the</strong> objective of gett<strong>in</strong>g to <strong>the</strong> nextpart of <strong>the</strong> process. But when we look at stories,<strong>the</strong> objective becomes important. If we have a pa<strong>in</strong>t<strong>in</strong>gwhere a man is rid<strong>in</strong>g a horse, it is important toknow that he is not only rid<strong>in</strong>g, but actually his objectiveis to depart for <strong>the</strong> war. We may know thisobjective from <strong>the</strong> name of <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g, like <strong>in</strong> <strong>the</strong>case of <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g “Kullervo departs for <strong>the</strong> war”.When <strong>the</strong> objective has been annotated, this pa<strong>in</strong>t<strong>in</strong>gis found also when look<strong>in</strong>g for <strong>in</strong>formation about war,not only about horses <strong>and</strong> rid<strong>in</strong>g.The question about <strong>in</strong>terpretation is quite apparent<strong>in</strong> <strong>the</strong> case of <strong>the</strong> objective. If <strong>the</strong> pa<strong>in</strong>ter of “Kullervodeparts for <strong>the</strong> war” would have given <strong>the</strong> name asan ironic joke for example, it would already requiresome knowledge about this to not make <strong>the</strong> wrongannotation. The same is true if <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g wouldnot have a name at all, but still <strong>the</strong> objective is obviousby look<strong>in</strong>g at <strong>the</strong> picture: <strong>the</strong>re is a man with asword on his side, he’s blow<strong>in</strong>g a big horn, etc. Especiallywhen describ<strong>in</strong>g pictures much of metadata isbased on <strong>the</strong> <strong>in</strong>terpretations of <strong>the</strong> annotator. In textualstories, <strong>the</strong> objectives can actually be expla<strong>in</strong>ed<strong>in</strong> <strong>the</strong> text.Objectives can also exist on many levels. When weread <strong>the</strong> story about Kullervo <strong>in</strong> Kalevala we can seethat <strong>the</strong> objective of him to go to <strong>the</strong> war is actually totake revenge on <strong>the</strong> people who killed his family. Sohe is rid<strong>in</strong>g to get to war to get revenge. That’s threelevels already, <strong>and</strong> more can sometimes be found.3.1.2 Describ<strong>in</strong>g <strong>the</strong> Surround<strong>in</strong>gsEven though our ma<strong>in</strong> focus <strong>in</strong> this research is on <strong>the</strong>action <strong>and</strong> <strong>the</strong> processes, sometimes <strong>the</strong> surround<strong>in</strong>gsof <strong>the</strong> situation are also <strong>in</strong>terest<strong>in</strong>g. They should notbe left out of <strong>the</strong> metadata description of <strong>the</strong> situation.In <strong>the</strong> situation ontology, <strong>the</strong> surround<strong>in</strong>gs of<strong>the</strong> situation are described by <strong>the</strong> time <strong>and</strong> <strong>the</strong> placeof <strong>the</strong> situation (cf. figure 1). It may be important toknow, where <strong>and</strong> when someth<strong>in</strong>g happens. This canbe relevant to generic process descriptions as well asto story situations.Time <strong>and</strong> place can be modeled both on <strong>the</strong> level ofabsolute facts <strong>and</strong> from <strong>the</strong> relative po<strong>in</strong>t of view. Forexample, a situation described <strong>in</strong> a news article mayhave <strong>the</strong> absolute time (date) September 11th 2001,<strong>and</strong> <strong>the</strong> absolute place (location) <strong>New</strong> York. However,<strong>in</strong> many k<strong>in</strong>ds of resources <strong>the</strong> absolute time<strong>and</strong> place are not known. For example, generic processdescriptions have no absolute time or place, <strong>and</strong>many stories lack <strong>the</strong>se facts, too. Thus <strong>the</strong> relativetime <strong>and</strong> space are important. Relative time describes<strong>the</strong> time of year <strong>and</strong> time of day of <strong>the</strong> situation, <strong>and</strong>relative place (space) describes <strong>the</strong> surround<strong>in</strong>gs on amore general level. The relative time <strong>and</strong> space of <strong>the</strong>example above could be “<strong>in</strong> autumn”, “<strong>in</strong> daytime”,<strong>and</strong> “<strong>in</strong> a city”. When describ<strong>in</strong>g <strong>the</strong> slash <strong>and</strong> burnprocedure, one could say that <strong>the</strong> “cutt<strong>in</strong>g down <strong>the</strong>trees” -situation happens <strong>in</strong> spr<strong>in</strong>g time <strong>in</strong> a forest.The duration of <strong>the</strong> situation can also be modeled bycreat<strong>in</strong>g an <strong>in</strong>stance of <strong>the</strong> class Time.3.2 More FeaturesApart from model<strong>in</strong>g events <strong>in</strong> time <strong>and</strong> space, <strong>the</strong>situation ontology allows <strong>the</strong> annotation of a <strong>the</strong>me,a mood <strong>and</strong> o<strong>the</strong>r elements. The <strong>the</strong>me <strong>and</strong> <strong>the</strong> moodare properties that have to do with all <strong>the</strong> non-genericsituations, like parts of a story or a pa<strong>in</strong>t<strong>in</strong>g. The<strong>the</strong>me reflects <strong>the</strong> mean<strong>in</strong>g of <strong>the</strong> situation from an<strong>in</strong>tellectual po<strong>in</strong>t of view, whereas <strong>the</strong> mood reflects<strong>the</strong> emotional mood of <strong>the</strong> situation. The elementsmean any objects or th<strong>in</strong>gs of <strong>in</strong>terest <strong>in</strong> <strong>the</strong> situation,that are not directly <strong>in</strong>volved <strong>in</strong> <strong>the</strong> events, but are stillsomehow important to mention. These properties addto <strong>the</strong> flexibility of <strong>the</strong> model, even though <strong>the</strong>y don’thave to be used, <strong>and</strong> especially <strong>the</strong> two former needlots of <strong>in</strong>terpretation from <strong>the</strong> annotator.To fur<strong>the</strong>r deepen <strong>the</strong> model, we have <strong>in</strong>cludedsome more features <strong>in</strong> a wrapper class called Situa-17


tionElement. All <strong>the</strong> <strong>in</strong>stances of <strong>the</strong> properties mentioned<strong>in</strong> <strong>the</strong> ontology are wrapped <strong>in</strong>side this class.In addition to <strong>the</strong> l<strong>in</strong>k to <strong>the</strong> content def<strong>in</strong>ition ontology,this class has <strong>the</strong> possibility to mark <strong>the</strong> <strong>in</strong>formation<strong>in</strong>side as an <strong>in</strong>terpretation. With this <strong>in</strong>formationexplicitly shown, <strong>the</strong> part of <strong>the</strong> <strong>in</strong>formation thatis most subjective can be shown to <strong>the</strong> user <strong>in</strong> a differentway <strong>in</strong> <strong>the</strong> user <strong>in</strong>terface, or it can be left outif someone chooses to only be <strong>in</strong>terested <strong>in</strong> def<strong>in</strong>itefacts.There is also a property called attribute <strong>in</strong> <strong>the</strong>SituationElement-class. The annotator can add attributesto any elements of a situation. This maybr<strong>in</strong>g <strong>in</strong>terest<strong>in</strong>g additional <strong>in</strong>formation about someelements <strong>and</strong> can be used for answer<strong>in</strong>g questionssuch as ”How?” or ”What k<strong>in</strong>d of...?”. Still ano<strong>the</strong>rproperty is symbolizes that makes it possible to express<strong>the</strong> fact that someth<strong>in</strong>g symbolizes someth<strong>in</strong>gelse. As a last addition, we have added <strong>the</strong> propertyfreeText, so that everyth<strong>in</strong>g annotated can alsobe given a literal value that can be used <strong>in</strong> <strong>the</strong> user<strong>in</strong>terface.3.3 The Process OntologyThe situation ontology can be used to describe <strong>the</strong>parts of a process or a story, but <strong>the</strong>re has to be a logicfor b<strong>in</strong>d<strong>in</strong>g situations toge<strong>the</strong>r <strong>in</strong> order to form largeprocesses or stories. The process ontology was createdfor this. The process ontology was strongly <strong>in</strong>fluencedby <strong>the</strong> OWL Services (Coalition, 2003) processespart. The atomic processes of OWL-S could beseen as a close relative to <strong>the</strong> situations <strong>in</strong> our term<strong>in</strong>ology,as <strong>the</strong>se are <strong>the</strong> units used to build up biggerwholes. It was needed for easy specification of <strong>the</strong> order<strong>in</strong>gof <strong>the</strong> situations. The class ControlConstructwith its subclasses made this possible.Some problems arose when annotat<strong>in</strong>g <strong>the</strong> order of<strong>the</strong> situations with Protege-2000 4 because this editordid not support <strong>the</strong> use of ordered lists, even though<strong>the</strong>y are a part of <strong>the</strong> RDF specification. Some hardcod<strong>in</strong>gwas needed to get around this problem, tak<strong>in</strong>gaway <strong>the</strong> possibility to reuse subprocesses as a partof o<strong>the</strong>r processes, but this can probably be solved <strong>in</strong>later versions of <strong>the</strong> ontology.3.4 The Content Def<strong>in</strong>ition OntologyThe content def<strong>in</strong>ition ontology is <strong>the</strong> ontology thatdef<strong>in</strong>es how th<strong>in</strong>gs <strong>in</strong> <strong>the</strong> world relate to each o<strong>the</strong>r.The actions, <strong>the</strong> objects, <strong>the</strong> places, <strong>in</strong>deed everyth<strong>in</strong>gthat is present <strong>in</strong> situations that are be<strong>in</strong>g annotated,4 http://protege.stanford.edushould be def<strong>in</strong>ed <strong>in</strong> a this large ontology that tellswhat are <strong>the</strong> semantic connections between <strong>the</strong> concepts.As <strong>the</strong> processes are made up of situations, <strong>the</strong> situationsare made up of different properties of <strong>the</strong> situation.All <strong>the</strong>se properties have a value, that is a referenceto a resource of <strong>the</strong> content def<strong>in</strong>ition ontology.For example, consider <strong>the</strong> situation where <strong>the</strong> treesare cut down <strong>in</strong> <strong>the</strong> slash <strong>and</strong> burn method. In <strong>the</strong>action-property of <strong>the</strong> situation, <strong>the</strong>re will be a referenceto <strong>the</strong> concept of cutt<strong>in</strong>g down, <strong>and</strong> <strong>the</strong> object ofaction is a reference to <strong>the</strong> concept of tree. With all<strong>the</strong> concepts <strong>and</strong> <strong>the</strong>re relations def<strong>in</strong>ed, we can latercreate l<strong>in</strong>ks between different processes that have todo with trees, even though <strong>in</strong> ano<strong>the</strong>r process or situation,<strong>the</strong> annotation would have been oaks. Theontology tells <strong>the</strong> computer that oaks are a subclassof trees.3.5 <strong>Semantic</strong> Difficulties EncounteredSome <strong>the</strong>oretical problems of us<strong>in</strong>g <strong>the</strong>se ontologieswere discovered dur<strong>in</strong>g <strong>the</strong> ontology design process.One was that of <strong>in</strong>terpretation. Even <strong>the</strong> same situationcan be seen <strong>in</strong> many ways, depend<strong>in</strong>g on <strong>the</strong>po<strong>in</strong>t of view of <strong>the</strong> annotator. Th<strong>in</strong>gs get even moresubjective when properties such as mood are used.Still, we wanted to <strong>in</strong>clude <strong>the</strong>se possibilities, as thismetadata is meant primarily for people <strong>and</strong> not formach<strong>in</strong>es, that can’t as easily cope with <strong>the</strong> fact thatall facts are not really facts. We envision that <strong>in</strong>terpretationsof cultural resources can be very <strong>in</strong>terest<strong>in</strong>g tomany end-users. It would be too a high price to payfor mak<strong>in</strong>g <strong>the</strong> data totally fact-based.Ano<strong>the</strong>r <strong>in</strong>terest<strong>in</strong>g dilemma encountered was <strong>the</strong>relation between <strong>the</strong> th<strong>in</strong>g be<strong>in</strong>g modeled <strong>and</strong> reality.What is <strong>the</strong> relation between a story character<strong>and</strong> a real historical character? There may be almostno differences, but <strong>the</strong> fact that <strong>the</strong> o<strong>the</strong>r one is onlyfictional. There is a relation between Alex<strong>and</strong>er <strong>the</strong>Great <strong>and</strong> Aragorn of <strong>the</strong> “Lord of <strong>the</strong> r<strong>in</strong>gs”, butshould <strong>the</strong> difference of <strong>the</strong> fictional world <strong>and</strong> <strong>the</strong>real world be emphasized or not?The same problem exist with for example toys. Atoy aeroplane has lots of semantic connections to realaeroplanes, but still it’s a totally different th<strong>in</strong>g. Andif <strong>the</strong>re is an old tractor somewhere, that children useas a play<strong>in</strong>g ground, should it be annotated as a tractor,a play<strong>in</strong>g ground, or a space ship, as <strong>the</strong> childrenalways th<strong>in</strong>k of it as one?The impact of changes <strong>in</strong> time <strong>and</strong> space <strong>in</strong> <strong>the</strong>metadata <strong>and</strong> ontologies is also an <strong>in</strong>terest<strong>in</strong>g question.For example, an old axe may have been used <strong>in</strong> a<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 18


medieval war, but <strong>in</strong> modern wars axes are rarely usedas weapons. Thus <strong>the</strong> war related properties are onlyrelevant to axes dur<strong>in</strong>g a certa<strong>in</strong> time <strong>in</strong> history. Axesare an easy example because axes have been fairlysimilar objects all through <strong>the</strong> history. In contrast,some concepts may mean a totally different th<strong>in</strong>g <strong>in</strong>different eras. For example, <strong>the</strong> process of heal<strong>in</strong>ga wound with modern technology <strong>and</strong> knowhow isvery different from what it was a thous<strong>and</strong> years ago.Also a change <strong>in</strong> place or culture can twist <strong>the</strong> mean<strong>in</strong>gsof some concepts very much. Depend<strong>in</strong>g on <strong>the</strong>viewpo<strong>in</strong>t, <strong>the</strong>se differences can be seen ei<strong>the</strong>r as aproblem or as a source of most <strong>in</strong>terest<strong>in</strong>g <strong>and</strong> complicatedsemantic connections.4 CultureSampo I PrototypeIn order to test whe<strong>the</strong>r <strong>the</strong> actions <strong>and</strong> processes <strong>in</strong>deedprovide a useful basis for l<strong>in</strong>k<strong>in</strong>g different culturalresources, <strong>the</strong> <strong>the</strong>ory has to be tested. The CultureSampoI prototype was built on top of <strong>the</strong> MuseumF<strong>in</strong>l<strong>and</strong>architecture to test <strong>the</strong> new po<strong>in</strong>t of view,<strong>and</strong> especially to see how different k<strong>in</strong>ds of resourcescould be l<strong>in</strong>ked toge<strong>the</strong>r.The content of MuseumF<strong>in</strong>l<strong>and</strong> was semanticallyhomogenous, conform<strong>in</strong>g to a shared metadataschema, consist<strong>in</strong>g of ma<strong>in</strong>ly artifact metadata orig<strong>in</strong>at<strong>in</strong>gfrom heterogenous <strong>and</strong> distributed museumcollections. In contrast, CultureSampo aims at publish<strong>in</strong>gF<strong>in</strong>nish culture content of many k<strong>in</strong>ds, conform<strong>in</strong>gto different metadata schemas, on <strong>the</strong> semanticweb. The idea is to allow <strong>the</strong> search of <strong>the</strong> resourcesthrough <strong>the</strong> actions <strong>the</strong>y are <strong>in</strong>volved <strong>in</strong> or<strong>in</strong>volve, <strong>and</strong> provide <strong>the</strong> end-user with automatic semanticl<strong>in</strong>k<strong>in</strong>g of <strong>the</strong> resources based on <strong>the</strong> content(Hyvönen et al., 2006).4.1 GoalsCultureSampo shares <strong>the</strong> ma<strong>in</strong> goals of MuseumF<strong>in</strong>l<strong>and</strong>:1. Global view to distributed collections. It is possibleto use <strong>the</strong> heterogeneous distributed collectionsof <strong>the</strong> museums participat<strong>in</strong>g <strong>in</strong> <strong>the</strong> systemas if <strong>the</strong> collections were <strong>in</strong> a s<strong>in</strong>gle uniformrepository.2. Content-based <strong>in</strong>formation retrieval. The systemsupports <strong>in</strong>telligent <strong>in</strong>formation retrieval basedon ontological concepts, not only simple keywordmatch<strong>in</strong>g as is customary with currentsearch eng<strong>in</strong>es.3. <strong>Semantic</strong>ally l<strong>in</strong>ked contents. A most <strong>in</strong>terest<strong>in</strong>gaspect of <strong>the</strong> collection items to <strong>the</strong> end-userare <strong>the</strong> implicit semantic relations that relate collectiondata with each o<strong>the</strong>r. In MuseumF<strong>in</strong>l<strong>and</strong>,such associations are exposed to <strong>the</strong> end-user bydef<strong>in</strong><strong>in</strong>g <strong>the</strong>m <strong>in</strong> terms of logical predicate rulesthat make use of <strong>the</strong> underly<strong>in</strong>g ontologies <strong>and</strong>collection metadata.4. Easy local content publication. The portalshould provide <strong>the</strong> museums with a costeffectivepublication channel.CultureSampo I prototype was designed especiallyto deepen <strong>the</strong> third goal of <strong>the</strong> system, by br<strong>in</strong>g<strong>in</strong>g<strong>in</strong> <strong>the</strong> possibility to relate different k<strong>in</strong>ds of culturalresources through semantically richer annotations,based on actions <strong>and</strong> processes. The need forthis became evident when mak<strong>in</strong>g MuseumF<strong>in</strong>l<strong>and</strong><strong>and</strong> was actually also echoed <strong>in</strong> <strong>the</strong> end-user feedbackof MuseumF<strong>in</strong>l<strong>and</strong>. One of <strong>the</strong> feedback e-mails brought us this wish:“Are <strong>the</strong>re any plans to give more detailed <strong>in</strong>formationabout <strong>the</strong> objects? Now <strong>the</strong> items are laidon display: here <strong>the</strong>y are, look at <strong>the</strong>m. But it’s nottold to what, how <strong>and</strong> why <strong>the</strong> artifacts have beenused....This k<strong>in</strong>d of extra <strong>in</strong>formation would serve meat least. Some of <strong>the</strong> objects <strong>and</strong> <strong>the</strong>ir use is familiarto me, but not all.”Also <strong>the</strong> professionals <strong>in</strong> <strong>the</strong> museum field are ponder<strong>in</strong>g<strong>the</strong>se questions. Trilce Navarrete writes <strong>the</strong>follow<strong>in</strong>g (Navarrette, 2002):“As museums exp<strong>and</strong> <strong>the</strong> def<strong>in</strong>ition of ’education’<strong>the</strong>re is a need to consider alternative models of explanation,such as oral history, mythology, familyfolklore <strong>and</strong> o<strong>the</strong>r ways to create <strong>the</strong> context <strong>in</strong> whichstories are told — <strong>the</strong> story of each museum. How domuseums go about foster<strong>in</strong>g <strong>the</strong>ir community’s narrativeconstruction? The question <strong>in</strong> museums is notonly how to better expla<strong>in</strong> <strong>the</strong> story of <strong>the</strong> given object,but also how can museums better create <strong>and</strong> <strong>in</strong>spire<strong>the</strong> context for <strong>the</strong> public to construct an <strong>in</strong>terestto relate to <strong>the</strong>se stories?”These two quotes outl<strong>in</strong>e nicely <strong>the</strong> field of problemsthat we tried to approach with <strong>the</strong> help of CultureSampoI, us<strong>in</strong>g <strong>the</strong> ideas described earlier <strong>in</strong> thispaper.4.2 A Use CaseTo illustrate <strong>the</strong> <strong>in</strong>tended usage of CultureSampo,consider <strong>the</strong> follow<strong>in</strong>g use case. John is a 12-yearoldpupil of a school <strong>in</strong> Hels<strong>in</strong>ki. The teacher hasgiven him <strong>and</strong> his friend Michael <strong>the</strong> task of do<strong>in</strong>g an19


exercise toge<strong>the</strong>r. John <strong>and</strong> Michael should do <strong>the</strong>irwork about agriculture <strong>in</strong> F<strong>in</strong>l<strong>and</strong> <strong>in</strong> <strong>the</strong> n<strong>in</strong>eteenthcentury. The work should be broad <strong>in</strong> content, <strong>and</strong>conta<strong>in</strong> pictures <strong>and</strong> o<strong>the</strong>r materials, too.The objective of John is to get <strong>in</strong>formation aboutagriculture <strong>in</strong> <strong>the</strong> n<strong>in</strong>eteenth century. Michael wantsto write about <strong>the</strong> farm animals, so John has to consider<strong>the</strong> part about agriculture <strong>and</strong> people’s lives <strong>in</strong>general. The teacher gives John a l<strong>in</strong>k to Culture-Sampo to f<strong>in</strong>d some <strong>in</strong>formation. John goes to <strong>the</strong>site, looks at <strong>the</strong> search w<strong>in</strong>dow, ends up with choos<strong>in</strong>g<strong>the</strong> search categories “Agriculture” <strong>and</strong> “Then<strong>in</strong>eteenth century”, <strong>and</strong> he gets a l<strong>in</strong>k to a sca<strong>the</strong>that has been used <strong>in</strong> Hels<strong>in</strong>ki <strong>in</strong> <strong>the</strong> n<strong>in</strong>eteenth century.He copies <strong>the</strong> picture, it’s good material. Thenhe f<strong>in</strong>ds a l<strong>in</strong>k to <strong>the</strong> slash <strong>and</strong> burn process, whichis a process where a sca<strong>the</strong> has been used. He gets<strong>in</strong>formation about this k<strong>in</strong>d of farm<strong>in</strong>g, <strong>and</strong> decidesto write about that. He also f<strong>in</strong>ds a l<strong>in</strong>k to a pa<strong>in</strong>t<strong>in</strong>gwhere a mythic figure from <strong>the</strong> F<strong>in</strong>nish epic Kalevalais us<strong>in</strong>g <strong>the</strong> slash <strong>and</strong> burn method, <strong>and</strong> from that hef<strong>in</strong>ds a l<strong>in</strong>k to <strong>the</strong> right po<strong>in</strong>t <strong>in</strong> <strong>the</strong> poem itself, <strong>and</strong>gets exited about <strong>the</strong> dramatic twists. The poem alsogives him some <strong>in</strong>sight to <strong>the</strong> life <strong>in</strong> ancient F<strong>in</strong>l<strong>and</strong>,<strong>and</strong> he writes about <strong>the</strong> jobs he f<strong>in</strong>ds people were do<strong>in</strong>g<strong>in</strong> <strong>the</strong> poem, like shepherd<strong>in</strong>g <strong>and</strong> fish<strong>in</strong>g. On <strong>the</strong>basis of <strong>the</strong> <strong>in</strong>formation of CultureSampo, John <strong>and</strong>Michael manage to make a good school essay aboutagriculture.4.3 Illustration of <strong>Semantic</strong> L<strong>in</strong>k<strong>in</strong>gFigure 3 illustrates semantic l<strong>in</strong>k<strong>in</strong>g <strong>in</strong> CultureSampoI by a screenshot. The page shows metadata about <strong>the</strong>pa<strong>in</strong>t<strong>in</strong>g “Kullervo curses” by Akseli Gallen-Kalleladepict<strong>in</strong>g a famous event <strong>in</strong> Kalevala. The pa<strong>in</strong>t<strong>in</strong>gitself is shown on <strong>the</strong> left <strong>and</strong> its metadata <strong>in</strong> <strong>the</strong> middle.The semantic l<strong>in</strong>ks appear on <strong>the</strong> right. They <strong>in</strong>cludedifferent k<strong>in</strong>ds of l<strong>in</strong>ks, depend<strong>in</strong>g on <strong>the</strong> logicalrules that have created <strong>the</strong>m. The labels of <strong>the</strong>l<strong>in</strong>ks <strong>and</strong> headl<strong>in</strong>es expla<strong>in</strong> why follow<strong>in</strong>g this l<strong>in</strong>kshould be of <strong>in</strong>terest of <strong>the</strong> user. Three semantic recommendationl<strong>in</strong>ks created by <strong>the</strong> system are visualizedon top of <strong>the</strong> screenshot. One l<strong>in</strong>k po<strong>in</strong>ts toan artifact <strong>in</strong> <strong>the</strong> collections of <strong>the</strong> National Museum,one to bibliographic <strong>in</strong>formation of <strong>the</strong> artist, <strong>and</strong> oneto <strong>the</strong> actual po<strong>in</strong>t <strong>in</strong> Kalevala where <strong>the</strong> event takesplace. Different k<strong>in</strong>ds of content items have pages of<strong>the</strong>ir own similar to this pa<strong>in</strong>t<strong>in</strong>g page. They look differentbecause of <strong>the</strong> differences <strong>in</strong> content types <strong>and</strong>content on <strong>the</strong>m, but <strong>in</strong> all cases <strong>the</strong> content item itselfis shown on <strong>the</strong> left, <strong>the</strong> metadata <strong>in</strong> <strong>the</strong> middle,<strong>and</strong> <strong>the</strong> semantic l<strong>in</strong>ks on <strong>the</strong> right.In addition to semantic brows<strong>in</strong>g, <strong>the</strong> system alsosupports faceted semantic search <strong>in</strong> <strong>the</strong> same way asMuseumF<strong>in</strong>l<strong>and</strong>.4.4 Cultural ContentIn <strong>the</strong> prototype seven k<strong>in</strong>ds of content resourceswere used. We selected resources that were somehowimportant for <strong>the</strong> F<strong>in</strong>nish culture, <strong>and</strong> that related toeach o<strong>the</strong>r, so that l<strong>in</strong>ks could emerge between <strong>the</strong>mif described correctly with <strong>the</strong> annotation ontologies.We also wanted to have examples of different mediumspresent <strong>in</strong> <strong>the</strong> resources.1. Processes were one of <strong>the</strong> core th<strong>in</strong>gs we wantedto have <strong>in</strong> <strong>the</strong> system, as <strong>the</strong>y have a lot to dowith action <strong>and</strong> with culture. Preserv<strong>in</strong>g <strong>in</strong>formationabout cultural processes is also important<strong>in</strong> itself. We had <strong>the</strong> slash <strong>and</strong> burn procedure<strong>and</strong> se<strong>in</strong>e fish<strong>in</strong>g as examples of old F<strong>in</strong>nish processesthat are not any more very well known tomodern F<strong>in</strong>ns. These two processes were builtup from about ten situations each.2. Stories were <strong>the</strong> o<strong>the</strong>r resource type that hadbeen much thought of when design<strong>in</strong>g <strong>the</strong> CultureSampoontologies, <strong>and</strong> is an <strong>in</strong>spir<strong>in</strong>g wayto describe <strong>the</strong> context of old F<strong>in</strong>nish culture.Kalevala was a natural choice when choos<strong>in</strong>gwhat stories to <strong>in</strong>clude <strong>in</strong> <strong>the</strong> prototype. As <strong>the</strong>Kalevala stories are old, <strong>the</strong> world <strong>the</strong>y describeis close to <strong>the</strong> context of life <strong>in</strong> <strong>the</strong> past agrarianF<strong>in</strong>l<strong>and</strong>. Two quite separate entities were chosenfrom <strong>the</strong> whole epic: <strong>the</strong> sad story of Kullervowhose family was killed, <strong>and</strong> ano<strong>the</strong>r where <strong>the</strong>most famous hero of Kalevala, Vä<strong>in</strong>ämö<strong>in</strong>en,learns how to farm l<strong>and</strong> by <strong>the</strong> slash <strong>and</strong> burnmethod. These stories had a start <strong>and</strong> an end of<strong>the</strong>ir own, <strong>and</strong> <strong>the</strong>y had good references to <strong>the</strong>o<strong>the</strong>r resources we had.3. Pa<strong>in</strong>t<strong>in</strong>gs were <strong>the</strong> first resource where no textwas <strong>in</strong>cluded, but <strong>the</strong> <strong>in</strong>formation was <strong>in</strong> pictureform. It was good to add pa<strong>in</strong>t<strong>in</strong>gs not only becauseof gett<strong>in</strong>g to test describ<strong>in</strong>g this medium,but also as visual resources give ano<strong>the</strong>r k<strong>in</strong>d oflife to <strong>the</strong> context of old F<strong>in</strong>nish culture. Weselected some pa<strong>in</strong>t<strong>in</strong>gs about Kalevala to fit <strong>the</strong>stories we had, <strong>and</strong> also some o<strong>the</strong>r pa<strong>in</strong>t<strong>in</strong>gs describ<strong>in</strong>g<strong>the</strong> old days.4. Photographs are quite similar to pa<strong>in</strong>t<strong>in</strong>gs w.r.t.<strong>the</strong>ir content annotation. Still, <strong>the</strong> documentaryaspect of photographs is much stronger than <strong>in</strong><strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 20


Figure 3: An example of <strong>the</strong> <strong>in</strong>terface of CultureSampo I illustrat<strong>in</strong>g a pa<strong>in</strong>t<strong>in</strong>g at <strong>the</strong> F<strong>in</strong>nish National Galleryabout an event <strong>in</strong> <strong>the</strong> epic Kalevala. Three semantic recommendation l<strong>in</strong>ks created by <strong>the</strong> system are visualizedon top of <strong>the</strong> screenshot.pa<strong>in</strong>t<strong>in</strong>gs, so we believe <strong>the</strong>y br<strong>in</strong>g a good au<strong>the</strong>nticpo<strong>in</strong>t of view to old processes.5. Videos were an <strong>in</strong>terest<strong>in</strong>g <strong>and</strong> complicated caseof resources. At this stage of <strong>the</strong> process, wedidn’t yet implement very complicated metadatadescriptions of <strong>the</strong> videos we had, even thoughus<strong>in</strong>g <strong>the</strong> situation ontology with mov<strong>in</strong>g image<strong>and</strong> sound could be used <strong>in</strong> a more sophisticatedway. At this time it was enough to get some l<strong>in</strong>ksto <strong>the</strong> o<strong>the</strong>r resources through a simple metadatadescription, <strong>and</strong> <strong>the</strong> logics can later be improved.6. People were added as one k<strong>in</strong>d of “resources”,as <strong>in</strong>formation about people who lived <strong>in</strong> <strong>the</strong> olddays can be relevant, when form<strong>in</strong>g <strong>the</strong> contextof cultural resources. S<strong>in</strong>ce <strong>the</strong> core of our metadataschema is action, <strong>and</strong> <strong>the</strong> actor’s are usuallypeople, it was natural to use people as contentitems. Most of <strong>the</strong> persons <strong>in</strong> <strong>the</strong> system wereartists who had created <strong>the</strong> artworks <strong>in</strong>cluded.However, <strong>the</strong>re were also a couple of fictitiouspeople from <strong>the</strong> Kalevala epic.7. Artifacts were a natural k<strong>in</strong>d of resource weneeded to have, because artifacts are important<strong>in</strong> actions (e.g., as <strong>in</strong>struments), <strong>and</strong> we also hadlots of metadata about <strong>the</strong>m <strong>in</strong> <strong>the</strong> MuseumF<strong>in</strong>l<strong>and</strong>knowledge base.The CultureSampo I prototype uses ontologies designedfor action-based description of cultural resources.The resources we used <strong>in</strong> <strong>the</strong> prototype were2 processes, which were built from 21 situations, 2stories of Kalevala <strong>in</strong> 32 situations, 8 pa<strong>in</strong>t<strong>in</strong>gs, 4photographs, 2 educational videos <strong>and</strong> 14 museumobjects. The annotation of <strong>the</strong> situations was quiteslow, as <strong>the</strong>re were no exist<strong>in</strong>g action-based metadataavailable, <strong>and</strong> no special tools designed to help <strong>in</strong> <strong>the</strong>process. Most situations could be described <strong>in</strong> <strong>the</strong>way we wanted, so <strong>the</strong> expressive power of <strong>the</strong> situationontology proved out to be satisfactory.A couple of problems arose <strong>in</strong> describ<strong>in</strong>g <strong>the</strong> situationsof stories. One was a situation where a womanreads a spell to protect <strong>the</strong> cows when send<strong>in</strong>g <strong>the</strong>mto <strong>the</strong> forest. This was a long monologue, <strong>and</strong> <strong>the</strong>contents of <strong>the</strong> monologue could not be made <strong>in</strong>to situations,but we could only say <strong>the</strong> woman is read<strong>in</strong>ga spell. This shows a problem of describ<strong>in</strong>g speech<strong>in</strong> stories <strong>and</strong> <strong>in</strong> general: <strong>the</strong> th<strong>in</strong>gs that people talkabout are not necessarily true or real actions. In our21


scheme <strong>the</strong>re is no notion of reification, although thisis <strong>in</strong> pr<strong>in</strong>ciple supported by <strong>the</strong> RDF recommendation.As a result, dialogues or monologues are difficultto describe with our action-based annotations asit is. When describ<strong>in</strong>g some parts of <strong>the</strong> story, weneeded to limit <strong>the</strong> level of detail. All <strong>the</strong> actionswere not described <strong>in</strong> situations, but only <strong>the</strong> onesthat were <strong>in</strong>terest<strong>in</strong>g <strong>and</strong> mattered <strong>in</strong> <strong>the</strong> whole plot.In describ<strong>in</strong>g processes, <strong>the</strong>re were some problemswith represent<strong>in</strong>g time. As different situations of aprocess take different amounts of time, choos<strong>in</strong>g whatis important <strong>in</strong> <strong>the</strong> process sometimes ended up withsituations that are very uneven <strong>in</strong> <strong>the</strong>ir lengths. Forexample, cutt<strong>in</strong>g <strong>the</strong> trees down is fast but wait<strong>in</strong>gfor a year or lett<strong>in</strong>g <strong>the</strong> forest grow back take longertimes.These problems were not critical to <strong>the</strong> functionalityof <strong>the</strong> system. Most of <strong>the</strong> situations <strong>in</strong> differentresources were straightforward to annotate with<strong>the</strong> ontologies. When us<strong>in</strong>g <strong>the</strong> prototype, it couldbe seen that actions really do l<strong>in</strong>k different culturalresources toge<strong>the</strong>r. Lots of l<strong>in</strong>ks were created with<strong>the</strong> logical rules we def<strong>in</strong>ed, <strong>and</strong> <strong>the</strong> l<strong>in</strong>ks really hadmean<strong>in</strong>g for <strong>the</strong> end-user. When look<strong>in</strong>g at an axe<strong>in</strong> a museum, you get a l<strong>in</strong>k to <strong>the</strong> process of slash<strong>and</strong> burn where axes were used, to a pa<strong>in</strong>t<strong>in</strong>g wheresomeone is us<strong>in</strong>g an axe, <strong>and</strong> to a poem of Kalevalawere Kullervo is sharpen<strong>in</strong>g his axe.The situation ontology was <strong>the</strong> ma<strong>in</strong> object of our<strong>in</strong>terest, but also <strong>the</strong> o<strong>the</strong>r ontologies worked wellenough. The process ontology was expressive enoughto describe <strong>the</strong> order of <strong>the</strong> situations we had. As<strong>the</strong> content def<strong>in</strong><strong>in</strong>g ontology we used a prelim<strong>in</strong>aryversion of <strong>the</strong> General F<strong>in</strong>nish Upper Ontology YSO(Hyvönen et al., 2005b), that was be<strong>in</strong>g designed at<strong>the</strong> same time. As it wasn’t totally ready, we made aversion of it that had <strong>the</strong> concepts we needed, <strong>and</strong> itworked at this stage of <strong>the</strong> process.5 Related WorkProcess models have been researched a lot <strong>in</strong> computerscience, though usually from <strong>the</strong> po<strong>in</strong>t of viewof mach<strong>in</strong>e-executable processes or bus<strong>in</strong>ess processes.As examples of <strong>the</strong>se <strong>in</strong>clude <strong>the</strong> ProcessSpecification Language (Schlenoff et al., 2000), Bus<strong>in</strong>essProcess Execution Language for <strong>Web</strong> Services(Andrews et al., 2003) <strong>and</strong> OWL Services (Coalition,2003), that we used as a start<strong>in</strong>g po<strong>in</strong>t when design<strong>in</strong>gour process ontology. However, <strong>the</strong>se approachesto process model<strong>in</strong>g were not designed for describ<strong>in</strong>gcultural processes, so <strong>the</strong> end results are quite different,even though some similarities exist. Questionsabout actions happen<strong>in</strong>g <strong>in</strong> time are always somehow<strong>in</strong>volved <strong>in</strong> processes.There are ontologies that have been designed fordescrib<strong>in</strong>g cultural resources. The CIDOC CRM(Doerr, 2003) is an upper level ontology that has beendesigned for mak<strong>in</strong>g different metadata schemas <strong>and</strong>content <strong>in</strong>teroperable. The ABC Harmony (Lagoze<strong>and</strong> Hunter, 2001) is a related effort <strong>in</strong>tended to providea common conceptual model to facilitate <strong>in</strong>teroperabilityamong application metadata vocabularies.Our approach is different from <strong>the</strong>se ontologies <strong>and</strong>o<strong>the</strong>r metadata systems that concentrate on describ<strong>in</strong>g<strong>the</strong> cultural resources <strong>in</strong> collections. Our focus ison describ<strong>in</strong>g <strong>the</strong> actions <strong>and</strong> processes that relate <strong>the</strong>resources <strong>in</strong> <strong>the</strong> real world (or <strong>in</strong> fiction), with goalof provid<strong>in</strong>g <strong>the</strong> user with <strong>in</strong>sightful semantic recommendations<strong>and</strong> enhanc<strong>in</strong>g search.6 ConclusionsThis paper is about describ<strong>in</strong>g <strong>the</strong> cultural context ofresources. As <strong>the</strong> common denom<strong>in</strong>ator of differentcultural resources, a situation <strong>in</strong>clud<strong>in</strong>g some actionswas chosen. Situations describe what happens <strong>in</strong> apa<strong>in</strong>t<strong>in</strong>g, <strong>in</strong> a story, or <strong>in</strong> a cultural process. Such descriptionsprovide a semantic network l<strong>in</strong>k<strong>in</strong>g relatedcultural content items toge<strong>the</strong>r. This po<strong>in</strong>t of viewcomplements <strong>the</strong> more traditional idea of us<strong>in</strong>g classifications<strong>and</strong> ontologies for def<strong>in</strong><strong>in</strong>g cultural concepts<strong>and</strong> metadata schemas.An experimental situation ontology was created toprovide <strong>the</strong> common annotation scheme to describesituations <strong>and</strong> <strong>the</strong>ir ma<strong>in</strong> properties, whatever <strong>the</strong>medium <strong>in</strong> which <strong>the</strong> situations appear is. Also a processontology <strong>and</strong> a content def<strong>in</strong><strong>in</strong>g ontology weretaken as a part of model, <strong>in</strong> order to l<strong>in</strong>k different situationstoge<strong>the</strong>r <strong>in</strong>to larger wholes, <strong>and</strong> <strong>in</strong> order todef<strong>in</strong>e <strong>the</strong> concepts appear<strong>in</strong>g <strong>in</strong> <strong>the</strong> situations unambiguously.It was clear from <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g that describ<strong>in</strong>g culturalcontent <strong>in</strong> terms of real world actions <strong>and</strong> processesis more complicated than describ<strong>in</strong>g culturalobjects <strong>in</strong> collections. The prototype CultureSampoI was designed <strong>and</strong> implemented <strong>in</strong> order to f<strong>in</strong>d outboth <strong>the</strong> practical <strong>and</strong> <strong>the</strong>oretical problems of <strong>the</strong> approach,<strong>and</strong> also to see if <strong>the</strong> benefits of this k<strong>in</strong>dof metadata <strong>in</strong> use could be as useful as we hoped.The first results seem promis<strong>in</strong>g. However, <strong>the</strong> contentset used <strong>in</strong> this experiment was very small <strong>and</strong> itwas pre-selected accord<strong>in</strong>g to our goals. Experimentswith larger content sets <strong>and</strong> annotations are def<strong>in</strong>itelyneeded.The f<strong>in</strong>al goal of <strong>the</strong> CultureSampo project<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 22


(Hyvönen et al., 2006) is be become a demonstrationof a nation-wide cross-doma<strong>in</strong> cultural publicationfor <strong>the</strong> semantic web. As a first step towardsthis ambitious goal, <strong>the</strong> work of this paper shows thata situation ontology <strong>and</strong> action-based metadata descriptionscan b<strong>in</strong>d toge<strong>the</strong>r different k<strong>in</strong>d of culturalresources <strong>in</strong> mean<strong>in</strong>gful ways, from pa<strong>in</strong>t<strong>in</strong>gs <strong>and</strong> objectsto processes <strong>and</strong> stories.ReferencesT. Andrews, F. Curbera, H. Dholakia, Y. Gol<strong>and</strong>,J. Kle<strong>in</strong>, F. Leymann, K. Liu, D. Roller, D. Smith,S. Thatte, I. Tricovic, <strong>and</strong> S. Weerawarana. Bus<strong>in</strong>essprocess execution language for web services -version 1.1, 2003.Aristotle. Poetics. Focus Philosophical Library,Pull<strong>in</strong>s Press, 2006.The OWL Services Coalition. OWL-S: <strong>Semantic</strong>Markup for <strong>Web</strong> Services, November 2003.http://www.daml.org/services/owl-s/1.0/owl-s.pdf.M. Doerr. The CIDOC CRM - an ontological approachto semantic <strong>in</strong>teroperability of metadata. AIMagaz<strong>in</strong>e, 24(3):75–92, 2003.M. Eysenc <strong>and</strong> M. Keane. Cognitive PsychologyA Students H<strong>and</strong>book. Psychology Press, Exeter,UK, 2002.M. Holly. Panofsky <strong>and</strong> <strong>the</strong> foudations of art history.Cornell University Press, Ithaca, 1984.B. Holmes, B. Tangney, A. FitzGibbon, T. Savage,<strong>and</strong> S. Meehan. Communal constructivism: Studentsconstruct<strong>in</strong>g learn<strong>in</strong>g for as well as with o<strong>the</strong>rs.In Proceed<strong>in</strong>gs of SITE 2001, Florida, 2001.E. Hyvönen, E. Mäkela, M. Salm<strong>in</strong>en, A. Valo,K. Viljanen, S. Saarela, M. Junnila, <strong>and</strong> S. Kettula.MuseumF<strong>in</strong>l<strong>and</strong> – F<strong>in</strong>nish museums on <strong>the</strong> semanticweb. Journal of <strong>Web</strong> <strong>Semantic</strong>s, 3(2):224–241,2005a.E. Hyvönen, T. Ruotsalo, T. Häggström, M. Salm<strong>in</strong>en,M. Junnila, M. Virkkilä, M. Haaramo,T. Kaupp<strong>in</strong>en, E. Mäkelä, <strong>and</strong> K. Viljanen. CultureSampo— F<strong>in</strong>nish culture on <strong>the</strong> semantic web.The vision <strong>and</strong> first results. In <strong>Semantic</strong> <strong>Web</strong>at Work - Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong><strong>Intelligence</strong> Conference STeP 2006, Volume 1.,Nov 2006.E. Hyvönen, A. Valo, V. Komula<strong>in</strong>en, K. Seppälä,T. Kaupp<strong>in</strong>en, T. Ruotsalo, M. Salm<strong>in</strong>en, <strong>and</strong>A. Ylisalmi. F<strong>in</strong>nish national ontologies for <strong>the</strong>semantic web - towards a content <strong>and</strong> service <strong>in</strong>frastructure.In Proceed<strong>in</strong>gs of International Conferenceon Dubl<strong>in</strong> Core <strong>and</strong> Metadata Applications(DC 2005), Nov 2005b.M. Junnila. Tietosisältöjen semantt<strong>in</strong>en yhdistäm<strong>in</strong>entoim<strong>in</strong>takuvausten avulla (Event-based approachto semantic l<strong>in</strong>k<strong>in</strong>g of data content). Master’s <strong>the</strong>sis,University of Hels<strong>in</strong>ki, March 6 2006.L. Kelly. Develop<strong>in</strong>g access to collections through assess<strong>in</strong>guser needs, May 1999. Museums AustraliaConference, Albury.S. Kettula. Käsityöprosessit museossa semanttisentiedonhaun lähteenä ja kohteena. (H<strong>and</strong>icraft processes<strong>in</strong> museum as a source of object for semanticcontent <strong>and</strong> search). In L. Kauk<strong>in</strong>en <strong>and</strong> M. Collanus,editors, Tekstejä ja kangastuksia. Puheenvuoroijakäsityöstä ja sen tulavaisuudesta. (Viewsof h<strong>and</strong>icraft <strong>and</strong> its future). Artefakta 17, JuvenesPr<strong>in</strong>t, 2005.C. Lagoze <strong>and</strong> J. Hunter. The ABC Ontology <strong>and</strong>Model. Journal of Digital Information, 2(2), 2001.E. Mäkelä, E. Hyvönen, <strong>and</strong> S. Saarela. Ontogator— a semantic view-based search eng<strong>in</strong>e service forweb applications. In Proceed<strong>in</strong>gs of <strong>the</strong> 5th International<strong>Semantic</strong> <strong>Web</strong> Conference (ISWC 2006),Nov 2006.E. Mäkelä, E. Hyvönen, S. Saarela, <strong>and</strong> K. Viljanen.Ontoviews – a tool for creat<strong>in</strong>g semantic web portals.In Proceed<strong>in</strong>gs of 3rd International <strong>Semantic</strong><strong>Web</strong> Conference (ISWC 2004), Hiroshima, Japan,November 2004.T. Navarrette. Museums <strong>in</strong> <strong>the</strong> street: Cultural creation<strong>in</strong> <strong>the</strong> community, October 2002. INTER-COM Conference Leadership <strong>in</strong> Museums: Areour core values shift<strong>in</strong>g?, Dubl<strong>in</strong>, Irel<strong>and</strong>.M. Salm<strong>in</strong>en. Kuvien ja videoiden semantt<strong>in</strong>ensisällönkuvailu (<strong>Semantic</strong> content description ofimages <strong>and</strong> videos). Master’s <strong>the</strong>sis, University ofHels<strong>in</strong>ki, May 2006.C. Schlenoff, M. Grun<strong>in</strong>ger, F. Tissot, J. Valois,J. Lubell, <strong>and</strong> J. Lee. The process specificationlanguage(psl): Overwiev <strong>and</strong> version 1.0 specification,2000. NISTIR 6459, National Institute ofSt<strong>and</strong>ards <strong>and</strong> Technology, Gai<strong>the</strong>rsburg, MD.23


J. Sowa. Knowledge Representation. Logical,Philosophical, <strong>and</strong> Computational Foundations.Brooks/Cole, 2000.K. Viljanen, T. Känsälä, E. Hyvönen, <strong>and</strong> E. Mäkelä.Ontodella - a projection <strong>and</strong> l<strong>in</strong>k<strong>in</strong>g service forsemantic web applications. In Proceed<strong>in</strong>gs of<strong>the</strong> 17th International Conference on Database<strong>and</strong> Expert Systems Applications (DEXA 2006),Krakow, Pol<strong>and</strong>. IEEE, September 4-8 2006.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 24


CultureSampo—F<strong>in</strong>nish Culture on <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>:The Vision <strong>and</strong> First ResultsEero Hyvönen, Tuukka Ruotsalo, Thomas Häggström,Mirva Salm<strong>in</strong>en, Miikka Junnila, Mikko Virkkilä, Mikko Haaramo,Eetu Mäkelä, Tomi Kaupp<strong>in</strong>en, <strong>and</strong> Kim Viljanen⋆ <strong>Semantic</strong> Comput<strong>in</strong>g Research GroupHels<strong>in</strong>ki University of Technology (TKK), Laboratory of Media TechnologyUniversity of Hels<strong>in</strong>ki, Department of Computer Sciencehttp://www.seco.tkk.fi/first.last@tkk.fiAbstractThis paper concerns <strong>the</strong> idea of publish<strong>in</strong>g heterogenous cultural content on <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>. Byheterogenous content we mean metadata describ<strong>in</strong>g potentially any k<strong>in</strong>d of cultural objects, <strong>in</strong>clud<strong>in</strong>gartifacts, photos, pa<strong>in</strong>t<strong>in</strong>gs, videos, folklore, cultural sites, cultural process descriptions, biographies,history etc. The metadata schemas used are different <strong>and</strong> <strong>the</strong> metadata may be represented at differentlevels of semantic granularity. This work is an extension to previous research on semantic culturalportals, such as MuseumF<strong>in</strong>l<strong>and</strong>, that are usually based on a shared homogeneous schema, such asDubl<strong>in</strong> Core, <strong>and</strong> focus on content of similar k<strong>in</strong>ds, such as artifacts. Our experiences suggest that asemantically richer event-based knowledge representation scheme than traditional metadata schemasis needed <strong>in</strong> order to support reason<strong>in</strong>g when perform<strong>in</strong>g semantic search <strong>and</strong> brows<strong>in</strong>g. The newkey idea is to transform different forms of metadata <strong>in</strong>to event-based knowledge about <strong>the</strong> entities<strong>and</strong> events that take place <strong>in</strong> <strong>the</strong> world or <strong>in</strong> fiction. This approach facilitates semantic <strong>in</strong>teroperability<strong>and</strong> reason<strong>in</strong>g about <strong>the</strong> world <strong>and</strong> stories at <strong>the</strong> same time, which enables implementation of<strong>in</strong>telligent services for <strong>the</strong> end-user. These ideas are addressed by present<strong>in</strong>g <strong>the</strong> vision <strong>and</strong> solutionapproaches taken <strong>in</strong> two prototype implementations of a new k<strong>in</strong>d of cross-doma<strong>in</strong> semantic culturalportal “CULTURESAMPO—F<strong>in</strong>nish Culture on <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>”.1 Towards <strong>Semantic</strong> Crossdoma<strong>in</strong>InteroperabilityA widely shared goal of cultural <strong>in</strong>stitutions is to provide<strong>the</strong> general public <strong>and</strong> <strong>the</strong> researchers with aggregatedviews to cultural heritage, where <strong>the</strong> usersare able to access <strong>the</strong> contents of several heterogenousdistributed collections of <strong>in</strong>stitutions simultaneously.In this way, <strong>the</strong> organizational <strong>and</strong> technicalobstacles for <strong>in</strong>formation retrieval between collections<strong>and</strong> organizations, even between countries <strong>and</strong>languages could be crossed.Content aggregation may occur at <strong>the</strong> syntactic orsemantic level. The basis for syntactic <strong>in</strong>teroperabilityis shar<strong>in</strong>g syntactic forms between differentdata sources, i.e., <strong>the</strong> metadata schemas such as <strong>the</strong>Dubl<strong>in</strong> Core Metadata Element Set 1 or <strong>the</strong> Visual Re-1 http://dubl<strong>in</strong>core.org/documents/1998/09/dces/source Association’s (VRA) Core Categories 2 . Suchschemas make it possible to identify different aspectsof <strong>the</strong> search objects, such as <strong>the</strong> “author”, “title”, <strong>and</strong>“subject” of a document, <strong>and</strong> focus search accord<strong>in</strong>gto <strong>the</strong>se. Syntactic <strong>in</strong>teroperabilty facilitates, for example,multi- or metasearch 3 . Here <strong>the</strong> user types <strong>in</strong>a query <strong>in</strong> a metaportal. The query is <strong>the</strong>n distributedto a set of underly<strong>in</strong>g systems <strong>and</strong> <strong>the</strong> results areaggregated for <strong>the</strong> end-user. For example, <strong>the</strong> AustralianMuseums <strong>and</strong> Galleries Onl<strong>in</strong>e 4 <strong>and</strong> ArtefactsCanada 5 are multi-search eng<strong>in</strong>es over nation-widedistributed cultural collections. Here <strong>the</strong> content <strong>in</strong>cludesmetadata about museum artifacts, publicationsetc. represented us<strong>in</strong>g shared metadata schemas.Content aggregation at <strong>the</strong> semantic level meansthat not only <strong>the</strong> form of <strong>the</strong> data is shared <strong>and</strong> <strong>in</strong>-2 http://www.vraweb.org/vracore3.htm3 http://en.wikipedia.org/wiki/Metasearch eng<strong>in</strong>e4 http://www.amonl<strong>in</strong>e.net.au/5 http://www.ch<strong>in</strong>.gc.ca/25


teroperable, but also <strong>the</strong> values used <strong>in</strong> <strong>the</strong> metadataschema, <strong>and</strong> that <strong>the</strong> mean<strong>in</strong>gs of <strong>the</strong> values are semanticallydef<strong>in</strong>ed <strong>in</strong> terms of ontological structures.The values of metadata fields, such as authors, materialtypes, <strong>and</strong> geographical locations are taken froma set of shared vocabularies, i.e., ontologies, or if differentvocabularies are used, <strong>the</strong>n <strong>the</strong> mapp<strong>in</strong>gs between<strong>the</strong>m are available. At this level of content aggregation,reason<strong>in</strong>g about <strong>the</strong> ontological relationsbetween content items becomes possible enabl<strong>in</strong>gsemantic search, semantic brows<strong>in</strong>g, recommendations,explanations, <strong>and</strong> o<strong>the</strong>r “<strong>in</strong>telligent” services.A prototypical example of this approach is <strong>the</strong> portal“MUSEUMFINLAND—F<strong>in</strong>nish Museums on <strong>the</strong> <strong>Semantic</strong><strong>Web</strong>” 6 (Hyvönen et al., 2005a), where distributed,syntactically heterogeneous museum collectiondatabases are <strong>in</strong>tegrated by a set of seven sharedontologies, <strong>and</strong> semantic search <strong>and</strong> brows<strong>in</strong>g servicesare provided to end-users based on <strong>the</strong> aggregatedknowledge base.Ano<strong>the</strong>r dist<strong>in</strong>ctive feature between cultural contentaggregation systems is whe<strong>the</strong>r <strong>the</strong>y deal withmetadata that conforms to a s<strong>in</strong>gle metadata schemaor multiple schemas. For example, <strong>the</strong> Helmet librarysystem 7 aggregates public library collectionsof neighbor<strong>in</strong>g cities for <strong>the</strong> public by us<strong>in</strong>g a s<strong>in</strong>glemetadata format. In <strong>the</strong> same ve<strong>in</strong>, an onl<strong>in</strong>e recordshop may deal with CD/DVDs whose metadata is represented<strong>in</strong> a homogeneous way. On <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>,<strong>in</strong> a system such as Artefacts Canada, <strong>the</strong> underly<strong>in</strong>gdatabases conta<strong>in</strong> items of different k<strong>in</strong>ds, suchas art, furniture, photos, magaz<strong>in</strong>es etc. whose metadataconform to different schemas. For example, ametadata field represent<strong>in</strong>g physical <strong>the</strong> material ofan object is essential for a piece of furniture or artifactbut not for a publication.<strong>Semantic</strong> web portals have tackled <strong>the</strong> problem ofsemantic <strong>in</strong>teroperability usually by shar<strong>in</strong>g metadataschemas. For example, <strong>in</strong> MUSEUMFINLAND heterogeneousartifact collection databases were madesemantically <strong>in</strong>teroperable, but <strong>the</strong> content was of as<strong>in</strong>gle doma<strong>in</strong> (artifacts), <strong>and</strong> <strong>the</strong> metadata was basedon a s<strong>in</strong>gle, Dubl<strong>in</strong> core like schema of artifacts.There are pa<strong>in</strong>t<strong>in</strong>gs <strong>and</strong> some o<strong>the</strong>r forms of art <strong>in</strong>MuseumF<strong>in</strong>l<strong>and</strong> collections, but <strong>the</strong>y have been catalogedas pieces of artifacts <strong>in</strong> <strong>the</strong> cultural museumsparticipat<strong>in</strong>g <strong>in</strong> <strong>the</strong> portal, <strong>and</strong> not as pieces of art.The reason<strong>in</strong>g rout<strong>in</strong>es were based on <strong>the</strong> annotationschema <strong>and</strong> <strong>the</strong> ontologies.In this paper we <strong>in</strong>vestigate <strong>the</strong> problem of seman-6 This application is operational at http://www.museosuomi.fiwith a tutorial <strong>in</strong> English.7 http://www.helmet.fitic cross-doma<strong>in</strong> <strong>in</strong>teroperability, i.e. how contentof different k<strong>in</strong>ds conform<strong>in</strong>g to multiple metadataschemas could be made semantically <strong>in</strong>teroperable.The focus is <strong>the</strong> cultural doma<strong>in</strong> <strong>and</strong> content typesstudied <strong>in</strong> our work <strong>in</strong>clude artifacts, pa<strong>in</strong>t<strong>in</strong>gs, photographs,videos, audios, narratives (stories, biographies,epics), cultural processes (e.g., farm<strong>in</strong>g, boothmak<strong>in</strong>g), cultural sites, historical events, <strong>and</strong> learn<strong>in</strong>gobjects. In this case, <strong>the</strong> content is cross-doma<strong>in</strong> <strong>in</strong>nature <strong>and</strong>, as a result, comes <strong>in</strong> forms that may bequite different from each o<strong>the</strong>r. Mapp<strong>in</strong>g <strong>the</strong>m <strong>in</strong>toa Dubl<strong>in</strong> Core like generic metadata framework isproblematic. Instead, we propose content aggregationat a semantically more foundational <strong>and</strong> rich levelbased on events <strong>and</strong> <strong>the</strong>matic roles (Sowa, 2000). Theresearch is be<strong>in</strong>g carried out not only <strong>in</strong> <strong>the</strong>ory, but byimplement<strong>in</strong>g real portal prototypes. More specifically,we show how <strong>the</strong> idea of MUSEUMFINLANDcan be extended <strong>in</strong>to a cross-doma<strong>in</strong> semantic culturalportal called “CULTURESAMPO—F<strong>in</strong>nish Cultureon <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>”. Figure 1 illustrates <strong>the</strong>position<strong>in</strong>g of CULTURESAMPO along <strong>the</strong> dist<strong>in</strong>ctionsdiscussed above <strong>and</strong> its relation to some o<strong>the</strong>rportal systems mentioned.Multi-doma<strong>in</strong>S<strong>in</strong>gle-doma<strong>in</strong>Artefacts CanadaHelmet librarysystemSyntactic<strong>in</strong>teroperabilityCultureSampoMuseumF<strong>in</strong>l<strong>and</strong><strong>Semantic</strong><strong>in</strong>teroperabilityFigure 1: Portals can be classified <strong>in</strong> terms of <strong>the</strong>number of metadata schemas used (vertical axis) <strong>and</strong><strong>the</strong> level of <strong>in</strong>teroperability (horizontal axis).In <strong>the</strong> follow<strong>in</strong>g we first state <strong>the</strong> vision <strong>and</strong> goalsof creat<strong>in</strong>g CULTURESAMPO. After this problemsof obta<strong>in</strong><strong>in</strong>g semantic cross-doma<strong>in</strong> <strong>in</strong>teroperabilityare discussed <strong>and</strong> <strong>the</strong> idea of us<strong>in</strong>g event-based descriptionsis proposed as a solution. The discussion isbased on experiences ga<strong>the</strong>red <strong>in</strong> creat<strong>in</strong>g two experimentalprototypes of CULTURESAMPO. In conclusion,contributions of <strong>the</strong> work are summarized <strong>and</strong>directions for fur<strong>the</strong>r research are proposed.2 The Vision <strong>and</strong> Goals of CultureSampoCULTURESAMPO shares <strong>the</strong> general goals ofMUSEUMFINLAND:<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 26


Global view to heterogeneous, distributed contentsThe portal supports <strong>the</strong> usage of heterogenous<strong>and</strong> distributed collections <strong>and</strong> contents of <strong>the</strong>participat<strong>in</strong>g organizations as if <strong>the</strong>re were as<strong>in</strong>gle uniform repository.Intelligent end-user services The system supportssemantic search based on ontological concepts<strong>and</strong> semantic brows<strong>in</strong>g, where semantic associationsbetween search objects are exposed dynamicallyto <strong>the</strong> end-user as recommendationl<strong>in</strong>ks with explicit explanations. These l<strong>in</strong>ks aredef<strong>in</strong>ed <strong>in</strong> terms of logical rules that make use of<strong>the</strong> underly<strong>in</strong>g ontologies <strong>and</strong> collection metadata.Shared content publication channel The portalshould provide <strong>the</strong> participat<strong>in</strong>g organizationswith a shared, cost-effective publicationchannel.CULTURESAMPO focuses, from <strong>the</strong> content perspective,especially on material related to <strong>the</strong> “GoldenEra” of <strong>the</strong> F<strong>in</strong>nish culture <strong>in</strong> <strong>the</strong> 19th century. Dur<strong>in</strong>gthis period <strong>the</strong> notion of F<strong>in</strong>l<strong>and</strong> as a nationwith an orig<strong>in</strong>al cultural background <strong>and</strong> history wasformed, <strong>and</strong> <strong>the</strong> development resulted <strong>in</strong> <strong>the</strong> <strong>in</strong>dependenceof <strong>the</strong> country <strong>in</strong> 1917. 8 A central componentof <strong>the</strong> F<strong>in</strong>nish cultural heritage has been <strong>the</strong>national epic Kalevala 9 . It was published orig<strong>in</strong>ally<strong>in</strong> 1835 <strong>and</strong> has been translated <strong>in</strong>to some 60 languages.This epic, based on large collections of folklore10 collected especially <strong>in</strong> <strong>the</strong> eastern parts of F<strong>in</strong>l<strong>and</strong>,Karelia, has been a cont<strong>in</strong>uous source of <strong>in</strong>spiration<strong>in</strong> F<strong>in</strong>nish f<strong>in</strong>e arts, music, sculpture, literature,<strong>and</strong> o<strong>the</strong>r branches of culture. The world of Kalevalaalso nicely relates to <strong>the</strong> orig<strong>in</strong>al agrarian F<strong>in</strong>nish life<strong>and</strong> artifacts that are available <strong>in</strong> museums.In CULTURESAMPO <strong>the</strong> Karelian culture is centralalso because one goal of <strong>the</strong> work is to reuniteKarelian collections us<strong>in</strong>g semantic web techniques.These collections have now been distributed <strong>in</strong> severalmuseums due to <strong>the</strong> result of <strong>the</strong> World War IIwhere eastern parts of F<strong>in</strong>l<strong>and</strong> were annexed to <strong>the</strong>Soviet Union. The semantic web provides means forre-unit<strong>in</strong>g cultural entities virtually on <strong>the</strong> semanticweb. The problem of distributed cultural heritage dueto wars <strong>and</strong> o<strong>the</strong>r reasons is very common <strong>in</strong> Europe.We envision, that <strong>the</strong> ideas <strong>and</strong> techniques developed<strong>in</strong> CULTURESAMPO could later contribute to creation8 Before that F<strong>in</strong>l<strong>and</strong> had been a part of Sweden (until 1809)<strong>and</strong> Russia (1809-1917).9 http://www.f<strong>in</strong>lit.fi/kalevala/<strong>in</strong>dex.php?m=163&l=210 http://www.f<strong>in</strong>lit.fi/english/kra/collections.htmof cross-national <strong>and</strong> multi-l<strong>in</strong>gual cultural portals, ak<strong>in</strong>d “CultureEurope”.The system will also contribute, <strong>in</strong> a sense, to <strong>the</strong>tradition of Kaleva translations. It provides first excerptsof Kalevala translated, not <strong>in</strong>to natural languagesfor <strong>the</strong> humans to use but for <strong>the</strong> mach<strong>in</strong>e to“underst<strong>and</strong>” <strong>in</strong> <strong>the</strong> formal languages of <strong>the</strong> semanticweb, RDF <strong>and</strong> OWL. 11The latter part of <strong>the</strong> portal name “Sampo” is <strong>the</strong>name of <strong>the</strong> mythical mach<strong>in</strong>e-like entity of <strong>the</strong> Kalevalaepic. Sampo gives its owner power, prosperity,everyth<strong>in</strong>g, but its actual construction <strong>and</strong> natureis semantically ambiguous <strong>and</strong> rema<strong>in</strong>s a mystery— tens of academic <strong>the</strong>ories about its mean<strong>in</strong>ghave been presented. CULTURESAMPO adds still ano<strong>the</strong>rmodern <strong>in</strong>terpretation of what a “Sampo” couldbe based on <strong>the</strong> semantic web.3 Mak<strong>in</strong>g a Cultural Portal MoreIntelligentA major focus of our work <strong>in</strong> CULTURESAMPO isto study how to provide <strong>the</strong> end-user with <strong>in</strong>telligentsearch <strong>and</strong> brows<strong>in</strong>g services based on semanticallyrich cross-doma<strong>in</strong> content orig<strong>in</strong>at<strong>in</strong>g from differentk<strong>in</strong>d of cultural <strong>in</strong>stitutions. For example, consider<strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g “Kullervo departs for <strong>the</strong> war” <strong>in</strong> figure2 depict<strong>in</strong>g an event <strong>in</strong> Kalevala. From <strong>the</strong> endusers’viewpo<strong>in</strong>t, it could probably be <strong>in</strong>terest<strong>in</strong>g, ifthis piece of art could be l<strong>in</strong>ked with o<strong>the</strong>r pa<strong>in</strong>t<strong>in</strong>gs<strong>and</strong> photos, with <strong>the</strong> war <strong>the</strong>me <strong>in</strong> art museums, withweapons <strong>and</strong> accessories <strong>in</strong> cultural museums, withacademic studies about Kalevala <strong>and</strong> Kullervo, with<strong>in</strong>formation about dogs <strong>and</strong> horses <strong>in</strong> <strong>the</strong> museum ofnatural history, with o<strong>the</strong>r (external) <strong>in</strong>formation on<strong>the</strong> web about Kullervo, with <strong>the</strong> actual poem <strong>in</strong> Kalevala<strong>and</strong> related pieces of folk poetry, with movies<strong>and</strong> videos on a media server, with biographies of <strong>the</strong>artist, <strong>and</strong> so on. An <strong>in</strong>terest<strong>in</strong>g l<strong>in</strong>e of associationscould be created by consider<strong>in</strong>g <strong>the</strong> events, processes,<strong>and</strong> <strong>the</strong> Kalevala story that takes place <strong>in</strong> <strong>the</strong> picture.In this way, for example, <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g could be l<strong>in</strong>kedwith content concern<strong>in</strong>g <strong>the</strong> next or previous events <strong>in</strong><strong>the</strong> Kalevala story. Such associations <strong>and</strong> viewpo<strong>in</strong>tscould be <strong>in</strong>sightful, useful, <strong>and</strong> even enterta<strong>in</strong><strong>in</strong>g bothwhen search<strong>in</strong>g for content <strong>and</strong> when brows<strong>in</strong>g it.To <strong>in</strong>vestigate <strong>and</strong> test <strong>the</strong> feasibility of this idea<strong>in</strong> practise, we are extend<strong>in</strong>g <strong>the</strong> portal MUSEUM-FINLAND <strong>in</strong>to CULTURESAMPO by a sequence ofnew prototypes. In 2005, <strong>the</strong> first prototype tobe called “CULTURESAMPO I” was designed <strong>and</strong>11 http://www.w3.org/2001/sw/27


Figure 2: Kullervo departs for <strong>the</strong> war. A pa<strong>in</strong>t<strong>in</strong>g at <strong>the</strong> F<strong>in</strong>nish National Gallery.Figure 3: The pa<strong>in</strong>t<strong>in</strong>g “Kullervo curs<strong>in</strong>g” <strong>and</strong> its metadata from <strong>the</strong> F<strong>in</strong>nish National Gallery.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 28


implemented (Junnila et al., 2006; Junnila, 2006;Salm<strong>in</strong>en, 2006). Figure 3 depicts a pa<strong>in</strong>t<strong>in</strong>g <strong>and</strong>its metadata <strong>in</strong> CULTURESAMPO I. The metadatashown orig<strong>in</strong>ates from <strong>the</strong> F<strong>in</strong>nish National Gallery 12<strong>and</strong> describes <strong>the</strong> subject of <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g <strong>in</strong> <strong>the</strong>follow<strong>in</strong>g way: First, <strong>the</strong> CIDOC CRM 13 (Doerr,2003) property P129F is about lists <strong>the</strong> follow<strong>in</strong>gset of keywords (<strong>in</strong> F<strong>in</strong>nish): “Kalevala”, “event”,“Kullervo”, “knife”, “bread”, “knapsack”, “robe”,“animal”, “dog”, “forest”, “rowan”, “p<strong>in</strong>e”, “lake”,<strong>and</strong> “mounta<strong>in</strong>”. Second, <strong>the</strong> property “Iconclass”lists a set of ICONCLASS 14 (van den Berg, 1995)notations (categories) describ<strong>in</strong>g <strong>the</strong> subject. Thisdescription is partly redundant with <strong>the</strong> F<strong>in</strong>nish keywords.In figure 4 this pa<strong>in</strong>t<strong>in</strong>g is viewed <strong>in</strong> CULTURE-SAMPO I. On <strong>the</strong> right column, a set of semanticl<strong>in</strong>ks to o<strong>the</strong>r search objects are recommended wi<strong>the</strong>xplanations created by <strong>the</strong> logical l<strong>in</strong>k<strong>in</strong>g server Ontodella(Viljanen et al., 2006). The figure illustrates al<strong>in</strong>k to a knapsack <strong>in</strong> <strong>the</strong> collections of <strong>the</strong> NationalMuseum of F<strong>in</strong>l<strong>and</strong> 15 , a l<strong>in</strong>k to a biography of <strong>the</strong>artist, <strong>and</strong> a l<strong>in</strong>k to <strong>the</strong> po<strong>in</strong>t <strong>in</strong> <strong>the</strong> Kalevala epicwhere <strong>the</strong> event of <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g actually takes place.CULTURESAMPO I was implemented us<strong>in</strong>g <strong>the</strong>same framework as MUSEUMFINLAND, i.e., <strong>the</strong> OntoViewsframework (Mäkelä et al., 2004) <strong>in</strong>clud<strong>in</strong>g<strong>the</strong> view-based semantic search eng<strong>in</strong>e Ontogator(Mäkelä et al., 2006) <strong>and</strong> Ontodella (Viljanen et al.,2006). However, <strong>in</strong> this case much richer crossdoma<strong>in</strong>metadata was used. The test material waslimited <strong>in</strong> size but <strong>in</strong>cluded examples of artifacts,pa<strong>in</strong>t<strong>in</strong>gs, photos, videos, biographical <strong>in</strong>formation,<strong>and</strong> narratives such as poems of Kalevala, <strong>and</strong> descriptionsof traditional agrarian processes, such asfarm<strong>in</strong>g by <strong>the</strong> slash <strong>and</strong> burn method.Dur<strong>in</strong>g this experiment we identified two major obstaclesfor creat<strong>in</strong>g cross-doma<strong>in</strong> semantic culturalportals:<strong>Semantic</strong> Interoperability of metadata schemas.The problem of <strong>in</strong>tegrat<strong>in</strong>g metadata schemasoccurs 1) horizontally when <strong>in</strong>tegrat<strong>in</strong>g schemasof different form semantically <strong>and</strong> 2) verticallywhen <strong>in</strong>tegrat<strong>in</strong>g content annotated at differentlevels of granularity.Expressive power of metadata schemas. A centralresearch hypo<strong>the</strong>ses underly<strong>in</strong>g CULTURE-SAMPO is that, from <strong>the</strong> end-user’s viewpo<strong>in</strong>t,12 http://www.fng.fi13 http://cidoc.ics.forth.gr/14 http://www.iconclass.nl15 http://www.nba.fi/en/nmfdifferent processes <strong>and</strong> events that take place<strong>in</strong> <strong>the</strong> society <strong>and</strong> history should be used asa k<strong>in</strong>d semantic glue by which “<strong>in</strong>sightful semanticl<strong>in</strong>ks” could be created for <strong>the</strong> user tobrowse. This idea was already tested to some extent<strong>in</strong> MUSEUMFINLAND by creat<strong>in</strong>g an artificialevent view for <strong>the</strong> end-user, <strong>and</strong> by mapp<strong>in</strong>gcontents of it us<strong>in</strong>g logical rules. However, itseemed that a richer <strong>and</strong> a more accurate knowledgerepresentation method was needed <strong>in</strong> annotat<strong>in</strong>g<strong>the</strong> contents than traditional metadataschemas.In <strong>the</strong> follow<strong>in</strong>g, our approaches to address<strong>in</strong>g<strong>the</strong>se problems are outl<strong>in</strong>ed.4 <strong>Semantic</strong> Interoperability ofMetadata SchemasRe-consider <strong>the</strong> figure 2. Its metadata may tell e.g.that this pa<strong>in</strong>t<strong>in</strong>g was created by A. Gallen-Kallela <strong>in</strong>1901 <strong>in</strong> Hels<strong>in</strong>ki. This metadata can be represented,by us<strong>in</strong>g RDF triples <strong>in</strong> Turtle notation 16 , <strong>in</strong> <strong>the</strong> follow<strong>in</strong>gway (this example is not based on <strong>the</strong> actualmetadata but is for illustration only)::Kullervo_departs_wardc:creator persons:A.Gallen-Kallela ;dc:date "1901" ;dc:spatial places:Hels<strong>in</strong>ki .The metadata record <strong>in</strong> a biographical repository,such as <strong>the</strong> ULAN 17 of <strong>the</strong> Getty Foundation, may tellus more about <strong>the</strong> artist <strong>in</strong> a very different metadataformat, e.g.:persons:A.Gallen-Kallela:placeOfBirth places:Pori ;:timeOfBirth "1865" ;:placeOfDeath places:Stockholm ;:timeOfDeath "1931" .A problem here is that <strong>the</strong> number of differentproperties <strong>in</strong> metadata schemas easily getslarge <strong>in</strong> cross-doma<strong>in</strong> applications. Fur<strong>the</strong>rmore,<strong>the</strong> mean<strong>in</strong>g of many properties, such asdc:date <strong>and</strong> dc:spatial <strong>in</strong> <strong>the</strong> metadataschema of pa<strong>in</strong>t<strong>in</strong>gs <strong>and</strong> timeOfBirth/Death<strong>and</strong> placeOfBirth/Death <strong>in</strong> <strong>the</strong> biographicalmetadata schema of persons may share some mean<strong>in</strong>g,but are still different. We soon realized that whenus<strong>in</strong>g <strong>the</strong> schemas for reason<strong>in</strong>g tasks, <strong>the</strong> logicalrules account<strong>in</strong>g properly all k<strong>in</strong>ds of comb<strong>in</strong>ations16 http://www.dajobe.org/2004/01/turtle/17 http://www.getty.edu/vow/ULANSearchPage.jsp29


Figure 4: The pa<strong>in</strong>t<strong>in</strong>g of figure 3 viewed <strong>in</strong> <strong>the</strong> semantic portal CULTURESAMPO I. Three semantic recommendationl<strong>in</strong>ks created by <strong>the</strong> system are visualized on top of <strong>the</strong> screenshot.of properties become complicated, <strong>and</strong> <strong>the</strong> numberof rules becomes large due to comb<strong>in</strong>atorial explosion.It seems that a more primitive representationof knowledge than traditional metadata schemas isneeded for reason<strong>in</strong>g.A potential solution approach to solve <strong>the</strong> problemis to use <strong>the</strong> CIDOC CRM ontology. The system“provides def<strong>in</strong>itions <strong>and</strong> a formal structure fordescrib<strong>in</strong>g <strong>the</strong> implicit <strong>and</strong> explicit concepts <strong>and</strong> relationshipsused <strong>in</strong> cultural heritage documentation” 18 .The framework <strong>in</strong>cludes some 80 classes, such as“E22 Man-Made Object”, “E53 Place”, <strong>and</strong> “E52Time-Span”, <strong>and</strong> a large set of some 130 propertiesrelat<strong>in</strong>g <strong>the</strong> entities with each o<strong>the</strong>r, such as “P4 HasTime-Span” <strong>and</strong> “P87 Is Identified By”. Interoperabilityof cultural content can be obta<strong>in</strong>ed by mapp<strong>in</strong>gmetadata st<strong>and</strong>ards to CIDOC CRM.The focus <strong>in</strong> CIDOC CRM is <strong>in</strong> model<strong>in</strong>g conceptsnecessary for represent<strong>in</strong>g <strong>the</strong> documentation semanticsof different metadata schemas used <strong>in</strong> <strong>the</strong> culturaldoma<strong>in</strong>, such as Dubl<strong>in</strong> Core. In contrast, <strong>in</strong>CULTURESAMPO our ma<strong>in</strong> focus is to represent realworld knowledge related to cultural heritage, e.g., <strong>the</strong>subjects that <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>gs <strong>in</strong> figures 2 <strong>and</strong> 3 depict.For this purpose, a different k<strong>in</strong>d of knowledge repre-18 http://cidoc.ics.forth.gr/sentation scheme <strong>and</strong> large doma<strong>in</strong> ontologies conta<strong>in</strong><strong>in</strong>gtens of thous<strong>and</strong>s of doma<strong>in</strong> concepts <strong>and</strong>events are needed.Our solution to <strong>the</strong> problem of semantic <strong>in</strong>teroperabilityis to transform different metadata schemas<strong>in</strong>to a shared, more primitive knowledge representationof <strong>the</strong> real world. In this way, <strong>the</strong> mean<strong>in</strong>g ofdc:date, :timeOfBirth <strong>and</strong> :timeOfDeathcan be made <strong>in</strong>teroperable. By bas<strong>in</strong>g reason<strong>in</strong>g on<strong>the</strong> more primitive representation, more generic <strong>and</strong>fewer rules operat<strong>in</strong>g a smaller set of properties canbe devised. As for <strong>the</strong> knowledge representationscheme, <strong>the</strong> idea of represent<strong>in</strong>g knowledge <strong>in</strong> termsof actions <strong>and</strong> <strong>the</strong>matic relations between actions <strong>and</strong>entities was adopted. This general idea has been appliedwidely <strong>in</strong> computational l<strong>in</strong>guistics <strong>and</strong> naturallanguage process<strong>in</strong>g (cf. e.g. (Zarri, 2003)), <strong>in</strong>knowledge representation research (Sowa, 2000), <strong>and</strong>also <strong>in</strong> CIDOC CRM, where events are of central importance,too.For example, <strong>in</strong> CULTURESAMPO <strong>the</strong> three timerelationsof <strong>the</strong> above examples are reduced <strong>in</strong>toonly one time-relation relat<strong>in</strong>g an <strong>in</strong>stance of anevent type, such as “pa<strong>in</strong>t<strong>in</strong>g event”, “birth event”,or “death event” to a time entity. The mean<strong>in</strong>g of semanticallycomplex properties <strong>in</strong> metadata schemas<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 30


is essentially represented <strong>in</strong> terms of different events<strong>and</strong> related entities. For example, <strong>the</strong> metadata about<strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g “Kullervo departs for <strong>the</strong> war” meansthat <strong>the</strong>re was a pa<strong>in</strong>t<strong>in</strong>g event related with A. Gallen-Kallela, <strong>the</strong> year 1901, <strong>and</strong> Hels<strong>in</strong>ki by <strong>the</strong> <strong>the</strong>maticroles “agent”, “time”, <strong>and</strong> “place”::pa<strong>in</strong>t<strong>in</strong>g_event_45rdf:type cs:pa<strong>in</strong>t<strong>in</strong>g_event ;cs:agent persons:A.Gallen-Kallela ;cs:time "1901" ;cs:place places:Hels<strong>in</strong>ki .Information about <strong>the</strong> artist’s birth <strong>and</strong> death datescan be transformed <strong>in</strong> a similar manner <strong>in</strong>to birth <strong>and</strong>death events, respectively. In this way, we can notonly elim<strong>in</strong>ate various time-related properties from<strong>the</strong> knowledge base but also aggregate knowledgeform different sources on <strong>the</strong> more primite knowledgerepresentation level. In this case, for example, eventbasedbiographical knowledge about <strong>the</strong> life eventsof A. Gallen-Kallela can be enriched with <strong>the</strong> knowledgeabout <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>gs he pa<strong>in</strong>ted.Solv<strong>in</strong>g <strong>the</strong> semantic <strong>in</strong>teroperability problem ofmetadata schemas by us<strong>in</strong>g a primitive event-basedknowledge representation scheme was one of <strong>the</strong> majorchallenges <strong>in</strong> creat<strong>in</strong>g <strong>the</strong> CULTURESAMPO IIprototype <strong>in</strong> 2006. This idea will be described, especiallyfrom <strong>the</strong> semantic brows<strong>in</strong>g viewpo<strong>in</strong>t, <strong>in</strong> moredetail <strong>in</strong> (Ruotsalo <strong>and</strong> Hyvönen, 2006).5 Extend<strong>in</strong>g <strong>Semantic</strong> RepresentationalPower of MetadataSchemasThe idea of us<strong>in</strong>g event-based knowledge representations<strong>in</strong> annotation provides also a solution for creat<strong>in</strong>gsemantically richer annotations. Event-basedannotations have been studied before, e.g., <strong>in</strong> <strong>the</strong>context of annotat<strong>in</strong>g <strong>the</strong> subject of photographs(Schreiber et al., 2001) <strong>and</strong> <strong>in</strong> represent<strong>in</strong>g narratives(Zarri, 2003).To illustrate this idea, re-consider <strong>the</strong> pa<strong>in</strong>t<strong>in</strong>g“Kullervo departs for <strong>the</strong> war” of figure 2. The subjectof content is here annotated by a set of keywords(<strong>in</strong> F<strong>in</strong>nish) <strong>in</strong>clud<strong>in</strong>g “Kullervo”, “horse” <strong>and</strong> “dog”.A problem from <strong>the</strong> knowledge representation viewpo<strong>in</strong>tis that <strong>the</strong> mutual relations of <strong>the</strong> subject annotationsare not known. For example, it is not knownwhe<strong>the</strong>r Kullervo rides a horse, a dog, both of <strong>the</strong>m,or none of <strong>the</strong>m. It is also possible that <strong>the</strong> dog ridesKullervo, <strong>and</strong> so on. Events can be used for elaborat<strong>in</strong>g<strong>the</strong> description, if needed, by specify<strong>in</strong>g valuesfor <strong>the</strong>ir <strong>the</strong>matic roles. In this case, for example,Kullervo would be <strong>in</strong> <strong>the</strong> agent role <strong>and</strong> <strong>the</strong> horse <strong>in</strong><strong>the</strong> patient role <strong>in</strong> a rid<strong>in</strong>g event. This k<strong>in</strong>d of <strong>in</strong>formationcan be essential when search<strong>in</strong>g <strong>the</strong> contents(e.g. to dist<strong>in</strong>guish between riders <strong>and</strong> rid<strong>in</strong>g entities)or when provid<strong>in</strong>g <strong>the</strong> end-user with semantic l<strong>in</strong>ks<strong>and</strong> explanations (e.g. to dist<strong>in</strong>guish l<strong>in</strong>ks to o<strong>the</strong>rrid<strong>in</strong>g pa<strong>in</strong>t<strong>in</strong>gs <strong>in</strong> contrast to o<strong>the</strong>r horse pa<strong>in</strong>t<strong>in</strong>gs).In CULTURESAMPO content comes not only <strong>in</strong> differentforms but is also annotated at different levels ofdetail “vertically”. For example, <strong>the</strong> metadata froma museum database is given as it is <strong>and</strong> may conta<strong>in</strong>only m<strong>in</strong>imal metadata while some o<strong>the</strong>r content maybe described <strong>in</strong> a very detailed manner by us<strong>in</strong>g lotsof Iconclass notations or manually annotated events.In our case, detailed semantic descriptions are be<strong>in</strong>gcreated, for <strong>in</strong>stance, when translat<strong>in</strong>g <strong>the</strong> Kalevalastory <strong>in</strong>to RDF <strong>and</strong> OWL. Here each Kalevala partof potential <strong>in</strong>terest to <strong>the</strong> end-user is annotated <strong>in</strong>terms of events, <strong>the</strong>matic roles <strong>and</strong> o<strong>the</strong>r metadata.Fur<strong>the</strong>rmore, <strong>the</strong> events may constitute larger entities<strong>and</strong> have some additional semantic relations wi<strong>the</strong>ach o<strong>the</strong>r. In CULTURESAMPO I this idea was experimentedby represent<strong>in</strong>g processes <strong>and</strong> events oftwo Kalevala poems, <strong>in</strong> pa<strong>in</strong>t<strong>in</strong>gs, photos, <strong>and</strong> culturalprocesses (Junnila et al., 2006).In CULTURESAMPO II this work cont<strong>in</strong>ues with anew modified event-based model. Fur<strong>the</strong>rmore, <strong>in</strong> <strong>the</strong>new scheme, annotations can be given at three levelsof granularity <strong>in</strong> order to enable vertical <strong>in</strong>teroperability:Keywords In some cases only keywords are availableas subject metadata. At this level <strong>the</strong> annotationis a set of literal values. Even if ontologicalannotations have been used (cf. below),literal keywords may be needed for free <strong>in</strong>dex<strong>in</strong>gwords.Keyconcepts Here <strong>the</strong> annotation is a set of URIsor o<strong>the</strong>r unique references to an ontology or aclassification system, such as Iconclass. The additionalknowledge <strong>in</strong>troduced by keyconceptsw.r.t. us<strong>in</strong>g literal keywords is <strong>the</strong>ir ontologicalconnections. This enables semantic <strong>in</strong>teroperability,as discussed earlier.Thematic roles At this level <strong>the</strong>matic roles betweenactivities <strong>and</strong> o<strong>the</strong>r entities can be specified. Theadditional knowledge w.r.t. us<strong>in</strong>g only keyconceptsis <strong>the</strong> dist<strong>in</strong>ction of <strong>the</strong> roles <strong>in</strong> which <strong>the</strong>keyconcepts are at different metadata descriptions.Each new level of annotation granularity only adds31


new <strong>in</strong>formation with respect to <strong>the</strong> previous level.This means that semantically richer representationscan be easily <strong>in</strong>terpreted at <strong>the</strong> lower level. Eventbaseddescriptions mean at <strong>the</strong> keyconcept level thatonly <strong>the</strong> entity resources that are used <strong>in</strong> <strong>the</strong> eventsare considered, not <strong>the</strong> properties. At <strong>the</strong> keywordlevel, only <strong>the</strong> literal labels of <strong>the</strong> annotations at<strong>the</strong> keyconcept level are considered. This strategyenables, e.g., application <strong>and</strong> <strong>in</strong>tegration of traditionaltext-based search methods with ontologicalannotations—a useful feature s<strong>in</strong>ce much of <strong>the</strong> content<strong>in</strong> semantic portals is <strong>in</strong> textual form <strong>in</strong> any case(e.g., free text descriptions of collection items, biographicalarticles, poems etc.).The ma<strong>in</strong> ontology underly<strong>in</strong>g CULTURESAMPOII is <strong>the</strong> General F<strong>in</strong>nish Upper Ontology YSO(Hyvönen et al., 2005b) of about 20,000 concepts.This lightweight ontology has been created based on<strong>the</strong> widely used General F<strong>in</strong>nish Thesaurus YSA 19 .CULTURESAMPO also makes use of extended versionsof <strong>the</strong> ontologies used <strong>in</strong> MUSEUMFINLAND.6 The PortalCULTURESAMPO II provides <strong>the</strong> end-user with semanticsearch <strong>and</strong> brows<strong>in</strong>g facilities <strong>in</strong> a way similarto MUSEUMFINLAND. <strong>Semantic</strong> multi-facet searchcan be used. S<strong>in</strong>ce <strong>the</strong> ontological model is eventcentric,<strong>the</strong> user is provided with a view classify<strong>in</strong>gverb-like event concepts <strong>in</strong> addition to more traditionalviews (persons, collections, etc.). Figure 5 illustrates<strong>the</strong> search <strong>in</strong>terface.When a search object is selected to view<strong>in</strong>g, recommendedsemantic l<strong>in</strong>ks with explanations are providedfor brows<strong>in</strong>g. Also here <strong>the</strong> event-centricmodel is evident: most recommendations are basedon shar<strong>in</strong>g events <strong>and</strong> roles. Figure 6 shows a searchobject page of a photograph for illustration.In addition, CULTURESAMPO II <strong>in</strong>cludes manynew forms of semantic visualization, especially w.r.t.geographical <strong>in</strong>formation <strong>and</strong> time l<strong>in</strong>es (Kaupp<strong>in</strong>enet al., 2006). For visualiz<strong>in</strong>g search results on <strong>the</strong>map, Google Maps 20 service is used (cf. figure 7). Itwill be used as a search <strong>in</strong>terface, too, later on. In <strong>the</strong>same ve<strong>in</strong>, <strong>the</strong> Simile Time L<strong>in</strong>e 21 has been <strong>in</strong>corporated<strong>in</strong> <strong>the</strong> user <strong>in</strong>terface us<strong>in</strong>g Ajax-technology (cf.figure 8.CultureSampo I was implemented on our old OntoViewsarchitecture, based on Apache Cocoon 22 .19 http://www.vesa.lib.hels<strong>in</strong>ki.fi20 http://maps.google.com/21 http://simile.mit.edu/timel<strong>in</strong>e/22 http://cocoon.apache.org/However, when add<strong>in</strong>g many more cross-l<strong>in</strong>ked componentsto <strong>the</strong> system <strong>in</strong> CULTURESAMPO II, such as<strong>the</strong> timel<strong>in</strong>e, map views, <strong>and</strong> <strong>the</strong> new recommendationsystem, severe limits <strong>in</strong> <strong>the</strong> old architecture becameapparent.A major guidel<strong>in</strong>e <strong>in</strong> our work has been to createapplications that can be configured to work with awide variety of RDF data. To accomplish this, wehave endeavored to build our applications out of modularcomponents that comb<strong>in</strong>e to provide advancedfunctionality. As CULTURESAMPO II became morecomplex <strong>and</strong> started to <strong>in</strong>corporate components fromo<strong>the</strong>r projects, <strong>the</strong>re appeared a need for mak<strong>in</strong>g <strong>the</strong><strong>in</strong>dividual components smaller <strong>and</strong> support<strong>in</strong>g a morecomplex multidirectional control <strong>and</strong> configurationflow between <strong>the</strong>m. Apache Cocoon, however, isbased on a generally sequential pipel<strong>in</strong>e architecture,which is very limited <strong>in</strong> its ability to support any multidirectionalcommunication. And while it was possibleto make use of modular component libraries on<strong>the</strong> Java level, <strong>the</strong>re was no architectural support forkeep<strong>in</strong>g <strong>the</strong>se components ei<strong>the</strong>r universal or configurable,which <strong>in</strong> general resulted <strong>in</strong> <strong>the</strong>m not be<strong>in</strong>gsuch.To solve <strong>the</strong>se problems, a new architecturewas developed for CultureSampo II based on <strong>the</strong>well-known Service Oriented Architecture, Inversionof Control <strong>and</strong> Dependency Injection pr<strong>in</strong>ciples.Specifically, <strong>the</strong> new platform was built on top of<strong>the</strong> Apache HiveM<strong>in</strong>d 23 services <strong>and</strong> configurationmicrokernel.7 DiscussionOur work on CULTURESAMPO suggests that us<strong>in</strong>gevent-based annotations is a promis<strong>in</strong>g approach tocreat<strong>in</strong>g cross-doma<strong>in</strong> semantic portals for severalreasons:1. By us<strong>in</strong>g more accurate semantic descriptionssemantic search <strong>and</strong> brows<strong>in</strong>g (recommendation)can be made more accurate <strong>and</strong> expla<strong>in</strong>ed<strong>in</strong> more detail. The semantic accuracy of annotationscan be extended <strong>in</strong> a natural way by <strong>the</strong>new layer of relational event annotations that explicate<strong>the</strong> <strong>the</strong>matic roles between activities <strong>and</strong>o<strong>the</strong>r entities <strong>in</strong> <strong>the</strong> description. First tests onCULTURESAMPO I <strong>and</strong> II seem to <strong>in</strong>dicate thatthis k<strong>in</strong>d semantic knowledge is vital for semantic<strong>in</strong>formation retrieval tasks (search) <strong>and</strong> forcreat<strong>in</strong>g <strong>in</strong>sightful semantic l<strong>in</strong>k<strong>in</strong>g of contents23 http://jakarta.apache.org/hivem<strong>in</strong>d/<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 32


Figure 5: CULTURESAMPO II search page. Views are on left <strong>and</strong> hits on <strong>the</strong> right.Figure 6: CULTURESAMPO II item page. Metadata is on <strong>the</strong> left <strong>and</strong> recommendation l<strong>in</strong>ks on <strong>the</strong> right.33


Figure 7: Us<strong>in</strong>g Google Maps <strong>in</strong> CULTURESAMPO II for visualiz<strong>in</strong>g search items on <strong>the</strong> map. The items arepositioned based on a place ontology, <strong>and</strong> <strong>in</strong>teractive to obta<strong>in</strong> additional <strong>in</strong>formation.Figure 8: Us<strong>in</strong>g Simile Time L<strong>in</strong>e <strong>in</strong> CULTURESAMPO II for visualiz<strong>in</strong>g search items on <strong>the</strong> time l<strong>in</strong>e, <strong>and</strong> forselect<strong>in</strong>g <strong>the</strong>m for a closer look.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 34


automatically (Junnila et al., 2006; Ruotsalo <strong>and</strong>Hyvönen, 2006).2. Event-based descriptions can be used for represent<strong>in</strong>g<strong>the</strong> mean<strong>in</strong>gs <strong>in</strong> terms of happen<strong>in</strong>gs<strong>and</strong> entities of <strong>the</strong> real world based on differentmetadata schemas. This enables semantic <strong>in</strong>teroperability.3. The result<strong>in</strong>g knowledge representation schemeis simpler <strong>in</strong> terms of <strong>the</strong> number of propertiesthan <strong>the</strong> orig<strong>in</strong>al set of metadata schemas. Thismakes it simpler to implement reason<strong>in</strong>g rulesneeded for <strong>the</strong> <strong>in</strong>telligent services for <strong>the</strong> enduser.The price for more accurate semantics is <strong>the</strong> extracost of creat<strong>in</strong>g <strong>the</strong> annotations. In CULTURESAMPOI all content was manually crafted. In CULTURE-SAMPO II a semi-automatic process has been used.At <strong>the</strong> schema level, <strong>the</strong> content has been enrichedautomatically by a separate, rule-based knowledgetransformation module. This system transforms, e.g.,<strong>the</strong> metadata of pa<strong>in</strong>t<strong>in</strong>gs <strong>in</strong>to pa<strong>in</strong>t<strong>in</strong>g events. At <strong>the</strong>level of enrich<strong>in</strong>g <strong>the</strong> subject descriptions of <strong>the</strong> content,enrich<strong>in</strong>g has been mostly manual by add<strong>in</strong>g <strong>the</strong>maticrole relations between <strong>the</strong> entities used <strong>in</strong> <strong>the</strong>orig<strong>in</strong>al databases. For example, to tell that Kullervorides a horse <strong>and</strong> not vice versa <strong>in</strong> figure 2, a rid<strong>in</strong>gevent with Kullervo <strong>and</strong> an <strong>in</strong>stance of horse <strong>in</strong> <strong>the</strong>proper <strong>the</strong>matic roles has to be created. In pr<strong>in</strong>ciple,<strong>the</strong> mach<strong>in</strong>e <strong>and</strong> ontologies could help <strong>the</strong> annotator<strong>in</strong> her work, if it is known that usually humans ridehorses.The work of annotat<strong>in</strong>g narratives, such as <strong>the</strong>Kullervo poem <strong>in</strong> Kalevala <strong>and</strong> <strong>the</strong> process of farm<strong>in</strong>gby <strong>the</strong> slash <strong>and</strong> burn method <strong>in</strong> CULTURESAMPO I(Junnila et al., 2006) has been done completely manually.However, we are also <strong>in</strong>vestigat<strong>in</strong>g how languagetechnology can be applied to creat<strong>in</strong>g semiautomaticallyannotations for textual contents (Vehvilä<strong>in</strong>enet al., 2006). It is clear, that development oftools that could help <strong>in</strong> creat<strong>in</strong>g annotations will beof outmost importance <strong>in</strong> <strong>the</strong> future.In some cases, like when annotat<strong>in</strong>g unique importantmaterials such as Kalevala, <strong>the</strong> price for detailedannotations can be paid, while <strong>in</strong> many o<strong>the</strong>r casesit is unrealistic to assume that such representationswill be available. In CULTURESAMPO this problemof deal<strong>in</strong>g with materials annotated at different levelsof semantic accuracy is addressed by us<strong>in</strong>g three layersof annotations: keywords, keyconcepts <strong>and</strong> <strong>the</strong>maticroles.The success of <strong>the</strong> CULTURESAMPO will f<strong>in</strong>allybe judged by <strong>the</strong> end-users. Empirical usability testsare needed <strong>in</strong> order to evaluate <strong>the</strong> added value of <strong>the</strong>semantic approach. The first test, based on <strong>the</strong> currentCULTURESAMPO II, has been scheduled for <strong>the</strong>autumn 2006. The goal of this experiment is to testwhe<strong>the</strong>r <strong>the</strong> end-users really f<strong>in</strong>d <strong>the</strong> semantic recommendationsgenerated by <strong>the</strong> event-based model feasible<strong>and</strong> helpful.CULTURESAMPO II is still a research prototype<strong>and</strong> its current version conta<strong>in</strong>s only a few contenttypes <strong>and</strong> less that 10,000 search objects. For example,<strong>in</strong> contrast to CULTURESAMPO I, <strong>the</strong>re are nonarratives <strong>in</strong> <strong>the</strong> system yet, only events. However,new types of content are be<strong>in</strong>g <strong>in</strong>cluded <strong>in</strong> <strong>the</strong> scheme<strong>and</strong> <strong>in</strong> <strong>the</strong> system. Ano<strong>the</strong>r l<strong>in</strong>e of development <strong>in</strong><strong>the</strong> system is design<strong>in</strong>g additional conceptual visualizationtools. On <strong>the</strong> reason<strong>in</strong>g side, spatiotemporalreason<strong>in</strong>g under uncerta<strong>in</strong>ty is be<strong>in</strong>g studied (Kaupp<strong>in</strong>en<strong>and</strong> Hyvönen, 2006) <strong>and</strong> is be<strong>in</strong>g implemented<strong>in</strong> <strong>the</strong> system.We plan to publish CULTURESAMPO on <strong>the</strong> publicweb <strong>in</strong> 2007.AcknowledgmentsOur research is a part of <strong>the</strong> National <strong>Semantic</strong> <strong>Web</strong>Ontology Project <strong>in</strong> F<strong>in</strong>l<strong>and</strong> 24 (F<strong>in</strong>nONTO) 2003-2007 funded ma<strong>in</strong>ly by <strong>the</strong> F<strong>in</strong>nish Fund<strong>in</strong>g Agencyfor Technology <strong>and</strong> Innovation (Tekes).ReferencesM. Doerr. The CIDOC CRM - an ontological approachto semantic <strong>in</strong>teroperability of metadata. AIMagaz<strong>in</strong>e, 24(3):75–92, 2003.E. Hyvönen, E. Mäkela, M. Salm<strong>in</strong>en, A. Valo,K. Viljanen, S. Saarela, M. Junnila, <strong>and</strong> S. Kettula.MuseumF<strong>in</strong>l<strong>and</strong> – F<strong>in</strong>nish museums on <strong>the</strong> semanticweb. Journal of <strong>Web</strong> <strong>Semantic</strong>s, 3(2):224–241,2005a.E. Hyvönen, A. Valo, V. Komula<strong>in</strong>en, K. Seppälä,T. Kaupp<strong>in</strong>en, T. Ruotsalo, M. Salm<strong>in</strong>en, <strong>and</strong>A. Ylisalmi. F<strong>in</strong>nish national ontologies for <strong>the</strong>semantic web - towards a content <strong>and</strong> service <strong>in</strong>frastructure.In Proceed<strong>in</strong>gs of International Conferenceon Dubl<strong>in</strong> Core <strong>and</strong> Metadata Applications(DC 2005), Nov 2005b.M. Junnila. Tietosisältöjen semantt<strong>in</strong>en yhdistäm<strong>in</strong>entoim<strong>in</strong>takuvausten avulla (Event-based approachto semantic l<strong>in</strong>k<strong>in</strong>g of data content). Master’s <strong>the</strong>sis,University of Hels<strong>in</strong>ki, March 6 2006.24 http://www.seco.tkk.fi/projects/f<strong>in</strong>nonto/35


M. Junnila, E. Hyvönen, <strong>and</strong> M. Salm<strong>in</strong>en. Describ<strong>in</strong>g<strong>and</strong> l<strong>in</strong>k<strong>in</strong>g cultural semantic content by us<strong>in</strong>gsituations <strong>and</strong> actions. In <strong>Semantic</strong> <strong>Web</strong> at Work- Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong>Conference STeP 2006, Volume 1., Nov2006.T. Kaupp<strong>in</strong>en, R. Henriksson, J. Väätä<strong>in</strong>en, C. Deichstetter,<strong>and</strong> E. Hyvönen. Ontology-based model<strong>in</strong>g<strong>and</strong> visualization of cultural spatio-temporalknowledge. In <strong>Semantic</strong> <strong>Web</strong> at Work - Proceed<strong>in</strong>gsof <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> ConferenceSTeP 2006, Volume 1., Nov 2006.T. Kaupp<strong>in</strong>en <strong>and</strong> E. Hyvönen. Model<strong>in</strong>g <strong>and</strong> reason<strong>in</strong>gabout changes <strong>in</strong> ontology time series. InR. Kishore, R. Ramesh, <strong>and</strong> R. Sharman, editors,Ontologies: A H<strong>and</strong>book of Pr<strong>in</strong>ciples, Concepts<strong>and</strong> Applications <strong>in</strong> Information Systems.Spr<strong>in</strong>ger-Verlag, Dec 2006. In press.A. Vehvilä<strong>in</strong>en, E. Hyvönen, <strong>and</strong> O. Alm. A semiautomaticsemantic annotation <strong>and</strong> author<strong>in</strong>g toolfor a library help desk service. In Proceed<strong>in</strong>gs of<strong>the</strong> first <strong>Semantic</strong> Author<strong>in</strong>g <strong>and</strong> Annotation Workshop,ISWC-2006, A<strong>the</strong>ns, GA, USA, November2006. To be published.K. Viljanen, T. Känsälä, E. Hyvönen, <strong>and</strong> E. Mäkelä.Ontodella - a projection <strong>and</strong> l<strong>in</strong>k<strong>in</strong>g service forsemantic web applications. In Proceed<strong>in</strong>gs of<strong>the</strong> 17th International Conference on Database<strong>and</strong> Expert Systems Applications (DEXA 2006),Krakow, Pol<strong>and</strong>. IEEE, September 4-8 2006.G. P. Zarri. <strong>Semantic</strong> annotations <strong>and</strong> semanticweb us<strong>in</strong>g nkrl (narrative knowledge representationlanguage). In Proceed<strong>in</strong>gs of <strong>the</strong> 5th InternationalConference on Enterprise Information Systems,Angers, France (ICEIS 2003), pages 387–394, 2003.E. Mäkelä, E. Hyvönen, <strong>and</strong> S. Saarela. Ontogator— a semantic view-based search eng<strong>in</strong>e service forweb applications. In Proceed<strong>in</strong>gs of <strong>the</strong> 5th International<strong>Semantic</strong> <strong>Web</strong> Conference (ISWC 2006),Nov 2006.E. Mäkelä, E. Hyvönen, S. Saarela, <strong>and</strong> K. Viljanen.OntoViews – a tool for creat<strong>in</strong>g semantic web portals.In Proceed<strong>in</strong>gs of 3rd International <strong>Semantic</strong><strong>Web</strong> Conference (ISWC 2004), Hiroshima, Japan,November 2004.T. Ruotsalo <strong>and</strong> E. Hyvönen. Knowledge-basedrecommendation based on heterogenous metadataschemas, 2006. Paper under contruction.M. Salm<strong>in</strong>en. Kuvien ja videoiden semantt<strong>in</strong>ensisällönkuvailu (<strong>Semantic</strong> content description ofimages <strong>and</strong> videos. Master’s <strong>the</strong>sis, University ofHels<strong>in</strong>ki, May 2006.A. T. Schreiber, B. Dubbeldam, J. Wielemaker, <strong>and</strong>B. J. Wiel<strong>in</strong>ga. Ontology-based photo annotation.IEEE Intelligent Systems, 16:66–74, May/June2001.J. Sowa. Knowledge Representation. Logical,Philosophical, <strong>and</strong> Computational Foundations.Brooks/Cole, 2000.J. van den Berg. Subject retrieval <strong>in</strong> pictorial<strong>in</strong>formation systems. In Proceed<strong>in</strong>gs of<strong>the</strong> 18th <strong>in</strong>ternational congress of historical sciences,Montreal, Canada, pages 21–29, 1995.http://www.iconclass.nl/texts/history05.html.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 36


Ontology-based Model<strong>in</strong>g <strong>and</strong> Visualization of CulturalSpatio-temporal KnowledgeTomi Kaupp<strong>in</strong>enUniversity of Hels<strong>in</strong>ki <strong>and</strong>Hels<strong>in</strong>ki University of Technology (TKK) Media Technology<strong>Semantic</strong> Comput<strong>in</strong>g Research Group (SeCo)http://www.seco.tkk.fi/tomi.kaupp<strong>in</strong>en@tkk.fiRiikka HenrikssonHels<strong>in</strong>ki University of Technology (TKK)Laboratory of Geo<strong>in</strong>formation <strong>and</strong> Position<strong>in</strong>g TechnologyFIN-02151 Espoo, F<strong>in</strong>l<strong>and</strong>riikka.henriksson@tkk.fiJari Väätä<strong>in</strong>enGeological Survey of F<strong>in</strong>l<strong>and</strong>P.O. Box 96FIN-02151 Espoo, F<strong>in</strong>l<strong>and</strong>jari.vaata<strong>in</strong>en@gtk.fiChrist<strong>in</strong>e DeichstetterJohannes Kepler Universität L<strong>in</strong>z <strong>and</strong>Hels<strong>in</strong>ki University of Technology (TKK)c.deichstetter@gmx.atEero HyvönenHels<strong>in</strong>ki University of Technology (TKK) <strong>and</strong>University of Hels<strong>in</strong>ki<strong>Semantic</strong> Comput<strong>in</strong>g Research Group (SeCo)http://www.seco.tkk.fi/eero.hyvonen@tkk.fiAbstractGeographic knowledge is essential <strong>in</strong> h<strong>and</strong>l<strong>in</strong>g a large variety of resources, <strong>in</strong>clud<strong>in</strong>g cultural contentssuch as museum artifacts, maps, books, photographs, <strong>and</strong> videos. The metadata of such resourcesoften need to refer to a geographic entity or region, for example to <strong>the</strong> place where an artifact wasproduced, used, or found. In this paper, we exam<strong>in</strong>e how geographical knowledge may be representedontologically to enable different types of searches, visualization, <strong>and</strong> <strong>in</strong>ference <strong>in</strong> cultural semanticportals <strong>and</strong> o<strong>the</strong>r semantic geo-applications. In particular, we show how change <strong>in</strong> time betweenhistorical regions can be explicated as an ontology <strong>and</strong> be used for reason<strong>in</strong>g. Regard<strong>in</strong>g search <strong>and</strong>visualization, we show how maps of different time periods can be visualized as transparent overlayson top of Google Maps, how cultural content can be visualized on <strong>the</strong>m, how geo-based queries canbe formulated based on maps, <strong>and</strong> how additional services, such as a meta-search system, can be<strong>in</strong>tegrated <strong>in</strong> <strong>the</strong> mash-up system. The work presented is be<strong>in</strong>g <strong>in</strong>tegrated at <strong>the</strong> practical level <strong>in</strong> <strong>the</strong>cultural semantic cross-doma<strong>in</strong> portal CultureSampo.1 IntroductionA large proportion of cultural resources such as artifacts,collections, books, photographs, <strong>and</strong> videos aregeographically referenced <strong>and</strong> thus should be identifiedby search terms that refer to locations (Joneset al., 2001; Stuckenschmidt <strong>and</strong> Harmelen, 2004).This is because <strong>the</strong>y are produced, found or used<strong>in</strong> those locations, or <strong>the</strong>y have some o<strong>the</strong>r relationshipto <strong>the</strong> location <strong>in</strong> question. By georeferenc<strong>in</strong>g<strong>the</strong> resources (Schlieder et al., 2001), different spatialqueries can be enabled <strong>in</strong> order to f<strong>in</strong>d <strong>in</strong>terest<strong>in</strong>gconnections.The term georeference refers to <strong>the</strong> act of assign<strong>in</strong>glocations to geographic objects, which are entitiesrepresent<strong>in</strong>g some part on or near <strong>the</strong> Earth’s surface.The simplest form of georeferenc<strong>in</strong>g is place nam<strong>in</strong>g.However, <strong>the</strong> problem of represent<strong>in</strong>g this geographicallyreferenced knowledge is complex due to manyreasons. Place names are usually unique only with<strong>in</strong>37


an area or doma<strong>in</strong> of <strong>the</strong> Earth’s surface (e.g. cityname is usually unique with<strong>in</strong> <strong>the</strong> doma<strong>in</strong> of a state)<strong>and</strong> <strong>the</strong>y may become obsolete through <strong>the</strong> time. Forexample, different countries <strong>and</strong> o<strong>the</strong>r regions aremerged, split <strong>and</strong> renamed due to reorganizations at<strong>the</strong> social <strong>and</strong> cultural levels thus caus<strong>in</strong>g new territorialshapes. Place names may also have differentmean<strong>in</strong>g to different people, <strong>and</strong> with<strong>in</strong> <strong>the</strong> differentcontexts <strong>the</strong>y are used. Well-known systems for georeferenc<strong>in</strong>guniquely across doma<strong>in</strong>s are postal codes<strong>and</strong> geographic coord<strong>in</strong>ate systems (<strong>the</strong> system of latitude<strong>and</strong> longitude), from which <strong>the</strong> former is basedon a human activity <strong>and</strong> <strong>the</strong> latter one on physical features(Longley et al., 2001; Mark et al., 2001).Ontology-driven <strong>in</strong>formation systems (Guar<strong>in</strong>o,1998) have been proposed to provide means to represent<strong>and</strong> manage this k<strong>in</strong>d of complex knowledge.The idea beh<strong>in</strong>d modern systems is to (Visser, 2004)“geo-enable” <strong>the</strong> <strong>Web</strong> <strong>and</strong> allow for complex spatial<strong>in</strong>formation <strong>and</strong> services accessible <strong>and</strong> useful withall k<strong>in</strong>ds of applications e.g. from library systems tomuseum systems.In <strong>in</strong>formation systems, <strong>the</strong> term ontology shouldbe considered as a synonym to conceptual model <strong>in</strong>a way that it is <strong>in</strong>dependent of its philosophical roots(Welty <strong>and</strong> Guar<strong>in</strong>o, 2001). The idea is that modeledontologies capture <strong>the</strong> properties, classes <strong>and</strong> <strong>the</strong>irmutual relationships (Guar<strong>in</strong>o <strong>and</strong> Welty, 2002) —i.e. <strong>the</strong> essential semantics of <strong>the</strong> Universe of Discourse(UoD). For example, <strong>the</strong> spatial overlap of regions(Visser, 2004; Stuckenschmidt <strong>and</strong> Harmelen,2004) is important <strong>in</strong> a sense that it affects <strong>the</strong> wayontological annotation of resources should be made.This knowledge concern<strong>in</strong>g geographic, spatialentities has to be represented <strong>in</strong> a mach<strong>in</strong>eunderst<strong>and</strong>able,reusable <strong>and</strong> shareable way so thatit can be used, for example, <strong>in</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>(Berners-Lee, 1998; Berners-Lee et al., 2001) as ontologies.In this paper we exam<strong>in</strong>e how ontological knowledgecan be used <strong>in</strong> order to visualize different k<strong>in</strong>dsof georeferenced <strong>in</strong>formation <strong>and</strong> to enable differentprecise searches <strong>and</strong> meta searches. We are especially<strong>in</strong>terested <strong>in</strong> how <strong>the</strong> results could be used at a practicallevel <strong>in</strong> a cultural semantic cross-doma<strong>in</strong> portalsuch as CULTURESAMPO (Hyvönen et al., 2006)<strong>and</strong> <strong>in</strong> creat<strong>in</strong>g a prototype of a national geo-ontologyserver.In essence, we propose that <strong>the</strong> follow<strong>in</strong>g spatiotemporal,ontological issues should be h<strong>and</strong>led <strong>in</strong> astate-of-<strong>the</strong>-art-system.1. Ontological representation of spatial entities <strong>and</strong><strong>the</strong>ir mutual relationships.2. Inference based on explication of complexknowledge. We will show how knowledge abouthistorical changes <strong>in</strong> regions can be modeled <strong>and</strong>utilized <strong>in</strong> <strong>in</strong>formation retrieval.3. Visualization of semantic web content on maps.We show how cultural content can be visualizedon maps by us<strong>in</strong>g Google Maps as an externalservice.4. Multi-map visualization by us<strong>in</strong>g different k<strong>in</strong>dsof maps simultaneously. It is shown how mapsof different time periods can be used by us<strong>in</strong>gtransparent overlays, which gives <strong>the</strong> end-user ak<strong>in</strong>d magnify<strong>in</strong>g glass to zoom <strong>in</strong>to history.5. Polygon-based searches. We will illustrate howto express polygons, <strong>and</strong> map <strong>the</strong>m <strong>in</strong>to ontologicallocation <strong>in</strong>dividuals (<strong>in</strong>stances) such ascities, <strong>in</strong> order to annotate <strong>and</strong> search semanticcontent.6. Comb<strong>in</strong><strong>in</strong>g map visualization with o<strong>the</strong>r services.Visualization on <strong>the</strong> map can be easilycomb<strong>in</strong>ed with o<strong>the</strong>r services. As a demonstrationof how this can add value, a meta search serviceimplemented on top of <strong>the</strong> semantic portalMuseumF<strong>in</strong>l<strong>and</strong> (Hyvönen et al., 2005) is presented.In <strong>the</strong> follow<strong>in</strong>g we will overview how we have addressed<strong>the</strong>se issues by creat<strong>in</strong>g ontologies, reason<strong>in</strong>geng<strong>in</strong>es <strong>and</strong> build<strong>in</strong>g work<strong>in</strong>g demonstrations us<strong>in</strong>gexist<strong>in</strong>g portals.2 Representation of OntologicalRelationshipsSpatial structures <strong>and</strong> <strong>the</strong>ir mutual relations areclearly <strong>the</strong> most essential form of geographic knowledge.The pr<strong>in</strong>ciples by which <strong>the</strong> geographic doma<strong>in</strong>- <strong>and</strong> geo-ontologies - are primarily structuredfrom <strong>the</strong> <strong>the</strong>oretical viewpo<strong>in</strong>t are topology (<strong>the</strong> <strong>the</strong>oryof boundaries, contact <strong>and</strong> separation), mereology(<strong>the</strong> <strong>the</strong>ory of part/whole) <strong>and</strong> geometry (Market al., 2001). This is because geographic objects arenot merely located <strong>in</strong> space; <strong>the</strong>y are tied <strong>in</strong>tr<strong>in</strong>sicallyto space <strong>in</strong>herit<strong>in</strong>g many of <strong>the</strong> structural propertiesfrom <strong>the</strong> Earth’s surface. Reason<strong>in</strong>g <strong>in</strong> termsof part-of relationships is powerful <strong>and</strong> appears to bewell-suited for geographic representation <strong>and</strong> <strong>in</strong>ference.Part-of relationships are used for conta<strong>in</strong>menthierarchies <strong>and</strong> are closely related to representation<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 38


of different types of adm<strong>in</strong>istrative hierarchies. However,mereology alone cannot deal with some verybasic spatial relations, such as <strong>the</strong> relations with<strong>in</strong>,conta<strong>in</strong>s, <strong>and</strong>overlaps, <strong>and</strong> this is where topologicalreason<strong>in</strong>g is required (Casati et al., 1998; Mark et al.,2001; Jones et al., 2002).There has been an active philosophical discussionabout <strong>the</strong> essential spatial relations (e.g. <strong>in</strong> (Varzi,1996)) <strong>and</strong> different attempts to formalize <strong>the</strong> relations,such as RCC-8 (R<strong>and</strong>ell et al., 1992) <strong>and</strong>(Egenhofer, 1989). Fur<strong>the</strong>rmore, methods to measurespatial relevance, such as topology (of neighbor<strong>in</strong>gregions), directions (of related regions), <strong>and</strong> distances(between regions) comb<strong>in</strong>ed with partonomical relevance(cf. (Stuckenschmidt <strong>and</strong> Harmelen, 2004),chapter 8) have been developed.<strong>Semantic</strong> web ontologies represent geographicknowledge (among o<strong>the</strong>r types of knowledge) <strong>in</strong>terms of <strong>the</strong> Resource Description Framework (RDF)(Brickley <strong>and</strong> Guha, 2004) <strong>and</strong> <strong>the</strong> <strong>Web</strong> OntologyLanguage (OWL) 1 . RDF <strong>and</strong> Uniform ResourceIdentifiers (URI) form <strong>the</strong> basis of <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>.OWL <strong>and</strong> RDF are used for def<strong>in</strong><strong>in</strong>g concepts <strong>and</strong>metadata, <strong>and</strong> URIs are used for identify<strong>in</strong>g resourcesused <strong>in</strong> <strong>the</strong> descriptions uniquely.As a part of our research, we are develop<strong>in</strong>g 2 aF<strong>in</strong>nish geo-ontology SUO (Suomala<strong>in</strong>en paikkaontologia)us<strong>in</strong>g <strong>Semantic</strong> <strong>Web</strong> technologies RDF <strong>and</strong>OWL. Accord<strong>in</strong>g to <strong>the</strong> plans SUO-ontology willmodel different classes of geographical places - ei<strong>the</strong>rman-made or natural - <strong>and</strong> <strong>the</strong>ir topological <strong>and</strong>mereological relations, as well as relations def<strong>in</strong><strong>in</strong>gcoord<strong>in</strong>ate-based geometry for po<strong>in</strong>ts, curves <strong>and</strong>polygons. Currently SUO <strong>in</strong>cludes approximately150 classes such as city, prov<strong>in</strong>ce, graveyard, lake orriver. These classes will be populated with thous<strong>and</strong>sof <strong>in</strong>stanses from <strong>the</strong> Place Name Register 3 .3 Explicat<strong>in</strong>g Change of RegionsGeographic regions change over time. Regions, forexample, are split <strong>and</strong> merged due to various reorganizationsat <strong>the</strong> social <strong>and</strong> cultural levels. For example,<strong>in</strong> 1991 East Germany <strong>and</strong> West Germany weremerged to form Germany, as depicted <strong>in</strong> figure 1.WestGermany, East Germany <strong>and</strong> Germany are here <strong>in</strong>dividualsof an ontology. The x-axis depicts time <strong>and</strong><strong>the</strong> y-axis <strong>the</strong> relative areas of <strong>the</strong> countries. The his-1 http://www.w3.org/2001/sw/2 We have used The Protégé Ontology Editor available at(http://protege.stanford.edu/).3 Place Name Register was obta<strong>in</strong>ed from <strong>the</strong> National L<strong>and</strong>Survey of F<strong>in</strong>l<strong>and</strong>tory is full of events like this (Smith <strong>and</strong> Brogaard,2003). Budapest was formed via <strong>the</strong> unification offormer towns Buda <strong>and</strong> Pest, <strong>the</strong> Czech Republic <strong>and</strong>Slovak Republic were formed through <strong>the</strong> separationof Czechoslovakia, <strong>and</strong> so on. This k<strong>in</strong>d of spatialchanges of <strong>in</strong>dividuals at <strong>the</strong> geographical, social <strong>and</strong>cultural levels are problematic from <strong>the</strong> <strong>in</strong>formationannotation <strong>and</strong> retrieval viewpo<strong>in</strong>t. Content is annotatedby us<strong>in</strong>g historical <strong>and</strong> contemporary concepts<strong>and</strong> names. However, when query<strong>in</strong>g, concepts <strong>and</strong>names from o<strong>the</strong>r time periods may be used, whichleads to low recall <strong>and</strong> precision.Figure 1: Germany, East Germany <strong>and</strong> West Germanyover time <strong>and</strong> space.To address <strong>the</strong> problem we developed an ontologicalmethod (Kaupp<strong>in</strong>en <strong>and</strong> Hyvönen, 2006, 2005)for represent<strong>in</strong>g spatio-temporal changes <strong>in</strong> regionsthat essentially def<strong>in</strong>e a geo-ontology time series.The figure 2 illustrates <strong>the</strong> steps of us<strong>in</strong>g <strong>the</strong> method.In <strong>the</strong> <strong>in</strong>itial data of ontological changes are ma<strong>in</strong>ta<strong>in</strong>edas a spreadsheet table to ease <strong>the</strong> edit<strong>in</strong>g 4 .Each change, such as a merge or a split of two counties,is represented by a l<strong>in</strong>e <strong>in</strong> <strong>the</strong> table <strong>and</strong> is calleda "change bridge".This table is <strong>the</strong>n transformed automatically <strong>in</strong>toRDF-form represent<strong>in</strong>g <strong>the</strong> changes <strong>and</strong> regions <strong>in</strong>volved.A set of rules is used to construct temporalregions based on <strong>the</strong> change <strong>in</strong>formation. As a simpleexample, s<strong>in</strong>ce we know that an adm<strong>in</strong>istrationalregion of Viipuri has changed both <strong>in</strong> 1906 <strong>and</strong> <strong>in</strong>1921, <strong>the</strong> area of Viipuri has rema<strong>in</strong>ed <strong>the</strong> same between(<strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g of) 1906 <strong>and</strong> (<strong>the</strong> end of) 1920<strong>and</strong> hence a temporal region Viipuri (1906-1920) iscreated. In a similar manner <strong>the</strong> rule set is used toconstruct all <strong>the</strong> o<strong>the</strong>r temporal regions <strong>in</strong> <strong>the</strong> ontologytime series. At <strong>the</strong> next phase, <strong>the</strong> essential propertiesare <strong>in</strong>ferred for <strong>the</strong>se temporal regions. We declaredthat <strong>the</strong> essential property (Guar<strong>in</strong>o <strong>and</strong> Welty,4 We have used <strong>the</strong> freely available OpenOffi ce Calc(http://www.openoffi ce.org/) but <strong>the</strong>re are o<strong>the</strong>r alternatives availableas well.39


Initial Ontology ConstructionRule−based Reason<strong>in</strong>g ofTemporal RegionsInference of Areal Sizes<strong>and</strong> Partonomic RelationsFigure 3: Annotation <strong>and</strong> <strong>in</strong>dex<strong>in</strong>g concepts matched.Inference of Coveragescal cover<strong>in</strong>gs are made explicit us<strong>in</strong>g <strong>the</strong> sizes ofgeospatial resources.Ontology time−series3. Global Cover<strong>in</strong>gs. Global overlaps are calculatedby cha<strong>in</strong><strong>in</strong>g local cover<strong>in</strong>gs <strong>and</strong> by consider<strong>in</strong>gdifferent change paths between concepts.Figure 2: Process of creat<strong>in</strong>g an ontology time-series.4. Visualization of global cover<strong>in</strong>gs.2002) for each region is <strong>the</strong> size of <strong>the</strong> area. For example,s<strong>in</strong>ce we know that <strong>the</strong> area of Hels<strong>in</strong>ki hasbeen measured dur<strong>in</strong>g <strong>the</strong> year 2005, we can <strong>in</strong>ferthat a temporal region Hels<strong>in</strong>ki (1966-NOW) has thisareal value as it has rema<strong>in</strong>ed <strong>the</strong> same between 1966<strong>and</strong> now. Each temporal region <strong>in</strong> <strong>the</strong> system has anown identify<strong>in</strong>g URI. This means that if <strong>the</strong> area of aregion changes, <strong>the</strong>re will be a new URI correspond<strong>in</strong>gto a new region with <strong>the</strong> new value for <strong>the</strong> size ofthat area.An <strong>in</strong>ference eng<strong>in</strong>e <strong>the</strong>n reasons <strong>the</strong> coverages(i.e., how much a region X overlaps an o<strong>the</strong>r regionY, <strong>and</strong> vice versa) between all temporal regions of<strong>the</strong> ontology. The calculation is based on <strong>the</strong> <strong>in</strong>itialsizes of <strong>the</strong> regions <strong>and</strong> <strong>the</strong>ir change history. The coveragescannot be calculated directly based <strong>the</strong> actualpolygons of <strong>the</strong> regions, because <strong>the</strong>se are not known,only <strong>the</strong> sizes <strong>and</strong> <strong>the</strong> changes. In <strong>the</strong> below, <strong>the</strong> basicsteps of <strong>the</strong> method are shortly described.1. Local Bridges. Changes are modeled as <strong>in</strong>dividualsof basic change classes, such as split <strong>and</strong>merged.2. Local Cover<strong>in</strong>gs. The bridges represented <strong>in</strong>RDF are transformed <strong>in</strong>to a form where <strong>the</strong> lo-With <strong>the</strong> method, it has been calculated, e.g.,that <strong>the</strong> temporal region Lappeenranta (1989-) covers12% of <strong>the</strong> temporal region Viipuri (-1906). Theglobal coverage <strong>in</strong>formation can be used to match annotations<strong>and</strong> queries, as depicted <strong>in</strong> figure 3. Forexample, <strong>the</strong> photo depicted <strong>in</strong> <strong>the</strong> figure is stored <strong>in</strong>a database of <strong>the</strong> Geological Survey of F<strong>in</strong>l<strong>and</strong> GTK(Väätä<strong>in</strong>en, 2004). Accord<strong>in</strong>g to <strong>the</strong> attached metadata,<strong>the</strong> photo is taken with<strong>in</strong> <strong>the</strong> region Viipuri (-1906). This means that <strong>the</strong>re is a 12% change that <strong>the</strong>photo is actually with<strong>in</strong> <strong>the</strong> boarders of <strong>the</strong> currentcity of Lappeenranta <strong>in</strong> F<strong>in</strong>l<strong>and</strong>. This may be a surpriseto many, s<strong>in</strong>ce Viipuri was annexed to <strong>the</strong> SovietUnion after <strong>the</strong> World War II. The explanation is <strong>the</strong>annexed Viipuri constitutes a temporal region that isdifferent from Viipuri (-1906).The method is be<strong>in</strong>g applied to construct a completeF<strong>in</strong>nish time-location ontology (Suomen Ajall<strong>in</strong>enPaikkaOntologia, SAPO) of counties <strong>and</strong> communess<strong>in</strong>ce <strong>the</strong> mid 1800’s, <strong>and</strong> to ma<strong>in</strong>ta<strong>in</strong> <strong>the</strong> ontology<strong>in</strong> <strong>the</strong> future. It has already been identified(Väätä<strong>in</strong>en, 2004) that from <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g of 20thCentury <strong>the</strong>re are already over 1100 changes (such ascreation, merge, split, <strong>and</strong> name change) <strong>in</strong> F<strong>in</strong>nishcommunes.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 40


Figure 4: Us<strong>in</strong>g multiple maps simultaneously. Ahistorical Karelian map depict<strong>in</strong>g <strong>the</strong> park of Monrepos<strong>in</strong> Viipuri is shown semi-transparently on topof a modern satellite image provided by <strong>the</strong> GoogleMaps service.4 Visualization us<strong>in</strong>g MultipleSimultaneous MapsIn order to visualize historical geo-content annotatedaccord<strong>in</strong>g to old temporal regions <strong>and</strong> place names,historical maps are needed. On <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>, also<strong>the</strong> current view of places is usually needed at <strong>the</strong>same time to bridge <strong>the</strong> conceptual cap between regionsof different era. To facilitate this, we created ascheme for us<strong>in</strong>g several overlay<strong>in</strong>g maps simultaneously<strong>in</strong> visualizations. Creation of several layers isa common (de Berg et al., 2000) way to make mapsmore readable.The maps <strong>and</strong> satellite images of <strong>the</strong> Google Mapsservice were used as <strong>the</strong> contemporary view. To provide<strong>the</strong> historical view, we used a set F<strong>in</strong>nish mapsfrom <strong>the</strong> early 20 th century cover<strong>in</strong>g <strong>the</strong> area of <strong>the</strong>annexed Karelia before <strong>the</strong> World War II. The mapswere digitized <strong>and</strong> provided by <strong>the</strong> National L<strong>and</strong>Survey of F<strong>in</strong>l<strong>and</strong> 5 . In addition, a map of <strong>the</strong> Espooregion <strong>in</strong> 1909, provided by <strong>the</strong> Geological Survey ofF<strong>in</strong>l<strong>and</strong>, was used.Figure 4 illustrates our scheme. On <strong>the</strong> left, a satelliteGoogle Maps image of <strong>the</strong> contemporary Viipuriregion is shown. In <strong>the</strong> middle, a smaller rectangulararea is shown with a semi-transparent 6 old Karelianmap that is positioned correctly <strong>and</strong> is of <strong>the</strong> samescale as <strong>the</strong> Google Maps image. This smaller view5 http://www.maanmittauslaitos.fi /default.asp?site=36 The level of transparency can be altered <strong>in</strong> <strong>the</strong> demonstration.shows <strong>the</strong> park of Monrepos <strong>in</strong> Viipuri, a famousF<strong>in</strong>nish pre-war cultural site that nowadays is a part ofRussia. The place cannot be found <strong>in</strong> current maps asit was, mak<strong>in</strong>g it difficult for modern users to locate<strong>the</strong> place geographically. Old maps <strong>and</strong> names on itcould be of substantial benefit when us<strong>in</strong>g <strong>the</strong> visualization<strong>in</strong> annotat<strong>in</strong>g or search<strong>in</strong>g content by maps<strong>in</strong> systems such as CultureSampo (Hyvönen et al.,2006). The simultaneous views are useful also whencompar<strong>in</strong>g geo-<strong>in</strong>formation from different eras (e.g.,how construction of cities has evolved) or from different<strong>the</strong>matic perspectives (e.g., view<strong>in</strong>g a geologicalmap on top of a satellite image).In order to move around <strong>the</strong> user is able to use <strong>the</strong>zoom<strong>in</strong>g <strong>and</strong> navigation functions of Google Maps<strong>and</strong> <strong>the</strong> Karelian view is automatically scaled <strong>and</strong> positionedaccord<strong>in</strong>gly. In order to facilitate this, <strong>the</strong>Karelian maps were processed accord<strong>in</strong>g to <strong>the</strong> follow<strong>in</strong>gsteps:1. Cropp<strong>in</strong>g <strong>and</strong> conceptualization of <strong>the</strong> map images.The digitized maps had a lot of useful <strong>in</strong>formation<strong>in</strong> addition to <strong>the</strong> actual maps <strong>in</strong> <strong>the</strong>image files. For example, <strong>the</strong> place name, scale,old coord<strong>in</strong>ates etc. This knowledge was extracted<strong>and</strong> represented as an ontology. Additional<strong>in</strong>formation <strong>in</strong> <strong>the</strong> marg<strong>in</strong>s of <strong>the</strong> map imageswere cropped away.2. Projection of <strong>the</strong> images. Projection was donemanually by adjust<strong>in</strong>g <strong>the</strong> images by dragg<strong>in</strong>g<strong>and</strong> stretch<strong>in</strong>g <strong>the</strong>m <strong>in</strong> an image edit<strong>in</strong>g program<strong>in</strong>dividually us<strong>in</strong>g reference po<strong>in</strong>ts. One couldalso use a specialized GIS software to do <strong>the</strong>projection conversion. However, when this wastested, no clear benefits were obta<strong>in</strong>ed. For example,relative positional accuracy between <strong>the</strong>satellite images <strong>and</strong> <strong>the</strong> projected map imagesdid not <strong>in</strong>crease remarkably <strong>and</strong> <strong>the</strong> process wasra<strong>the</strong>r time consum<strong>in</strong>g.3. Renam<strong>in</strong>g <strong>the</strong> image files accord<strong>in</strong>g <strong>the</strong> GoogleMaps API specifications.4. Publish<strong>in</strong>g of <strong>the</strong> image files on a public webserver.5 Us<strong>in</strong>g Po<strong>in</strong>ts to Explicate aSearch AreaGeographic objects are traditionally modeled aspo<strong>in</strong>ts, l<strong>in</strong>es, polygons or fields <strong>in</strong> spatial databases.Depend<strong>in</strong>g on <strong>the</strong> <strong>in</strong>formation a po<strong>in</strong>t carries, it canbe ei<strong>the</strong>r an entity po<strong>in</strong>t, a label po<strong>in</strong>t or an area po<strong>in</strong>t.41


An entity po<strong>in</strong>t represents <strong>the</strong> coord<strong>in</strong>ate position ofa po<strong>in</strong>t entity such as a tower, a label po<strong>in</strong>t carriestextual <strong>in</strong>formation of <strong>the</strong> object <strong>in</strong> question <strong>and</strong> anarea po<strong>in</strong>t represents <strong>the</strong> center po<strong>in</strong>t coord<strong>in</strong>ates ofa polygon (Zhang <strong>and</strong> Goodchild, 2002). There hasalso been discussion (Schlieder et al., 2001) about extend<strong>in</strong>gontologies (gazetteers) with more exact positionslike a po<strong>in</strong>t or polygon <strong>in</strong> a given coord<strong>in</strong>atereference system. For represent<strong>in</strong>g areas, polygonswould clearly be most satisfy<strong>in</strong>g.However, polygon data is (Schlieder et al., 2001)often 1) proprietary or 2) may be unavailable for e.g.historic regions. Fur<strong>the</strong>rmore, 3) detailed polygondata is computationally expensive to process <strong>and</strong> 4)<strong>the</strong> exactness of <strong>the</strong> polygon data should be set toa needed abstraction level. Area po<strong>in</strong>ts are morewidely available. In F<strong>in</strong>l<strong>and</strong>, names <strong>and</strong> coord<strong>in</strong>atesare available <strong>in</strong> <strong>the</strong> Place Name Register produced by<strong>the</strong> National L<strong>and</strong> Survey of F<strong>in</strong>l<strong>and</strong>.We have created a method, n-po<strong>in</strong>t search, forsearch<strong>in</strong>g this k<strong>in</strong>d of coord<strong>in</strong>ate data. A search query<strong>in</strong> this method is done by po<strong>in</strong>t<strong>in</strong>g out n po<strong>in</strong>ts on amap. The user clicks on <strong>the</strong> map <strong>and</strong> a polygon isformed, accord<strong>in</strong>gly.The idea is that <strong>the</strong> n po<strong>in</strong>ts def<strong>in</strong>e ei<strong>the</strong>r a simplepolygon (without an <strong>in</strong>ner r<strong>in</strong>g) or a complex polygon(with 1...n <strong>in</strong>ner r<strong>in</strong>gs) that bounds <strong>the</strong> search area <strong>in</strong>question. In o<strong>the</strong>r words, <strong>the</strong> def<strong>in</strong>ed polygon can beei<strong>the</strong>r complex, concave or convex. If an area po<strong>in</strong>tof a certa<strong>in</strong> place is found <strong>in</strong>side <strong>the</strong> user-given polygon,it is retrieved <strong>and</strong> added to <strong>the</strong> results. Match<strong>in</strong>gplaces were found us<strong>in</strong>g <strong>the</strong> Jordan Curve Theorem(Ha<strong>in</strong>es, 1994).N-po<strong>in</strong>t search would also support <strong>the</strong> polygonoverlays if <strong>the</strong> regions would be modeled as polygons.This would lead even more precise search results,but <strong>in</strong> our case such polygon data is not availablecurrently. However, <strong>in</strong> <strong>the</strong> future we plan to createpolygons <strong>and</strong> use <strong>the</strong>m as well.We have also created a special h<strong>and</strong>l<strong>in</strong>g for twospecial cases, namely, for those cases where n =1or n = 2. If n = 1 a circle is drawn around <strong>the</strong>po<strong>in</strong>t 1 <strong>and</strong> <strong>the</strong> places that are <strong>in</strong>side <strong>the</strong> circle areretrieved. An alternative treatment for <strong>the</strong> n =1situationwould be to f<strong>in</strong>d <strong>the</strong> nearest places. Naturallyboth of <strong>the</strong>se treatments could be offered for a user.And if n =2, we create a bound<strong>in</strong>g box, where po<strong>in</strong>t1 <strong>and</strong> po<strong>in</strong>t 2 are <strong>the</strong> opposite corners, e.g. South-West <strong>and</strong> North-East corners, of <strong>the</strong> search area.We have implemented <strong>the</strong> n-po<strong>in</strong>t search as aGoogle Maps application where Scalable VectorGraphics (SVG) (Ferraiolo et al., 2003) is used fordraw<strong>in</strong>g <strong>the</strong> polygon as an o<strong>the</strong>r transparent layer ontop of a map. An example of us<strong>in</strong>g <strong>the</strong> n-po<strong>in</strong>t searchis depicted <strong>in</strong> figure 5. The n polygon corners aredepicted as small crosses. The system has found outthree historical communes of <strong>the</strong> annexed Karelia, Viipuri,Makslahti, <strong>and</strong> Koivisto, whose center po<strong>in</strong>tsare situated with<strong>in</strong> <strong>the</strong> user-specified search polygon.In <strong>the</strong> future, we plan to use <strong>the</strong> idea of userdef<strong>in</strong>edpolygons also <strong>in</strong> ontology population <strong>and</strong> <strong>in</strong>annotat<strong>in</strong>g contents.Figure 5: Search results us<strong>in</strong>g <strong>the</strong> n-po<strong>in</strong>t search: Viipuri,Koivisto <strong>and</strong> Makslahti are matched.6 Comb<strong>in</strong><strong>in</strong>g Visualization withO<strong>the</strong>r ServicesVisualizations on <strong>the</strong> map can be comb<strong>in</strong>ed <strong>in</strong>teractivelywith services on <strong>the</strong> web. In this section it isshown how cultural content can be projected on a mapservice as <strong>in</strong>teractive elements that can be used to <strong>in</strong>vokerelated services, such as search eng<strong>in</strong>es.To test this idea, we have built an applicationthat uses Google Maps API 7 to visualize hundredsof F<strong>in</strong>nish locations on a zoomable map. User cansearch <strong>in</strong>formation from different portals with locationnames just by click<strong>in</strong>g <strong>the</strong> location on a map.Figure 6 depicts <strong>the</strong> idea. On <strong>the</strong> left pane, aGoogle Maps view is shown where <strong>the</strong> red buttonsrepresent F<strong>in</strong>nish communes <strong>and</strong> o<strong>the</strong>r places of <strong>in</strong>terest.The user has clicked on a button on Hels<strong>in</strong>ki.As a result, <strong>the</strong> system has queried MuseumF<strong>in</strong>l<strong>and</strong>(Hyvönen et al., 2005) with <strong>the</strong> <strong>the</strong> concept of“Hels<strong>in</strong>ki” as ei<strong>the</strong>r <strong>the</strong> place of manufacture or place7 http://www.google.com/apis/maps/<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 42


Figure 6: A searchable map <strong>in</strong>terl<strong>in</strong>ked with <strong>the</strong> semantic portal MuseumF<strong>in</strong>l<strong>and</strong>.of usage of <strong>the</strong> artifacts <strong>in</strong>cluded <strong>in</strong> <strong>the</strong> semantic portal.The result is shown on <strong>the</strong> right pane. In addition,a bubble with several l<strong>in</strong>ks is opened on <strong>the</strong> left. Thel<strong>in</strong>ks are search requests to different search eng<strong>in</strong>eswhere <strong>the</strong> location selected is used as a query parameter.The search eng<strong>in</strong>es engaged <strong>in</strong> <strong>the</strong> application <strong>in</strong>clude,<strong>in</strong> addition to <strong>the</strong> default search eng<strong>in</strong>e MuseumF<strong>in</strong>l<strong>and</strong>,for example Wikipedia 8 , Google Images9 , Muisti-project cultural portal 10 <strong>and</strong> <strong>the</strong> Old photosservice 11 provided by <strong>the</strong> Geological Survey of F<strong>in</strong>l<strong>and</strong>.The search l<strong>in</strong>ks are created automatically by construct<strong>in</strong>ga search query to <strong>the</strong> search eng<strong>in</strong>es. For example,s<strong>in</strong>ce <strong>the</strong> URL’s of Wikipedia are simple <strong>and</strong>permanent, <strong>and</strong> <strong>in</strong>clude <strong>the</strong> keyword at <strong>the</strong> end of <strong>the</strong>URL, <strong>the</strong> correspond<strong>in</strong>g place name could be used as<strong>the</strong> keyword. For <strong>the</strong> capital of F<strong>in</strong>l<strong>and</strong>, Hels<strong>in</strong>ki, forexample, <strong>the</strong> system guessed that it has a Wiki pagehttp://en.wikipedia.org/wiki/Hels<strong>in</strong>ki which happensto be <strong>the</strong> case. By select<strong>in</strong>g <strong>the</strong> l<strong>in</strong>k, this page isshown on <strong>the</strong> right pane <strong>in</strong>stead of <strong>the</strong> MuseumF<strong>in</strong>l<strong>and</strong>page. Also an automatic l<strong>in</strong>k<strong>in</strong>g to <strong>the</strong> wwwpagesof <strong>the</strong> municipalities <strong>in</strong> F<strong>in</strong>l<strong>and</strong> is provided.However, <strong>the</strong>re are two problems with this approach:First, <strong>the</strong> automatically constructed l<strong>in</strong>k or8 http://www.wikipedia.org/9 http://images.google.com10 http://www.lib.hels<strong>in</strong>ki.fi /memory/etusivue.html11 http://www.gtk.fi /palvelut/<strong>in</strong>fo/geokuvat/<strong>in</strong>dex.phpquery may lead to a non-exist<strong>in</strong>g page or it mightreturn empty results. For example, some Wikipediapages may be miss<strong>in</strong>g. Never<strong>the</strong>less, this way peoplecan be guided to <strong>the</strong> correspond<strong>in</strong>g Wikipedia pageto contribute <strong>the</strong>ir knowledge about places. Second,place names have several mean<strong>in</strong>gs that cannot necessarilybe disambiguated. For example, “Nokia” is acity <strong>in</strong> F<strong>in</strong>l<strong>and</strong>, a telecom company, a person, <strong>and</strong> ananimal <strong>in</strong> F<strong>in</strong>nish. <strong>Semantic</strong> disambiguation could bemade, if <strong>the</strong> services were support<strong>in</strong>g ontology-basedquery<strong>in</strong>g based on URIs. For example, when us<strong>in</strong>gMuseumF<strong>in</strong>l<strong>and</strong> this would be possible because <strong>the</strong>system supports search based on concepts (URIs) <strong>in</strong>addition to literal keywords.In <strong>the</strong> “Geo-MuseumF<strong>in</strong>l<strong>and</strong>” application of figure6 places are visualized on <strong>the</strong> map <strong>and</strong> used for construct<strong>in</strong>gqueries to search eng<strong>in</strong>es. We also made arelated application for <strong>the</strong> semantic portal CULTURE-SAMPO (Hyvönen et al., 2006) where search hits arevisualized <strong>in</strong> <strong>the</strong> same ve<strong>in</strong>. CULTURESAMPO uses aplace ontology that is based on <strong>the</strong> one used <strong>in</strong> MuseumF<strong>in</strong>l<strong>and</strong><strong>and</strong> def<strong>in</strong>ed <strong>in</strong> RDF. Language (OWL)(Smith et al., 2004). However, <strong>the</strong> orig<strong>in</strong>al place ontologydid not have any coord<strong>in</strong>ates. The place ontologywas <strong>the</strong>refore enriched by <strong>in</strong>troduc<strong>in</strong>g a hasCoord<strong>in</strong>atePo<strong>in</strong>t-property<strong>and</strong> by extract<strong>in</strong>g values for<strong>the</strong>se properties from <strong>the</strong> Place Name Registry obta<strong>in</strong>edfrom <strong>the</strong> National L<strong>and</strong> Survey of F<strong>in</strong>l<strong>and</strong>.The result is a visualization of <strong>the</strong> search results on<strong>the</strong> map. The implementation was done as a Google43


Maps application where Ajax 12 is used for data <strong>in</strong>terchangeof search results between <strong>the</strong> browser <strong>and</strong> <strong>the</strong>server. The figure 7 shows how <strong>the</strong> search results arevisualized as <strong>in</strong>teractive buttons. The user has clickedon a button depict<strong>in</strong>g <strong>the</strong> hits related to <strong>the</strong> city ofOutokumpu, <strong>and</strong> a bubble is opened with l<strong>in</strong>ks to <strong>the</strong>actual artifacts, <strong>in</strong> this case two bas<strong>in</strong>s (“vati”). Byselect<strong>in</strong>g a l<strong>in</strong>k, <strong>the</strong> user will get a more detailed explanationabout <strong>the</strong> item, <strong>and</strong> semantic recommendationsto related materials customary.ReferencesTim Berners-Lee. <strong>Semantic</strong> web road map. Technicalreport, World Wide <strong>Web</strong> Consortium, September1998.Tim Berners-Lee, Jim Hendler, <strong>and</strong> Ora Lassila. Thesemantic web. Scientific American, 284(5):34–43,May 2001.D. Brickley <strong>and</strong> R. V. Guha. RDF Vocabulary DescriptionLanguage 1.0: RDF Schema W3C Recommendation10 February 2004. Recommendation,World Wide <strong>Web</strong> Consortium, February 2004.R. Casati, Barry Smith, <strong>and</strong> A. C. Varzi. Ontologicaltools for geographic representation. In N. Guar<strong>in</strong>o,editor, Formal Ontology <strong>in</strong> Information Systems,pages 77–85. IOS Press, Amsterdam, 1998.Figure 7: Visualization of search results <strong>in</strong> semanticportal CULTURESAMPO.7 ConclusionsIn this paper we exam<strong>in</strong>ed how ontological knowledgecan be used <strong>in</strong> order to represent <strong>and</strong> visualizedifferent k<strong>in</strong>ds of georeferenced data <strong>and</strong> to enablesearches. We proposed <strong>and</strong> demonstrated explicationof complex spatio-temporal relations between geographicalobjects, search based on spatio-temporalontologies, query formulation based on maps, <strong>and</strong> visualizationof historical contents on old <strong>and</strong> contemporarymaps.The systems overviewed will be used when creat<strong>in</strong>ggeo-based applications <strong>and</strong> tools with<strong>in</strong> <strong>the</strong><strong>the</strong> National <strong>Semantic</strong> <strong>Web</strong> Ontology Project <strong>in</strong> F<strong>in</strong>l<strong>and</strong>13 , especially <strong>in</strong> CULTURESAMPO <strong>and</strong> <strong>in</strong> creat<strong>in</strong>ga prototype of a national geo-ontology server.AcknowledgmentsOur research is a part of <strong>the</strong> National <strong>Semantic</strong> <strong>Web</strong>Ontology Project <strong>in</strong> F<strong>in</strong>l<strong>and</strong> 14 (F<strong>in</strong>nONTO) 2003-2007 funded ma<strong>in</strong>ly by <strong>the</strong> F<strong>in</strong>nish Fund<strong>in</strong>g Agencyfor Technology <strong>and</strong> Innovation (Tekes).12 http://en.wikipedia.org/wiki/AJAX13 http://www.seco.tkk.fi /projects/fi nnonto/14 http://www.seco.tkk.fi /projects/fi nnonto/Mark de Berg, Marc van Kreveld, Mark Overmars,<strong>and</strong> Otfried Schwarzkopf. Computational geometry:algorithms <strong>and</strong> applications. Spr<strong>in</strong>ger-Verlag<strong>New</strong> York, Inc., Secaucus, NJ, USA, second edition,2000.M. Egenhofer. A formal def<strong>in</strong>ition of b<strong>in</strong>ary topologicalrelationships. In Foundations of Data Organization<strong>and</strong> Algorithms, 3rd International Conference,FODO 1989, volume 367 of Lecture Notes<strong>in</strong> Computer Science, pages 457–472, 1989.Jon Ferraiolo, Dean Jackson, <strong>and</strong> Jun Fujisawa. ScalableVector Graphics (SVG) 1.1 specification W3Crecommendation. Technical report, World Wide<strong>Web</strong> Consortium W3C, January 14 2003.N. Guar<strong>in</strong>o. Formal ontology <strong>and</strong> <strong>in</strong>formation systems.In Proceed<strong>in</strong>gs of <strong>the</strong> 1st International Conferenceon Formal Ontologies <strong>in</strong> Information Systems.IOS Press, 1998. Trento, Italy.Nicola Guar<strong>in</strong>o <strong>and</strong> Christopher A. Welty. Evaluat<strong>in</strong>gontological decisions with ontoclean. Communicationsof <strong>the</strong> ACM, 45(2):61–65, 2002.Eric Ha<strong>in</strong>es. Po<strong>in</strong>t <strong>in</strong> polygon strategies. In PaulHeckbert, editor, Graphics Gems IV, pages 24–46,Academic Press, 1994.Eero Hyvönen, Eetu Mäkelä, Mirva Salm<strong>in</strong>en, ArttuValo, Kim Viljanen, Samppa Saarela, Miikka Junnila,<strong>and</strong> Suvi Kettula. MuseumF<strong>in</strong>l<strong>and</strong> – f<strong>in</strong>nishmuseums on <strong>the</strong> semantic web. Journal of <strong>Web</strong> <strong>Semantic</strong>s,3(2):25, 2005.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 44


Eero Hyvönen, Tuukka Ruotsalo, Thomas Häggström,Mirva Salm<strong>in</strong>en, Miikka Junnila, MikkoVirkkilä, Mikko Haaramo, Tomi Kaupp<strong>in</strong>en, EetuMäkelä, <strong>and</strong> Kim Viljanen. CultureSampo—F<strong>in</strong>nish culture on <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>: The vision<strong>and</strong> first results. In <strong>Semantic</strong> <strong>Web</strong> at Work — Proceed<strong>in</strong>gsof <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong>Conference STeP 2006, volume 1, Hels<strong>in</strong>ki, F<strong>in</strong>l<strong>and</strong>,2006.C. Jones, R. Purves, A. Ruas, M. S<strong>and</strong>erson, M. Sester,M. van Kreveld, <strong>and</strong> R. Weibel. Spatial <strong>in</strong>formationretrieval <strong>and</strong> geographical ontologies – anoverview of <strong>the</strong> spirit project, 2002.Christopher B. Jones, Harith Alani, <strong>and</strong> DouglasTudhope. Geographical <strong>in</strong>formation retrieval withontologies of place. In In Proceed<strong>in</strong>gs of <strong>the</strong> InternationalConference on Spatial Information Theory,pages 322–355. Spr<strong>in</strong>ger-Verlag, 2001.Tomi Kaupp<strong>in</strong>en <strong>and</strong> Eero Hyvönen. Model<strong>in</strong>g coveragebetween geospatial resources. In Posters <strong>and</strong>Demos at <strong>the</strong> 2nd European <strong>Semantic</strong> <strong>Web</strong> ConferenceESWC2005, pages 49–50, Heraklion, Crete,2005.Tomi Kaupp<strong>in</strong>en <strong>and</strong> Eero Hyvönen. Model<strong>in</strong>g <strong>and</strong>Reason<strong>in</strong>g about Changes <strong>in</strong> Ontology Time Series,chapter 11 <strong>in</strong> book: Ontologies: A H<strong>and</strong>bookof Pr<strong>in</strong>ciples, Concepts <strong>and</strong> Applications <strong>in</strong> InformationSystems. Integrated Series <strong>in</strong> InformationSystems, Volume 14. Spr<strong>in</strong>ger-Verlag, 2006.Barry Smith <strong>and</strong> Berit Brogaard. Sixteen days. TheJournal of Medic<strong>in</strong>e <strong>and</strong> Philosophy, 28:45–78,2003.Michael K. Smith, Chris Welty, <strong>and</strong> Deborah L.McGu<strong>in</strong>ness. W3C OWL <strong>Web</strong> Ontology LanguageGuide W3C Recommendation, February 2004.He<strong>in</strong>er Stuckenschmidt <strong>and</strong> Frank Van Harmelen. InformationShar<strong>in</strong>g on <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>. Spr<strong>in</strong>ger-Verlag, Berl<strong>in</strong> Heidelberg, <strong>New</strong> York, 2004.A.C. Varzi. Parts, Wholes <strong>and</strong> Part-whole Relations:<strong>the</strong> Prospects of Mereotopology. Data <strong>and</strong> KnowledgeEng<strong>in</strong>eer<strong>in</strong>g, 20:259–286, 1996.Ubbo Visser. Intelligent <strong>in</strong>formation <strong>in</strong>tegration for<strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>. Spr<strong>in</strong>ger-Verlag, Berl<strong>in</strong> Heidelberg,<strong>New</strong> York, 2004.Jari Väätä<strong>in</strong>en. A database conta<strong>in</strong><strong>in</strong>g descriptionsof changes of counties <strong>in</strong> F<strong>in</strong>l<strong>and</strong>. The GeologicalSurvey of F<strong>in</strong>l<strong>and</strong> (GSF), Espoo, F<strong>in</strong>l<strong>and</strong>, 2004.Christopher A. Welty <strong>and</strong> Nicola Guar<strong>in</strong>o. Support<strong>in</strong>gontological analysis of taxonomic relationships.Data Knowledge Eng<strong>in</strong>eer<strong>in</strong>g, 39(1):51–74,2001.J. Zhang <strong>and</strong> M. Goodchild. Uncerta<strong>in</strong>ty <strong>in</strong> GeographicalInformation. Taylor & Francis, London,2002.Paul A. Longley, Michael F. Goodchild, David J.Maguire, <strong>and</strong> David W. Rh<strong>in</strong>d. Geographic InformationSystems <strong>and</strong> Science. John Wiley & Sons,Engl<strong>and</strong>, August 2001.David M. Mark, André Skup<strong>in</strong>, <strong>and</strong> Barry Smith.Features, objects, <strong>and</strong> o<strong>the</strong>r th<strong>in</strong>gs: Ontologicaldist<strong>in</strong>ctions <strong>in</strong> <strong>the</strong> geographic doma<strong>in</strong>. In SpatialInformation Theory: Foundations of GeographicInformation Science (Lecture Notes <strong>in</strong> ComputerScience 2205), pages 488–502, 2001.D.A. R<strong>and</strong>ell, Z.Cui, <strong>and</strong> A.G. Cohn. A SpatialLogic based on Regions <strong>and</strong> Connection. In Int.Conf. on Knowledge Representation <strong>and</strong> Reason<strong>in</strong>g,Boston, October 1992.C. Schlieder, T. Vögele, <strong>and</strong> U. Visser. Qualitativespatial representation for <strong>in</strong>formation retrieval bygazetteers. In Proceed<strong>in</strong>gs of Conference of SpatialInformation Theory (COSIT), volume 2205, pages336–351, Morrow Bay, CA, 2001.45


Improv<strong>in</strong>g <strong>the</strong> Quality of Medication by <strong>Semantic</strong> <strong>Web</strong>TechnologiesJuha PuustjärviLappeenranta University of TechnologyP.O.Box 20 FIN-53851juha.puustjarvi@lut.fiLeena PuustjärviThe Pharmacy of KäpyläKäpyläntie 8 Hels<strong>in</strong>ki F<strong>in</strong>l<strong>and</strong>leena.puustjarvi@kolumbus.fiAbstractDur<strong>in</strong>g <strong>the</strong> past few years several organizations <strong>in</strong> <strong>the</strong> healthcare sector have produced st<strong>and</strong>ards<strong>and</strong> representation forms us<strong>in</strong>g XML. For example, patient records, blood analysis <strong>and</strong> electronicprescriptions are typically represented as XML-documents. This generalization of XMLtechnologiessets a promis<strong>in</strong>g start<strong>in</strong>g po<strong>in</strong>t for <strong>the</strong> <strong>in</strong>teroperability of <strong>the</strong> various organizations <strong>in</strong><strong>the</strong> healthcare sector. However, <strong>the</strong> <strong>in</strong>troduction of XML is not enough but many o<strong>the</strong>r XML-basedtechnologies have to be <strong>in</strong>troduced <strong>in</strong> order to achieve a seamless <strong>in</strong>teroperability between <strong>the</strong> organizationswith<strong>in</strong> <strong>the</strong> healthcare sector. The ma<strong>in</strong> goal of this article is to show <strong>the</strong> ga<strong>in</strong>s <strong>the</strong> <strong>in</strong>teroperabilityof <strong>the</strong> health care systems <strong>and</strong> <strong>the</strong> deployment of <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong> technologies canprovide for electronic prescription systems. In particular, we present an e-prescription ontology <strong>and</strong><strong>the</strong> query<strong>in</strong>g facilities that <strong>the</strong> deployed ontology provides. We also illustrate how <strong>the</strong> coord<strong>in</strong>ationof <strong>the</strong> <strong>in</strong>teroperability required by electronic prescription systems can be automated by utiliz<strong>in</strong>gXML-based process languages.1 IntroductionElectronic prescription is <strong>the</strong> electronic transmissionof prescriptions of pharmaceutical products fromlegally professionally qualified healthcare practitionersto registered pharmacies. The scope of <strong>the</strong> prescribedproducts varies from country to country aspermitted by government authorities or health <strong>in</strong>surancecarriers. For electronic prescription to be acceptedby <strong>the</strong> physicians, pharmacies <strong>and</strong> patients itmust provide added benefits to all participants.The problems related to prescrib<strong>in</strong>g medicationare discussed <strong>in</strong> many practitioner reports <strong>and</strong> publicnational plans, e.g., <strong>in</strong> (Bobbie, et al., 2005) <strong>and</strong>(Chadwick <strong>and</strong> Mundy, 2004). These plans shareseveral similar motivations <strong>and</strong> reasons for <strong>the</strong> implementationof electronic prescription systems(EPSs). These <strong>in</strong>clude: reduction of medication errors,speed<strong>in</strong>g up <strong>the</strong> prescription order<strong>in</strong>g process,better statistical data for research purposes, <strong>and</strong> f<strong>in</strong>ancialsav<strong>in</strong>gs.A salient trend <strong>in</strong> medication is that <strong>the</strong> numberof new medications <strong>in</strong>creases every year. As eachdrug has its unique <strong>in</strong>dications, cross-reactivity,complications <strong>and</strong> costs also <strong>the</strong> prescrib<strong>in</strong>g medicationbecomes still more complex every year. However,apply<strong>in</strong>g comput<strong>in</strong>g technology for prescrib<strong>in</strong>gmedication this complexity can be alleviated <strong>in</strong>many ways.Today <strong>the</strong>re exists a great diversity of compet<strong>in</strong>gtechnological solutions for electronic prescriptionsystems. For example, a citizen may have a memorycard, or electronic prescriptions may be transferredvia <strong>the</strong> <strong>in</strong>ternet or EDI. There is also diversity <strong>in</strong>used distribution, e.g., drugs may be transferred tohome or <strong>the</strong>y may be picked from pharmacies.In addition, many prescription writer applicationstake advantage of <strong>in</strong>ternet <strong>and</strong> o<strong>the</strong>r applicationssuch as expert databases, <strong>and</strong> systems that <strong>in</strong>clude<strong>in</strong>formation about patients’ demographic data<strong>and</strong> medication history. So, modern prescriptionwriters are <strong>in</strong>ternet-based applications that <strong>in</strong>teroperatewith many o<strong>the</strong>r health care <strong>in</strong>formation systems.Dur<strong>in</strong>g <strong>the</strong> past few years several organizations<strong>in</strong> <strong>the</strong> healthcare sector have produced st<strong>and</strong>ards <strong>and</strong>representation forms us<strong>in</strong>g XML. For example,patient records, blood analysis <strong>and</strong> electronic pre-<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 46


scriptions are typically represented as XMLdocuments(Jung, 2006; Liu et al, 2001; Mattocks,2005; Stalidis et al 2001; Woolman, 2001). Thisgeneralization of XML-technologies sets a promis<strong>in</strong>gstart<strong>in</strong>g po<strong>in</strong>t for <strong>the</strong> <strong>in</strong>teroperability of <strong>the</strong> variousorganizations <strong>in</strong> <strong>the</strong> healthcare sector. However,<strong>the</strong> <strong>in</strong>troduction of XML itself is not enough butalso many o<strong>the</strong>r XML-based technologies have to be<strong>in</strong>troduced <strong>in</strong> order to achieve a seamless <strong>in</strong>teroperabilitybetween <strong>the</strong> organizations with<strong>in</strong> <strong>the</strong>healthcare sector.In this article we illustrate <strong>the</strong> <strong>in</strong>teroperabilitywith<strong>in</strong> <strong>the</strong> healthcare sector from electronic prescriptionspo<strong>in</strong>t of view. In particular, we illustrate:How XML-based technologies can be utilized<strong>in</strong> modell<strong>in</strong>g <strong>the</strong> concepts that are relatedto prescription writ<strong>in</strong>g.How <strong>Web</strong> service technology can be used<strong>in</strong> implement<strong>in</strong>g <strong>the</strong> <strong>in</strong>teroperability ofelectronic prescription system <strong>and</strong> o<strong>the</strong>rhealthcare systems.How <strong>the</strong> coord<strong>in</strong>ation of <strong>the</strong> <strong>in</strong>teroperabilityrequired by electronic prescription systemscan be automated by utiliz<strong>in</strong>g XMLbasedprocess modell<strong>in</strong>g languages. In particularwe show how <strong>the</strong> Bus<strong>in</strong>ess ProcessModel<strong>in</strong>g Notation (BPMN) (BPMN,2006) <strong>and</strong> Bus<strong>in</strong>ess Process ExecutionLanguage for <strong>Web</strong> Services (BMEL4WS)(BPEL4WS, 2006) can be used for automat<strong>in</strong>g<strong>the</strong> coord<strong>in</strong>ation of electronic prescriptionprocesses.The rest of <strong>the</strong> paper is organized as follows. First <strong>in</strong>Section 2, we give a motivation by illustrat<strong>in</strong>g apaper based prescrib<strong>in</strong>g system <strong>and</strong> electronic prescrib<strong>in</strong>gsystem. Especially we will illustrate <strong>the</strong>way <strong>the</strong> physician can utilize <strong>the</strong> new query<strong>in</strong>g facilities<strong>the</strong> EPS (Electronic Prescription System).Then, <strong>in</strong> Section 3, we first give a short <strong>in</strong>troductionto ontologies <strong>and</strong> <strong>the</strong>n we present a simple e-prescription ontology. We also illustrate how <strong>the</strong>ontology can be utilized <strong>in</strong> prescrib<strong>in</strong>g medication.Then, <strong>in</strong> Section 4, we consider <strong>the</strong> architecture ofan electronic prescription system based on serviceoriented architecture. In Section 5, we illustrate howBus<strong>in</strong>ess Process Modell<strong>in</strong>g Notation can be used <strong>in</strong>automat<strong>in</strong>g <strong>the</strong> coord<strong>in</strong>ation of electronic prescriptionprocesses. F<strong>in</strong>ally, Section 6 concludes <strong>the</strong> paperby discuss<strong>in</strong>g <strong>the</strong> advantages <strong>and</strong> disadvantagesof our proposed approach.2 Prescription processesWe now illustrate a scenario of an electronic prescriptionprocess that <strong>in</strong>teroperates with o<strong>the</strong>r healthcare systems. The process goes as follows: first apatient visits a physician for diagnosis. In prescrib<strong>in</strong>gmedication <strong>the</strong> physician uses a prescriptionwriter. The electronic prescription writer (EPW)used by <strong>the</strong> physician may <strong>in</strong>teract with many o<strong>the</strong>rhealth care systems <strong>in</strong> construct<strong>in</strong>g <strong>the</strong> prescription.For example, <strong>the</strong> EPW may query previous prescriptionsof <strong>the</strong> patient from <strong>the</strong> prescription hold<strong>in</strong>gstore. The EPW may also query patient’s recordsfrom o<strong>the</strong>r health care systems.Once <strong>the</strong> physician has constructed <strong>the</strong> prescription<strong>the</strong> EPW may send <strong>the</strong> prescription to <strong>the</strong> medicalexpert system which checks (<strong>in</strong> <strong>the</strong> case of multidrug treatment) whe<strong>the</strong>r <strong>the</strong> prescribed drugs havemutual negative effects, <strong>and</strong> whe<strong>the</strong>r <strong>the</strong>y havenegative effects with o<strong>the</strong>r ongo<strong>in</strong>g medical treatmentof <strong>the</strong> patient. Then <strong>the</strong> EPW sends <strong>the</strong> prescriptionto a medical database system, whichchecks whe<strong>the</strong>r <strong>the</strong> dose is appropriate.The medical database may also provide drugspecificpatient education <strong>in</strong> multiple languages. Itmay <strong>in</strong>clude <strong>in</strong>formation about proper usage of <strong>the</strong>drug, warn<strong>in</strong>gs <strong>and</strong> precautions, <strong>and</strong> it can bepr<strong>in</strong>ted to <strong>the</strong> patient. Then <strong>the</strong> EPW sends <strong>the</strong> prescriptionto a pric<strong>in</strong>g system, which checks whe<strong>the</strong>rsome of <strong>the</strong> drugs can be changed to a cheaper drug.(This activity is called generic substitution <strong>and</strong> itaims to promote cost effective drug <strong>the</strong>rapies <strong>and</strong> toclarify <strong>the</strong> responsibilities of <strong>the</strong> prescriber <strong>and</strong> <strong>the</strong>pharmacy as well as to enhance both patient autonomy<strong>and</strong> <strong>the</strong> efficacy of <strong>the</strong> pharmaceutical market.)Once <strong>the</strong> checks <strong>and</strong> possible changes have beendone <strong>the</strong> physician signs <strong>the</strong> prescription electronically.Then <strong>the</strong> prescription is encrypted <strong>and</strong> sent toan electronic prescription hold<strong>in</strong>g store. Basically<strong>the</strong> hold<strong>in</strong>g store may be centralized or distributedstore. The patient will also receive <strong>the</strong> prescription<strong>in</strong> <strong>the</strong> paper form, which <strong>in</strong>cludes two barcodes. Thefirst identifies <strong>the</strong> address of <strong>the</strong> prescription <strong>in</strong> <strong>the</strong>hold<strong>in</strong>g store, <strong>and</strong> <strong>the</strong> second is <strong>the</strong> encryption keywhich allows <strong>the</strong> pharmacist to decrypt <strong>the</strong> prescription.The patient is usually allowed to take <strong>the</strong> prescriptionto any pharmacy <strong>in</strong> <strong>the</strong> country. At <strong>the</strong>pharmacy <strong>the</strong> patient gives <strong>the</strong> prescription to <strong>the</strong>pharmacist. The pharmacist will <strong>the</strong>n scan both barcodesby <strong>the</strong> dispens<strong>in</strong>g application, which <strong>the</strong>nrequests <strong>the</strong> electronic prescription from <strong>the</strong> electronicprescription hold<strong>in</strong>g store. After this <strong>the</strong>pharmacist will dispense <strong>the</strong> drugs to <strong>the</strong> patient <strong>and</strong>generates an electronic dispensation note. F<strong>in</strong>ally<strong>the</strong>y electronically sign <strong>the</strong> dispensation note <strong>and</strong>47


send it back to <strong>the</strong> electronic prescription hold<strong>in</strong>gstore.3 Deploy<strong>in</strong>g ontologies <strong>in</strong> prescrib<strong>in</strong>gmedicationThe term ontology orig<strong>in</strong>ates from philosophywhere it is used as <strong>the</strong> name of <strong>the</strong> study of <strong>the</strong> natureof existence (Gryber, 1993). In <strong>the</strong> context ofcomputer science, <strong>the</strong> commonly used def<strong>in</strong>ition is“An ontology is an explicit <strong>and</strong> formal specificationof a conceptualization” (Antoniou <strong>and</strong> Harmelen,2004). So it is a general vocabulary of a certa<strong>in</strong>doma<strong>in</strong>. Essentially <strong>the</strong> used ontology must beshared <strong>and</strong> consensual term<strong>in</strong>ology as it is used for<strong>in</strong>formation shar<strong>in</strong>g <strong>and</strong> exchange. On <strong>the</strong> o<strong>the</strong>rh<strong>and</strong>, ontology tries to capture <strong>the</strong> mean<strong>in</strong>g of aparticular subject doma<strong>in</strong> that corresponds to what ahuman be<strong>in</strong>g knows about that doma<strong>in</strong>. It also triesto characterize that mean<strong>in</strong>g <strong>in</strong> terms of concepts<strong>and</strong> <strong>the</strong>ir relationships.Ontology is typically represented as classes,properties attributes <strong>and</strong> values. So <strong>the</strong>y also providea systematic way to st<strong>and</strong>ardize <strong>the</strong> used metadataitems. Metadata items describe certa<strong>in</strong> importantcharacteristics of <strong>the</strong>ir target <strong>in</strong> a compact form.The metadata describ<strong>in</strong>g <strong>the</strong> content of a document(e.g., an electronic prescription) is commonly calledsemantic metadata. For example, <strong>the</strong> keywords attachedto many scientific articles represent semanticmetadataEach ontology describes a doma<strong>in</strong> of discourse.It consists of a f<strong>in</strong>ite set of concepts <strong>and</strong> <strong>the</strong> relationshipbetween <strong>the</strong> concepts. For example, with<strong>in</strong>electronic prescription systems patient, drug, <strong>and</strong> e-prescription are typical concepts. These concepts<strong>and</strong> <strong>the</strong>ir relationships are graphically presented <strong>in</strong>Figure 3.medic<strong>in</strong>al productliteralprecedescorrespondspricedrug<strong>in</strong>cludese-prescriptionproduct group<strong>in</strong>cludessubstitutabledrugIn Figure 1, ellipses are classes <strong>and</strong> boxes are properties.The ontology <strong>in</strong>cludes for example <strong>the</strong> follow<strong>in</strong>g<strong>in</strong>formation:E-prescription is prescribed by a physician,<strong>and</strong> it is targeted to a patient.An e-prescription of a patient may precedeo<strong>the</strong>r e-prescription of <strong>the</strong> patient, i.e., <strong>the</strong>e-prescriptions of <strong>the</strong> same patient arecha<strong>in</strong>ed.Each e-prescription <strong>in</strong>cludes a drugEach drug has a price, <strong>and</strong> it may have oneor more substitutable drugs.Each drug corresponds a medic<strong>in</strong>al product,e.g., acetylsalicylic acid is a drug <strong>and</strong>its correspondence medic<strong>in</strong>al product isAspir<strong>in</strong>Each drug belongs to a product group, e.g.,aspir<strong>in</strong> belongs to pa<strong>in</strong>killers.Each patient record is associated to a patient<strong>and</strong> it is written by a physicianThe <strong>in</strong>formation of <strong>the</strong> ontology of Figure 1 canbe utilized <strong>in</strong> many ways. For example it can be <strong>in</strong>automat<strong>in</strong>g <strong>the</strong> generic substitution, i.e., <strong>in</strong> chang<strong>in</strong>gmeciuc<strong>in</strong>al products cheaper medic<strong>in</strong>al productswith<strong>in</strong> substitutable products. It has turned out that<strong>in</strong> F<strong>in</strong>l<strong>and</strong> <strong>the</strong> average price reduction of all substitutableproducts has been 10-15 %. In addition <strong>the</strong>automation of <strong>the</strong> generic substitution decreases <strong>the</strong>workload of <strong>the</strong> pharmacies.In Figure 2, <strong>the</strong> ontology of Figure 1 is extendedby <strong>in</strong>stances, i.e., it <strong>in</strong>cludes <strong>the</strong> <strong>in</strong>stances of <strong>the</strong>classes drug, medic<strong>in</strong>al product, physician, patient<strong>and</strong> e-prescription. So allows a wide variety of queries<strong>in</strong>clud<strong>in</strong>g:Give me all medic<strong>in</strong>al products thatcorresponds <strong>the</strong> drug asetylsalicylicacid.What drugs is <strong>in</strong>cluded <strong>in</strong> <strong>the</strong> medic<strong>in</strong>alproduct Aspir<strong>in</strong>.isPrescribedByphysicianisTargetedAtpatientGive me all prescriptions prescribed toJack TaylorisWrittenBye-patient recordisAssociatedGive me all prescriptions prescribed byphysician John SmithFigure 1. An e-prescription ontology.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 48


acetylsalicylic acidtypetypeprecedesJack SmithGive me all prescriptions <strong>in</strong>clud<strong>in</strong>g medic<strong>in</strong>alproduct named Panadol.drug<strong>in</strong>cludesisPrescribedByphysiciantypetypeisPrescribedBye-prescriptionId 123correspondse-prescriptiontypetypecorrespondstypeisPrescribedByprecedesisTargetedAtpatienttypeAspir<strong>in</strong>Is TargetedAte-prescriptionId 678John TaylorFigure 2. An extension of <strong>the</strong> e-prescription ontology.The graphical ontologies of Figure 1 <strong>and</strong> 2 canbe presented by ontology language <strong>in</strong> a mach<strong>in</strong>eprocessable form. The most commonly used ontologylanguages are XML (Harold. <strong>and</strong> Scott Means,2002), XML Schema XML (Harold. <strong>and</strong> ScottMeans, 2002), RDF (Daconta et al. 2003), RDFSchema (Daconta et al., 2003) <strong>and</strong> OWL (S<strong>in</strong>gh<strong>and</strong> Huhns, 2005).XML (Extensible Markup Language) is ametamarkup language for text documents. It is <strong>the</strong>syntactic foundation layer of <strong>the</strong> Se-mantic <strong>Web</strong>.All o<strong>the</strong>r technologies provid<strong>in</strong>g features for <strong>the</strong><strong>Semantic</strong> <strong>Web</strong> will be built on top of XML. ParticularlyXML def<strong>in</strong>es a generic syntax used to mark updata with simple human readable tags. An importantfeature of XML is that it does not have a fixed set oftags but it allows user to def<strong>in</strong>e tags of <strong>the</strong>ir own.For example, various communities have def<strong>in</strong>ed<strong>the</strong>ir specialized vocabularies (set of tags) for variousdoma<strong>in</strong>s such as MathMl for ma<strong>the</strong>matics,BSML for bio<strong>in</strong>formatics <strong>and</strong> GovML (GovernmentalMarkup Language) for government.typemedic<strong>in</strong>al producttype4 The architecture of <strong>the</strong> serviceoriented EPSWe now describe <strong>the</strong> architecture that can beused for provid<strong>in</strong>g <strong>the</strong> services described <strong>in</strong> Section2 <strong>and</strong> 3. The architecture is based on <strong>the</strong> serviceoriented comput<strong>in</strong>g paradigm. Basically, servicesare a means for build<strong>in</strong>g distributed applicationsmore efficiently than with previous software approaches.The ma<strong>in</strong> idea beh<strong>in</strong>d services is that <strong>the</strong>yare used for multiple purposes. Services are alsoused by putt<strong>in</strong>g <strong>the</strong>m toge<strong>the</strong>r or compos<strong>in</strong>g <strong>the</strong>m.Therefore every aspect of services is designed tohelp <strong>the</strong>m to be composed.In <strong>the</strong> health care sector service oriented comput<strong>in</strong>gparadigm provides flexible methods for connect<strong>in</strong>gelectronic prescription system to <strong>the</strong> o<strong>the</strong>rrelevant health care systems. For example, electronicprescription writer can <strong>in</strong>teract through a <strong>Web</strong>service with <strong>the</strong> health care system that supportspatient records. There may also be components thatare used by different healthcare systems. For example,medical database may provide services formedical <strong>in</strong>formation systems as well as for electronicprescription system.The communication is based on <strong>Web</strong> services<strong>and</strong> SOAP-protocol. Orig<strong>in</strong>ally <strong>the</strong>y provided away for execut<strong>in</strong>g bus<strong>in</strong>ess transactions <strong>in</strong> <strong>the</strong> Internet.Technically web services are self-describ<strong>in</strong>gmodular applications that can be published, located<strong>and</strong> <strong>in</strong>voked across <strong>the</strong> <strong>Web</strong>. Once a service is deployed,o<strong>the</strong>r applications can <strong>in</strong>voke <strong>the</strong> deployedservice. In general, a web service can be anyth<strong>in</strong>gfrom a simple request to complicated bus<strong>in</strong>ess orehealth processes.The components of <strong>the</strong> electronic prescriptionsystem are presented <strong>in</strong> Figure 1.Prescriptionhold<strong>in</strong>g store<strong>Web</strong> Service<strong>in</strong>terface<strong>Web</strong> ServicenterfaceMedicaldatabasesystemPrescription writer<strong>Web</strong> Service<strong>in</strong>terfaceExpertdatabasesystemHealth caresystem<strong>Web</strong> Service<strong>in</strong>terface<strong>Web</strong> Service<strong>in</strong>terfacePrescriptionpric<strong>in</strong>gauthorityFigure 3. The <strong>in</strong>teraction of a prescription writer.49


Each component <strong>in</strong> <strong>the</strong> architecture communicatesthrough a <strong>Web</strong> service <strong>in</strong>terface. Fur<strong>the</strong>r eachmessage is presented as an XML-document <strong>and</strong>each XML-document is carried by <strong>the</strong> SOAP protocol.5 Us<strong>in</strong>g BPMN <strong>in</strong> modell<strong>in</strong>g e-prescription processesThe Bus<strong>in</strong>ess Process Model<strong>in</strong>g Notation(BPMN) is a st<strong>and</strong>ard for model<strong>in</strong>g bus<strong>in</strong>ess processflows <strong>and</strong> web services. The BPMN 1.0 <strong>and</strong> <strong>the</strong>UML 2.0 Activity Diagram from <strong>the</strong> OMG arera<strong>the</strong>r similar <strong>in</strong> <strong>the</strong>ir presentation. However, <strong>the</strong>Activity diagram has not adequate graphical presentationof parallel <strong>and</strong> <strong>in</strong>terleaved processes, whichare typical <strong>in</strong> workflow specifications.We now give an overview of <strong>the</strong> BPMN. First wedescribe <strong>the</strong> types of graphical objects that comprise<strong>the</strong> notation, <strong>and</strong> <strong>the</strong>n we show how <strong>the</strong>y work toge<strong>the</strong>ras part of a Bus<strong>in</strong>ess Process Diagram (BPD).After it we give a simple electronic prescriptionprocess description us<strong>in</strong>g BPD.In BPD <strong>the</strong>re are tree Flow Objects: Event, Activity<strong>and</strong> Gateway:• An Event is represented by a circle <strong>and</strong> itrepresents someth<strong>in</strong>g that happens dur<strong>in</strong>g <strong>the</strong>bus<strong>in</strong>ess process, <strong>and</strong> usually has a cause orimpact.• An Activity is represented by a rounded cornerrectangle <strong>and</strong> it is a generic term for a workthat is performed <strong>in</strong> companies. The types oftasks are Task <strong>and</strong> Sub-Process. So, activitiescan be presented as hierarchical structures.• A Gateway is represented by a diamond shape,<strong>and</strong> it is used for controll<strong>in</strong>g <strong>the</strong> divergence <strong>and</strong>convergence of sequence flow.In BPD <strong>the</strong>re are also three k<strong>in</strong>d of connect<strong>in</strong>gobjects: Sequence Flow, Message Flow <strong>and</strong> Association.• A Sequence Flow is represented by a solid l<strong>in</strong>ewith a solid arrowhead.• A Message Flow is represented by a dashedl<strong>in</strong>e with an open arrowhead <strong>and</strong> it is used toshow <strong>the</strong> flow of messages between two separateprocess participants.• An Association is represented by a dotted l<strong>in</strong>ewith a l<strong>in</strong>e arrowhead, <strong>and</strong> it used to associatedata <strong>and</strong> text with flow objects.In Figure 4 we have presented how <strong>the</strong> process ofproduc<strong>in</strong>g electronic prescription (described <strong>in</strong> Section2) can be represented by a BPD.Send <strong>the</strong> prescriptionto expert databasesystemSend <strong>the</strong> prescriptionto medical databaseSend <strong>the</strong> prescriptionto pric<strong>in</strong>g authorityFigure 4. A BPD-description of <strong>the</strong> prescription process.6 ConclusionsConstructa prescriptionYesYesYesNonegativeeffectsCheck<strong>the</strong> doseCheck<strong>the</strong> pricesSign <strong>the</strong> prescriptionSend <strong>the</strong> prescription toprescription hold<strong>in</strong>g storeIn this article we have illustrated <strong>the</strong> <strong>in</strong>teroperabilitywith<strong>in</strong> <strong>the</strong> healthcare sector from electronicprescriptions po<strong>in</strong>t of view. In particular, we illustratedhow XML-based technologies can be utilized<strong>in</strong> modell<strong>in</strong>g <strong>the</strong> concepts that are related to prescriptionwrit<strong>in</strong>g, <strong>and</strong> how web-service technologycan be used <strong>in</strong> implement<strong>in</strong>g <strong>the</strong> <strong>in</strong>teroperability ofelectronic prescription system <strong>and</strong> o<strong>the</strong>r healthcaresystems.In addition, we have illustrated how <strong>the</strong> coord<strong>in</strong>ationof <strong>the</strong> <strong>in</strong>teroperability required by electronicprescription systems can be automated by utiliz<strong>in</strong>gXML-based languages BPMN <strong>and</strong> BPEL4WS. Thereason for us<strong>in</strong>g BPMN is that <strong>the</strong> BPMN notationis readily underst<strong>and</strong>able for <strong>the</strong> employees of <strong>the</strong>health care sector. It is also readily underst<strong>and</strong>ablefor <strong>the</strong> bus<strong>in</strong>ess analyst that create <strong>the</strong> drafts ofhealth care processes as well as for <strong>the</strong> technicaldevelopers responsible for implement<strong>in</strong>g <strong>the</strong> technologythat will perform those processes. Also aNoNo<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 50


notable ga<strong>in</strong> of BPMN specification is that it can beused for generat<strong>in</strong>g executable BMEL4WS code.A consequence of <strong>in</strong>troduc<strong>in</strong>g <strong>Semantic</strong> <strong>Web</strong>technologies <strong>in</strong> health care sector is that it significantlychanges <strong>the</strong> daily duties of <strong>the</strong> employees of<strong>the</strong> health care sector. Therefore <strong>the</strong> most challeng<strong>in</strong>gaspect will not be <strong>the</strong> technology but ra<strong>the</strong>rchang<strong>in</strong>g <strong>the</strong> m<strong>in</strong>d-set of <strong>the</strong> employees <strong>and</strong> <strong>the</strong>tra<strong>in</strong><strong>in</strong>g of <strong>the</strong> new technology.ReferencesAntoniou, G. & Harmelen, F., A semantic webprimer. The MIT Press, 2004Bobbie, P., Ramisetty, S., Yussiff, A-L. <strong>and</strong> Pujari,S. Desgn<strong>in</strong>g an Embedded Electronic_prescriptionApplication forHome_Based Telemedic<strong>in</strong>e us<strong>in</strong>g OSGiFramework.http://cse.spsu.edu/pbobbie/SharedFile/<strong>New</strong>Pdfs/eRx-F<strong>in</strong>al2Col.pdf, 2005BPMN- Bus<strong>in</strong>ess Process Model<strong>in</strong>g Notation(BPMN), http://www.bpmn.org/ , 2006BPEL4WS – Bus<strong>in</strong>ess Process Language for <strong>Web</strong>Sevices.http://www.w.ibm.com/developersworks/ httpwebservices/library/ws-bpel/Chadwick, D., <strong>and</strong> Mundy, D. 2004. The SecureElectronic Transfer of Prescriptions.http://www.health<strong>in</strong>formatics.org/hc2004/Chadwick%20Invited%20Paper.pdf, 2004.Daconta, M., Obrst, L. & Smith, K., The semanticweb. Indianapolis: John Wiley & Sons. 2003.Gruber, Thomas R. Toward pr<strong>in</strong>ciples for <strong>the</strong> designof ontologies used for knowl-edgeshar<strong>in</strong>g. Padua workshop on Formal Ontology.,1993Harold, E. <strong>and</strong> Scott Means W., XML <strong>in</strong> a Nutshell.O’Reilly & Associates, 2002.Jung, F., XML-based prescription drug databasehelps pharmacists advise <strong>the</strong>ir customers.http://www.softwareag.com(xml/aplications/sanacorp.htm, 2006Liu, C., Long, A., Li, Y., Tsai, K., <strong>and</strong> Kuo, H.:Shar<strong>in</strong>g patient care records over <strong>the</strong> WorldWide <strong>Web</strong>. International journal of MedicalInformatics, 61, p. 189-205. 2001.Mattocks E. 2005. Manag<strong>in</strong>g Medical Ontologiesus<strong>in</strong>g OWL <strong>and</strong> an e-bus<strong>in</strong>ess Registry / Repository.http://www.idealliance.org/proceed<strong>in</strong>gs/xml04/papers/85/MMOOEBRR.htmlS<strong>in</strong>gh, M., <strong>and</strong> Huhns, M., Service OrientedCXDomput<strong>in</strong>g: <strong>Semantic</strong>s Proceses Agents.John Wiley & Sons, 2005.Stalidis, G., Prenza, A. Vlachos, N., Maglavera S.,Koutsouris, D. Medical support system forcont<strong>in</strong>uation of care based on XML web technology:International journal of Medical Informatics,64, p. 385-400, 2001.Woolman, P. S.: XML for electronic cl<strong>in</strong>ical communication<strong>in</strong> Scotl<strong>and</strong>. International journalof Medical Informatics, 64, p. 379-383. 2001.51


RosettaNet <strong>and</strong> <strong>Semantic</strong> <strong>Web</strong> ServicesPaavo Kot<strong>in</strong>urmi⋆ Hels<strong>in</strong>ki University of TechnologyF<strong>in</strong>l<strong>and</strong>paavo.kot<strong>in</strong>urmi@tkk.fiArm<strong>in</strong> Haller† DERINational University of Irel<strong>and</strong>, Galwayarm<strong>in</strong>.haller@deri.orgAbstractIn this paper we present a semantic B2B gateway based on <strong>the</strong> WSMX semantic Service OrientedArchitecture to tackle heterogeneities <strong>in</strong> RosettaNet messages. We develop a rich RosettaNet ontology<strong>and</strong> use <strong>the</strong> axiomatised knowledge <strong>and</strong> rules to resolve data heterogeneities <strong>and</strong> to unify unit conversions.We def<strong>in</strong>e adaptive executable choreographies, which allow a more flexible <strong>in</strong>tegration ofsuppliers us<strong>in</strong>g RosettaNet <strong>and</strong> make it easy to <strong>in</strong>troduce more competition to <strong>the</strong> supply cha<strong>in</strong>. Thesolution is justified with a scenario-based evaluation <strong>and</strong> by analys<strong>in</strong>g RosettaNet specifications <strong>and</strong><strong>the</strong>ir implementations.1 IntroductionB2B <strong>in</strong>tegrations offer <strong>in</strong>creased speed, less errors<strong>and</strong> reduced cost of <strong>in</strong>formation exchange betweenbus<strong>in</strong>ess partners. However, <strong>in</strong>tegration efforts stillsuffer from long implementation times <strong>and</strong> high-costs[Preist et al. (2005)]. This has lead to bus<strong>in</strong>ess modelswith simple processes, <strong>in</strong> which long term rigidpartnerships are established [Kot<strong>in</strong>urmi et al. (2006)].RosettaNet is a prom<strong>in</strong>ent st<strong>and</strong>ard for B2B <strong>in</strong>tegrationthat represents an agreement on <strong>the</strong> message exchangepatterns, <strong>the</strong> message content <strong>and</strong> a securetransportation mechanism between companies operat<strong>in</strong>g<strong>in</strong> <strong>the</strong> IT <strong>and</strong> electronics <strong>in</strong>dustries. The messagecontent of structurally valid RosettaNet PartnerInterface Processes (PIP) is def<strong>in</strong>ed by ei<strong>the</strong>r DTD for<strong>the</strong> older PIPs or XML Schema for <strong>the</strong> recently updatedones. However, <strong>the</strong> <strong>in</strong>teroperability challengesare only partly solved. DTDs <strong>and</strong> XML Schemaslack expressive power to capture all necessary constra<strong>in</strong>ts<strong>and</strong> do not make all document semantics explicit.Be<strong>in</strong>g able to express constra<strong>in</strong>ts <strong>in</strong> mach<strong>in</strong>e<strong>in</strong>terpretableformat is expected by RosettaNet expertsas well [Damodaran (2004)].Companies can use <strong>the</strong> same PIP messages differentlyas <strong>the</strong> messages conta<strong>in</strong> many optional elements.Some companies may support only partsof <strong>the</strong> enumerated values for packag<strong>in</strong>g-units, unitof measurements <strong>and</strong> currencies that are <strong>in</strong> <strong>the</strong>RosettaNet dictionaries. When <strong>the</strong> number of partners<strong>in</strong>creases, h<strong>and</strong>l<strong>in</strong>g <strong>the</strong>se heterogeneities comes<strong>in</strong>creas<strong>in</strong>gly important <strong>and</strong> po<strong>in</strong>t-to-po<strong>in</strong>t syntactictransformations us<strong>in</strong>g scripts are not <strong>the</strong> most lucrativeoption. This can lead to <strong>the</strong> situation that buyersuse only one supplier as <strong>the</strong> <strong>in</strong>formation systemsdo not easily support more competitive arrangements.The example scenario that we use <strong>in</strong> this paper highlightsthis from <strong>the</strong> buyer’s (requesters) role <strong>in</strong> a collaboration.Quotes are asked from multiple suppliers(service providers) that use <strong>the</strong> messages differently.Rules h<strong>and</strong>l<strong>in</strong>g <strong>the</strong> data heterogeneity of <strong>the</strong>irresponse messages are required to decide on <strong>the</strong> bestsupplier for a given order. In <strong>the</strong> <strong>in</strong>teractions <strong>the</strong> useof RosettaNet PIPs 1 3A1 for quotes <strong>and</strong> 3A4 for purchaseorders are h<strong>and</strong>led.We propose a semantic B2B gateway, which buildsupon <strong>the</strong> <strong>Web</strong> Service Modell<strong>in</strong>g eXecution environment(WSMX) [Haller et al. (2005)]. This solutionapplies semantic <strong>Web</strong> Service (SWS) technologies toRosettaNet collaborations. However, we do not imply<strong>the</strong> use of SWS technologies to <strong>the</strong> bus<strong>in</strong>ess partners,as <strong>the</strong> current knowledge of those technologies is low.In our example scenario only <strong>the</strong> requester uses SWStechnologies, <strong>the</strong> partners simply use current RosettaNetXML <strong>in</strong>terfaces.The ma<strong>in</strong> contributions of this paper are as follows:• We encode <strong>the</strong> <strong>in</strong>formation exchanged <strong>in</strong> RosettaNetPIP3A1 messages <strong>in</strong> a formal ontology.The ontology <strong>in</strong>cludes constra<strong>in</strong>ts that cannotbe represented <strong>in</strong> current PIP message schemes,such as dependency between fields.• We def<strong>in</strong>e axioms <strong>in</strong> <strong>the</strong> ontology, which constra<strong>in</strong><strong>the</strong> <strong>in</strong>terpretations of certa<strong>in</strong> elements <strong>in</strong>RosettaNet messages (e.g. units of measurement,packag<strong>in</strong>g size)• We fur<strong>the</strong>r add doma<strong>in</strong> specific rules to <strong>the</strong>knowledge base that are applied at run time to1 http://www.rosettanet.org/pipdirectory<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 52


esolve data heterogeneities <strong>in</strong> <strong>the</strong> RosettaNetmessages.• We def<strong>in</strong>e <strong>and</strong> execute a choreography, which allowsto easily <strong>in</strong>tegrate new partners to our solution<strong>and</strong> to h<strong>and</strong>le <strong>the</strong> data heterogeneities <strong>in</strong>troduced.The paper is structured as follows: first we give abrief <strong>in</strong>troduction to semantic <strong>Web</strong> Services <strong>in</strong> section2. Section 3 presents <strong>the</strong> architecture of our semanticB2B gateway <strong>and</strong> describes its components.Section 4 outl<strong>in</strong>es our use case scenario, its designtime modell<strong>in</strong>g tasks <strong>and</strong> presents evaluation results.In section 5 we position our solution to related work.F<strong>in</strong>ally <strong>the</strong> paper is concluded <strong>in</strong> section 6.2 <strong>Semantic</strong> <strong>Web</strong> ServicesThe <strong>Web</strong> Service Model<strong>in</strong>g Ontology (WSMO) [Romanet al. (2005)] provides a conceptual model <strong>and</strong>a language for semantic markup describ<strong>in</strong>g all relevantaspects of general services, which are commonlyaccessible through a web service <strong>in</strong>terface. However,<strong>the</strong> semantic mark up provided <strong>in</strong> WSMO canbe grounded to any service (e.g. CORBA, GRIDetc.) The ultimate goal of such a markup is to enable<strong>the</strong> (total or partial) automation of tasks (e.g.discovery, selection, composition, mediation, execution<strong>and</strong> monitor<strong>in</strong>g) <strong>in</strong>volved <strong>in</strong> both <strong>in</strong>tra- <strong>and</strong> <strong>in</strong>terenterprise<strong>in</strong>tegration. The WSMO conceptual modelis formalised by <strong>the</strong> <strong>Web</strong> Service Model<strong>in</strong>g Language(WSML) family of ontology languages, used to describeWSMO elements (goals, ontologies, services,mediators). WSML consists of a number of variantsbased on different logical formalisms. The differentvariants of <strong>the</strong> WSML correspond with differentlevels of logical expressiveness <strong>and</strong> are bothsyntactically <strong>and</strong> semantically layered. In addition,WSMO def<strong>in</strong>es <strong>the</strong> underly<strong>in</strong>g model for <strong>the</strong> <strong>Web</strong>Service Execution Environment (WSMX). WSMXis an <strong>in</strong>tegration platform conform<strong>in</strong>g to <strong>the</strong> pr<strong>in</strong>ciplesof a Service Oriented Architecture (SOA) whichfacilitates <strong>the</strong> <strong>in</strong>tegration between different systems.The <strong>in</strong>tegration process is def<strong>in</strong>ed by adaptive operationalsemantics, def<strong>in</strong><strong>in</strong>g <strong>the</strong> <strong>in</strong>teractions of middlewareservices <strong>in</strong>clud<strong>in</strong>g discovery, mediation, <strong>in</strong>vocation,choreography, repository services, etc. Thus,WSMO, WSML <strong>and</strong> WSMX form a coherent frameworkcover<strong>in</strong>g all aspects of semantic <strong>Web</strong> Services(SWS).Although WSMX aims to allow a dynamic discoveryof partners <strong>in</strong> <strong>the</strong> collaboration, our focus lies onhow SWS technology tackles <strong>the</strong> data heterogeneities<strong>in</strong> e-bus<strong>in</strong>ess collaborations. This has two reasons,first current bus<strong>in</strong>ess practice does not consider an<strong>in</strong>tegrated discovery <strong>and</strong> <strong>in</strong>vocation of services. The“discovery” of bus<strong>in</strong>ess partners is conducted when<strong>the</strong> <strong>in</strong>frastructure is set up <strong>and</strong> are commonly basedon well-established <strong>and</strong> long-runn<strong>in</strong>g bus<strong>in</strong>ess relations.Second, <strong>the</strong> technology required for a dynamicdiscovery of rich semantic descriptions is not matureenough <strong>in</strong> bus<strong>in</strong>ess sett<strong>in</strong>gs. The reasoners to performmatchmak<strong>in</strong>g only scale on light semantic descriptionsof services with very limited expressivity.Thus we omit <strong>the</strong> functional description of a service(its capability description which is ma<strong>in</strong>ly used dur<strong>in</strong>g<strong>the</strong> dynamic discovery) <strong>and</strong> <strong>the</strong> formalisation of arequester’s goal. Instead we avail of <strong>the</strong> WSMO service<strong>in</strong>terface - a description of <strong>the</strong> communicationpatterns accord<strong>in</strong>g to which a service requester consumes<strong>the</strong> functionality of <strong>the</strong> service. The WSMOservice choreography [Roman <strong>and</strong> Scicluna (2006)]is based on <strong>the</strong> formalism of Abstract State Mach<strong>in</strong>es(ASMs) [Gurevich (1994)] <strong>and</strong> allows to model dataexchanged <strong>in</strong> every state of a service execution. Itconsists of three core elements (1) a signature, (2)a ground<strong>in</strong>g, <strong>and</strong> (3) transition rules. The signaturedescribes static parts of state descriptions def<strong>in</strong>ed<strong>in</strong> terms of imported ontologies. Each statehas a ground<strong>in</strong>g associated def<strong>in</strong><strong>in</strong>g how concepts <strong>in</strong><strong>the</strong> ontology are l<strong>in</strong>ked with messages. Transitionrules express changes of states <strong>in</strong> <strong>the</strong> choreographyby chang<strong>in</strong>g <strong>the</strong> set of ontology <strong>in</strong>stances (add<strong>in</strong>g, remov<strong>in</strong>g<strong>and</strong> updat<strong>in</strong>g <strong>in</strong>stances to <strong>the</strong> signature ontology).An example of such a choreography descriptionis described <strong>in</strong> section 4.1.3 <strong>Semantic</strong> B2B GatewayIn this section we <strong>in</strong>troduce <strong>the</strong> architectural considerationtaken <strong>in</strong>to account for a semantically enhancedRosettaNet B2B <strong>in</strong>tegration. We detail <strong>the</strong>implementation of a generic semantic B2B gateway,be<strong>in</strong>g truly agnostic about whe<strong>the</strong>r <strong>the</strong> partners useWSML messages or any ord<strong>in</strong>ary schema language.Our solution is based upon <strong>the</strong> WSMX platform.WSMX follows a component based design with adaptiveoperational semantics. Every component providessome service <strong>and</strong> can be orchestrated with<strong>in</strong>WSMX as required. A semantic RosettaNet B2BGateway as def<strong>in</strong>ed <strong>in</strong> this paper relies on <strong>the</strong> follow<strong>in</strong>gfour components:• The Adapter Framework consists of B2Badapters to lift <strong>and</strong> lower XML <strong>in</strong>stances <strong>in</strong> <strong>the</strong>messages sent from <strong>the</strong> partners to WSML class53


hierarchies <strong>and</strong> a middleware adapter connect<strong>in</strong>gto <strong>the</strong> back-end applications of <strong>the</strong> requester.• The Choreography Eng<strong>in</strong>e execut<strong>in</strong>g externalservice by evaluat<strong>in</strong>g a WSMO choreographydescription. The actual <strong>in</strong>vocation of <strong>the</strong> service<strong>and</strong> <strong>the</strong> choice of <strong>the</strong> right transport level is performedby <strong>the</strong> Communication Manager.• The Resource Manager constitutes <strong>the</strong> knowledgebase <strong>and</strong> its <strong>in</strong>terface <strong>and</strong> provides accessto <strong>the</strong> local component repositories that storedef<strong>in</strong>itions of WSMO entities. In our case,<strong>the</strong>se are <strong>the</strong> doma<strong>in</strong> ontology, <strong>the</strong> doma<strong>in</strong> specificrules stored <strong>in</strong> our knowledge base <strong>and</strong> <strong>the</strong>choreography specifications stored <strong>in</strong> <strong>the</strong> repository.• The Reasoner allows to perform queries on <strong>the</strong>knowledge base of facts <strong>and</strong> rules to determ<strong>in</strong>e<strong>the</strong> answer by logical deduction.WSMX is shipped with <strong>the</strong>se st<strong>and</strong>ard components.However, <strong>the</strong> adapter <strong>in</strong>stances have to be builtbased on <strong>the</strong> requirements from RosettaNet <strong>in</strong>terfaceswith service providers. The complete architecture ofour solution is depicted <strong>in</strong> figure 1.Knowledge BaseReasonerChoreography Eng<strong>in</strong>e<strong>Web</strong> Service Interface<strong>Web</strong> Service InterfaceMiddlewareWSML<strong>Web</strong> Service InterfaceMiddlewareAdapter<strong>Web</strong> Service InterfaceXMLService RequesterWSMLWS InterfaceB2B AdapterWS Interface<strong>Semantic</strong> B2B gatewayXMLXMLService Provider AWS InterfaceService Provider BWS InterfaceB2B ServerB2B ServerFigure 1: Overview of B2B gateway architecture3.1 Resource ManagerThe resource manager coord<strong>in</strong>ates <strong>the</strong> access to <strong>the</strong>repositories of <strong>the</strong> different components <strong>in</strong> <strong>the</strong> architecture<strong>and</strong> as such gives <strong>the</strong> illusion of a centralrepository. This repository acts as a knowledge base<strong>and</strong> has to be populated with <strong>the</strong> ontology artifactsused <strong>in</strong> <strong>the</strong> different components <strong>in</strong> our B2B gateway.Most importantly, at least one doma<strong>in</strong> ontologyto formally capture <strong>the</strong> message content exchanged<strong>in</strong> any of our RosettaNet collaborations is required.Ideally exist<strong>in</strong>g doma<strong>in</strong> ontologies should be reused.S<strong>in</strong>ce an <strong>in</strong>dustry wide recognised ontology for bus<strong>in</strong>essmessages has not been established yet, we built<strong>the</strong> ontology ourselves. It is based on <strong>the</strong> RosettaNetspecification, which itself can be regarded as a lightweightontology.However, <strong>the</strong> task is to not only simply translate<strong>the</strong> DTDs or XML Schemas to a richer <strong>and</strong> formallanguage (i.e. WSML), but to model all <strong>the</strong> constra<strong>in</strong>tson <strong>the</strong> semantics of <strong>the</strong> bus<strong>in</strong>ess documents.We <strong>in</strong>clude constra<strong>in</strong>ts which are not expressible <strong>in</strong>DTD or XML Schema <strong>and</strong> capture implicit knowledgeprovided <strong>in</strong> <strong>the</strong> RosettaNet message guidel<strong>in</strong>es<strong>and</strong> accompany<strong>in</strong>g documentation to facilitate <strong>the</strong>promised benefits of automatically resolv<strong>in</strong>g data heterogeneities.An example of <strong>the</strong> first, a card<strong>in</strong>ality constra<strong>in</strong>t notexpressible <strong>in</strong> current RosettaNet messages schemasare <strong>the</strong> constra<strong>in</strong>ts imposed on <strong>the</strong> “Bus<strong>in</strong>essDescription”element used <strong>in</strong> all RosettaNet PIPs. The “Bus<strong>in</strong>essDescription”element <strong>in</strong>cludes bus<strong>in</strong>ess propertiesthat describe a bus<strong>in</strong>ess identity <strong>and</strong> its location.At least one of <strong>the</strong> possible three subelements “bus<strong>in</strong>essName”,“GlobalBus<strong>in</strong>essIdentifier” or “Partner-Bus<strong>in</strong>essIdentification” has to be provided <strong>in</strong> order tobe a valid PIP. It is easy to <strong>in</strong>clude such constra<strong>in</strong>ts <strong>in</strong>our WSML ontology as shown <strong>in</strong> list<strong>in</strong>g 1:✞☎concept bus<strong>in</strong>essDescriptionbus<strong>in</strong>essname ofType (0 1) bus<strong>in</strong>essNameglobalbus<strong>in</strong>essidentifier ofType (0 1)globalBus<strong>in</strong>essIdentifierpartnerbus<strong>in</strong>essidentification ofTypepartnerBus<strong>in</strong>essIdentificationnfpdc#relation hasValue validBus<strong>in</strong>essDescriptionendnfpaxiom validBus<strong>in</strong>essDescriptiondef<strong>in</strong>edByforall ?x ( ?x memberOf bus<strong>in</strong>essDescription implies?y memberOf bus<strong>in</strong>essName or?y memberOf globalbus<strong>in</strong>essidentifier or?y memberOf partnerbus<strong>in</strong>essidentification).✝List<strong>in</strong>g 1: Card<strong>in</strong>ality Constra<strong>in</strong>ts spann<strong>in</strong>g multipleelementsList<strong>in</strong>g 2 shows examples of implicit knowledgewe have captured <strong>in</strong> our RosettaNet ontology. For example,RosettaNet def<strong>in</strong>es a list of 335 possible valuesfor unit of measurements, with <strong>the</strong> logical relationshipsbetween values unspecified. We made <strong>the</strong>selogical relations explicit <strong>and</strong> <strong>in</strong>cluded <strong>the</strong>se axiomatisations<strong>in</strong> our ontology. The first axiom “resolveMeasurementUnitType”<strong>in</strong> list<strong>in</strong>g 2 shows how <strong>the</strong> measurementunits def<strong>in</strong>ed with natural language text <strong>in</strong><strong>the</strong> RosettaNet PIPs can be resolved to its correspond<strong>in</strong>gnumerical value. The numerical value can subsequentlybe used for fur<strong>the</strong>r calculations (c.f. section4.1). The second part of <strong>the</strong> list<strong>in</strong>g def<strong>in</strong>es a function✆<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 54


used to relate a kilogram value to its equivalent poundvalue.✞☎277 axiom resolveMeasurementUnitType278 def<strong>in</strong>edBy279 forall ?x(?x[globalProductUnitOfMeasurementCodehasValue ”dozen”] memberOf quoteL<strong>in</strong>eItem implies?x[globalProductUnitOfMeasurementCode hasValue”12”]).280 forall ?y(?y[globalProductUnitOfMeasurementCodehasValue ”10−pack”] memberOf quoteL<strong>in</strong>eItemimplies ?y[globalProductUnitOfMeasurementCodehasValue ”10”]).281282 relation poundKilo (ofType productQuantity, ofTypeproductQuantity)283 nfp284 dc#relation hasValue poundKiloDependency285 endnfp286287 axiom poundKiloDependency288 def<strong>in</strong>edBy289 forall ?x,?y (290 poundKilo(?x,?y) equivalent291 ?x memberOf productQuantity <strong>and</strong>292 ?x[globalProductUnitOfMeasureCode hasValue293 ”Kilogram”]294 memberOf quoteL<strong>in</strong>eItem <strong>and</strong>295 ?y memberOf productQuantity <strong>and</strong>296 ?y[globalProductUnitOfMeasureCode hasValue297 ”Pound”]298 memberOf quoteL<strong>in</strong>eItem <strong>and</strong>299 ?x = wsml#numericDivide(?y,?x,0.45359237)).✝List<strong>in</strong>g 2: Def<strong>in</strong>itional facts <strong>in</strong> <strong>the</strong> doma<strong>in</strong> ontology3.2 Adapter FrameworkThe adapter framework provides transformationfunctionality for every non-WSML message sent to<strong>the</strong> B2B gateway. In our scenario, two adapter <strong>in</strong>stancesare required. One for every RosettaNet collaborationpartner, who still use XML Schema orDTD based RosettaNet messages <strong>and</strong> one to connectto <strong>the</strong> middleware system, provid<strong>in</strong>g access to <strong>the</strong>back-end applications.The first adapter receives every RosettaNet message<strong>and</strong> applies <strong>the</strong> lift<strong>in</strong>g or lower<strong>in</strong>g rules def<strong>in</strong>ed<strong>in</strong> <strong>the</strong> adapter to map every message <strong>in</strong>stance basedon its source schema (<strong>in</strong> our case XML-Schema) toa WSML <strong>in</strong>stance based on its ontological schema.List<strong>in</strong>g 3 shows one <strong>in</strong>com<strong>in</strong>g XML <strong>in</strong>stance <strong>and</strong>list<strong>in</strong>g 4 its correspond<strong>in</strong>g WSML <strong>in</strong>stance after <strong>the</strong>transformation rules were applied 2 .It has to be noted that <strong>the</strong> adapters act for WSMXas <strong>the</strong> actual service provider. The adapter functionality(i.e. <strong>the</strong> <strong>Web</strong> Service endpo<strong>in</strong>t of <strong>the</strong> adapter)is registered as a service with WSMX <strong>and</strong> not <strong>the</strong>RosettaNet service of <strong>the</strong> partner itself. Thus <strong>the</strong>adapter is fur<strong>the</strong>r responsible to execute <strong>the</strong> correctendpo<strong>in</strong>t of <strong>the</strong> partner service. However, adapters2 More details on <strong>the</strong> lift<strong>in</strong>g <strong>and</strong> lower<strong>in</strong>g of XML Schema toWSML can be found <strong>in</strong> Kot<strong>in</strong>urmi et al. (2006).✆only perform data manipulation, <strong>the</strong>ir <strong>in</strong>terface behaviourreplicates <strong>the</strong> behaviour of <strong>the</strong> underly<strong>in</strong>gpartner service.The second adapter <strong>in</strong>stance receives every <strong>in</strong>ternalmessage sent from <strong>the</strong> middleware bus, represent<strong>in</strong>ga gateway to every non <strong>Web</strong> Service compliant backendapplication.3.3 ReasonerThe Reasoner is required to perform query answer<strong>in</strong>goperations on <strong>the</strong> knowledge base, which itself ispopulated with doma<strong>in</strong> ontologies <strong>and</strong> doma<strong>in</strong> specificrules at design time <strong>and</strong> ontology <strong>in</strong>stances atrun time. Our reasoner has to h<strong>and</strong>le <strong>the</strong> WSML-Rule variant <strong>and</strong> should have built-<strong>in</strong> predicates forh<strong>and</strong>l<strong>in</strong>g basic data-types, basic arithmetic functionsas well as basic comparison operators.Dedicated reasoners for <strong>the</strong> different WSML variantsare still under development. However, <strong>the</strong>re area number of implementations based on exist<strong>in</strong>g reasonersfor WSML-Rule available: one is based on<strong>the</strong> FLORA-2 reasoner, which is also used <strong>in</strong> <strong>the</strong>mediation component of WSMX. FLORA-2 is arule-based knowledge representation formalism <strong>and</strong>a reasoner for this formalism. It is based on F-Logic[Kifer et al. (1995)], a frame-based logic, WSML isalso based upon. Fur<strong>the</strong>r, <strong>the</strong>re are translations fromWSML-Rule to F-Logic available. The reasoner <strong>in</strong>cludesa <strong>Web</strong> Service <strong>in</strong>terface which is used by <strong>the</strong>service requester to perform queries on <strong>the</strong> knowledgebase. Messages received from <strong>the</strong> back-end systemsof <strong>the</strong> requester are sent through <strong>the</strong> middleware.Thus, <strong>the</strong> middleware adapter has to encoderules how to translate requests from <strong>the</strong>se back endsystems to queries on <strong>the</strong> knowledge base <strong>and</strong> return<strong>the</strong> results. This is out of <strong>the</strong> scope of this paper <strong>and</strong>will be addressed <strong>in</strong> future work.3.4 Choreography Eng<strong>in</strong>eThe Choreography Eng<strong>in</strong>e as part of WSMX is responsibleto control <strong>the</strong> send<strong>in</strong>g <strong>and</strong> receiv<strong>in</strong>g ofmessages <strong>and</strong> update <strong>the</strong> state of <strong>the</strong> choreographyaccord<strong>in</strong>g to <strong>the</strong> message content. In contrast to<strong>the</strong> common use of choreography languages as nonexecutabledescriptions, <strong>the</strong> eng<strong>in</strong>e operates <strong>and</strong> executesWSMO choreography description such as <strong>the</strong>one def<strong>in</strong>ed <strong>in</strong> section 4.1.As mentioned earlier WSMO choreographiesare modelled as Abstract State Mach<strong>in</strong>es <strong>and</strong> areprocessed us<strong>in</strong>g st<strong>and</strong>ard algorithms dur<strong>in</strong>g runtime.The state <strong>in</strong> <strong>the</strong> mach<strong>in</strong>e is represented by ontology55


44 47 20448 52 dozen53 92 93 Better product94 102 114 115 USD116 117 198118 119 List<strong>in</strong>g 3: XML message <strong>in</strong>stance62 <strong>in</strong>stance QuoteL<strong>in</strong>eItem1 memberOf rfq#quoteL<strong>in</strong>eItem65 rfq#globalProductUnitOfMeasurementCode hasValue ”dozen”82 <strong>in</strong>stance quantitySchedule1 memberOf83 core#quantitySchedule84 core#productQuantity hasValue ”204”106 <strong>in</strong>stance substituteProductReference1 memberOf107 core#substituteProductReference108 core#GlobalProductSubstitutionReasonCode109 hasValue ”Better product”129 <strong>in</strong>stance totalPrice1 memberOf core#totalPrice130 core#f<strong>in</strong>ancialAmount hasValue F<strong>in</strong>ancialAmountTot132 <strong>in</strong>stance F<strong>in</strong>ancialAmountTot memberOf133 core#F<strong>in</strong>ancialAmount134 core#globalCurrencyCode hasValue USD135 core#monetaryAmount hasValue ”198”List<strong>in</strong>g 4: <strong>and</strong> its lifted WSML <strong>in</strong>stance<strong>in</strong>stances. Accord<strong>in</strong>g to <strong>the</strong> <strong>in</strong>stance data, a transitionrule is selected from <strong>the</strong> rule base with<strong>in</strong> a choreography.The consequent of <strong>the</strong> rule is <strong>in</strong>terpreted <strong>and</strong> <strong>the</strong>ontology <strong>in</strong>stance is modified accord<strong>in</strong>gly. It is <strong>the</strong>responsibility of <strong>the</strong> Choreography Eng<strong>in</strong>e to ma<strong>in</strong>ta<strong>in</strong><strong>the</strong> state of a conversation <strong>and</strong> to take <strong>the</strong> correctaction when that state is updated. For example, <strong>the</strong>update of <strong>the</strong> state of a choreography <strong>in</strong>stance maybe <strong>the</strong> result of a message received from a serviceprovider.S<strong>in</strong>ce WSMO choreography descriptions are expressed<strong>in</strong> a constra<strong>in</strong>t-based fashion, <strong>the</strong>y are verysuitable to be changed <strong>and</strong> extended once new partnersare <strong>in</strong>troduced <strong>in</strong>to a collaboration. It is easy to<strong>in</strong>clude transition rules trigger<strong>in</strong>g on certa<strong>in</strong> parts of amessage sent only by one partner to <strong>in</strong>troduce partnerspecific data h<strong>and</strong>l<strong>in</strong>g (c.f. section 4.1.4 EvaluationIn our example scenario, we discuss <strong>the</strong> h<strong>and</strong>l<strong>in</strong>gof heterogeneous partners engaged <strong>in</strong> quot<strong>in</strong>g for aproduct with a PIP 3A1 Request for Quote (RFQ).We describe <strong>the</strong> collaboration set up <strong>and</strong> orchestrationthrough examples from <strong>the</strong> requester’s (buyer’s)po<strong>in</strong>t-of-view. Then we discuss evaluation resultsthrough analys<strong>in</strong>g exist<strong>in</strong>g PIP message specifications<strong>and</strong> example <strong>in</strong>stances <strong>and</strong> <strong>the</strong> general benefitsfrom our example scenario.4.1 Collaboration Set UpIn order to retrieve RFQ messages from differentpartners at run-time <strong>and</strong> still be<strong>in</strong>g able to process<strong>the</strong>ir response messages, <strong>the</strong> requester has to set upmapp<strong>in</strong>g rules <strong>and</strong> def<strong>in</strong>e a choreography description<strong>in</strong> <strong>the</strong> B2B gateway at design time.Mapp<strong>in</strong>g rules developed <strong>in</strong> <strong>the</strong> Collaboration Set-Up phase capture any data heterogeneity that is notresolved by <strong>the</strong> def<strong>in</strong>itional facts <strong>in</strong> <strong>the</strong> doma<strong>in</strong> ontology(c.f. section 3.1).These doma<strong>in</strong> specific rules (conversion relations<strong>in</strong> our case) def<strong>in</strong>e how attribute values <strong>in</strong> <strong>the</strong> differentWSML <strong>in</strong>stances can be transformed. One suchexample is given <strong>in</strong> list<strong>in</strong>g 5. It def<strong>in</strong>es a function tocalculate <strong>the</strong> unit price by tak<strong>in</strong>g <strong>the</strong> “f<strong>in</strong>ancialAmount”<strong>and</strong> “productQuantity” given <strong>in</strong> <strong>the</strong> RosettaNetontology <strong>in</strong>stance. This rule can be used by <strong>the</strong> requesterto compare <strong>the</strong> prices of two or more partners.The “f<strong>in</strong>ancialAmount” <strong>in</strong> a PIP3A1 RFQ can referto different quantities of <strong>the</strong> product. We made <strong>the</strong>different packag<strong>in</strong>g sizes <strong>and</strong> its correspond<strong>in</strong>g valueexplicit <strong>in</strong> <strong>the</strong> ontology as described earlier <strong>in</strong> section3.1. Now <strong>the</strong> requester can query <strong>the</strong> knowledgebase to automatically compare <strong>the</strong> prices provided as“f<strong>in</strong>ancialAmount” by <strong>the</strong> partners transparently on aunit basis.✞☎295 relation unitPrice (ofType f<strong>in</strong>ancialAmount, ofTypeproductQuantity, ofType decimal)296 nfp297 dc#relation hasValue unitPriceDependency298 endnfp299300 axiom unitPriceDependency301 def<strong>in</strong>edBy302 forall ?x,?y,?z (303 unitPrice(?x,?y,?z) equivalent304 ?x memberOf f<strong>in</strong>ancialAmount <strong>and</strong>305 ?y memberOf productQuantity <strong>and</strong>306 ?z = wsml#numericDivide(?z,?x,?y)).✝List<strong>in</strong>g 5: Def<strong>in</strong>ition of a conversion relationNext <strong>the</strong> choreography description has to be def<strong>in</strong>ed.In order to allow a collaboration with its suppliers,<strong>the</strong> choreography <strong>in</strong>terface of <strong>the</strong> requester <strong>in</strong>our scenario has to be compliant with <strong>the</strong> <strong>in</strong>terfacebehaviours of <strong>the</strong> partners provid<strong>in</strong>g a RFQ response.S<strong>in</strong>ce all suppliers <strong>in</strong> our Supply Cha<strong>in</strong> use RosettaNet,<strong>the</strong>re is already agreement on <strong>the</strong> message ex-✆<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 56


change patterns. However, <strong>the</strong>re are still mismatcheson <strong>the</strong> messages sent <strong>and</strong> received <strong>in</strong> <strong>the</strong> collaboration.Thus, we <strong>in</strong>troduce rules <strong>in</strong> <strong>the</strong> choreography(c.f. list<strong>in</strong>g 6) of <strong>the</strong> requester h<strong>and</strong>l<strong>in</strong>g data mismatches<strong>in</strong> <strong>the</strong> RosettaNet messages.It has to be noted that <strong>the</strong> model def<strong>in</strong>ed <strong>in</strong> list<strong>in</strong>g 6can actually be regarded as an orchestration <strong>in</strong> termsof <strong>the</strong> WSMO conceptual model. Orchestrations <strong>in</strong>WSMO are modelled <strong>in</strong> <strong>the</strong> same way as choreographies.In fact <strong>the</strong> only difference is on <strong>the</strong> conceptuallevel. Whereas WSMO choreographies describe <strong>the</strong><strong>in</strong>terface behaviour of one service, orchestrations describehow a service makes use of o<strong>the</strong>r WSMO servicesor goals <strong>in</strong> order to achieve its capability. In ourcase, we alter <strong>the</strong> <strong>in</strong>terface behaviour of <strong>the</strong> requesterby <strong>in</strong>troduc<strong>in</strong>g rules, which are for example call<strong>in</strong>g acurrency conversion service of an external party. This<strong>in</strong>formation <strong>in</strong> fact would not be part of <strong>the</strong> choreographydescription. However, <strong>in</strong> <strong>the</strong> WSMX system itis executed <strong>in</strong> <strong>the</strong> same eng<strong>in</strong>e. Only when <strong>the</strong> requesterwants to publish its <strong>in</strong>terface behaviour to apartner, it is relevant to decide on <strong>the</strong> abstraction levelof what parts of <strong>the</strong> orchestration he wants to publish.An extract 3 of such a choreography is shown <strong>in</strong>list<strong>in</strong>g 6. Please note that <strong>the</strong> “//...” symbol denotesparts omitted <strong>in</strong> <strong>the</strong> list<strong>in</strong>g. The namespace declarations<strong>in</strong> <strong>the</strong> first l<strong>in</strong>es of a WSMO choreography def<strong>in</strong>itionare also omitted <strong>in</strong> <strong>the</strong> list<strong>in</strong>g.✞☎31 choreography32 stateSignature33 importsOntology {34 ”http://www.wsmx.org/ontologies/rosetta/coreelements”,35 ”http://www.m3pe.org/ontologies/rosetta/CTRLASM”36 }37 out rfq#Pip3A1RFQRequest withGround<strong>in</strong>g ”http://example.org/webServices#wsdl.<strong>in</strong>terface(ServicePortType/RFQ/Out)”38 out curr#currConvRequest withGround<strong>in</strong>g ”http://www.webcont<strong>in</strong>uum.net/webservices/ccydemo.wsdl#”39 <strong>in</strong> rfq#Pip3A1RFQResponse withGround<strong>in</strong>g ”http://example.org/webServices#wsdl.<strong>in</strong>terface(ServicePortType/RFQ/In)”40 transitionRules41 if (?Pip3A1RequestForQuoteRequest[42 fromRole hasValue ?fromRole,43 globalDocumentFunctionCode hasValue44 ?globalDocumentFunctionCode,45 quote hasValue ?quote,46 thisDocumentGenerationDate hasValue47 ?thisDocumentGenerationDate,48 thisDocumentIdentifier hasValue ?thisDocumentIdentifier,49 toRole hasValue ?toRole50 ] memberOf rfq#Pip3A1RFQRequest) <strong>and</strong>51 //...171 update(?controlledState[currentState hasValue 1]memberOf ctrlasm#controlledState)172 endIf173174 if (?controlledState[175 currentState hasValue 1176 ] memberOf ctrlasm#controlledState) <strong>and</strong>3 The full list<strong>in</strong>g can be found at:http://www.m3pe.org/ontologies/rosettaNet/177 exists ?Pip3A1RequestForQuoteRespond178 (?Pip3A1RequestForQuoteRespond memberOf rfq#Pip3A1RFQResponse) <strong>and</strong>179 //...357 update(?controlledState[currentState hasValue 2]memberOf ctrlasm#controlledState)358 endIf359360 if (?controlledState[361 currentState hasValue 2362 ] memberOf ctrlasm#controlledState) <strong>and</strong>363 exists ?globalProductSubstitutionReasonCode,364 ?productIdentification365 (?substituteProductReference[366 globalProductSubstitutionReasonCode hasValue367 ?globalProductSubstitutionReasonCode,368 productIdentification hasValue ?productIdentification369 ] memberOf core#substituteProductReference) <strong>the</strong>n370 add( # memberOf rfq#Pip3A1RFQRequest)371 endIf372373 if (?controlledState[374 currentState hasValue 2375 ] memberOf ctrlasm#controlledState) <strong>and</strong>376 exists ?globalCurrencyCode, ?monetaryAmount377 (?totalPrice[378 globalCurrencyCode hasValue ?globalCurrencyCode,379 monetaryAmount hasValue ”USD”380 ] memberOf rfq#totalPrice) <strong>the</strong>n381 add( # memberOf curr#currConvRequest)382 endIf✝List<strong>in</strong>g 6: Choreography <strong>in</strong> WSMLAs described <strong>in</strong> section 2, a WSMO choreographydef<strong>in</strong>ition consists of a state signature (c.f. l<strong>in</strong>e number32-39 <strong>in</strong> list<strong>in</strong>g 6), which imports one or possiblymany ontologies <strong>and</strong> transition rules (c.f. l<strong>in</strong>e number40-382), which are basic operations, such as add<strong>in</strong>g,remov<strong>in</strong>g <strong>and</strong> updat<strong>in</strong>g on <strong>the</strong> <strong>in</strong>stance data of <strong>the</strong>signature ontology. In our example we import twoontologies, <strong>the</strong> message ontology captur<strong>in</strong>g concepts<strong>in</strong> RosettaNet messages <strong>and</strong> a control State ASM ontology,which allows us to def<strong>in</strong>e term<strong>in</strong>ation <strong>and</strong> toimpose an explicitly modelled control flow for certa<strong>in</strong>parts of <strong>the</strong> choreography.The transition rules <strong>in</strong> list<strong>in</strong>g 6 start<strong>in</strong>g at l<strong>in</strong>e 39capture only a small number of heterogeneities possiblyoccurr<strong>in</strong>g <strong>in</strong> a RFQ collaboration. <strong>New</strong> rules canbe added when new partners are <strong>in</strong>troduced <strong>in</strong>to <strong>the</strong>scenario with different data heterogeneities.The first transition rule (l<strong>in</strong>es 41-172) def<strong>in</strong>es <strong>the</strong>ontology schema of <strong>the</strong> message sent by <strong>the</strong> buyerA (<strong>the</strong> mode “out” <strong>in</strong> <strong>the</strong> “stateSignature” states <strong>the</strong>pass<strong>in</strong>g direction, thus that <strong>the</strong> message is sent) <strong>and</strong>that <strong>the</strong> “currentState” of <strong>the</strong> mach<strong>in</strong>e is updated to<strong>the</strong> value “1” after a successful transmission of <strong>the</strong>message. The ground<strong>in</strong>g only def<strong>in</strong>es one WSDL <strong>in</strong>terfaces.However, s<strong>in</strong>ce <strong>the</strong> requesters wants to getquote response from multiple providers, <strong>the</strong> actualground<strong>in</strong>g list would <strong>in</strong>clude more endpo<strong>in</strong>ts.The second rule (l<strong>in</strong>e 174-358) checks <strong>the</strong> controlstate, to ensure that <strong>the</strong> “Pip3A1RFQRequest”message was successfully sent <strong>and</strong> that <strong>the</strong>✆57


“Pip3A1RequestForQuoteRespond” is received.The constra<strong>in</strong>ts <strong>in</strong> <strong>the</strong> antecedent of <strong>the</strong> rule act asa schema validation <strong>in</strong> <strong>the</strong> sense that <strong>the</strong> rule onlytriggers if <strong>the</strong> message returned by a partner <strong>in</strong>cludesall required fields. For space reasons <strong>the</strong>se parts of<strong>the</strong> choreography (between l<strong>in</strong>es 179-357) are notshown <strong>in</strong> list<strong>in</strong>g 6.The last two transition rules only trigger on a partof <strong>the</strong> message <strong>in</strong>stance which differs between suppliers.These are rules <strong>the</strong> requester <strong>in</strong>cludes to anticipatepossible data heterogeneities. If <strong>the</strong> requesterknows that some partners will provide <strong>the</strong> amount <strong>in</strong>USD, <strong>the</strong> fourth transition rule (l<strong>in</strong>es 373-382) ensuresthat a currency conversion service is used tocalculate <strong>the</strong> value <strong>in</strong> Euro. The third transition rule(l<strong>in</strong>es 360-371) fires if a partner provides a substituteproduct. It results <strong>in</strong> send<strong>in</strong>g out a new RFQ request.4.2 Evaluation ResultsThe evaluation is accomplished by analys<strong>in</strong>g RosettaNetPIPs, real <strong>in</strong>stances obta<strong>in</strong>ed from companies<strong>and</strong> by us<strong>in</strong>g a descriptive scenario to demonstrate <strong>the</strong>utility of our solutions.We first took a sample 56 PIP message specificationsrepresent<strong>in</strong>g 29,5 % of <strong>the</strong> total 190 messages.The PIPs cover product <strong>in</strong>formation, ordermanagement, <strong>in</strong>ventory management <strong>and</strong> manufactur<strong>in</strong>gclusters <strong>in</strong> RosettaNet classification. Measur<strong>in</strong>gunits were used <strong>in</strong> 24 (43%) <strong>and</strong> currency <strong>in</strong>formation<strong>in</strong> 28 (50 %) of <strong>the</strong> PIP messages <strong>in</strong> <strong>the</strong> sample.Moreover, we analysed two production message<strong>in</strong>stances <strong>and</strong> <strong>the</strong>ir process<strong>in</strong>g <strong>in</strong>structions. The PIPswere PIP 3A4 Request Purchase Order <strong>and</strong> 2A13 DistributeMaterial Composition Information. The <strong>in</strong>stancesuse only a part of <strong>the</strong> whole PIP data model<strong>and</strong> most of <strong>the</strong> optional elements are not used. Bothmessages used unit of measure <strong>in</strong>formation, but onlyone conta<strong>in</strong>ed currency <strong>in</strong>formation. Both supportedonly kilograms as mass units <strong>and</strong> Euros as currencies.In both cases, <strong>the</strong> PIP had just been taken <strong>in</strong>touse with a couple of partners.The axiomatised message semantics <strong>and</strong> mapp<strong>in</strong>grules <strong>in</strong>troduced <strong>in</strong> this paper would have both wideusage across different PIPs <strong>and</strong> that current real-lifeXML-based <strong>in</strong>tegrations lack this k<strong>in</strong>d of functionalitymotivates <strong>the</strong> need for this k<strong>in</strong>ds of solutions.This also provides practical examples of <strong>the</strong> benefitsof SWS technologies to current implementations.Although axiomatised knowledge can also be represented<strong>in</strong> XSLT scripts or custom cod<strong>in</strong>gs, <strong>the</strong> ma<strong>in</strong>advantage of express<strong>in</strong>g <strong>the</strong>se k<strong>in</strong>ds of def<strong>in</strong>itionalfacts <strong>in</strong> an ontology is its reusability. The “pound-Kilo” relation captures a conversion that is generallyapplicable across a wide range of PIP <strong>in</strong>teractions.This reuse is a major advantage over scripts, whichare typically rewritten for every schema conversioncaus<strong>in</strong>g po<strong>in</strong>t-to-po<strong>in</strong>t <strong>in</strong>tegrations that are hard toma<strong>in</strong>ta<strong>in</strong> <strong>and</strong> test that validation covers <strong>the</strong> necessaryconstra<strong>in</strong>ts.The example scenario discussed throughout <strong>the</strong>paper on quot<strong>in</strong>g <strong>and</strong> purchas<strong>in</strong>g highlights <strong>the</strong> requestersneed to save on purchas<strong>in</strong>g 4 . Hav<strong>in</strong>g suppliersfrom different countries br<strong>in</strong>gs heterogeneitiesas <strong>the</strong> partners are likely to use different currenciesor o<strong>the</strong>r measur<strong>in</strong>g or packag<strong>in</strong>g units. Benefits for<strong>the</strong> buyer result from decreased costs of purchas<strong>in</strong>gas <strong>the</strong> best value deals can be selected based on bestquotes. The suppliers benefit from be<strong>in</strong>g able to easier<strong>in</strong>tegrate to <strong>the</strong> buyer without hav<strong>in</strong>g to make potentiallycostly changes to <strong>the</strong>ir current <strong>in</strong>tegration <strong>in</strong>terfaces.In addition, <strong>the</strong> heterogeneities of us<strong>in</strong>g differentst<strong>and</strong>ards, such as UBL, are easier h<strong>and</strong>led bylift<strong>in</strong>g <strong>the</strong>m to ontologies where mapp<strong>in</strong>gs can easilybe performed.5 Related WorkThere are a number of papers discuss<strong>in</strong>g <strong>the</strong> use ofSWS to enhance current B2B st<strong>and</strong>ards. Some concentrateon ontologis<strong>in</strong>g B2B st<strong>and</strong>ards. Foxvog <strong>and</strong>Bussler (2005) describe how EDI X12 can be presentedus<strong>in</strong>g WSML, OWL <strong>and</strong> CycL ontology languages.The paper focuses on <strong>the</strong> issues encounteredwhen build<strong>in</strong>g a general purpose B2B ontology,but does not provide an architecture or implementation.Anicic et al. (2006) present how two XMLSchema-based automotive B2B st<strong>and</strong>ards are liftedus<strong>in</strong>g XSLT to OWL-based ontology. They use a twophasedesign <strong>and</strong> run-time approach similar to our’s.The paper is based on different B2B st<strong>and</strong>ards <strong>and</strong> focusesonly on <strong>the</strong> lift<strong>in</strong>g <strong>and</strong> lower<strong>in</strong>g to <strong>the</strong> ontologylevel.O<strong>the</strong>rs apply SWS technologies to B2B <strong>in</strong>tegrations.Preist et al. (2005) presented a solution cover<strong>in</strong>gall phases of a B2B <strong>in</strong>tegration life-cycle.The paperaddresses <strong>the</strong> lift<strong>in</strong>g <strong>and</strong> lower<strong>in</strong>g of RosettaNetXML messages to ontologies, but no richer knowledgeis formalised or used on <strong>the</strong> ontological level.Trastour et al. (2003b,a) augment RosettaNet PIPswith partner-specific DAML+OIL constra<strong>in</strong>ts <strong>and</strong> useagent technologies to automatically propose modificationsif partners use messages differently. Their4 See http://www.m3pe.org/ontologies/rosettaNet/ for completeexamples of XML <strong>in</strong>stances from which <strong>the</strong> heterogeneities can beautomatically solved.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 58


approach of accept<strong>in</strong>g RosettaNet <strong>in</strong> its current form<strong>and</strong> lift<strong>in</strong>g to semantic languages is similar to ours,but we go fur<strong>the</strong>r by axiomatis<strong>in</strong>g implicit knowledge<strong>and</strong> by provid<strong>in</strong>g mapp<strong>in</strong>gs to resolve data heterogeneities.6 ConclusionOur semantic B2B gateway allows a buyer to tackleheterogeneities <strong>in</strong> RosettaNet <strong>in</strong>teractions. The solutionapplies axiomatised knowledge <strong>and</strong> rules to resolvedata heterogeneities <strong>and</strong> to unify various unitconversions us<strong>in</strong>g functions to capture def<strong>in</strong>itionalfacts, such as <strong>the</strong> relation between pounds <strong>and</strong> kilograms.Such relations between different enumerationsare not specified by RosettaNet. The conversionshave potential use <strong>in</strong> significant portion of <strong>the</strong>190 RosettaNet PIP messages as shown <strong>in</strong> <strong>the</strong> evaluationof <strong>the</strong> PIP schemas <strong>and</strong> <strong>the</strong> current observed <strong>in</strong>tegrationslack <strong>the</strong> support for such heterogeneity. Wefur<strong>the</strong>r def<strong>in</strong>ed adaptive executable choreographies,which allow a more flexible <strong>in</strong>tegration of suppliers<strong>and</strong> make it easy to <strong>in</strong>troduce more competition to<strong>the</strong> supply cha<strong>in</strong>.Our future work <strong>in</strong>cludes fur<strong>the</strong>r extend<strong>in</strong>g <strong>and</strong>test<strong>in</strong>g our solution <strong>and</strong> develop<strong>in</strong>g an adapter to <strong>the</strong>reason<strong>in</strong>g component, which translates <strong>the</strong> requestssent from <strong>the</strong> back-end systems of <strong>the</strong> requester toqueries on <strong>the</strong> knowledge base <strong>and</strong> returns <strong>the</strong> resultsto <strong>the</strong> applications.AcknowledgementThe authors thank Eyal Oren <strong>and</strong> Tomas Vitvarfor fruitful discussions lead<strong>in</strong>g to <strong>the</strong> ideas of thispaper. This material is based upon works supportedby <strong>the</strong> F<strong>in</strong>nish Fund<strong>in</strong>g Agency for Technology<strong>and</strong> Innovation (Tekes) <strong>and</strong> <strong>the</strong> GraduateSchool for Electronic Bus<strong>in</strong>ess <strong>and</strong> Software Industry<strong>and</strong> <strong>the</strong> Science Foundation Irel<strong>and</strong> under GrantNo. SFI/04/BR/CS0694.ReferencesNenad Anicic, Nenad Ivezic, <strong>and</strong> Albert Jones. AnArchitecture for <strong>Semantic</strong> Enterprise ApplicationIntegration St<strong>and</strong>ards. In Interoperability of EnterpriseSoftware <strong>and</strong> Applications, pages 25–34.Spr<strong>in</strong>ger, 2006. ISBN 1-84628-151-2.Suresh Damodaran. B2b <strong>in</strong>tegration over <strong>the</strong> <strong>in</strong>ternetwith xml: Rosettanet successes <strong>and</strong> challenges.In Proceed<strong>in</strong>gs of <strong>the</strong> 13th <strong>in</strong>ternationalWorld Wide <strong>Web</strong> conference on Alternate track papers& posters, pages 188–195, 2004.Douglas Foxvog <strong>and</strong> Christoph Bussler. Ontologiz<strong>in</strong>gEDI: First Steps <strong>and</strong> Initial Experience. InInt. Workshop on Data Eng<strong>in</strong>eer<strong>in</strong>g Issues <strong>in</strong> E-Commerce <strong>and</strong> Services, pages 49–58, 2005.Yuri Gurevich. Evolv<strong>in</strong>g algebras 1993: LipariGuide. In Egon Börger, editor, Specification <strong>and</strong>Validation Methods, pages 9–37. Oxford UniversityPress, 1994.Arm<strong>in</strong> Haller, Emilia Cimpian, Adrian Mocan, EyalOren, <strong>and</strong> Christoph Bussler. WSMX – A <strong>Semantic</strong>Service-Oriented Architecture. In Proc. of <strong>the</strong>3rd Int. Conf. on <strong>Web</strong> Services, pages 321 – 328.IEEE Computer Society, 2005.Michael Kifer, Georg Lausen, <strong>and</strong> James Wu. Logicalfoundations of object-oriented <strong>and</strong> frame-basedlanguages. Journal of <strong>the</strong> ACM, 42(4):741–843,1995.Paavo Kot<strong>in</strong>urmi, Tomas Vitvar, Arm<strong>in</strong> Haller, RayBoran, <strong>and</strong> Aidan Richardson. <strong>Semantic</strong> web servicesenabled b2b <strong>in</strong>tegration. In Int. Workshop onData Eng<strong>in</strong>eer<strong>in</strong>g Issues <strong>in</strong> E-Commerce <strong>and</strong> Services,June 2006.Chris Preist, Javier Esplugas Cuadrado, Steve Battle,Stuart Williams, <strong>and</strong> Stephan Grimm. AutomatedBus<strong>in</strong>ess-to-Bus<strong>in</strong>ess Integration of a LogisticsSupply Cha<strong>in</strong> us<strong>in</strong>g <strong>Semantic</strong> <strong>Web</strong> ServicesTechnology. In Proc. of 4th Int. <strong>Semantic</strong> <strong>Web</strong> Conference,2005.Dumitru Roman <strong>and</strong> James Scicluna. Ontologybasedchoreography of wsmo services. Wsmo f<strong>in</strong>aldraft v0.3, DERI, 2006. http://www.wsmo.org/TR/d14/v0.3/.Dumitru Roman, Uwe Keller, Holger Lausen, Josde Bruijn, Rubn Lara, Michael Stollberg, AxelPolleres, Crist<strong>in</strong>a Feier, Christoph Bussler, <strong>and</strong> DieterFensel. <strong>Web</strong> Service Model<strong>in</strong>g Ontology. AppliedOntologies, 1(1):77 – 106, 2005.David Trastour, Claudio Bartol<strong>in</strong>i, <strong>and</strong> Chris Preist.<strong>Semantic</strong> <strong>Web</strong> support for <strong>the</strong> bus<strong>in</strong>ess-to-bus<strong>in</strong>esse-commerce pre-contractual lifecycle. ComputerNetworks, 42(5):661–673, 2003a.David Trastour, Chris Preist, <strong>and</strong> Derek Coleman.Us<strong>in</strong>g <strong>Semantic</strong> <strong>Web</strong> Technology to Enhance CurrentBus<strong>in</strong>ess-to-Bus<strong>in</strong>ess Integration Approaches.In Proc. of <strong>the</strong> Int. Enterprise Distributed ObjectComput<strong>in</strong>g Conference, pages 222–231, 2003b.59


CASCOM: Context-Aware Service Coord<strong>in</strong>ation <strong>in</strong> MobileComput<strong>in</strong>g EnvironmentsHeikki Hel<strong>in</strong>TeliaSonera F<strong>in</strong>l<strong>and</strong> OyjP.O.Box 970, FIN-00051 Sonera, FINLANDheikki.j.hel<strong>in</strong>@teliasonera.comAhti SyreeniTeliaSonera F<strong>in</strong>l<strong>and</strong> OyjP.O.Box 970, FIN-00051 Sonera, FINLANDahti.syreeni@teliasonera.comAbstractThe research project CASCOM will implement, validate, <strong>and</strong> trial value-added support for bus<strong>in</strong>essservices for mobile workers <strong>and</strong> users across mobile <strong>and</strong> fixed networks. The vision of <strong>the</strong> CAS-COM approach is that ubiquitous application services are flexibly co-ord<strong>in</strong>ated <strong>and</strong> pervasivelyprovided to <strong>the</strong> mobile users by <strong>in</strong>telligent agents <strong>in</strong> dynamically chang<strong>in</strong>g contexts of open, largescale,pervasive environments. The essential approach of CASCOM is <strong>the</strong> <strong>in</strong>novative comb<strong>in</strong>ationof <strong>in</strong>telligent agent technology, semantic <strong>Web</strong> services, peer-to-peer, <strong>and</strong> mobile comput<strong>in</strong>g for <strong>in</strong>telligentpeer-to-peer (IP2P) service environments. The services are provided by software agentsexploit<strong>in</strong>g <strong>the</strong> co-ord<strong>in</strong>ation <strong>in</strong>frastructure to efficiently operate <strong>in</strong> highly dynamic environments.1 Introductionprovid<strong>in</strong>g better customer satisfaction. For serviceproviders, CASCOM provides an <strong>in</strong>novative platformfor bus<strong>in</strong>ess application services.The essential approach of CASCOM 1 is <strong>the</strong> <strong>in</strong>novativecomb<strong>in</strong>ation of agent technology, semantic <strong>Web</strong> The project will carry out highly <strong>in</strong>novative researchaimed at provid<strong>in</strong>g a framework for agent-services, peer-to-peer, <strong>and</strong> mobile comput<strong>in</strong>g for<strong>in</strong>telligent peer-to-peer mobile service environments.The services of CASCOM environment are ronments. CASCOM will <strong>in</strong>tegrate <strong>and</strong> extend existbaseddata <strong>and</strong> service co-ord<strong>in</strong>ation <strong>in</strong> IP2P envi-provided by agents exploit<strong>in</strong>g <strong>the</strong> CASCOM coord<strong>in</strong>ation<strong>in</strong>frastructure to efficiently operate <strong>in</strong> comput<strong>in</strong>g, service co-ord<strong>in</strong>ation, <strong>and</strong> P2P comput<strong>in</strong>gtechnologies <strong>in</strong> areas such as agent-based mobilehighly dynamic environments. The CASCOM <strong>in</strong>telligentpeer-to-peer (IP2P) <strong>in</strong>frastructure <strong>in</strong>cludes service environment with its agents <strong>and</strong> co<strong>in</strong>g<strong>in</strong> mobile environments. A generic, open IP2Pefficient communication means, support for contextawareadaptation techniques, as well as dynamic plemented <strong>and</strong> deployed <strong>in</strong> CASCOM mostly asord<strong>in</strong>ation mechanisms will be prototypically im-service discovery <strong>and</strong> composition plann<strong>in</strong>g.open-source software enabl<strong>in</strong>g <strong>in</strong>stant take-up <strong>and</strong>CASCOM will implement <strong>and</strong> trial value-added use with<strong>in</strong> European <strong>and</strong> world community.support for bus<strong>in</strong>ess services for mobile workers <strong>and</strong> In general, it is expected that <strong>the</strong> outcomes ofusers across mobile <strong>and</strong> fixed networks. The vision CASCOM will have significant impact on <strong>the</strong> creationof a next-generation global, large-scale <strong>in</strong>telli-of <strong>the</strong> CASCOM approach is that ubiquitous applicationservices are flexibly co-ord<strong>in</strong>ated <strong>and</strong> pervasivelyprovided to <strong>the</strong> mobile users by agents <strong>in</strong> methods for service provision, discovery, composigentservice environment. Both, research results ondynamically chang<strong>in</strong>g contexts of open, pervasive tion <strong>and</strong> monitor<strong>in</strong>g, <strong>and</strong> <strong>the</strong> deployed prototype ofenvironments.an open IP2P service environment <strong>in</strong> <strong>the</strong> context ofFor end users, <strong>the</strong> CASCOM system provides nomadic comput<strong>in</strong>g will advance <strong>the</strong> state of <strong>the</strong> artseamless access to semantic <strong>Web</strong> services anytime, of European <strong>and</strong> world knowledge <strong>in</strong> areas relatedanywhere, <strong>and</strong> us<strong>in</strong>g any device. This gives freedom to <strong>the</strong> deployment of services <strong>in</strong> open systems.to mobile workers to do <strong>the</strong>ir bus<strong>in</strong>ess whenever <strong>and</strong>wherever needed. For network operators, CASCOM 2 Technical Approachaims towards vision of seamless service experienceFigure 1 depicts <strong>the</strong> technologies that we use <strong>in</strong> <strong>the</strong>CASCOM project. Software agents will be a key1 http://www.ist-cascom.org<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 60


Figure 1: CASCOM Technologiestechnology to address <strong>the</strong> challenges of <strong>the</strong> CAS-COM architecture (see Figure 2). IP2P networksprovide an environment for agents to collaborate aspeers shar<strong>in</strong>g <strong>in</strong>formation, tasks, <strong>and</strong> responsibilitieswith each o<strong>the</strong>r. Agents help to manage <strong>the</strong> P2Pnetwork complexity, <strong>and</strong> <strong>the</strong>y will improve <strong>the</strong>functionality of conventional P2P systems. Our <strong>in</strong>novations<strong>in</strong> this doma<strong>in</strong> will concern <strong>the</strong> developmentof context-aware agent-based semantic <strong>Web</strong>services, <strong>and</strong> flexible resource-efficient coord<strong>in</strong>ationof such services <strong>in</strong> <strong>the</strong> nomadic comput<strong>in</strong>gfield. Fur<strong>the</strong>r, context-awareness is <strong>in</strong>vestigated<strong>in</strong> <strong>the</strong> context of IP2P environment <strong>and</strong> we will developcontext-aware agents which provide variousbus<strong>in</strong>ess application services.Us<strong>in</strong>g agents <strong>in</strong> wireless environments has beenstudied extensively. We will build on <strong>the</strong> previouswork by us<strong>in</strong>g exist<strong>in</strong>g agent platforms as a basis ofour architecture. However, <strong>the</strong> P2P aspects are <strong>in</strong>sufficientlytaken <strong>in</strong>to account <strong>in</strong> <strong>the</strong>se platforms<strong>and</strong> <strong>the</strong>refore our research represents advancements<strong>in</strong> this direction. CASCOM will provide solutionsfor agent communication between agents withoutassumption of any fixed <strong>in</strong>frastructure.Service co-ord<strong>in</strong>ation mechanisms of P2P systemscan be applied to multi-agent systems to improve<strong>the</strong>ir efficiency. Although this may be acceptedon a conceptual level, <strong>the</strong> comb<strong>in</strong>ation ofagents <strong>and</strong> P2P environments certa<strong>in</strong>ly deservesmore <strong>in</strong>novative research, especially regard<strong>in</strong>g nomadicenvironments. As an example, many P2Poverlay network algorithms lacks support for rapidnode movements. The dynamic topology of IP2Pnetworks, characteristics of wireless network connections,<strong>and</strong> <strong>the</strong> limited capacity or mobile devicespose several challenges that have been addressed<strong>in</strong>adequately <strong>in</strong> service discovery architectures. InCASCOM, we will <strong>in</strong>vestigate mechanisms for servicediscovery algorithms for dynamic IP2P environments.The problem of service co-ord<strong>in</strong>ation can besplit <strong>in</strong>to several sub problems: discovery, compositionplann<strong>in</strong>g, execution monitor<strong>in</strong>g, <strong>and</strong> failurerecovery. CASCOM will advance <strong>the</strong> state of <strong>the</strong> artby carry<strong>in</strong>g out <strong>in</strong>novative research on how <strong>the</strong>seproblems can be solved <strong>in</strong> IP2P environments. EspeciallyCASCOM will provide flexible <strong>and</strong> efficientmatch<strong>in</strong>g algorithms to be performed <strong>in</strong> largescale <strong>and</strong> resource limited IP2P environments.Us<strong>in</strong>g AI plann<strong>in</strong>g formalisms <strong>in</strong> service composition<strong>and</strong> plann<strong>in</strong>g are developed for problemswhere <strong>the</strong> number of operators is relatively smallbut where plans can be complex. In <strong>Web</strong> servicecomposition for open, large-scale IP2P environmentsplann<strong>in</strong>g methods deal<strong>in</strong>g with huge numberof possible service are required. However, plans arenot necessarily very complex, <strong>and</strong> <strong>the</strong>refore plann<strong>in</strong>gmethods must follow more closely <strong>the</strong> structureof <strong>the</strong> service directories. CASCOM will developplann<strong>in</strong>g mechanisms that establish plan fragmentsdirectly on top of <strong>the</strong> service directory to solve thisproblem.AcknowledgementsThis work has been supported <strong>in</strong> part by <strong>the</strong> EuropeanCommission under <strong>the</strong> project grant FP6-IST-511632-CASCOM. The authors would also like tothank all CASCOM consortium members (DFKI(Germany), TeliaSonera (Sweden/F<strong>in</strong>l<strong>and</strong>),ADETTI (Portugal), EPFL (Switzerl<strong>and</strong>), URJC(Spa<strong>in</strong>), FrameTech (Italy), UniBAS (Switzerl<strong>and</strong>)<strong>and</strong> EMA (F<strong>in</strong>l<strong>and</strong>)).Figure 2: The CASCOM IP2P architecture61


Towards reflective <strong>in</strong>formation managementJari Yli-Hietanen * Samuli Niiranen *†* Digital Media Institute* Digital Media InstituteTampere University of Technologyjari.yli-hietanen@tut.fiAbstractTampere University of Technology† Visit<strong>in</strong>g at Decision Systems GroupBrigham <strong>and</strong> Women’s HospitalHarvard Medical Schoolsamuli.niiranen@tut.fiWe discuss <strong>the</strong> evolution of <strong>in</strong>formation management <strong>and</strong> argue that <strong>the</strong> current paradigm is reach<strong>in</strong>gits limits <strong>in</strong> terms <strong>in</strong> ability to provide more utility. Our proposition is that this is due to <strong>the</strong> natureof current <strong>in</strong>formation management tools be<strong>in</strong>g built around <strong>the</strong> paradigm of a document, <strong>in</strong> <strong>the</strong>abstract sense of <strong>the</strong> word, shar<strong>in</strong>g many of <strong>the</strong>ir limitations. We discuss reflective <strong>in</strong>formationmanagement break<strong>in</strong>g free from this through a native ability to directly reflect on <strong>in</strong>formation.1 IntroductionProponents of evolutionary psychology, StevenP<strong>in</strong>ker be<strong>in</strong>g perhaps <strong>the</strong> most famous example,argue that <strong>the</strong> mental evolution of primates towards<strong>the</strong> sentient man was pushed forward by <strong>the</strong> environmentsfaced by early hunter-ga<strong>the</strong>rers (e.g., see(P<strong>in</strong>ker, 1999)). The result, Homo Sapiens, is <strong>the</strong>ultimate hunter-ga<strong>the</strong>rer, a social animal who’smental <strong>and</strong> physical skills are tuned at co-operation<strong>and</strong> collaboration at <strong>the</strong> small scale of hunt<strong>in</strong>g parties.Consider<strong>in</strong>g <strong>the</strong> role of <strong>in</strong>formation management <strong>in</strong>this context, humans are adept at process<strong>in</strong>g <strong>and</strong>stor<strong>in</strong>g <strong>in</strong>formation natively when it comes to mattersclose to <strong>the</strong> hunter-ga<strong>the</strong>rer life style. Naturalspoken language as a tool of collaboration, especiallywhen <strong>the</strong> collaborat<strong>in</strong>g parties share a commonground <strong>and</strong> history, is an evolutionary adaptationprovid<strong>in</strong>g an extremely efficient <strong>in</strong>formationmanagement tool for <strong>the</strong> hunter-ga<strong>the</strong>rer (see(P<strong>in</strong>ker, 2000)). The emergence of complexity, aswe currently underst<strong>and</strong> <strong>the</strong> term, <strong>in</strong> human societiesbeyond <strong>the</strong> ad-hoc organizations of <strong>the</strong> hunterga<strong>the</strong>rerco<strong>in</strong>cided with <strong>the</strong> grow<strong>in</strong>g populations <strong>and</strong>related urban sett<strong>in</strong>gs facilitated by <strong>the</strong> surplus offood created by advanc<strong>in</strong>g agriculture. The result<strong>in</strong>glarge, complex societies needed new <strong>in</strong>formationmanagement tools to h<strong>and</strong>le <strong>the</strong> large amounts <strong>in</strong>formationrelated to <strong>the</strong>ir management. Written language<strong>and</strong> its practical manifestation, <strong>the</strong> writtendocument, emerged as <strong>the</strong> tool to h<strong>and</strong>le <strong>the</strong> <strong>in</strong>formationoverflow created by advanc<strong>in</strong>g societies.The use of documents to convey <strong>and</strong> store <strong>the</strong> largemass of <strong>in</strong>formation created by advanc<strong>in</strong>g agricultural,<strong>and</strong> later on <strong>in</strong>dustrial, societies represented afundamental break from <strong>in</strong>nate <strong>in</strong>formation management.Although documents are written <strong>in</strong> expressivenatural language, <strong>the</strong>y fail to reflect <strong>the</strong> <strong>in</strong>natel<strong>in</strong>ked nature of <strong>in</strong>formation management native to<strong>the</strong> human m<strong>in</strong>d. When we document someth<strong>in</strong>g, wealmost always lose a part of <strong>the</strong> orig<strong>in</strong>al piece of<strong>in</strong>formation. Typically some part of <strong>the</strong> orig<strong>in</strong>alcontext, of which we are not necessarily even consciousof at <strong>the</strong> time of <strong>the</strong> documentation, is lost <strong>in</strong><strong>the</strong> process. With documentation, <strong>the</strong> worst case isthat relevant <strong>in</strong>formation is lost <strong>in</strong>to a sea of unrelateddata without mean<strong>in</strong>g <strong>and</strong> context. The keyquestion aris<strong>in</strong>g from <strong>the</strong>se considerations is if cont<strong>in</strong>u<strong>in</strong>gon <strong>the</strong> documentation-centric path is <strong>the</strong>optimal choice <strong>in</strong> <strong>the</strong> contemporary world of <strong>the</strong>digital computer. Also, although highly expressive,<strong>the</strong> <strong>in</strong>terpretation of natural language compositionsis highly context-sensitive <strong>and</strong> currently relies onour native disambiguation facilities <strong>and</strong> a sharedcommon ground with <strong>the</strong> composer.What comes after digital documentation <strong>in</strong> <strong>in</strong>formationmanagement? Look<strong>in</strong>g at <strong>the</strong> contemporarydevelopments of <strong>in</strong>formation technology, one keytrend is <strong>the</strong> emergence of l<strong>in</strong>kage. For example, akey power of <strong>the</strong> World Wide <strong>Web</strong> is that it pro-<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 62


vides a way to dynamically l<strong>in</strong>k documents toge<strong>the</strong>r.The benefits of l<strong>in</strong>kage <strong>in</strong> <strong>the</strong> case of digital documentsare obvious, especially when <strong>the</strong> goal is tosearch <strong>and</strong> sort <strong>the</strong>m. L<strong>in</strong>kage is to documents whatroads are to cities. Still, l<strong>in</strong>ked documents do notprovide a panacea for <strong>the</strong> complex <strong>in</strong>formationmanagement needs sprout<strong>in</strong>g around us <strong>in</strong> bus<strong>in</strong>ess<strong>and</strong> elsewhere. This is true even if we exp<strong>and</strong> <strong>the</strong>concept of a digital document to <strong>in</strong>clude rigidlycoded <strong>and</strong> structured <strong>in</strong>formation <strong>in</strong> order to solve<strong>the</strong> problem of ambiguity <strong>in</strong>herent to natural languageas we will discuss later on. It can argued that<strong>in</strong>formation management systems built around <strong>the</strong>concept of a digital document, even a l<strong>in</strong>ked <strong>and</strong>conventionally structured one, have failed to fulfill<strong>the</strong> promises made <strong>in</strong> <strong>the</strong> early age of comput<strong>in</strong>g.Could <strong>the</strong> role of l<strong>in</strong>kage <strong>in</strong> <strong>in</strong>formation be broughtto a new level <strong>and</strong> could this change br<strong>in</strong>g aboutadvantages for <strong>the</strong> management of <strong>in</strong>formation?Look<strong>in</strong>g at this question from <strong>the</strong> perspective ofbus<strong>in</strong>ess or o<strong>the</strong>r organizations provides a numberof <strong>in</strong>terest<strong>in</strong>g <strong>in</strong>sights. Organizations target<strong>in</strong>g complexactivities have traditionally been hierarchicalwith formalized responsibilities <strong>and</strong> roles. Still,modern management science has raised <strong>the</strong> questionwhe<strong>the</strong>r this organizational approach is <strong>the</strong> optimalone <strong>in</strong> all situations (Wilk<strong>in</strong>son, 1998). So what ishold<strong>in</strong>g back <strong>the</strong> trend towards decentralization <strong>in</strong>organizations target<strong>in</strong>g complex activities? Complexactivities <strong>in</strong>volve many pieces of <strong>in</strong>formation whichcurrent <strong>in</strong>formation management tools, based primarilyon electronic documents, cannot reflect <strong>in</strong> anatural way. The result is that a hierarchy is requiredto gradually transform management decisions downto practical work orders <strong>and</strong>, on <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>, toprovide report<strong>in</strong>g of factory floor activities back to<strong>the</strong> decision makers.As a practical example, a s<strong>in</strong>gle work order document,even if available <strong>in</strong> <strong>the</strong> context of an enterpriseresource plann<strong>in</strong>g system, cannot natively reflecton <strong>the</strong> activity it relates to. Not all <strong>the</strong> l<strong>in</strong>kages,relevant to <strong>the</strong> purpose <strong>and</strong> mean<strong>in</strong>g of <strong>the</strong> workorder, are available. Native means here <strong>the</strong> ability toobta<strong>in</strong> <strong>the</strong> relation between this piece of <strong>in</strong>formation<strong>and</strong> <strong>the</strong> goals of <strong>the</strong> organization. Compar<strong>in</strong>g largeorganizations to s<strong>in</strong>gle-person ventures it can beargued, that a s<strong>in</strong>gle-person venture has a relativeadvantage <strong>in</strong> <strong>in</strong>formation management. Namely, <strong>the</strong>entrepreneur can natively underst<strong>and</strong> <strong>the</strong> entirevalue cha<strong>in</strong>.2 Reflective <strong>in</strong>formation managementA viewpo<strong>in</strong>t we denote ‘reflective <strong>in</strong>formation management’approaches <strong>the</strong> presented problem by <strong>in</strong>troduc<strong>in</strong>ga way to manage <strong>in</strong>formation with manydependencies always relevant to complex activities.How can we briefly characterize <strong>the</strong> approach?There are two key aspects to it. First of all, <strong>in</strong>formationis natively h<strong>and</strong>led as an unrestricted l<strong>in</strong>kage ofatomic reflections, collected ideally directly fromtransactions result<strong>in</strong>g from f<strong>in</strong>ancial or o<strong>the</strong>r concretedecisions made by people <strong>and</strong> <strong>in</strong>clud<strong>in</strong>g o<strong>the</strong>r<strong>in</strong>formation relevant to <strong>the</strong> activity at h<strong>and</strong>. Thedescriptive power of a diverse <strong>and</strong> large set of directobservations cannot be stressed enough. We arguethat <strong>the</strong> result<strong>in</strong>g associative power of <strong>the</strong> l<strong>in</strong>kagecan create a foundation for reduc<strong>in</strong>g <strong>the</strong> need forlayered, manual <strong>in</strong>formation management. Secondly,look<strong>in</strong>g at <strong>the</strong> operational side of reflective<strong>in</strong>formation management, <strong>the</strong> emphasis is put onhuman abstraction level, iterative collaboration betweenhumans <strong>and</strong> <strong>in</strong>formation management tools.Simply put, reflective <strong>in</strong>formation management triesto replace <strong>the</strong> middle men read<strong>in</strong>g <strong>and</strong> writ<strong>in</strong>gdocuments produced <strong>in</strong> a layered way with <strong>the</strong> abilityto directly obta<strong>in</strong> <strong>the</strong> relation between each pieceof <strong>in</strong>formation <strong>and</strong> <strong>the</strong> goals of <strong>the</strong> activity <strong>in</strong> question.How does reflective <strong>in</strong>formation management relateto <strong>the</strong> numerous attempts at <strong>in</strong>telligent comput<strong>in</strong>g<strong>and</strong> artificial <strong>in</strong>telligence? In contrast to attempts ata generic <strong>in</strong>telligent mach<strong>in</strong>e, us<strong>in</strong>g approaches suchas neural networks or expert systems (Russell <strong>and</strong>Norvig 2003), reflective <strong>in</strong>formation managementattempts to construct a mechanism support<strong>in</strong>g people<strong>in</strong> <strong>the</strong>ir <strong>in</strong>formation management activities. Thefocus is moved from st<strong>and</strong>alone, unsupervised <strong>in</strong>telligentsystems towards <strong>in</strong>crementally <strong>and</strong> cumulativebuilt tools, which cont<strong>in</strong>uously collaborate withusers through <strong>the</strong> efficient <strong>and</strong> flexible use of abstractionlevel traversal. With<strong>in</strong> this collaboration,<strong>the</strong> key tool is support for reflective communicationamong collaborat<strong>in</strong>g people <strong>in</strong>stead of support forformal documentation.As stated, <strong>the</strong> capability of <strong>the</strong> approach is to enableseamless traversal with<strong>in</strong> different levels of abstraction<strong>and</strong> different dimensions of an available <strong>in</strong>formationmass. The goal is not to automate decisionmak<strong>in</strong>g but to provide people mak<strong>in</strong>g decisions withcontext-optimized access to <strong>in</strong>formation. The keypo<strong>in</strong>t is that access to <strong>in</strong>formation is provided athuman abstraction level <strong>in</strong> a way that people canconcentrate on decision mak<strong>in</strong>g <strong>in</strong>stead of formatt<strong>in</strong>g<strong>and</strong> <strong>in</strong>terpret<strong>in</strong>g <strong>in</strong>formation to <strong>and</strong> from mach<strong>in</strong>e-readableformats. Even more important goal is63


<strong>the</strong> capability to provide <strong>the</strong> people with <strong>the</strong> <strong>in</strong>formation(e.g., <strong>in</strong> <strong>the</strong> form of seem<strong>in</strong>gly simple buthighly contextualized messages) currently relevantto <strong>the</strong>ir decision mak<strong>in</strong>g.Go<strong>in</strong>g back to <strong>the</strong> presented historical review towards<strong>the</strong> use of documents, <strong>in</strong> <strong>the</strong> abstract sense of<strong>the</strong> word, from natural collaboration, we note thatultimately reflective <strong>in</strong>formation management takes<strong>the</strong> way of organiz<strong>in</strong>g human collaboration, also <strong>in</strong>complex activities, back to its natural form, which ismore close to communication among tribesmen thanto sterile documentation <strong>in</strong> hierarchical sett<strong>in</strong>gs.3 Unrestricted l<strong>in</strong>kageConsider<strong>in</strong>g <strong>the</strong> described characteristics of reflective<strong>in</strong>formation management, <strong>the</strong> goal of <strong>the</strong> approachis human abstraction level <strong>in</strong>formation management<strong>in</strong> sett<strong>in</strong>gs where <strong>the</strong> <strong>in</strong>nate human abilityis <strong>in</strong>sufficient due to <strong>the</strong> variety or volume of possiblyrelevant pieces of <strong>in</strong>formation.Hampton (2003) has discussed how humans useabstraction <strong>and</strong> context <strong>in</strong> concept representation.Pick<strong>in</strong>g up some key po<strong>in</strong>ts from his discussion,native human <strong>in</strong>formation management <strong>in</strong>volves aflexible abstraction mechanism. Characteristic ofthis flexibility is that context heavily <strong>in</strong>fluenceshow, for example, a specific heard word is <strong>in</strong>terpreted.Ano<strong>the</strong>r characteristic he lists is <strong>the</strong> ability toflexibly add new dimensions to previously learnedconcepts without h<strong>in</strong>der<strong>in</strong>g <strong>the</strong> ability to pick <strong>the</strong>currently most relevant dimensions dur<strong>in</strong>g a cognitiveprocess. Also, human learn<strong>in</strong>g is characterizedby <strong>the</strong> ability to fluidly leverage previously learnedconcepts <strong>and</strong> <strong>the</strong>ir relations while fac<strong>in</strong>g new phenomena.Consider<strong>in</strong>g implications of <strong>the</strong>se characteristics forreflective <strong>in</strong>formation management, <strong>the</strong> key observationis <strong>the</strong> unbounded nature of human abstractionlevel <strong>in</strong>formation management. This leads <strong>in</strong>to <strong>the</strong>conclusion that design-while-use is <strong>the</strong> only possiblebasic paradigm for reflective <strong>in</strong>formation managementtools. However, we also limit <strong>the</strong> scope of <strong>the</strong>tools by not sett<strong>in</strong>g <strong>the</strong> goal at autonomous or unsupervisedoperation but ra<strong>the</strong>r at <strong>the</strong> capability of <strong>the</strong>tools to serve as collaborative agents. The key capabilityof <strong>the</strong> tools is thus <strong>the</strong> ability for abstractiontraversal <strong>and</strong> dimension surf<strong>in</strong>g <strong>in</strong> an unboundedconcept space. This is <strong>in</strong> contrast to <strong>the</strong> approachused, for example, <strong>in</strong> <strong>Semantic</strong> <strong>Web</strong> research whereconcepts are modeled us<strong>in</strong>g pre-constructed ontologies.Exp<strong>and</strong><strong>in</strong>g on this, conventionally <strong>in</strong>formation hashad to be rigidly <strong>and</strong> strictly coded <strong>and</strong> structured tobe mach<strong>in</strong>e-processed. This formalization sets ah<strong>in</strong>drance for <strong>in</strong>formation process<strong>in</strong>g as typically<strong>the</strong> structure for <strong>the</strong> <strong>in</strong>formation has to be designedbefore process<strong>in</strong>g. This leads at m<strong>in</strong>imum to <strong>in</strong>creasedcomplexity <strong>in</strong> <strong>the</strong> case where <strong>the</strong> operationenvironment evolves dur<strong>in</strong>g use. In practice, such<strong>in</strong>formation process<strong>in</strong>g systems work satisfactorilyonly <strong>in</strong> bounded cases where <strong>the</strong> boundaries of <strong>the</strong>case space can be predicted reliably. For <strong>the</strong>se reasons,reflective <strong>in</strong>formation management does notrely on structures fixed before use but ra<strong>the</strong>r on anevolv<strong>in</strong>g, unrestricted l<strong>in</strong>kage of direct observations<strong>and</strong> o<strong>the</strong>r <strong>in</strong>formation. Thus reflective <strong>in</strong>formationmanagement is suited also for unbounded cases.We will next describe one possible physical manifestationfor <strong>the</strong> described unrestricted l<strong>in</strong>kagewhere a set of concept relations with practicallyunbounded expressive power us<strong>in</strong>g natural languagevocabulary for concept <strong>and</strong> relation labels provides<strong>the</strong> basis for concept model<strong>in</strong>g. The follow<strong>in</strong>g is anexample of concept relations from health care:12892 “low-density lipoprote<strong>in</strong>”(is) “cholesterol”12893 “LDL” (is) “low-density lipoprote<strong>in</strong>”...44137 “laboratory result” (for)“patient” 114604539368744138 *44137c (is) “290245-1234”44139 *44137a (is) “LDL value”44140 *44139c (is) “89 mg/dL”As seen from this example a concept relation has asyntax similar, for example, to <strong>the</strong> one used <strong>in</strong> <strong>the</strong>W3C RDF st<strong>and</strong>ards (see http://www.w3.org/RDF/).Specifically, each relation is a 5-tuple. Basically, <strong>the</strong>member B relates <strong>the</strong> member A <strong>and</strong> C to each o<strong>the</strong>rwith an optional timestamp <strong>in</strong>dicat<strong>in</strong>g <strong>the</strong> absolutemarkup time.The coupl<strong>in</strong>gs between <strong>the</strong> concept relations areei<strong>the</strong>r implicit or explicit. For example, an implicitcoupl<strong>in</strong>g exists between all relations conta<strong>in</strong><strong>in</strong>g a“LDL value” labeled concept through <strong>the</strong> existenceof <strong>the</strong> similar str<strong>in</strong>g. Explicit coupl<strong>in</strong>gs are def<strong>in</strong>edthrough label<strong>in</strong>g A, B <strong>and</strong> C members with a referencenotation. This notation uses relation sequencenumbers <strong>and</strong> A, B or C membership as po<strong>in</strong>ts ofreference. For example, when <strong>the</strong> member C is la-<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 64


eled “*441437c”, it <strong>in</strong>dicates a reference to <strong>the</strong> Cmember of <strong>the</strong> relation with identification 441437. Itis important to note that <strong>the</strong> representation does notmake any difference between data <strong>and</strong> metadata.One mechanism for operation <strong>in</strong> an unbounded casespace is <strong>the</strong> implicit coupl<strong>in</strong>g between natural languagelabeled concepts. This enables coupl<strong>in</strong>g of anew concept relation to already exist<strong>in</strong>g conceptrelations without <strong>the</strong> need to modify <strong>the</strong>m or to evenverify <strong>the</strong>ir existence. It should also be noted thats<strong>in</strong>ce pre-def<strong>in</strong>ed ontologies cannot be used withunbounded case spaces, natural language is <strong>the</strong> onlypractical source for concept label<strong>in</strong>g. The unavoidableambiguity of natural language has conventionallyh<strong>in</strong>dered its use <strong>in</strong> applications <strong>in</strong>volv<strong>in</strong>g mach<strong>in</strong>e-process<strong>in</strong>g.We propose that <strong>in</strong>stead of formaliz<strong>in</strong>g<strong>the</strong> used language, ambiguity should besolved by firstly utiliz<strong>in</strong>g context as availablethrough <strong>the</strong> associative power of <strong>the</strong> l<strong>in</strong>kage <strong>and</strong> <strong>the</strong>related descriptive power of <strong>the</strong> direct observationsconta<strong>in</strong>ed <strong>in</strong> it <strong>and</strong> secondarily by mak<strong>in</strong>g a clarify<strong>in</strong>gquery to appropriate user. Naturally, <strong>the</strong> abilityto learn from <strong>the</strong>se <strong>in</strong>teractions is a critical facilityhere.4 Case: health careHealth care work illustrates especially well <strong>the</strong> characteristicsof a field <strong>in</strong>volved <strong>in</strong> complex activitieswhere documents have had an important role <strong>in</strong> <strong>in</strong>formationmanagement. Attempts at fully digitaliz<strong>in</strong>g<strong>the</strong> patient record, where <strong>the</strong> goal has been toimprove health work efficiency, have run <strong>in</strong>to majorproblems, especially if one considers <strong>the</strong> orig<strong>in</strong>algoal of <strong>in</strong>creased efficiency (Dorenfest, 2000),(Heeks, 2005), (Wears <strong>and</strong> Berg, 2005), (Ash et al,2004), (Kuhn <strong>and</strong> Giuse, 2001). The <strong>in</strong>troduction ofan electronic patient record has perhaps removed <strong>the</strong>conventional archivist <strong>and</strong> document courier from<strong>the</strong> picture but someth<strong>in</strong>g has been lost at <strong>the</strong> sametime. It can be argued that <strong>the</strong> electronic record has<strong>in</strong>creased formalization of health care work, due to<strong>the</strong> use of strictly structured <strong>and</strong> <strong>in</strong>flexible electronicpatient documents (Berg <strong>and</strong> Toussa<strong>in</strong>t, 2003). This<strong>in</strong>creased formalization has broken up natural pathsof <strong>in</strong>formation shar<strong>in</strong>g <strong>and</strong> work organization. Thevalue of tacit knowledge, which is by def<strong>in</strong>itionimpossible to formalize (Nonaka <strong>and</strong> Takeuchi,1995), <strong>and</strong> a shared common ground between collaborat<strong>in</strong>ghealth care workers have an essential role<strong>in</strong> successful <strong>and</strong> efficient cl<strong>in</strong>ical work (Stefanelli,2001). Of course, it cannot be denied that early <strong>in</strong>formationprocess<strong>in</strong>g systems <strong>in</strong> health care, as wellas <strong>in</strong> o<strong>the</strong>r <strong>in</strong>dustries, have been successful at <strong>the</strong>automation of actuarial work exemplified by repetitivecomputation of tabular numerical data. To clarifythis, process<strong>in</strong>g of documents can be enhancedby digitalization but not all work can be made moreefficient by digitaliz<strong>in</strong>g documents.Exp<strong>and</strong><strong>in</strong>g on <strong>the</strong> set of concept relations presented<strong>in</strong> <strong>the</strong> section 3, we will next present a simple exampleon how <strong>in</strong>formation management operationscan be carried out <strong>in</strong> this context. Specifically, welook at how present<strong>in</strong>g a simple goal via naturallanguage fragments can provide for contextual <strong>in</strong>formationaccess to <strong>in</strong>formation <strong>and</strong> semantic sensor<strong>and</strong> action <strong>in</strong>terfac<strong>in</strong>g.Let us assume that for a patient group laboratory testresults for LDL cholesterol are made available <strong>in</strong> <strong>the</strong>described representation through a semantic sensor<strong>in</strong>terface mapp<strong>in</strong>g a laboratory system’s structure<strong>and</strong> semantics for <strong>the</strong> LDL values directly to conceptrelations. Now, a medical professional search<strong>in</strong>gfor a specific patient’s LDL values <strong>in</strong>itiates asearch with <strong>the</strong> query “cholesterol 290245”.Search <strong>and</strong> traversal algorithms as well as an iterativequery process can be applied to provide <strong>the</strong>professional with <strong>the</strong> value “89 mg/dL”.Assum<strong>in</strong>g that we describe action <strong>in</strong>terfaces with <strong>the</strong>same relation mechanism, we can fur<strong>the</strong>rmore directlycouple <strong>the</strong> found LDL value <strong>and</strong> <strong>the</strong> recipient’saddress <strong>in</strong>formation, for example, to a physicalsoftware component capable of send<strong>in</strong>g an e-mailmessage aga<strong>in</strong> with <strong>the</strong> help of an iterative queryprocess. This way to relate <strong>the</strong> pieces of <strong>in</strong>formation<strong>and</strong> <strong>the</strong> actions operat<strong>in</strong>g on <strong>the</strong>m enables, at least <strong>in</strong>pr<strong>in</strong>ciple, a native ability to directly reflect on <strong>in</strong>formation.5 DiscussionThe current discussion represents merely a start<strong>in</strong>gpo<strong>in</strong>t <strong>and</strong> a vision for more detailed work <strong>in</strong> <strong>the</strong> areaof human abstraction level <strong>in</strong>formation management.Important open research questions <strong>in</strong>clude,but are not limited to, performance issues related to<strong>the</strong> utilization an unrestricted l<strong>in</strong>kage <strong>and</strong> <strong>the</strong> repeatabilityof operations carried out <strong>in</strong> <strong>the</strong> context of<strong>the</strong> described paradigm.ReferencesSteven P<strong>in</strong>ker. How <strong>the</strong> M<strong>in</strong>d Works. W.W. Norton& Company, <strong>New</strong> York, 1999.65


Steven P<strong>in</strong>ker. The Language Inst<strong>in</strong>ct: How <strong>the</strong>M<strong>in</strong>d Creates Language. Harper PerennialModern Classics, <strong>New</strong> York, 2000.Adrian Wilk<strong>in</strong>son. Empowerment: <strong>the</strong>ory <strong>and</strong> practice.Personnel Review. 27(1): 40-56, 1998.Stuart Russell, Peter Norvig. Artifical <strong>Intelligence</strong>:A Modern Approach. Prentice Hall, 2nd edition,Upper Saddle River, 2003.James A. Hampton. Abstraction <strong>and</strong> context <strong>in</strong> conceptrepresentation. Philosophical Transactionsof <strong>the</strong> Royal Society of London B. 358: 1251-1259, 2003.Sheldon Dorenfest. The decade of <strong>the</strong> ‘90s. Poor useof IT <strong>in</strong>vestment contributes to <strong>the</strong> grow<strong>in</strong>ghealthcare crisis. Health Care Informatics.17(8):64–7,2000.Richard Heeks. Health <strong>in</strong>formation systems: Failure,success <strong>and</strong> improvisation. International Journalof Medical Informatics. Aug 19, 2005.Robert L. Wears, Marc Berg. Computer technology<strong>and</strong> cl<strong>in</strong>ical work: still wait<strong>in</strong>g for Godot.Journal of American Medical Association.293(10): 1261-3, 2005.Joan S. Ash, Marc Berg, Enrico Coiera. Some un<strong>in</strong>tendedconsequences of <strong>in</strong>formation technology<strong>in</strong> health care: <strong>the</strong> nature of patient care <strong>in</strong>formationsystem-related errors. Journal ofAmerican Medical Informatics Association.Mar-Apr;11(2):104-12, 2004.Klaus A. Kuhn, Dario A. Giuse. From hospital <strong>in</strong>formationsystems to health <strong>in</strong>formation systems.Problems, challenges, perspectives.Methods of Information Medic<strong>in</strong>e. 40(4):275-87, 2001.Marc Berg, Pieter Toussa<strong>in</strong>t. The mantra of model<strong>in</strong>g<strong>and</strong> <strong>the</strong> forgotten powers of paper: A sociotechnicalview on <strong>the</strong> development of processorientedICT <strong>in</strong> health care. International Journalof Medical Informatics. Mar;69(2-3):223-34, 2003.Ikujiro Nonaka, Hirotaka Takeuchi. The Knowledge-Creat<strong>in</strong>g Company. How Japanese CompaniesCreate <strong>the</strong> Dynamics of Innovation. OxfordUniversity Press, <strong>New</strong> York, 1995.Mario Stefanelli. The socio-organizational age ofartificial <strong>in</strong>telligence <strong>in</strong> medic<strong>in</strong>e. <strong>Artificial</strong> <strong>Intelligence</strong><strong>in</strong> Medic<strong>in</strong>e. 23(1): 25-47, 2001.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 66


Elastic Systems: Role of Models <strong>and</strong> ControlHeikki Hyötyniemi ⋆⋆ Hels<strong>in</strong>ki University of TechnologyControl Eng<strong>in</strong>eer<strong>in</strong>g LaboratoryP.O. Box 5500, FIN-02015 TKK, F<strong>in</strong>l<strong>and</strong>AbstractNeocybernetics, <strong>and</strong> specially <strong>the</strong> framework of elastic systems, gives concrete tools for formulat<strong>in</strong>g<strong>in</strong>tuitions concern<strong>in</strong>g complex systems. It can be claimed that a cybernetic system constructs a modelof its environment, <strong>and</strong> it applies model-based control to elim<strong>in</strong>ate variation <strong>in</strong> its environment. Thereexist various valuable control <strong>in</strong>tuitions that are available for underst<strong>and</strong><strong>in</strong>g cybernetic behaviors, <strong>in</strong>clud<strong>in</strong>gexperiences with adaptive control. It turns out that even <strong>the</strong> evolutionary processes mak<strong>in</strong>g <strong>the</strong>systems more <strong>and</strong> more complex are <strong>the</strong>rmodynamically consistent when seen <strong>in</strong> <strong>the</strong> control perspective.1 IntroductionIt seems that artificial <strong>in</strong>telligence is return<strong>in</strong>g to itsroots: It used to be cybernetics, as proposed by NorbertWiener that was one of <strong>the</strong> cornerstones of earlyAI, <strong>and</strong>, still, <strong>the</strong> same ideas hold. The orig<strong>in</strong>al reasonfor <strong>in</strong>telligence is not to do fancy reason<strong>in</strong>g, butto survive, <strong>and</strong> to constitute a functional whole <strong>in</strong> itsenvironment.Behaviors <strong>in</strong> cybernetic systems are based on <strong>in</strong>teractionsamong low-level system components, constitut<strong>in</strong>gstructures of feedback. In ano<strong>the</strong>r perspective,feedbacks can be seen as control. This underst<strong>and</strong><strong>in</strong>ghas been exploited, <strong>and</strong>, <strong>in</strong>deed, cybernetics hasalso been def<strong>in</strong>ed as be<strong>in</strong>g study of communication<strong>and</strong> control <strong>in</strong> an abstract sense. The claim here isthat <strong>the</strong> framework of neocybernetics makes it possibleto make <strong>the</strong> abstract <strong>in</strong>tuitions about communication<strong>and</strong> control concrete <strong>and</strong> analyzable.S<strong>in</strong>ce <strong>the</strong> <strong>in</strong>troduction of cybernetics back <strong>in</strong>1950’s, control <strong>the</strong>ory, or, more generally system <strong>the</strong>oryhas matured. Whereas <strong>the</strong>re was plenty to explore<strong>in</strong> traditional control structures dur<strong>in</strong>g <strong>the</strong> lastdecades, it seems that by now <strong>the</strong> easy <strong>in</strong>tuitions havebeen exhausted. The limits of <strong>the</strong> control paradigmare now visible, <strong>and</strong> it is evident that <strong>the</strong>re are problems.It needs to be recognized that control <strong>the</strong>ory is not<strong>in</strong> all respects an appropriate framework to underst<strong>and</strong>natural complex systems: The ma<strong>in</strong> counterargumentis that control practices are based on extremelyreductionistic approaches <strong>and</strong> centrally operat<strong>in</strong>gcontrol structures. The real cybernetic populations— economies, ecologies, etc. — are based ondistributed operations, <strong>and</strong> it is difficult to see how<strong>the</strong> centralized structures could be relaxed <strong>and</strong> reorganized.Gett<strong>in</strong>g distributed by def<strong>in</strong>ition means loosen<strong>in</strong>g<strong>the</strong> controls, <strong>and</strong> major shifts <strong>in</strong> th<strong>in</strong>k<strong>in</strong>g are needed<strong>in</strong> eng<strong>in</strong>eer<strong>in</strong>g <strong>and</strong> AI. Indeed, traditional centralizedcontrol is a prototype of Western ways of structur<strong>in</strong>g<strong>and</strong> master<strong>in</strong>g <strong>the</strong> world — but when applied <strong>in</strong> model<strong>in</strong>gof complex systems, <strong>the</strong>re is <strong>the</strong> unpleasant feelof f<strong>in</strong>alism <strong>and</strong> purpose-orientedness <strong>in</strong> <strong>the</strong> models 1 .There is a two-way contribution here: Control <strong>the</strong>orygives powerful tools to underst<strong>and</strong> complex systems,but, at <strong>the</strong> same time, neocybernetic modelsmay give fresh perspectives to <strong>the</strong> control community.Today, one cannot even imag<strong>in</strong>e <strong>the</strong> approachesthat someday perhaps become possible what comesto distributed agents <strong>and</strong> complex networks.What is more, even <strong>the</strong> most fundamental notionsof system <strong>the</strong>ory are challenged by cybernetic considerations.Before hav<strong>in</strong>g some function, a complexsystem <strong>in</strong>tuitively does not deserve to be called a system.Whereas <strong>in</strong> system <strong>the</strong>ory <strong>the</strong>re are some crucialconcepts, like <strong>the</strong> dist<strong>in</strong>ction between <strong>the</strong> <strong>in</strong>sideof <strong>the</strong> system <strong>and</strong> <strong>the</strong> outside environment, <strong>in</strong> cyberneticsystems such boundaries become blurred, <strong>the</strong>environment equally react<strong>in</strong>g to <strong>the</strong> system. A systemcould be def<strong>in</strong>ed not as be<strong>in</strong>g characterized by someformal structures, etc. — a system is a functionallycomplete susta<strong>in</strong>able entity.1 Perhaps because of <strong>the</strong> monoteistic view of natural order, onesearches for <strong>the</strong> underly<strong>in</strong>g primum movens — Jean-Paul Sartre hassaid that even <strong>the</strong> most radical irreligiousness is Christian A<strong>the</strong>ism67


2 Cybernetics as control<strong>New</strong> useful <strong>in</strong>tuitions can be reached when <strong>the</strong> contentsof familiar concepts are “refilled” with fresh semantics.When study<strong>in</strong>g complex systems, controleng<strong>in</strong>eer<strong>in</strong>g seems to offer just <strong>the</strong> right connotations.2.1 Information vs. noiseRoss Ashby co<strong>in</strong>ed <strong>the</strong> Law of Requisite Variety <strong>in</strong>1952:The amount of appropriate selection thatcan be performed is limited by <strong>the</strong> amountof <strong>in</strong>formation available.This is a deep observation. The concept of <strong>in</strong>formationis, however, left somewhat vague here, <strong>and</strong> <strong>the</strong>consequences rema<strong>in</strong> obscure. To make it possible toefficiently apply ma<strong>the</strong>matical tools, such basic conceptsnecessarily have to be def<strong>in</strong>ed <strong>in</strong> an accuratemanner. How is <strong>in</strong>formation manifested <strong>in</strong> data?When look<strong>in</strong>g at <strong>the</strong> neocybernetic models <strong>in</strong>(Hyötyniemi, 2006a), one can see how <strong>the</strong> modelssee <strong>the</strong> data: When studied closer, it turns out that<strong>the</strong> weight<strong>in</strong>g matrix <strong>in</strong> <strong>the</strong> pattern match<strong>in</strong>g cost criterionbecomesW = E{ΔuΔu T }. (1)This means that data is weighted by <strong>the</strong> correlationmatrix when evaluat<strong>in</strong>g matches among patterns: Theneocybernetic system must see <strong>in</strong>formation <strong>in</strong> variation.Traditionally, when do<strong>in</strong>g parameter fitt<strong>in</strong>gapply<strong>in</strong>g maximum likelihood criteria for Gaussi<strong>and</strong>ata, <strong>the</strong> approach is opposite — variation is <strong>in</strong>terpretedas someth<strong>in</strong>g top be avoided — <strong>and</strong> <strong>the</strong>weight<strong>in</strong>g matrix is <strong>the</strong> <strong>in</strong>verse of (1).When apply<strong>in</strong>g Shannons <strong>in</strong>formation <strong>the</strong>ory, orKolmogorov / Chait<strong>in</strong> (algorithmic) <strong>in</strong>formation <strong>the</strong>ory,<strong>the</strong> def<strong>in</strong>ition of <strong>in</strong>formation is strictly syntactical.There is no doma<strong>in</strong> area semantics <strong>in</strong>volved,<strong>and</strong> thus extreme universality is reached. However,some paradoxes rema<strong>in</strong>: What you expect, conta<strong>in</strong>sno <strong>in</strong>formation, <strong>and</strong> noise has <strong>the</strong> highest <strong>in</strong>formationcontent. When apply<strong>in</strong>g <strong>the</strong> neocybernetic viewof <strong>in</strong>formation, semantics (<strong>in</strong> a narrow, formalizedway) is <strong>in</strong>cluded <strong>in</strong> manipulations, mak<strong>in</strong>g <strong>the</strong> analysesnon-universal — but <strong>the</strong>re is universality amongall cybernetic systems. This semantics is based notonly on correlations, but on balanced tensions amongvariables. What is expected, is <strong>the</strong> most characteristicto <strong>the</strong> system; uncorrelated noise has no relevancewhatsoever.The neocybernetic models are fundamentallybased on correlation matrices — pr<strong>in</strong>cipal subspaceanalysis is just a way of formally rewrit<strong>in</strong>g <strong>and</strong> redistribut<strong>in</strong>gthis correlation <strong>in</strong>formation. The correlationmatrices conta<strong>in</strong> atoms of <strong>in</strong>formation, entriesE{¯x i ū j } reveal<strong>in</strong>g cumulated (co)variations amongvariables. Covariances <strong>and</strong> variances — such measuresfor <strong>in</strong>formation are easily expressed <strong>and</strong> exploited,<strong>and</strong> <strong>the</strong>y are also <strong>the</strong> basis of modern identification<strong>and</strong> m<strong>in</strong>imum-variance approaches <strong>in</strong> controleng<strong>in</strong>eer<strong>in</strong>g.2.2 Model-based controlIt turns out that a cybernetic system is a “mirror” ofits environment, optimally captur<strong>in</strong>g <strong>the</strong> <strong>in</strong>formation<strong>the</strong>re is available. This is not merely a metaphor —note that <strong>the</strong> formulas <strong>in</strong> <strong>the</strong> neocybernetic model (seeHyötyniemi (2006a)) can be given very concrete <strong>in</strong>terpretations:• Model. It turns out that <strong>the</strong> neocybernetic strategyconstructs <strong>the</strong> best possible (<strong>in</strong> <strong>the</strong> quadraticsense) description of <strong>the</strong> environment by captur<strong>in</strong>g<strong>the</strong> <strong>in</strong>formation (covariation) <strong>in</strong> <strong>the</strong> environmentaldata <strong>in</strong> <strong>the</strong> ma<strong>the</strong>matically optimal pr<strong>in</strong>cipalsubspace based latent variables¯x = ( E {¯x¯x T }) −1E{¯xΔuT } Δu. (2)• Estimate. It turns out that <strong>the</strong> neocyberneticstrategy constructs <strong>the</strong> best possible (<strong>in</strong> <strong>the</strong>quadratic sense) estimate of <strong>the</strong> environmentstate by mapp<strong>in</strong>g <strong>the</strong> lower-dimensional latentvariable vector onto environment apply<strong>in</strong>g <strong>the</strong>ma<strong>the</strong>matically optimal least-squares regressionfitt<strong>in</strong>gû = E {¯xΔu T } T (E{¯x¯x T } ) −1¯x. (3)• Control. It turns out that <strong>the</strong> neocyberneticstrategy <strong>in</strong>tegrates model<strong>in</strong>g <strong>and</strong> estimation tomaximally elim<strong>in</strong>ate variation <strong>in</strong> <strong>the</strong> environment:ũ = u − û (4)The issue of model<strong>in</strong>g Δu ra<strong>the</strong>r than u directly isstudied <strong>in</strong> Sec. 3.1 (when q <strong>in</strong>creases, u <strong>and</strong> Δu approacheach o<strong>the</strong>r what comes to <strong>the</strong> n most significanteigenvalues). Note that <strong>in</strong> <strong>the</strong> case of “<strong>in</strong>telligentagents” that are capable of explicitly tak<strong>in</strong>g <strong>the</strong>competition <strong>in</strong>to account, so that explicit feedback isconstructed, orig<strong>in</strong>al u ra<strong>the</strong>r than Δu can directly bemodeled.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 68


Cumulated<strong>in</strong>formation( structure)Cumulatedmatter( biomass)Unmodeled noiseFlow of <strong>in</strong>formation/emergyFlow of matter/ energyDissipative wasteSources of<strong>in</strong>formation( variations)Sources ofmatter/energy( levels)plex system dynamics (Prigog<strong>in</strong>e, 1997) — now <strong>the</strong>seare just a side effect. It is <strong>the</strong> <strong>in</strong>formation <strong>in</strong> <strong>the</strong> environment(or variations <strong>in</strong> <strong>the</strong> data) that dictates <strong>the</strong>structures with<strong>in</strong> <strong>the</strong> higher-level system, whereas itis <strong>the</strong> matter (or actual levels <strong>in</strong> <strong>the</strong> data) that cumulateas some k<strong>in</strong>d of biomass with<strong>in</strong> this predest<strong>in</strong>atedstructure of some k<strong>in</strong>d of niches. One could even saythat <strong>the</strong> cybernetic model to some extent captures <strong>the</strong>Platonian idea beyond <strong>the</strong> chang<strong>in</strong>g world.Figure 1: Abstract flows <strong>in</strong> a cybernetic systemThis all means that a cybernetic system implementsmodel-based control of its environment. In terms of<strong>in</strong>formation as def<strong>in</strong>ed above, this control is <strong>the</strong> bestpossible. The implemented control is far from trivial:It constitutes a multivariate controller where <strong>the</strong>n most significant variation directions are equalized(or nullified). It needs to be emphasized that <strong>the</strong>presented control scheme is just an emergent phenomenon,as <strong>the</strong>re are no centralized control units or“master m<strong>in</strong>ds”, but everyth<strong>in</strong>g is based on <strong>the</strong> local,m<strong>in</strong>dless agents that know noth<strong>in</strong>g about <strong>the</strong> “bigpicture”. The symmetric structure of <strong>the</strong> model<strong>in</strong>g /estimation loop rem<strong>in</strong>ds of Heraclitus’ words: “Theway up <strong>and</strong> <strong>the</strong> way down is <strong>the</strong> same”.2.3 Flows of <strong>in</strong>formation <strong>and</strong> matterThe feedback part <strong>in</strong> <strong>the</strong> closed-loop structure aboveis only an abstraction: It does not correspond to someseparate real processes because it only represents <strong>the</strong>non-ideality of <strong>the</strong> <strong>in</strong>formation transfer. It is <strong>in</strong>terest<strong>in</strong>gto note that for <strong>the</strong> closed loop structure toemerge, two different k<strong>in</strong>ds of processes need to cooperate— first <strong>the</strong>re is <strong>the</strong> <strong>in</strong>formation flow <strong>in</strong>to <strong>the</strong>model, <strong>and</strong> <strong>the</strong>n <strong>the</strong>re is <strong>the</strong> material flow dictated by<strong>the</strong> model. Without <strong>the</strong> o<strong>the</strong>r flow <strong>the</strong> o<strong>the</strong>r couldnot exist ei<strong>the</strong>r. One could say that a cybernetic systemconstitutes a marriage m<strong>in</strong>d <strong>and</strong> matter, comb<strong>in</strong><strong>in</strong>g<strong>the</strong>se two <strong>in</strong>compatible dualistic viewpo<strong>in</strong>ts (seeFig. 1).In <strong>the</strong> figure, <strong>the</strong>re are <strong>the</strong> two flows shown separately:On top, <strong>the</strong>re is <strong>the</strong> flow of <strong>in</strong>formation (oremergy), <strong>and</strong> on bottom, <strong>the</strong>re is <strong>the</strong> flow of matter(<strong>and</strong> energy). Most of <strong>the</strong> flows are wasted — <strong>in</strong> <strong>in</strong>formationflow, <strong>the</strong> uncorrelated noise becomes filtered,whereas <strong>in</strong> material flow, it is <strong>the</strong> dissipativelosses that do not get through <strong>in</strong>to <strong>the</strong> higher-levelsystem. Note that it is often assumed that it is <strong>the</strong>sedissipative flows that are <strong>the</strong> manifestation of com-2.4 Hunger for <strong>in</strong>formationA cybernetic system sees <strong>in</strong>formation (emergy) as resourcesavailable <strong>in</strong> <strong>the</strong> environment. In o<strong>the</strong>r words,variation is <strong>the</strong> “nourishment” for systems, <strong>and</strong> be<strong>in</strong>gcapable of exploit<strong>in</strong>g <strong>the</strong>se resources is a prerequisiteof surviv<strong>in</strong>g <strong>in</strong> an environment. That is why, it seemsthat evolutionary surviv<strong>in</strong>g systems are “hungry” formore <strong>and</strong> more <strong>in</strong>formation. Aga<strong>in</strong>, this sounds teleological— but if some system applies this strategyby accident, it immediately has evolutionary benefit<strong>in</strong> terms of <strong>in</strong>creas<strong>in</strong>g resources. There is no guid<strong>in</strong>gh<strong>and</strong> needed — but it is like with Gaia: Even thoughall behaviors can be reduced to lower levels, simplestmodels are found if stronger emergent-level assumptionsare applied.It turns out that this eternal hunger has resulted <strong>in</strong>very <strong>in</strong>genious-look<strong>in</strong>g solutions for reach<strong>in</strong>g more<strong>in</strong>formation, <strong>and</strong>, to achieve such sophistication, <strong>the</strong>systems have typically become ever more complicated.First, <strong>the</strong> variable values visible <strong>in</strong> <strong>the</strong> environmentcan be actively changed by <strong>the</strong> system: Whenan organism develops <strong>the</strong> ability to move, chang<strong>in</strong>gones environment also changes <strong>the</strong> variable values.Second, <strong>the</strong>re exist an <strong>in</strong>f<strong>in</strong>ity of environmental variablesto choose from, <strong>and</strong> with enough <strong>in</strong>genuity, <strong>the</strong>resource vector can be augmented <strong>in</strong> different ways,or <strong>the</strong> environment can be seen <strong>in</strong> new ways. To illustratethis, see Fig. 2 — <strong>the</strong>re it is shown how <strong>the</strong><strong>in</strong>formation content of a signal can reside <strong>in</strong> differentfrequency regions. The ma<strong>the</strong>matically compactdef<strong>in</strong>ition of <strong>in</strong>formation as be<strong>in</strong>g <strong>in</strong>terpreted as variancemakes it possible to exploit frequency-doma<strong>in</strong>methods for analysis. Assume that <strong>the</strong> system concentrateson b<strong>and</strong>-limited signals, so that <strong>the</strong> signalsare filtered asdu sdt = −μ su s + μ s u <strong>in</strong> , (5)<strong>and</strong>, similarly, <strong>the</strong>re is an exponential “forgett<strong>in</strong>ghorizon” what comes to <strong>the</strong> covariance estimates:dÊ{¯x su T s }dt= −γ s Ê{¯x s u T s } + γ s¯x s u T s . (6)69


The parameters μ s <strong>and</strong> λ s are filter<strong>in</strong>g coefficients.Then it turns out that only variation <strong>in</strong> <strong>the</strong> darkestarea <strong>in</strong> <strong>the</strong> figure becomes cumulated <strong>in</strong> <strong>the</strong> model (or<strong>in</strong> <strong>the</strong> covariance matrix), whereas higher-frequencysignals are only filtered by <strong>the</strong> system. Too high frequencesare <strong>in</strong>visible altoge<strong>the</strong>r to <strong>the</strong> current system,leav<strong>in</strong>g <strong>the</strong>re room for o<strong>the</strong>r systems to flourish. As<strong>the</strong> world gets older, even slower-scale behaviors becomestatistically modellable — mean<strong>in</strong>g that <strong>the</strong>reis room for ever <strong>in</strong>creas<strong>in</strong>g number of coexist<strong>in</strong>g systems.The systems are hungry, but <strong>the</strong>y are not greedy.Whereas a system exhausts variation <strong>in</strong> its environment,<strong>the</strong>re is <strong>the</strong> same variation <strong>in</strong>herited <strong>in</strong> <strong>the</strong> systemitself (remember that PCA model maximally relaysvariation to latent variables). This gives rise toa cascade of trophic layers: Ano<strong>the</strong>r system can startexploit<strong>in</strong>g <strong>the</strong> variation that is now visible <strong>in</strong> <strong>the</strong> priorsystem. When <strong>the</strong> next trophic layer has been established,<strong>the</strong>re is room for a yet higher trophic layer, etc.This k<strong>in</strong>d of succession of systems can be representedas a sequence of “ideal mixers” of <strong>in</strong>formation. Whennew layers are <strong>in</strong>troduced, <strong>the</strong> ecosystem becomesmore <strong>and</strong> more cont<strong>in</strong>uous <strong>and</strong> smooth – becom<strong>in</strong>ga partial differential equation (parabolic PDE) diffusionmodel filter<strong>in</strong>g <strong>the</strong> <strong>in</strong>com<strong>in</strong>g variation. All loose<strong>in</strong>formation seems to give rise to new systems.Heraclitus said that <strong>the</strong> underly<strong>in</strong>g pr<strong>in</strong>ciple <strong>in</strong> natureis fire — <strong>in</strong> <strong>the</strong> cybernetic perspective, it is thisfire that is <strong>the</strong> driv<strong>in</strong>g force, but it seems that <strong>the</strong> goalsof nature could best be expla<strong>in</strong>ed <strong>in</strong> terms of a fire ext<strong>in</strong>guisher.There are <strong>the</strong> physical (chaotic) processes (planetsorbit<strong>in</strong>g <strong>and</strong> rotat<strong>in</strong>g, followed by climatologicalphenomena, etc.) that shuffle <strong>the</strong> orig<strong>in</strong>ally “non<strong>in</strong>formative”flow of solar energy, orig<strong>in</strong>ally generat<strong>in</strong>g<strong>the</strong> <strong>in</strong>formation for o<strong>the</strong>r systems to exploit. The<strong>in</strong>put variables on <strong>the</strong> lowest level are temperatures,nutrients <strong>in</strong> <strong>the</strong> soil, diseases, ra<strong>in</strong>fall, etc., <strong>and</strong> on <strong>the</strong>level of herbivores, it is <strong>the</strong>n <strong>the</strong> spectrum of plants toforage on.The higher-level systems can appear <strong>in</strong> very differentphenospheres, start<strong>in</strong>g from very concrete systems<strong>and</strong> end<strong>in</strong>g <strong>in</strong> very abstract memetic ones (seeFig. 3). The <strong>in</strong>terprtetation of signals changes fromconcrete resources to available/required functionalities,<strong>and</strong> explicit formulations become impossible.For example, take politics — also <strong>the</strong>re exist <strong>in</strong>terest<strong>in</strong>gpossibilities for apply<strong>in</strong>g <strong>the</strong> cybernetic th<strong>in</strong>k<strong>in</strong>g.Why democracy seems to prosper eventhough it is less efficient than a dictatorship?Assum<strong>in</strong>g that <strong>the</strong>re is complete <strong>in</strong>formationavailable <strong>in</strong> <strong>the</strong> society, democ-1EnvironmentSystem itselfForgottenVeiled s’ s sFigure 2: Different systems concentrate on different timescales, see<strong>in</strong>g <strong>the</strong> environment <strong>in</strong> different waysracy represents <strong>the</strong> most cybernetic politicalsystem, <strong>in</strong>formation on <strong>the</strong> bottom(needs of citizens) be<strong>in</strong>g maximally transferredto <strong>the</strong> top (decision makers). Partiesdeterm<strong>in</strong>e profiles of op<strong>in</strong>ions; party popularity(number of votes x i ) reflects needsu j <strong>in</strong> <strong>the</strong> society, <strong>and</strong> this is reflected <strong>in</strong> itspossibilities of implement<strong>in</strong>g party visions.2.5 Towards optimum?In cybernetic systems <strong>the</strong> critical resource is <strong>in</strong>formation.In human-made “constructivistic” systems(technical, scientific, ...), <strong>the</strong> same pr<strong>in</strong>ciple seemsto apply, but <strong>the</strong> variables are more difficult to quantify;<strong>the</strong> critical resource can be said to be knowledge,<strong>and</strong> one is always “at <strong>the</strong> edge of underst<strong>and</strong><strong>in</strong>g”. Assoon as <strong>the</strong>re is some new underst<strong>and</strong><strong>in</strong>g about relationshipsamong variables, it is exploited — this becomesmanifested <strong>in</strong> <strong>in</strong>dustrial plants, for example,where new controls are <strong>in</strong>troduced to make <strong>the</strong> systemrema<strong>in</strong> better <strong>in</strong> balance. These developments areimplemented by humans, but, after all, <strong>the</strong> system followsits own evolution where <strong>in</strong>dividual human signalcarriers have little to say.Complex systems seem to develop towards becom<strong>in</strong>gmore <strong>and</strong> more cybernetic. Regardless of <strong>the</strong> doma<strong>in</strong>,<strong>the</strong> limit<strong>in</strong>g factor <strong>in</strong> this evolutionary processseems to be related to extract<strong>in</strong>g <strong>and</strong> exploit<strong>in</strong>g <strong>in</strong>formation(or knowledge). Typical examples are found<strong>in</strong> work<strong>in</strong>g life. The o<strong>the</strong>r prerequisite for “cybernetization”— better underst<strong>and</strong><strong>in</strong>g of <strong>the</strong> system <strong>and</strong>ga<strong>in</strong><strong>in</strong>g more <strong>in</strong>formation — is implemented throughsupervision, questionnaires, <strong>and</strong> more paper work <strong>in</strong>general, <strong>and</strong> <strong>the</strong> o<strong>the</strong>r — apply<strong>in</strong>g more efficient controlsbased on <strong>the</strong> acquired <strong>in</strong>formation — is implementedthrough <strong>in</strong>creas<strong>in</strong>g adm<strong>in</strong>istration, organizationalchanges, missions <strong>and</strong> visions, <strong>and</strong> even “developmentaldiscussions”. This is all good, isn’t it?Unfortunately, <strong>the</strong> same efficiency pursuit has alsocome to universities. The role of science is to question<strong>and</strong> f<strong>in</strong>d alternative explanations, avoid<strong>in</strong>g fixed<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 70


economicalsystemssocialsystemsmemeticsystemstechnicalsystemsecologicalsystemsbiologicalsystemsphysicalsystemsFigure 3: Systems <strong>in</strong> different phenospheres try to ext<strong>in</strong>guish <strong>the</strong> Heraclitus’ fireframeworks <strong>and</strong> controls. This is, of course, farfrom be<strong>in</strong>g efficient, <strong>and</strong> cybernetization is go<strong>in</strong>g on.Whereas <strong>the</strong> scientific problems be<strong>in</strong>g studied are —by def<strong>in</strong>ition — miss<strong>in</strong>g compact representation, differentk<strong>in</strong>ds of variables are needed to make researchwork better quantifiable. This means that deep problemshave to be trivialized, <strong>and</strong> new measures for“good research” are def<strong>in</strong>ed. Earlier <strong>the</strong> scientificwork was evaluated <strong>in</strong> terms of how well <strong>the</strong> observedphenomena can be described, but nowadays it is <strong>the</strong>concrete practical value that is assessed. The traditionalideal <strong>in</strong> scientific work was self-organization<strong>and</strong> low hierarchies, but now one is gett<strong>in</strong>g back towardshierarchies.3 Control <strong>in</strong>tuitionsWhen <strong>the</strong> control notions are employed, <strong>the</strong>re aremany <strong>in</strong>tuitions directly available concern<strong>in</strong>g <strong>the</strong> behaviors<strong>in</strong> cybernetic systems. For example, <strong>the</strong> controlsystem can become too good.3.1 Adaptive controlAdaptation is <strong>the</strong> key property <strong>in</strong> truly cybernetic systems,mean<strong>in</strong>g that <strong>the</strong>y are adaptive control systems,try<strong>in</strong>g to implement more efficient controls based onsimultaneous observations of <strong>the</strong>ir environments. Ifone has control eng<strong>in</strong>eer<strong>in</strong>g background, one can underst<strong>and</strong>what happens <strong>in</strong> a truly cybernetic system:Adaptive controllers are notorious <strong>in</strong> control eng<strong>in</strong>eer<strong>in</strong>g,as <strong>the</strong>y can behave <strong>in</strong> pathological ways.The reason for <strong>the</strong> “explosions” is loss of excitation.Good control elim<strong>in</strong>ates variation <strong>in</strong> data — <strong>and</strong> afterthis <strong>the</strong>re is no <strong>in</strong>formation where <strong>the</strong> model tun<strong>in</strong>gcan be based on, <strong>and</strong> gradually <strong>the</strong> model becomescorrupted. After that, when <strong>the</strong> model is nomore accurate, <strong>the</strong> variation cannot all be elim<strong>in</strong>ated,<strong>and</strong> <strong>the</strong>re will exist <strong>in</strong>formation <strong>in</strong> observations onceaga<strong>in</strong>. The model starts gett<strong>in</strong>g better, <strong>and</strong> after that<strong>the</strong> control gets better, <strong>and</strong> <strong>the</strong> cycle of good <strong>and</strong>bad closed-loop behavior starts aga<strong>in</strong>; <strong>the</strong> collapses <strong>in</strong>control performance can be quite catastrophic. Thisk<strong>in</strong>d of behavior is typical <strong>in</strong> loops of simultaneousmodel identification <strong>and</strong> model-based control. Thisresult is paradoxical: Good balance on <strong>the</strong> lower levelresults <strong>in</strong> high-level <strong>in</strong>stability.In complex cybernetic systems, <strong>the</strong> model adaptationscan be more complex than <strong>in</strong> typical adaptivecontrols. For example, <strong>the</strong> sampl<strong>in</strong>g rate can becomefast as compared to <strong>the</strong> system dynamics (compare to“quartal capitalism” <strong>in</strong> economy), but <strong>in</strong>crease <strong>in</strong> sensitivity<strong>in</strong> any case follows. The evolutionarily surviv<strong>in</strong>gsystems are on <strong>the</strong> edge of chaos where variationis no more <strong>in</strong>formation but only noise.Extreme optimization results <strong>in</strong> “stiffness” of <strong>the</strong>system, <strong>and</strong> worsened fitness <strong>in</strong> chang<strong>in</strong>g conditions.It is aga<strong>in</strong> easy to see connections — compare to ancientempires: It seems to be so that <strong>the</strong>re is a lifespanfor all cultures, after which even <strong>the</strong> strongestcivilization collapses. For example, dur<strong>in</strong>g Pax Romana,<strong>the</strong>re were no enemies, <strong>and</strong> <strong>the</strong> army was graduallyru<strong>in</strong>ed – <strong>and</strong> <strong>the</strong>re was a collapse after a severedisturbance 2 . And this does not only apply to humansocieties: For some reason, massive ext<strong>in</strong>ctions seemto take place <strong>in</strong> 62 million year cycles (Rohde <strong>and</strong>Muller, 2005). Do you need some meteors to expla<strong>in</strong>ext<strong>in</strong>ctions — or is this simply because of evolutiondynamics?However, as it turns out, <strong>the</strong> cybernetic strategywhere <strong>the</strong> feedback is implemented implicitlythrough <strong>the</strong> environment, results <strong>in</strong> “gentle” adaptivecontrol, form of buffer<strong>in</strong>g, where <strong>the</strong> variation is not2 But explicit emphasis on <strong>the</strong> army results <strong>in</strong> <strong>the</strong> Soviet-typecollapse: If <strong>the</strong>re is no real need at some time, such <strong>in</strong>vestments arecybernetically non-optimal, mean<strong>in</strong>g that <strong>the</strong> system cannot outperformits competitors <strong>in</strong> o<strong>the</strong>r fields <strong>in</strong> <strong>the</strong> evolutionary struggle71


fully elim<strong>in</strong>ated, <strong>and</strong> <strong>the</strong> closed loop behavior doesnot become pathological. This is because it is Δura<strong>the</strong>r than <strong>the</strong> estimate u itself that is be<strong>in</strong>g elim<strong>in</strong>atedfrom <strong>the</strong> <strong>in</strong>put data, <strong>and</strong> some level of excitationrema<strong>in</strong>s, mak<strong>in</strong>g <strong>the</strong> overall system evolutionarilystable <strong>and</strong> susta<strong>in</strong>able.However, be<strong>in</strong>g too ambitious, implement<strong>in</strong>g extremeoptimization, <strong>and</strong> full exploit<strong>in</strong>g <strong>the</strong> <strong>in</strong>formationcompletely wip<strong>in</strong>g out excitation, is also a possiblescenario <strong>in</strong> a cybernetic system. This happensif <strong>the</strong> agents are “too smart”, implement<strong>in</strong>g <strong>the</strong> feedbacksexplicitly. An agent can not only see <strong>the</strong> resourcesbut also <strong>the</strong> competitors <strong>and</strong> take <strong>the</strong>ir actions<strong>in</strong>to account — implementation of such explicitfeedback results <strong>in</strong> comb<strong>in</strong>ed Hebbian/anti-Hebbianlearn<strong>in</strong>g (see Hyötyniemi (2006b)).3.2 Invert<strong>in</strong>g <strong>the</strong> arrow of entropyThe second law of <strong>the</strong>rmodynamics states that <strong>in</strong> aclosed system entropy always <strong>in</strong>creases (or rema<strong>in</strong>s<strong>the</strong> same if <strong>the</strong> system is reversible). This means that<strong>the</strong> <strong>the</strong> system goes f<strong>in</strong>ally towards “heat death”, <strong>the</strong>state of maximum probability, where all variations areelim<strong>in</strong>ated. All physical systems fulfill this pr<strong>in</strong>ciple.However, it can be claimed that cybernetic systemsare <strong>the</strong>rmodynamically <strong>in</strong>consistent as it seems that<strong>the</strong>y operate aga<strong>in</strong>st <strong>the</strong> arrow of entropy: As newstructures emerge, <strong>the</strong> probability decreases. Thisdifference between “normal” physical systems <strong>and</strong>“abnormal” cybernetic ones causes an uneasy feel<strong>in</strong>g:Even though <strong>the</strong>re are no outright contradiction here(<strong>the</strong> cybernetic doma<strong>in</strong> is not closed), different lawsapply, <strong>and</strong> it seems that <strong>the</strong>re must exist different sciencesfor evolutionary systems.In <strong>the</strong> neocybernetic framework, this paradoxseems to vanish altoge<strong>the</strong>r. Remember that <strong>the</strong> targetof entropy is heat death where everyth<strong>in</strong>g is <strong>in</strong> balance— but it was balances that were asumed to be<strong>the</strong> goal of <strong>the</strong> neocybernetic systems, too. When <strong>the</strong>boundaries between <strong>the</strong> system <strong>and</strong> its environmentare set appropriately, it turns out that all processes gotowards entropy <strong>in</strong>crease, <strong>in</strong>clud<strong>in</strong>g <strong>the</strong> evolutionaryones. There is a m<strong>in</strong>or decrease <strong>in</strong> <strong>the</strong> overall entropywhen <strong>the</strong> model of <strong>the</strong> environment is constructedoff-l<strong>in</strong>e, once-for-all, but thanks to this model <strong>the</strong>reis huge ever-last<strong>in</strong>g <strong>in</strong>crease <strong>in</strong> entropy caused by<strong>the</strong> on-l<strong>in</strong>e variation suppression due to <strong>the</strong> modelbasedcontrol. When <strong>the</strong> environment is seen as resid<strong>in</strong>g<strong>in</strong>side <strong>the</strong> higher-level control system, it turnsout that at all levels maximization of entropy takesplace. Such observations perhaps offer tools for model<strong>in</strong>gpr<strong>in</strong>ciples: If it is assumed that all systems goPhilosophy(logic)Eng<strong>in</strong>eer<strong>in</strong>g(control)Ma<strong>the</strong>matics(l<strong>in</strong>ear <strong>the</strong>ory)Ma<strong>the</strong>matics(syntax)Eng<strong>in</strong>eer<strong>in</strong>g(semantics)Philosophy(metaphysics)Figure 4: Hierarchy of discipl<strong>in</strong>es. Traditional view, on<strong>the</strong> left, sees eng<strong>in</strong>eer<strong>in</strong>g as simple application of <strong>the</strong> f<strong>in</strong>e<strong>the</strong>ories; <strong>the</strong> new view, on <strong>the</strong> right, sees control eng<strong>in</strong>eer<strong>in</strong>gas deliver<strong>in</strong>g substance to philosophiestowards entropy as fast as possible, an extremely efficientconceptual framework is available (this pr<strong>in</strong>ciplecould be called “maximum entropy pursuit”).The <strong>in</strong>version of <strong>the</strong> arrow of entropy makes it possibleto attack many mysterious phenomena where itseems that improbability cumulates beyond all limits— <strong>in</strong> <strong>the</strong> new perspective, such cumulation is nomore a paradox. For example, <strong>the</strong> challenge of orig<strong>in</strong>of life can be attacked. The essence of underst<strong>and</strong><strong>in</strong>g<strong>the</strong> life processes is, aga<strong>in</strong>, <strong>in</strong> <strong>the</strong> functions; semanticsof life is buried <strong>in</strong> <strong>the</strong> notorious concept of elanvital. In <strong>the</strong> neocybernetic sett<strong>in</strong>g, such f<strong>in</strong>alistic argumentsbecome issues of entropy production.3.3 Rehabilitation of eng<strong>in</strong>eer<strong>in</strong>gS<strong>in</strong>ce 1960’s, after <strong>the</strong> great discoveries of moderncontrol <strong>the</strong>ory, <strong>the</strong>re have been no real breakthroughs<strong>in</strong> <strong>the</strong> branch of control eng<strong>in</strong>eer<strong>in</strong>g. It seems thatthis stagnation does not need to last long: There isa Golden Age of control eng<strong>in</strong>eer<strong>in</strong>g ahead. Control<strong>the</strong>ory <strong>and</strong> tools can be applied not only <strong>in</strong> technicalapplications, but also <strong>in</strong> underst<strong>and</strong><strong>in</strong>g reallycomplex system — biological, social, economical,etc. There do not necessarily exist explicit controls <strong>in</strong>such systems, but underst<strong>and</strong><strong>in</strong>g <strong>the</strong> natural dynamics<strong>in</strong> such systems is still based on control <strong>in</strong>tuitions.It is traditionally thought that philosophy is <strong>the</strong> basisof all science: Logic is part of philosophy determ<strong>in</strong><strong>in</strong>g<strong>the</strong> rules of sound th<strong>in</strong>k<strong>in</strong>g. Ma<strong>the</strong>matics if“applied logic”, implement<strong>in</strong>g <strong>the</strong> logical structures<strong>and</strong> manipulat<strong>in</strong>g <strong>the</strong>m accord<strong>in</strong>g to <strong>the</strong> logical rules.Natural sciences, on <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>, can be seen as“applied ma<strong>the</strong>matics”, where <strong>the</strong> ready-to-use ma<strong>the</strong>maticalformulas are exploited to construct models.F<strong>in</strong>ally, <strong>the</strong> eng<strong>in</strong>eer<strong>in</strong>g discipl<strong>in</strong>es are “applied science”.Eng<strong>in</strong>eer<strong>in</strong>g is <strong>in</strong>ferior to <strong>the</strong> more fundamentalways of structur<strong>in</strong>g <strong>the</strong> world.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 72


This is a formal view of how deductive scienceis done, how new truths are derived. However, also<strong>the</strong>se viewpo<strong>in</strong>ts need to be reconsidered: If <strong>the</strong> presentedneocybernetic model<strong>in</strong>g can cast some lightonto <strong>the</strong> mysteries of what is <strong>the</strong> essence of complexsystems, <strong>the</strong> deepest of <strong>the</strong> philosophical branches,metaphysics, is addressed. It is ma<strong>the</strong>matics that offers<strong>the</strong> syntax for discuss<strong>in</strong>g <strong>the</strong> issues of what is<strong>the</strong>re beyond <strong>the</strong> observed reality, <strong>and</strong> it is controleng<strong>in</strong>eer<strong>in</strong>g that offers <strong>the</strong> semantics <strong>in</strong>to such discussions.It can be claimed that control knowledge isnecessary for underst<strong>and</strong><strong>in</strong>g complex systems, naturalor artificial (see Fig. 4), <strong>in</strong>volv<strong>in</strong>g <strong>in</strong>telligent ones.4 Master<strong>in</strong>g <strong>the</strong> environmentThe whole cybernetic mach<strong>in</strong>ery can be studied <strong>in</strong> <strong>the</strong>framework of control <strong>and</strong> entropy maximization. Thefeedback needs not be implemented <strong>in</strong> such an implicitway as <strong>in</strong> <strong>the</strong> prototypical cases of “static control”,where time axis is abstracted away, but <strong>the</strong> control<strong>in</strong>tuition extends to dynamic, transitory cases.4.1 <strong>Artificial</strong> reflexesIt is reflexes that can be seen as atomary manifestationsof <strong>in</strong>telligence, represent<strong>in</strong>g reasonable behaviorwith no bra<strong>in</strong>s <strong>in</strong>volved, <strong>and</strong> automated sensor/motorreactions (conditioned reflexes) can be seenas extensions of that, be<strong>in</strong>g learned ra<strong>the</strong>r than hardwired.When variations <strong>in</strong> <strong>the</strong> environment are <strong>in</strong>terpretedas resources (or threats), low-level <strong>in</strong>telligencemeans immediate benefit: Reach<strong>in</strong>g towardsresources (or away from <strong>the</strong>m) can be seen as controltowards zero activation, or “heat death” of <strong>the</strong> localenvironment.To study “artificial reflexes” <strong>the</strong> orig<strong>in</strong>ally staticmodel framework needs to be extended to dynamiccases. As <strong>the</strong> system was previously seen as a mirrorof <strong>the</strong> environment, now it is <strong>the</strong> controller that implementscurrent state as a mirror between <strong>the</strong> past<strong>and</strong> <strong>the</strong> future, <strong>and</strong>, what is more, an adapted controlshould implement some k<strong>in</strong>d of balance between<strong>the</strong> past <strong>and</strong> <strong>the</strong> future. One needs to have a modelnot only of <strong>the</strong> current environment but also of how itcan be changed; one has to be capable of simulation,or estimation of <strong>the</strong> future. In <strong>the</strong> control eng<strong>in</strong>eer<strong>in</strong>gperspective, one could speak of model-predictivecontrol comb<strong>in</strong>ed with dead-beat control (see Åström<strong>and</strong> Wittenmark (1997)).Assume that <strong>the</strong> observation vector u is coded as a“perception” or “mental view” ¯x. These variables denotedeviations from <strong>the</strong> nom<strong>in</strong>al reference values, soCurrent T=xk ()=ck () TFuture=xk+ ( 1)Figure 5: Control as a (antisymmetric) mirror between <strong>the</strong>past <strong>and</strong> <strong>the</strong> futurethat <strong>in</strong> <strong>the</strong> goal state <strong>the</strong>re should hold ¯x ≡ 0, mean<strong>in</strong>gextreme loss of variation <strong>in</strong> <strong>the</strong> environment. Theperceptions are transformed <strong>in</strong>to control signals c thatare connected to actuators (muscles). The result<strong>in</strong>gresponses <strong>in</strong> <strong>the</strong> environment are <strong>the</strong>n observed <strong>and</strong>transformed to ano<strong>the</strong>r set of perceptions. Based onsuch assumptions, <strong>the</strong> control scheme <strong>in</strong> Fig. 5 canbe presented. The right-h<strong>and</strong> side <strong>in</strong> <strong>the</strong> figure represents<strong>the</strong> process of model construction, where <strong>the</strong>dependencies between <strong>the</strong> control signal <strong>and</strong> result<strong>in</strong>gchanges <strong>in</strong> <strong>the</strong> observations are recorded, <strong>and</strong> <strong>the</strong>left-h<strong>and</strong> side represents model usage, or on-l<strong>in</strong>e constructionof <strong>the</strong> control signals. The model constructionis carried out apply<strong>in</strong>g <strong>the</strong> neocybernetic pr<strong>in</strong>ciplesfor <strong>the</strong> “<strong>in</strong>put” ¯x(k +1)<strong>and</strong> “latent variable”¯c(k), now assum<strong>in</strong>g that <strong>the</strong> control <strong>and</strong> its effectsare <strong>in</strong> balance. The signals with “double bars” are <strong>the</strong>balance values after <strong>the</strong> previous-level signals ¯x arefur<strong>the</strong>r exploited as <strong>in</strong>puts <strong>in</strong> <strong>the</strong> control constructionprocess.The <strong>in</strong>tuitive idea of this control is to make <strong>the</strong>change <strong>in</strong> <strong>the</strong> state <strong>in</strong>verse of <strong>the</strong> current state, mean<strong>in</strong>gthat, when <strong>the</strong> new state is reconstructed as a sumof <strong>the</strong> old state <strong>and</strong> <strong>the</strong> change, <strong>the</strong> outcome will bezero state — mean<strong>in</strong>g successful control. The past<strong>and</strong> <strong>the</strong> future perceptions are “folded” on top of eacho<strong>the</strong>r. Whereas adaptation of <strong>the</strong> actuation model canonly take place after <strong>the</strong> effects are visible, <strong>the</strong> on-l<strong>in</strong>econtrol construction is strictly causal. Coupl<strong>in</strong>g <strong>the</strong>successive perceptions toge<strong>the</strong>r implements <strong>the</strong> trickof collaps<strong>in</strong>g <strong>the</strong> time structure back to s<strong>in</strong>gularity.The above control scheme is based on a very simpleview of <strong>the</strong> environmental dynamics: The assumptionnow is that if noth<strong>in</strong>g is done, noth<strong>in</strong>gchanges <strong>in</strong> <strong>the</strong> observed environment. This makesprediction simple. Yet, <strong>the</strong> causal structure is no moreself-evident, as it is no more physical exhaustion of<strong>the</strong> variation tak<strong>in</strong>g place as a side-effect, feedbacksbe<strong>in</strong>g explicitly implemented, <strong>and</strong> control structureshave to be explicitly <strong>in</strong>itialized. The m<strong>in</strong>or extensionof <strong>the</strong> assumed environment presupposes that differentk<strong>in</strong>ds of extensions are implemented <strong>in</strong> <strong>the</strong> basic73


neocybernetic model structure. In general, better controlmeans that new structures need to be employed,<strong>and</strong> <strong>the</strong>re is more need for explicit control of this control.4.2 From reactivity to proactivityWhen look<strong>in</strong>g at truly complex systems, it turns outthat <strong>the</strong> environment itself consists of o<strong>the</strong>r systems.When one has a coevolv<strong>in</strong>g system of systems, <strong>the</strong>role of external disturbations becomes smaller <strong>and</strong>smaller, <strong>and</strong> it is <strong>in</strong>teraction among subsystems thatma<strong>in</strong>ly takes place. When one knows <strong>in</strong> advancehow <strong>the</strong> environment will react, controls can be designedbeforeh<strong>and</strong>. When <strong>the</strong> subsystems share <strong>the</strong>same design <strong>in</strong>structions, chang<strong>in</strong>g <strong>the</strong> environmentcan turn from reactive to proactive. Indeed, <strong>the</strong> genetic(memetic) codes are used for bootstrapp<strong>in</strong>g <strong>the</strong>biological (cognitive) systems, activat<strong>in</strong>g dynamicattractors one by one, until <strong>the</strong> f<strong>in</strong>al phenotype isreached.It seems that no matter how sophisticated structureshave been developed dur<strong>in</strong>g evolution, naturehas not found <strong>the</strong> way to put up a runn<strong>in</strong>g systemwithout repeat<strong>in</strong>g <strong>the</strong> whole sequence. As observedalready by Ernst Haeckel, “ontogeny recapitulatesphylogeny”.When a biological system is to be put up <strong>in</strong> a neworganism (or memetic system <strong>in</strong> ano<strong>the</strong>r m<strong>in</strong>d), <strong>the</strong><strong>in</strong>formation can only be stored <strong>and</strong> transmitted <strong>in</strong> <strong>the</strong>form of sequential genetic code (memetic scripturesor spoken tradition). When <strong>the</strong> environment is favorable,<strong>the</strong> codes can be <strong>in</strong>terpreted, <strong>and</strong> <strong>the</strong> highdimensionaldynamics are started <strong>in</strong> a hierarchic manner,more complex structures be<strong>in</strong>g based on simplerones, mak<strong>in</strong>g <strong>the</strong> system functional <strong>and</strong> “alive”.5 ConclusionIn today’s AI, specially <strong>in</strong> modern robotics, <strong>the</strong> approachesare typically based on <strong>in</strong>put/output orientation,“<strong>in</strong>telligent” systems be<strong>in</strong>g black boxes, actually<strong>in</strong> <strong>the</strong> spirit of <strong>the</strong> age-old Tur<strong>in</strong>g test. Follow<strong>in</strong>g<strong>the</strong> developments <strong>in</strong> cognitive science, perhapsthis Brooksian “artificial behaviorism” will somedaychange to “artificial cognitivism” or constructivismwith emphasis on <strong>the</strong> <strong>in</strong>ternal models <strong>and</strong> modelbasedcontrol. Neocybernetics is a c<strong>and</strong>idate offer<strong>in</strong>gsuch model structures.Good control is based on a good model — it is thismodel that is <strong>the</strong> key issue assumedly <strong>in</strong> all cyberneticsystems, however abstract <strong>the</strong>y happen to be. The basicidea does not change if <strong>the</strong> <strong>in</strong>tuitions cannot easilybe turned <strong>in</strong>to concrete numbers. Even all human activitiescan be <strong>in</strong>terpreted <strong>in</strong> this framework of f<strong>in</strong>d<strong>in</strong>gmodels <strong>and</strong> exploit<strong>in</strong>g <strong>the</strong>m for control. For example,scientific activities try to f<strong>in</strong>d models for <strong>the</strong> world —<strong>and</strong> technology is <strong>the</strong>reafter employed to exploit thisunderst<strong>and</strong><strong>in</strong>g <strong>and</strong> exhaust <strong>the</strong> new resources, thusbr<strong>in</strong>g<strong>in</strong>g <strong>the</strong> resource variations to zero.Arthur Schopenhauer once said that art is <strong>the</strong> onlyfield of human activity that is free of struggle, aes<strong>the</strong>ticexperience mak<strong>in</strong>g it possible to temporarilyescape <strong>the</strong> “rat-race”. In <strong>the</strong> cybernetic sett<strong>in</strong>g, thisactivity, too, is <strong>in</strong> l<strong>in</strong>e with o<strong>the</strong>r goal-directed activities:If art helps to see <strong>the</strong> world <strong>in</strong> new perspectives,it makes it possible to construct alternative models.In all, <strong>the</strong> purpose of life is to underst<strong>and</strong> <strong>the</strong> world— to f<strong>in</strong>d a model, <strong>and</strong> <strong>the</strong>n exploit <strong>the</strong> resources.Indeed, neocybernetic considerations have closeconnection to philosophies. Along <strong>the</strong> l<strong>in</strong>es of Easternwisdom, neocybernetics emphasizes <strong>the</strong> role ofbalances <strong>in</strong> all k<strong>in</strong>ds of liv<strong>in</strong>g systems. However,<strong>in</strong> some sense neocybernetics goes deeper than that:Good life is not only about f<strong>in</strong>d<strong>in</strong>g <strong>the</strong> balance. Tof<strong>in</strong>d <strong>the</strong> model, to be capable of identify<strong>in</strong>g <strong>the</strong> environment,<strong>the</strong>re has to exist enough excitation aroundthat balance. It can be assumed that autoimmunediseases, for example, are caused by an <strong>in</strong>completemodel caused by absence of natural microbial attacks.Full life is not characterized by loss of challenges;ra<strong>the</strong>r, happ<strong>in</strong>ess is one’s knowledge of be<strong>in</strong>g capableof cop<strong>in</strong>g with any challenge one can face.Accord<strong>in</strong>g to Eastern philosophers, <strong>the</strong> reason forsuffer<strong>in</strong>g is miss<strong>in</strong>g knowledge <strong>and</strong> underst<strong>and</strong><strong>in</strong>g— with appropriate models <strong>the</strong> world <strong>and</strong> its constituentsbecome a mean<strong>in</strong>gful whole:Before Zen, men are men <strong>and</strong> mounta<strong>in</strong>s aremounta<strong>in</strong>s, but dur<strong>in</strong>g Zen, <strong>the</strong> two are confused.After Zen, men are men <strong>and</strong> mounta<strong>in</strong>sare mounta<strong>in</strong>s aga<strong>in</strong>.ReferencesK.J. Åström <strong>and</strong> B. Wittenmark. Computer-Controlled Systems.Prentice Hall, <strong>New</strong> Jersey, 1997.H. Hyötyniemi. Elastic Systems: Ano<strong>the</strong>r View at Complexity.SCAI’06, Hels<strong>in</strong>ki, F<strong>in</strong>l<strong>and</strong>, 2006a.H. Hyötyniemi. Neocybernetics <strong>in</strong> Biological Systems.Hels<strong>in</strong>ki University of Technology, Control Eng<strong>in</strong>eer<strong>in</strong>gLaboratory, 2006b.I. Prigog<strong>in</strong>e. End of Certa<strong>in</strong>ty. The Free Press, 1997.R. Rohde <strong>and</strong> R. Muller. Cycles <strong>in</strong> fossil diversity. Nature434, 2005.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 74


≤ ≤ 75


<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 76


≤ ≤ ≤ ≤ ≤ ≤ ≤ ≤ 77


<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 78


≤ ≤ <strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 80


Object-oriented declarative model specification <strong>in</strong> C++Risto Lahdelma **University of TurkuDepartment of Information TechnologyJoukahaisenkatu 3, FI-20520 TURKU, F<strong>in</strong>l<strong>and</strong>Risto.lahdelma@cs.utu.fiAbstractMa<strong>the</strong>matical optimization models are commonly implemented by specify<strong>in</strong>g <strong>the</strong>m <strong>in</strong> a high-leveldeclarative modell<strong>in</strong>g language. These languages allow specify<strong>in</strong>g <strong>the</strong> overall model structure separatelyfrom <strong>the</strong> actual numerical values that are needed to form a specific <strong>in</strong>stance of <strong>the</strong> model.The exist<strong>in</strong>g modell<strong>in</strong>g languages are typically <strong>in</strong>terpreted when <strong>the</strong> model is generated. In largescalel<strong>in</strong>ear <strong>and</strong> mixed <strong>in</strong>teger programm<strong>in</strong>g <strong>the</strong> <strong>in</strong>terpretation <strong>and</strong> generation time may be substantialcompared to <strong>the</strong> time to solve <strong>the</strong> model. This paper presents MPLC++, which is an object-orientedma<strong>the</strong>matical modell<strong>in</strong>g language based on C++ classes <strong>and</strong> objects. Because <strong>the</strong> modelclasses are st<strong>and</strong>ard C++, <strong>the</strong>y can be compiled <strong>and</strong> executed efficiently when <strong>the</strong> model is generated.This approach is particularly suitable <strong>in</strong> embedded time-critical on-l<strong>in</strong>e applications of ma<strong>the</strong>maticaloptimization models.Keywords: declarative programm<strong>in</strong>g, object-oriented ma<strong>the</strong>matical modell<strong>in</strong>g, l<strong>in</strong>ear programm<strong>in</strong>g,mixed <strong>in</strong>teger programm<strong>in</strong>g, C++1 IntroductionMa<strong>the</strong>matical optimization models are commonlyimplemented by specify<strong>in</strong>g <strong>the</strong>m <strong>in</strong> a high-level declarativemodell<strong>in</strong>g language. Examples of such languagesor environments are GAMS /BKM88/,UIMP /ElMi82/, GXMP /Dol86/, AMPL /FGK90/,MPL /Kri91/, PDM /Kri91a/, LPL /Hür93/ <strong>and</strong>MME /Lah94/. These languages allow specify<strong>in</strong>g<strong>the</strong> overall model structure separately from <strong>the</strong> actualnumerical values that are needed to form a specific<strong>in</strong>stance of <strong>the</strong> model. Surveys of modell<strong>in</strong>g languagescan be found for example <strong>in</strong> /GrMu92/,/Kui93/ <strong>and</strong> /BCLS92/.Most exist<strong>in</strong>g modell<strong>in</strong>g languages require a separate<strong>in</strong>terpreter environment or a pre-processor.Sometimes <strong>the</strong> modell<strong>in</strong>g language is <strong>in</strong>tegratedwith a solver, but often <strong>the</strong> solver is a separate programaccept<strong>in</strong>g some <strong>in</strong>termediate format. Thus,when models are embedded <strong>in</strong> various design, plann<strong>in</strong>g<strong>and</strong> control applications, <strong>the</strong> result<strong>in</strong>g systemconsists of several programs, which exchange datathrough large model files. Alternatively it may bepossible to l<strong>in</strong>k <strong>the</strong> modell<strong>in</strong>g language <strong>in</strong>terpreterdirectly <strong>in</strong>to <strong>the</strong> application. The problem with <strong>the</strong>above approaches is <strong>the</strong> overhead caused by• <strong>in</strong>ter-process communication through files,• <strong>in</strong>terpret<strong>in</strong>g <strong>the</strong> modell<strong>in</strong>g language,• re-generat<strong>in</strong>g <strong>the</strong> <strong>in</strong>ternal model format for<strong>the</strong> solver,• post-process<strong>in</strong>g <strong>and</strong> transferr<strong>in</strong>g <strong>the</strong> resultsback to <strong>the</strong> application <strong>and</strong>• re-<strong>in</strong>itialis<strong>in</strong>g <strong>the</strong> solver <strong>in</strong> successive optimisationruns with only slightly differentparameters.In large-scale l<strong>in</strong>ear <strong>and</strong> mixed <strong>in</strong>teger programm<strong>in</strong>gthis overhead may be substantial compared to <strong>the</strong>time to actually solve <strong>the</strong> model.This paper presents an implementation of an objectorientedma<strong>the</strong>matical modell<strong>in</strong>g languageMPLC++ <strong>in</strong> C++ us<strong>in</strong>g classes <strong>and</strong> <strong>in</strong>stances. Because<strong>the</strong> model classes are st<strong>and</strong>ard C++, <strong>the</strong>y canbe compiled <strong>and</strong> executed efficiently to generatemodel <strong>in</strong>stances. This approach is particularly suitable<strong>in</strong> embedded time-critical on-l<strong>in</strong>e applicationsof ma<strong>the</strong>matical optimization models.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 82


2 Object-oriented modell<strong>in</strong>glanguage <strong>in</strong> C++MLC++ is a high-level, hierarchical, object-orientedmodell<strong>in</strong>g language, which can be efficiently implemented<strong>in</strong> C++ us<strong>in</strong>g objects <strong>and</strong> classes. MPLC++supports modell<strong>in</strong>g with generic, re-usable modelcomponents <strong>in</strong> a way similar to MME (Ma<strong>the</strong>maticalModell<strong>in</strong>g Environment) /Lah94/. Model parameterscan be <strong>in</strong>l<strong>in</strong>e-coded <strong>in</strong> C++ or retrieved fromauxiliary sources, e.g. external databases. Modelscan be generated directly <strong>in</strong>to <strong>the</strong> <strong>in</strong>ternal storageformat of an <strong>in</strong>tegrated optimizer, optimised <strong>and</strong> <strong>the</strong>results can be directly retrieved by <strong>the</strong> application.The basic elements of MPLC++ are implemented asC++ classes accord<strong>in</strong>g to <strong>the</strong> class hierarchy shown<strong>in</strong> Table 1.}Table 1. The basic elements of MPLC++Class Abstract syntaxModels can be <strong>in</strong>stantiated from model classes withModel Name Set(Var) Set(Param) Set(Model) Set(Constr) different arguments. Models <strong>in</strong>stantiated from <strong>in</strong>sideConstr Name Cexp


directly <strong>in</strong> C++ programs as <strong>in</strong>stances of <strong>the</strong> Varclass or <strong>the</strong> derived classes Real, Integer, B<strong>in</strong>ary.For example:Var x("x", 0, 100, "kg");M<strong>in</strong>=0, Max=100, Unit="kg"Real y("DB001"), z;Unit= ""// Name="x",// M<strong>in</strong>=0, Max=INF,Here x becomes a cont<strong>in</strong>uous decision variable <strong>in</strong><strong>the</strong> range[0,100], measured <strong>in</strong> kilograms. The namex occurs twice <strong>in</strong> <strong>the</strong> previous def<strong>in</strong>ition. The C++variable x is def<strong>in</strong>ed as a reference to a decisionvariable with run-time name "x". The C++ name xcan be used <strong>in</strong> <strong>the</strong> succeed<strong>in</strong>g C++ code where constra<strong>in</strong>ts<strong>and</strong> submodels are def<strong>in</strong>ed. The run-timename "x" is stored <strong>in</strong> a symbol table. Without a runtimesymbol table it would be impossible to <strong>in</strong>terpreta character str<strong>in</strong>g as a variable or to attachmean<strong>in</strong>gful names to a list<strong>in</strong>g of variable values.The C++ name <strong>and</strong> run-time name may differ aswith y <strong>in</strong> <strong>the</strong> previous example. If <strong>the</strong> run-time nameis omitted, <strong>the</strong> system will automatically generate aunique run-time name.All arguments are optional. The unit defaults to anempty str<strong>in</strong>g signify<strong>in</strong>g a dimensionless quantity.Real <strong>and</strong> Integer variables are by default non-negative,which is common <strong>in</strong> ma<strong>the</strong>matical programm<strong>in</strong>g.B<strong>in</strong>ary variables are by default 0/1 variables.2.3 ParametersParameters are named symbolic constants, whichcan be def<strong>in</strong>ed directly <strong>in</strong> C++ programs as <strong>in</strong>stancesof <strong>the</strong> Param class or possible subclasses<strong>the</strong>reof. Example:Param a("a",10,"g");// Name="a", Val=10,// Unit="g"When parameters are used <strong>in</strong>stead of ord<strong>in</strong>ary C++constants or variables, <strong>the</strong> system is able to keeptrack of how <strong>the</strong> model depends on <strong>the</strong> parameters.This makes it possible to support various parametricanalysis techniques. It is also possible to implementspreadsheet-like <strong>in</strong>cremental model re-generationtechniques when some parameters are modified.2.4 Constra<strong>in</strong>tsWe consider here only l<strong>in</strong>ear constra<strong>in</strong>ts. Constra<strong>in</strong>tsmay have a C++ name <strong>and</strong> a run-time name.L<strong>in</strong>ear constra<strong>in</strong>ts can be double <strong>in</strong>equalities withconstant left <strong>and</strong> right h<strong>and</strong> sides or a s<strong>in</strong>gle <strong>in</strong>equalityor equality between two l<strong>in</strong>ear expressions. Unitcompatibility is automatically checked <strong>in</strong> expressions<strong>and</strong> constra<strong>in</strong>ts. Many st<strong>and</strong>ard units are built<strong>in</strong>to <strong>the</strong> system, but new units <strong>and</strong> conversion rulescan also be def<strong>in</strong>ed. Incompatible units result <strong>in</strong> runtimeerrors. Unit conversions can be used for scal<strong>in</strong>gexpressions. For exampleConstr b("b");// name “b” for0


GrMu92/ Greenberg H.J., Murphy F.H.: A Comparisonof Ma<strong>the</strong>matical Programm<strong>in</strong>g Model<strong>in</strong>gSystems; Annals of Operations Research, vol.38, December 1992/Hür93/ Hürlimann T.: LPL: A ma<strong>the</strong>maticalprogramm<strong>in</strong>g language; OR Spektrum; B<strong>and</strong> 15,Heft 1, Spr<strong>in</strong>ger-Verlag 1993/Kri91/ Kristjansson B.: MPL Modell<strong>in</strong>g SystemUser Manual, Maximal Software Inc., Icel<strong>and</strong>1991/Kri91a/ Krishnan R.: PDM: A knowledge-basedtool for model construction; Decision SupportSystems; Vol. 7, No. 4, 1991/Kui93/ Kuip C.A.C: Algebraic Languages forMa<strong>the</strong>matical Programm<strong>in</strong>g; European Journalof Operational Research, Vol. 67, No. 1, May1993/Lah94/ Lahdelma R.: An Object-OrientedMa<strong>the</strong>matical Modell<strong>in</strong>g System; Acta PolytechnicaSc<strong>and</strong><strong>in</strong>avica, Ma<strong>the</strong>matics <strong>and</strong> Comput<strong>in</strong>g<strong>in</strong> Eng<strong>in</strong>eer<strong>in</strong>g Series, No. 66, Hels<strong>in</strong>ki 1994, 77p.85


Solv<strong>in</strong>g <strong>and</strong> Rat<strong>in</strong>g Sudoku Puzzles withGenetic AlgorithmsTimo Mantere <strong>and</strong> Janne KoljonenDepartment of Electrical Eng<strong>in</strong>eer<strong>in</strong>g <strong>and</strong> AutomationUniversity of VaasaFIN-65101 Vaasafirstname.lastname@uwasa.fiAbstractThis paper discusses solv<strong>in</strong>g <strong>and</strong> generat<strong>in</strong>g Sudoku puzzles with evolutionary algorithms. Sudoku isa Japanese number puzzle game that has become a worldwide phenomenon. As an optimizationproblem Sudoku belongs to <strong>the</strong> group of comb<strong>in</strong>atorial problems, but it is also a constra<strong>in</strong>tsatisfaction problem. The objective of this paper is to test if genetic algorithm optimization is anefficient method for solv<strong>in</strong>g Sudoku puzzles <strong>and</strong> to generate new puzzles. Ano<strong>the</strong>r goal is to f<strong>in</strong>d outif <strong>the</strong> puzzles, that are difficult for human solver, are also difficult for <strong>the</strong> genetic algorithms. In thatcase it would offer an opportunity to use genetic algorithm solver to test <strong>the</strong> difficulty levels of newSudoku puzzles, i.e. to use it as a rat<strong>in</strong>g mach<strong>in</strong>e.1 IntroductionThis paper studies if <strong>the</strong> Sudoku puzzles can beoptimized effectively with genetic algorithms.Genetic algorithm (GA) is an optimization methodthat mimes <strong>the</strong> Darw<strong>in</strong>ian evolution that happens <strong>in</strong>nature.Accord<strong>in</strong>g to Wikipedia (2006) Sudoku is aJapanese logical game that has recently becomehugely popular <strong>in</strong> Europe <strong>and</strong> North-America.However, <strong>the</strong> first puzzle seems to be created <strong>in</strong>USA 1979, but it circled through Japan <strong>and</strong>reappeared to west recently. The huge popularity<strong>and</strong> addictivity of Sudoku have been claimed to bebecause it is challeng<strong>in</strong>g, but have very simple rules(Semeniuk, 2005).Sudoku puzzle is composed of a 9×9 square thatare divided <strong>in</strong>to n<strong>in</strong>e 3×3 sub squares. The solutionof Sudoku puzzle is such that each row, column <strong>and</strong>sub square conta<strong>in</strong>s each <strong>in</strong>teger number from [1, 9]once <strong>and</strong> only once.In <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g <strong>the</strong>re are some static numbers(givens) <strong>in</strong> <strong>the</strong> puzzle that are given accord<strong>in</strong>g to <strong>the</strong>difficulty rat<strong>in</strong>g. Figure 1 shows <strong>the</strong> orig<strong>in</strong>alsituation of <strong>the</strong> Sudoku puzzle where 30 numbers for81 possible positions are given. The number ofgivens does not determ<strong>in</strong>e <strong>the</strong> difficulty of <strong>the</strong>puzzle (Semeniuk, 2005). Grat<strong>in</strong>g puzzles is one of<strong>the</strong> most difficult th<strong>in</strong>gs <strong>in</strong> Sudoku puzzle creation,<strong>and</strong> <strong>the</strong>re are about 15 to 20 factors that have aneffect on difficulty rat<strong>in</strong>g (Wikipedia, 2006).6 8 9 4 77 67 6 24 8 5 97 19 7 6 28 2 54 13 2 4 5 9Figure 1. A start<strong>in</strong>g po<strong>in</strong>t of <strong>the</strong> Sudokupuzzle, where 30 locations conta<strong>in</strong>s a staticnumber that are given.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 86


Figure 2 shows <strong>the</strong> solution for <strong>the</strong> puzzle <strong>in</strong> fig.1. Note that each column, row <strong>and</strong> sub square of <strong>the</strong>solution conta<strong>in</strong>s each <strong>in</strong>teger from 1 to 9 once. Thestatic numbers given <strong>in</strong> <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g (fig. 1) are <strong>in</strong><strong>the</strong>ir orig<strong>in</strong>al positions.2 3 6 5 8 9 4 1 78 5 4 2 7 1 3 6 99 7 1 6 4 3 8 2 54 6 8 1 2 5 7 9 37 2 3 9 6 4 5 8 11 9 5 7 3 8 6 4 26 8 7 3 9 2 1 5 45 4 9 8 1 7 2 3 63 1 2 4 5 6 9 7 8Figure 2. A solution for <strong>the</strong> Sudoku puzzlegiven <strong>in</strong> figure 1.The objective of this study is to test if geneticalgorithm is an efficient method for solv<strong>in</strong>g Sudokupuzzles, <strong>and</strong> also if it can be used to create generateSudoku puzzles <strong>and</strong> test <strong>the</strong>ir difficulty levels. If <strong>the</strong>difficulty rat<strong>in</strong>g of <strong>the</strong> Sudoku puzzles <strong>in</strong> <strong>the</strong>newspapers is consistent with <strong>the</strong>ir difficulty for GAoptimization, <strong>the</strong> GA solver can also be used as arat<strong>in</strong>g mach<strong>in</strong>e for Sudokus.1.1 Genetic AlgorithmsAll Genetic algorithms (Holl<strong>and</strong>, 1982) arecomputer based optimization methods that use <strong>the</strong>Darw<strong>in</strong>ian evolution (Darw<strong>in</strong>, 1859) of nature as amodel <strong>and</strong> <strong>in</strong>spiration. The solution base of ourproblem is encoded as <strong>in</strong>dividuals that arechromosomes consist<strong>in</strong>g of several genes. On <strong>the</strong>contrary to <strong>the</strong> nature, <strong>in</strong> GAs <strong>the</strong> <strong>in</strong>dividual(phenotype) is usually determ<strong>in</strong>istically derived from<strong>the</strong> chromosome (genotype). These <strong>in</strong>dividuals aretested aga<strong>in</strong>st our problem represented as a fitnessfunction. The better <strong>the</strong> fitness value an <strong>in</strong>dividualgets, <strong>the</strong> better <strong>the</strong> chance to be selected to a parentfor new <strong>in</strong>dividuals. The worst <strong>in</strong>dividuals are killedfrom <strong>the</strong> population <strong>in</strong> order to make room for <strong>the</strong>new generation. Us<strong>in</strong>g crossover <strong>and</strong> mutationoperations GA creates new <strong>in</strong>dividuals. In crossovergenes for a new chromosome are selected from twoparents us<strong>in</strong>g some preselected practice, e.g. onepo<strong>in</strong>t,two-po<strong>in</strong>t or uniform crossover. In mutation,r<strong>and</strong>om genes of <strong>the</strong> chromosome are mutated ei<strong>the</strong>rr<strong>and</strong>omly or us<strong>in</strong>g some predef<strong>in</strong>ed strategy. TheGA strategy is elitist <strong>and</strong> follows <strong>the</strong> “survival of <strong>the</strong>fittest” pr<strong>in</strong>ciples of Darw<strong>in</strong>ian evolution.1.2 Related workSudoku is a comb<strong>in</strong>atorial optimization problem(Lawler et al, 1985), where each row, column, <strong>and</strong>3×3 sub squares of <strong>the</strong> problem must have each<strong>in</strong>teger from 1 to 9 once <strong>and</strong> only once. This meansthat <strong>the</strong> sum of <strong>the</strong> numbers <strong>in</strong> each column <strong>and</strong> rowof <strong>the</strong> solution are equal. Therefore, as a problemSudoku is obviously related to <strong>the</strong> ancient magicsquare problem (Lat<strong>in</strong> square), where different sizeof squares must be filled so, that <strong>the</strong> sum of eachcolumn <strong>and</strong> row are equal. The magic squareproblem has been solved by GAs (Al<strong>and</strong>er et al,1999, Ardel, 1994) <strong>and</strong> also <strong>the</strong> Evonet Fly<strong>in</strong>gcircus (Evonet, 1996) has a demonstration of amagic square solver.Ano<strong>the</strong>r related problem is a generat<strong>in</strong>gthreshold matrix for halfton<strong>in</strong>g (Kang, 1999)grayscale images. In <strong>the</strong> halfton<strong>in</strong>g, <strong>the</strong> gray valuesof an image are converted <strong>in</strong>to two values, black orwhite, by compar<strong>in</strong>g <strong>the</strong> value of each pixel to <strong>the</strong>value of <strong>the</strong> correspond<strong>in</strong>g position at <strong>the</strong> thresholdmatrix. The values <strong>in</strong> <strong>the</strong> threshold matrix should beevenly distributed. Therefore <strong>the</strong> sums of <strong>the</strong>threshold values <strong>in</strong> each row <strong>and</strong> column of <strong>the</strong>threshold matrix should be nearly equal.Fur<strong>the</strong>rmore, <strong>the</strong> dem<strong>and</strong> of homogeneity holds alsolocally, i.e. any fixed size sub area should have anearly evenly distributed threshold value sum. Thisguarantees that <strong>the</strong> result<strong>in</strong>g image does not conta<strong>in</strong>large clusters of black or white pixels. Thresholdmatrices have been previously optimized by GAse.g. <strong>in</strong> (Al<strong>and</strong>er et al, 1998 <strong>and</strong> 1999; Kobayashi<strong>and</strong> Saito, 1993; <strong>New</strong>bern <strong>and</strong> Bowe, 1997; Wiley,1998).There seems to be no scientific papers onSudoku <strong>in</strong> <strong>the</strong> research <strong>in</strong>dices, but <strong>the</strong>re are somewhite papers on <strong>the</strong> Internet. In (Gold, 2005) a GAis used to generate new Sudoku puzzles, but <strong>the</strong>method seems <strong>in</strong>efficient, s<strong>in</strong>ce <strong>in</strong> <strong>the</strong>ir example <strong>the</strong>GA needed 35700 generations to come up with anew puzzle. In our results, we created a new Sudoku,<strong>in</strong> average, <strong>in</strong> 1390 generations.There is also a ‘Sudoku Maker’ (2006) softwareavailable that is said to use genetic algorithm<strong>in</strong>ternally. It is claimed that <strong>the</strong> generated Sudokusare usually very hard to solve. Unfortunately, <strong>the</strong>reare no details, how GA is used <strong>and</strong> how quickly anew Sudoku puzzle is generated.Sudoku can also be seen as constra<strong>in</strong> satisfactionproblem, where all <strong>the</strong> row <strong>and</strong> column sums must87


e equal to 45. Constra<strong>in</strong>ed optimization problemshave been efficiently optimized with evolutionaryalgorithms e.g. <strong>in</strong> (Li et al, 2005; Mantere, 2005;Runarsson <strong>and</strong> Yao, 2000).2 The proposed methodSudoku is a comb<strong>in</strong>atorial optimization problem,where each row, column <strong>and</strong> also each n<strong>in</strong>e 3×3 subsquare must have a number from {1, 2, …, 9}exactly once. Therefore we need to use a GA that isdesignated for comb<strong>in</strong>atorial optimization problems.That means that it will not use direct mutations orcrossovers that could generate illegal situations:rows, columns, <strong>and</strong> sub squares would conta<strong>in</strong> some<strong>in</strong>teger from [1, 9] more than once, or some <strong>in</strong>tegerswould not be present at all. In addition, <strong>the</strong> geneticoperators are not allowed to move <strong>the</strong> static numbersthat are given <strong>in</strong> <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g of <strong>the</strong> problem(givens).Consequently, we need to represent <strong>the</strong> Sudokupuzzles <strong>in</strong> GA program so that <strong>the</strong> givens will bestatic <strong>and</strong> cannot be moved or changed <strong>in</strong> geneticoperations. For this purpose we have an auxiliaryarray conta<strong>in</strong><strong>in</strong>g <strong>the</strong> givens. We decided to presentSudoku puzzle solution trials as an <strong>in</strong>teger array of81 numbers. The array is divided to n<strong>in</strong>e sub blocks(build<strong>in</strong>g blocks) of n<strong>in</strong>e numbers correspond<strong>in</strong>g to<strong>the</strong> 3×3 sub squares from left to right <strong>and</strong> from topto bottom.The crossover operation is applied so that itexchanges whole sub blocks of n<strong>in</strong>e numbersbetween <strong>in</strong>dividuals. Thus <strong>the</strong> crossover po<strong>in</strong>tcannot be <strong>in</strong>side a build<strong>in</strong>g block (fig. 2).The mutations are applied only <strong>in</strong>side a subblock. We are us<strong>in</strong>g three mutation strategies thatare commonly used <strong>in</strong> comb<strong>in</strong>atorial optimization:Individual 1:swap mutation, 3-swap mutation, <strong>and</strong> <strong>in</strong>sertionmutation (fig. 3).Each time mutation is applied <strong>in</strong>side <strong>the</strong> subblock, <strong>the</strong> array of givens is referred. If it is illegal tochange that position, we r<strong>and</strong>omly reselect <strong>the</strong>positions <strong>and</strong> recheck until legal positions are found.In swap mutation, <strong>the</strong> values <strong>in</strong> two positions areexchanged. In 3-wap mutation <strong>the</strong> values of threepositions are rotated, ei<strong>the</strong>r clockwise orcounterclockwise. In <strong>in</strong>sertion mutation, one or morenumbers are <strong>in</strong>serted before some number <strong>and</strong> all <strong>the</strong>freely changeable numbers are <strong>the</strong>n rotatedclockwise or counterclockwise.To design such a fitness function that would aida GA search is often difficult <strong>in</strong> comb<strong>in</strong>atorialproblems (Koljonen <strong>and</strong> Al<strong>and</strong>er, 2004). In this casewe decided to use to a simple fitness function thatpenalizes different constra<strong>in</strong>t violations differently.Sub block:The help array:2 3 6 8 5 4 9 7 1 0 0 6 0 0 0 0 7 0Swap mutation:Illegal attempt of swapmutation:2 9 6 8 5 4 3 7 1 2 3 6 8 5 4 9 7 13-swap mutation:2 4 6 3 5 8 9 7 1 2 3 6 8 5 4 9 7 1Insertion mutation:Illegal attempt of <strong>in</strong>sertion1 2 6 8 3 5 4 7 9 mutation: 2 3 6 8 5 4 9 7 1Figure 4. The types of mutation used <strong>in</strong>Sudoku optimization. Up left is one sub block<strong>and</strong> up right <strong>the</strong> static values of that sub block(6 <strong>and</strong> 7 are givens). The mutation is appliedso that we r<strong>and</strong>omly select positions <strong>in</strong>side<strong>the</strong> sub block, <strong>and</strong> <strong>the</strong>n compare <strong>the</strong> selectedpositions to <strong>the</strong> help array if <strong>the</strong> positions arefree to change.2 3 6 8 5 4 9 7 1 5 8 9 2 7 1 6 4 3 4 1 7 3 6 9 8 2 5 4 6 8 7 2 3 1 9 5 1 2 5 9 6 4 7 3 8 7 9 3 5 8 1 6 4 2 6 8 7 5 4 9 3 1 2 3 9 2 8 1 7 4 5 6 1 5 4 2 3 6 9 7 8Individual 2:3 1 6 8 5 2 4 7 9 4 8 9 1 7 2 6 3 5 4 8 7 3 6 5 9 2 1 4 3 8 7 2 1 5 9 6 1 6 5 8 4 9 7 3 2 8 9 7 4 5 1 6 3 2 5 8 1 6 4 7 3 9 2 3 9 2 7 1 8 4 5 6 7 5 2 3 6 4 9 8 1Individual n:x x 6 x x x x 7 x x 8 9 x 7 x 6 x x 4 x 7 x 6 x x 2 x 4 x 8 7 x x x 9 x x x 5 x x x 7 x x x 9 x x x 1 6 x 2 x 8 x x 4 x 3 x 2 x x 2 x 1 x 4 5 x x 5 x x x x 9 x xThe help array:0 0 6 0 0 0 0 7 0 0 8 9 0 7 0 6 0 0 4 0 7 0 6 0 0 2 0 4 0 8 7 0 0 0 9 0 0 0 5 0 0 0 7 0 0 0 9 0 0 0 1 6 0 2 0 8 0 0 4 0 3 0 2 0 0 2 0 1 0 4 5 0 0 5 0 0 0 0 9 0 0The possible crossover po<strong>in</strong>tsFigure 3. The representation of Sudoku puzzles <strong>in</strong> GA. One possible solution (<strong>in</strong>dividual) is an array of 81numbers that is divided <strong>in</strong>to n<strong>in</strong>e sub blocks of n<strong>in</strong>e numbers. The crossovers po<strong>in</strong>ts can only appearbetween sub blocks (marked as vertical l<strong>in</strong>es). The auxiliary array is used for check<strong>in</strong>g static positions, if<strong>the</strong>re is a number that is not equal to zero that number cannot be changed dur<strong>in</strong>g <strong>the</strong> optimization, only <strong>the</strong>positions that have zero are free to change.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 88


The condition that every 3×3 sub square conta<strong>in</strong>sa number from 1 to 9 is guaranteed <strong>in</strong>tr<strong>in</strong>sically.Penalty functions are used to force <strong>the</strong> o<strong>the</strong>rconditions.Each row <strong>and</strong> column of <strong>the</strong> Sudoku solutionmust conta<strong>in</strong> each number between [1, 9] once <strong>and</strong>only once. This can be transformed to a set<strong>in</strong>equality constra<strong>in</strong>ts. The first two equations (1)require that row <strong>and</strong> column sums should be equal to45 <strong>and</strong> <strong>the</strong> o<strong>the</strong>r two equations (2) require that eachrow <strong>and</strong> column product should be equal to 9!.ggggi1j1i2( x)= 45 −j2( x)= 45 −( x)= 9! −( x)= 9! −9j=19i=19∏j=19∏i=1xxi,jxi,ji,jxi,j(1)(2)Ano<strong>the</strong>r requirement is derived from <strong>the</strong> set<strong>the</strong>ory. It is required that <strong>the</strong> each row x i <strong>and</strong> columnx j , must be equal to set A = {1, 2, …, 9}. Thefunctions (3) calculate <strong>the</strong> number of miss<strong>in</strong>gnumbers <strong>in</strong> each row (x i ) <strong>and</strong> column (x j ) set.A = {1,2,3,4,5,6,7,8,9}ggi3 i , (3)j3( x)=( x)=A − xA − xwhere | ⋅ | denotes for <strong>the</strong> card<strong>in</strong>ality of a set.In <strong>the</strong> optimal situation all constra<strong>in</strong>ts (1), (2),<strong>and</strong> (3) should be equal to zero. The overall fitnessfunction is a l<strong>in</strong>ear comb<strong>in</strong>ation of <strong>the</strong> partial costfunctions (1–3):f ( x)= 10*(jgij2g ( x)+i1( x)+ 50*(jjgij1( x))+gi3( x)+ijgi2(x)+(4)g ( x))The fitness function (4) was chosen after a seriesof tests of different ideas for constra<strong>in</strong>ts <strong>and</strong>parameter values. It penalizes most heavily if somenumbers of set A are absent <strong>in</strong> <strong>the</strong> row or columnset. It also penalizes if sums <strong>and</strong> products of a rowor column are not equal to <strong>the</strong> optimal situation.This fitness function sett<strong>in</strong>g worked satisfactorily,j3but <strong>in</strong> <strong>the</strong> future we need more considerationwhe<strong>the</strong>r or not this is a proper fitness function for<strong>the</strong> Sudoku problem.3 Experimental resultsIn order to test <strong>the</strong> proposed method we decidedto use an <strong>in</strong>teger coded GA. The size of <strong>the</strong> GAchromosome is 81 <strong>in</strong>teger numbers, divided <strong>in</strong>ton<strong>in</strong>e sub blocks of n<strong>in</strong>e numbers. The uniformcrossovers were applied only between sub blocks,<strong>and</strong> <strong>the</strong> swap, 3-swap <strong>and</strong> <strong>in</strong>sertion mutation withrelative probabilities 50:30:20, respectively, <strong>in</strong>sidesub blocks, with an overall mutation probability0.12. The population size was 100, <strong>and</strong> elitism 40.We tested five Sudoku puzzles taken from <strong>the</strong>newspaper Hels<strong>in</strong>g<strong>in</strong> Sanomat (2006) marked with<strong>the</strong>ir difficulty rat<strong>in</strong>g 1-5 stars. These had 28 to33 symmetric givens. We also tested four Sudokustaken from newspaper Aamulehti (2006), <strong>the</strong>y weremarked with difficulty rat<strong>in</strong>gs: Easy,Challeng<strong>in</strong>g, Difficult, <strong>and</strong> Superdifficult. They conta<strong>in</strong>ed 23 to 36nonsymmetrical givens.We also generated new Sudoku puzzles (nogiven numbers <strong>in</strong> <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>g), marked withdifficulty rat<strong>in</strong>g: <strong>New</strong> Sudoku. We tried to solveeach of <strong>the</strong> ten Sudoku puzzles 100 times. Thestopp<strong>in</strong>g condition was <strong>the</strong> optimal solution found,or max. 100000 generation, i.e. max. six milliontrials (fitness function calls).The results are given <strong>in</strong> table 1. The columns(left to right) st<strong>and</strong> for: difficulty rat<strong>in</strong>g, <strong>the</strong> count ofhow many of <strong>the</strong> 100 optimization runs foundoptimal solution, <strong>and</strong> m<strong>in</strong>imum, maximum, average,median as well as st<strong>and</strong>ard deviation calculated onlyfrom those test runs that found <strong>the</strong> solution (showed<strong>in</strong> count section). The statistics represent <strong>the</strong> amountof generations required to f<strong>in</strong>d <strong>the</strong> solution.Table 1 shows that <strong>the</strong> difficulty rat<strong>in</strong>gs ofSudoku’s correlate with <strong>the</strong>ir GA hardness.Therefore, <strong>the</strong> more difficult Sudokus for a humansolver seem to be also <strong>the</strong> more difficult for <strong>the</strong> GA.The GA found <strong>the</strong> solution for Sudoku’s withdifficulty rat<strong>in</strong>g 1 star <strong>and</strong> Easy every time. TheEasy from Aamulehti was <strong>the</strong> most easiest to solve<strong>in</strong> general, even easier than to generate a <strong>New</strong>Sudoku.With o<strong>the</strong>r rat<strong>in</strong>gs <strong>the</strong> difficulty <strong>in</strong>creasedsomewhat monotonically with <strong>the</strong> rat<strong>in</strong>g, <strong>and</strong> <strong>the</strong>count of those optimization runs that found asolution decreased. In addition, <strong>the</strong> average <strong>and</strong>median GA generations needed to f<strong>in</strong>d solution<strong>in</strong>creased.89


Table 1. The comparison of how effectively GA f<strong>in</strong>ds solutions for <strong>the</strong> Sudoku puzzles with differentdifficulty rat<strong>in</strong>gs. The rat<strong>in</strong>g <strong>New</strong> means no givens (new Sudoku) <strong>and</strong> numbers 1-5 are Sudoku puzzles withsymmetric givens <strong>and</strong> <strong>the</strong>ir difficulty rat<strong>in</strong>gs taken from <strong>the</strong> newspaper Hels<strong>in</strong>g<strong>in</strong> Sanomat (2006). TheSudokus with rat<strong>in</strong>gs Easy to Super difficult are taken from newspaper Aamulehti (2006) <strong>and</strong> <strong>the</strong>yhad nonsymmetrical givens. Count shows how many of <strong>the</strong> 100 GA optimization runs found <strong>the</strong> solution <strong>and</strong>o<strong>the</strong>r columns are <strong>the</strong> descriptive statistics of how many GA generations was needed to f<strong>in</strong>d <strong>the</strong> solution.Difficulty rat<strong>in</strong>g Givens Count M<strong>in</strong> Max Average Median Stdev<strong>New</strong> 0 100 206 3824 1390.4 1089 944.671 star 33 100 184 23993 2466.6 917 3500.982 stars 30 69 733 56484 11226.8 7034 11834.683 stars 28 46 678 94792 22346.4 14827 24846.464 stars 28 26 381 68253 22611.3 22297 22429.125 stars 30 23 756 68991 23288.0 17365 22732.25Easy 36 100 101 6035 768.6 417 942.23Challeng<strong>in</strong>g 25 30 1771 89070 25333.3 17755 23058.94Difficult 23 4 18999 46814 20534.3 26162 12506.72Super difficult 22 6 3022 47352 14392 6722 17053.33100000Generations100001000Easy<strong>New</strong>1 star2 stars3 stars4 stars5 starsChalleng.Super d.Difficult1000 20000 40000 60000 80000 100000AverageFigure 5. The difficulty order of tested Sudokus. The m<strong>in</strong>imum <strong>and</strong> maximum generations needed to solveeach Sudoku from 100 test runs as a function of average generations needed.However, <strong>the</strong> most difficult puzzle (5 stars)from Hels<strong>in</strong>g<strong>in</strong> sanomat was solved 23 times out of100 test runs, which was almost as often as 4 starspuzzle (26 times). With <strong>the</strong> exception of Easy <strong>the</strong>o<strong>the</strong>r Sudokus <strong>in</strong> Aamulehti were found to be moredifficult than Sudokus <strong>in</strong> Hels<strong>in</strong>g<strong>in</strong> sanomat. TheSudoku with rat<strong>in</strong>g Challeng<strong>in</strong>g was almost asdifficult as 4 <strong>and</strong> 5 stars Sudokus <strong>in</strong> Hels<strong>in</strong>g<strong>in</strong>sanomat.The puzzles Difficult <strong>and</strong> SuperDifficult of Aamulehti were much more difficultthan any of <strong>the</strong> puzzles <strong>in</strong> Hels<strong>in</strong>g<strong>in</strong> sanomat. Thedifficulty rat<strong>in</strong>g of <strong>the</strong>se two also seemed to be <strong>in</strong>wrong mutual order (fig. 5), s<strong>in</strong>ce Difficult washarder for GA than Super Difficult. However,both were so difficult that GA found <strong>the</strong> solutiononly a few times, so <strong>the</strong> difference is not statisticallysignificant.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 90


Figure 5 shows <strong>the</strong> difficulty order of <strong>the</strong> testedSudokus. The {Easy, <strong>New</strong> Sudoku, 1 star}seems to form a group of <strong>the</strong> most easiest Sudokus,while 2 <strong>and</strong> 3 stars Sudokus lie by <strong>the</strong>mselvesbetween <strong>the</strong> previous <strong>and</strong> <strong>the</strong> group conta<strong>in</strong><strong>in</strong>g {4stars, 5 stars, Challeng<strong>in</strong>g}. The two mostdifficult Sudokus {Super difficult,Difficult } are <strong>in</strong> <strong>the</strong> f<strong>in</strong>al group.The <strong>New</strong> Sudoku (no givens) is <strong>the</strong> secondeasiest for GA <strong>in</strong> average. This means that GA canbe used for generat<strong>in</strong>g new puzzles. It takes for GAbetween [406, 3817] generations ([24400, 229060]trials) to create a new open Sudoku solution that canfur<strong>the</strong>r be used to create a new puzzle.If GA is used as puzzle generator, one firstsearches any possible open solution <strong>and</strong> <strong>the</strong>nremoves some numbers <strong>and</strong> leave <strong>the</strong> givens. Thedifficulty rat<strong>in</strong>gs of new Sudoku can also be testedwith GA by try<strong>in</strong>g to solve it after <strong>the</strong> givens areselected.4 Conclusions <strong>and</strong> futureIn this paper, we studied if Sudoku puzzles canbe solved with a comb<strong>in</strong>atorial genetic algorithm.The results show that GA can solve Sudoku puzzles,but not very effectively. There exist more efficientalgorithms to solve Sudoku puzzles (Wikipedia,2006). However, <strong>in</strong> this study <strong>the</strong> aim was to testhow efficient pure GA is, without problem specificrules, for solv<strong>in</strong>g Sudokus. The GA results can ofcourse be enhanced by add<strong>in</strong>g problem related rules.The o<strong>the</strong>r goal was to study if difficulty rat<strong>in</strong>gsgiven for Sudoku puzzles <strong>in</strong> newspapers areconsistent with <strong>the</strong>ir difficulty for GA optimization.The answer to that question seems to be positive:Those Sudokus that have a higher difficulty rat<strong>in</strong>gproved to be more difficult also for geneticalgorithms. This also means that GA can be used fortest<strong>in</strong>g <strong>the</strong> difficulty of a new Sudoku puzzle.Grad<strong>in</strong>g puzzles is said to be one of <strong>the</strong> mostdifficult tasks <strong>in</strong> Sudoku puzzle creation (Semeniak,2005), so GA can be a helpful tool for that purpose.The new puzzles are usually generated by f<strong>in</strong>d<strong>in</strong>gone possible Sudoku solution <strong>and</strong> <strong>the</strong>n remov<strong>in</strong>gnumbers as long as only one unique solution exists.The GA can also be used to select <strong>the</strong> removednumbers <strong>and</strong> also test<strong>in</strong>g if <strong>the</strong>re is still only oneunique solution. This can be tested e.g. by solv<strong>in</strong>g<strong>the</strong> Sudoku 10 or more times with o<strong>the</strong>r GA, <strong>and</strong> if<strong>the</strong> result is always identical, we can be relativelysure (but not completely) that a unique solutionexists. However, it may be wiser to use moreeffective algorithms to test <strong>the</strong> uniqueness of asolution.The future research may consist of generat<strong>in</strong>g amore efficient hybrid GA <strong>and</strong> algorithms createdspecifically to solve Sudoku. Ano<strong>the</strong>r research areawould be to study if it is possible to generate a fitnessfunction based on an energy function (Al<strong>and</strong>er,2004).It has been said that 17 given number is m<strong>in</strong>imalto come up with a unique solution, but it has not beenproved ma<strong>the</strong>matically (Semeniak, 2005). The GAcould also be used for m<strong>in</strong>imiz<strong>in</strong>g <strong>the</strong> number ofgivens <strong>and</strong> still lead<strong>in</strong>g to a unique solution.AcknowledgementsThe research work of <strong>the</strong> author T.M. was funded by<strong>the</strong> research grant from <strong>the</strong> TietoEnator fund of <strong>the</strong>F<strong>in</strong>nish Cultural Foundation.ReferencesAamulehti. Sudoku onl<strong>in</strong>e. Available via WWW:http://www.aamulehti.fi/sudoku/ (cited11.1.2006)Al<strong>and</strong>er, J.T. Potential function approach <strong>in</strong> search:analyz<strong>in</strong>g a board game. In J. Al<strong>and</strong>er, P. Ala-Siuru, <strong>and</strong> H. Hyötyniemi (eds.), Step 2004 – The11th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference,Heureka, Vantaa, 1-3 September 2004, Vol. 3,Orig<strong>in</strong> of Life <strong>and</strong> Genetic Algorithms, 2004, 61-75.Al<strong>and</strong>er, J.T., Mantere T., <strong>and</strong> Pyylampi, T.Threshold matrix generation for digital halfton<strong>in</strong>gby genetic algorithm optimization. In D. P.Casasent (ed.), Intelligent Systems <strong>and</strong> AdvancedManufactur<strong>in</strong>g: Intelligent Robots <strong>and</strong> ComputerVision XVII: Algorithms, Techniques, <strong>and</strong> ActiveVision, volume SPIE-3522, Boston, MA, 1-6November 1998. SPIE, Bell<strong>in</strong>gham, Wash<strong>in</strong>gton,USA, 1998, 204-212.Al<strong>and</strong>er, J.T., Mantere T., <strong>and</strong> Pyylampi, T. Digitalhalfton<strong>in</strong>g optimization via genetic algorithms for<strong>in</strong>k jet mach<strong>in</strong>e. In B.H.V. Topp<strong>in</strong>g (ed.)<strong>Developments</strong> <strong>in</strong> Computational mechanics withhigh performance comput<strong>in</strong>g, CIVIL-COMPPress, Ed<strong>in</strong>burg, UK, 1999, 211-216.Ardel, D.H.. TOPE <strong>and</strong> magic squares, a simple GAapproach to comb<strong>in</strong>atorial optimization. In J.R.Koza (ed.) Genetic Algorithms <strong>in</strong> Stanford,Stanford bookstore, Stanford, CA, 1994.Darw<strong>in</strong>, C. The Orig<strong>in</strong> of Species: By Means ofNatural Selection or The Preservation ofFavoured Races <strong>in</strong> <strong>the</strong> Struggle for Life. Oxford91


University Press, London, 1859, A repr<strong>in</strong>t of <strong>the</strong>6th edition, 1968.Evonet Fly<strong>in</strong>g Circus. Magic square solver.Available via WWW:http://evonet.lri.fr/CIRCUS2/node.php?node=65(1996, cited 11.9.2006)Gold, M.. Us<strong>in</strong>g Genetic Algorithms to Come upwith Sudoku Puzzles. Sep 23, 2005. Available viaWWW:http://www.csharpcorner.com/UploadFile/mgold/Sudoku09232005003323AM/Sudoku.aspx?ArticleID=fba36449-ccf3-444f-a435-a812535c45e5 (cited 11.9.2006)Hels<strong>in</strong>g<strong>in</strong> Sanomat. Sudoku. Available via WWW:http://www2.hs.fi/extrat/sudoku/sudoku.html(cited 11.1.2006)Holl<strong>and</strong>, J. Adaptation <strong>in</strong> Natural <strong>and</strong> <strong>Artificial</strong>Systems. The MIT Press, 1992.Kang, H.R.. Digital Color Halfton<strong>in</strong>g. SPIE OpticalEng<strong>in</strong>eer<strong>in</strong>g Press, Bell<strong>in</strong>gham, Wash<strong>in</strong>gton, &IEEE Press, <strong>New</strong> York, 1999.Kobayashi, N., <strong>and</strong> Saito. H. Halftone algorithmus<strong>in</strong>g genetic algorithm. In Proc. of 4th Int.Conference on Signal Process<strong>in</strong>g Applications<strong>and</strong> Technology, vol. 1, <strong>New</strong>ton, MA 28. Sept. –1. Oct. 1993, DSP Associates, Santa Clara, CA,1993, 727-731Koljonen, J. <strong>and</strong> Al<strong>and</strong>er, J.T. Solv<strong>in</strong>g <strong>the</strong> “urbanhorse” problem by backtrack<strong>in</strong>g <strong>and</strong> geneticalgorithm – a comparison. In J. Al<strong>and</strong>er, P. Ala-Siuru, <strong>and</strong> H. Hyötyniemi (eds.), Step 2004 – The11th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference,Heureka, Vantaa, 1-3 September 2004, Vol. 3,Orig<strong>in</strong> of Life <strong>and</strong> Genetic Algorithms, 2004,127-13.Lawler, E.L., Lentra, J.K., R<strong>in</strong>nooy, A.H.G., <strong>and</strong>Shmoys, D.B. (eds.). The Travel<strong>in</strong>g Salesmanproblem – A Guided Tour of Comb<strong>in</strong>atorialOptimization. John Wiley & Sons, <strong>New</strong> York,1985.Li, H., Jiao, Y.-C., <strong>and</strong> Wang, Y.: Integrat<strong>in</strong>g <strong>the</strong>simplified <strong>in</strong>terpolation <strong>in</strong>to <strong>the</strong> genetic algorithmfor constra<strong>in</strong>ed optimization problems. In Hao etal. (eds) CIS 2005, Part I, Lecture Notes on<strong>Artificial</strong> <strong>Intelligence</strong> 3801, Spr<strong>in</strong>ger-Verlag,Berl<strong>in</strong> Heidelberg, 2005, 247-254.Mantere, T. A m<strong>in</strong>-max genetic algorithm for m<strong>in</strong>maxproblems. In Wang, Cheung, Liu (eds.)Advances <strong>in</strong> Computational <strong>Intelligence</strong> <strong>and</strong>Security - The Workshop of 2005 Int. Conferenceon Computational <strong>Intelligence</strong> <strong>and</strong> Security - CIS2005, Xi'an, Ch<strong>in</strong>a, December 15-19, 2005.Xidian university press, Xi’an, Ch<strong>in</strong>a, 2005, pp.52-57.<strong>New</strong>bern, J., <strong>and</strong> Bowe Jr., M. Generation of BlueNoise Arrays by Genetic Algorithm. InB.E.Rogowitz <strong>and</strong> T.N. Pappas (eds.) HumanVision <strong>and</strong> Electronic Imag<strong>in</strong>g II, San Jose, CA,10.-13. Feb. 1997, Vol SPIE-3016, SPIE - Int.society of Optical Eng<strong>in</strong>eer<strong>in</strong>g, Bell<strong>in</strong>gham, WA,1997, 441-450.Runarsson, T.P., <strong>and</strong> Yao, X.: Stochastic rank<strong>in</strong>g forconstra<strong>in</strong>ed evolutionary optimization. IEEETransactions on Evolutionary Computation 4(3),2000, pp. 284-294.Semeniuk, I. Stuck on you. In <strong>New</strong>Scientist 24/31December, 2005, 45-47.Sudoku Maker. Available via WWW:http://sourceforge.net/projects/sudokumaker/(cited 27.1.2006)Wikipedia. Sudoku. Available via WWW:http://en.wikipedia.org/wiki/Sudoku (cited11.9.2006)Wiley, K.: Pattern Evolver, an evolutionaryalgorithm that solves <strong>the</strong> non<strong>in</strong>tuitive problem ofblack <strong>and</strong> white pixel distribution to produce tiledpatterns that appear grey. In The H<strong>and</strong>book ofGenetic Algorithms. CRC Press, 1998.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 92


Us<strong>in</strong>g SOM based resampl<strong>in</strong>g techniques to boost MLPtra<strong>in</strong><strong>in</strong>g performanceJussi Ahola * Mikko Hiirsalmi †Technical Research Centre of F<strong>in</strong>l<strong>and</strong> * Technical Research Centre of F<strong>in</strong>l<strong>and</strong> †FI­02044 VTT, F<strong>in</strong>l<strong>and</strong> FI­02044 VTT, F<strong>in</strong>l<strong>and</strong>Jussi.Ahola@vtt.fi Mikko.Hiirsalmi@vtt.fiAbstractWe describe SOM based model<strong>in</strong>g work that has been conducted <strong>in</strong> a research project that aims atdevelop<strong>in</strong>g a flight parameter based fatigue life analysis system for <strong>the</strong> F<strong>in</strong>nish Air Force F-18fighters. The idea of us<strong>in</strong>g SOM based cluster<strong>in</strong>g as a basis for iteratively select<strong>in</strong>g poorly modeledtest samples to be <strong>in</strong>cluded <strong>in</strong>to <strong>the</strong> tra<strong>in</strong><strong>in</strong>g set has been <strong>in</strong>vestigated. We call <strong>the</strong>se schemes SOMresampl<strong>in</strong>g. Our tests <strong>in</strong>dicate that clear ga<strong>in</strong>s could be achieved <strong>in</strong> <strong>the</strong> test cases when measured <strong>in</strong>terms of <strong>the</strong> mean squared error criterion as typical <strong>in</strong> MLP network tra<strong>in</strong><strong>in</strong>g.1. IntroductionThis work constitutes a part of a larger project todevelop a flight parameter based data analysissystem to estimate flight specific fatigue lifeexpenditure for <strong>the</strong> F<strong>in</strong>nish Air Force F-18 fighters.In Figure 1, <strong>the</strong> general analysis cha<strong>in</strong> of <strong>the</strong> systemis shown. In <strong>the</strong> analysis cha<strong>in</strong> MLP 1 neuralnetworks have been used to learn regression modelsto estimate stra<strong>in</strong> <strong>in</strong> a selected position near eachdesired critical structural detail. The stra<strong>in</strong> valuesare adjusted to <strong>the</strong> desired position through f<strong>in</strong>iteelement models <strong>and</strong> fatigue life analysis software isused to estimate <strong>the</strong> fatigue life expenditure ofwhole flights. Therefore <strong>the</strong>re is no direct l<strong>in</strong>kbetween <strong>the</strong> neurally estimated stra<strong>in</strong> values <strong>and</strong> <strong>the</strong>fatigue life expenditure estimates. Dur<strong>in</strong>g <strong>the</strong>operational phase of <strong>the</strong> system <strong>the</strong> measurementdata is based on currently available <strong>in</strong>strumentationonboard <strong>the</strong> aircraft. These data po<strong>in</strong>ts arepreprocessed by filter<strong>in</strong>g <strong>and</strong> <strong>in</strong>terpolationtechniques to produce ref<strong>in</strong>ed time series data. For<strong>the</strong> tra<strong>in</strong><strong>in</strong>g phase <strong>the</strong> onboard data has beensupplemented with additional stra<strong>in</strong> gaugemeasurement produc<strong>in</strong>g <strong>the</strong> real stra<strong>in</strong> values <strong>in</strong> <strong>the</strong>selected positions. These values are targets for <strong>the</strong>neural network models. One neural network modelhas been created for each structural detail. Early1 MLP means Multi Layered Perceptron be<strong>in</strong>g one form of socalled feed forward neural network architectureswork with <strong>the</strong> system design <strong>and</strong> <strong>the</strong> neural networktra<strong>in</strong><strong>in</strong>g have been documented <strong>in</strong> (Salonen, 2005).Figure 1: The analysis cha<strong>in</strong> used <strong>in</strong> proof ofconcept study to predict stra<strong>in</strong> gauge response(Tikka, Ahola <strong>and</strong> Hiirsalmi, 2006)Currently <strong>the</strong> amount of tra<strong>in</strong><strong>in</strong>g data is ra<strong>the</strong>rlimited cover<strong>in</strong>g 25 flights where each flightconsists of a temporal sequence of flightmanoeuvres. In <strong>the</strong> com<strong>in</strong>g years hundreds of newflights are go<strong>in</strong>g to be carried out with two airplanesequipped with <strong>the</strong> stra<strong>in</strong> gauge measurementsallow<strong>in</strong>g one to ga<strong>the</strong>r new data for neural networktra<strong>in</strong><strong>in</strong>g dur<strong>in</strong>g <strong>the</strong>ir normal operation. As <strong>the</strong>93


amount of <strong>the</strong> data grows <strong>the</strong> neural network modelsare go<strong>in</strong>g to be relearned. The <strong>in</strong>put variables havebeen selected by aeronautical eng<strong>in</strong>eers to reflectmean<strong>in</strong>gful dependencies. The selection of tra<strong>in</strong><strong>in</strong>g,validation <strong>and</strong> test data sets is ano<strong>the</strong>r critical area <strong>in</strong>neural network modell<strong>in</strong>g. Data selection issues <strong>and</strong>model complexity have been discussed <strong>in</strong> (Bishop,1995) <strong>and</strong> <strong>in</strong> (Hastie, Tibshirani <strong>and</strong> Friedman,2001). The fundamental idea <strong>in</strong> <strong>the</strong> selection of <strong>the</strong>datasets is that <strong>the</strong>y represent well <strong>the</strong> phenomenathat <strong>the</strong> neural network is be<strong>in</strong>g tra<strong>in</strong>ed to predict.The follow<strong>in</strong>g po<strong>in</strong>ts should be considered:• The data sets should all come from <strong>the</strong> samedistribution of data, i.e. <strong>the</strong>y should be sampledfrom <strong>the</strong> same distribution. Bias between <strong>the</strong>data sets is harmful for ga<strong>in</strong><strong>in</strong>g good predictionresults.• There must be enough data samples to be ableto learn statistically accurate model parameters.The complexity of <strong>the</strong> network has an impacton <strong>the</strong> number of tra<strong>in</strong><strong>in</strong>g samples needed forlearn<strong>in</strong>g. On <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>, if <strong>the</strong> complexityof <strong>the</strong> underly<strong>in</strong>g model is too small <strong>the</strong>achievable modell<strong>in</strong>g accuracy will bedim<strong>in</strong>ished.• In MLP network tra<strong>in</strong><strong>in</strong>g <strong>the</strong> distribution of <strong>the</strong>tra<strong>in</strong><strong>in</strong>g data samples should be adequatelybalanced so that <strong>the</strong>re are approximately equalamounts of samples <strong>in</strong> each value segment of<strong>the</strong> target variable because typical tra<strong>in</strong><strong>in</strong>gsession tries to m<strong>in</strong>imize <strong>the</strong> mean squarederror <strong>and</strong> areas with lower amounts of sampleswill not be optimized as well. On <strong>the</strong> o<strong>the</strong>rh<strong>and</strong>, it is also possible to stress importanttarget value ranges by over-represent<strong>in</strong>g thosesamples.Tra<strong>in</strong><strong>in</strong>g data is used by <strong>the</strong> MLP algorithm tolearn <strong>the</strong> weight <strong>and</strong> bias parameters. Test<strong>in</strong>g data isused dur<strong>in</strong>g <strong>the</strong> tra<strong>in</strong><strong>in</strong>g session to evaluate howwell <strong>the</strong> learned neural networks perform onpreviously unseen data. The best perform<strong>in</strong>gnetwork is selected for production usage. Validationdata is used to evaluate <strong>the</strong> performance of <strong>the</strong>selected network on previously unseen data. Itshould give a measure of <strong>the</strong> average behaviour of<strong>the</strong> network on previously unseen data. The dataselection methods used <strong>in</strong> <strong>the</strong> project have beenbetter described <strong>in</strong> (Salonen, 2005) <strong>and</strong> <strong>in</strong> (Tikka,Ahola <strong>and</strong> Hiirsalmi, 2006). One of <strong>the</strong> problemspresent is that <strong>the</strong> overall life cycle performance hasnot been evaluated with totally unseen test data – <strong>in</strong><strong>the</strong> test<strong>in</strong>g phase <strong>the</strong> whole time series data has beenused to evaluate <strong>the</strong> performances. This mayproduce optimistic performance results <strong>in</strong> caseswhere extreme stra<strong>in</strong> samples are overly represented<strong>in</strong> <strong>the</strong> tra<strong>in</strong><strong>in</strong>g data set which generally raises <strong>the</strong>probability of over-fitt<strong>in</strong>g. A better evaluationmethod could be achieved by leav<strong>in</strong>g a few flightsfor test<strong>in</strong>g purposes or by averag<strong>in</strong>g <strong>the</strong> results ofseveral tra<strong>in</strong><strong>in</strong>g sessions where a small amount ofdifferent flights are left for test<strong>in</strong>g. These tests mustwait until we get new tra<strong>in</strong><strong>in</strong>g data from fur<strong>the</strong>roperational flights.Our role <strong>in</strong> this project has orig<strong>in</strong>ally dealt withvalidation of <strong>the</strong> modell<strong>in</strong>g results by us<strong>in</strong>g SOM 2modell<strong>in</strong>g <strong>in</strong> a qualitative sense <strong>in</strong> order to f<strong>in</strong>d<strong>in</strong>put data clusters reflect<strong>in</strong>g typical flight states <strong>and</strong>look<strong>in</strong>g for systematic errors <strong>in</strong> <strong>the</strong> predictionresults. Cluster specific prediction error histograms<strong>and</strong> time series plots which have been coloured with<strong>the</strong> cluster colours have been used to search forproblematic areas. As an extension it was consideredworthwhile to <strong>in</strong>vestigate whe<strong>the</strong>r <strong>the</strong> learn<strong>in</strong>g dataset could be adjusted iteratively dur<strong>in</strong>g <strong>the</strong> tra<strong>in</strong><strong>in</strong>gcycle to automatically improve <strong>the</strong> balance of <strong>the</strong>learn<strong>in</strong>g data samples. The basic idea has been thatif a SOM map unit has a large portion of predictionerrors on <strong>the</strong> test data samples <strong>the</strong>se samples may bepoorly represented <strong>in</strong> <strong>the</strong> learn<strong>in</strong>g data set <strong>and</strong>fur<strong>the</strong>r samples should be selected from this area. Insome areas <strong>the</strong> distribution of prediction errors mayalso be ra<strong>the</strong>r flat around <strong>the</strong> zero level mean<strong>in</strong>g that<strong>the</strong> data set is <strong>in</strong>consistent or that <strong>the</strong>y do not form acompact <strong>in</strong>put parameter cluster.2. Resampl<strong>in</strong>g methodstestedIn this work our research hypo<strong>the</strong>sis has been that<strong>the</strong> modell<strong>in</strong>g efficiency of feed-forward neuralnetworks can be improved iteratively by select<strong>in</strong>g asmall portion of <strong>the</strong> less well predicted test samplesas additional tra<strong>in</strong><strong>in</strong>g samples. We have tested a fewapproaches to accomplish this task <strong>and</strong> haveevaluated <strong>the</strong>ir performance with real measurementdata.In order to set a reference l<strong>in</strong>e for evaluationswe have at first constructed a simple approachwhere we compute <strong>the</strong> squared modell<strong>in</strong>g errors (ei2= (measuredi-modeledi)2) for test data samples <strong>and</strong>select <strong>the</strong> desired amount of <strong>the</strong> worst predicted testsamples as new tra<strong>in</strong><strong>in</strong>g samples. This is oursampl<strong>in</strong>g method 1.All <strong>the</strong> o<strong>the</strong>r tested methods are based on SOMcluster<strong>in</strong>g <strong>in</strong>formation (Kohonen, 2001). At first we2 Self-Organiz<strong>in</strong>g Map (SOM) is an unsupervised learn<strong>in</strong>gmethod for vector quantiz<strong>in</strong>g a high-dimensional data set <strong>in</strong>to alower dimensional output space while at <strong>the</strong> same time preserv<strong>in</strong>gneighbourhood topology<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 94


have computed a 2-dimensional SOM map based onn<strong>in</strong>e explanatory variables of <strong>the</strong> feature vector of<strong>the</strong> tra<strong>in</strong><strong>in</strong>g data samples (<strong>the</strong> predicted value hasbeen masked off from this tra<strong>in</strong><strong>in</strong>g). We have<strong>the</strong>refore attempted to f<strong>in</strong>d <strong>the</strong> typical <strong>in</strong>putparameter comb<strong>in</strong>ations that reflect so called ‘flightstates’. A relatively sparse SOM map has been usedfor this task <strong>in</strong> order to get a reasonably small set ofcodebook vectors for fur<strong>the</strong>r process<strong>in</strong>g. We have<strong>the</strong>n computed <strong>the</strong> best match<strong>in</strong>g units (BMUs 3 ) forall <strong>the</strong> tra<strong>in</strong><strong>in</strong>g samples <strong>and</strong> us<strong>in</strong>g <strong>the</strong>se samples wehave computed <strong>the</strong> average modell<strong>in</strong>g error for eachmap unit. We have <strong>the</strong>n computed <strong>the</strong> BMUs for all<strong>the</strong> test data samples <strong>and</strong> we have identified <strong>the</strong> listof test data samples for each map unit. We use <strong>the</strong>selists for r<strong>and</strong>om selection purposes with <strong>the</strong> nextthree sampl<strong>in</strong>g methods.In sampl<strong>in</strong>g method 2, we scale <strong>the</strong> sampl<strong>in</strong>glikelihoods of each SOM map unit based on <strong>the</strong>average modell<strong>in</strong>g error of those tra<strong>in</strong><strong>in</strong>g datasamples that are closest to that map unit. With<strong>in</strong>each map unit <strong>the</strong> sampl<strong>in</strong>g likelihood is uniformbetween <strong>the</strong> data samples. Therefore, it is morelikely to select new samples from <strong>the</strong> test datasamples that have been projected to <strong>the</strong> map unitswith <strong>the</strong> highest average model<strong>in</strong>g error.In sampl<strong>in</strong>g method 3, we extend <strong>the</strong> previousmethod by additionally scal<strong>in</strong>g <strong>the</strong> selectionlikelihood of <strong>the</strong> test data samples by <strong>the</strong>ir relativemodell<strong>in</strong>g error with<strong>in</strong> <strong>the</strong>ir BMU map unit.Therefore, it is more likely to select new samplesfrom <strong>the</strong> test data samples that have been projectedto <strong>the</strong> map units with <strong>the</strong> highest model<strong>in</strong>g dataerror <strong>and</strong> among <strong>the</strong>se test data samples we prefer<strong>the</strong> ones that have <strong>the</strong> largest model<strong>in</strong>g error.In sampl<strong>in</strong>g method 4, we extend <strong>the</strong> previousmethod by additionally scal<strong>in</strong>g <strong>the</strong> selectionlikelihood of <strong>the</strong> test samples by <strong>the</strong>ir quantizationerror 4 with<strong>in</strong> <strong>the</strong>ir BMU map unit. Therefore, it ismore likely to select new samples from <strong>the</strong> test datasamples that have been projected to <strong>the</strong> map unitswith <strong>the</strong> highest average model<strong>in</strong>g error <strong>and</strong> among<strong>the</strong>se test data samples we prefer <strong>the</strong> ones that have<strong>the</strong> largest model<strong>in</strong>g error <strong>and</strong> at <strong>the</strong> same time fitless well to <strong>the</strong>ir BMU map unit (those that havelarge quantization errors).3. Evaluation test resultsIn <strong>the</strong> evaluation tests <strong>the</strong> <strong>in</strong>itial tra<strong>in</strong><strong>in</strong>g data setconta<strong>in</strong>ed 14995 tra<strong>in</strong><strong>in</strong>g samples that were selectedfrom a data set of more than 550000 data samples.The samples conta<strong>in</strong>ed n<strong>in</strong>e explanatory variables<strong>and</strong> one target variable to be predicted. The3 BMU means <strong>the</strong> best-match<strong>in</strong>g unit <strong>and</strong> it is computed for adata sample as <strong>the</strong> m<strong>in</strong>imum distance to any of <strong>the</strong> SOM mapunit vectors.4Quantization error means <strong>the</strong> distance between a data sample<strong>and</strong> a SOM map unit vector.variables were already scaled <strong>in</strong> a proper way <strong>in</strong> <strong>the</strong>range of [-0.8, 0.8]. The proper network complexityhad been selected while <strong>in</strong>itially tra<strong>in</strong><strong>in</strong>g <strong>the</strong> orig<strong>in</strong>alnetworks <strong>and</strong> <strong>in</strong> order to get comparable results weused <strong>the</strong> same network architecture with 9 <strong>in</strong>putvariables, 25 hidden nodes <strong>in</strong> hidden layer 1 <strong>and</strong> 1output variable. Therefore, <strong>in</strong> this case <strong>the</strong> networkcomplexity was 276 weight parameters to beoptimized. The transfer function used <strong>in</strong> layer1 wastansig <strong>and</strong> <strong>in</strong> <strong>the</strong> output layer l<strong>in</strong>ear. The tra<strong>in</strong><strong>in</strong>galgorithm was Levenberg-Marquardtbackpropagation algorithm with <strong>the</strong> performancefunction be<strong>in</strong>g <strong>the</strong> m<strong>in</strong>imization of <strong>the</strong> MSE error<strong>and</strong> with <strong>the</strong> early stopp<strong>in</strong>g threshold value be<strong>in</strong>g 5epochs.Dur<strong>in</strong>g each resampl<strong>in</strong>g iteration we taught 5networks with r<strong>and</strong>om <strong>in</strong>itial states <strong>and</strong> selected <strong>the</strong>m<strong>in</strong>imum results on a previously unseen test data setas <strong>the</strong> reference value for each iteration for eachsampl<strong>in</strong>g scheme. In <strong>the</strong> first iteration we computed<strong>the</strong> start<strong>in</strong>g values with <strong>the</strong> <strong>in</strong>itial tra<strong>in</strong><strong>in</strong>g data set<strong>and</strong> after that we added 1000 r<strong>and</strong>omly sampled testdata samples to <strong>the</strong> tra<strong>in</strong><strong>in</strong>g set <strong>and</strong> recomputed <strong>the</strong>MLP networks.m<strong>in</strong> MSE65.554.543.5x 10 ­3M<strong>in</strong>imum MSE of different resampl<strong>in</strong>g approachessample1sample2sample3sample42 4 6 8 10 12 14iterationFigure 2: M<strong>in</strong>imum Mean squared error (MSE) of<strong>the</strong> tested sampl<strong>in</strong>g methods on each iteration stepIn Figure 2, we have summarized <strong>the</strong>performances achieved with <strong>the</strong> different iterativeresampl<strong>in</strong>g schemes tested. We have used <strong>the</strong> MSEerror (mean squared error) as <strong>the</strong> quality criterion asit is <strong>the</strong> criterion that is be<strong>in</strong>g m<strong>in</strong>imized whentra<strong>in</strong><strong>in</strong>g our MLP networks. In <strong>the</strong> figure iterationstep 1 marks <strong>the</strong> <strong>in</strong>itial start<strong>in</strong>g state without <strong>the</strong>iterative resampl<strong>in</strong>g steps. We can see that with <strong>the</strong>simple sampl<strong>in</strong>g scheme, sample1, only moderatega<strong>in</strong>s can be achieved dur<strong>in</strong>g <strong>the</strong> first steps but withmore steps <strong>the</strong> results start to oscillate <strong>and</strong> <strong>the</strong>accuracy becomes somewhat unstable. The SOMbasedschemes (samples 2-4) behave fairly similarlyto each o<strong>the</strong>r. All of <strong>the</strong>m show clear ga<strong>in</strong>s <strong>in</strong> <strong>the</strong>modell<strong>in</strong>g accuracy. The achieved accuracies tend tovary between successive iterations but <strong>the</strong> trend is95


towards more accurate results. We can see thatsample2 has <strong>the</strong> biggest oscillations but producesslightly more accurate results than sample3.Sample4 produces fairly consistent, non-oscillatoryresults <strong>and</strong> <strong>the</strong> best accuracy with iteration step 10.This achieved best accuracy produced a 31% ga<strong>in</strong> <strong>in</strong>accuracy as compared to <strong>the</strong> start<strong>in</strong>g situation with<strong>the</strong> <strong>in</strong>itial tra<strong>in</strong><strong>in</strong>g data set.4. DiscussionOur test results <strong>in</strong>dicate that MLP modell<strong>in</strong>gaccuracy may be boosted by our SOM basediterative resampl<strong>in</strong>g schemes when we measuresuccess with <strong>the</strong> same performance criterion aswhen teach<strong>in</strong>g <strong>the</strong> MLP networks. This <strong>in</strong>dicatesthat <strong>in</strong> typical MLP learn<strong>in</strong>g our SOM basedresampl<strong>in</strong>g schemes may be used to boostperformance. The techniques are however onlyprelim<strong>in</strong>ary methods <strong>and</strong> we believe that <strong>the</strong>y couldbe enhanced by better consider<strong>in</strong>g <strong>the</strong>representativeness of <strong>the</strong> map units, possiblycluster<strong>in</strong>g <strong>the</strong> map units <strong>and</strong> by better consider<strong>in</strong>g<strong>the</strong> target variable distribution with<strong>in</strong> each map unitwhile determ<strong>in</strong><strong>in</strong>g <strong>the</strong> sampl<strong>in</strong>g likelihoods.In (Tikka, Ahola <strong>and</strong> Hiirsalmi, 2006) it hashowever been <strong>in</strong>dicated that no clear ga<strong>in</strong>s can beachieved when <strong>the</strong> performance ga<strong>in</strong>s are measured<strong>in</strong> terms of consumed life time. We believe that thisis caused by <strong>the</strong> fact <strong>the</strong>re is no direct l<strong>in</strong>k from <strong>the</strong>stra<strong>in</strong> values that have been predicted by <strong>the</strong> MLPneural networks but <strong>the</strong> effect has been transferredby FEM transfer models <strong>and</strong> by <strong>the</strong> life cycleestimation software which <strong>in</strong>evitably cause noise <strong>in</strong><strong>the</strong> predictions.SOM based cluster<strong>in</strong>g might also be useful <strong>in</strong> <strong>the</strong>orig<strong>in</strong>al data selection phase as an alternative to <strong>the</strong>K-means cluster<strong>in</strong>g previously used <strong>in</strong> (Tikka,Ahola <strong>and</strong> Hiirsalmi, 2006).ReferencesChristopher M. Bishop. Neural Networks for PatternRecognition. Oxford University Press, Oxford,1995.T. Hastie, R. Tibshirani <strong>and</strong> J. Friedman. Theelements of statistical learn<strong>in</strong>g : data m<strong>in</strong><strong>in</strong>g,<strong>in</strong>ference <strong>and</strong> prediction, 2001.Teuvo Kohonen. Self-Organiz<strong>in</strong>g Maps. Spr<strong>in</strong>ger,3rd, extended edition, 2001.Risto Laakso & al., On <strong>the</strong> Neural NetworkApplications as Tools to Improve AircraftStructural Integrity Management Efforts, ICAF2005 conference 6. – 10.6.2005, Hamburg,Germany.Tuomo Salonen. An Assessment of <strong>the</strong> Feasibility ofa Parameter Based Aircraft Stra<strong>in</strong> Monitor<strong>in</strong>gMethod. M.Sc Thesis at <strong>the</strong> TechnicalUniversity of Hels<strong>in</strong>ki, 12.7.2005,www.aeronautics.hut.fi/edu/<strong>the</strong>ses/full_<strong>the</strong>sis/Salonen_Tuomo_2005.pdf.Jarkko Tikka, Jussi Ahola, Mikko Hiirsalmi.Parameter based fatigue life analysis, <strong>in</strong>fluenceof tra<strong>in</strong><strong>in</strong>g data selection to analysisperformance. American Institute ofAeronautics <strong>and</strong> Astronautics Model<strong>in</strong>g <strong>and</strong>Simulation Technologies Conference, 2006.5. ConclusionsThe idea of us<strong>in</strong>g SOM based cluster<strong>in</strong>g as a basisfor iteratively select<strong>in</strong>g poorly modeled test samplesto be <strong>in</strong>cluded <strong>in</strong>to <strong>the</strong> tra<strong>in</strong><strong>in</strong>g set has been<strong>in</strong>vestigated. We call <strong>the</strong>se schemes SOMresampl<strong>in</strong>g. Our tests <strong>in</strong>dicate that clear ga<strong>in</strong>s couldbe achieved <strong>in</strong> <strong>the</strong> test cases when measured <strong>in</strong>terms of <strong>the</strong> mean squared error criterion as typical<strong>in</strong> MLP network tra<strong>in</strong><strong>in</strong>g.AcknowledgementsThis work has been funded by <strong>the</strong> F<strong>in</strong>nish Air Force<strong>and</strong> <strong>the</strong> Technical Research Centre of F<strong>in</strong>l<strong>and</strong>. Wewant to especially thank Jarkko Tikka for sett<strong>in</strong>g upresearch challenges <strong>and</strong> Risto Laakso for lett<strong>in</strong>g usshare his SOM modell<strong>in</strong>g work <strong>in</strong> this doma<strong>in</strong>.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 96


Data-Based Model<strong>in</strong>g of Electroless Nickel Plat<strong>in</strong>gHans-Christian Pfisterer ⋆⋆ Control Eng<strong>in</strong>eer<strong>in</strong>g LaboratoryPL 550002015 TKKF<strong>in</strong>l<strong>and</strong>h.pfisterer@gmx.deHeikki Hyötyniemi †† Control Eng<strong>in</strong>eer<strong>in</strong>g LaboratoryPL 550002015 TKKF<strong>in</strong>l<strong>and</strong>heikki.hyotyniemi@tkk.fiAbstractThis work connects <strong>the</strong> neocybernetic <strong>the</strong>ory of elastic systems to model<strong>in</strong>g of a complex <strong>in</strong>dustrialprocess. It turns out that us<strong>in</strong>g simple ma<strong>the</strong>matics comb<strong>in</strong>ed with multil<strong>in</strong>ear tools leads to l<strong>in</strong>earmodels that can be used for monitor<strong>in</strong>g <strong>and</strong> control. As an application example, electroless nickelplat<strong>in</strong>g is studied.1 IntroductionWhat has artificial <strong>in</strong>telligence to do with model<strong>in</strong>g ofchemical processes? It seems that such a very technicalapplication doma<strong>in</strong> would have little <strong>in</strong> commonwith <strong>the</strong> AI approaches. Still, <strong>in</strong> all complex systems<strong>the</strong> challenges are similar. One would need to underst<strong>and</strong>emergence to escape from <strong>the</strong> <strong>in</strong>dividual lowlevelbehaviors to <strong>the</strong> level of relevant functionalities.In <strong>the</strong> work at h<strong>and</strong> <strong>the</strong> <strong>in</strong>dustrial process of electrolessnickel plat<strong>in</strong>g is studied. This chemical systemis very complex s<strong>in</strong>ce many chemicals are <strong>in</strong>volved<strong>and</strong> <strong>the</strong> process has a lot of variables be<strong>in</strong>g observed<strong>and</strong> controlled <strong>in</strong> order to reach good plat<strong>in</strong>g results.What is more, for commercial reasons not all compounds<strong>and</strong> reactions have been disclosed. It is verydifficult also for a doma<strong>in</strong> expert to underst<strong>and</strong> <strong>the</strong>behavior of <strong>the</strong> system.In this paper, a very simple, data-based model forcontrol purposes of <strong>the</strong> nickel alloy thickness <strong>and</strong> itsphosphorus content is presented. This model wasachieved us<strong>in</strong>g basic ideas <strong>and</strong> ma<strong>the</strong>matical toolsbased on <strong>the</strong> <strong>the</strong>ory of neocybernetics.2 NeocyberneticsS<strong>in</strong>ce models of <strong>in</strong>dustrial systems <strong>and</strong> observed naturalsystems get more <strong>and</strong> more complex <strong>and</strong> verycomplicated to underst<strong>and</strong> <strong>the</strong> traditional way ofma<strong>the</strong>matical model<strong>in</strong>g with dynamic nonl<strong>in</strong>ear differentialequations <strong>and</strong> constra<strong>in</strong>ts leads to an unmanageablemess of functions <strong>and</strong> equations. Fur<strong>the</strong>rmore,one has to be a doma<strong>in</strong> expert to underst<strong>and</strong> <strong>the</strong><strong>in</strong>terconnections between variables <strong>in</strong> order to write<strong>the</strong> ma<strong>the</strong>matical equations for <strong>the</strong> description of <strong>the</strong>behaviors <strong>in</strong> <strong>the</strong> first place.Neocybernetics, <strong>in</strong>troduced by H. Hyötyniemi(2006), offers a new approach to get reasonable systemmodels <strong>and</strong> helpful system underst<strong>and</strong><strong>in</strong>g whenlook<strong>in</strong>g at a system from a different angle. S<strong>in</strong>ce <strong>in</strong>dustrialsystems are monitored extensively <strong>the</strong> datacan be used to f<strong>in</strong>d connections among <strong>the</strong> variables<strong>and</strong> possibly associate some variables with o<strong>the</strong>rs.The system structure is hidden <strong>in</strong> this data <strong>and</strong> it willemerge when manipulated <strong>in</strong> an appropriate way. Us<strong>in</strong>g<strong>the</strong> right ma<strong>the</strong>matical tools <strong>and</strong> a holistic view of<strong>the</strong> system this model<strong>in</strong>g mach<strong>in</strong>ery is also availablefor non-experts of <strong>the</strong> particular doma<strong>in</strong>. Here <strong>in</strong>formationabout <strong>the</strong> behavior of <strong>the</strong> system is retrieveddirectly from <strong>the</strong> measurement data.2.1 Key po<strong>in</strong>tsTo see a system through neocybernetic eyeglassessome assumptions about <strong>the</strong> system have to be made.There are some basic pr<strong>in</strong>ciples (see H. Hyötyniemi(2006) <strong>and</strong> H.-C. Pfisterer (2006)):• Emergence: Some unanticipated functionalitycan appear after <strong>the</strong> cumulation of some simpleoperations.• Dynamic Balance: The emphasis is on systems<strong>in</strong> some k<strong>in</strong>d of balance ra<strong>the</strong>r than on <strong>the</strong> processitself.• L<strong>in</strong>earity pursuit: The system behavior is consideredto be l<strong>in</strong>ear as long as nonl<strong>in</strong>earity is notabsolutely necessary.97


• Environment: Neoybernetic systems are assumedto be oriented towards <strong>the</strong>ir environment,<strong>the</strong>y reflect <strong>and</strong> mirror <strong>the</strong>ir environment.All <strong>the</strong>se pr<strong>in</strong>ciples <strong>and</strong> assumptions are reasonable<strong>and</strong> <strong>in</strong> many natural <strong>and</strong> <strong>in</strong>dustrial systems <strong>the</strong>y canbe fulfilled. The l<strong>in</strong>earity assumption needs a fur<strong>the</strong>rexplanation (see Section 5), especially when model<strong>in</strong>gchemical systems.2.2 ElasticityThe system is assumed to be <strong>in</strong> <strong>the</strong>rmodynamic balance.The changes <strong>in</strong> <strong>the</strong> environment are seen as disturbancescaus<strong>in</strong>g tensions <strong>in</strong> <strong>the</strong> system, push<strong>in</strong>g <strong>the</strong>system away from <strong>the</strong> balance. Accord<strong>in</strong>g to <strong>the</strong> LeChatelier pr<strong>in</strong>ciple (H. Hyötyniemi, 2006), <strong>the</strong> systemyields, but after <strong>the</strong> pressure vanishes, <strong>the</strong> orig<strong>in</strong>albalance is restored. In a sense, <strong>the</strong> neocyberneticideas are a functionalization of <strong>the</strong> <strong>in</strong>tuitions concern<strong>in</strong>gcomplex homeostatic systems.2.3 Degrees of freedomAs mentioned above <strong>the</strong> hidden structure of <strong>the</strong> systemwill emerge when <strong>the</strong> model<strong>in</strong>g concentrates on<strong>the</strong> rema<strong>in</strong><strong>in</strong>g degrees of freedom <strong>in</strong> behaviors ra<strong>the</strong>rthan on constra<strong>in</strong>ts <strong>and</strong> restrictions. For simple systemsthis is not reasonable — for very complex systemswhere many variables are strongly connected<strong>and</strong> many constra<strong>in</strong>ts have to be considered this approachhelps to avoid an unmanageable mess of equations.When concentrat<strong>in</strong>g on <strong>the</strong> non-constra<strong>in</strong>eddegrees of freedom, <strong>the</strong> emphasis is on phenomenathat are not explicitly seen <strong>in</strong> any formulas; one couldspeak of emergent models.Now <strong>the</strong> system is kept <strong>in</strong> dynamic balance <strong>and</strong>one searches for <strong>the</strong> structure of covariation that isstill left <strong>in</strong> <strong>the</strong> variable space. A model based on <strong>the</strong>degrees of freedom approach is as useful as a traditionalone but has <strong>the</strong> advantage of be<strong>in</strong>g simple <strong>and</strong>underst<strong>and</strong>able. With this “<strong>in</strong>verse th<strong>in</strong>k<strong>in</strong>g” not allconstra<strong>in</strong>ts <strong>and</strong> chemicals <strong>and</strong> reactions need to beknown, as long as it can be assumed that <strong>the</strong> <strong>in</strong>ternal<strong>in</strong>teractions <strong>and</strong> feedbacks always manage to keep <strong>the</strong>system <strong>in</strong> balance. More <strong>in</strong>formation about degreeof freedom model<strong>in</strong>g can be found <strong>in</strong> H. Hyötyniemi(2006) <strong>and</strong> H.-C. Pfisterer (2006).3 Multivariate toolsUs<strong>in</strong>g <strong>the</strong> above mentioned key po<strong>in</strong>ts <strong>and</strong> utiliz<strong>in</strong>gstrong ma<strong>the</strong>matical tools a practical model<strong>in</strong>g mach<strong>in</strong>erycan be set up. After apply<strong>in</strong>g <strong>the</strong> model<strong>in</strong>gtools a black box between known variables <strong>and</strong> unknownones to be estimated can be filled with life.For <strong>the</strong>se purposes <strong>the</strong> known data (column vectorsof data samples) is collected <strong>in</strong> a matrix X <strong>and</strong> <strong>the</strong>unknown variables <strong>in</strong> a target space formed by <strong>the</strong>matrix Y . Here, it is assumed <strong>the</strong> k sample vectors oflength n <strong>and</strong> m are stored as rows <strong>in</strong> <strong>the</strong> matrices X<strong>and</strong> Y , respectively.Pr<strong>in</strong>cipal Component Analysis (PCA)The <strong>in</strong>formation <strong>in</strong> terms of covariations <strong>in</strong> <strong>the</strong> datais captured <strong>in</strong> <strong>the</strong> (unscaled) correlation matrixR = X T X.A lot of hidden <strong>in</strong>formation can be revealed by eigenvaluesλ i of this matrix, <strong>and</strong> by <strong>the</strong>ir correspond<strong>in</strong>geigenvectors θ i as can be read <strong>in</strong> H. Hyötyniemi(2001). The eigenvectors are orthogonal <strong>and</strong> po<strong>in</strong>t<strong>in</strong> <strong>the</strong> direction of maximum variation <strong>in</strong> <strong>the</strong> orig<strong>in</strong>aldataset. The amount of variety of each particulardirection is given by <strong>the</strong> correspond<strong>in</strong>g eigenvalue.Directions of most variety are assumed to carry most<strong>in</strong>formation about <strong>the</strong> system <strong>and</strong> it is reasonable totake <strong>the</strong>se <strong>in</strong>to account <strong>in</strong> <strong>the</strong> model; hence <strong>the</strong> modelis built on <strong>the</strong> degrees of freedoms found <strong>in</strong> <strong>the</strong> correlationstructure of <strong>the</strong> data.Large eigenvalues st<strong>and</strong> for directions of essential<strong>in</strong>formation, small eigenvalues st<strong>and</strong> for directionswhich most probably conta<strong>in</strong> redundant <strong>in</strong>formationor only measurement noise. When <strong>the</strong> data is projectedonto <strong>the</strong> subspace Z of dimension N ≤ nby <strong>the</strong> mapp<strong>in</strong>g matrix F 1, redundancy <strong>and</strong> measurementnoise <strong>in</strong> <strong>the</strong> data can be reduced.Multil<strong>in</strong>ear Regression (MLR)To f<strong>in</strong>d <strong>the</strong> connection to <strong>the</strong> target space Y a regressionis applied. In order to achieve good results <strong>the</strong>base of <strong>the</strong> start<strong>in</strong>g space should be orthogonal <strong>and</strong>no redundancy should be <strong>the</strong>re. Us<strong>in</strong>g <strong>the</strong> dataspaceZ <strong>the</strong>se prerequisites are fulfilled <strong>and</strong> <strong>the</strong> MLR algorithmcan f<strong>in</strong>d a mapp<strong>in</strong>g F 2 from Z to Y . Hencea comb<strong>in</strong>ation of both procedures, now called Pr<strong>in</strong>cipalComponent Regression (PCR), can expla<strong>in</strong> <strong>the</strong>behavior <strong>in</strong> Y by <strong>the</strong> <strong>in</strong>formation already given <strong>in</strong> X.This is illustrated <strong>in</strong> Figure 1.F1X Z YFigure 1: Data spaces <strong>and</strong> projections with PCRF2<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 98


PSfrag replacementsPartial Least Squares (PLS)This algorithm <strong>in</strong>cludes a view <strong>in</strong>to <strong>the</strong> target space Yalready while build<strong>in</strong>g <strong>the</strong> mapp<strong>in</strong>g F 1. Not only <strong>the</strong>dataspace X is scanned for <strong>the</strong> essential <strong>in</strong>formation(collected <strong>in</strong> Z1) but also <strong>in</strong> Y <strong>the</strong> key <strong>in</strong>formation isextracted (to Z2) <strong>and</strong> only <strong>the</strong>n an overall mapp<strong>in</strong>g isobta<strong>in</strong>ed which now bridges <strong>in</strong>put <strong>and</strong> output. Thissteps <strong>and</strong> transformations are illustrated <strong>in</strong> Figure 2.F1X Z1 Z2Figure 2: Data spaces <strong>and</strong> projections with PLSAfter <strong>in</strong>troduc<strong>in</strong>g <strong>the</strong> <strong>in</strong>dustrial process <strong>and</strong> somespecific variables <strong>the</strong>se tools will be applied <strong>and</strong> <strong>the</strong>irresults shown <strong>in</strong> Section 6.4 Electroless nickel plat<strong>in</strong>gThe process of electroless nickel plat<strong>in</strong>g is a step ofsurface f<strong>in</strong>ish<strong>in</strong>g. Pr<strong>in</strong>ted wir<strong>in</strong>g boards (PWBs) consistof a epoxy lam<strong>in</strong>ate base <strong>and</strong> a copper layer <strong>in</strong>which electric circuits are etched. Witout protection<strong>the</strong> copper would oxidize very fast, especially whencom<strong>in</strong>g <strong>in</strong> contact with humidity. In order to enhance<strong>the</strong> lifetime of <strong>the</strong> PWB <strong>and</strong> to improve its mechanicalproperties <strong>the</strong> PWB is coated with a gold layer ofabout 0.01µm. But s<strong>in</strong>ce <strong>the</strong> copper would diffuse <strong>in</strong><strong>the</strong> gold <strong>and</strong> form aga<strong>in</strong> an oxidizeable compound <strong>the</strong>two layers are separated by a nickel layer of around4µm. Figure 3 shows a cut through a plated PWB <strong>and</strong>expla<strong>in</strong>s <strong>the</strong> layers <strong>in</strong> detail; s<strong>in</strong>ce <strong>the</strong> gold layer is soth<strong>in</strong> it can not be seen here.F2a b c d eF3YThe use of <strong>the</strong> word “electroless” is mislead<strong>in</strong>g; itemphasizes <strong>the</strong> difference between <strong>the</strong> method wherean external power supply is connected to <strong>the</strong> substratewhich is to be plated <strong>and</strong> <strong>the</strong> approach of an activesubstrate that deposits nickel atoms from ions on itssurface. Here nickel is provided <strong>in</strong> form of ions <strong>in</strong> anaqueous solution, beside <strong>the</strong> reducer hypophosphitethat provides <strong>the</strong> necessary electrons for <strong>the</strong> transformationfrom nickel ions to real atoms. Due to <strong>the</strong>used reducer <strong>the</strong> alloy has a phosphorus content ofup to 15 weight percent. The catalytically activatedsubstrate is immersed <strong>in</strong>to <strong>the</strong> bath <strong>and</strong> an alloy ofnickel atoms <strong>and</strong> some phosphorus can be built, becausenickel itself is also catalytically active itself.There are electric currents <strong>in</strong> <strong>the</strong> bath caused by <strong>the</strong>conversion of ions to atoms, so <strong>the</strong> process is not reallyelectroless.The bath consists of many more chemicals whichhelp to keep <strong>the</strong> bath stable <strong>and</strong> <strong>in</strong> a desired status.The composition of <strong>the</strong>se chemicals is ei<strong>the</strong>r notexactly known or a well kept <strong>in</strong>dustry secret whichmakes <strong>the</strong> traditional model<strong>in</strong>g of <strong>the</strong> bath behaviorvery difficult or even impossible. Fur<strong>the</strong>rmore onehas to be a chemical doma<strong>in</strong> expert to underst<strong>and</strong> <strong>the</strong>connection between <strong>the</strong> chemicals <strong>and</strong> <strong>the</strong>ir behaviorespecially when connected to <strong>the</strong> substrate <strong>and</strong> its exp<strong>and</strong><strong>in</strong>gnickel alloy.The characteristics of <strong>the</strong> bath are observed cont<strong>in</strong>uously<strong>and</strong> as many variables as possible are measured.Hence onl<strong>in</strong>e measurements of <strong>the</strong> currentbath nickel concentration, bath temperature <strong>and</strong> pHvalue are available <strong>and</strong> with good controllers keptalong desired values to keep <strong>the</strong> bath constitutionconstant. The substrate <strong>and</strong> its characteristics aremeasured <strong>in</strong> a laboratory when <strong>the</strong> plat<strong>in</strong>g is f<strong>in</strong>ished.Summariz<strong>in</strong>g <strong>the</strong> dataspaces X <strong>and</strong> Y (Section 3) basicallyconta<strong>in</strong> <strong>the</strong> follow<strong>in</strong>g <strong>in</strong>formation:X: Nickel concentration, pH value, ammonia concentration,ammonia <strong>and</strong> nickel sulfate pump<strong>in</strong>g,plat<strong>in</strong>g area <strong>and</strong> temperature.Y : Alloy thickness, phosphorus content, hypophosphiteconcentration <strong>and</strong> orthophosphite concentration.Figure 3: Cut through a plated substrate. Layers: (a) ametallic fastener <strong>and</strong> (b) a piece of conductive plasticto fix <strong>the</strong> sample, (c) Ni-P layer, (d) copper layer, (e)<strong>the</strong> base of PWB (epoxy lam<strong>in</strong>ate) (K. Kantola, 2004)The orig<strong>in</strong>al dataset X is fur<strong>the</strong>r prepared <strong>and</strong> exp<strong>and</strong>edas expla<strong>in</strong>ed <strong>in</strong> <strong>the</strong> follow<strong>in</strong>g section. The<strong>in</strong>formation about hypophosphite <strong>and</strong> orthophosphiteis not really a plate characteristic <strong>and</strong> for that reasonnot fur<strong>the</strong>r studied here.99


5 L<strong>in</strong>earityThe system is <strong>in</strong> a state of <strong>the</strong>rmodynamic balance.This state is kept constant by a very strong <strong>and</strong> accuratecontrol mechanism provided by <strong>the</strong> bath surround<strong>in</strong>g.Balance also is one of <strong>the</strong> neocybernetickey po<strong>in</strong>ts <strong>and</strong> so is very important to this approach.The <strong>the</strong>rmodynamic equilibrium can be described by<strong>the</strong> constantK = Cb1 B 1. . . C b βB βC a1A 1. . . C aαA α.This constant is highly nonl<strong>in</strong>ear dependent on <strong>the</strong>concentrations of <strong>the</strong> different chemicals <strong>in</strong> <strong>the</strong> solution.But apply<strong>in</strong>g a logarithm on both sides <strong>and</strong>differentiat<strong>in</strong>g <strong>the</strong> expression leads to0 = b 1∆C B1¯C B1−a 1∆C A1¯C A1∆C Bβ+ · · · + b β ¯C Bβ∆C+ · · · − aAαα ¯C Aα,where ∆C i / ¯C i are deviations from nom<strong>in</strong>al values,divided by those nom<strong>in</strong>al values, mean<strong>in</strong>g that it isrelative changes that are of <strong>in</strong>terest. For more <strong>in</strong>formationabout this equations see H.-C. Pfisterer (2006)<strong>and</strong> H. Hyötyniemi (2006).Even more <strong>the</strong> whole system can be represented<strong>in</strong> a l<strong>in</strong>ear way when us<strong>in</strong>g variables <strong>in</strong> a properway. Nonl<strong>in</strong>earity can by avoided by appropriatepreprocess<strong>in</strong>g of <strong>the</strong> variables (by employ<strong>in</strong>g relativechanges among <strong>the</strong> data). What is more, <strong>the</strong> dynamicnature can be put <strong>in</strong> <strong>the</strong> static form when <strong>the</strong> variablesare selected <strong>in</strong> a clever way. The follow<strong>in</strong>g po<strong>in</strong>ts expla<strong>in</strong>how to use <strong>in</strong>formation <strong>in</strong> order to stay <strong>in</strong> <strong>the</strong>l<strong>in</strong>ear doma<strong>in</strong> even if <strong>the</strong> real system is nonl<strong>in</strong>ear <strong>and</strong>can also be found <strong>in</strong> H. Hyötyniemi (2006):• Temperature: Accord<strong>in</strong>g to <strong>the</strong> Arrhenius formula,reaction rates k are functions of <strong>the</strong> temperature,so that k ∝ exp(c/T ). When this issubstituted, <strong>the</strong> model rema<strong>in</strong>s l<strong>in</strong>ear if one augments<strong>the</strong> data vector <strong>and</strong> def<strong>in</strong>es an additionalvariable z T = ∆T/ ¯T 2 .• Acidity: The pH value of a solution is def<strong>in</strong>edas pH = − log c H +. Because this is a logarithmof a concentration variable, one can directly <strong>in</strong>clude<strong>the</strong> changes <strong>in</strong> <strong>the</strong> pH value among <strong>the</strong>variables as z pH = ∆pH.• Voltage: In electrochemical reactions one maycharacterize <strong>the</strong> “concentration of electrons”. Itturns out that accord<strong>in</strong>g to <strong>the</strong> Butler-Volmer<strong>the</strong>ory <strong>the</strong> amount of free electrons is exponentiallyproportional to <strong>the</strong> voltage. Hence, aftertak<strong>in</strong>g logarithms, <strong>the</strong> “electron pressure” can becharacterized by z e − = ∆U.• Physical phenomena: It is evident that phenomenathat are orig<strong>in</strong>ally l<strong>in</strong>ear like diffusioncan directly be <strong>in</strong>tegrated <strong>in</strong> <strong>the</strong> model, assum<strong>in</strong>gthat appropriate variables (deviations from anom<strong>in</strong>al state) are <strong>in</strong>cluded among <strong>the</strong> variables.In practice, some reactions are not <strong>in</strong> balance;ra<strong>the</strong>r, <strong>the</strong>re can be a constant flux of some chemicalexit<strong>in</strong>g from <strong>the</strong> react<strong>in</strong>g solution. The above balanceexpressions can be written also for such “dissipative”reactions, <strong>and</strong> l<strong>in</strong>ear models are aga<strong>in</strong> applicablearound <strong>the</strong> equilibrium flux. This means thatalso <strong>the</strong> rates of change need to be <strong>in</strong>cluded among<strong>the</strong> variables that characterize <strong>the</strong> dynamic state of<strong>the</strong> process.Some of <strong>the</strong> variables to be <strong>in</strong>cluded <strong>in</strong> <strong>the</strong> regressionmodel are <strong>in</strong>tegrals over time — for example, <strong>in</strong><strong>the</strong> coat<strong>in</strong>g process, <strong>the</strong> layer thickness is <strong>the</strong> <strong>in</strong>tegralof <strong>the</strong> nickel reduction rate. Because of <strong>the</strong> modell<strong>in</strong>earity, such <strong>in</strong>tegrals can be transferred from <strong>the</strong>model output to <strong>the</strong> <strong>in</strong>put — mean<strong>in</strong>g that <strong>the</strong> layerthickness can be modeled as <strong>the</strong> <strong>in</strong>tegrals of <strong>the</strong> variablesare <strong>in</strong>cluded among <strong>the</strong> variable values <strong>the</strong>mselvesamong <strong>the</strong> data.Hence apart from <strong>the</strong> pla<strong>in</strong> data also some featurescan be <strong>in</strong>cluded <strong>in</strong> <strong>the</strong> dataset X. S<strong>in</strong>ce <strong>the</strong> measurementsample is only taken at <strong>the</strong> precise time when<strong>the</strong> plate is taken out of <strong>the</strong> bath it makes sense to<strong>in</strong>clude more <strong>in</strong>formation about <strong>the</strong> whole time <strong>the</strong>plate is immersed. A weighted <strong>in</strong>tegral over <strong>the</strong> plat<strong>in</strong>gtime solves this problem, hence <strong>the</strong> dataset X isextended with <strong>in</strong>tegrals of <strong>the</strong> pla<strong>in</strong> variables whichdoubles <strong>the</strong> dimension of X. The mentioned connectionbetween layer thickness <strong>and</strong> nickel reduction rateis ano<strong>the</strong>r reason for us<strong>in</strong>g <strong>in</strong>tegrals <strong>in</strong> <strong>the</strong> <strong>in</strong>put structure.Fur<strong>the</strong>rmore an old set of data can be <strong>in</strong>cludedby weight<strong>in</strong>g <strong>the</strong> old data differently <strong>in</strong> comparison to<strong>the</strong> recent <strong>in</strong>formation. This smooth<strong>in</strong>g of data aga<strong>in</strong>adds featured data to X.A schematic view <strong>and</strong> a summary of all <strong>the</strong> mentionedvariables <strong>in</strong> <strong>the</strong> <strong>in</strong>put structure can be seen <strong>in</strong>Figure 4.6 Model<strong>in</strong>g <strong>the</strong> plat<strong>in</strong>g processWhen us<strong>in</strong>g <strong>the</strong> described setup <strong>the</strong> first step is PCR(Section 3). Figure 5 shows <strong>the</strong> eigenvalues λ i of <strong>the</strong>correlation matrix of X <strong>in</strong> descend<strong>in</strong>g order. S<strong>in</strong>ce<strong>the</strong> dimension of <strong>the</strong> used dataspace is n = 18 <strong>the</strong>reare as many eigenvalues, each one represent<strong>in</strong>g <strong>the</strong><strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 100


Timel<strong>in</strong>eBath variablesNickel concentrationTemperaturepH value...Integrals ofNickel concentrationTemperaturepH value...Smooth<strong>in</strong>g ofNickel concentrationTemperaturepH value...Plate variablesThicknessPhosphor contentOrthophosphiteHypophosphitePlat<strong>in</strong>g timePSfrag replacementsNumeric value5432191% of maximum00 2 4 6 8 10 12 14 16 18Eigenvalue <strong>in</strong>dexTimel<strong>in</strong>eFigure 5: Latent variables θ i (PCA) <strong>and</strong> <strong>the</strong> numericalvalues of <strong>the</strong> correspond<strong>in</strong>g eigenvalues (equalsimportance of <strong>in</strong>formation among data)Pla<strong>in</strong> variablesCalculated featuresLaboratory measurementsOnl<strong>in</strong>e <strong>in</strong>formationSeldom <strong>in</strong>formationFigure 4: Schematic view of <strong>in</strong>put data set along <strong>the</strong>timel<strong>in</strong>e of <strong>the</strong> plat<strong>in</strong>g processThickness [µm]54.543.518 <strong>in</strong>put vectors, 2 latent vectors capture 76.5465%measured dataestimate, SSE = 0.028895electrochemical model, SSE = 0.03708830 5 10 15 20 25 30 35 40 45Time [h]amount of <strong>in</strong>formation kept <strong>in</strong> <strong>the</strong> correspond<strong>in</strong>g directionθ i . It can be seen clearly that <strong>the</strong> last directionsdo not carry any <strong>in</strong>formation; that shows <strong>the</strong>redundancy <strong>in</strong> <strong>the</strong> data. S<strong>in</strong>ce <strong>the</strong> noise is assumedto be uncorrelated it is evenly distributed <strong>in</strong> all directions,hence some directions carry mostly noise <strong>and</strong>no real <strong>in</strong>formation. In <strong>the</strong> end it is reasonable to useonly <strong>the</strong> first 7 directions for a new dataspace Z fromwhich a f<strong>in</strong>al mapp<strong>in</strong>g to Y should be obta<strong>in</strong>ed. Thisfirst N = 7 vectors carry already 91% of <strong>the</strong> full <strong>in</strong>formation.The alloy thickness <strong>and</strong> its phosphorus content canbe accurately estimated with <strong>the</strong>se 7 vectors. Us<strong>in</strong>gPLS as an data prepar<strong>in</strong>g algorithm <strong>the</strong> dataspace caneven be reduced to a dimension of N = 2 <strong>and</strong> obta<strong>in</strong>an even better estimate. The results of <strong>the</strong> modelga<strong>in</strong>ed by PLS analysis are presented here. For moreresults <strong>and</strong> discussions see H.-C. Pfisterer (2006).Figure 6 shows <strong>the</strong> process data of <strong>the</strong> alloy thicknessdivided <strong>in</strong> three parts. The first one was used formodel estimation along <strong>the</strong> above described way. Theo<strong>the</strong>r two parts are validation sets. Blue <strong>in</strong>formationis <strong>the</strong> real data, measured <strong>in</strong> <strong>the</strong> laboratory <strong>and</strong> storedby a data acquisition system. Green data is a modelestimation, obta<strong>in</strong>ed with a traditional complex electrochemicalmodel by K. Kantola (2004) <strong>and</strong> used asa comparison to validate <strong>the</strong> l<strong>in</strong>ear model at h<strong>and</strong>. InThickness [µm]Thickness [µm]54.543.54.53.5Validation 1measured dataestimate, SSE = 0.082567electrochemical model, SSE = 0.1459530 5 10 15 20 2554Validation 2measured dataestimate, SSE = 0.05134electrochemical model, SSE = 0.0593930 5 10 15 20 25Overall Validation SSEs equals 0.064752Figure 6: Alloy thickness: measured data <strong>and</strong> twocompared estimatesred color <strong>the</strong> data estimation for <strong>the</strong> alloy thicknessby <strong>the</strong> l<strong>in</strong>ear model can be seen <strong>and</strong> compared to realdata <strong>and</strong> <strong>the</strong> o<strong>the</strong>r model estimation.The same setup of data was used to estimate <strong>the</strong>phosphorus content of <strong>the</strong> nickel alloy (Figure 7).In red color aga<strong>in</strong> <strong>the</strong> result of <strong>the</strong> l<strong>in</strong>ear model at101


Phosphor content [w%]Phosphor content [w%]Phosphor content [w%]9.598.5818 <strong>in</strong>put vectors, 2 latent vectors capture 76.5465%7.5measured data7estimate, SSE = 0.14906electrochemical model, SSE = 0.210446.50 5 10 15 20 25 30 35 40 45109.598.58Time [h]Validation 1measured dataestimate, SSE = 0.77085electrochemical model, SSE = 0.40147.50 5 10 15 20 2598.587.5Validation 2measured dataestimate, SSE = 0.030103electrochemical model, SSE = 0.03374170 5 10 15 20 25Overall Validation SSEs equals 0.34825Figure 7: Alloy phosphorus content: measured data<strong>and</strong> two compared estimatesh<strong>and</strong> along with real data (blue) <strong>and</strong> results of ano<strong>the</strong>rmodel (green).The l<strong>in</strong>ear model provides a very accurate estimationof <strong>the</strong> alloy thickness <strong>and</strong> an accurate estimationof its phosphorus content. This is no surprise <strong>in</strong> <strong>the</strong>first parts of ei<strong>the</strong>r dataset, s<strong>in</strong>ce <strong>the</strong>y were used tobuild <strong>the</strong> model <strong>and</strong> <strong>the</strong> model is tailored by <strong>the</strong> algorithmespecially for <strong>the</strong>m. But <strong>the</strong> correct estimates <strong>in</strong><strong>the</strong> o<strong>the</strong>r parts confirm <strong>and</strong> validate <strong>the</strong> good performanceof <strong>the</strong> l<strong>in</strong>ear model. The power <strong>and</strong> <strong>the</strong> correctcomb<strong>in</strong>ation of strong ma<strong>the</strong>matical tools produceda very accurate result which can keep up <strong>and</strong> evenbeat complicated <strong>and</strong> <strong>in</strong>scrutable models. S<strong>in</strong>ce thismodel is a l<strong>in</strong>ear comb<strong>in</strong>ation of measured data it isalso possible to see <strong>the</strong> importance of each measuredvariable for <strong>the</strong> characteristic of each output variable.It is <strong>in</strong>terest<strong>in</strong>g to see that if <strong>the</strong> estimate of <strong>the</strong> l<strong>in</strong>earmodel is wrong also <strong>the</strong> estimate of <strong>the</strong> complexmodel is wrong. This is a h<strong>in</strong>t for miss<strong>in</strong>g <strong>in</strong>formationthat is not available for <strong>the</strong> model<strong>in</strong>g mach<strong>in</strong>ery<strong>in</strong> ei<strong>the</strong>r case or some mistakes <strong>in</strong> <strong>the</strong> measurements,hence no fault of <strong>the</strong> l<strong>in</strong>ear model. Fur<strong>the</strong>r it shouldbe po<strong>in</strong>ted out that <strong>the</strong>re is an improvement when us<strong>in</strong>gPLS <strong>in</strong>stead of PCR <strong>and</strong> also when <strong>in</strong>clud<strong>in</strong>g <strong>in</strong>tegrals<strong>in</strong> <strong>the</strong> <strong>in</strong>put data vector. However, smoo<strong>the</strong>dold data can not improve <strong>the</strong> results.The overall result comb<strong>in</strong>ed with <strong>the</strong> simplicity ofits design leads a way to a good control mach<strong>in</strong>eryfor nickel plat<strong>in</strong>g processes. The model can easilybe used <strong>and</strong> adjusted by process workers <strong>and</strong> it canprovide <strong>the</strong> necessary <strong>in</strong>formation for a controller <strong>in</strong>form of an observer for <strong>the</strong> plate characteristics. The<strong>in</strong>formation about <strong>the</strong>se characteristics is already hidden<strong>in</strong> <strong>the</strong> anyway measured bath variables <strong>and</strong> it wasjust necessary to reveal it <strong>and</strong> make it emerge.AcknowledgementsMany thanks to Prof. Dr.-Ing. Dr.h.c. Michael Zeitzfrom <strong>the</strong> Institute for System Dynamics (ISYS) of <strong>the</strong>University of Stuttgart who made <strong>the</strong> paper at h<strong>and</strong>possible <strong>and</strong> gave his support <strong>and</strong> advice.ReferencesH.-C. Pfisterer. Data-Based Model<strong>in</strong>g of ElectrolessNickel Plat<strong>in</strong>g. Master’s <strong>the</strong>sis, Hels<strong>in</strong>ki Universityof Technology, Control Eng<strong>in</strong>eer<strong>in</strong>g Laboratory,2006.H. Hyötyniemi. Multivariate Regression. Technicalreport, Hels<strong>in</strong>ki University of Technology, ControlEng<strong>in</strong>eer<strong>in</strong>g Laboratory, 2001.H. Hyötyniemi. Neocybernetics <strong>in</strong> Biological Systems.Technical report, Hels<strong>in</strong>ki Universityof Technology, Control Eng<strong>in</strong>eer<strong>in</strong>g Laboratory,2006.J. E. Jackson. A User’s Guide to Pr<strong>in</strong>cipal Components.Wiley-Interscience, 2003.J. Harju. Characterization of Electroless Nickel Plat<strong>in</strong>gProcess. Master’s <strong>the</strong>sis, Hels<strong>in</strong>ki Universityof Technology, Control Eng<strong>in</strong>eer<strong>in</strong>g Laboratory,2002.K. Kantola. Modell<strong>in</strong>g of Electroless Nickel Plat<strong>in</strong>gfor Control Purposes. Master’s <strong>the</strong>sis, Hels<strong>in</strong>kiUniversity of Technology, Control Eng<strong>in</strong>eer<strong>in</strong>gLaboratory, 2004.R. Tenno, K. Kantola, H. Koivo, A. Tenno.Model Identification for Electroless Nickel Plat<strong>in</strong>gThrough Holes Board Process. Technical report,Hels<strong>in</strong>ki University of Technology, Control Eng<strong>in</strong>eer<strong>in</strong>gLaboratory, 1996.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 102


Lähdekood<strong>in</strong> symbol<strong>in</strong>en analyso<strong>in</strong>ti tekoälyn näkökulmastaErkki LaitilaDepartment of Ma<strong>the</strong>matical Information Technology, University of JyväskyläOy P.O. Box 35, FIN-40014 Jyväskylä, F<strong>in</strong>l<strong>and</strong>SwMaster OySääksmäentie 14, 40520 Jyväskyläerkki.laitila@swmaster.fiTiivistelmäTämä artikkeli käsittelee lähdekood<strong>in</strong> automaattisen käsittelyn menetelmiä ja tuo esille uutena konstruktiona symbolisenanalyys<strong>in</strong>, joka on tunnettuja menetelmiä korkeatasoisempi, koska si<strong>in</strong>ä tulee esille semioott<strong>in</strong>en, tulkitseva näkökulma.Esitämme sen tärkeimmät toim<strong>in</strong>not ja piirteet tekoälyn näkökulmasta. Artikkelissa kuvataan analyso<strong>in</strong>tiprosessi ja senhyödyntämiseen soveltuva symbol<strong>in</strong>en tiedonhakumenetelmä, jonka avulla käyttäjä voi saada symboliseen malli<strong>in</strong>perustuen tarvitsemaansa pragmaattista <strong>in</strong>formaatiota tarkoituksena helpottaa nykyisen Java-kielisen ohjelmaversionymmärtämistä haluttaessa kehittää uusi versio. Ratkaisu on ohjelmoitu ja koeajettu Visual Prolog-kehittimellä, jokahybridikielenä ja symbolista ohjelmo<strong>in</strong>tia tukien tarjoaa er<strong>in</strong>omaiset menetelmät vastaavan työkalun toteutukseen.1 JohdantoTusk<strong>in</strong> mikään ohjelmistotoimitus valmistuu joensimmäisellä kerralla lopulliseen muotoonsa.Pikemm<strong>in</strong>k<strong>in</strong> voidaan sanoa, että ohjelmistojenkehittäm<strong>in</strong>en on lähes poikkeuksetta jatkuvaa tieto- ja<strong>in</strong>formaatiovirtaa, siis prosessi, joka sisältää lukuisiavaiheita ja toimituksia. Kaikissa tilanteissauudelleenkäytettävän kood<strong>in</strong> määrä tulisi, luotettavuus–ja kustannussyistä, olla mahdollisimman suuri.Lyhimmillään toimitussykli on päivittäistä koostamistasovellettaessa päivän luokkaa. Tietoliikennealallatoimitusten väli saattaa olla kireimmillään va<strong>in</strong> muutamiaviikkoja, missä ajassa kaikki mahdoll<strong>in</strong>en hyöty entisestäversioista olisi pystyttävä siirtämään uuteen versioon.Olemassa olevan kood<strong>in</strong> hyödyntäm<strong>in</strong>en on sitenmerkittävä haaste. Sitä kuvataan seuraavassametodologian näkökulmasta.1.1 Takais<strong>in</strong>mall<strong>in</strong>tam<strong>in</strong>enTakais<strong>in</strong>mall<strong>in</strong>tam<strong>in</strong>en (software reverse eng<strong>in</strong>eer<strong>in</strong>g)tarkoittaa olemassaolevan kood<strong>in</strong> hyödyntämistä.Erityisesti uudelleenmall<strong>in</strong>tam<strong>in</strong>en (reeng<strong>in</strong>eer<strong>in</strong>g) tähtääsaadun <strong>in</strong>formaation käyttöön uudessa ohjelmaversiossa.Selvästi todettu ongelma ohjelmistotyössä on, ettäohjelmistoprosessi on luonteeltaan va<strong>in</strong> yksisuunta<strong>in</strong>en,sillä sen tuotoksesta, kuten työn laadusta, määrästä,monimutkaisuudesta ja lopullisen kood<strong>in</strong> käyttäytymisestäon ollut vaikeaa saada palautetta. Koskapalaute on puuttunut, ei prosessia ole voitu optimoidasamalla tapaa ku<strong>in</strong> miten teollisen tuotannon prosessit onaikanaan saatu hall<strong>in</strong>taan. Juuri ohjelmistoprosessienoptimoitavuus on todettu korkeimmaksi alan kehityksentasoksi, mutta va<strong>in</strong> aniharvat yritykset ovat päässeetkorkeimmalle CMMI-tasolle (CMMI). Ilmeistä kuitenk<strong>in</strong>on, että jos ohjelmistoprosessista saataisi<strong>in</strong> yhtä hyvä jaajanmuka<strong>in</strong>en palaute ku<strong>in</strong> parhaimmissatuotantoprosesseissa asianmukaisella mittaustekniikallasaadaan, myös ohjelmisto-organisaatiot saisivatmerkittävän parannuksen toim<strong>in</strong>nan laatuunsa, millä olisipositiivisia vaikutuksia luotettavuuteen,läpimenoaikoih<strong>in</strong>, töiden delegoitavuuteen jaennenkaikkea mahdollisuuteen saada uuttayd<strong>in</strong>tietämystä jatkokehitykseen.Tässä artikkelissa kuvattu symbol<strong>in</strong>en menetelmätähtää juuri takais<strong>in</strong>mall<strong>in</strong>tamispalautteen parantamiseen.1.2 Semioott<strong>in</strong>en näkökulmaohjelmistotyöhönSemiotiikka tarkoittaa merkitysten ja kommunikaationtutkimusta. Se on tämä artikkel<strong>in</strong> kannalta ki<strong>in</strong>nostavaaihe, koska ohjelmoijahan on aikanaan jättänyt koodi<strong>in</strong>jälkensä, joiden vaikutuksia ja tarkoituksia ylläpitäjähaluaa tutkia jatkokehityksen kannalta.Peircen tulk<strong>in</strong>tojen mukaan (1998) semiotiikkajakaantuu kolmeen pääkäsitteeseen, joita ovat ovatmerkki (sign), kohde eli objekti ja tulk<strong>in</strong>ta (<strong>in</strong>terpretant).Merkki viittaa vastaavaan objekti<strong>in</strong> ja tulk<strong>in</strong>ta yhdistääniitä toisi<strong>in</strong>sa. Esimerkiksi nähdessään jäniksen jäljet,ihm<strong>in</strong>en tekee tulk<strong>in</strong>nan, joka yhdistää jäljet oletettuujänikseen, jollo<strong>in</strong> jänis on objekti ja jäljet ovat vastaava103


merkki. Tois<strong>in</strong> ku<strong>in</strong> merkit, tulk<strong>in</strong>nat ovat a<strong>in</strong>a sisäisiäesityksiä. Merkit voidaan jakaa osoittimi<strong>in</strong> (<strong>in</strong>dice,<strong>in</strong>dex), ikoneih<strong>in</strong> ja symboleih<strong>in</strong> riippuen siitäm<strong>in</strong>kälaisesta objektista on kysymys. Esimerkiksi kirjaon tietämyksen osoitus (tunnusluku, <strong>in</strong>deksi), samo<strong>in</strong>savu on osoitus tulesta.Vieläpä vaikka kausaalista yhteyttä tai mitäänattribuutteja olioon ei olisikaan, silti voi löytyä jok<strong>in</strong><strong>in</strong>dikaatio (merkki) luomaan yhteyksiä objekti<strong>in</strong>sa.Symbol<strong>in</strong> käyttö soveltuu sellaiseen tarkoitukseen, jajuuri tällaista epäsuoraa kytkentää käyttää hyväkseentässä artikkelissa kuvattu symbol<strong>in</strong>en menetelmä. Koskakaikki ohjelman sisäiset artifaktat ovat näkymättömiä,tulee analyso<strong>in</strong>tiohjelmiston muodostaa riittävän tarkkaja yle<strong>in</strong>en virtuaalimalli viittauks<strong>in</strong>een ja symbole<strong>in</strong>eenkäyttäjän näkösälle kuvaruudulle. Näytön koko onkuitenk<strong>in</strong> rajattu ja työkalun on siten mahdotonta tuottaakerralla riittävää <strong>in</strong>formaatiota yhtenä kokonaisuutena.Siksi analyso<strong>in</strong>n<strong>in</strong> tulee olla <strong>in</strong>teraktiivista navigo<strong>in</strong>tia,joka mahdollistaa uusia tiedonhakuja eri näkökohdista.1.2.1 Tietojärjestelmien semiotiikkaMorris (1971) jakaa semiotiikan kolmeen dimensioon,joita ovat syntaksi, semantiikka ja pragmaatt<strong>in</strong>entarkastelu, jollo<strong>in</strong> pragmaatt<strong>in</strong>en osuus viittaa Peircensemioottiseen tulk<strong>in</strong>taan. Seuraavassa kuvataan, ku<strong>in</strong>kaFrisco (1998) on määritellyt nämä kolme dimensiotatietojärjestelmien kehittämisen suhteen.Frisco luokittelee <strong>in</strong>formaatiojärjestelmänsemioottiset tasot seuraavasti. Järjestelmän rakentam<strong>in</strong>enaloitetaan fyysisen maailman tasolta, joka sisältäävaltaisan määrän signaaleja, merkityksiä jaluonnonlakeja. Järjestelmän suunnittelu tehdäänempiirisen kokemuksen avulla luoden kokonaisuudestamalleja ja uusia käsityksiä. Tulos ohjelmoidaan, jollo<strong>in</strong>saadaan syntaksia, käytännössä ki<strong>in</strong>teä ohjelmistotiedosto<strong>in</strong>een, kääntäj<strong>in</strong>een ja toim<strong>in</strong>taympäristö<strong>in</strong>een.Kun syntaksia ja koodia tulkitaan semantiikan kautta,saadaan tietoa kood<strong>in</strong> rakenteiden merkityksistä,väittämistä ja viittauksista ulkomaailmaan. Sillo<strong>in</strong> kunjärjestelmää tutkitaan nimenomaan eri roolien tarpeistalähtien, tavoitetellaan pragmaattista tietoa. Sillä onFriscon mukaan selvä yhteys järjestelmän tuottamaanhyötyyn. Kokonaisvaikutuksen tulee näkyä tietojärjestelmääympäröivässä sosiaalisessa maailmassa,jonka tarpeisi<strong>in</strong> tietojärjestelmän tulisi tuottaa lisäarvoa.Friscon määrittelykonseptia on kritisoitu esimerkiksisiitä, että se pyrkii formalisoimaan lähes epäformaalejaasioita, mutta takais<strong>in</strong>mall<strong>in</strong>tamisen kannalta tätä edelläkuvattua ketjua voidaan pitää kelvollisena lähtökohtana,koska takais<strong>in</strong>mall<strong>in</strong>tamisessa keskitytään nimenomaanformaal<strong>in</strong> kood<strong>in</strong> hyödyntämiseen.1.3 Kood<strong>in</strong> analyso<strong>in</strong>n<strong>in</strong> teknologiatLähdekood<strong>in</strong> analysoim<strong>in</strong>en liittyy ohjelmistojentakais<strong>in</strong>mall<strong>in</strong>tamisen (software reverse eng<strong>in</strong>eer<strong>in</strong>g)alueeseen, jonka tarkoituksena on juuri helpottaa uusienohjelmaversioiden tuottamista. Kood<strong>in</strong> analyso<strong>in</strong>nissaperiaatevaihtoehto<strong>in</strong>a on tutkia koodia käs<strong>in</strong> per<strong>in</strong>teisilläeditoreilla ja kehitystyökaluilla tai käyttää parhaitenkoodimassan käsittelyyn soveltuvia erikoismenetelmiä,joita on vars<strong>in</strong> vähän.Kielioppien taustateoriat on tunnettu 50-luvulta asti jakood<strong>in</strong> jäsentämisen metodologiat kehitetti<strong>in</strong> 70-luvullaUnix<strong>in</strong> mukana. Ylläpidon kannalta haitallista on, ettäanalyso<strong>in</strong>timenetelmät ovat kehittyneetkääntäjäteknologian ja kood<strong>in</strong> testauksen menetelmiensivutuotte<strong>in</strong>a siten, että suurtakaan huomioita ei oleki<strong>in</strong>nitetty juuri analyso<strong>in</strong>tituloksen hyödynnettävyyteenkoko prosess<strong>in</strong> kannalta, <strong>in</strong>formaatiojärjestelmänkokonaishyödystä puhumattakaan.1.3.1 Abstract Syntax Tree (AST)Vallitseva käytäntö kood<strong>in</strong> käsittelystä analyso<strong>in</strong>tiohjelmistoissaperustuu Abstract Syntax Treeteknologiaan(AST). Si<strong>in</strong>ä työkaluun tallentuu kieliop<strong>in</strong>mukaisia abstrakteja rakenteita, jotka muodostavatkeskenään tiivi<strong>in</strong> hierarkian. Vaikka AST on hyödyll<strong>in</strong>enkääntäjiä suunniteltaessa, se ei kuitenkaan annamahdollisuuksia syvälliseen tulk<strong>in</strong>taan, koska kielensemantiikka ei kokonaisuudessaan sisälly kielioppi<strong>in</strong>.Esimerkiksi muuttujaviittausten ja metodiviittaustenlogiikka ja oliosidosten toim<strong>in</strong>ta sekä rakenteiden väl<strong>in</strong>ensemantiikka puuttuvat AST-määrittelystä.1.3.2 UML ja round-trip-eng<strong>in</strong>eer<strong>in</strong>gKäytännön tasolla oliopohjaisen kood<strong>in</strong> analyso<strong>in</strong>nissaon viime aiko<strong>in</strong>a selvästi yleistynyt round tripeng<strong>in</strong>eer<strong>in</strong>g - nim<strong>in</strong>en menetelmä, joka auttaaluokkarakenteiden poimimista koodista. Valitettavast<strong>in</strong>ä<strong>in</strong> syntyvien UML-notaatioiden tarkkuus ei riitäpitkälle. Lisäksi eri työkalut saattavat tuottaa erilaisiakaavioita samalle lähdekoodille.Toisaalta UML:n eri esitystavat eivät skaalauduhyv<strong>in</strong> riittävän isojen näyttöjen luomiseen, m<strong>in</strong>kä takiakäyttäjä joutuu monesti tutkimaan lukuisia erilaisiakaavioita voidakseen tehdä johtopäätöksiä nykyisenkood<strong>in</strong> toim<strong>in</strong>nasta. Toistuva erillisten kaavioidenlukem<strong>in</strong>en on työlästä ja se kuormittaa käyttäjänlyhytkestoista muistia merkittävästi, jonka takiavars<strong>in</strong>a<strong>in</strong>en ongelma saattaa jäädä ratkaisematta.Olio-ohjelmo<strong>in</strong>n<strong>in</strong> kehittäjäjärjestö OMG keskittyypääasiallisesti uusien sovellusten kehittämiseen ja sitäkautta uuden kood<strong>in</strong> luomiseen. Ehkä sen takia heidän<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 104


mall<strong>in</strong>sa eivät tarjoa tarpeeksi tarkkoja esityksiä, jotkamahdollistaisivat kood<strong>in</strong> tarkimpien lauseidentallentamisen tai suorittamisen, mikä olisi tarkananalyys<strong>in</strong> perusedellytys. Siten käsitteellä executableUML ei tarkoiteta vastaavan kood<strong>in</strong> suorittamista vaanläh<strong>in</strong>nä vastaavan mall<strong>in</strong> tietojen evaluo<strong>in</strong>tianimenomaisen mall<strong>in</strong> kannalta, ei kood<strong>in</strong> kannalta.1.3.3 Kood<strong>in</strong> ymmärtämisen peruskäsitteetKuten edellä todetti<strong>in</strong>, takais<strong>in</strong>mall<strong>in</strong>tamisen luomapalaute on arvokasta kehittäjäorganisaatiolleen, ja ettäsyntaksi tarjoaa er<strong>in</strong>omaisen pohjan uudelleautomaatiolle, koska käsiteltävä kood<strong>in</strong> <strong>in</strong>formaatio onluonteeltaan formaalia. Esille tulee kuitenk<strong>in</strong> kysymys,mikä osa koodista on merkityksellistä ja arvokasta? Vasonko koodi va<strong>in</strong> tasapaksua massaa, jonka lukem<strong>in</strong>ensiltik<strong>in</strong> onnistuu parhaiten editorilla?Ohjelman ymmärtämisen teorioita on kehitetty 80-luvulta lähtien, jollo<strong>in</strong> Pennigton (1987) kehittitarkastelun alhaaltapä<strong>in</strong> alkavan tarkastelunviisikkomall<strong>in</strong>sa (function, control flow, data flow, state& operation) ja Brooks (1983) kehitti yleiset teoriattarkastelun hypoteeseille. 90-luvulla von Mayrhauser(1992) loi <strong>in</strong>tegroidun metamall<strong>in</strong>, johon liitetti<strong>in</strong> osanaylhäältäpä<strong>in</strong> alkava osittava tarkastelutapa sekätilannemalli, joka on kumulatiivista ohjelmasta saatua<strong>in</strong>formaatiota toimialansa tietoon yhdistettynä.Wiedenbeck (2002) on edelleen laajentanut aiempiateorioita 2000-luvulla kattamaan olio-ohjelmienymmärtämisen tarpeet. On esitetty myös abstraktimpiakäsitteitä kuten suunnannäyttäjä (beacon) ja lohko(chunk) kuvaamaan kood<strong>in</strong> ymmärtämistä esimerkiksilajittelualgoritmien osalta, mutta niiden merkitysoliomaisen kood<strong>in</strong> tarkastelussa ei ole enää kov<strong>in</strong>merkittävä, koska oliot ja metodit rajaavat tehokkaastitoim<strong>in</strong>toja sisäänsä muodostaen uuden helpottavanabstraktiotason.Sen sijaan uutena asiana olio-ohjelmo<strong>in</strong>ti on tuonutsuunnittelumallit ja kerrosarkkitehtuurit uusiksitarkastelutavoiksi. Niiden jäljittäm<strong>in</strong>en koodista onpaljon tutkittu alue ja kood<strong>in</strong> rakenteen uudelleensuunnittelu (refactor<strong>in</strong>g) on siihen soveltuvakonkreett<strong>in</strong>en käyttökohde.1.4 Tekoälyn ja kood<strong>in</strong> analyso<strong>in</strong>n<strong>in</strong> suhdeTekoälyyn liittyvät keskeisesti tietämyksen hank<strong>in</strong>ta,palautus ja käsittely, ihmisen ja koneen väl<strong>in</strong>envuorovaikutus, päättelymekanismit ja älykkäätkäyttöliittymät. Lähdekood<strong>in</strong> tutkimuksen alueeltavoidaan siihen liittyen määritellä, että ohjelman ja sentoim<strong>in</strong>nan ymmärtäm<strong>in</strong>en on oppimisprosessi, jossalukija pyrkii kehittämään tietämystään tietojärjestelmännykyarvon kasvattamiseksi. Ohjelma sisältää paljonsumeaa tietoa, jota ohjelmoijat ovat tallentaneet koodi<strong>in</strong>omalta kokemustaustaltaan optimoiden. Sen sisältö onuse<strong>in</strong> ositta<strong>in</strong> virheellistä. Tietoa on jopa miljoonia rivejä,joten sitä on mahdotonta esittää näytössä kerrallaan,tarvitaan siis erilaisia haku- ja suodatusmekanismeja.Parhaille formaalien kielten analyso<strong>in</strong>n<strong>in</strong>sovelluksille on om<strong>in</strong>aista, että kood<strong>in</strong> tieto saadaanpoimittua tarkkaan semantiikan mukaan. Penn<strong>in</strong>gton<strong>in</strong>viisikkomalli muodostaa tämän tiedon perustan. Semäärittää mikä on ki<strong>in</strong>nostavaa dataa. Käyttäjä onliikkeellä yleensä joko perehtymistarkoituksessa taipaikantamistarkoituksessa. Molemmissa tapauksissa hänhaluaa evaluoida kriittisimpiä koodiosuuksiaapukysymysten ja hypoteesien kautta. Yhte<strong>in</strong>en nimittäjäkaikille näille tarpeille on kood<strong>in</strong> ymmärtämisen tehostam<strong>in</strong>entyökalun avulla (program comprehension, PC).1.5 Tutkimuksen rajausErilaisia ohjelmo<strong>in</strong>tikieliä tunnetaan suuri joukko.Pa<strong>in</strong>opiste teollisuudessa on siirtynyt oliopohjaisi<strong>in</strong>kieli<strong>in</strong>, mutta silti alan tutkimus huomattavan suureltaos<strong>in</strong> käsittelee proseduraalisia kieliä kuten C, Pascal taiCobol. Oliopohjaisista pääkielistä C++ on laaj<strong>in</strong>,monimutkais<strong>in</strong> ja ehkä jopa tärke<strong>in</strong>, mutta senanalyso<strong>in</strong>ti<strong>in</strong> on vars<strong>in</strong> rajatusti menetelmiä. Sen sijaanJava-kieltä ja sen käsittelyä on tutkittu paljon, koska seon kielenä selväpiirte<strong>in</strong>en.Tässä artikkelissa käsittelemme etupäässä Javaa,koska sen selväpiirteisen kieliop<strong>in</strong> ansiosta onmahdollista päästä nopeasti hyv<strong>in</strong> tarkkaankäsittelytulokseen. Lisäksi edistysaskeleidenosoittam<strong>in</strong>en paljon tutkitulle Javalle voi olla selväosoitus uuden tutkimuslähestymisen paremmuudestaper<strong>in</strong>teisempi<strong>in</strong> tutkimuslähestymisi<strong>in</strong> nähden.Symbol<strong>in</strong>en analyysi on SwMaster Oyn toimestakäynnistynyt <strong>in</strong>novaatio, jota Erkki Laitila tutkiiväitöstutkimuksessaan Jyväskylän Yliopistossa. Sentekn<strong>in</strong>en osuus keskittyy kood<strong>in</strong> symbolien ja niih<strong>in</strong>liittyvän logiikan kuvaamiseen mahdollisimman hyv<strong>in</strong>Visual Prolog- kehittimellä, joka on hybridikieli sisältäener<strong>in</strong>omaisen oliojärjestelmän mall<strong>in</strong>tamistarkoituksi<strong>in</strong> jalogiikkaohjelmo<strong>in</strong>n<strong>in</strong> perustan kood<strong>in</strong> logiikan,assosiaatioiden ja riippuuvuksien käsittelyyn.Symbol<strong>in</strong>en kood<strong>in</strong> malli on uusi atomist<strong>in</strong>enkonstruktio, joka mahdollistaa kood<strong>in</strong> tutkimisen kaikistalähtökohdista, jotka liittyvät Java-kood<strong>in</strong> semantiikkaanja simuloidun kood<strong>in</strong> käyttäytymiseen ja ajovaikutuksi<strong>in</strong>.Kuva 1 (seuraava sivu) esittää molekylääristä rakennettasidoks<strong>in</strong>een. Se muistuttaa ohjelmakoodia, koskamolemmissa on sidoksia. Tärke<strong>in</strong> asia ohjelmistojahahmotettaessa on ymmärtää ku<strong>in</strong>ka eri lähestymistavatkuten käyttötapaukset, ohjausvuo ja ohjelmasuunnitelmatliittyvät toisi<strong>in</strong>sa. Olio-ohjelmo<strong>in</strong>ti aiheuttaa omiaperiaatteellisia ongelmiaan, koska vastaavat kutsutsijoittuvat näkymättömi<strong>in</strong> eri metodien sisälle koodi<strong>in</strong>.Syntyviä olioita ei voida myöskään tarkkailla millään105


analyso<strong>in</strong>n<strong>in</strong> perusmenetelmillä. Siten nä<strong>in</strong> hava<strong>in</strong>nollistakuvaa ei tänä päivänä ole saatavissa, muttamahdollisuuksia on, mikäli tässä tutkimuksessa kuvattuteknologia pääsee aikanaan käytäntöön asti.Kuva 1. Symbol<strong>in</strong>en, atomist<strong>in</strong>en malli.Voimakkaasti yks<strong>in</strong>kertaistaen voidaan sanoa, ettäkood<strong>in</strong> ymmärtäm<strong>in</strong>en on si<strong>in</strong>ä olevien symbolien jarakenteiden välisten suhteiden ymmärtämistä. Nämäsuhteet muodostavat keskenään symbolivuon, jokatuottaa hyödyllis<strong>in</strong>tä <strong>in</strong>formaatiota sillo<strong>in</strong> kun se onjäsentyneenä ohjelman suoritusjärjestykseen. Sitenkuvassa 1 yl<strong>in</strong>nä voisi olla ma<strong>in</strong>-metodi, joka haarautuisialaspä<strong>in</strong> suorituslogiikan mukaisesti.2 Analyso<strong>in</strong>timenetelmätPer<strong>in</strong>teisiä kood<strong>in</strong> analyso<strong>in</strong>timenetelmiä ovat staatt<strong>in</strong>enja dynaam<strong>in</strong>en analyysi. Staatt<strong>in</strong>en analyysi ei sovelluhyv<strong>in</strong> oliomaisille kielille kuten Javalle, koska va<strong>in</strong> osatoim<strong>in</strong>noista on tulkittavissa suoraan koodista. Toisaaltadynaam<strong>in</strong>en analyysi vaatii lähes a<strong>in</strong>a monimutkaisiaajojärjestelyjä.Staattisella analyysillä voidaan tuottaariippuvuuskaavioita ja kutsupuita, jotka toimivatk<strong>in</strong>hyv<strong>in</strong> proseduraalisille kielille jopa ni<strong>in</strong>, että niidenavulla voidaan saada täsmäll<strong>in</strong>en tieto mitä kood<strong>in</strong>osiamikäk<strong>in</strong> proseduuri käyttää ja missä järjestyksessäohjelmavuo etenee, mikä on arvokasta tietoa mm.vianpaikannustilanteissa. Vaikeita haasteita staattiselleanalyysille ovat osoittimet (po<strong>in</strong>ter) japysähtymättömyyden analyso<strong>in</strong>ti.Dynaam<strong>in</strong>en analyysi perustuu pitkälle ohjelmanajamiseen debuggerilla ja sitä kautta kood<strong>in</strong> toim<strong>in</strong>tojenjäljittämiseen valittujen pysäytysehtojen, testitapausten jajäljityskomentojen mukaisesti. Nä<strong>in</strong> saadaan talteen jälki,trace, joka voi sisältää erittä<strong>in</strong> paljon aivan turhaak<strong>in</strong>tietoa. Jopa 98 % jäljestä voi olla epäkuranttia.Edellä ma<strong>in</strong>ittujen menetelmien rajoitteet tuntien onaiheellista kysyä, voidaanko muodostaa sella<strong>in</strong>en uusianalyso<strong>in</strong>titapa, jonka pa<strong>in</strong>opisteenä olisi koodi<strong>in</strong>formaationjalostam<strong>in</strong>en ja muokkaam<strong>in</strong>en sellaiseenmuotoon, että syntyvästä ratkaisusta voitaisi<strong>in</strong>selektiivisesti kysely<strong>in</strong> poimia haluttu <strong>in</strong>formaatio?Voisiko syntynyt menetelmä esimerkiksi toimia kutentietokanta, jollo<strong>in</strong> käyttäjä saisi vapaasti valita m<strong>in</strong>käasioiden välisiä suhteita hän haluaisi tarkastellasuunnitellessaan muutoksiaan?Mietittäessä vastauksia edellisi<strong>in</strong> kysymyksi<strong>in</strong>päädytään ideaalisen analyys<strong>in</strong> määritelmään: Milla<strong>in</strong>enolisi ideaal<strong>in</strong>en analyso<strong>in</strong>timenetelmä, jos sen voisivapaasti määritellä puhtaalta pöydältä?Vertauskohtia voimme tietysti löytää muidentietojärjestelmien ja teknologioiden parhaistatoteutuksista, joita ovat mm. relaatiomalli,<strong>in</strong>formaatioteoria, diagnostiikan perustietous,asiantuntijajärjestelmien perustyypit. Näiden kauttavoimme päätyä syntees<strong>in</strong>omaisesti seuraavi<strong>in</strong>vaatimuksi<strong>in</strong>: Analyysi voidaan tehdä millo<strong>in</strong> va<strong>in</strong> mistä tahansakood<strong>in</strong> osasta. Analyyysi poimii käsittelyyn kaikki tarvittavat asiatkuten Penn<strong>in</strong>gton<strong>in</strong> ja Wiedenbeck<strong>in</strong> määrittelemättiedot. Tuotoksella tulee olla ideaal<strong>in</strong>en tiedonsiirtosuhdeilman turhaa tietoa. Vastaava analyso<strong>in</strong>tiprosessi tukee tiedonhank<strong>in</strong>taa,mahdollistaen uuden tietämyksen hank<strong>in</strong>nan. Vastaus staattiseen kysymykseen saadaan nopeasti.Silti ratkaisu vaativaan ongelmaan saisi kestääkauemm<strong>in</strong>k<strong>in</strong>, jos vertailukohtana käytetään käs<strong>in</strong>tehtävää perushakua, mikäli haku vaatii runsaastisyvällistä laskentaa.. Menetelmän tulee tukea käyttäjän pohd<strong>in</strong>taasyntaks<strong>in</strong> ja semantiikan suhteista, mieluumm<strong>in</strong>myös pragmaattiselta kannalta katsottuna. Menetelmän tulisi voida tunnistaa arkkitehtuur<strong>in</strong>kaikki keskeiset piirteet.Ohjelmakoodi sisältää erilaisia tasoja, kerroksia jamenetelmiä, joten käytännön tutkimuksessa on tehtävärajauksia. Tässä tutkimuksessa keskitytääna) ”kovoteoriaan”, joka tuottaa mahdollisimmanytimekkään, mutta ilmaisuvoimaisen mall<strong>in</strong>b) ”pehmoteoriaan”, joka määrittelee ihmisentyypillisen käyttäytymismall<strong>in</strong> ylläpitoongelmiaratkottaessa.Siten abstraktimmat käsitteet, jotka ovat etäällä kieliop<strong>in</strong>määrittelyistä, jätetään huomioimatta. Esimerkiksikerrosrakenteen poimimista koodista ei tutkita eikämyöskään suunnittelumallien tunnistamista.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 106


3 Kood<strong>in</strong> käsitehierarkiaKood<strong>in</strong> tutkim<strong>in</strong>en muistuttaa mon<strong>in</strong> tavo<strong>in</strong> tutkimusta,koska sen lukem<strong>in</strong>en vailla tarkoitusta ei ole mielekästä.A<strong>in</strong>a tarvitaan jok<strong>in</strong> tavoite, jollo<strong>in</strong> lukija joutuumiettimään tavoitteen ja kood<strong>in</strong> välistä suhdetta (vonMayrhauser 1992). Se onnistuu va<strong>in</strong> olettamuksia elihypoteesejä tehden. Nä<strong>in</strong> kood<strong>in</strong> tarkasteluun voidaansoveltaa tieteen peruskäsitteistöjä alla olevaan tapaan.Ontologia kuvaa kood<strong>in</strong> olemuksen ja sen keskeisenrakenteen. Epistemologia tunnistaa koodista olennaistatietoa pyrkien määrittelemään sen tietämystä.Metodologia kuvaa tavan, jolla selektiiv<strong>in</strong>en tiedonkeruuja tietämyksen johtam<strong>in</strong>en siitä voi tapahtua. Lisäksitarvitaan vielä menetelmä, joka soveltuu arkielämäntarpeisi<strong>in</strong> ja erityisesti työkalu, joka helpottaa käyttäjäntoimia.3.1 PeruskäsitteetSeuraavassa esitetään lyhyesti tutkimuksen keskeisettermit, jotka selostetaan myöhemm<strong>in</strong> tarkemm<strong>in</strong>.3.1.1 Sanasto ja lyhenteetG kieliop<strong>in</strong> symboliX kood<strong>in</strong> syntaks<strong>in</strong> rakenne kieliopissa GN rakenteen X tyyppi (non-term<strong>in</strong>al)Y X:n vaikutus koodissa, semantiikkaZ X:n merkitys lukijalle, pragmatiikkaB X:n käyttäytymismalli (<strong>in</strong>put/output-tarkastelu)S koodista saatu symboliO symbolista S luotu olioL logiikka, joka olioon O sisältyy (<strong>in</strong>terpretant)M malli, joka koostuu olioistaA analyysi, joka hyödyntää mallia MQ kysely, jolla analyysi A käynnistyyH hypoteesi, jonka perusteella kysely Q voidaan tehdäP päättelyprosessi, josta käs<strong>in</strong> luodaan hypoteeseja HT ylläpitotehtävä päättelyprosess<strong>in</strong> P aktivoimiseenI pragmaatt<strong>in</strong>en <strong>in</strong>formaatio ylläpitoa tukemaanK tietämys (knowledge), jota prosessissa P kehitetäänSymbol<strong>in</strong>en analyysimenetelmä toimii ideaalisesti, jos sepystyy yhdistämään edellä ma<strong>in</strong>itut käsitteet ideaalisesti.3.1.2 MääritelmiäInformaatio on uutta, käyttäjäkohtaista merkittäväätietoa, jonka määrä on m<strong>in</strong>imoitu tarpeeseensa.Tietämys on sellaista tietoa, jota voidaan käyttääratkaistaessa muita samantyyppisiä ongelmia.Tietämyksen hank<strong>in</strong>taan liittyy siten oppimista jasisäistämistä. Arvokka<strong>in</strong> tieto, jota metodologia voituottaa, on juuri tietämystä, taitoa ratkaista tuleviaongelmia yhä järjestyneemm<strong>in</strong> verrattunatapauskohtaiseen käsittelyyn, jossa ratkaisem<strong>in</strong>entapahtuu yhä uudelleen entiseen tapaan. Uudentietämyksen avulla nykyistä menetelmää voidaan kehittääedelleen, jollo<strong>in</strong> päästään positiiviseen kierteeseen jaoptimoimaan menetelmän parametreja sekäelim<strong>in</strong>oimaan virhemahdollisuuksia. Walenste<strong>in</strong> (1998)esittää, että nä<strong>in</strong> tietämys muuttuu säännöiksi ja taidoiksi.3.1.3 OhjelmaesimerkkiSeuraavassa esitettyä lyhyttä esimerkkiä käytetäänjatkossa hava<strong>in</strong>nollistamaan symbolisen analyys<strong>in</strong> ideaa.Si<strong>in</strong>ä oleva luokka Server käynnistää muutamaa lausettakäyttäen (4-10) Server-olion.// Start <strong>the</strong> server up, listen<strong>in</strong>g on an// optionally specified port1 class Server extends Thread {2 {3 protected <strong>in</strong>t port;4a public static void ma<strong>in</strong>(Str<strong>in</strong>g[]4b args) {5 <strong>in</strong>t port = 0;6 if (args.length == 1) {7a try { port =7b Integer.parseInt(args[0]); }8acatch (NumberFormatException8b e) { port = 0; }9 }10 new Server(port);11 }12 }Javan koodi on selkeä. Se sisältää va<strong>in</strong> varattuja sanoja jajoko viittauksia Javan kirjastoon tai käyttäjän antamiasymboleita viittauks<strong>in</strong>een. Varatut sanat rajaavatrakenteita (nonterm<strong>in</strong>al), esimerkke<strong>in</strong>ä luokka Server jasen sisältämä metodi ma<strong>in</strong>.Javaa tuntematon lukija ei voi päätelläesimerkkikood<strong>in</strong> (X) aiheuttamasta toim<strong>in</strong>nasta (B)paljoakaan, koska hän ei tunne kielen semantiikkaa (Y),riippuvuussääntöjä (N) eikä käsitteitä (G). Se sijaankokenut Java-ohjelmoija ymmärtää yllä olevan toim<strong>in</strong>nantäydellisesti (Z) luettuaan jokaisen riv<strong>in</strong> huolellisesti.3.2 Kood<strong>in</strong> ontologiaFormaalien kielten jäsentäm<strong>in</strong>en ei ole ongelmallista,koska kielen määrittely on alkuvaiheissa suunniteltusäännönmukaiseksi. Seuraavassa kuvataan kieltentulk<strong>in</strong>nan mahdollisuuksia tietosisällöistä lähtien.107


3.3 Kieliop<strong>in</strong> määritelmäKieliop<strong>in</strong> määritelmät ovat peräis<strong>in</strong> jo puolen vuosisadantakaa (Chomsky 1956). Seuraavassa formaal<strong>in</strong> kielenkieliop<strong>in</strong> määritelmä:G = Symboli N edellä tarkoittaa jakokelpoista termiä(non-term<strong>in</strong>al), jolla on väh<strong>in</strong>tään kaksitaso<strong>in</strong>enhierark<strong>in</strong>en rakenne. on kielen kaikkien varattujensanojen luettelo sisältäen välimerkit ja ava<strong>in</strong>sanat(term<strong>in</strong>al). R on joukko sääntöjä (production rule), jotkakertovat kaikki sallitut rakenteet, joita kuk<strong>in</strong> N voi saada.S0 on kielen käännöksen aloitussymboli, jolla kuitenkaanei ole analyso<strong>in</strong>nissa juuri merkitystä.Tärkeimpiä rakenteita Javan osalta ovat luokanmäärittely ClassDeclaration, metodi MethodDeclaration,lause Statement, lauseke Expression ja muuttujaIdentifier.Ontologian ja kapselo<strong>in</strong>n<strong>in</strong> takia luokan määrittely onensiarvoisen tärkeä. Se on erittä<strong>in</strong> selkeä. Luokka sisältäämäärittelynsä mukaan luokan jäseniä (metodi jaattribuutti), ja sillä on per<strong>in</strong>tämäärittely. Yhdessä nämäulkoiset määrittelyt muodostavat luokan allekirjoituksen,luokkasopimuksen.Javan sanastossa erityisesti joka<strong>in</strong>en viittauskäsitteeseen Identifier viittaa joko JDK-kirjastoon taikäyttäjän antamaan symboli<strong>in</strong>, joka voi olla joko paket<strong>in</strong>,luokan, metod<strong>in</strong>, attribuut<strong>in</strong> tai muuttujan nimi. Kaikkimuut kielen rakenteet tulee tunnistaa suhteessa Identifierviittauksi<strong>in</strong>.3.3.2 AST:n rajoitukset analyso<strong>in</strong>nissaYle<strong>in</strong>en tapa käsitellä kielen rakenteita on tallentaa neAST-muotoon. Siihen liittyy kuitenk<strong>in</strong> paljonk<strong>in</strong>ongelmia analyso<strong>in</strong>titarkoituksessa. AST-rakenteilla e<strong>in</strong>imittä<strong>in</strong> ole yksiselitteistä viittaussemantiikkaa, jonkamukaan voitaisi<strong>in</strong> poimia itsenäisesti evaluoitavaksiyksilöllisiä kood<strong>in</strong> rakenteita esi<strong>in</strong> kuten if-lausemetodista ma<strong>in</strong>. Siten sisempiä AST-rakenteita ei olemahdollista käsitellä ja evaluoida itsenäisesti vaan va<strong>in</strong>osana laajempaa kokonaisuutta. Siksi tarvitaankehittyneempi menetelmä, jota kuvaamme seuraavassa.3.3.2 Kielioppien saatavuus ja ongelmatKielioppeja eri kielille ja myös Javalle on saatavissa<strong>in</strong>ternetistä. Ongelmana on kuitenk<strong>in</strong> kielioppitiedostojenlaatu, erilaiset kirjoitusvariaatiot ja niidentaltio<strong>in</strong>titarkkuus yleisesti, koska osa niistä on pelkästäänperiaatteellisia ja va<strong>in</strong> osa riittävän tarkkoja, että nemahdollistaisivat sellaisenaan parser<strong>in</strong> rakentamisen.Esimerkiksi Sun<strong>in</strong> julkaisema version 3 (Java1.5)kielioppi, joka vastaa uusimman kääntäjän tilannetta jajulkaistaan myös Java 3rd Edition-kirjan mukana, onongelmall<strong>in</strong>en. Si<strong>in</strong>ä on useita virheitä ja lisäksimoniosaisten termien semantiikkaa ei ole kuvattutarkoituksenmukaisesti. Hankal<strong>in</strong>ta on, että Sun<strong>in</strong>ilmoittama kielioppi ei esitä tarkkaan lausekerakenteita,koska si<strong>in</strong>ä kaikilla laskentatoim<strong>in</strong>noilla yhteenlasku,kertolasku, jakolasku ja loogiset vertailut olisivirheellisesti sama prioriteetti ja siten samalaskentajärjestys.Siksi jotta riittävään tarkkuuteen päästäisi<strong>in</strong>, tuleeSun<strong>in</strong> toimittama kielioppi unohtaa kokonaan jaorganisoida kielen rakenteet itse uudelleen ja muuntaa neristiriidattomaan, hierarkisempaan muotoon.Prolog-kielelle on kehitetty edistyneitä kieliop<strong>in</strong>käsittelyn menetelmiä kuten def<strong>in</strong>ite clause grammar(DCG), jossa yksittäisen lausekkeen prioriteetti voidaanilmaista lukuna. Tämä menetelmä soveltuu tulkkaavalleja ISO-st<strong>and</strong>ard<strong>in</strong> mukaiselle Prologille. Tutkimuksenmuka<strong>in</strong>en Visual Prolog-kehit<strong>in</strong> sisältää omanmenetelmän, jota kutsutaan semanttiseksikielioppirakenteeksi, m<strong>in</strong>kä on alkujaan kehittänyt LeoJensen, Prolog Development Center. Alla if-lauseenkuvaus tällä menetelmällä:1 Statement =2 “if” Condition “<strong>the</strong>n” Statement ->3 iff(Condition, Statement).Term<strong>in</strong> nimenä on Statement, jonka yksi mahdoll<strong>in</strong>enmuoto olisi edellä ma<strong>in</strong>ittu if-lause, jonka syntaksisisältää hierakisesti alemmalla tasolla sijaitsevat termitCondition ja Statement. Varattuja sanoja si<strong>in</strong>ä ovatla<strong>in</strong>ausmerkeissä olevat sanat if ja <strong>the</strong>n. Syntaks<strong>in</strong> oikeajärjestys ilmenee ”->” -symbolia edeltävästä osuudesta.Sen oikealla puolella oleva rakenne iff argumentte<strong>in</strong>eenon muotoa, joka syntyy jäsennyksen tuloksena vastaavantyökalun muisti<strong>in</strong>. Iff-rakenne kuvaa siis semantiikkaa,mistä käytämme tässä artikkelissa nimitystä Y. Nä<strong>in</strong>saati<strong>in</strong> ytimekäs kokonaisuus: rivi 1 kertoo määrittelynnimen (N), rivi kaksi kertoo syntaks<strong>in</strong> (X) ja rivi kolmesemantiikan (Y).Jos käytännön tilanteessa asianoma<strong>in</strong>en if-lause eijohda halutulla tavalla sen sisältämän osuudenkäynnistymiseen, vika voi olla va<strong>in</strong> sen Conditionosassa.Tällö<strong>in</strong> tämä ehto olisi vianpaikantajallepragmaattista tietoa (Z).3.3 Kood<strong>in</strong> mallien epistemologiaEpistemologia pyrkii erottamaan todellisen ja riittäväntietämyksen paikkansa pitämättömästä tietämyksestä. Setutkii mm. tiedon luonnetta, tietojen välisiä yhteyksiä.OMG ei erikseen puhu epistemologiasta tutkiessaanmetodologioita ohjelmistokehityksen näkökulmasta,sehän ei edusta tiedettä vaan käytännön päämääriä.Kuitenk<strong>in</strong> kood<strong>in</strong> ja mallien synkrono<strong>in</strong>ti on OMG:n<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 108


päätavoitteita. OMG:n pa<strong>in</strong>opisteenä onmall<strong>in</strong>tamiskokonaisuus nimeltään Model DrivenArchitecture, MDA (MDA 2006), jossa keskeisimpänätietosisältönä on MOF-määrittely (MOF 2006). MOF:ssakood<strong>in</strong>tarkan <strong>in</strong>formaation käsittely osoittautuumahdottomaksi, koska Javan lause-tason <strong>in</strong>formaatiopuuttuu siitä (tos<strong>in</strong> si<strong>in</strong>ä on OCL-rajoitekieli).MOF tarjoaa koodista poimitulle <strong>in</strong>formaatiolleseuraavat mallit ja tasot. Taso M0 eli systeemitaso kuvaakoodia sellaisenaan. Taso M1 eli luokkataso viittaakoodista poimittuun luokkamäärittelyjen rajap<strong>in</strong>taan.Taso M2 viittaa metamalli<strong>in</strong>, jolla määritellään luokkienyleiset rakenteet. Yl<strong>in</strong>nä on taso M3 metametamalli, jokamäärittelee yleisen transformaatiomall<strong>in</strong> läh<strong>in</strong>nämuunnostarkoituksi<strong>in</strong>.Koska MOF ei tue lausetarkkaa käsittelyä, sentarjoama ymmärtämistuki jää suppeaksi. Ni<strong>in</strong>päalimmalle tarkastelutasolle tarjotaan vaihtoehtona ASTrakenteidenavulla muodostettua mallia, mutta si<strong>in</strong>ähänon muutamia perusongelmia, joita on kuvattu tämänartikkel<strong>in</strong> alkuosassa.Seuraavassa jaksossa koodista poimittavissa olevaatietoa käsitellään erillisten teorioiden valossatarkoituksena muodostaa loog<strong>in</strong>en ketju sellaisen eheänmall<strong>in</strong> luomiseksi, joka sisältäisi sekä MOF:n kaltaisenmetariippuvuus<strong>in</strong>formaation että kood<strong>in</strong> tarkanlauserakenne<strong>in</strong>formaation, jotta tulosta voitaisi<strong>in</strong> käyttääyhtenäiseen tarkasteluun.3.3.1 T1 Kood<strong>in</strong> jäsentämisen teoriaKoodista saadaan jäsennyksen tuloksena rakenteet (N),jotka parser<strong>in</strong> jäljiltä ovat yhdessä hierarkisessarakenteessa, jonka juurena on aloitussymboli (S0),esimerkiksi TranslationUnit, joka jakaantuu paket<strong>in</strong> jaluokan määrittelyih<strong>in</strong>.Prologilla jäsennetty pars<strong>in</strong>tapuu (hierark<strong>in</strong>enkokonaisuus) on predikaattilogiikan (1. kertaluvunlogiikka) mukaisesti täydellisesti aksiomatisoitavissa.Pars<strong>in</strong>ta on täydell<strong>in</strong>en ja todistettavissa, jos kuk<strong>in</strong>rakenne säilyttää alkuperäisen muodon ja riittävän tarkan<strong>in</strong>formaation (koherenttius ja konsistenssius).3.3.2 T2 Abstraktiotason nosto, symbol<strong>in</strong>en kieliLaskentasääntö<strong>in</strong>een ja sisäkkäis<strong>in</strong>e lause<strong>in</strong>een Javastasaadut rakenteet ovat tarpeettoman monimutkaisiasellaisenaan analysoitaviksi. Kun rakenne on kerranjäsennetty oike<strong>in</strong>, sitä voidaan merkittävästi (no<strong>in</strong> 90 %)yks<strong>in</strong>kertaistaa pudottamalla sisäkkäisiä itsestään selviävälitasoja ilman, että uusi sisältö vääristyy tai muuttuuepäloogiseksi.Jatkoanalyso<strong>in</strong>n<strong>in</strong> kannalta tärkeää on ryhmitellärakenteet mahdollisimman hyv<strong>in</strong>. Analyso<strong>in</strong>titarpeitaovat mm. seuraavien rakenteiden tunnistam<strong>in</strong>en, suluissajatkossa käytetty lyhenne: määrittelylauseet (def),konstruktorikomennot (creator), dataa muuttavatrakenteet (set), dataan viittaavat rakenteet (ref),metodiviittaukset (<strong>in</strong>voke, get), operaatiot (op),silmukkalauseet (loop), ehdolliset lauseet (path,condition), vakiot (value) ja muut lauseet. Nä<strong>in</strong> saadaan11 lauseryhmää.Tällä ryhmittelyllä päästään seuraavaan tavoitteeseen.Eri analyysit voidaan määritellä abstraktien rakenteidenvälis<strong>in</strong>ä yhteyks<strong>in</strong>ä, esimerkiksi data flow – analyysi onsaman datan set- ja ref-rakenteiden väl<strong>in</strong>enkeruutoim<strong>in</strong>to. Ohjausvuo on valitusta kood<strong>in</strong>osastakoottu get- ja creator-lauseiden kokonaisuus, joka käyläpi muiden lauseiden tarvittavat alarakenteet.Ryhmittelylogiikasta voidaan muodostaa uusisymbol<strong>in</strong>en kieli, jolle tutkimuksessa on annettu nimiSymbolic. Kuten jokaisella formaalilla kielellä, myösSymbolicilla voi olla oma syntaksi ja semantiikka. Nä<strong>in</strong>ollen sille voidaan luoda jäsenn<strong>in</strong> ja koodigeneraattori,joista on hyötyä muunnettaessa abstrahoituja rakenteitalukijan paremm<strong>in</strong> ymmärtämään muotoon tai tarvittaessaluoda sujuva testausympäristö analyso<strong>in</strong>tikokoonpanollealkuarvojen syöttömahdollisuuks<strong>in</strong>een.Jos Java-kielen keske<strong>in</strong>en lause on nimeltäänStatement, voisii sitä vastaava korkeamman tasonrakenne Symbolic-kielessä olla Clause. Nä<strong>in</strong> saadaantranslaatiotarve Statement2Clause, jota kuvataank<strong>in</strong>seuraavassa.3.3.3 T3 TranslaatioFormaalien kielten translaatioon on kehitetty erillisiämonimutkaisia menetelmiä, jotka perustuvat use<strong>in</strong>m<strong>in</strong>ulkoiseen translaatiomekanismi<strong>in</strong> (translation eng<strong>in</strong>e).Mielenki<strong>in</strong>toista on, että translaatio voidaan tehdä myös”suoraan” ilman erillistä sääntölogiikkaa rekursiivisensijoittamisen avulla. Prolog tukee tällaista vaihtoehtoatunnistaessaan automaattisesti kielen rakenteet. Tällö<strong>in</strong>aivan tavall<strong>in</strong>en sijoituslause käy translaatioksi.Seuraava rekursiiv<strong>in</strong>en xslate-komento muuttaa Javakielenif-lauseen Symbolisen kielen path-lauseeksi:xlate(iff(Condition,Statement)) =path(xlate(Condition),xlate(Statement)).Olennaista ylläolevassa komennossa on se, ettävasemman puolen suluissa on muunnettava Java-termi jayhtäsuuruus-merk<strong>in</strong> jälkeen Symbolic-kieleen syntyvärakenne. Koska jokaisen alarakenteen yhteydessäkutsutaan alas laskeutuen uudelleen translaatiokomentoa,kaikki alarakenteet muuntuvat automaattisesti uuteenmuotoon. Translaation suorittamiseksi jokaiselleerilaiselle Javan termille tarvitaan yleensä va<strong>in</strong> yksiedelläma<strong>in</strong>itun kalta<strong>in</strong>en sijoituslause. On va<strong>in</strong> muutamapoikkeus.Siirto Javasta symboliseen kieleen(Statement2Clause) voidaan validoida analyyttisesti109


translaatiolausekkeiden kautta sekä testitulosteilla.Lisäksi Visual Prolog sisältää tyyp<strong>in</strong>tarkistustoim<strong>in</strong>non,joka tarvittaessa varmistaa, että kuk<strong>in</strong> alalauseke onkattavasti määritelty. Se poistaa oike<strong>in</strong> käytettynäpuutteet muunnoksen kattavuudessa.3.3.4 T4 Semantiikan talteenottoOhjelmo<strong>in</strong>tikielten semantiikan ilmaisemiseen on useitaesitystapoja eli notaatioita. Merkittävimpiä ovattoim<strong>in</strong>nall<strong>in</strong>en semantiikka (operational semantics). Erässen muoto, luonnoll<strong>in</strong>en semantiikka (natural semantics),on Prolog<strong>in</strong> kannalta merkittävä, koska se on Prologyhteensopiva.Siten joka<strong>in</strong>en luonnollisen semantiikanlause voidaan periaatteessa ohjelmoida Prolog-lauseiksi.Myös Prolog-lauseita voidaan tiety<strong>in</strong> edellytyks<strong>in</strong>muuntaa luonnollisen semantiikan esitystapaan, jollo<strong>in</strong>sitä voidaan käyttää kuvaamaan Prolog-kood<strong>in</strong>käyttäytymistä alkuperäistä korkeammalla tasolla.Luonnoll<strong>in</strong>en semantiikka tarjoaa seuraavia etujaper<strong>in</strong>teisempi<strong>in</strong> semantiikkoih<strong>in</strong> nähden:Kaikki sen oliot ovat äärellisiä termejä, jotenrakenteen käsittelyyn ei tarvita monimutkaistatyyppiteoriaa.Koska jokaiselle rakenteelle voidaan määritelläuseita päättelysääntöjä, sillä voidaan mall<strong>in</strong>taa myösepädeterm<strong>in</strong>ististä hakua, joka on Prolog<strong>in</strong> parhaitaom<strong>in</strong>aisuuksia.Epädeterm<strong>in</strong>isit<strong>in</strong>en määrittely mahdollistaapolymorphististen rakenteiden mall<strong>in</strong>tamisen.Luonnolisen kielen semantiikan yle<strong>in</strong>en lausemuoto onseuraava:Kuva 2. Luonnollisen semantiikan periaate.Kuvassa 2 alarivillä on todistettava lauseke, joka sisältäähypotees<strong>in</strong> H, johon liittyy parametrikokonaisuus T jatavoitetulos R. Se ratkeaa, jos ylemmällä rivillä olevahypoteesi H1 argumente<strong>in</strong> T1 ratkeaa tuottaen tuloksenR1, joka edelleen mahdollistaa muiden hypoteesien H2… Hn toteutumisen. Lopull<strong>in</strong>en tulosjoukko R onkomb<strong>in</strong>aatio ehdollisten hypoteesien tuottamastatulosjoukosta. Tämä lauseke toteutuu va<strong>in</strong> jos ehto condtoteutuu myös.Prolog sallii predikaatte<strong>in</strong>een tällaisen lauseenkirjoittamisen. Visual Prolog erityisesti sisältääoliojärjestelmän, joka myös soveltuu sekä ylläolevienhypoteesien ohjelmo<strong>in</strong>ti<strong>in</strong> että kood<strong>in</strong> muuttamiseenvastaavanlaisiksi hypoteesimäärittelyiksi. Alla pieniesimerkki, jossa hypoteesit on muutettu predikaateiksi:h(T, Cond) = R:-ifTrue(Cond),R1 = h1(T1), … Rn=hn(Tn),Result = [R1,R2,… Rn].Predikaatti ifTrue tarkistaa aluksi onko ehto Condvoimassa. Jos on, siirrytään h-predikaattien evaluo<strong>in</strong>ti<strong>in</strong>.Seuraavassa esimerkissä hypoteesit ovat oliota (tässätutkimuksessa symbolisen mall<strong>in</strong> elementtejä):evaluate(T, Cond) = R:-ifTrue(Cond),R1 = H1:evaluate(T1),…Rn = Hn:evaluate(Tn),R = [R1, … Rn].Esimerk<strong>in</strong> selostus: Visual Prologissa suoratdataviittaukset voivat kohdistua va<strong>in</strong> ko. olion sisälle. Seestää haitalliset sivuvaikutukset. Jokaisella oliolla tuleeolla metodi evaluate, joka laskee oman tuloksensa (R i )rekursiivisesti.Ohjelmo<strong>in</strong>tikielten semantiikassa keskeisiä asioitaovat seuraavat asiat: Dataviittausten huomio<strong>in</strong>ti Metodikutsujen huomio<strong>in</strong>ti parametre<strong>in</strong>een Polymorphististen metodien huomio<strong>in</strong>ti Per<strong>in</strong>tähierarkian huomio<strong>in</strong>tiKirjallisuutta semantiikan rajoitteista ja erityisesti Javakood<strong>in</strong>semantiikasta on runsaasti. Javan spesifikaatiosisältää täsmälliset määrittelyt kielensä piirteistä edelläma<strong>in</strong>itut asiat huomioiden.Symboliseen malli<strong>in</strong> nämä ylläma<strong>in</strong>itut asiat saadaantoteutettua siten, että alkuperä<strong>in</strong>en Javan rakenne javiittaus siihen korvataan joko mallia luotaessa tai mallialäpikäytäessä alkuperäistä laajemmalla rakenteella(tyypillisesti oma haku- metodi lookUp), joka suorittaatäsmällisemmän ja yleisemmän identifio<strong>in</strong>n<strong>in</strong> rakenteelle.Esimerkiksi symboli port saattaa olla sekä metod<strong>in</strong>argumentt<strong>in</strong>a, muuttujana ja myös luokan attribuutt<strong>in</strong>a.Siten eri metodeissa sama muuttujanimi viittaa eri asiaan.Tätä kutsutaan alias-ilmiöksi. Sen vuoksi metodikutsuissatuloargumentit ja parametrit on saatavavastaamaan toisiaan.Semantiikkateorian T4 tarkoituksena on varmistaa,että mall<strong>in</strong>läpikäyntialgoritmi voi toimia eri tilanteissasamaan tapaan ku<strong>in</strong> alkuperä<strong>in</strong>en Java-koodi tunnistenvastaavat rakenteet. Se tulkitsee siten kood<strong>in</strong>käyttäytymistä ohjelmoijan eduksi. Ohjelmoijan kiusanaon ns. jojo-ilmiö, jossa kutsuttua oliorakennettajoudutaan etsimään laajalti olion per<strong>in</strong>tähierarkiasta.Semantiikkateorian tuloksena saadaan kerättyä UML:nsekvenssikaavion mukaiset tiedot, mutta tarkempanasisältäen kaikki lausekkeet ja eri suoritusvariaatiot.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 110


3.3.5 T5 Symbol<strong>in</strong>en malli ja mall<strong>in</strong> kutojaErilaisia malleja ja mallienluontimekanismeja (modelweaver) on kehitetty runsaasti mm. OMG:n toimesta(Bezev<strong>in</strong> 2005). OMG on verrannut erilaistenmalliratkaisujen om<strong>in</strong>aisuuksia seuraavasti. Tärkeitävertailtavia piirteitä ovat modulaarisuus, muunnettavuus,jäljitettävyys, formalisoitavuus, kood<strong>in</strong> suoritettavuus,aspektien poim<strong>in</strong>nan mahdollisuus ja ratkaisunerikoistamisen mahdollisuudet. MOF-mallien keske<strong>in</strong>enheikkous on assosiaatioiden käsittelyssä. Koskaoliomallit voivat itsessään käyttää va<strong>in</strong> olioita, joidenheikkoutena on suljettu sisä<strong>in</strong>en rakenne, MOF-malleissajoudutaan joka<strong>in</strong>en assosiaatio pilkkomaan useiksiolioiksi (kuten association, associationEnd, l<strong>in</strong>k jal<strong>in</strong>kEnd). Pilkkomisen takia mallien läpikäynti vaatiipaljon ohjelmo<strong>in</strong>tia ja monimutkaisia algoritmeja.Takais<strong>in</strong>mall<strong>in</strong>tamisen kannalta tärkeimpiä mallienpiirteitä ovat modulaarisuus, muunnettavuus,jäljitettävyys, formalisoitavuus ja suoritettavuus. OMGtoteaa, että MDA:lla ei voida tuottaa suoritettavaa mallia,vaikkak<strong>in</strong> ”executable uml” on paljon käytetty käsite.Sen sijaan äskeisten teorioiden T1-T4 mukaan kehitettymalli on simuloitavissa eli mall<strong>in</strong>nettavissa ni<strong>in</strong> pitkälle,että myös kood<strong>in</strong> sivuvaikutukset voidaan analysoida.Samalla simulo<strong>in</strong>nista saadaan tuloksena jälki (trace),joka vastaa dynaamisen analyys<strong>in</strong> tulosjoukkoa.Symbol<strong>in</strong>en malli on formalisoitavissa tarkkaan jamuutettavissa myös MDA-malleiksi ns. xmi-esitystavanavulla (XMI 2005).Symbolisen mall<strong>in</strong> keskeis<strong>in</strong> ja lähes a<strong>in</strong>oa rakenneon symbol<strong>in</strong>en elementti (SE), jolla on optimoituper<strong>in</strong>tähierarkia. Se periytyy Symbolic-nimisestäluokasta, joka sisältää teorian T2 mukaiset määritelmät,parser<strong>in</strong> ja koodigeneraattor<strong>in</strong>. Eri tyyppiset elementit,jotka kuvatti<strong>in</strong> teorian T2 yhteydessä, toteutetaanperuselement<strong>in</strong> SE erikoistuks<strong>in</strong>a. Kunk<strong>in</strong> element<strong>in</strong>muisti<strong>in</strong> tallennetaan siihen kuuluva koodi, joka onluontivaiheessa muuntamalla teorian T3 mukaiset T2:nrakenteet omiksi elementeikseen ja prosessoimalla saatukoodi vielä teorian T4 mukaisesti. Nä<strong>in</strong> saadaan aikaanatomist<strong>in</strong>en malli.3.3.6 T6 Selektiiv<strong>in</strong>en kyselyTunnetu<strong>in</strong> kood<strong>in</strong> tarkastelun menetelmä on nimeltäänviipalo<strong>in</strong>ti (slic<strong>in</strong>g). Se tuottaa tietystä kood<strong>in</strong> osastasiihen suoranaisesti liittyvät muut ohjelmalauseetsuoritusjärjestyksessä joko taakse- tai eteenpä<strong>in</strong>.Viipalo<strong>in</strong>ti<strong>in</strong> liittyy kuitenk<strong>in</strong> paljon rajoituksia ja sesoveltuu va<strong>in</strong> kood<strong>in</strong> matalan tason tarkasteluun. Siksiolemme val<strong>in</strong>neet paremman perusmenetelmän, joka onnimeltään leikkely eli chopp<strong>in</strong>g.Chopp<strong>in</strong>g on tärkeä analyso<strong>in</strong>tike<strong>in</strong>o, joka tarkoittaahaluttujen kohteiden saavutettavuuden tutkimista. Se käyer<strong>in</strong>omaisesti syy-seuraussuhteiden käsittelyyn, joka onolennaista vianpaikannustehtävissä. Chopp<strong>in</strong>g pyrkiianalysoimaan kuvan 3 mukaan perättäistenfunktiokutsujen joukkoja, jotka alkavat tietystä Startkohdastaja etenevät aikajärjestyksessä Target-kohtaansaakka:Start = fk • fk-1 • ... •f • Target.Chopp<strong>in</strong>g-yhtälö voidaan ilmaista monella eri tavallasymbolista notaatiota käyttäen. Ilmaisu lopusta alkuun onmuotoa:Target = fk • fk-1 • ... •f (Start).Sisäkkäisessä muodossa se voidaan kirjoittaa:Target = f (f (f ( ... f( Start ) ) ) )Tai peräkkäisessä muodossa listana:Target = [f(XK), f(XK-1).. f(“Start”)].Chopp<strong>in</strong>g-analyys<strong>in</strong> ohjelmo<strong>in</strong>ti Prologilla onselväpiirteistä. Seuraava koodi sisältää rekursiivisensäännön, joka kerää <strong>in</strong>formaatiota seuraavilta perättäisiltäsolmuilta, jotka on määritelty f-rakente<strong>in</strong>a sisältäenkunk<strong>in</strong> funktion nimen ja vastaavat argumentit. Tuloksetsaadaan kumulatiivisesti kerättyä predikaat<strong>in</strong> toiseenargumentti<strong>in</strong> Sequence-muuttujan välityksellä:chopp<strong>in</strong>g (Target, [f(This)|Sequence]):-f(NextId,Arguments),NextId:chopp<strong>in</strong>g(Target,Sequence).Cstartf 1 f 2call q f k 1 f kstart qf 4f 3ret( )f 5f k 2exit qf k 3targetKuva 3. Chopp<strong>in</strong>g ohjausvuon tulk<strong>in</strong>nassa.3.3.7 T7 Tyhjentävä haku ongelman ratkaisijanaPer<strong>in</strong>te<strong>in</strong>en kood<strong>in</strong> analyso<strong>in</strong>ti tarkastelee tyypillisestiohjelman lauseiden välisiä suhteita sellaisenaan [Slic<strong>in</strong>g,Reps] ilman korkeamman abstraktion malleja. Tarkkakäsittely johtaa use<strong>in</strong> laskennallisesti liian vaativi<strong>in</strong>algoritmeih<strong>in</strong>, jos aluetta ei voida rajata tarpeeksi.Äsken kuvaamamme selektiiv<strong>in</strong>en kysely, chopp<strong>in</strong>g, sensijaan tuottaa suppean tietoa<strong>in</strong>eiston, joukon mall<strong>in</strong>elementtejä, jota voidaan käsitellä mon<strong>in</strong> eri tavo<strong>in</strong>tyhjentävästi mm. tarkastelemalla eri suorituspolkuvaihtoehtoja,datan kulkua ja sivuvaikutuksia jamahdollisia aktivo<strong>in</strong>teja eri tilanteissa.Yhden metod<strong>in</strong> osalta kaikki Penn<strong>in</strong>gton<strong>in</strong>tietotarpeet voidaan a<strong>in</strong>a poikkeuksetta poimiatäydellisesti siten, että tuntemattomat parametritkäsitellään viittauks<strong>in</strong>a. Mikä tahansa suorituspolkuvoidaan myös evaluoida yhtenä kokonaisuutena, jollo<strong>in</strong>voidaan tutkia pienimpiä ilmiöitä koodista.111


Ohjelmasilmukoiden käsittely on silti ongelmallista, jossuorituskertoja tulee lukemattomia. Si<strong>in</strong>ä tapauksessatoistokertoja on voitava rajoittaa. Samo<strong>in</strong> ulkoistenrajap<strong>in</strong>tojen tulkitsem<strong>in</strong>en ehtolausekkeissa vaatiialkujärjestelyjä ennen testausta.3.3.8 T8 Javan täydell<strong>in</strong>en relaatiomalliJavaa ja sen koodista kehitettyä symbolista malliatarkastellaan järjestelmällisimm<strong>in</strong> sitä vartensuunnitellun, yhtenäisen relaatiorajap<strong>in</strong>nan kautta. Nä<strong>in</strong>voidaan tunnistaa tärkeimmät käsitteet (entity) ja niidenväliset suhteet (relation), mikä tuottaa kelvollista tietoavianpaikannukseen. Relaatiomalli sisältää seuraavatperusmääritykset, joiden välisiä relaatioita on mahdollistatutkia: Luokan nimi, class Luokan jäsenet Luokan super-luokka Metod<strong>in</strong> sisä ltämät elementit Metod<strong>in</strong> sisältämät staattiset kutsut Metod<strong>in</strong> suorittamat dynaamiset kutsut Kuhunk<strong>in</strong> elementti<strong>in</strong> liittyvät navigo<strong>in</strong>titiedot. Kuhunk<strong>in</strong> elementti<strong>in</strong> liittyvät sivuvaikutukset JäljityshistoriaKun kood<strong>in</strong> yksittäiset rakenteet saadaan nä<strong>in</strong>yksittäisillä kyselyillä hall<strong>in</strong>taan, tarkastelua voidaanlaajentaa käyttämällä kyselyjen välillä loogisiaoperaatioita ja alakyselyjä.3.3.9 T9 SelitysmalliTietämysteknisesti tarkasteltuna kood<strong>in</strong> <strong>in</strong>formaatio onmielenki<strong>in</strong>toista. Halutessamme kysyä syyseuraussuhteita,koodista saadaan läpikäyntialgoritmillaloogiset ehdot ja rakenteet, jotka vaikuttavat kyseiseentarkasteluväli<strong>in</strong>. Saatujen symbolisten rakenteiden joukkovoidaan muuntaa luonnolliselle kielelle, esimerkiksienglanniksi, jollo<strong>in</strong> saadaan selväkiel<strong>in</strong>en perusteluketjutarvittav<strong>in</strong>e parametre<strong>in</strong>een.Yhteistä kaikelle käsittelylle on se, että saaduntulos<strong>in</strong>formaation muoto on a<strong>in</strong>a sama kyselystäriippumatta. Se helpottaa ohjelmo<strong>in</strong>tia ja toteutusta jatulosten <strong>in</strong>tegro<strong>in</strong>tia. Tulos<strong>in</strong>formaatiolle voidaan valitaerilaisia tulosteita ja tarkastelutapoja kuten what, why taihow, jollo<strong>in</strong> näytölle syntyvä a<strong>in</strong>eisto saadaanvastaamaan parhaiten käyttäjän tekemää kyselyä.Tulostuksessa voidaan toki käyttää myös luonnollistasemantiikkaa ja sen esitysasua, mutta se on ohjelmoijillevieraampi.3.3.10 T10 Pragmaattisen tulk<strong>in</strong>nan teoriaYlläpito sisältää paljon erilaisia tehtäviä ja alatehtäviä,joissa kood<strong>in</strong> tarkastelu on tarpeen. Aiheen laajuudenjohdosta sitä käsitellään tässä kohdassa va<strong>in</strong> muutam<strong>in</strong>esimerke<strong>in</strong> Penn<strong>in</strong>gton<strong>in</strong> tietotarvemäärittelyn pohjalta: Joka<strong>in</strong>en työkalun tuotos, joka johdattaa käyttäjäävianpaikannustehtävässä ja supistaa alkuperäistä<strong>in</strong>formaatiojoukkoa, on pragmaattista <strong>in</strong>formaatiota. Joka<strong>in</strong>en perehtymistilanteessa käyttäjälle tuotettuvastaus kysymyksi<strong>in</strong> what, why ja how, onpragmaattista <strong>in</strong>formaatiota. Joka<strong>in</strong>en syy-seuraussuhdetta erittelevä haku, jokaon kohdistettu vian määritykseen, tuottaapragmaattista vian rajauksen <strong>in</strong>formaatiota. Joka<strong>in</strong>en metod<strong>in</strong> suorituspolkujen hahmottamiseenliittyvä kokonaisuus palvelee vianhaun tarpeitatutkittaessa ohjelman pysähtyvyysongelmia. Joka<strong>in</strong>en kriittisen kuuntelijaolion tiloih<strong>in</strong> liittyväkysely tuottaa pragmaattista <strong>in</strong>formaatiota.Teknologiamielessä pragmaattisen <strong>in</strong>formaationtarkastelu vaatii käyttäjän tarpeiden tunnistamista jametodologian sovittamista niih<strong>in</strong>. Saatu tietämys onkuitenk<strong>in</strong> arvokasta, sillä se palvelee kiireistä käyttäjäähänen jokapäiväisessä työssään sellaisenaan.4 MetodologiaEdellä kuvattu ontologia ja tietämyksen määrittely eriteoria-alue<strong>in</strong>een toimivat lähtötieto<strong>in</strong>a metodologiantarkastelulle.4.1 Metodologian toteutusSeuraavassa esityksessä Peircen semioottista käsitteistöä,jonka muodostavat merkki (sign), kohde (object) jalogiikalla toteutettava tulk<strong>in</strong>ta (<strong>in</strong>terpretant, logic L),lähestytään symbolista alkaen. Yhdistämällä nämäkäsitteet saadaan hahmoteltua kokonaisuus SOL. Malli(M) määritellään yks<strong>in</strong>kertaisesti säiliöksi, joka sisältäämalli<strong>in</strong> luodut oliot. Mall<strong>in</strong> analyso<strong>in</strong>ti (A) tapahtuukyselyiden (Q, Query) avulla oliorajap<strong>in</strong>nan kautta.4.1.1 Symbol<strong>in</strong> toteutus (S)Kieliopista saadaan suoraan kaikki symbolit, jotkaviittaavat lähdekood<strong>in</strong> muuttuji<strong>in</strong>. Niitä ovat luokan nimi,metodi, attribuutti ja muuttujanimet. Kood<strong>in</strong> tarkasteluuntämä metoditarkkuus ei vielä riitä, koska kun saatuasymbolista mallia halutaan tutkia esimerkiksivianpaikannuksen tarkoituksessa, tarvitaan suorituspoluntarkkuus ja sen toteuttamiseen suorituspolkuelementti.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 112


Jos erityisesti käyttäytymismalli ja elementtienvaikutukset ki<strong>in</strong>nostavat, tarvitaan lisäksisivuvaikutuselementti, joka tallentaa kunk<strong>in</strong> element<strong>in</strong>suorittamat ulkoiset muutokset.Symboli tarkoittaa siis symbolisessa mallissakäsitettä, joka voi olla Käyttäjän antama alkuperä<strong>in</strong>en symboli Suorituspolkuun viittava symboli Sivuvaikutukseen viittaava symboliSymboli on käytännössä vastaavaan työkaluun luotuviittaus vastaavaan olioon, joka voidaan tulostaa javisualisoida eri tavo<strong>in</strong> sen sisällön ja tulk<strong>in</strong>nan mukaan.Kun käyttäjä napauttaa symbol<strong>in</strong> kuvaketta näytöllä hänpääsee kaikki<strong>in</strong> sitä vastaavan olion om<strong>in</strong>aisuuksi<strong>in</strong>käsiksi, jollo<strong>in</strong> saadaan aikaan semantt<strong>in</strong>enkäyttöliittymä. Symboli on siis esittämisen,kommunikaation ja ohjauksen väl<strong>in</strong>e.4.1.2 Objekt<strong>in</strong> toteutus (O)Määrittelynsä mukaan oliojärjestelmän olio ja luokkasisältävät abstraho<strong>in</strong>tia, yleistämistä ja erikoistamistatukevia piirteitä. Ne kaikki ovat hyödyllisiä lähdekood<strong>in</strong>analyso<strong>in</strong>nissa ja soveltuvat Peiren semiotiikkaanseuraavasti: Abstraho<strong>in</strong>nilla voimme luoda käsiterakenteita, jotkaovat kaikkien analyysien kannalta yhteisiä ja kehittäänä<strong>in</strong> mahdollisimman teoreettista yhteistä mallia. Yleistämisellä voimme määritellä yhdenmukaisenolion työkalun luokkana. Tässä sitä kutsutaansymboliseksi elementiksi, symbolicElement. Sepystyy mall<strong>in</strong>tamaan kaikkia ohjelman rakenteita,koska kaikilla rakenteilla on merkittävä määräyhteisiä piirteitä.Voimme luoda riittävän tarkkoja erikoistettujaolioita symbolicn alaluokk<strong>in</strong>a siten, että nejakaantuvat teorian T2 ryhmittelyn mukaan. Voimme periyttää kaikki oliot superluokastasymbolic , joka sisältää symbolisen kielenmäärittelyt. Nä<strong>in</strong> kaikkien olioiden välille saadaanaikaan symbol<strong>in</strong>en kieli ja sen täydell<strong>in</strong>en tuki.Ohjelmistokehitystasolla keskeis<strong>in</strong> olio, symbol<strong>in</strong>enelementti, toteuttaa kaikki tarvittavat piirteet rajap<strong>in</strong>tojenansiosta. Se periytyy symbolic-luokasta kuten edelläma<strong>in</strong>itti<strong>in</strong> ja sitä käyttävät super-luokkana kaikkisymbolisen kielen tyyppirakenteet.Puhdas oliomalli ei kuitenkaan sellaisenaan riitäolioiden esittämiseen, koska kapselo<strong>in</strong>ti rajoittaisitiedonsaantia olioiden välillä ja tekisi mall<strong>in</strong>assosiaatioiden läpikäyntialgortmien rakentamisen hyv<strong>in</strong>vaikeaksi, koettaisi<strong>in</strong> samat ongelmat ku<strong>in</strong> xmi-malleissa.Siksi tarvitaan täydentävä ohjelmo<strong>in</strong>tiparadigma,logiikka, jota kuvataan seuraavassa.4.1.3 Tulk<strong>in</strong>nan toteutus, logiikka (L)Olion sisäiset tiedon tallennukset suoritetaan logiikankautta predikaatte<strong>in</strong>a ja fakto<strong>in</strong>a. Oliot muodostavatkeskenään navigo<strong>in</strong>tia tukevan kaksisuuntaisenverkoston, joka saadaan aikaan child- ja parent- sekänext- ja previous-faktoilla. Element<strong>in</strong> sisältämä kooditallentuu contents-nimiseen faktaan, joka on käytännössäsymbolisen kielen rakenne, Clause.Mall<strong>in</strong> läpikäyntialgoritmit käyttävät hyväkseen jokonavigo<strong>in</strong>tifaktoja tai contents-faktan sisältöä.Prolog<strong>in</strong> päättelykone tarjoaa tukea läpikäynn<strong>in</strong>ohjelmoimiseen. Nä<strong>in</strong> saadaan aikaan traverse-toim<strong>in</strong>to.Mall<strong>in</strong> suorittamiseen tarvitaan run-toim<strong>in</strong>to, jokapalauttaa oletuksena symbolisen kielen lauseita.4.1.4 Mall<strong>in</strong> toteutus (M)Yleistä symbolista mallia voidaan luonnehtia seuraavallamäärittelyllä:model(L, B, T, F),jossa L (layers) on tarvittavien mall<strong>in</strong> kerrosten määrä, B(bases) on tarvittavien erilaisten superluokkien määrä, T(types) on ratkaisun erilaisten tietotyyppien määrä ja F(features) on sellaisten funktioiden (piirteiden) määrä,jotka voidaan toteuttaa symbolisella elementillä.Ylläolevasta tarkastelusta voimme päätellä seuraavaa: L on 1, koska tarvitaan va<strong>in</strong> 1 kerros, joka sisältääkaiken <strong>in</strong>formaation. B on 1, koska kaikki oliot periytyvät symbolisestaelementistä, joka edelleen periytyy symbolisenkielen määrittelystä.T on 11, koska symbolisen kielen rakenteeseenliittyy 11 perustyyppiä. Mallilla toteuttavien piirteiden määrä, F, onperiaatteessa ääretön, koska symboliselle mallillevoidaan ohjelmoida lukemattomia erilaisiakäsittelijöitä eri tarkoituksi<strong>in</strong>, mm. vastaamaankyselyih<strong>in</strong>.Edelliseen verrattuna MDA-mallit ovat huomattavastimonimutkaisempia, mutta silti heikompiaom<strong>in</strong>aisuuksiltaan ja laajennettavuudeltaan.Tyypillisimmät mall<strong>in</strong> toim<strong>in</strong>not ovat seuraavat: Build rakentaa mall<strong>in</strong> ja sen oliot Traverse käy mall<strong>in</strong> sisältöä läpi tiety<strong>in</strong> oletuks<strong>in</strong> Chop hakee kahden metod<strong>in</strong> väli<strong>in</strong> kutsuhierarkiassasijoittuvan metodien joukon. Run ajaa (simuloi) koodia halutusta kohdasta lähtien. Reset poistaa oliot muistista.4.1. 5 Analyys<strong>in</strong> toteutus (A)Edellä ma<strong>in</strong>itti<strong>in</strong> mall<strong>in</strong> ja oliorajap<strong>in</strong>nan keskeisimpiäpiirteitä. Ohjelmistoteknisesti analyysi on kuuntelija113


(observer), joka mall<strong>in</strong> käsittelyn käynnistyttyä jääodottamaan dataa. Analyys<strong>in</strong> parametrit määrittelevätmistä piirteestä kullo<strong>in</strong>k<strong>in</strong> on kysymys. Tulokset saadaansymbolisen kielen muodossa.4.1.6 Kysely eli Query (Q)Kuten edellä kerrotti<strong>in</strong>, tarkastelun tarpeilla onkysymysten kautta yhteys hypoteeseih<strong>in</strong>, joista edelleenon yhteys kyselyih<strong>in</strong>. Vastaus kysymyksi<strong>in</strong> what, why jahow saadaan joukkona symbolisen kielen rakenteita,jotka voidaan edelleen muuntaa kaavioiksi, näytöksi,tekstiksi tai xmi-muotoon siirrettäväksi muih<strong>in</strong>kehitysväl<strong>in</strong>eisi<strong>in</strong>.Tyypill<strong>in</strong>en kysely liittyy ongelman rajaukseen jaantaa tuloksena joukon elementtejä, joita epäillään. Näitäkutsumme ehdokkaiksi, vikaehdokkaiksi. Kun käyttäjäsaa näkyville listan vikaehdokkaista, hän voi valitasopivan etenemistavan navigo<strong>in</strong>ti<strong>in</strong> ongelman ratkaisuntäsmentämiseksi.4.2 Yhteenveto metodologiastaSymbolisen mall<strong>in</strong> rakentamiseen ja hyödyntämiseentarvitaan seuraava teoriakokonaisuus:T1 Java - kood<strong>in</strong> lukemiseen pars<strong>in</strong>tapuuksiT2 Uusi abstraktiotaso pars<strong>in</strong>tapuulleT3 Translaatio symboliseen kieleenT4 Javan semantiikan siirto malli<strong>in</strong>T5 Mall<strong>in</strong> kutoja luomaan yhtenäisen a<strong>in</strong>eistonT6 Suppea kyselyjärjestelmä alkurajaukseenT7 Laajat kyselyt suorituspolkujen analyso<strong>in</strong>ti<strong>in</strong>T8 Kohdekielen ja mall<strong>in</strong> relaatiomalliT9 Selittämisen teoriat muuntamaan tulokset logiikaksiT10 Teoriat pragmaattisen <strong>in</strong>formaation tuottamiseen5 Ylläpitotehtävän suorittam<strong>in</strong>enTutkimusrajauksessa tulotietona toimii ylläpitoon luotutehtävä, jota kutsutaan muutosvaatimukseksi (ChangeRequest, CR). Tällö<strong>in</strong> kyseessä on ongelma taiparannusehdotus tai perehtymistarve.Seuraava proseduuri pyrkii luomaan toimivanyhteyden ylläpitotehtävän ja symbolisen mall<strong>in</strong> kyselynvälille.5.1 YlläpitometodiYlläpitotehtävän kulkua kuvataan seuraavassa lyhyenkirja<strong>in</strong>yhdistelmän TPHQ avulla.5.1.1 Task (T)Ylläpitotehtävän käsittelyä hajautetussa ohjelmistotyössäon kuvannut Walenste<strong>in</strong> (2002) RODS-käsitteistöllään,joka esittää ku<strong>in</strong>ka tehtävän suoritus pyritäänm<strong>in</strong>imoimaan, ku<strong>in</strong>ka suoritusalgoritmi halutaanoptimoida, ku<strong>in</strong>ka tehtävän eri osat jaetaan useilletekijöille ja ku<strong>in</strong>ka erikoistuneita asiantuntijoita pyritäänkäyttämään tehtävän osien suorittamiseen. Jos tehtävä eiole triviaali, se alkuvalmistelujen jälkeen muuttuuprosessiksi, josta kerrotaan seuraavaksi.5.1.2 Prosessi (P)Prosess<strong>in</strong> tarkoituksena on ratkaista monivaihe<strong>in</strong>enongelma, joka vaatii useita erillisiä toimenpiteitä. Kood<strong>in</strong>tarkastelun välivaiheita on tutk<strong>in</strong>ut mm. von Mayrhauser(1992). Ihm<strong>in</strong>en ajattelee tällaisessa tilanteessakysymysten ja vastausten kautta. Letovsky (1983) onkuvannut ylläpitoon liittyviä kysymyksiä luokittelulla :what, why ja how. Käyttäjä haluaa selvittää mitä jok<strong>in</strong>kood<strong>in</strong> osa tekee (what), miksi se suorittaa tiettyjätoim<strong>in</strong>toja (why) ja ku<strong>in</strong>ka se toimii (how). Koska nämätiedot eivät selviä lukematta koodia, hän joutuu arvamaanja tekemään olettamuksia. Nä<strong>in</strong> hän tulee luoneeksihypoteeseja.5.1.3 Hypoteesi (H)Hypoteeseilla käyttäjä todistaa toimiiko esimerkiksiServer-luokka ni<strong>in</strong> ku<strong>in</strong> hän oletti. Jos se toimii, hän voikehittää hypotees<strong>in</strong> pyrkien todistamaan sen oikeaksi taivääräksi. Lopull<strong>in</strong>en päätelmä voidaan tehdä kunhypoteeseista on saatu riittäviä tuloksia. Vaikka tälla<strong>in</strong>enhypoteesien käsittelyn prosessi kuulostaa vaivallolliselta,se on monessa tilanteessa esimerkiksi vianhaussa a<strong>in</strong>oavaihtoehto. Jos käyttäjällä on käytössään va<strong>in</strong> editori, työon hyv<strong>in</strong> hankalaa, mutta kehittyneet takais<strong>in</strong>mall<strong>in</strong>tamisentyökalut voivat tässä häntä auttaa.Peirce esittää ongelman lähestymiseen kolme erillistätapaa: abduktion, <strong>in</strong>duktion ja deduktion. Seuraavassamuutama esimerkki niistä: Abduktion käyttö ohjausvuon käsittelyssä: Kaikkiohjelman sekvenssit, jotka alustavat olion Server,ovat palvelimeen liittyviä olioita. Esimerkiksi koskametodi ma<strong>in</strong> alustaa server<strong>in</strong>, metodi ma<strong>in</strong> onkriitt<strong>in</strong>en palvelimen käynnistymisen kannalta. Induktio: Muuttuja port saa komponent<strong>in</strong> sisälläserver<strong>in</strong> aloituslogiikassa arvoja 80,81 ja 82, jotkakaikki ovat oikeita. To<strong>in</strong>en vaihtoehto on se, ettäkomponenttia kutsutaan ulkoa, jollo<strong>in</strong> portille eivoida asettaa käynnistyarvoa, mikä on riski. Siten onvarmistettava nämä haarat ja tarkistuksena lisättäväoletusarvoksi 80. Nä<strong>in</strong> voidaan yleistäen(<strong>in</strong>duktiivisesti) päätellä, että kaikki tapaukset ovatkunnossa. Deduktio: Olion Server käynnistymiseen vaikuttavatkomentoriviltä saatu arvo ja if-lausekkeessa saatuarvo. Käynnistym<strong>in</strong>en estyy, jos poikkeustilannelaukeaa ma<strong>in</strong>-metodissa. Nämä lauseet muodostavat<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 114


täydellisen logiikan (<strong>and</strong>) server<strong>in</strong> käynnistymiseen.Jos olio ei käynnisty oike<strong>in</strong>, vian täytyy olla jossak<strong>in</strong>näistä kohdista.Letovskyn kysymyksillä on seuraava yhteys kood<strong>in</strong>sisältöön: What – kysymys viittaa element<strong>in</strong> tarkoitukseen jatoim<strong>in</strong>nallisuuteen (function). Why – kysymys viittaa syy-seuraussuhteeseen, jokaon vianpaikannuksessa hyv<strong>in</strong> hyödyll<strong>in</strong>en piirre. How-kysymys viittaa element<strong>in</strong> sisäiseen logiikkaan,sen suorituspolkuih<strong>in</strong>.5.1.4 Kysely, Query (Q)Kun kysymys on tunnistettu, se voidaan muuntaakyselyksi. Jos kysymykseen liittyy kaksi rajausta, se voiolla esimerkiksi muotoa:Query = why(Start,Target,Options)Jos rajauksia on va<strong>in</strong> yksi, se on muotoaQuery = what(Object)taiQuery = how(Object)5.1.5 Systemaatt<strong>in</strong>en vai opportunist<strong>in</strong>en oppim<strong>in</strong>enKäyttäjä voi tehdä kyselyjä systemaattisesti taiopportunistisesti optimalla hakujen määrää.Systemaatt<strong>in</strong>en haku vie use<strong>in</strong> liian paljon aikaa, jotenkäyttäjän ammattitaito tulee esille, kun hänen pyrkiiselviytymään ratkaisuun mahdollisimman joustavasti,mutta kuitenk<strong>in</strong> riittävän kattavasti.Työkalu voi tukea tiedonhakua mm. tarjoamallajoustavan navigo<strong>in</strong>n<strong>in</strong> ja m<strong>in</strong>imoimalla kyselyynkohdistuvan <strong>in</strong>formaation. Näistä piirteistä kerrotaanseuraavassa.6 Työkalu JavaMasterEdellä selostetti<strong>in</strong> karkealla tasolla kohdealueenmetodologia ja työskentelymetodi. Seuraavaksi käydäänläpi työkalu nimeltä JavaMaster ja sen peruspiirteitä.Työkalun sisältämän Visual Prolog- kielisenlähdekood<strong>in</strong> koko on no<strong>in</strong> 40.000 riviä. Se sisältää no<strong>in</strong>450 luokkaa ja toimii W<strong>in</strong>dows-ympäristössä.6.1 Työkalun arkkitehtuuriTakais<strong>in</strong>mall<strong>in</strong>tamistyökalun arkkitehtuuriksi muodostuuvars<strong>in</strong> luontevasti Model View Control (MVC) –rakenne, koska lähdekoodista saatu malli muodostaatärkeimmän osan (Model). Käyttäjä ohjaa työkaluaControl-osan kautta saaden aikaan näkymiä (View).Navigo<strong>in</strong>ti tapahtuu näyttöjen kautta tai työkalunpäämenuista.6.2 Työkalun piirteetJavaMaster<strong>in</strong> pääpiirteitä ovat: 1) lähdekood<strong>in</strong> latausmuisti<strong>in</strong> ja malliksi, 2) ohjelmamall<strong>in</strong> tietojen selaus erivälilehtiä hyödyntäen, ja 3) kyselyjen suorittam<strong>in</strong>entarkastelun hypoteesien mukaisesti.Työkalu tarjoaa lukuisia erilaisia tarkastelutapoja.Latausvaiheessa se luo koodista työlistan, joka palveleeläh<strong>in</strong>nä koodi<strong>in</strong> perehtyjää, joka sen mukaisesti voikäydä läpi vaativimman a<strong>in</strong>eiston, jota hän voi katsellapuiden, taulukkonäyttöjen, riippuvuuskaavioiden, umlkaavioidenja xml-dokumenttien muodossa.Kuva 4 esittää JavaMaster<strong>in</strong> käyttötilannetta. Koodiladataan si<strong>in</strong>ä tiedostopuun (kohta 1.) avulla muisti<strong>in</strong>.Lataus tuottaa puuhun (2.) ohjelmamall<strong>in</strong> mukaisenhierarkian. Sitten käyttäjä napauttaa Worklist-pa<strong>in</strong>iketta,jollo<strong>in</strong> työkalu näyttää vasteenaan sarjannavigo<strong>in</strong>tikysymyksiä (4. Q/A). Navigo<strong>in</strong>titilannettavastaava <strong>in</strong>formaatio muodostuu eri näyttöih<strong>in</strong> (3.).1.4Q/A2.3.Kuva 4. JavaMaster<strong>in</strong> käyttöliittymä.6.3 Työkalun evaluo<strong>in</strong>tiJavaMaster<strong>in</strong> evaluoimiseksi on useita mahdollisuuksia: Koodi ja algoritmit voidaan verifioida analyyttisestilause lauseelta. Työkalun tulokset voidaan evaluoida kokeellisestitutkien mm. kutsupuiden kattavuus. Kood<strong>in</strong> sisäisiä rakenteita voidaan verrata ASTtyökaluih<strong>in</strong>,joita löytyy mm. Eclipse-työkalusta. Käyttötapauks<strong>in</strong>a voidaan tutkia tyypillisäongelmanpaikannustilanteita, esimerkiksi tilanteita,joissa tietokantapalvel<strong>in</strong> toimii väär<strong>in</strong>. Tällo<strong>in</strong>selvitetään miten kuvattu ongelmatilanne onpurettavissa hypoteeseiksi ja ku<strong>in</strong>ka niitä vastaavatkyselyt on suoritettavissa työkalun avulla.115


Työkalun evaluo<strong>in</strong>tiprosessi on vielä kesken, mutta senabsoluuttista kapasiteettia on jo evaluoitu syöttämällätyökalun symboliseen malli<strong>in</strong> miljoonan element<strong>in</strong>a<strong>in</strong>eistoja, jotka määrältään vastaavat Microsoft<strong>in</strong>Word97-ohjelmiston AST-solmujen määrää. Tällö<strong>in</strong> ontodettu, että myös suurten ohjelmistojen analyso<strong>in</strong>ti onsymbolisella mallilla mahdollista, vaikkak<strong>in</strong> menetelmänsuurimmat edut löytynevät tiettyjen rajattujenongelmalliseten koodialueiden tarkastelusta mon<strong>in</strong> eritavo<strong>in</strong>.7 YhteenvetoEsitetty symbol<strong>in</strong>en malli kuvaa sellaisenaan eräänlaisenvirtuaalitoteutuksen, joka abstrahoiduilla rakenteillaanmuistuttaa alkuperäistä koodia. Siten se poikkeaamerkittävästi konkreettisista työkaluista, jotka pyrkivättarjoamaan käyttäjälle a<strong>in</strong>a täydellisen ratkaisun.Abstraho<strong>in</strong>n<strong>in</strong> tueksi Walenste<strong>in</strong> (2002) on esittänyt, ettätäydellisen ratkaisun tarjoam<strong>in</strong>en johtaa käyttäjänylikuormittumiseen, siksi abstraho<strong>in</strong>ti olisi suositeltavaa.Mutta mikä olisi abstrakt<strong>in</strong> toteutuksen esikuva, onkosellaista esitetty aiemm<strong>in</strong>?Kov<strong>in</strong> monenlaisia erilaisia teorioita abstrakteistasimuloitavista koneista ei ole tehty, jos virtaalikoneita eitässä huomioida. Ehkä tunnetu<strong>in</strong> niistä on Tur<strong>in</strong>g<strong>in</strong> kone(Kokkar<strong>in</strong>en 2003), joka käy läpi tulotietona olevaanauhaa ja ohjausyksiköllään pyrkii reagoimaan nauhantietoon määrittelyn mukaisesti.Symbol<strong>in</strong>en analyysi muistuttaa mon<strong>in</strong> tavo<strong>in</strong>Tur<strong>in</strong>g<strong>in</strong> konetta ja sen ohjausyksikköä. Symbol<strong>in</strong>enmallihan sisältää tilakonemaisen ohjausyksikönpoimittuaan alkuperäisestä koodista logiikkapolut jalauseiden semantiikan. Mutta tois<strong>in</strong> ku<strong>in</strong> Tur<strong>in</strong>g<strong>in</strong> kone,symbol<strong>in</strong>en malli sisältää myös formaal<strong>in</strong> tietoa<strong>in</strong>eiston,joka jäljittelee alkuperäistä koodia.Suorituksen aikana symbol<strong>in</strong>en malli tallentaavälitulokset ja lopputulokset perusolioih<strong>in</strong>sa, joten niidensisältö palautuu mall<strong>in</strong> kyselyn kautta käyttäjälle. Sitensaatu <strong>in</strong>formaatio kuormittaa ”ohjausnauhaa” eli ihmisenja koneen välistä kommuniko<strong>in</strong>tiväylää mahdollisimmanvähän. Sehän oli abstraho<strong>in</strong>n<strong>in</strong> tavoitek<strong>in</strong>.To<strong>in</strong>en mielenki<strong>in</strong>to<strong>in</strong>en asia on tarkastella, ku<strong>in</strong>kahyv<strong>in</strong> saatu konstruktio vastaa semioottista käsitteistöä.Symbolisen mall<strong>in</strong> pääkäsitteistä voi havaita, että esitettymetodologia sopii suhteellisen hyv<strong>in</strong> yhteen Peircenkäsitteistöön, koska molempi<strong>in</strong> liittyy kolme pääsuuretta:merkki (sign /symboli), kohde (object) ja tulk<strong>in</strong>ta(<strong>in</strong>terpretator) - sillä tarkennuksella, että tulk<strong>in</strong>taasymbolisessa mallissa vastaa logiikka, joka on toteutettumall<strong>in</strong> element<strong>in</strong> sisältämänä predikaatt<strong>in</strong>a.Edellä kuvattu kolmijako muodostui metodologiaantuntematta Peircen teoriaa vielä suunnitteluvaiheessa,mikä on mielenki<strong>in</strong>to<strong>in</strong>en hava<strong>in</strong>to. Siitä voidaan vetääjohtopäätös, että konstruktio pääsi kehittymään oikeallatavalla oikeaan suuntaan jo alusta alkaen.KiitoksetSwMaster Oy on mahdollistanut alustavan tutkimuksenja työkalun kehittämisen vuodesta 2000 alkaen. Senlisäksi vuoden 2005 alusta Jyväskylän yliopistonCOMAS-ohjelma on rahoittanut Erkki Laitilanväitöskirjahankkeeseen liittyvää tutkimusta.ReferencesPaul Anderson, Thomas Reps, <strong>and</strong> Tim Teitelbaum."Design <strong>and</strong> Implementation of a F<strong>in</strong>e-Gra<strong>in</strong>edSoftware Inspection Tool", IEEE TSE 29 (8), 2003,pp. 721-733.Richard Brooks. Towards a Theory of Underst<strong>and</strong><strong>in</strong>gComputer Programs, IJMS 18 (6), 1983.Jean-Marie Burkhardt, Francoise Detienne <strong>and</strong> SusanWiedenbeck. "Object-Oriented ProgramComprehension: Effect of Expertise, Task <strong>and</strong>Phase", Empirical Softw. Eng. 7 (2), 2002, pp. 115-156.Gerardo Canfora, A. Cimitile, <strong>and</strong> U. de Carl<strong>in</strong>i. "ALogic-Based Approach to Reverse Eng<strong>in</strong>eer<strong>in</strong>gTools Production", IEEE TSE 18 (12), 1992, pp.1053-1064.Thomas Cheatham, Glen Holloway <strong>and</strong> Judy Townley."Symbolic Evaluation <strong>and</strong> <strong>the</strong> Analysis ofPrograms", IEEE Trans. Softw. Eng. 5 (4), 1979,pp. 402-417.Noam Chomsky. Three models for <strong>the</strong> description oflanguage. IRE Transactions on Information Theory,IT-2:3:113–124, 1956.CMMI. Capability Maturity Model Integration (CMMI),http://www.sei.cmu.edu/cmmi.Eclipse. Eclipse Research Community: Eclipse, OpenSource Project. http://www.eclipse.org [2003].David Flanagan. Java Examples <strong>in</strong> a Nutshell: Example7-5, ftp://ftp.ora.com/examples/nutshell/java/examples, O'Reil-ly, 2000.Frisco. A Framework of <strong>in</strong>formation system concepts.http://www.ma<strong>the</strong>matik.unimarburg.de/~hesse/papers/fri-full.pdf,1998.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 116


Susan Horwitz, Thomas Reps, <strong>and</strong> David B<strong>in</strong>kley.Interprocedural slic<strong>in</strong>g us<strong>in</strong>g dependence graphs.ACM Trans. Program. Lang. Syst., 12(1):26–60,1990.Ilkka Kokkar<strong>in</strong>en. Tekoäly, laskettavuus ja logiikka,2003.Erkki Laitila. Visual Prolog: Teollisuuden Sovellukset,Docendo/Teknolit, Jyväskylä, F<strong>in</strong>l<strong>and</strong>, 1996, 228 p.Erkki Laitila. Method for Develop<strong>in</strong>g a Translator <strong>and</strong> aCorrespond<strong>in</strong>g System. Patent: W02093371,http://www. espacenet.com, 2001.Erkki Laitila. "Program Comprehension Theories <strong>and</strong>Prolog Based Methodologies", Visual PrologApplic. & Lang. Conf. (VIP-ALC 2006), PrologDevelopment Center, 2006.Stan Letovsky. "Cognitive Process <strong>in</strong> ProgramComprehension", Empirical Studies ofProgrammers: First Workshop, Ablex, 1986, pp. 80-98.Esko Marjomaa. Theories of Representation,http://cs.joensuu.fi/^marjomaa/tr/tr/docAnne-Liese von Mayrhauser <strong>and</strong> Ann Marie Vans."Hypo<strong>the</strong>sis-Driven Underst<strong>and</strong><strong>in</strong>g ProcessesDur<strong>in</strong>g Corrective Ma<strong>in</strong>tenance of Large ScaleSoftware", Proc. Int. Conf. Softw. Ma<strong>in</strong>t. (ICSM1997), pp. 12-20.Charles W. Morris. Signs, Language <strong>and</strong> Behaviour,Prentice-Hall, <strong>New</strong> York, 1946.Charles W. Morris. Writ<strong>in</strong>gs on <strong>the</strong> general <strong>the</strong>ory ofsigns. The Hague: Mouton (1971).OMG. UML, Model Driven Architectures,http://omg.org [2005].Prolog Development Center. Visual Prolog 6.3,http://www.visual-prolog.com, 2005.Prolog Development Center. Visual Prolog Applic. &Lang. Conf. (VIP-ALC 2006), http://www.visualprolog.com/conference2006, 2006.Thomas Reps. "Program Analysis via GraphReachability", ACM SIGPLAN 2000 Conferenceon Programm<strong>in</strong>g Language Design <strong>and</strong>Implementation (PLDI'2000).Tamar Richner <strong>and</strong> St<strong>and</strong> Ducasse. "Recover<strong>in</strong>g High-Level Views of Object-Oriented Applications fromStatic <strong>and</strong> Dynamic Information", Int. Conf. Softw.Ma<strong>in</strong>t. (ICSM 1999), IEEE, pp. 13-22.Spice. Software Process Improvement <strong>and</strong> CapabilityDeterm<strong>in</strong>ation. http://www.sqi.gu.edu.au/spice.Sun. The Grammar of Java Programm<strong>in</strong>g Language,http://java.sun.com/docs/books/jls/secondedition/html/syntax.doc.html, 2003.Tur<strong>in</strong>g Mach<strong>in</strong>es. http://plato.stanford.edu/entries/tur<strong>in</strong>gmach<strong>in</strong>e.Andrew Walenste<strong>in</strong>. Cognitive Support <strong>in</strong> SoftwareSupport <strong>in</strong> Software Eng<strong>in</strong>eer<strong>in</strong>g tools: ADistributed Cognition Framework,ftp://fas.sfu.ca/pub/cs/<strong>the</strong>ses/2002/AWalenste<strong>in</strong>PhD.pdf.Norman Wilde,<strong>and</strong> Ross Huitt. "Ma<strong>in</strong>tenance Support forObject-Oriented Programs", IEEE Trans. SoftwareEng. 18 (12), 1992, pp. 1038-1044.Stefano Zacchiroli. Underst<strong>and</strong><strong>in</strong>g Abstract Syntax Tree,http://www.connettivo.net/article.php3?id_article=49, 2003.Charles S. Peirce. Kotisivut, C.S. Peirce,http://peirce.org, 2006.Nancy Penn<strong>in</strong>gton. "Stimulus Structures <strong>and</strong> MentalRepresentations <strong>in</strong> Expert Comprehension ofComputer Programs", Cognitive Psychology 19 (3),1987, pp. 295-341.117


Risto.lahdelma@cs.utu.fi aiyron@utu.fiKeywords: Fuzzy sets, l<strong>in</strong>ear programm<strong>in</strong>g, chance constra<strong>in</strong>t, scrap charge optimization, steel production.A general trend dur<strong>in</strong>g <strong>the</strong> past decades is thatscrap-based steelmak<strong>in</strong>g has <strong>in</strong>creased its share,reach<strong>in</strong>g around 40% of global crude steel production<strong>in</strong> 2001 (Rautaruukki 2001). Steel is also <strong>the</strong>world’s most important recycled material. The useof <strong>the</strong> steel scrap as a raw material for steelmak<strong>in</strong>gresults <strong>in</strong> a sav<strong>in</strong>g of 600 million tonnes of iron ore<strong>and</strong> 200 million tonnes of coke each year (EURO-FER 2001). With <strong>the</strong> grow<strong>in</strong>g concern on environmentalissue, <strong>the</strong> popularity of us<strong>in</strong>g scrap could fur<strong>the</strong>r<strong>in</strong>crease because scrap-based steelmak<strong>in</strong>g emitssignificantly less CO 2 as compared with <strong>in</strong>tegratedsteelmak<strong>in</strong>g us<strong>in</strong>g metallurgical coke as reductantfor iron-mak<strong>in</strong>g. Undoubtedly, <strong>the</strong> use of <strong>the</strong> scrapoffers <strong>the</strong> opportunity to produce high qualityproducts most economically. In <strong>the</strong> meantime, italso poses challenge <strong>in</strong> charge optimization causedby <strong>the</strong> uncerta<strong>in</strong>ty of chemical composition of scrap.The uncerta<strong>in</strong>ty ma<strong>in</strong>ly comes from two sources.First, <strong>the</strong> constituents <strong>in</strong> <strong>the</strong> scrap <strong>and</strong> steel productare diverse. With <strong>the</strong> development of steel productsfor higher grades <strong>and</strong> higher performance, use ofsteel materials <strong>in</strong> comb<strong>in</strong>ation with nonferrousmetals or non-metallic materials has <strong>in</strong>creased. Depend<strong>in</strong>gon <strong>the</strong> melt<strong>in</strong>g process <strong>and</strong> <strong>the</strong> requirementsof <strong>the</strong> particular product, some of <strong>the</strong> constituents <strong>in</strong>scrap are considered impurities while o<strong>the</strong>rs arevaluable additives.Second, <strong>the</strong> diverse scrap materials are generally divided<strong>in</strong>to scrap types for h<strong>and</strong>l<strong>in</strong>g <strong>and</strong> <strong>the</strong> materials<strong>in</strong>cluded <strong>in</strong> each scrap type are heterogeneous because<strong>the</strong> classification varies based on different criteria.That means <strong>the</strong>re are large deviations <strong>in</strong> materialproperties <strong>in</strong>side class, sometimes larger thanbetween classes. Therefore, it is difficult to come upwith accurate chemical composition (element concentration)analysis for <strong>the</strong> scrap.Scrap-based steelmak<strong>in</strong>g process starts with <strong>the</strong>charge of <strong>the</strong> predeterm<strong>in</strong>ed scrap mix <strong>in</strong> an electricarc furnace (EAF). One furnace of ref<strong>in</strong>ed steel(with required chemical composition) is called aheat. When <strong>the</strong> scrap mix is melted, <strong>the</strong>re is a considerablerisk for <strong>the</strong> outcome fail<strong>in</strong>g to satisfy <strong>the</strong>composition requirements for <strong>the</strong> product because of<strong>the</strong> uncerta<strong>in</strong>ty <strong>in</strong> <strong>the</strong> chemical composition for <strong>the</strong>scrap. The objective of <strong>the</strong> scrap charge optimizationis to select <strong>the</strong> most economical scrap mix foreach produced steel grade while m<strong>in</strong>imiz<strong>in</strong>g <strong>the</strong> failurerisk caused by uncerta<strong>in</strong>ties <strong>in</strong> raw material consistence.There are three k<strong>in</strong>ds of charge optimization modelsbased on different plann<strong>in</strong>g horizon: s<strong>in</strong>gle-heatmodel (AFS 1986) for short-term plann<strong>in</strong>g (e.g.daily operations), multi-heat model (Kim & Lewis1987) for medium-term plann<strong>in</strong>g (e.g. weekly ormonthly) <strong>and</strong> product recipe model (Lahdelma et al.1999) for long-term plann<strong>in</strong>g (annually). Anycharge plan is implemented on s<strong>in</strong>gle-heat basis <strong>and</strong>on-l<strong>in</strong>e analysis is applied to identify whe<strong>the</strong>r <strong>the</strong><strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 118


outcome match <strong>the</strong> predicted characteristics <strong>and</strong> tocorrect <strong>the</strong> possible bias <strong>in</strong> future predictions(Wilson et al. 2001). However, if <strong>the</strong> charge plann<strong>in</strong>gis designed us<strong>in</strong>g <strong>the</strong> s<strong>in</strong>gle-heat model, thismay result <strong>in</strong> non-optimal use of raw materials.M<strong>in</strong>imiz<strong>in</strong>g raw material costs <strong>in</strong> one heat can eatup <strong>the</strong> cost-efficient raw materials <strong>and</strong> <strong>the</strong>refore <strong>in</strong>crease<strong>the</strong> costs <strong>in</strong> future heats. The multi-heat modelcan allocate <strong>the</strong> available raw materials optimallyamong <strong>the</strong> different heats based on <strong>the</strong> current rawmaterial stock <strong>and</strong> predicted deliveries. For longtermplann<strong>in</strong>g, it is more convenient to use productrecipe model which can viewed as a model where allheats of <strong>the</strong> same product are grouped. Therefore,<strong>the</strong> product recipe model is much smaller than <strong>the</strong>multi-heat model. The long-term scrap charge planis designed based on forecast customer orders <strong>and</strong>possible available raw materials. The product recipemodel can also be applicable to medium-term plann<strong>in</strong>g.In terms of h<strong>and</strong>l<strong>in</strong>g uncerta<strong>in</strong>ty, <strong>the</strong>re are severalmethods of constra<strong>in</strong><strong>in</strong>g failure risks. Bliss (1997)added safety marg<strong>in</strong>s to <strong>the</strong> product st<strong>and</strong>ard by us<strong>in</strong>ga tighter product st<strong>and</strong>ard <strong>in</strong> optimization.Lahdelma et al. (1999) added safety marg<strong>in</strong>s to <strong>the</strong>chemical composition for scrap <strong>in</strong> optimization. Theapproach of add<strong>in</strong>g safety marg<strong>in</strong> can be viewed as<strong>the</strong> extension of <strong>the</strong> determ<strong>in</strong>istic model to accommodate<strong>the</strong> uncerta<strong>in</strong>ty. Turunen (2000) constra<strong>in</strong>ed<strong>the</strong> failure risk based on stochastic chance constra<strong>in</strong>tsto guarantee that <strong>the</strong> failure rate is less thana predeterm<strong>in</strong>ed level (or to allow small violations<strong>in</strong> some constra<strong>in</strong>ts). However, stochastic chanceconstra<strong>in</strong>ed programm<strong>in</strong>g models are difficult tosolve s<strong>in</strong>ce <strong>the</strong> determ<strong>in</strong>istic version of <strong>the</strong> model isnon-l<strong>in</strong>ear (Kall & Wallace 1994, Watanabe & Ellis1994). The solution can be even more complicated if<strong>the</strong> stochastic model <strong>in</strong>cludes simultaneously chanceconstra<strong>in</strong>ts <strong>and</strong> ord<strong>in</strong>ary constra<strong>in</strong>ts with stochasticparameters.In this paper, we formulate <strong>the</strong> scrap charge optimizationproblem based on <strong>the</strong> product recipe model.We represent <strong>the</strong> uncerta<strong>in</strong>ty for <strong>the</strong> scrap composition<strong>and</strong> <strong>the</strong> composition specification for productst<strong>and</strong>ard based on fuzzy set <strong>the</strong>ory (possibility <strong>the</strong>ory,Zadeh 1978). Then we constra<strong>in</strong> <strong>the</strong> failure riskbased on a possibility measure. Consequently, <strong>the</strong>scrap charge optimization problem is modeled as afuzzy l<strong>in</strong>ear chance constra<strong>in</strong>ed programm<strong>in</strong>g problem.This approach can be viewed as explicitly <strong>in</strong>tegrat<strong>in</strong>gmethods of add<strong>in</strong>g safety marg<strong>in</strong> forproduct st<strong>and</strong>ard <strong>and</strong> for scrap composition <strong>and</strong> allow<strong>in</strong>gsmall violations (chance constra<strong>in</strong>ts) <strong>in</strong> someconstra<strong>in</strong>ts under a s<strong>in</strong>gle framework. S<strong>in</strong>ce <strong>the</strong>constra<strong>in</strong>ts <strong>in</strong> <strong>the</strong> scrap charge problem ma<strong>in</strong>ly address<strong>the</strong> specification of <strong>the</strong> product, <strong>the</strong> crisp equivalenceof <strong>the</strong> fuzzy constra<strong>in</strong>ts should be less relaxedthan that purely based on <strong>the</strong> concept of softconstra<strong>in</strong>ts. For general discussions on <strong>the</strong> <strong>in</strong>terpretationof <strong>the</strong> ord<strong>in</strong>ary fuzzy constra<strong>in</strong>ts based on <strong>the</strong>concept of soft (flexible, approximate) constra<strong>in</strong>ts,we refer to Canz (1996), Dubois & Prade (1980),Slow<strong>in</strong>ski (1986), Werners (1987), Zimmermann(1978). For <strong>in</strong>terpretation of general chance constra<strong>in</strong>tsdirectly based on <strong>the</strong> possibility measure, werefer to Liu & Iwamura (1998). Here we <strong>in</strong>terpretchance constra<strong>in</strong>ts based on <strong>the</strong> likelihood measure<strong>and</strong> <strong>the</strong> result<strong>in</strong>g crisp constra<strong>in</strong>ts are much stricterthan those based directly on <strong>the</strong> possibility measure.The property of <strong>the</strong> likelihood measure <strong>in</strong>troduced<strong>in</strong> this paper is similar to that of <strong>the</strong> likelihood profilediscussed <strong>in</strong> <strong>the</strong> fuzzy mach<strong>in</strong>e schedul<strong>in</strong>g context(Wang et al. 2002). There are two ways to <strong>in</strong>terpretord<strong>in</strong>ary fuzzy constra<strong>in</strong>ts: soft constra<strong>in</strong>ts <strong>and</strong>tolerance constra<strong>in</strong>ts. The strict tolerance constra<strong>in</strong>t(Dubois & Prade 1980) means that that fuzz<strong>in</strong>ess of<strong>the</strong> right-h<strong>and</strong> side of <strong>the</strong> constra<strong>in</strong>t is <strong>in</strong>terpreted asa maximum tolerance for that of <strong>the</strong> left-h<strong>and</strong> sideof <strong>the</strong> constra<strong>in</strong>t. However, <strong>the</strong> system with <strong>the</strong>strict tolerance constra<strong>in</strong>ts may be <strong>in</strong>consistent.Therefore, we <strong>in</strong>terpret <strong>the</strong> ord<strong>in</strong>ary fuzzy constra<strong>in</strong>tsbased on <strong>the</strong> framework of relaxed toleranceconstra<strong>in</strong>ts where we try to elim<strong>in</strong>ate <strong>the</strong> possibleconflicts of <strong>the</strong> strict tolerance constra<strong>in</strong>ts by dropp<strong>in</strong>g<strong>the</strong> relatively less critical constra<strong>in</strong>ts or byweaken<strong>in</strong>g some constra<strong>in</strong>ts. F<strong>in</strong>ally a crisp modelwith consistent <strong>and</strong> compact constra<strong>in</strong>ts is formed.The resultant crisp model is a st<strong>and</strong>ard l<strong>in</strong>ear programm<strong>in</strong>g(LP) model, which can be solved byst<strong>and</strong>ard LP software.The paper organizes as follows. In Section 2, we reviewa generic fuzzy l<strong>in</strong>ear programm<strong>in</strong>g model <strong>and</strong>describe <strong>the</strong> relationship between <strong>the</strong> fuzzy number<strong>and</strong> <strong>the</strong> stochastic parameter with given distribution.In Section 3, we describe <strong>the</strong> scrap-based steelmak<strong>in</strong>gprocess first, <strong>and</strong> <strong>the</strong>n we formulate <strong>the</strong> scrapcharge optimization problem as a fuzzy chance-constra<strong>in</strong>edl<strong>in</strong>ear programm<strong>in</strong>g model. In Section 4, wetransform <strong>the</strong> fuzzy model <strong>in</strong>to a crisp model withcompact <strong>and</strong> consistent constra<strong>in</strong>ts based on <strong>the</strong> applicationcontext. In Section 5, we report <strong>the</strong> simulationresults.We def<strong>in</strong>e fuzzy l<strong>in</strong>ear programm<strong>in</strong>g (FLP) as <strong>the</strong>extension of <strong>the</strong> classical l<strong>in</strong>ear programm<strong>in</strong>g (LP)<strong>in</strong> operations research (Taha 1992) <strong>in</strong> <strong>the</strong> presenceof uncerta<strong>in</strong>ty <strong>in</strong> <strong>the</strong> optimization process wheresome or all of <strong>the</strong> coefficients are represented asfuzzy quantities (numbers) based on fuzzy set <strong>the</strong>ory(possibility <strong>the</strong>ory). A non-fuzzy quantity can beviewed as a special case of fuzzy quantity as discussedlater. A generic FLP model is given below.s.t. 119


where x j are decision variables, are cost coefficients, are technical coefficients, <strong>and</strong> are right-h<strong>and</strong> side coefficients. Some orall of <strong>the</strong>se coefficients can be fuzzy numbers. Formula(1) is <strong>the</strong> objective function to be optimized.Constra<strong>in</strong>ts (2) are called chance-constra<strong>in</strong>ts. Pos{.}denotes <strong>the</strong> possibility of events {.}. The predeterm<strong>in</strong>edaspiration level is usually <strong>in</strong>terpreted asconstra<strong>in</strong>t reliability. The constra<strong>in</strong>ts (2) mean that<strong>the</strong> possibility for violat<strong>in</strong>g shouldbe less than 1-α i. Constra<strong>in</strong>ts (3) are ord<strong>in</strong>ary l<strong>in</strong>earconstra<strong>in</strong>ts.Fuzzy numbers play a central role <strong>in</strong> <strong>the</strong> fuzzy programm<strong>in</strong>gmodel. First, we review <strong>the</strong> concept offuzzy numbers briefly. Then we represent <strong>the</strong> statisticaluncerta<strong>in</strong>ty based on fuzzy set <strong>the</strong>ory <strong>and</strong> establish<strong>the</strong> relationship between <strong>the</strong> fuzzy number <strong>and</strong><strong>the</strong> stochastic parameter with given distribution.A fuzzy number is a convex normalized fuzzy set Aon <strong>the</strong> real l<strong>in</strong>e R with membership function f A(x) (x∈R). We represent <strong>the</strong> fuzzy number based on <strong>the</strong>modified L-R fuzzy number. The examples of L-Rfuzzy numbers can be referred to Dubois & Prade(1980) <strong>and</strong> Slow<strong>in</strong>ski (1986). The representation forA is <strong>the</strong> 3-tuple of parameters ,where a, <strong>and</strong> are mean, left <strong>and</strong>right spreads of <strong>the</strong> fuzzy number. The memberfunction f A(x) is given below. where L <strong>and</strong> R are cont<strong>in</strong>uous decreas<strong>in</strong>g functionssuch that L(0) = R(0) = 1, L(1) = R(1) = 0. If bothL <strong>and</strong> R functions are l<strong>in</strong>ear, <strong>the</strong>n <strong>the</strong> resultant fuzzynumber is called triangular fuzzy number as shown <strong>in</strong> Figure 1, where <strong>and</strong> are L <strong>and</strong> R functions<strong>and</strong> Anon-fuzzy number can be treated as a special case of<strong>the</strong> fuzzy number where both <strong>the</strong> left <strong>and</strong> rightspreads are zero. Figure 1 Relationship between a fuzzy number <strong>and</strong> a stochastic parameter withdensity function p(x) (a is <strong>the</strong> mean of <strong>the</strong> stochasticparameter).Figure 1 also illustrates <strong>the</strong> relationship between afuzzy number <strong>and</strong> a stochasticparameter with density function p(x). The uncerta<strong>in</strong>ty<strong>in</strong>volved <strong>in</strong> many applications can be viewedas statistical uncerta<strong>in</strong>ty. Canz (1996) discussed <strong>the</strong>basic approach for represent<strong>in</strong>g statistical uncerta<strong>in</strong>tyus<strong>in</strong>g trapezoidal fuzzy numbers. Here, wefollow <strong>the</strong> similar logic <strong>and</strong> represent <strong>the</strong> statisticaluncerta<strong>in</strong>ty us<strong>in</strong>g modified L-R fuzzy numbers. Firstwe assume a probability density function p(x) from<strong>the</strong> statistical data, <strong>and</strong> <strong>the</strong>n we transform it <strong>in</strong>to apossibility distribution (fuzzy set) based on <strong>the</strong>shape of p(x) <strong>and</strong> <strong>the</strong> mean <strong>and</strong> st<strong>and</strong>ard deviationof <strong>the</strong> statistical data. If <strong>the</strong> mean <strong>and</strong> st<strong>and</strong>ard deviationof <strong>the</strong> density function p(x) isβ <strong>and</strong> σ respectively,<strong>the</strong>n for a fuzzy number , <strong>and</strong> ,where ε is related to <strong>the</strong> skewness (<strong>the</strong> third moment,Banks & Carson 1984) of <strong>the</strong> probabilitydensity function p(x), n 1 <strong>and</strong> n 2 are confidencefactors. The choice of n 1 <strong>and</strong> n 2 depends on shape ofp(x) <strong>and</strong> <strong>the</strong> application context. If <strong>the</strong> density functionp(x) is skewed (e.g. log normal distribution),<strong>the</strong>n n 1 <strong>and</strong> n 2 should be different. If p(x) is symmetric(e.g. normal distribution), <strong>the</strong>n a = β, n 1 = n 2.However, if <strong>the</strong> parameter has non-negativity restriction<strong>the</strong>n . If , this is equivalent to case that n 1 <strong>and</strong>n 2 take different values. The value sett<strong>in</strong>g of n 1 <strong>and</strong>n 2 depends on <strong>the</strong> requirement of <strong>the</strong> application.The choice of L <strong>and</strong> R functions is flexible <strong>and</strong>simple l<strong>in</strong>ear functions can satisfy <strong>the</strong> needs formost applications.To underst<strong>and</strong> <strong>the</strong> scrap charge optimization problem,we start by <strong>in</strong>troduc<strong>in</strong>g <strong>the</strong> scrap-based steelmak<strong>in</strong>gprocess, e.g. sta<strong>in</strong>less steel-mak<strong>in</strong>g process.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 120


Scrap-based sta<strong>in</strong>less steel-mak<strong>in</strong>g pro-Figure 2.cessFigure 2 shows a sketch of <strong>the</strong> scrap-based sta<strong>in</strong>lesssteel-mak<strong>in</strong>g process. The scrap metal is charged<strong>in</strong>to an electric arc furnace (EAF) <strong>and</strong> melted. Then<strong>the</strong> melt is moved <strong>in</strong>to argon-oxygen decarburization(AOD) converter where <strong>the</strong> carbon is removedby argon <strong>and</strong> oxygen <strong>in</strong>jection <strong>in</strong> order to meet <strong>the</strong>steel quality requirement. After AOD, <strong>the</strong> moltensteel is moved <strong>in</strong>to ladle furnace (LF) for secondarymetallurgical operations such as add<strong>in</strong>g alloy<strong>in</strong>g elements,degass<strong>in</strong>g <strong>and</strong> temperature homogenization.The scrap consists of materials from differentsources such as old cars, structural steel, cans, electricappliances <strong>and</strong> <strong>in</strong>dustrial by-products. Scrapsconta<strong>in</strong> also waste from <strong>the</strong> manufactur<strong>in</strong>g processof steel products such as cut edges of steel plates<strong>and</strong> ends of coils. Generally <strong>the</strong> diverse materialsare divided <strong>in</strong>to several st<strong>and</strong>ard types for trade.After <strong>the</strong> scrap materials are delivered to <strong>the</strong> meltshop,<strong>the</strong> steel producers have <strong>the</strong>ir own <strong>in</strong>ternalclassification system that fur<strong>the</strong>r divides <strong>the</strong> st<strong>and</strong>ardtypes <strong>in</strong>to different subtypes based on orig<strong>in</strong>,supplier, chemical contents <strong>and</strong> size distribution <strong>and</strong>requirements. The total number of scrap types isabout 20 for a normal carbon-steel meltshop. Forsta<strong>in</strong>less <strong>and</strong> speciality production, <strong>the</strong> classificationcan be even f<strong>in</strong>er <strong>and</strong> <strong>the</strong> number of scrap types canbe more than 100 (S<strong>and</strong>berg 2005). For <strong>the</strong> sta<strong>in</strong>lesssteel production, it is particularly important to sortgrades with high content of valuable alloy<strong>in</strong>g metalssuch as nickel or molybdenum <strong>in</strong> <strong>the</strong>ir own classesso that <strong>the</strong> scrap can substitute for <strong>the</strong> expensivepure alloy<strong>in</strong>g materials to provide alloy<strong>in</strong>g elements<strong>in</strong> <strong>the</strong> new product. It would be good for <strong>the</strong> productionif all different alloys could be separated to differentclasses but it seems that <strong>the</strong>re are large deviations<strong>in</strong> properties (e.g. element concentrations) <strong>in</strong>sideclasses, sometimes larger than between classes.Some scrap classes are much more heterogeneousthan o<strong>the</strong>rs. That is, <strong>the</strong>re is uncerta<strong>in</strong>ty for elementconcentration for <strong>the</strong> scrap. The uncerta<strong>in</strong>ty cancause errors for element concentrations <strong>in</strong> <strong>the</strong> f<strong>in</strong>alproducts.The scrap also conta<strong>in</strong>s oxides, organic materialsthat burn <strong>in</strong> <strong>the</strong> process, <strong>and</strong> <strong>the</strong> metal itself formsoxides <strong>in</strong> <strong>the</strong> process. The yield of <strong>the</strong> raw material(material yield) is <strong>the</strong> share of <strong>the</strong> raw material thatbecomes part of <strong>the</strong> product, typically 70-95 %. Wealso use a yield parameter for each element (elementyield coefficient). The element yield coefficients dependon <strong>the</strong> conditions <strong>in</strong> <strong>the</strong> furnace, while <strong>the</strong> materialyield depends ma<strong>in</strong>ly on <strong>the</strong> physical <strong>and</strong>chemical properties of <strong>the</strong> material. The two yieldparameters multiplied toge<strong>the</strong>r give <strong>the</strong> net yield ofan element for a raw material. The yield <strong>and</strong> elementconcentrations of <strong>the</strong> scrap types can be estimatedbased on spectrographic analysis <strong>in</strong> conjunctionwith analysis of <strong>the</strong> process <strong>and</strong> heat data (Ikäheimo1999, S<strong>and</strong>berg 2005).The process conditions may also vary <strong>and</strong> produceerrors not related to scrap. Inaccuracies <strong>in</strong> <strong>the</strong> charg<strong>in</strong>gprocess constitute a third source of error.However, <strong>the</strong> element concentrations for <strong>the</strong> scrapare <strong>the</strong> most significant source of uncerta<strong>in</strong>ties <strong>in</strong><strong>the</strong> process. We can treat this uncerta<strong>in</strong>ty as <strong>the</strong>sources for all <strong>the</strong> errors.The objective of <strong>the</strong> charge optimization is to fulfilla set of customer orders at <strong>the</strong> lowest cost us<strong>in</strong>gavailable raw materials. The costs <strong>in</strong>clude <strong>the</strong> rawmaterial cost <strong>and</strong> an approximation of <strong>the</strong> costs <strong>in</strong>successive process stages (<strong>the</strong> AOD converter <strong>and</strong>LF). Charge optimization models usually have constra<strong>in</strong>tsfor <strong>the</strong> chemical balance of <strong>the</strong> steel, productionamounts <strong>and</strong> material resources (Kim &Lewis 1987). Here we also consider <strong>the</strong> uncerta<strong>in</strong>ty<strong>in</strong> element concentrations for different scrap types.The uncerta<strong>in</strong>ty of <strong>the</strong> element concentrations for<strong>the</strong> scrap will cause <strong>the</strong> element concentration <strong>in</strong> <strong>the</strong>f<strong>in</strong>al product to deviate from <strong>the</strong> product st<strong>and</strong>ard.The product st<strong>and</strong>ard is specified by lower <strong>and</strong> upperlimits for each alloy<strong>in</strong>g element concentration.A failure happens when <strong>the</strong> concentrations of <strong>the</strong> alloy<strong>in</strong>gelements of <strong>the</strong> molten steel <strong>in</strong> EAF exceeds<strong>the</strong> upper limits of <strong>the</strong> product st<strong>and</strong>ard because it isusually difficult to remove any element from <strong>the</strong> liquidsteel. Fall<strong>in</strong>g below lower limits is not as criticalbecause <strong>the</strong> element contents can be <strong>in</strong>creased byadd<strong>in</strong>g pure alloy<strong>in</strong>g elements. However, it causescost <strong>in</strong>crease. On <strong>the</strong> one h<strong>and</strong>, <strong>the</strong> raw material costwill <strong>in</strong>crease because <strong>the</strong> pure alloy<strong>in</strong>g materials aremore expensive than <strong>the</strong> scrap. On <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>,additional process<strong>in</strong>g cost will be <strong>in</strong>curred <strong>in</strong> <strong>the</strong>subsequent stages <strong>in</strong> LF because <strong>the</strong> process<strong>in</strong>g timewill be <strong>in</strong>creased. Therefore, <strong>the</strong> ideal scrap mixwould yield <strong>the</strong> element concentrations that areclose to <strong>the</strong> lower bounds of product st<strong>and</strong>ard.The orders are divided <strong>in</strong>to |K| batches <strong>and</strong> eachbatch consists of products of <strong>the</strong> same st<strong>and</strong>ard.The element concentrations of raw materials <strong>and</strong> <strong>the</strong>element concentration requirements of f<strong>in</strong>al productare represented as modified L-R fuzzy numbers. Weconstra<strong>in</strong> <strong>the</strong> failure risk based on <strong>the</strong> possibilitymeasure to control <strong>the</strong> failure rate with<strong>in</strong> <strong>the</strong> predeterm<strong>in</strong>edlevel. The follow<strong>in</strong>g notations are <strong>in</strong>troduced.Index SetI Set of all useful elements <strong>in</strong> <strong>the</strong> product <strong>in</strong>clud<strong>in</strong>gelement iron.I 1 Set of alloy<strong>in</strong>g elements.J Set of all raw materials, J = J 0∪J 1.J 0 Set of scrap materials.121


J 1 Set of pure alloy<strong>in</strong>g materials, each ofwhich is made up of one alloy<strong>in</strong>g element.K Set of batches.Parametersa j Yield of raw material j∈J.b i Yield coefficient of element i∈I.c j Cost of raw material j∈J. For <strong>the</strong> alloy<strong>in</strong>gmaterials j∈J 1, additional process<strong>in</strong>g cost is<strong>in</strong>cluded <strong>in</strong> material cost. Mass of products <strong>in</strong> batch k∈K. , Lower <strong>and</strong> upper bounds for chargeof raw material j∈J <strong>in</strong> batch k∈K. , Lower <strong>and</strong> upper bounds for usage (consumption)of raw material j∈J. Aspiration levels for controll<strong>in</strong>g <strong>the</strong> upperlimit of <strong>the</strong> concentration of alloy<strong>in</strong>g elementi∈I 1 <strong>in</strong> batch k∈K. Concentration of elementi∈I <strong>in</strong> raw material j∈J (fuzzy number). Concentration of alloy<strong>in</strong>gelement i∈I 1 <strong>in</strong> batch k∈K (fuzzy number).Decision variables Charge (consumption) of material j∈J <strong>in</strong>batch k∈K.Then <strong>the</strong> scrap charge optimization problem form<strong>in</strong>imiz<strong>in</strong>g <strong>the</strong> raw material costs <strong>in</strong>clud<strong>in</strong>g additionalprocess<strong>in</strong>g costs is represented as follows. ∈∈ ∈∈ ∈∈ ∈ ∈ ∈∈ Constra<strong>in</strong>ts (7)--(9) toge<strong>the</strong>r are used to control <strong>the</strong>concentrations of alloy<strong>in</strong>g elements for raw materials.Constra<strong>in</strong>ts (7) are general requirements for <strong>the</strong>concentrations of <strong>the</strong> alloy<strong>in</strong>g elements for <strong>the</strong> scrapmaterials. The concentrations of <strong>the</strong> alloy<strong>in</strong>g elementsfor <strong>the</strong> scrap <strong>in</strong> EAF cannot exceed <strong>the</strong>product st<strong>and</strong>ard. Constra<strong>in</strong>ts (8) are chance constra<strong>in</strong>tsparticularly constra<strong>in</strong><strong>in</strong>g <strong>the</strong> failure riskbased on a possibility measure. The failure possibilitythat <strong>the</strong> concentrations of <strong>the</strong> alloy<strong>in</strong>g elementsfor <strong>the</strong> scrap exceed <strong>the</strong> upper limits of <strong>the</strong> productst<strong>and</strong>ard must be less than <strong>the</strong> predeterm<strong>in</strong>ed levels for each alloy<strong>in</strong>g element i∈I 1 <strong>in</strong> eachbatch k∈K. The effect of <strong>the</strong> chance constra<strong>in</strong>ts istwo-fold. On <strong>the</strong> one h<strong>and</strong>, <strong>the</strong>y emphasize that controll<strong>in</strong>g<strong>the</strong> upper limits of <strong>the</strong> alloy<strong>in</strong>g element concentrationsis critical. On <strong>the</strong> o<strong>the</strong>r h<strong>and</strong>, <strong>the</strong>y giveflexibility to control <strong>the</strong> limits by choos<strong>in</strong>g differentaspiration levels, allow<strong>in</strong>g explicitly small violationsof <strong>the</strong> upper limit of <strong>the</strong> product st<strong>and</strong>ard.Constra<strong>in</strong>ts (9) state that <strong>the</strong> concentrations of <strong>the</strong>alloy<strong>in</strong>g elements <strong>in</strong> <strong>the</strong> f<strong>in</strong>al product must meet <strong>the</strong>product st<strong>and</strong>ard. Constra<strong>in</strong>ts (10) state <strong>the</strong> massbalances between raw materials <strong>and</strong> f<strong>in</strong>al products.Here <strong>the</strong> constra<strong>in</strong>ts are crisp. We should know that<strong>the</strong> summation of concentrations of all elementsmust be one <strong>in</strong> <strong>the</strong> orig<strong>in</strong>al raw materials. Some elementsmay be burnt off <strong>in</strong> <strong>the</strong> process <strong>and</strong> <strong>the</strong> summationof concentrations of all elements that becomepart of product is fixed for a given material.The mass is <strong>the</strong> aggregate of <strong>the</strong> share of all elementsthat become part of products for <strong>the</strong> selectedmaterials. Therefore, <strong>the</strong> uncerta<strong>in</strong>ty <strong>in</strong> element concentrationshas only slight effect on mass because<strong>the</strong> <strong>in</strong>crease <strong>in</strong> concentration for one element implies<strong>the</strong> decrease <strong>in</strong> concentration for o<strong>the</strong>r elements.The variations <strong>in</strong> mass ma<strong>in</strong>ly come from <strong>the</strong>possible different element yield coefficient b i fordifferent element i ∈ I. Constra<strong>in</strong>ts (11) <strong>and</strong> (12)give <strong>the</strong> bounds for raw material consumption.In <strong>the</strong> fuzzy environment, <strong>the</strong>re are two ways totreat <strong>the</strong> ord<strong>in</strong>ary fuzzy constra<strong>in</strong>ts: tolerance constra<strong>in</strong>ts<strong>and</strong> soft (approximate) constra<strong>in</strong>ts (Dubois& Prade 1980). Tolerance constra<strong>in</strong>ts mean that <strong>the</strong>fuzz<strong>in</strong>ess of <strong>the</strong> right-h<strong>and</strong> side of <strong>the</strong> constra<strong>in</strong>t is<strong>in</strong>terpreted as a maximum tolerance for that of <strong>the</strong>left-h<strong>and</strong> side of <strong>the</strong> constra<strong>in</strong>ts. The soft constra<strong>in</strong>tsmean that <strong>the</strong> satisfaction of <strong>the</strong> constra<strong>in</strong>ts is determ<strong>in</strong>edby <strong>the</strong> membership function <strong>and</strong> <strong>the</strong>re iscompensation between <strong>the</strong> satisfaction of <strong>the</strong> constra<strong>in</strong>ts<strong>and</strong> fulfillment of <strong>the</strong> objective. That is, <strong>the</strong><strong>in</strong>terpretation of <strong>the</strong> fuzzy constra<strong>in</strong>ts based on <strong>the</strong>concept of soft constra<strong>in</strong>ts results <strong>in</strong> <strong>the</strong> crisp constra<strong>in</strong>tsthat are more relaxed than <strong>the</strong> correspond<strong>in</strong>gconstra<strong>in</strong>ts assum<strong>in</strong>g that <strong>the</strong>re is no fuzz<strong>in</strong>ess <strong>in</strong> <strong>the</strong>coefficients, while <strong>the</strong> crisp constra<strong>in</strong>ts based on <strong>the</strong>concept of tolerance constra<strong>in</strong>ts are much stricter.Based on this logic, we can f<strong>in</strong>d later <strong>the</strong> <strong>in</strong>terpretationof <strong>the</strong> chance constra<strong>in</strong>ts directly based on <strong>the</strong>possibility measure follows <strong>the</strong> l<strong>in</strong>e of soft constra<strong>in</strong>ts.In case of multi-criteria decision environment wherecriteria are described by objective functions <strong>and</strong>possible alternatives are implicitly determ<strong>in</strong>ed byconstra<strong>in</strong>ts, it is reasonable that <strong>the</strong> fuzzy constra<strong>in</strong>tsare <strong>in</strong>terpreted as soft constra<strong>in</strong>ts which can providea certa<strong>in</strong> degree of freedom <strong>in</strong> determ<strong>in</strong><strong>in</strong>g <strong>the</strong> set offeasible solutions. However, for <strong>the</strong> scrap chargeproblem, <strong>the</strong> <strong>in</strong>terpretation of <strong>the</strong> fuzzy constra<strong>in</strong>tsshould be stricter than that based on <strong>the</strong> concept ofsoft constra<strong>in</strong>ts because <strong>the</strong> constra<strong>in</strong>ts ma<strong>in</strong>ly imposephysical restrictions on <strong>the</strong> product <strong>and</strong> must<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 122


e somewhat strictly satisfied. Therefore, we <strong>in</strong>terpret<strong>the</strong> chance constra<strong>in</strong>ts based on <strong>the</strong> likelihoodmeasure to obta<strong>in</strong> a stricter <strong>in</strong>terpretation than thatbased directly on possibility measure. We <strong>in</strong>terpret<strong>the</strong> ord<strong>in</strong>ary fuzzy constra<strong>in</strong>ts based on <strong>the</strong> frameworkof <strong>the</strong> relaxed tolerance constra<strong>in</strong>ts where wetry to elim<strong>in</strong>ate <strong>the</strong> possible conflicts from <strong>the</strong> stricttolerance constra<strong>in</strong>ts by dropp<strong>in</strong>g <strong>the</strong> less criticalconstra<strong>in</strong>ts or by weaken<strong>in</strong>g some constra<strong>in</strong>ts. Forsimplicity, we assume that L-R fuzzy numbers aretriangular. Different L <strong>and</strong> R function types ma<strong>in</strong>lyaffect <strong>the</strong> sett<strong>in</strong>g of <strong>the</strong> aspiration level <strong>and</strong> complexityfor <strong>the</strong> realization of chance constra<strong>in</strong>ts.Based on <strong>the</strong> operation of fuzzy numbers where is also a triangular fuzzy number.Then constra<strong>in</strong>ts (8) becomeLet (x) be <strong>the</strong> membership function of <strong>the</strong>fuzzy number (Figure 3). ,u∈[0,1] are L <strong>and</strong> Rfunctions. Then based on (5) (x) canberepresentedas follows. Figure 3. The membership function of a fuzzy elementconcentration .Then <strong>the</strong> left h<strong>and</strong> side of (14) can be calculated asfollows. If <strong>the</strong> realization of (14) is directly based on (16),we can see that any aspiration level can be satisfiedby <strong>the</strong> value (element concentration) less than . This implies <strong>the</strong> concept of soft constra<strong>in</strong>ts.However, this realization is too relaxed for <strong>the</strong> scrapcharge problem because it cannot control failure rateeffectively.To enforce <strong>the</strong> chance constra<strong>in</strong>ts more strictly, weconstruct <strong>the</strong> likelihood of <strong>the</strong> valid element concentrationwith fuzzy possibility distribution. Wedef<strong>in</strong>e <strong>the</strong> likelihood of <strong>the</strong> valid element concentrationfor a fuzzy element concentration <strong>in</strong> <strong>the</strong> similarway as Wang et al. (2002) def<strong>in</strong>ed <strong>the</strong> job completionlikelihood profile for <strong>the</strong> fuzzy process<strong>in</strong>g time<strong>in</strong> <strong>the</strong> mach<strong>in</strong>e schedul<strong>in</strong>g context.Let denote <strong>the</strong> likelihood of <strong>the</strong> valid elementconcentration for a fuzzy element concentration . For a given , represents <strong>the</strong> likelihoodof its element concentration to be valid with<strong>in</strong>a certa<strong>in</strong> allocated upper limit y (variable) for <strong>the</strong>product st<strong>and</strong>ard. If <strong>the</strong> element concentrationis <strong>in</strong>valid <strong>and</strong> =0.If <strong>the</strong>n<strong>the</strong> element concentration is completely valid = 1. When should vary123


from 0 to 1 based on an <strong>in</strong>creas<strong>in</strong>g function. Wewish that is a cont<strong>in</strong>uousbijective mapp<strong>in</strong>g, i.e. <strong>the</strong>re is only element concentration<strong>in</strong> correspond<strong>in</strong>g to a given aspirationlevel . can be constructedbased on as follows (Figure 4). For a generic ord<strong>in</strong>ary <strong>in</strong>equality fuzzy constra<strong>in</strong>t where <strong>and</strong> are L-R fuzzy numbers, <strong>and</strong> . If afuzzy constra<strong>in</strong>t is <strong>in</strong>terpreted as a tolerance constra<strong>in</strong>t,<strong>the</strong>n crisp equivalence is given below(Dubois & Prade 1980). μ Figure 4. The likelihood of <strong>the</strong> valid element concentrationfor a fuzzy element concentration .Our application background requires that for <strong>the</strong> chance constra<strong>in</strong>ts. This meansthat Then <strong>the</strong> crisp equivalence of chance constra<strong>in</strong>ts (8)based on (13) <strong>and</strong> (18) is given below. ∈∈ where <strong>the</strong> first, second, <strong>and</strong> third constra<strong>in</strong>ts impose<strong>the</strong> constra<strong>in</strong>ts <strong>in</strong> terms of mean, right <strong>and</strong> leftspread respectively. This means that one fuzzy constra<strong>in</strong>t<strong>in</strong> pr<strong>in</strong>ciple should be transformed <strong>in</strong>to threecrisp constra<strong>in</strong>ts.To enforce <strong>the</strong> right spread constra<strong>in</strong>t <strong>in</strong> (21), wecan comb<strong>in</strong>e <strong>the</strong> first <strong>and</strong> second constra<strong>in</strong>ts <strong>in</strong> (21)<strong>and</strong> obta<strong>in</strong> To enforce <strong>the</strong> left spread constra<strong>in</strong>t <strong>in</strong> (21), we cancomb<strong>in</strong>e <strong>the</strong> first <strong>and</strong> third constra<strong>in</strong>ts <strong>in</strong> (21) <strong>and</strong>obta<strong>in</strong>where β i is a scal<strong>in</strong>g factor. However, simultaneously enforc<strong>in</strong>g <strong>the</strong> three constra<strong>in</strong>ts<strong>in</strong> (21) may cause <strong>in</strong>consistence; especially<strong>the</strong> third constra<strong>in</strong>t may conflict with <strong>the</strong> first twobecause <strong>the</strong> third constra<strong>in</strong>t imposes <strong>the</strong> restriction<strong>in</strong> <strong>the</strong> opposite direction of <strong>the</strong> first two (22). For <strong>the</strong>current charge problem, we can choose not to enforce<strong>the</strong> spread constra<strong>in</strong>ts, which we will discuss alittle bit later.If <strong>the</strong> constra<strong>in</strong>t (20) is an equality constra<strong>in</strong>t, it canbe weakened to <strong>in</strong> <strong>the</strong> sense of Zadeh(Dubois & Prade 1980). The crisp equivalenceis similar to (21) with mean constra<strong>in</strong>t (<strong>the</strong> first constra<strong>in</strong>t)enforced as an equality constra<strong>in</strong>t <strong>and</strong> <strong>the</strong>o<strong>the</strong>r two constra<strong>in</strong>ts rema<strong>in</strong><strong>in</strong>g unchanged. Now wediscuss <strong>the</strong> transformations of constra<strong>in</strong>ts (7) <strong>and</strong> (9)for <strong>the</strong> scrap charge problem.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 124


In terms of constra<strong>in</strong>ts (7), when <strong>the</strong> right spreadconstra<strong>in</strong>t (22) applies, it is <strong>in</strong> fact <strong>the</strong> chance constra<strong>in</strong>t(19) with <strong>the</strong> aspiration level . Thisis <strong>the</strong> strictest case of <strong>the</strong> constra<strong>in</strong>t (19), imply<strong>in</strong>gthat enforc<strong>in</strong>g right spread constra<strong>in</strong>ts make <strong>the</strong>chance constra<strong>in</strong>t lose <strong>the</strong> flexibility to control <strong>the</strong>upper limit of <strong>the</strong> element concentration based ondifferent aspiration levels. Therefore, we choose notto enforce <strong>the</strong> right spread constra<strong>in</strong>t. The leftspread constra<strong>in</strong>t for constra<strong>in</strong>ts (7) is used to enforce<strong>the</strong> lower limit of <strong>the</strong> element concentration.However, <strong>the</strong> lower limits are not critical.Moreover, enforc<strong>in</strong>g <strong>the</strong> left spread constra<strong>in</strong>ts canonly results <strong>in</strong> shr<strong>in</strong>k<strong>in</strong>g <strong>the</strong> feasible region <strong>and</strong> thus<strong>in</strong>creas<strong>in</strong>g <strong>the</strong> cost of raw materials. Therefore, <strong>the</strong>left spread constra<strong>in</strong>ts are not enforced ei<strong>the</strong>r. Thenconstra<strong>in</strong>ts (7) can be transformed based on <strong>the</strong>mean constra<strong>in</strong>ts only. ∈ ∈ In terms of equality constra<strong>in</strong>ts (9), it is unnecessaryto enforce <strong>the</strong> spread constra<strong>in</strong>ts because add<strong>in</strong>gpure alloy<strong>in</strong>g elements does not <strong>in</strong>troduce new uncerta<strong>in</strong>ty.That is, we only need to enforce <strong>the</strong> meanconstra<strong>in</strong>ts For <strong>the</strong>batch k, <strong>the</strong> product is up to <strong>the</strong> st<strong>and</strong>ard as long as<strong>the</strong> concentration for element i falls between <strong>the</strong>lower limit <strong>and</strong> upper limit . Therefore,we can weaken <strong>the</strong> mean constra<strong>in</strong>ts to ∈ ∈ In practice, it is unnecessary to worry about <strong>the</strong> upperlimit because <strong>the</strong> high cost of pure alloy<strong>in</strong>gmaterials forces <strong>the</strong> consumption of <strong>the</strong> purealloy<strong>in</strong>g materials to be m<strong>in</strong>imized.F<strong>in</strong>ally, <strong>the</strong> crisp equivalence of <strong>the</strong> orig<strong>in</strong>al fuzzyprogramm<strong>in</strong>g model (6)-(12) becomes <strong>the</strong> objectivefunction (6) <strong>in</strong> conjunction with constra<strong>in</strong>ts (19),(24), (25) <strong>and</strong> (10)-(12). We can see that <strong>the</strong> numberof <strong>the</strong> constra<strong>in</strong>ts <strong>in</strong> crisp model does not <strong>in</strong>crease ascompared with that <strong>in</strong> <strong>the</strong> orig<strong>in</strong>al fuzzy model becausewe drop <strong>the</strong> unnecessary constra<strong>in</strong>ts for <strong>in</strong>terpretationof strict tolerance based on <strong>the</strong> applicationcontext. The crisp equivalence bears some similaritywith <strong>the</strong> model result<strong>in</strong>g from add<strong>in</strong>g <strong>the</strong> safetymarg<strong>in</strong>s for element concentrations for <strong>the</strong> raw materials(Lahdelma et al. 1999). For example, <strong>the</strong> <strong>in</strong>terpretationof <strong>the</strong> chance constra<strong>in</strong>ts (19) is similarto <strong>the</strong> effect of add<strong>in</strong>g safety marg<strong>in</strong>s for elementconcentrations for raw materials. However, differencesexist between <strong>the</strong>se two approaches. Add<strong>in</strong>gsafety marg<strong>in</strong>s is an approach to extend<strong>in</strong>g <strong>the</strong> determ<strong>in</strong>isticmodel to accommodate uncerta<strong>in</strong>ty <strong>and</strong><strong>the</strong> complicated penalty cost structure to punish <strong>the</strong>possible deviation of an <strong>in</strong>termediate target <strong>in</strong> EAFis kept <strong>in</strong> <strong>the</strong> extended model. The fuzzy model directlyaddresses <strong>the</strong> uncerta<strong>in</strong>ty <strong>and</strong> each constra<strong>in</strong>t<strong>in</strong> <strong>the</strong> crisp equivalence has a clear l<strong>in</strong>k with <strong>the</strong>fuzzy constra<strong>in</strong>t. Consequently, <strong>the</strong> crisp equivalenceof <strong>the</strong> fuzzy model is more compact than <strong>the</strong>extended determ<strong>in</strong>istic model based on add<strong>in</strong>gsafety marg<strong>in</strong>s because no <strong>in</strong>termediate target <strong>and</strong>penalty cost is <strong>in</strong>troduced <strong>in</strong> <strong>the</strong> <strong>in</strong>terpretation offuzzy constra<strong>in</strong>ts. That is, fuzzy approach is morestraightforward. The crisp equivalence of <strong>the</strong> fuzzymodel is a st<strong>and</strong>ard LP model which can be solvedby <strong>the</strong> st<strong>and</strong>ard LP solver.We have tested our model with modified processdata from a F<strong>in</strong>nish steel plant for sta<strong>in</strong>less steelproduction. The aim of <strong>the</strong> experiments is to reproduce<strong>the</strong> products based on <strong>the</strong> crisp equivalentmodel us<strong>in</strong>g <strong>the</strong> available materials <strong>and</strong> evaluate <strong>the</strong>uncerta<strong>in</strong>ty of element concentration on failure risk(failure rate) <strong>and</strong> material cost. The sta<strong>in</strong>lessproducts conta<strong>in</strong> five ma<strong>in</strong> elements: Iron (Fe),Manganese (Mn), Chromium (Cr), NickelNi<strong>and</strong>Molybdenum (Mo). The c<strong>and</strong>idate raw materialsconta<strong>in</strong> at least one of above five elements. To guarantee<strong>the</strong> existence of a feasible solution, we assumethat <strong>the</strong> supply of pure materials that consist of onlyone of above five elements is unlimited. The concentrationsof alloy<strong>in</strong>g elements for raw materialsare represented by <strong>the</strong> mean <strong>and</strong> st<strong>and</strong>ard deviation.The concentrations of alloy<strong>in</strong>g elements for f<strong>in</strong>alproducts are specified by lower <strong>and</strong> upper limits.Table 1 gives <strong>the</strong> concentrations of alloy<strong>in</strong>g elementsfor some raw materials <strong>and</strong> Table 2 gives <strong>the</strong>concentrations of alloy<strong>in</strong>g elements for some f<strong>in</strong>alproducts.Table 1 Concentrations of alloy<strong>in</strong>g elements forsome raw materialsMaterial Element concentrations (%)Mn Cr Ni MoFeCr-1 ± ± ± ±FeNi ± ± ± ±Ferrite -scrap ± ± ± ±LC-scrap ± ± ± ±Acid-proofscrapSc<strong>and</strong>ust scrap±±±±±±± ±Table 2 Concentrations of alloy<strong>in</strong>g elements forsome f<strong>in</strong>al productsProduct Element concentrations (%)Mn Cr Ni Mo710-2 [1,1.4] [16.5,16.9] [6.35,6.55] [0.65,0.8]720-1 [1.6,1.8] [18,18.4] [8.5,8.65] [0,0.4]720-4 [1.4,1.6] [18, 18.4] [10,10.2] [0,0.4]731-1 [1.6,1.8] [17,17.4] [9,9.15] [0,0.4]750-1 [1.4,1.6] [16.7,17.1] [11,11.15] [2,2.2]757-2 [1.5,1.8] [16.6,17] [10.5,10.7] [2.5,2.7]Next, we <strong>in</strong>vestigate failure risk <strong>and</strong> material costbased on stochastic simulation. The specific proceduresare given below.125


First, <strong>the</strong> fuzzy parameters such as <strong>the</strong> element concentrationsfor products <strong>and</strong> raw materials are realized.The realization of <strong>the</strong> concentration of elementi for product k , , isstraightforward. ,<strong>and</strong> correspond to <strong>the</strong>lower <strong>and</strong> upper limits for element concentrationspecified <strong>in</strong> product st<strong>and</strong>ard respectively, <strong>and</strong> . For <strong>the</strong> concentration of elementi for raw material j, ,we assume that element concentrations follow normaldistribution <strong>and</strong> choose suitable confidencefactors n 1 <strong>and</strong> n 2. Then can be realized basedon <strong>the</strong> mean <strong>and</strong> st<strong>and</strong>ard deviation of element concentrationsfor raw materials as discussed <strong>in</strong> Section2.Second, for a fixed aspiration level forelement i <strong>in</strong> product k, we solve <strong>the</strong> crisp equivalenceof <strong>the</strong> fuzzy model presented <strong>in</strong> Section 4 <strong>and</strong>obta<strong>in</strong> <strong>the</strong> selection of raw materials <strong>and</strong> relatedamount for produc<strong>in</strong>g a set of products.F<strong>in</strong>ally, stochastic simulations are performed. R<strong>and</strong>omelement concentrations for scrap are generatedbased on normal distribution. Then based on <strong>the</strong> materialselection <strong>and</strong> related amount <strong>in</strong> <strong>the</strong> secondstep, <strong>the</strong> contribution of <strong>the</strong> scrap to <strong>the</strong> alloy<strong>in</strong>gelements <strong>in</strong> <strong>the</strong> product is computed. If <strong>the</strong> scrapcontribution has already exceeded <strong>the</strong> upper limit of<strong>the</strong> product st<strong>and</strong>ard, <strong>the</strong>n <strong>the</strong> failure is recorded.O<strong>the</strong>rwise, <strong>the</strong>n amount of pure alloy<strong>in</strong>g materials isdeterm<strong>in</strong>ed <strong>and</strong> <strong>the</strong> cost of raw materials is computed.We reproduce 11 products us<strong>in</strong>g 17 raw materials(13 scraps + 4 pure alloy<strong>in</strong>g materials). We test twoscenarios with different uncerta<strong>in</strong>ty degrees. The uncerta<strong>in</strong>tydegree is represented by <strong>the</strong> ratio of mean<strong>and</strong> st<strong>and</strong>ard deviation of <strong>the</strong> element concentrations.In <strong>the</strong> first scenario (S1), <strong>the</strong> maximum uncerta<strong>in</strong>tydegree among all <strong>the</strong> element concentrations<strong>in</strong> all materials is moderate <strong>and</strong> about 30%. In<strong>the</strong> second scenario (S2), <strong>the</strong> uncerta<strong>in</strong>ty degree forall <strong>the</strong> element concentration <strong>in</strong> all materials isdoubled as compared with that of <strong>the</strong> first one. Thatis, <strong>the</strong> mean of each element concentration is sameas that of <strong>the</strong> first scenario while <strong>the</strong> st<strong>and</strong>ard deviationof each element concentration is doubled ascompared with that of <strong>the</strong> first scenario. We choose6 aspiration levels <strong>and</strong> set confidence factors to 3.For each aspiration level <strong>in</strong> each scenario, ten turnsof simulations are run. In each turn, 10 6 sets of r<strong>and</strong>omelement concentrations are generated for <strong>the</strong>selected materials <strong>and</strong> <strong>the</strong>n <strong>the</strong> failure rate <strong>and</strong> materialcost is computed based on 10 6 outcomes. Thenwe aggregate <strong>the</strong> results from ten turns of simulationto obta<strong>in</strong> average failure rate <strong>and</strong> material costs.Table 3 gives <strong>the</strong> average failure rate (FR) <strong>and</strong> normalizedcost (NC) for all of raw materials. The normalizedcost uses <strong>the</strong> cost of <strong>the</strong> total raw materialsfor aspiration level λ=1 <strong>in</strong> <strong>the</strong> first scenario as reference.Table 3 Average failure rate (FR, percentage) <strong>and</strong>normalized cost (NC, percentage) for two scenariosat different aspiration levels.λ S1 S2FR NC FR NC0.75 21.96 98.49 24.45 100.610.8 11.81 98.63 10.53 101.080.85 5.41 98.84 4.71 101.520.9 2.20 99.17 1.80 101.920.95 0.76 99.58 0.61 102.291 0.10 100 0.25 102.63Based on Table 3, <strong>the</strong> failure rate can be controlledby <strong>the</strong> proper comb<strong>in</strong>ation of confidence factors (n 2)<strong>and</strong> aspiration levels (λ) regardless of <strong>the</strong> uncerta<strong>in</strong>tydegree. Here we can <strong>in</strong>duce that <strong>the</strong> failurerate is unacceptable when λ


0.8 29.02 9 31.59 50.85 29.40 8 32.12 50.9 29.68 6 32.57 50.95 30.02 5 32.96 51 30.55 5 33.30 5F<strong>in</strong>ally we discuss <strong>the</strong> mechanism of controll<strong>in</strong>g <strong>the</strong>failure rate. The model reallocates <strong>the</strong> materialsbased on <strong>the</strong> aspiration level. The reallocation <strong>in</strong>cludes<strong>the</strong> <strong>in</strong>crease/decrease of scrap types <strong>and</strong> adjustmentof <strong>the</strong> amount used for each material. Table4 shows cost share (CS) of pure alloy<strong>in</strong>g materials<strong>and</strong> <strong>the</strong> number of different types of scraps selectedfor different scenarios at different aspiration levels.On average we can see that cost share for <strong>the</strong> purealloy<strong>in</strong>g materials <strong>in</strong>creases by about 1.15% fromfailure rate about 5% (aspiration level 0.85) to lessthan 0.3% (aspiration level 1) for both scenarios.When <strong>the</strong> uncerta<strong>in</strong>ty degree doubles (from S1 toS2) <strong>the</strong> cost share <strong>in</strong>creases by about 2.5% for <strong>the</strong>same order of failure rate. Here <strong>the</strong> cost share variationfor <strong>the</strong> pure alloy<strong>in</strong>g materials is co<strong>in</strong>cidentwith <strong>the</strong> overall material cost variation shown <strong>in</strong>Table 3. This implies that <strong>the</strong> material cost <strong>in</strong>creasefor reduc<strong>in</strong>g <strong>the</strong> failure rate ma<strong>in</strong>ly attributes to <strong>the</strong>share <strong>in</strong>crease of <strong>the</strong> pure alloy<strong>in</strong>g materials. Basedon <strong>the</strong> number of scrap types selected for products,we can see <strong>the</strong> material selection can be widened as<strong>the</strong> uncerta<strong>in</strong>ty degree decreases.The mechanism to control <strong>the</strong> failure rate is to <strong>in</strong>crease<strong>the</strong> share of pure alloy<strong>in</strong>g materials <strong>in</strong> a costefficientway. For <strong>the</strong> same scenario, when <strong>the</strong> aspirationlevel decreases, <strong>the</strong> decrease <strong>in</strong> cost share ofalloy<strong>in</strong>g materials means <strong>the</strong> <strong>in</strong>crease <strong>in</strong> share of <strong>the</strong>scrap. This <strong>in</strong> turn means <strong>the</strong> overall uncerta<strong>in</strong>ty for<strong>the</strong> selected material <strong>in</strong>creases. This results <strong>in</strong> simultaneous<strong>in</strong>crease of <strong>the</strong> failure rate <strong>and</strong> decrease of<strong>the</strong> material cost because scrap is much cheaper thanpure alloy<strong>in</strong>g material. For different scenarios, as<strong>the</strong> uncerta<strong>in</strong>ty degree <strong>in</strong>creases, <strong>the</strong> share of <strong>the</strong>pure alloy<strong>in</strong>g materials must <strong>in</strong>crease to realize <strong>the</strong>same <strong>the</strong> order of failure rate.Above simulation results can provide severalguidel<strong>in</strong>es for <strong>the</strong> practical production. First, for <strong>the</strong>rough estimates of <strong>the</strong> element concentrations, alittle bit larger uncerta<strong>in</strong>ty degree estimation can beused to produce <strong>the</strong> <strong>in</strong>itial selection of scrap mixwith less failure risk. Second, <strong>the</strong> scrap mix can bereselected with less material cost based on more preciseestimation for element concentration as moreprocess data are available. F<strong>in</strong>ally, <strong>the</strong> scrap selectionbased on more reliable concentration estimationfrom large quantities of process data can be used toguide <strong>the</strong> material purchase.H<strong>and</strong>l<strong>in</strong>g <strong>the</strong> scrap is one of <strong>the</strong> most importantfunctions for scrap-based steelmak<strong>in</strong>g. Us<strong>in</strong>g <strong>the</strong>wrong grades of scrap will result <strong>in</strong> higher raw materialcosts <strong>and</strong> difficulty <strong>in</strong> meet<strong>in</strong>g product st<strong>and</strong>ard.The objective of <strong>the</strong> scrap charge optimizationis to select <strong>the</strong> most economical scrap mix for eachproduced steel grade while m<strong>in</strong>imiz<strong>in</strong>g <strong>the</strong> failurerisk caused by uncerta<strong>in</strong>ties <strong>in</strong> raw material consistence.In this paper, we first presented <strong>the</strong> fuzzychance constra<strong>in</strong>ed model for <strong>the</strong> scrap charge optimizationbased on product recipe <strong>and</strong> <strong>the</strong>n transformedit <strong>in</strong>to a crisp model based on <strong>the</strong> applicationcontext for solution. Simulation shows that <strong>the</strong> failurerisk can be hedged by <strong>the</strong> proper comb<strong>in</strong>ation of<strong>the</strong> aspiration levels <strong>and</strong> confidence factors for represent<strong>in</strong>g<strong>the</strong> fuzzy number. The mechanism of controll<strong>in</strong>g<strong>the</strong> failure risk aga<strong>in</strong>st uncerta<strong>in</strong>ty is to <strong>in</strong>crease<strong>the</strong> share of <strong>the</strong> expensive pure alloy<strong>in</strong>g materials<strong>in</strong> <strong>the</strong> controlled manner. Therefore, <strong>the</strong>re is atradeoff between controll<strong>in</strong>g failure risk <strong>and</strong> <strong>in</strong>creaseof <strong>the</strong> material cost. The model can be usedfor both determ<strong>in</strong><strong>in</strong>g <strong>the</strong> scrap mix for short-termoperation of <strong>the</strong> melt<strong>in</strong>g shops based on availablematerials <strong>and</strong> for guid<strong>in</strong>g <strong>the</strong> material purchase forlong-term plann<strong>in</strong>g. The model can also be applied<strong>in</strong> o<strong>the</strong>r scrap-based production processes such asalum<strong>in</strong>um <strong>and</strong> copper (Lahdelma 1998). 127


<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 128


Simulat<strong>in</strong>g processes of language emergence, communication<strong>and</strong> agent model<strong>in</strong>gTimo Honkela, Ville Könönen, Ti<strong>in</strong>a L<strong>in</strong>dh-Knuutila <strong>and</strong> Mari-Sanna PaukkeriAdaptive Informatics Research CentreHels<strong>in</strong>ki University of Technology, F<strong>in</strong>l<strong>and</strong>firstname.lastname@tkk.fiAbstractWe discuss two different approaches for model<strong>in</strong>g o<strong>the</strong>r agents <strong>in</strong> multiagent systems. One approach isbased on language between agents <strong>and</strong> model<strong>in</strong>g <strong>the</strong>ir cognitive processes. Ano<strong>the</strong>r approach utilizesgame <strong>the</strong>ory <strong>and</strong> is based on model<strong>in</strong>g utilities of o<strong>the</strong>r agents. In both cases, we discuss how differentmach<strong>in</strong>e learn<strong>in</strong>g paradigms can be utilized for acquir<strong>in</strong>g experience from <strong>the</strong> environment <strong>and</strong> o<strong>the</strong>ragents.1 IntroductionIn this paper, we discuss how <strong>the</strong> emergence of subjectivemodels of <strong>the</strong> world can be simulated us<strong>in</strong>gdifferent approaches <strong>in</strong> learn<strong>in</strong>g <strong>and</strong> what is <strong>the</strong> roleof communication <strong>and</strong> language. We consider, <strong>in</strong>particular, <strong>the</strong> role of unsupervised learn<strong>in</strong>g <strong>in</strong> <strong>the</strong>formation of agents’ conceptual models, <strong>the</strong> orig<strong>in</strong>alsubjectivity of <strong>the</strong>se models, <strong>the</strong> communication <strong>and</strong>learn<strong>in</strong>g processes that lead <strong>in</strong>to <strong>in</strong>tersubjective shar<strong>in</strong>gof concepts, <strong>and</strong> a game <strong>the</strong>oretical approach tomultiagent systems <strong>in</strong>clud<strong>in</strong>g re<strong>in</strong>forcement learn<strong>in</strong>gprocesses.An <strong>in</strong>telligent agent usually has a purpose or agoal, probably set by <strong>the</strong> designer of <strong>the</strong> agent, <strong>and</strong><strong>the</strong> agent tries to act rationally for satisfy<strong>in</strong>g <strong>the</strong> goal.For mak<strong>in</strong>g rational decisions, <strong>the</strong> agent has to modelits environment, perhaps <strong>in</strong>clud<strong>in</strong>g o<strong>the</strong>r agents. In<strong>the</strong> follow<strong>in</strong>g, we consider some specific issues relatedto <strong>the</strong> model<strong>in</strong>g.1.1 Complex <strong>and</strong> non-stationary environmentsIn <strong>the</strong> easiest case, <strong>the</strong> environment <strong>in</strong> which <strong>the</strong>agent is located is static, i.e. all properties of <strong>the</strong> environmentrema<strong>in</strong> constant for <strong>the</strong> whole life-time of<strong>the</strong> agent. However, often <strong>the</strong> situation is not so simple.The properties of <strong>the</strong> environment may vary withtime, i.e. <strong>the</strong> environment is called non-stationary.The non-stationarity may be due to <strong>the</strong> environmentitself or <strong>the</strong> limited resources of <strong>the</strong> agent. For example,<strong>in</strong> many real problem <strong>in</strong>stances, <strong>the</strong> learn<strong>in</strong>gagent is not capable to sense <strong>the</strong> real state of <strong>the</strong> environment<strong>and</strong> thus some relevant properties of <strong>the</strong>environment rema<strong>in</strong> hidden.Ano<strong>the</strong>r example of non-stationarity are multiagentsystems. In <strong>the</strong>se systems, properties of <strong>the</strong> environmentfor each <strong>in</strong>dividual agent depend on <strong>the</strong>actions of all agents located <strong>in</strong> <strong>the</strong> real environment.Thus for act<strong>in</strong>g rationally, agents should model alsoo<strong>the</strong>r agents <strong>in</strong> <strong>the</strong> system.Pfeifer <strong>and</strong> Scheier (1999) stress that <strong>the</strong> behaviorof an agent is always <strong>the</strong> result of systemenvironment<strong>in</strong>teraction. It cannot be expla<strong>in</strong>ed on<strong>the</strong> basis of <strong>in</strong>ternal mechanisms only. They illustratethat <strong>the</strong> complexity that we as observers attribute toa particular behavior does not always <strong>in</strong>dicate accurately<strong>the</strong> complexity of <strong>the</strong> underly<strong>in</strong>g mechanisms.Experiments with very simple robots that merely reactto stimuli <strong>in</strong> <strong>the</strong>ir environment have shown thatra<strong>the</strong>r complex behavior can emerge.1.2 Subjective versus <strong>in</strong>tersubjectiveMoore <strong>and</strong> Carl<strong>in</strong>g (1988) state that “[l]anguages are<strong>in</strong> some respect like maps. If each of us sees <strong>the</strong>world from our particular perspective, <strong>the</strong>n an <strong>in</strong>dividual’slanguage is, <strong>in</strong> a sense, like a map of <strong>the</strong>irworld. Try<strong>in</strong>g to underst<strong>and</strong> ano<strong>the</strong>r person is liketry<strong>in</strong>g to read a map, <strong>the</strong>ir map, a map of <strong>the</strong> worldfrom <strong>the</strong>ir perspective.” In many computational approachesto semantics <strong>and</strong> conceptual model<strong>in</strong>g, anobjective po<strong>in</strong>t of view has been used: It is assumedthat all <strong>the</strong> agents have a shared underst<strong>and</strong><strong>in</strong>g <strong>and</strong>representation of <strong>the</strong> doma<strong>in</strong> of discourse. However,Moore <strong>and</strong> Carl<strong>in</strong>g’s statement emphasizes <strong>the</strong> needfor explicit model<strong>in</strong>g of <strong>the</strong> o<strong>the</strong>r’s po<strong>in</strong>t of view.129


This requires model<strong>in</strong>g of <strong>the</strong> subjective use of languagebased on examples, <strong>and</strong>, fur<strong>the</strong>rmore, to model<strong>in</strong>tersubjectivity, i.e. to have a model of <strong>the</strong> contentsof o<strong>the</strong>r subjective models.As an example related to <strong>the</strong> vocabulary problem,two persons may have different conceptual or term<strong>in</strong>ological“density” of <strong>the</strong> topic under consideration.A layman, for <strong>in</strong>stance, is likely to describe a phenomenon<strong>in</strong> general terms whereas an expert usesmore specific terms.1.3 Learn<strong>in</strong>g agentsDifferent mach<strong>in</strong>e learn<strong>in</strong>g techniques can be utilizedfor add<strong>in</strong>g adaptivity to agent-based systems. Thereare basically three major learn<strong>in</strong>g paradigms <strong>in</strong> mach<strong>in</strong>elearn<strong>in</strong>g: supervised learn<strong>in</strong>g, unsupervisedlearn<strong>in</strong>g <strong>and</strong> re<strong>in</strong>forcement learn<strong>in</strong>g. In supervisedlearn<strong>in</strong>g, <strong>the</strong>re exists a teacher hav<strong>in</strong>g knowledge of<strong>the</strong> environment, <strong>in</strong> <strong>the</strong> form of <strong>in</strong>put-output pairs,<strong>and</strong> <strong>the</strong> learn<strong>in</strong>g system for which <strong>the</strong> environmentis unknown. The teacher provides samples from <strong>the</strong>environment by giv<strong>in</strong>g correct outputs to <strong>in</strong>puts <strong>and</strong><strong>the</strong> goal of <strong>the</strong> learn<strong>in</strong>g system is to learn to emulate<strong>the</strong> teacher <strong>and</strong> to generalize <strong>the</strong> samples to unseendata. In unsupervised learn<strong>in</strong>g, contrary to supervisedlearn<strong>in</strong>g, <strong>the</strong>re exists no external teacher <strong>and</strong><strong>the</strong>refore no correct outputs are provided. Re<strong>in</strong>forcementlearn<strong>in</strong>g lies between supervised <strong>and</strong> unsupervisedlearn<strong>in</strong>g: Correct answers are not provided directlyto <strong>the</strong> learn<strong>in</strong>g system but <strong>the</strong> features of <strong>the</strong>environment are learned by cont<strong>in</strong>uously <strong>in</strong>teract<strong>in</strong>gwith it. The learn<strong>in</strong>g system takes actions <strong>in</strong> <strong>the</strong> environment<strong>and</strong> receives reward signals from <strong>the</strong> environmentcorrespond<strong>in</strong>g to <strong>the</strong>se action selections.2 Unsupervised learn<strong>in</strong>g of conceptualsystemsIn <strong>the</strong> follow<strong>in</strong>g, we consider <strong>the</strong> unsupervised learn<strong>in</strong>gof conceptual systems. We first study <strong>the</strong> model<strong>in</strong>gan <strong>in</strong>dividual agent that learns to create a conceptualspace of its own <strong>and</strong> learns to associate words<strong>and</strong> expressions with conceptual space. The notion ofconceptual space is taken from Gärdenfors who alsopresents <strong>the</strong> basic motivation <strong>and</strong> framework for deal<strong>in</strong>gwith conceptual spaces (Gärdenfors, 2000). Afterconsider<strong>in</strong>g one <strong>in</strong>dividual agent, we consider a multiagentsystem <strong>in</strong> which a shared conceptual systemis formed <strong>in</strong> a self-organized manner.2.1 One agentThe Self-Organiz<strong>in</strong>g Map (SOM) (Kohonen, 1982,2001) is an unsupervised learn<strong>in</strong>g model whichis often considered as an artificial neural networkmodel, especially of <strong>the</strong> experimentally found ordered“maps” <strong>in</strong> <strong>the</strong> cortex. The SOM can be used asa central component of a simulation model <strong>in</strong> whichan agent learns a conceptual space, e.g. based on data<strong>in</strong> which words are “experienced” <strong>in</strong> <strong>the</strong>ir due contexts(Ritter <strong>and</strong> Kohonen, 1989). This approach hasbeen used, for <strong>in</strong>stance, to analyze <strong>the</strong> collection ofGrimm fairy tales. In <strong>the</strong> result<strong>in</strong>g map, <strong>the</strong>re are areasof categories such as verbs <strong>and</strong> nouns. With<strong>in</strong> <strong>the</strong>area of nouns a dist<strong>in</strong>ction between animate <strong>and</strong> <strong>in</strong>animatenouns emerges (Honkela et al., 1995). The basicidea is that an agent is able to form autonomouslya conceptual mapp<strong>in</strong>g of <strong>the</strong> <strong>in</strong>put based on <strong>the</strong> <strong>in</strong>putitself.2.2 Community of agentsThe basic approach how autonomous agents couldlearn to communicate <strong>and</strong> form an <strong>in</strong>ternal model of<strong>the</strong> environment apply<strong>in</strong>g self-organiz<strong>in</strong>g map algorithmwas <strong>in</strong>troduced, <strong>in</strong> a simple form, <strong>in</strong> (Honkela,1993). Later we developed fur<strong>the</strong>r <strong>the</strong> framework thatwould enable model<strong>in</strong>g <strong>the</strong> degree of conceptual autonomyof natural <strong>and</strong> artificial agents (Honkela et al.,2003). The basic claim was that <strong>the</strong> aspects relatedto learn<strong>in</strong>g <strong>and</strong> communication necessitate adaptiveagents that are partially autonomous. We demonstratedhow <strong>the</strong> partial conceptual autonomy can beobta<strong>in</strong>ed through a self-organization process. The <strong>in</strong>putfor <strong>the</strong> agents consists of perceptions of <strong>the</strong> environment,expressions communicated by o<strong>the</strong>r agentsas well as <strong>the</strong> recognized identities of o<strong>the</strong>r agents(Honkela et al., 2003). A prelim<strong>in</strong>ary implementationof a simulated community of communicat<strong>in</strong>g agentsbased on <strong>the</strong>se ideas did not succeed to fully demonstrate<strong>the</strong> emergence of a shared language (Honkela<strong>and</strong> W<strong>in</strong>ter, 2003).When language games (Wittgenste<strong>in</strong>, 1953) was<strong>in</strong>cluded <strong>in</strong> <strong>the</strong> simulation model, it resulted <strong>in</strong> a simplelanguage emerg<strong>in</strong>g <strong>in</strong> a population of communicat<strong>in</strong>gautonomous agents (L<strong>in</strong>dh-Knuutila, 2005).In this population, each agent was able to create<strong>the</strong>ir own associations between <strong>the</strong> conceptual level<strong>and</strong> <strong>the</strong> emerged words, although each agent hada slightly different conceptual representation of <strong>the</strong>world. The learn<strong>in</strong>g paradigm for <strong>the</strong> conceptuallearn<strong>in</strong>g was fundamentally unsupervised, but <strong>the</strong>language learn<strong>in</strong>g tested has been so far supervised,i.e. <strong>the</strong> communicat<strong>in</strong>g agents are provided feedback<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 130


of <strong>the</strong> outcome of <strong>the</strong> game as well as <strong>the</strong> “right answer”.The re<strong>in</strong>forcement learn<strong>in</strong>g <strong>and</strong> <strong>the</strong> unsupervisedlearn<strong>in</strong>g models for language games rema<strong>in</strong> tobe implemented.3 Game <strong>the</strong>oretical approach formultiagent systemsAs discussed <strong>in</strong> Section 1, an <strong>in</strong>telligent agent usuallyhas a goal. For study<strong>in</strong>g agent based systemsformally, e.g. for develop<strong>in</strong>g learn<strong>in</strong>g algorithms for<strong>in</strong>telligent agents, it is useful that <strong>the</strong> goal can be expressedma<strong>the</strong>matically. Traditionally approach is todef<strong>in</strong>e an utility function for <strong>the</strong> agent, i.e. <strong>the</strong>re is ascalar value connected to each possible action measur<strong>in</strong>g<strong>the</strong> fitness of <strong>the</strong> action choice for satisfy<strong>in</strong>g<strong>the</strong> goal of <strong>the</strong> agent. The utility function is often<strong>in</strong>itially unknown <strong>and</strong> must be learned by <strong>in</strong>teract<strong>in</strong>gwith <strong>the</strong> environment. Mach<strong>in</strong>e learn<strong>in</strong>g techniquescan be utilized <strong>in</strong> this learn<strong>in</strong>g process, consider e.g.(Könönen, 2004b; Könönen <strong>and</strong> Oja, 2004; Könönen,2004a).3.1 One agentIn s<strong>in</strong>gle-agent systems, achiev<strong>in</strong>g <strong>the</strong> rational behavioris simple: <strong>the</strong> agent always selects an action with<strong>the</strong> highest utility value. There exists a vast number oflearn<strong>in</strong>g methods that utilize, <strong>in</strong> one way or ano<strong>the</strong>r,<strong>the</strong> rational decision mak<strong>in</strong>g <strong>in</strong> agent-based systems.3.2 Community of agentsThe branch of science study<strong>in</strong>g decision mak<strong>in</strong>g <strong>in</strong>s<strong>in</strong>gle-agent systems is called decision <strong>the</strong>ory. However,when <strong>the</strong>re exists multiple active decision makers(agents) <strong>in</strong> <strong>the</strong> same environment, decision <strong>the</strong>oryis not suitable for achiev<strong>in</strong>g rational behavior anymore. Game <strong>the</strong>ory is an extension of decision <strong>the</strong>oryto multiagent systems. In game <strong>the</strong>ory, agents explicitlymodel <strong>the</strong> dependency of <strong>the</strong>ir utility functionson <strong>the</strong> actions of all agents <strong>in</strong> <strong>the</strong> system. The goal of<strong>the</strong> agents is to f<strong>in</strong>d equilibrium actions, i.e. <strong>the</strong> actionsthat maximize <strong>the</strong>ir utility values assum<strong>in</strong>g <strong>the</strong>all agents will use <strong>the</strong> same equilibrium. Jäger (2006)applies game <strong>the</strong>ory to exam<strong>in</strong>e <strong>the</strong> shape formation<strong>in</strong> <strong>the</strong> conceptual spaces of <strong>the</strong> agents (Gärdenfors,2000).Theoretically, game <strong>the</strong>ory provides a perfect toolfor model<strong>in</strong>g multiagent systems. In practice, <strong>the</strong>reare many problems with game <strong>the</strong>ory. For example<strong>the</strong>re can exist multiple equilibria <strong>and</strong> <strong>the</strong> agentsshould coord<strong>in</strong>ate which one <strong>the</strong>y will select. For calculat<strong>in</strong>gan equilibrium, <strong>the</strong> agents should not onlymodel <strong>the</strong>ir own utility function but also <strong>the</strong> functionsof all o<strong>the</strong>r agents <strong>in</strong> <strong>the</strong> system. This is often<strong>in</strong>tractable <strong>and</strong> <strong>the</strong>refore some o<strong>the</strong>r methods,e.g. Bayesian techniques, should be used for creat<strong>in</strong>gmore coarser models of o<strong>the</strong>r agents. By us<strong>in</strong>g<strong>the</strong>se “external” models, <strong>the</strong> game <strong>the</strong>oretical problemreduces to <strong>the</strong> simpler problem solvable by us<strong>in</strong>gdecision <strong>the</strong>ory.4 DiscussionLanguage does not need to be viewed pla<strong>in</strong>ly as ameans for label<strong>in</strong>g <strong>the</strong> world but as an <strong>in</strong>strument bywhich <strong>the</strong> society <strong>and</strong> <strong>the</strong> <strong>in</strong>dividuals with<strong>in</strong> it constructa model of <strong>the</strong> world. The world is cont<strong>in</strong>uous<strong>and</strong> chang<strong>in</strong>g. Thus, <strong>the</strong> language is a medium of abstractionra<strong>the</strong>r than a tool for creation <strong>and</strong> mediationof an accurate “picture” of <strong>the</strong> world. The po<strong>in</strong>t ofview chosen is always subject to some criteria of relevanceor usefulness. This is not only true for <strong>the</strong><strong>in</strong>dividual expressions that are used <strong>in</strong> communicationbut also concerns <strong>the</strong> creation or emergence ofconceptual systems. It makes sense to make such dist<strong>in</strong>ctions<strong>in</strong> a language that are useful <strong>in</strong> one way ano<strong>the</strong>r.In this paper, we have discussed <strong>the</strong> role of unsupervisedlearn<strong>in</strong>g <strong>in</strong> <strong>the</strong> formation of agents’ conceptualmodels <strong>in</strong> a non-stationary environment <strong>and</strong> agame <strong>the</strong>oretical approach for multiagent systems. In<strong>the</strong> future, we will study game <strong>the</strong>oretical models forlanguage games <strong>and</strong> how to apply mach<strong>in</strong>e learn<strong>in</strong>gapproaches for solv<strong>in</strong>g <strong>the</strong>se games.ReferencesPeter Gärdenfors. Conceptual Spaces. MIT Press,2000.Timo Honkela. Neural nets that discuss: a generalmodel of communication based on self-organiz<strong>in</strong>gmaps. In S. Gielen <strong>and</strong> B. Kappen, editors, Proceed<strong>in</strong>gsof ICANN’93, International Conferenceon <strong>Artificial</strong> Neural Networks, pages 408–411,Amsterdam, <strong>the</strong> Ne<strong>the</strong>rl<strong>and</strong>s, September 1993.Spr<strong>in</strong>ger-Verlag, London.Timo Honkela <strong>and</strong> Juha W<strong>in</strong>ter. Simulat<strong>in</strong>g languagelearn<strong>in</strong>g <strong>in</strong> community of agents us<strong>in</strong>g selforganiz<strong>in</strong>gmaps. Technical Report A71, Hels<strong>in</strong>kiUniversity of Technology, Laboratory of Computer<strong>and</strong> Information Science, Espoo, F<strong>in</strong>l<strong>and</strong>, 2003.131


Timo Honkela, Ville Pulkki, <strong>and</strong> Teuvo Kohonen.Contextual relations of words <strong>in</strong> Grimm tales analyzedby self-organiz<strong>in</strong>g map. In Proceed<strong>in</strong>gs ofICANN-95, International Conference on <strong>Artificial</strong>Neural Networks, volume 2, pages 3–7. EC2 etCie, 1995.Timo Honkela, Kev<strong>in</strong> I. Hynnä, <strong>and</strong> Tarja Knuuttila.Framework for model<strong>in</strong>g partial conceptualautonomy of adaptive <strong>and</strong> communicat<strong>in</strong>g agents.In Proceed<strong>in</strong>gs of Cognitive Science Conference,2003.Gerhard Jäger. Convex mean<strong>in</strong>gs <strong>and</strong> evolutionarystability. In Proceed<strong>in</strong>gs of 6th Int. Conf. on <strong>the</strong>Evolution of Language, 2006.Teuvo Kohonen. Self-Organiz<strong>in</strong>g Maps. Spr<strong>in</strong>ger,Berl<strong>in</strong>, Heidelberg, 2001.Teuvo Kohonen. Self-organiz<strong>in</strong>g formation of topologicallycorrect feature maps. Biological Cybernetics,43(1):59–69, 1982.Ville J. Könönen. Policy gradient method for teamMarkov games. In Proceed<strong>in</strong>gs of <strong>the</strong> Fifth InternationalConference on Intelligent Data Eng<strong>in</strong>eer<strong>in</strong>g<strong>and</strong> Automated Learn<strong>in</strong>g (IDEAL-2004), pages733–739, Exeter, UK, 2004a.Ville J. Könönen. Asymmetric multiagent re<strong>in</strong>forcementlearn<strong>in</strong>g. <strong>Web</strong> <strong>Intelligence</strong> <strong>and</strong> Agent Systems:An International Journal (WIAS), 2(2):105–121, 2004b.Ville J. Könönen <strong>and</strong> Erkki Oja. Asymmetric multiagentre<strong>in</strong>forcement learn<strong>in</strong>g <strong>in</strong> pric<strong>in</strong>g applications.In Proceed<strong>in</strong>gs of <strong>the</strong> International Jo<strong>in</strong>tConference on Neural Networks (IJCNN-2004),pages 1097–1102, Budapest, Hungary, 2004.Ti<strong>in</strong>a L<strong>in</strong>dh-Knuutila. Simulat<strong>in</strong>g <strong>the</strong> emergence ofa shared conceptual system <strong>in</strong> a multi-agent environment.Master’s <strong>the</strong>sis, Hels<strong>in</strong>ki University ofTechnology, Laboratory of Computer <strong>and</strong> InformationScience, 2005.Terence Moore <strong>and</strong> Chris Carl<strong>in</strong>g. The Limitations ofLanguage. Macmillan Press, Houndmills, 1988.Rolf Pfeifer <strong>and</strong> Christian Scheier. Underst<strong>and</strong><strong>in</strong>g<strong>Intelligence</strong>. MIT Press, Cambridge, MA, 1999.Helge Ritter <strong>and</strong> Teuvo Kohonen. Self-organiz<strong>in</strong>g semanticmaps. Biological Cybernetics, 61(4):241–254, 1989.Ludwig Wittgenste<strong>in</strong>. Philosophical Investigations.Blackwell Publishers, Oxford, 1953.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 132


Program Comprehension Theories <strong>and</strong>Prolog based MethodologiesErkki LaitilaA Department of Ma<strong>the</strong>matical Information Technology,University of Jyväskylä, P.O. Box 35,FIN-40014 Jyväskyläerkki.laitila@swmaster.fiSwMaster OySääksmäentie 14, 40520 JKLAbstractSoftware ma<strong>in</strong>tenance is said to account for more than 50 % of all software efforts. Of this <strong>the</strong> attemptsto underst<strong>and</strong> <strong>the</strong> code can take 70 %. In spite of its importance, program comprehension isnot well understood. This paper tells how Prolog can be used <strong>in</strong> model<strong>in</strong>g source code. An essentiallynew method, symbolic analysis, is presented <strong>and</strong> compared to static <strong>and</strong> dynamic analyses,which form <strong>the</strong> bulk of <strong>the</strong> current practices . We will show how a multi-paradigm tool, VisualProlog, can serve as an excellent model formulation tool <strong>in</strong> describ<strong>in</strong>g complex source code to covertypical program underst<strong>and</strong><strong>in</strong>g models1 IntroductionProgrammers are frequently struggl<strong>in</strong>g with programcomprehension (PC) tasks when plann<strong>in</strong>g <strong>and</strong>prepar<strong>in</strong>g changes <strong>in</strong>to code. A typical ma<strong>in</strong>tenancetask is a confirmed change request. Before <strong>the</strong>change can safely be implemented, <strong>the</strong> code must atfirst be understood (von Mayrhauser 97).Although a number of new technologies havebeen created s<strong>in</strong>ce <strong>the</strong> 70’s, writ<strong>in</strong>g object orientedsource code is not easy. Bezev<strong>in</strong> has described developmentdifficulties <strong>in</strong> his illustratively (05). Animportant <strong>the</strong>me <strong>in</strong> his document is <strong>the</strong> impedancemismatch between bus<strong>in</strong>ess <strong>and</strong> software. Problemswrit<strong>in</strong>g code <strong>the</strong> problems <strong>in</strong> underst<strong>and</strong><strong>in</strong>g it becauseof <strong>the</strong> mismatch.A number of <strong>the</strong>ories have been written for underst<strong>and</strong><strong>in</strong>gprocedural programs (Penn<strong>in</strong>gton 87)<strong>and</strong> a few for underst<strong>and</strong><strong>in</strong>g object-oriented programs(Burl<strong>in</strong>gton 02). The <strong>in</strong>tegrated mental modelis a well-established framework with three approaches:1) top-down model, 2) bottom-up model<strong>and</strong> 3) situation model that refers to doma<strong>in</strong> <strong>in</strong>formation,too (von Mayrhauser 97).Figure 1: An analogy to program b<strong>in</strong>d<strong>in</strong>gs.Figure 1 illustrates molecular structures with b<strong>in</strong>d<strong>in</strong>gs.It resembles source code <strong>in</strong> that both it also hasb<strong>in</strong>d<strong>in</strong>gs. The most important po<strong>in</strong>t <strong>in</strong> software is tounderst<strong>and</strong> how to match different approaches likedoma<strong>in</strong> <strong>in</strong>formation <strong>and</strong> program flows, <strong>and</strong> plansbeh<strong>in</strong>d <strong>the</strong>m. Object-oriented code causes someproblems of its own, because <strong>in</strong>vocations are hidden<strong>in</strong> modules. Fur<strong>the</strong>r, dynamic b<strong>in</strong>d<strong>in</strong>gs of objects arenot visible, <strong>the</strong>y must be traced step-by-step byread<strong>in</strong>g <strong>the</strong> code.133


Ma<strong>in</strong>tenance Comprehensiontasks to beautomatedPostition<strong>in</strong>g <strong>in</strong>code analysis scienceStaticDynamicVerificationResults toma<strong>in</strong>tenanceContributionFormulat<strong>in</strong>g• Modularity: each model should be divided<strong>in</strong>to smaller units.• Transformability: <strong>the</strong> model should allowtransformation for o<strong>the</strong>r purposes.• Executability: <strong>the</strong> model <strong>and</strong> possibly <strong>the</strong>code should be executable for verificationpurposes.<strong>New</strong>formulation<strong>New</strong>symbolicapproachFigure 2. Symbolic approach.We will build a unified concept framework start<strong>in</strong>gfrom ma<strong>in</strong>tenance (Figure 2) to connect exist<strong>in</strong>gcomprehension requirements apply<strong>in</strong>g strong reductionismby us<strong>in</strong>g Visual Prolog <strong>in</strong> <strong>the</strong> formulation.This new symbolic approach, or ra<strong>the</strong>r a symbolicmodel, is comparable with static <strong>and</strong> dynamicanalyses.This paper is organized as follows. Section 2 describesrelated work while Section 3 considers <strong>the</strong>selected approach. Section 4 presents a layered architectureof a symbolic model for tools. Section 5conta<strong>in</strong>s <strong>the</strong> essential def<strong>in</strong>itions. Section 6 presentsa small Java example <strong>and</strong> Section 7 <strong>the</strong> architectureshortly. Section 8 describes a tool named JavaMaster<strong>and</strong> Section 9 Visual Prolog underst<strong>and</strong><strong>in</strong>g <strong>in</strong>general. F<strong>in</strong>ally, Section 10 concludes <strong>the</strong> paper.2 Source code modelsVisualPrologWidely used methods for PC <strong>in</strong>clude reverse eng<strong>in</strong>eer<strong>in</strong>g,UML–diagrams, document brows<strong>in</strong>g, <strong>and</strong>code exploration by editor. These methods providestatic <strong>in</strong>formation. Dynamic behavior <strong>in</strong>formation ismuch harder to capture, because captur<strong>in</strong>g it requiresdebugg<strong>in</strong>g <strong>the</strong> complete <strong>in</strong>stallation.The focus of software science is on develop<strong>in</strong>gmodels. It has been argued that <strong>the</strong> paradigm of object-orientedprogramm<strong>in</strong>g is to be replaced by aparadigm of model eng<strong>in</strong>eer<strong>in</strong>g (Bezev<strong>in</strong> 2005). Thema<strong>in</strong> idea of model driven architectures (MDA2005) is summarized as “everyth<strong>in</strong>g is a model”.However, <strong>the</strong>re are many model<strong>in</strong>g technologies <strong>and</strong>no consensus on how to use <strong>the</strong>m. Some alternativesare grammarware, xml, <strong>and</strong> ontologies, <strong>in</strong>clud<strong>in</strong>gsemantic web <strong>and</strong> MDA.OMG has, as a non-scientific organization, presented<strong>the</strong> ma<strong>in</strong> requirements for a model<strong>in</strong>g evaluationframework (OMG 05):• Traceability: data for <strong>the</strong> model should betraceable to its orig<strong>in</strong>al source.The most detailed model, FAMIX (Famix 1999),was created <strong>in</strong> a large project. Unfortunately, it conta<strong>in</strong>sonly a static part. Dynamic models have notbeen implemented to cover all <strong>the</strong> source code. Oneessential problem <strong>in</strong> describ<strong>in</strong>g dynamic models <strong>in</strong>class based architectures is how to express logicconnections between elements. The best way, aclass-oriented architecture, like Java or C++, canconnect th<strong>in</strong>gs is by creat<strong>in</strong>g an association classcomb<strong>in</strong>ed with two association end objects. Thisproduces two excess class types <strong>and</strong> <strong>the</strong> correspondentobjects. It makes model<strong>in</strong>g <strong>in</strong> MDA very complex.3 Research focusFor <strong>the</strong> research we set a goal to def<strong>in</strong>e a unifiedconcept to f<strong>in</strong>d a model between written code <strong>and</strong> itsbehavior <strong>in</strong> order to match <strong>the</strong>se with user doma<strong>in</strong><strong>in</strong>formation (Figure 3). In this figure, <strong>the</strong> X-axisrepresents written code (what), <strong>the</strong> Y-axis its objectbasedbehavior (when), <strong>and</strong> <strong>the</strong> Z-axis user concepts(how).If we mark <strong>the</strong> syntax by <strong>the</strong> letter X, we can use <strong>the</strong>notation Y = f (X) to describe a control flow start<strong>in</strong>gfrom any start<strong>in</strong>g symbol X. A control flow conta<strong>in</strong>sa group of methods call<strong>in</strong>g each o<strong>the</strong>r with dependencies<strong>in</strong>cluded:Y = y(Start) = f1 • f2 • • Target.3.1 Control flow is essentialThe control flow y(Start) builds a semantic behaviormodel for a current situation (Section 5, later). Byus<strong>in</strong>g this <strong>in</strong>vocation vector as <strong>in</strong>put, all <strong>in</strong>terest<strong>in</strong>g<strong>in</strong>formation relat<strong>in</strong>g to <strong>the</strong> referred methods can becollected from <strong>the</strong>ir statements transitively. This<strong>in</strong>formation, when filtered <strong>and</strong> grouped accord<strong>in</strong>g touser options, builds a pragmatic high abstractionsituation model (von Mayrhauser 97). It will create anew projection Z that is <strong>in</strong> fact a group of c<strong>and</strong>idatesthat are expla<strong>in</strong><strong>in</strong>g <strong>the</strong> selected use case. A c<strong>and</strong>idateis any symbolic name written by <strong>the</strong> programmer,like a class, a method or a doma<strong>in</strong> name suchas bluetooth or a database symbol if <strong>the</strong>se terms aremapped <strong>in</strong>to a model dictionary.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 134


As a result we will get a useful mapp<strong>in</strong>g betweenall <strong>the</strong> dimensions because <strong>the</strong> tool can visualize <strong>the</strong>results <strong>in</strong> many ways, for example resembl<strong>in</strong>g Figure1.ZYUser doma<strong>in</strong>How ?Dynamic behaviorWhen?Static codeWhat?XFigure 3. Reductionist research model.3.2 Reasons for selectionsWhy Java was selected as a “patient”, a language tobe analyzed? It is a popular <strong>and</strong> much studied programm<strong>in</strong>glanguage but can suffer from comprehensionproblems. So show<strong>in</strong>g what <strong>the</strong> research cancontribute to Java, <strong>in</strong> respect to <strong>the</strong> problem po<strong>in</strong>tedat, has essential value for <strong>the</strong> research.Why Visual Prolog was selected as a “doctor”,a language to implement <strong>the</strong> tool? The reason wasthat Java models conta<strong>in</strong> a great amount of heavylogic <strong>and</strong> object-based <strong>in</strong>formation, so a multiparadigmtool is needed. There are not many suchtools.4 Program ComprehensionarchitectureThere are numerous design patterns for creat<strong>in</strong>g datamodels <strong>and</strong> for <strong>in</strong>teractive systems. Because of itscomplex structures, <strong>the</strong> most essential implementationrequirement for reverse eng<strong>in</strong>eer<strong>in</strong>g is layeredarchitecture. For our work we have selected a comb<strong>in</strong>ationof two exist<strong>in</strong>g architecture models: MDA<strong>and</strong> PCMEF.MDA def<strong>in</strong>es <strong>the</strong> follow<strong>in</strong>g levels:• M0 - source code files.• M1 - parsed structures as classes.• M2 - a model based on class def<strong>in</strong>itions.• M3 - a meta meta model where <strong>the</strong> most essentialterm is a def<strong>in</strong>ition element. It is especiallysuitable for transformation.The second reference architecture, PCMEF, has <strong>the</strong>follow<strong>in</strong>g practical structure:• Foundation (F) is <strong>the</strong> base of <strong>the</strong> model, it def<strong>in</strong>es<strong>the</strong> notation for <strong>in</strong>formation• Entity (E) is <strong>the</strong> unit to make <strong>the</strong> model• Mediator (M) is a facade to <strong>the</strong> model classesthat refer to user <strong>in</strong>terface.• Controller (C) is a feature to control <strong>the</strong> actions<strong>and</strong> events of <strong>the</strong> tool.• Presentation (P) is <strong>the</strong> display side of <strong>the</strong> user<strong>in</strong>terface.We comb<strong>in</strong>ed <strong>the</strong>se two methods to connect code<strong>and</strong> models <strong>in</strong>to ma<strong>in</strong>tenance:M0M1M2M3M4M5M6M7Table 1. Result<strong>in</strong>g Architecture Layers.Java files <strong>and</strong> packages <strong>in</strong> diskParse trees as Java semanticsHigher level notation, a symbolic language asa foundation (F)Complete symbolic model for <strong>the</strong> code withsymbolic elements (E)Mediator (M) to master <strong>the</strong> modelController (C) to implement messag<strong>in</strong>gUser <strong>in</strong>terface for solv<strong>in</strong>g user hypo<strong>the</strong>ses asmodel queries.Presentation (P) <strong>in</strong> visualiz<strong>in</strong>g ma<strong>in</strong>tenancetask <strong>in</strong>formation.5 Def<strong>in</strong>itions for symbolic modelTraditional programm<strong>in</strong>g languages work numerically.Numeric evaluation means that <strong>the</strong> programcalculates terms that are directly compatible withlanguage types (Sun 03). Therefore it cannot h<strong>and</strong>leunknown <strong>in</strong>formation, external symbols or <strong>in</strong>terfaces.Contrary to this, us<strong>in</strong>g unknown external <strong>in</strong>formation,like a variable X, as a reference is not aproblem <strong>in</strong> symbolic evaluation.5.1 Symbolic analysisSymbolic evaluation of code was first described byCheatham et al (Cheatham 1979). We def<strong>in</strong>e symbolicanalysis as a process to simulate orig<strong>in</strong>alsource code to obta<strong>in</strong> symbolic results for programcomprehension purposes. The follow<strong>in</strong>g list conta<strong>in</strong>s<strong>the</strong> mapp<strong>in</strong>g from <strong>the</strong> analysis <strong>in</strong>to VisualProlog:1. Symbolic term is an <strong>in</strong>dividual Vip term.2. Symbolic def<strong>in</strong>ition is a Vip clause to def<strong>in</strong>erelations between terms.3. Symbolic evaluation is a task (goal or subgoal)to unify <strong>and</strong> solve <strong>the</strong> values for asymbolic def<strong>in</strong>ition.4. Simulation is a process to execute successivesymbolic evaluations for a query.135


5. Symbolic result set is a set of outputs.6. Symbolic presentation is a view to displaysymbolic results.5.2 Source codeUML has def<strong>in</strong>ed a large framework for objectorienteddevelopment (Arlow, Neustadt 2002). It istoo complex to be used for evaluation. So <strong>the</strong> smallestpossible def<strong>in</strong>ition for Java <strong>in</strong>formation isneeded for evaluation purposes <strong>in</strong> order to reachmaximal throughput.A simplified set for UML can be def<strong>in</strong>ed to be aJava <strong>in</strong>formation model. It conta<strong>in</strong>s <strong>the</strong> follow<strong>in</strong>gterms: element, message, <strong>in</strong>fluence, block <strong>and</strong> resultset. The ma<strong>in</strong> benefit of this simplified approach,compared with UML, is that symbolic <strong>in</strong>formationcan be evaluated <strong>in</strong>tensively. Fur<strong>the</strong>rmore, because<strong>the</strong> elements conta<strong>in</strong> <strong>the</strong>ir type <strong>in</strong>formation, <strong>the</strong>secan be translated <strong>in</strong>to UML diagrams (class, state<strong>and</strong> sequence diagrams). This is an excellent tool forport<strong>in</strong>g <strong>and</strong> verification purposes.6 Java exampleFigure 4 gives is a very small excerpt from <strong>the</strong> beg<strong>in</strong>n<strong>in</strong>gof a typical Java program.class Server {ma<strong>in</strong>(Str<strong>in</strong>g[] args) {if (port == 0)port = Int.parseInt(args[0])new Server(port);}}The call tree is important for trac<strong>in</strong>g o<strong>the</strong>r features,too, because it def<strong>in</strong>es active code <strong>and</strong> causal orders.Some ma<strong>in</strong> benefits of symbolic analysis are partialevaluation, simulation of selected methods <strong>and</strong> <strong>in</strong>determ<strong>in</strong>istic,exhaustive search of terms <strong>in</strong>clud<strong>in</strong>gsimulation of dynamic b<strong>in</strong>d<strong>in</strong>gs.7 ImplementationIn this Section a data flow from code <strong>in</strong>to user <strong>in</strong>terfaceis described.7.1 Layer M0: LanguageIn order to write a source code tool a grammar isneeded. For Java <strong>the</strong>re is an excellent specificationmade by Sun (Sun 2003). Grammars def<strong>in</strong>e syntax<strong>and</strong> any valid type of a parse tree for each program.The structure of a parse tree corresponds to <strong>the</strong> order<strong>in</strong> which different parts of <strong>the</strong> program are executed.Thus, grammars contribute to <strong>the</strong> def<strong>in</strong>ition of semantics(<strong>Web</strong>ber 2005).7.2 Grammar technologyPDC has created a grammar notation, GRM, <strong>and</strong> aparser generator for PDC Prolog described <strong>in</strong> <strong>the</strong>Toolbox (PDC Toolbox 1990). It is based on differencelists <strong>and</strong> top-down pars<strong>in</strong>g. GRM-notationmakes it possible to seamlessly comb<strong>in</strong>e syntax <strong>and</strong>wanted semantics of each term. Still, it is <strong>the</strong> responsibility/possibilityof <strong>the</strong> user to def<strong>in</strong>e <strong>the</strong> semanticsfor pars<strong>in</strong>g orders, for example, correctly(Laitila 1996).In explor<strong>in</strong>g code, programmers use a short set ofquestions (Letovksy 86) <strong>and</strong> alternative approaches(Penn<strong>in</strong>gton 1987). The most typical questions be<strong>in</strong>gasked are: what, why <strong>and</strong> how. Let us have someexamples:• What does class Server do?• Why did constructor Server start?• How does it work?The most useful way to start <strong>in</strong>vestigat<strong>in</strong>g this is tofollow <strong>the</strong> ma<strong>in</strong> call tree (Fig 4).Figure 4. Beg<strong>in</strong>n<strong>in</strong>g of call tree for class Server.Figure 5. SwToolFactory: Universal generator.SwMaster Oy has developed a Visual Prolog –based tool named SwToolFactory (Fig 5). It is completelyobject-oriented <strong>and</strong> conta<strong>in</strong>s <strong>the</strong> follow<strong>in</strong>gfeatures.• Class MetaGrammar conta<strong>in</strong>s common featuresfor a formal grammar.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 136


• Class MetaLanguage conta<strong>in</strong>s languagedependant tools <strong>and</strong> features.• Object MetaTerm <strong>in</strong>stantiates grammarterms <strong>and</strong> features like a parser generator.• There is a collection of numerous codegenerators like a pretty pr<strong>in</strong>ter generator<strong>and</strong> generators for XML, AST etc.In various reeng<strong>in</strong>eer<strong>in</strong>g projects for C, Cobol, VB<strong>and</strong> C++, SwMaster has created a unified conceptframework (Figure 6) for formal languages as follows.For read<strong>in</strong>g code <strong>the</strong> features needed are scanner(1), parser (2) <strong>and</strong> a sav<strong>in</strong>g element (3): ei<strong>the</strong>r amodel weaver or a simple symbol table. The code isstored <strong>in</strong>to Visual Prolog as hierarchical facts or assymbolic objects (8).The code <strong>in</strong>formation can be re-translated <strong>in</strong>tosyntax by us<strong>in</strong>g three features: a model iterator (4),a code generator (5) <strong>and</strong> a pretty pr<strong>in</strong>ter (6). Thereare a number of ma<strong>the</strong>matical correspondences between<strong>the</strong> parts of this “diamond”. A very <strong>in</strong>terest<strong>in</strong>gfeature created by this structure is <strong>the</strong> possibilityto make translations from one language <strong>in</strong>to ano<strong>the</strong>rby switch<strong>in</strong>g <strong>the</strong> terms <strong>in</strong> <strong>the</strong> <strong>in</strong>put side (7) <strong>and</strong> <strong>the</strong>output side (8). By comb<strong>in</strong><strong>in</strong>g (7) <strong>and</strong> (8) from differentlanguages we can form a term translator.1 2 37 8 96 5 4Figure 6. Diamond, a unified concept framework<strong>and</strong> programm<strong>in</strong>g model for formal languages.This design concept is useful <strong>in</strong> many k<strong>in</strong>ds of VisualProlog transformation tasks. As an example of acode generator for a pretty pr<strong>in</strong>ter is presented. Theshortest Visual Prolog code for a pretty pr<strong>in</strong>ter canbe def<strong>in</strong>ed as a concatenated list of syntax terms <strong>and</strong>recursive <strong>in</strong>vocations of lower level calls <strong>in</strong> <strong>the</strong> syntaxorder (below, gen-prefix is used). A recursiveterm generator gen_Statement for <strong>the</strong> for-statementof Java1.5 is shortly:gen_Statement(for(ForControl,Statement)) =concatList(["for", "(",gen_ForControl(ForControl), ")",gen_Statement(Statement)]).7.3 Def<strong>in</strong><strong>in</strong>g semanticsFor def<strong>in</strong><strong>in</strong>g semantics of source code numerouspr<strong>in</strong>ciples have been developed <strong>in</strong>clud<strong>in</strong>g denotationalsemantics <strong>and</strong> attribute grammars. The bestapproach for Prolog is argued to be natural semantics(Sethi 1996), which gives us an excellent tool to<strong>in</strong>vestigate <strong>the</strong> validity of Prolog implementations.An if-comm<strong>and</strong> is a good example. In <strong>the</strong> GRMgrammarnotation:Statement =“if” Condition <strong>the</strong>n Statement ->iff(Condition, Statement).A Prolog based analyzer could provide a numberof different ways to analyze iff-statements: subtermsearch, determ<strong>in</strong>istic evaluation, code simulation,<strong>in</strong>determ<strong>in</strong>istic coverage test, traversal of evaluat<strong>in</strong>gresults, <strong>in</strong>formation for displays, model mak<strong>in</strong>g etc(Heer<strong>in</strong>g 2005). Overall, natural semantics is a goodway to document <strong>and</strong> to validate <strong>the</strong>se sub-models.7.4 Layer M1: Parse tree for JavaWhen GRM-notation is used, each term has a def<strong>in</strong>edparse tree that is def<strong>in</strong>ed <strong>in</strong> <strong>the</strong> right side of <strong>the</strong>term. The start symbol term of Java3 is a compilationunit. The o<strong>the</strong>r ma<strong>in</strong> Java terms for analysis areclass declaration, type declaration, statement, expression,identifier <strong>and</strong> literal.7.5 Layer M2: Symbolic languageIn a normal practice, parse trees are converted <strong>in</strong>toAbstract Syntax Trees (AST) for analysis purposes(VMCAI - konferenssi 2005). However, ASTs sufferfrom many problems because of <strong>the</strong>ir strongconnection with <strong>the</strong> orig<strong>in</strong>al syntax. This is why weuse ano<strong>the</strong>r way to raise <strong>the</strong> abstraction level. <strong>Web</strong>uilt a completely new language, Symbolic, <strong>in</strong>steadof us<strong>in</strong>g Java itself. This simplifies programm<strong>in</strong>g<strong>and</strong> it makes it possible to optimize code items accord<strong>in</strong>gto analysis needs. In <strong>the</strong> symbolic notation<strong>the</strong> nearest equivalent for Java statement is clause.Table 2 below describes categories, identification,purpose <strong>and</strong> pr<strong>in</strong>cipal use for <strong>the</strong> term clause.Table 2. Categories for symbolic clausesId Purpose Pr<strong>in</strong>cipal usedef Def<strong>in</strong>ition Identification, typescrea Creator Dynamic b<strong>in</strong>d<strong>in</strong>gsset Changes Data flowget Invocation Control flowref Reference Variable referencesop Operation Math & relat operatorsloop Loop Loop analysispath Condition State analysisval Constant Evaluat<strong>in</strong>g valueso<strong>the</strong>r Non-core term Terms, not important137


We def<strong>in</strong>ed Symbolic to be an <strong>in</strong>dependent language,so that it has all <strong>the</strong> “diamond features” (Figure6). It is a class with its doma<strong>in</strong>s, parsers <strong>and</strong>generators. Symbolic is particularly aimed at evaluation,display <strong>and</strong> explanation purposes.For translation from Java <strong>in</strong>to Symbolic eachJava statement is converted <strong>in</strong>to one or more symbolicclauses depend<strong>in</strong>g on <strong>the</strong> statement. So a symbolicclause is not backwards compatible, but when<strong>the</strong> context of successive symbolic clauses ma<strong>in</strong>ta<strong>in</strong>sa correct sequence, <strong>the</strong> clauses can be retranslated<strong>in</strong>to Java with <strong>the</strong>ir orig<strong>in</strong>al mean<strong>in</strong>g.This is useful for program specialization purposes.7.6 Symbolic translationVip6 has an excellent function notation for translationpurposes. Below, a translation rule to translate aJava if-statement <strong>in</strong>to a pathClause of Symbolic isshown. The predicate returns <strong>the</strong> term <strong>in</strong> ano<strong>the</strong>rlanguage. Condit is an abbreviation for condition<strong>and</strong> SL for statement list. Translation takes place at<strong>the</strong> Prolog level, <strong>and</strong> not by replac<strong>in</strong>g source structureslike traditional translators do when us<strong>in</strong>g complexexternal rules (TXL, Software Tech. Laboratory2004).statement2clause(iff(Condit,SL)) =pathClause(condition2cond(Condit),stmntList2clauseList(SL)).The translation pr<strong>in</strong>ciple is excellent for <strong>the</strong> use ofVip applications, especially <strong>in</strong> multi-layer architectures.It is best to keep <strong>the</strong> translation programm<strong>in</strong>gapart from <strong>the</strong> syntax level, due to <strong>the</strong> complexities<strong>and</strong> peculiarities of <strong>the</strong> latter.7.7 Captur<strong>in</strong>g control flowsIn Section 1 (Figure 1) it is argued that programsresemble molecular structures. In Section 6 a calltree was presented as a base for models. UML,which covers <strong>the</strong> vast majority of approaches for <strong>the</strong>software developer, conta<strong>in</strong>s a 4+1 model to summarizeall diagrams (Arlow, Neustadt 2002). In orderto identify all behavior features of UML, a behaviormodel is def<strong>in</strong>ed to be a sum of all causalcha<strong>in</strong>s (Mellor, Balcer 2002). These are captured by“chopp<strong>in</strong>g” successive method <strong>in</strong>vocations (f) for<strong>the</strong> selected approach (Figure 7).startf 1 f 2call q f k −1f kstart qf 4f 3(ret) f k − 2targetf 5exit qf k − 3Figure 7. Control flow <strong>in</strong> chopp<strong>in</strong>g (Reps 2000).The most used pr<strong>in</strong>ciple of source code analysis iscalled slic<strong>in</strong>g (Weiser 1984). It means detect<strong>in</strong>geffects of source code from a certa<strong>in</strong> po<strong>in</strong>t. It is notvery useful for program comprehension, because itis only a low-level approach. Chopp<strong>in</strong>g is a moregeneral approach (Reps 2000). Chopp<strong>in</strong>g is considered<strong>in</strong> terms of produc<strong>in</strong>g relevant <strong>in</strong>formation regard<strong>in</strong>ga part of <strong>the</strong> program between Start <strong>and</strong>Target as determ<strong>in</strong>ed by <strong>the</strong> person attempt<strong>in</strong>g tounderst<strong>and</strong> <strong>the</strong> program. Chopp<strong>in</strong>g is essential becauseit can be used <strong>in</strong> cause-effect analysis which isparticularly relevant <strong>in</strong> trouble-shoot<strong>in</strong>g (vonMayrhauser 1997). The purpose of <strong>the</strong> follow<strong>in</strong>grule is to solve <strong>the</strong> chopp<strong>in</strong>g equation (Figure 7):Target = fk • fk-1 •... •f (Start).In a symbolic notation it can be ei<strong>the</strong>r nested:Target = f (f ( ... f( Start ) ) )or successive:Target= [f(XK) •f(XK-1)• f(“Start”)].In Vip, collect<strong>in</strong>g chops (f) could be written:chopp<strong>in</strong>g(Target,[f(This)|Sequence]):-f(NextId, Arguments),NextId:chopp<strong>in</strong>g(Target, Sequence).7.8 Layer M3: Object-oriented modelInitially <strong>the</strong> symbolic code for each class was stored<strong>in</strong>side classes. However, tree based structures aredifficult to analyze, because 1) identify<strong>in</strong>g elementsis not easy <strong>and</strong> 2) <strong>the</strong>re is no easy way to po<strong>in</strong>t tospecified po<strong>in</strong>ts to trees. Fur<strong>the</strong>r, <strong>the</strong> user considers<strong>the</strong> code elements as parallel, not as hierarchicalunits. That is why an object-oriented core is neededfor <strong>the</strong> symbolic model. In our case it is very naturalto use <strong>the</strong> categories of Symbolic language as <strong>the</strong>base for model objects.To implement an object-oriented model, a modelweaver is needed. It divides <strong>the</strong> parse trees <strong>in</strong>tosmaller element objects as shown <strong>in</strong> Table 2. Let usconsider a row X <strong>in</strong> Table 2. The purpose of <strong>the</strong>Symbolic Model Weaver is to create a Symbolic Element for each X <strong>and</strong> to store <strong>the</strong> host <strong>in</strong>to<strong>the</strong> parent element <strong>and</strong> <strong>the</strong> h<strong>and</strong>le of <strong>the</strong> parent <strong>in</strong>to<strong>the</strong> child element. Each block <strong>in</strong> <strong>the</strong> code is replacedby a l<strong>in</strong>k element <strong>and</strong> <strong>the</strong> replacement is stored <strong>in</strong>to<strong>the</strong> parent as a l<strong>in</strong>k node. In accordance with <strong>the</strong>pr<strong>in</strong>ciple above, each element should have a m<strong>in</strong>imumnumber of child elements. Because <strong>the</strong> elementsof each object are <strong>in</strong> <strong>the</strong> same order as <strong>in</strong> <strong>the</strong>orig<strong>in</strong>al code, it is guaranteed that elements can beevaluated correctly. This makes it possible to executemodels, which is <strong>the</strong> most challeng<strong>in</strong>g featureof model<strong>in</strong>g technologies (Section 2). The pr<strong>in</strong>ciple<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 138


uses, extensively, Prolog’s logic notation <strong>and</strong> VisualProlog’s object notation toge<strong>the</strong>r. In Figure 8 <strong>the</strong>re isa class diagram illustrat<strong>in</strong>g a program implementation.SymbolicElement-parentElement+new()+build()+run()Symbolic Element-contents+new()+build()+specialRun()Figure 8. Pr<strong>in</strong>ciples of symbolic model elements.The super class SymbolicElement <strong>in</strong>herited from <strong>the</strong>class Symbolic, conta<strong>in</strong>s <strong>the</strong> methods to build eachsub-model, to run <strong>the</strong> sub-model <strong>and</strong> to traverse <strong>the</strong>results. There is a method specialRun that runs <strong>the</strong>contents of each element object.7.9 Layer M4: MediatorClass Mediator is a facade to comb<strong>in</strong>e <strong>the</strong> most essentialdata classes <strong>and</strong> activities. The Symbolicmodel is run via a class ModelEng<strong>in</strong>e that has a runcomm<strong>and</strong>which starts a new thread.It is said that hypo<strong>the</strong>sis is <strong>the</strong> only driver for programunderst<strong>and</strong><strong>in</strong>g (von Mayrhauser 97).The userwants to <strong>in</strong>vestigate special parts of <strong>the</strong> software byquestions such as: what, why, when <strong>and</strong> how. Tospecify a run, a start <strong>and</strong> target comb<strong>in</strong>ation is enteredby <strong>the</strong> user.The results of <strong>the</strong> query are a collection of Symbolicclauses comb<strong>in</strong>ed with <strong>the</strong> query notation. Eachexplanation has <strong>the</strong> form: Explanation = query +answer.7.10 Layers M5, M6: Controller <strong>and</strong> UIController receives signals from <strong>the</strong> model <strong>and</strong> updatesdisplays accord<strong>in</strong>g to those signals. UI is describedlater <strong>in</strong> Section 8.7.11: Layer M7: PresentationsAs stated earlier, each explanation conta<strong>in</strong>s <strong>the</strong>question <strong>and</strong> its h<strong>and</strong>le <strong>and</strong> <strong>the</strong> results. By collect<strong>in</strong>gexplanations systematically <strong>the</strong> user can updatehis/her situation model, which can conta<strong>in</strong> <strong>in</strong>formationlike:• What does class Server do?• Why did X start Y?• How does method Z work?Symbolic clause is <strong>the</strong> foundation for all displayeddata. In source code analysis <strong>the</strong>ory <strong>the</strong>re areabout 20 different visualization graphs <strong>and</strong> presentationtypes (Famix 1999). Most of <strong>the</strong>m can be transformedfrom <strong>the</strong> result set of <strong>the</strong> symbolic model forJava.8. Tool JavaMasterAccord<strong>in</strong>g to <strong>the</strong> description above, a tool was developed,<strong>the</strong> development of which started <strong>in</strong> 2005.The current implementation parses Java 1.5 withoutproblems. The tool conta<strong>in</strong>s about 40.000 l<strong>in</strong>es ofcode <strong>and</strong> 400 classes. Some statistics about <strong>the</strong>code:1. Java 1.5 grammar file (300 l<strong>in</strong>es)2. Java parser (2556 l<strong>in</strong>es)3. Symbolic language (90 def<strong>in</strong>ition l<strong>in</strong>es)4. Java to Symbolic translator (2200 l<strong>in</strong>es)It is useful to note that <strong>the</strong> symbolic translator isshorter than Java parser. This shows that semantictranslation is a very expressive feature <strong>in</strong> code transformation.8.1 Tool featuresFigure 10 shows <strong>the</strong> pr<strong>in</strong>ciples of <strong>the</strong> tool. Thesource code is loaded from <strong>the</strong> tree (1). It provides aprogram model for ano<strong>the</strong>r tree (2). Then <strong>the</strong> userselects <strong>the</strong> function Worklist, for which <strong>the</strong> tool'sresponse is to display a set of navigation questions<strong>in</strong> (4 Q/A). Program <strong>in</strong>formation is displayed byabstract controls (3). Here a relatively large call treeis shown. The user sets hypo<strong>the</strong>ses <strong>and</strong> formulatesqueries related to <strong>the</strong> suggestions (Q) which willhelp <strong>the</strong> user <strong>in</strong> focus<strong>in</strong>g on <strong>the</strong> most essential control-flows<strong>and</strong> objects <strong>in</strong> order to underst<strong>and</strong> <strong>the</strong>critical references <strong>and</strong> method <strong>in</strong>vocations (Wiedenbecket al 2002).139


1.4Q/A2.3.9.1 Influence modelEach Prolog program can be thought as an activecontrol flow, which has <strong>in</strong>puts <strong>and</strong> outputs on severallevels. In Figure 12 <strong>in</strong>puts (callers) are up <strong>and</strong>outputs (callees) down. Pure logic, <strong>in</strong>clud<strong>in</strong>g temporaryeffects, is <strong>in</strong> <strong>the</strong> base l<strong>in</strong>e. A vertical distancefor each <strong>in</strong>fluence type can be def<strong>in</strong>ed as follows:Com-components are <strong>the</strong> most distant l<strong>in</strong>es as wellas external actions that cannot be repeated. The mostdistant l<strong>in</strong>es are ma<strong>in</strong> <strong>in</strong>fluences, compared withside effects that are <strong>in</strong>termediate data <strong>and</strong> not among<strong>the</strong> wanted results.callerFigure 10. User <strong>in</strong>terface of JavaMaster.9 Prolog comprehensionVisual Prolog resembles Java <strong>in</strong> most <strong>in</strong>formationneeds (Sections 3 <strong>and</strong> 5). It conta<strong>in</strong>s program flows,classes, objects <strong>and</strong> dependency models. Some essentialdifferences are non-determ<strong>in</strong>ism, strong recursivenature, declarative syntax, <strong>and</strong> flow analysis.Fur<strong>the</strong>r, public attributes are not allowed <strong>and</strong> predicatesare form<strong>in</strong>g much more compact units than <strong>in</strong>methods of Java. Most of <strong>the</strong>se differences makeunderst<strong>and</strong><strong>in</strong>g easier. From <strong>the</strong> programmers po<strong>in</strong>tof-viewit would be best not to use facts, becausefacts can cause side effects, but it is not always possibleto avoid this.Underst<strong>and</strong><strong>in</strong>g side effects is essential <strong>in</strong> Prolog(Walker et al 1997). In Figure 11 <strong>the</strong>re are twocases, A <strong>and</strong> B, us<strong>in</strong>g predicates p, q <strong>and</strong> r. Predicatep causes a side effect note(X) to case A but notto B. It has direct <strong>in</strong>fluence on predicate q but not onr. Still, if r is called after q <strong>the</strong>n B is dependent ofnote <strong>in</strong>directly.Summary: The side effects can be detected completelyby symbolic analysis because <strong>the</strong> phenomen<strong>in</strong> Figure 11 is a control flow... p(X) | q(Y) | r(X,Y)assert(note(X))note(X),s(X)s(X)A: Side effects B: No side effectsFigure 11. Prolog’s side effect model.Startcallee• • •Figure 12. Prolog’s <strong>in</strong>fluence model.TargetThis model can be useful <strong>in</strong> plann<strong>in</strong>g refactor<strong>in</strong>g forVip classes.9.2 Visual Prolog applicationIn order to underst<strong>and</strong> a complete Vip applicationwe can use <strong>the</strong> follow<strong>in</strong>g ma<strong>in</strong> approaches (<strong>the</strong> relatedfigure <strong>in</strong> paren<strong>the</strong>sis):• Static: How has it been written? (F. 11)• Dynamic: How does it behave? (F. 12)• Symbolic: What are <strong>the</strong> explanations for c<strong>and</strong>idatesbetween starts <strong>and</strong> targets referr<strong>in</strong>g to ourfocus? (F. 10)The symbolic approach is <strong>the</strong> most general one. Itis pragmatic by nature. It could give us useful snapshotsfrom <strong>the</strong> user’s approach comb<strong>in</strong><strong>in</strong>g <strong>the</strong> dimensionsof Figure 3!10 ConclusionsA seamless architecture for a symbolic programcomprehension methodology has been described <strong>in</strong>this paper. Us<strong>in</strong>g Visual Prolog proved to be a rightchoice. When one of <strong>the</strong> most characteristic featuresof traditional languages is that <strong>the</strong>y are lead<strong>in</strong>g <strong>in</strong>tomore <strong>and</strong> more specific applications, Visual Prologhas, as shown <strong>in</strong> this paper <strong>in</strong> Sections 2..9, becauseof its declarative notation, ano<strong>the</strong>r ra<strong>the</strong>r valuablefeature; it is lead<strong>in</strong>g <strong>in</strong>to wider, more abstract th<strong>in</strong>k<strong>in</strong>g,thus creat<strong>in</strong>g more general approaches <strong>and</strong><strong>the</strong>ories related to <strong>the</strong> software science.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 140


Symbolic analysis can, because of its <strong>the</strong>ory ofgrammars, semantic translations, symbolic models<strong>and</strong> explanation features, be an important step <strong>in</strong>future <strong>in</strong> gett<strong>in</strong>g closer to a gr<strong>and</strong> unified <strong>the</strong>ory ofprogramm<strong>in</strong>g language underst<strong>and</strong><strong>in</strong>g.AcknowledgementsThis research is a part of a dissertation concern<strong>in</strong>g asymbolic program comprehension methodology. Itis funded by COMAS of Jyväskylä University.SwMaster Ltd has enabled <strong>the</strong> <strong>in</strong>itial research <strong>and</strong>product development for <strong>the</strong> tool s<strong>in</strong>ce 2000.ReferencesJean Bezev<strong>in</strong>. Object to Model ParadigmChange, Jean-Marie Burkhardt, Francoise Detienne<strong>and</strong> Susan Wiedenbeck. "Object-Oriented Program Comprehension: Effectof Expertise, Task <strong>and</strong> Phase", EmpiricalSoftw. Eng. 7 (2), 2002, pp. 115-156.Thomas Cheatham, Glen Holloway <strong>and</strong> JudyTownley. "Symbolic Evaluation <strong>and</strong> <strong>the</strong>Analysis of Programs", IEEE Trans.Softw. Eng. 5 (4), 1979, pp. 402-417.Serge Demeyer, S<strong>and</strong>er Tichelaar, PatrickSteyaert. FAMIX 2.0: The FAMOOSInformation Exchange Model (1999),Jan Heer<strong>in</strong>g, Paul Cl<strong>in</strong>t. <strong>Semantic</strong>s of Programm<strong>in</strong>gLanguages, Tool Approach,Erkki Laitila. Visual Prolog: Industrial Applications(only <strong>in</strong> F<strong>in</strong>nish). Jyväskylä,F<strong>in</strong>l<strong>and</strong>: Teknolit, 1996. 228 p.Stan Letovsky. "Cognitive process <strong>in</strong> programcomprehension". In: E. Soloway& S. Iyengar (Ed.) Empirical Studies ofProgrammers: Norwood, NJ: Ablex,1986.MDA. The Architecture of Choice for aChang<strong>in</strong>g World, Model Driven Architectures.Leszek Maciaszek, Bruc Lee Liong. PracticalSoftware Eng<strong>in</strong>eer<strong>in</strong>g, Addison-Wesley, 2005.Stephen J. Mellor, Marc J. Balcer. ExecutableUML, Addison-Wesley,2002.OMG. Object Management GroupNancy Penn<strong>in</strong>gton. "Stimulus Structures <strong>and</strong>Mental Representations <strong>in</strong> Expert Comprehensionof Computer Programs",Cognitive Psychology, 1987.Thomas Reps. “Program Analysis via GraphReachability”, PLDI-Conference, 2000.Ravi Sethi. Programm<strong>in</strong>g Languages - Concepts<strong>and</strong> Constructs. Addison-Wesley,1996.Sun. Grammar of Java, 2003.Software Technology Laboratory. The TXLProgramm<strong>in</strong>g Language: www.txl.ca. Technical report,2004.Prolog Development Center A/S. PDCProlog Toolbox,,1990Jim. Arlow, Ila Neustadt. UML <strong>and</strong> <strong>the</strong> UnifiedProcess, Addison-Wesley, 2002.Prolog Development Center A/S. VisualProlog, 2006,Anne-Liese von Mayrhauser, Marie Vans."Hypo<strong>the</strong>sis-driven underst<strong>and</strong><strong>in</strong>g processesdur<strong>in</strong>g corrective ma<strong>in</strong>tenance oflarge scale software". CSM 1997, 1997,pp. 12-20. IEEE Computer Soc.VMC05, Verification, Model Check<strong>in</strong>g, <strong>and</strong>Abstract Interpretation Conference,Paris, 2005.Adrian Walker, Michel McCord, John Sowa,Walter Wilson. Knowledge Systems<strong>and</strong> Prolog, 1987, Addison Wesley.Adam <strong>Web</strong>ber. Modern Programm<strong>in</strong>g Languages,c/o Amazon, 2005.Marc Weiser. Program slic<strong>in</strong>g. IEEE Transactionson Software Eng<strong>in</strong>eer<strong>in</strong>g,10(4):352–357, 1984.141


Norman Wilde,<strong>and</strong> Ross Huitt, "Ma<strong>in</strong>tenanceSupport for Object-Oriented Programs",IEEE Trans. Software Eng. 18 (12),1992, pp. 1038-1044.Norman Wilde, Allen Chapman, Paul Mat<strong>the</strong>ws,Ross Huitt, Describ<strong>in</strong>g ObjectOriented Software: What Ma<strong>in</strong>ta<strong>in</strong>ersNeed to Know, EDATS, In InternationalJournal on Software Eng<strong>in</strong>eer<strong>in</strong>g,pages 521–533, 1994.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 142


Describ<strong>in</strong>g Rich Content:Future Directions for <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Timo Honkela <strong>and</strong> Matti PölläHels<strong>in</strong>ki University of TechnologyLaboratory of Computer <strong>and</strong> Information ScienceP.O. Box 5400 FI-02015 TKK, F<strong>in</strong>l<strong>and</strong>{timo.honkela, matti.polla}@tkk.fiAbstractIn this position paper, we discuss some problems related to those semantic web methodologies that arestraightforwardly based on predicate logic <strong>and</strong> related formalisms. We also discuss complementary<strong>and</strong> alternative approaches <strong>and</strong> provide some examples of such.1 IntroductionIt is clear that <strong>the</strong> use of st<strong>and</strong>ardized formats with<strong>in</strong>computer science is beneficial. For <strong>in</strong>stance, <strong>the</strong>widespread use of <strong>the</strong> World Wide <strong>Web</strong> would nothave been possible without <strong>the</strong> adoption of HTML.Similarly, <strong>the</strong>re are serious attempts to create st<strong>and</strong>ardsfor metadata, data about data, so that a piece ofart stored <strong>in</strong> electronic form would <strong>in</strong>clude <strong>in</strong>formationabout, e.g., its creator, source, identification <strong>and</strong>possible access restrictions. Moreover, metadata usually<strong>in</strong>cludes also a textual summary of <strong>the</strong> contents, acontent description that provides <strong>in</strong>formation for <strong>the</strong>organization <strong>and</strong> search of <strong>the</strong> data.1.1 Subjective <strong>and</strong> complex paths fromdata to metadataEspecially if pictorial or sound data is considered,an associated description, metadata, is useful. Thedescription may be based on a pre-def<strong>in</strong>ed classificationor framework, for <strong>in</strong>stance, like an ontologywith<strong>in</strong> <strong>the</strong> current semantic web technologies. However,even if someth<strong>in</strong>g like <strong>the</strong> identity of <strong>the</strong> authoror <strong>the</strong> place of publish<strong>in</strong>g can ra<strong>the</strong>r easily be determ<strong>in</strong>edunambiguously, <strong>the</strong> same is not true for <strong>the</strong>description of <strong>the</strong> contents. In <strong>the</strong> doma<strong>in</strong> of <strong>in</strong>formationretrieval <strong>and</strong> databases of text documents, Furnaset al. (1987) already found that <strong>in</strong> spontaneous wordchoice for objects <strong>in</strong> five doma<strong>in</strong>s, two people favored<strong>the</strong> same term with less than 20% probability. Bates(1986) has shown that different <strong>in</strong>dexers, well tra<strong>in</strong>ed<strong>in</strong> an <strong>in</strong>dex<strong>in</strong>g scheme, might assign <strong>in</strong>dex terms fora given document differently. It has also been observedthat an <strong>in</strong>dexer might use different terms for<strong>the</strong> same document at different times. The mean<strong>in</strong>gof an expression (queries, descriptions) <strong>in</strong> any doma<strong>in</strong>is graded <strong>and</strong> chang<strong>in</strong>g, biased by <strong>the</strong> particularcontext. Fig. 1 aims to illustrate <strong>the</strong> challeng<strong>in</strong>gaspects of <strong>the</strong> overall situation. Human be<strong>in</strong>gs perceive,act <strong>and</strong> <strong>in</strong>teract with<strong>in</strong> complex environments.It has occasionally been assumed that much of <strong>the</strong>underly<strong>in</strong>g conceptual structure with<strong>in</strong> human m<strong>in</strong>dis readily given by some way, even already when weare born. There is a vast body of literature relatedto this question which we do not touch upon here.It suffices to note that <strong>the</strong> discussion <strong>in</strong> this paper isbased on <strong>the</strong> assumption that <strong>the</strong> conceptual systemsare ma<strong>in</strong>ly emergent: <strong>the</strong>y are created, molded <strong>and</strong>shared by <strong>in</strong>dividuals <strong>in</strong> <strong>in</strong>teraction with each o<strong>the</strong>r<strong>and</strong> <strong>the</strong> rest of <strong>the</strong> accessible part of <strong>the</strong> world.Figure 1: An illustration of <strong>the</strong> basic problem of symbolground<strong>in</strong>g: what is <strong>the</strong> process that iscapable of generat<strong>in</strong>g ontological structuresbased on complex raw perceptions <strong>and</strong> activities.Vygotsky (1986, orig<strong>in</strong>ally published <strong>in</strong> 1934) hasstated that “... <strong>the</strong> world of experience must be greatlysimplified <strong>and</strong> generalized before it can be translated<strong>in</strong>to symbols. Only <strong>in</strong> this way does communicationbecome possible, for <strong>the</strong> <strong>in</strong>dividual’s experience residesonly <strong>in</strong> his own consciousness <strong>and</strong> is, strictly143


speak<strong>in</strong>g, not communicable.” Later, he cont<strong>in</strong>ues:“The relation of thought to word is not a th<strong>in</strong>g but aprocess, a cont<strong>in</strong>ual movement back <strong>and</strong> forth fromthought to word <strong>and</strong> from word to thought. In thatprocess <strong>the</strong> relation of thought to word undergoeschanges which <strong>the</strong>mselves may be regarded as development<strong>in</strong> <strong>the</strong> functional sense.” This means <strong>in</strong> practicethat conceptualization is a complex process thattakes place <strong>in</strong> a socio-cultural context, i.e., with<strong>in</strong> acommunity of <strong>in</strong>teract<strong>in</strong>g <strong>in</strong>dividuals whose activitiesresult <strong>in</strong>to various k<strong>in</strong>ds of cultural artifacts such aswritten texts.It is a very basic problem <strong>in</strong> knowledge managementthat different words <strong>and</strong> phrases are usedfor express<strong>in</strong>g similar objects of <strong>in</strong>terest. Naturallanguages are used for <strong>the</strong> communication betweenhuman be<strong>in</strong>gs, i.e., <strong>in</strong>dividuals with vary<strong>in</strong>g background,knowledge, <strong>and</strong> ways to express <strong>the</strong>mselves.When rich contents are considered this phenomenonshould be more than evident. Therefore, if <strong>the</strong> contentdescription is based on a formalized <strong>and</strong> rigid frameworkof a classification system, problems are likelyto arise. Fig. 2 shows a simple example of two conflict<strong>in</strong>gformalizations.Natural languages have evolved to have a certa<strong>in</strong>degree of compositionality to deal with such situations.Vogt (2006) has developed a simulation modelthat considers <strong>the</strong> transition of holistic languages versuscompositional languages. Holistic languages arelanguages <strong>in</strong> which parts of expressions have no functionalrelation to any parts of <strong>the</strong>ir mean<strong>in</strong>gs. It isto be noted, though, that <strong>the</strong> compositionality is amatter of degree <strong>in</strong> natural languages. One cannotassume that, for <strong>in</strong>stance, each noun would refer toone concept <strong>and</strong> <strong>the</strong> conceptual structures would followisomorphically <strong>the</strong> composition of <strong>the</strong> syntacticalstructures. For <strong>in</strong>stance, <strong>the</strong> existence of collocationscomplicates <strong>the</strong> situation.1.2 From two-valued logic to adaptivecont<strong>in</strong>uous-valued modelsIn addition to <strong>the</strong> different ways of creat<strong>in</strong>g conceptualhierarchies discussed above, <strong>the</strong> <strong>in</strong>herent cont<strong>in</strong>uousnature of many phenomena makes it impossibleto determ<strong>in</strong>e exactly, <strong>in</strong> a shared manner <strong>the</strong> borderl<strong>in</strong>esbetween some concepts or how some wordsare used. Actually, we prefer to consider concepts asareas <strong>in</strong> high-dimensional cont<strong>in</strong>uous spaces as suggestedby Gärdenfors (2000). Fig. 3 illustrated <strong>the</strong>basic problem of divid<strong>in</strong>g cont<strong>in</strong>uous spaces <strong>in</strong>to discreterepresentations. Various approaches have beendeveloped to deal with this phenomenon, fuzzy set<strong>the</strong>ory as a primary example Zadeh (1965).Figure 2: An illustration of two conflict<strong>in</strong>g conceptualsystems on <strong>the</strong> surface level. Thesesystems prioritize <strong>the</strong> dist<strong>in</strong>ctive featuresdifferently.Figure 3: The obvious difference between cont<strong>in</strong>uous<strong>and</strong> discrete. The cont<strong>in</strong>uous can be discretizedbut <strong>the</strong>re is a certa<strong>in</strong> cost associated.The cost relates to <strong>the</strong> need to learn<strong>and</strong> deal with an <strong>in</strong>creas<strong>in</strong>g number of explicitsymbols.The basic semantic web formalisms are based onpredicate logic <strong>and</strong> o<strong>the</strong>r symbolic representations<strong>and</strong> are subject to most of those problems that earlierAI formalisms have. In order to alleviate <strong>the</strong> problemsrelated to <strong>the</strong> traditional approach, <strong>the</strong>re are alreadyexamples of research projects <strong>in</strong> which somesoft comput<strong>in</strong>g approaches, <strong>in</strong>clud<strong>in</strong>g fuzzy logic,probabilistic model<strong>in</strong>g <strong>and</strong> statistical mach<strong>in</strong>e learn-<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 144


<strong>in</strong>g, are applied. Even a collection named “Soft Comput<strong>in</strong>g<strong>in</strong> Ontologies <strong>and</strong> <strong>Semantic</strong> <strong>Web</strong>” has recentlybeen published Ma (2006). In <strong>the</strong> collection, a relatedtopic to <strong>the</strong> discussion above is presented by Holi<strong>and</strong> Hyvönen (2006). They consider model<strong>in</strong>g uncerta<strong>in</strong>ty<strong>in</strong> semantic web taxonomies <strong>in</strong> particular <strong>in</strong><strong>the</strong> doma<strong>in</strong> of geographical <strong>in</strong>formation. Nikravesh(2006) presents an approach which is based on <strong>the</strong>use of, e.g., fuzzy logic, evolutionary computation<strong>and</strong> <strong>the</strong> self-organiz<strong>in</strong>g map.In this position paper, we outl<strong>in</strong>e some complementary<strong>and</strong> sometimes even alternative approachesto <strong>the</strong> core methodologies currently applied with<strong>in</strong><strong>the</strong> semantic web research <strong>and</strong> development.2 Alternatives to highly formalizedmetadataIt may be useful not to def<strong>in</strong>e any artificial limitationsfor <strong>the</strong> descriptions. For <strong>in</strong>stance, when <strong>the</strong> doma<strong>in</strong>develops <strong>in</strong>to directions which did not exist when <strong>the</strong>classification system was developed, problems arise.Moreover, if <strong>the</strong> content it described us<strong>in</strong>g largeenough body of text <strong>the</strong> for better recall, i.e., higherlikelihood for f<strong>in</strong>d<strong>in</strong>g <strong>the</strong> <strong>in</strong>formation is greater.However, tools for ensur<strong>in</strong>g precision are needed.Precision refers to <strong>the</strong> number of relevant retrieveddocuments over <strong>the</strong> total number of retrieved documents.If a word or an expression is seen without <strong>the</strong> context<strong>the</strong>re are more possibilities for misunderst<strong>and</strong><strong>in</strong>g.Thus, for human reader <strong>the</strong> contextual <strong>in</strong>formation isoften very beneficial. The same need for disambiguationcan also be relevant with<strong>in</strong> <strong>in</strong>formation systems.As <strong>the</strong> development of ontologies <strong>and</strong> o<strong>the</strong>r similarformalizations are, <strong>in</strong> practice, grounded <strong>in</strong> <strong>the</strong> <strong>in</strong>dividualunderst<strong>and</strong><strong>in</strong>g <strong>and</strong> experience of <strong>the</strong> developers<strong>and</strong> <strong>the</strong>ir socio-cultural context, <strong>the</strong> status of <strong>in</strong>dividualitems <strong>in</strong> a symbolic description may be unclear.Fig. 4 illustrates <strong>the</strong> <strong>in</strong>fluence of vary<strong>in</strong>g socioculturalcontexts. Namely, if one considers <strong>the</strong> pragmaticmean<strong>in</strong>g (if not semantic mean<strong>in</strong>g) of “summer’sday” <strong>in</strong> a Shakespeare sonnet, it is obvious that<strong>the</strong>re is a great difference between <strong>the</strong> contexts thatare be<strong>in</strong>g referred to, for example, <strong>in</strong> Sc<strong>and</strong><strong>in</strong>avia <strong>and</strong><strong>in</strong> Sahara.Similarly, <strong>the</strong> methods that are used to manage datashould be able to deal with contextual <strong>in</strong>formation,or even <strong>in</strong> some cases provide context. The Self-Organiz<strong>in</strong>g Map by Kohonen (2001) can be consideredas an example of such a method. Often it iseven possible to f<strong>in</strong>d relevant features from <strong>the</strong> dataFigure 4: Different contexts potentially related to <strong>the</strong>expression given.itself Kohonen et al. (1997). However, a computerizedmethod – us<strong>in</strong>g a some k<strong>in</strong>d of autonomousagent – does not provide an “objective” classificationof <strong>the</strong> data while any process of feature extraction,human or artificial, is based on some selections forwhich <strong>the</strong>re most often are some well-grounded alternatives.Below, we describe some examples <strong>in</strong> which <strong>the</strong>ideas <strong>and</strong> pr<strong>in</strong>ciples outl<strong>in</strong>ed above have been applied.3 Case studiesWe consider three cases which exemplify complementary<strong>and</strong> alternative approaches to <strong>the</strong> use of (firstorder) logic-based formalisms <strong>in</strong> knowledge representation.3.1 Color label<strong>in</strong>gThe concept of color cannot be adequately studiedonly by consider<strong>in</strong>g <strong>the</strong> logico-semantic structure ofcolor words. One has to take <strong>in</strong>to account <strong>the</strong> color asa physical phenomenon. Color nam<strong>in</strong>g also requiresconsideration of <strong>the</strong> qualities of <strong>the</strong> human color perceptionsystem. A thorough study of color nam<strong>in</strong>g,thus, would require consideration of at least l<strong>in</strong>guistic,cognitive, biological, physical <strong>and</strong> philosophicalaspects Hard<strong>in</strong> (1988).Subjective nam<strong>in</strong>g of color shades has been studied<strong>in</strong> a demonstrative web site where users can pickcolor shades <strong>and</strong> give name labels (or ’tags’) to <strong>the</strong>colors. In this case color shades are represented as aRGB tuple <strong>in</strong>dicat<strong>in</strong>g <strong>the</strong> <strong>in</strong>tensities of red, green <strong>and</strong>blue color.As <strong>the</strong> database of tagged color shades grows, <strong>in</strong>terest<strong>in</strong>gproperties can be found by look<strong>in</strong>g at <strong>the</strong>distributions of <strong>in</strong>dividual tags. For example, <strong>the</strong> tag’red’ would result <strong>in</strong> a reasonably narrow distributioncentered around <strong>the</strong> po<strong>in</strong>t (1.0; 0.0; 0.0) <strong>in</strong> <strong>the</strong> RGBspace. O<strong>the</strong>r tags, however, can have much more variation<strong>in</strong> <strong>the</strong> way people place <strong>the</strong>m <strong>in</strong> <strong>the</strong> color space.145


For example, <strong>the</strong> tag ’sk<strong>in</strong>’ or ’hair’ is an example ofa highly subjective name for a color shade due to varioussk<strong>in</strong> <strong>and</strong> hair color conceptions. A related <strong>the</strong>meis <strong>the</strong> fact that <strong>the</strong> doma<strong>in</strong> for which a color nameis an attribute has a clear <strong>in</strong>fluence on which part of<strong>the</strong> RGB space <strong>the</strong> color name refers to. Gärdenfors(2000) lists as an example <strong>the</strong> differences between <strong>the</strong>quality of redness of sk<strong>in</strong>, book, hair, w<strong>in</strong>e or soil.Fig. 5 below gives an example how <strong>the</strong> color spacecan be divided <strong>in</strong> a substantially different manner <strong>in</strong>two languages.400’red’500 600 700’ao’Wavelength[nm]400 500 600 700 Wavelength[nm]Figure 5: Illustration of fuzzy color def<strong>in</strong>itions. Theword ’red’ is usually referred to light wavelengthsclose to 700 nm while <strong>the</strong> Japaneseterm ’ao’ is associated with a wider scaleof wavelengths. In English <strong>the</strong> term ’ao’would cover both ’blue’ <strong>and</strong> ’green’.3.2 WEBSOM <strong>and</strong> PicSOMThe WEBSOM method was developed to facilitate anautomatic organization of text collections <strong>in</strong>to visual<strong>and</strong> browsable document maps (Honkela et al., 1997;Lagus et al., 2004). Based on <strong>the</strong> Self-Organiz<strong>in</strong>gMap (SOM) algorithm (Kohonen, 2001), <strong>the</strong> systemorganizes documents <strong>in</strong>to a two-dimensional plane <strong>in</strong>which two documents tend to be close to each o<strong>the</strong>rif <strong>the</strong>ir contents are similar. The similarity assessmentis based on <strong>the</strong> full-text contents of <strong>the</strong> documents.In <strong>the</strong> orig<strong>in</strong>al WEBSOM method (Honkelaet al., 1996) <strong>the</strong> similarity assessment consisted oftwo phases. In <strong>the</strong> first phase, a word-category map(Ritter <strong>and</strong> Kohonen, 1989; Honkela et al., 1995) wasformed to detect similarities of words based on <strong>the</strong>contexts <strong>in</strong> which <strong>the</strong>y are used. The Latent <strong>Semantic</strong>Index<strong>in</strong>g (LSI) method (Deerwester et al., 1990) isnowadays often used for similar purpose. In <strong>the</strong> secondphase, <strong>the</strong> document contents were mapped on<strong>the</strong> word-category map (WCM). The distribution of<strong>the</strong> words <strong>in</strong> a document over <strong>the</strong> WCM was used as<strong>the</strong> feature vector used as an <strong>in</strong>put for <strong>the</strong> documentSOM. Later, <strong>the</strong> WEBSOM method was streaml<strong>in</strong>edto facilitate process<strong>in</strong>g of very large document collections(Kohonen et al., 1999) <strong>and</strong> <strong>the</strong> use of <strong>the</strong> WCMas a preprocess<strong>in</strong>g step was ab<strong>and</strong>oned.The PicSOM method (Laaksonen et al., 1999,2002; Koskela et al., 2005) was developed for similarpurposes than <strong>the</strong> WEBSOM method for contentbasedimage retrieval, ra<strong>the</strong>r than for text retrieval.Also <strong>the</strong> PicSOM method is based on <strong>the</strong> Self-Organiz<strong>in</strong>g Map (SOM) algorithm (Kohonen, 2001).The SOM is used to organize images <strong>in</strong>to map units<strong>in</strong> a two-dimensional grid so that similar imagesare located near each o<strong>the</strong>r. The PicSOM methodbr<strong>in</strong>gs three advanced features <strong>in</strong> comparison with <strong>the</strong>WEBSOM method. First, <strong>the</strong> PicSOM uses a treestructuredversion of <strong>the</strong> SOM algorithm (Tree StructuredSelf-Organiz<strong>in</strong>g Map, TS-SOM) (Koikkala<strong>in</strong>en<strong>and</strong> Oja, 1990) to create a hierarchical representationof <strong>the</strong> image database. Second, <strong>the</strong> PicSOM systemuses a comb<strong>in</strong>ation of several types of statistical features.For <strong>the</strong> image contents, separate feature vectorshave been formed for describ<strong>in</strong>g colors, textures,<strong>and</strong> shapes found <strong>in</strong> <strong>the</strong> images. A dist<strong>in</strong>ct TS-SOMis constructed for each feature vector set <strong>and</strong> <strong>the</strong>semaps are used <strong>in</strong> parallel to select <strong>the</strong> returned images.Third, <strong>the</strong> retrieval process with <strong>the</strong> PicSOMsystem is an iterative process utiliz<strong>in</strong>g relevance feedbackfrom <strong>the</strong> user. A retrieval session beg<strong>in</strong>s withan <strong>in</strong>itial set of different images uniformly selectedfrom <strong>the</strong> database. On subsequent rounds, <strong>the</strong> queryfocuses more accurately on <strong>the</strong> user’s needs based on<strong>the</strong>ir selections. This is achieved as <strong>the</strong> system learns<strong>the</strong> user’s preferences from <strong>the</strong> selections made onprevious rounds.WEBSOM <strong>and</strong> PicSOM methods are a means forcontent-driven emergence of conceptual structures.Fig. 6 illustrates how <strong>the</strong> cluster<strong>in</strong>g structure discernableon a self-organiz<strong>in</strong>g map can correspond to a hierarchicalstructure. This basic pr<strong>in</strong>ciple can be applied<strong>in</strong> multiple ways to provide a bridge between<strong>the</strong> raw data directly l<strong>in</strong>ked with some phenomenon<strong>and</strong> <strong>the</strong> l<strong>in</strong>guistic <strong>and</strong> symbolic description of its conceptualstructure. Fig. 6 also shows why <strong>the</strong> SOM isga<strong>in</strong><strong>in</strong>g popularity as a user <strong>in</strong>terface element replac<strong>in</strong>g,e.g., traditional menus. With suitable label<strong>in</strong>g of<strong>the</strong> map, <strong>the</strong> user can easily browse <strong>the</strong> map zoom<strong>in</strong>g<strong>in</strong>to details when necessary. The structure of <strong>the</strong> map<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 146


Figure 6: The emergent structure of an organizedself-organiz<strong>in</strong>g map reflects <strong>the</strong> structure of<strong>the</strong> underly<strong>in</strong>g data. The cluster<strong>in</strong>g that isvisible on <strong>the</strong> left can be <strong>in</strong>terpreted as <strong>the</strong>tree diagram on <strong>the</strong> right.depends on <strong>the</strong> data <strong>and</strong> its preprocess<strong>in</strong>g. The preprocess<strong>in</strong>gcan be used to br<strong>in</strong>g up relevant structures.For <strong>in</strong>stance, it may be useful to <strong>in</strong>crease or decrease<strong>the</strong> weight of some variables. If we consider a mapof an e-mail collection, one can decrease <strong>the</strong> weightof those variables that are commonly related to unsolicitede-mail messages. This leads <strong>in</strong>to <strong>the</strong> situation<strong>in</strong> which <strong>the</strong> SOM can allocate more resourceson model<strong>in</strong>g useful e-mail. The same idea applies tomany application areas <strong>in</strong> which a particular po<strong>in</strong>t ofview is more relevant than some o<strong>the</strong>r.3.3 Quality assessment of medical websitesThe web has become an <strong>in</strong>creas<strong>in</strong>gly importantsource of medical <strong>in</strong>formation replac<strong>in</strong>g much of<strong>the</strong> area of medical self-help literature. The consequencesof rely<strong>in</strong>g on medical <strong>in</strong>formation found onweb sites can be crucial <strong>in</strong> terms of mak<strong>in</strong>g decisionsabout treatment. Hence <strong>the</strong>re is need for assess<strong>in</strong>g <strong>the</strong>quality of <strong>the</strong>se web sites to help <strong>the</strong> layman decidewhich <strong>in</strong>formation he/she should rely on.Currently, quality label<strong>in</strong>g of medical web sites isdone by various organizations of medical professionals.The assessment process is usually done completelyby h<strong>and</strong> requir<strong>in</strong>g a large amount of manualwork by tra<strong>in</strong>ed physicians <strong>in</strong> search<strong>in</strong>g web sites for<strong>the</strong> required elements (<strong>in</strong>clud<strong>in</strong>g, for example, propercontact <strong>in</strong>formation). The EU funded project MedIEQ1 aims to develop tools to facilitate <strong>the</strong> processof web site quality label<strong>in</strong>g.The MedIEQ project applies mostly <strong>the</strong> current semanticweb technologies to describe <strong>the</strong> web site contents.However, already <strong>in</strong> <strong>the</strong> early stages of <strong>the</strong>project, it has become apparent that some k<strong>in</strong>ds ofcontents are difficult to analyze us<strong>in</strong>g <strong>the</strong> structured1 http://www.medieq.org/approach. For <strong>in</strong>stance, <strong>the</strong> target audience of a medicalweb site is a property by which <strong>the</strong> site is be<strong>in</strong>glabeled <strong>in</strong> <strong>the</strong> assessment process. As it turns out, itis less than trivial to automatically detect whe<strong>the</strong>r asite is <strong>in</strong>tended to be read by laymen or medical professionals.Fur<strong>the</strong>r, <strong>the</strong> division of <strong>the</strong> target audiencetypes <strong>in</strong>to crisp categories is often subjective by nature.4 ConclusionsWe have presented some motivation why <strong>the</strong> coretechnologies <strong>in</strong> <strong>Semantic</strong> <strong>Web</strong> should not solely relyon predicate logic <strong>and</strong> related formalisms. We haveargumented for a certa<strong>in</strong> data-driven approach <strong>in</strong>which <strong>the</strong> orig<strong>in</strong>al data is analyzed automaticallyra<strong>the</strong>r than rely<strong>in</strong>g on h<strong>and</strong>-crafted ontologies <strong>and</strong><strong>the</strong>ir use as a basis for choos<strong>in</strong>g descriptors <strong>in</strong> <strong>the</strong>metadata. We have given examples of such an approachma<strong>in</strong>ly us<strong>in</strong>g <strong>the</strong> Self-Organiz<strong>in</strong>g Map as <strong>the</strong>core method.ReferencesM. J. Bates. Subject access <strong>in</strong> onl<strong>in</strong>e catalog: a designmodel. Journal of <strong>the</strong> American Society ofInformation Science, 37(6):357–376, 1986.S.C. Deerwester, S.T. Dumais, T.K. L<strong>and</strong>auer, G.W.Furnas, <strong>and</strong> R.A. Harshman. Index<strong>in</strong>g by latentsemantic analysis. Journal of <strong>the</strong> American Societyof Information Science, 41:391–407, 1990.G. W. Furnas, T. K. L<strong>and</strong>auer, L. M. Gomez, <strong>and</strong>S. T. Dumais. The vocabulary problem <strong>in</strong> humansystemcommunication. Communications of <strong>the</strong>ACM, 30(11):964–971, 1987.P. Gärdenfors. Conceptual spaces: The Geometry ofThought. MIT Press, 2000.C.L. Hard<strong>in</strong>. Color for Philosophers - Unweav<strong>in</strong>g <strong>the</strong>Ra<strong>in</strong>bow. Hackett Publish<strong>in</strong>g Company, 1988.M. Holi <strong>and</strong> E. Hyvönen. Soft Comput<strong>in</strong>g <strong>in</strong> Ontologies<strong>and</strong> <strong>Semantic</strong> <strong>Web</strong>, chapter Model<strong>in</strong>g Uncerta<strong>in</strong>ty<strong>in</strong> <strong>Semantic</strong> <strong>Web</strong> Taxonomies, pages 31–46.Spr<strong>in</strong>ger, 2006.T. Honkela, V. Pulkki, <strong>and</strong> T. Kohonen. Contextualrelations of words <strong>in</strong> grimm tales analyzed by selforganiz<strong>in</strong>gmap. In F. Fogelman-Soulié <strong>and</strong> P. Gall<strong>in</strong>ari,editors, Proceed<strong>in</strong>gs of ICANN’95, InternationalConference on <strong>Artificial</strong> Neural Networks,147


pages 3–7, Paris, France, October 1995. EC2 etCie, Paris.T. Honkela, S. Kaski, K. Lagus, <strong>and</strong> T. Kohonen.<strong>New</strong>sgroup exploration with WEBSOM method<strong>and</strong> brows<strong>in</strong>g <strong>in</strong>terface. Technical Report A32,Hels<strong>in</strong>ki University of Technology, Laboratory ofComputer <strong>and</strong> Information Science, Espoo, F<strong>in</strong>l<strong>and</strong>,1996.T. Honkela, S. Kaski, K. Lagus, <strong>and</strong> T. Kohonen.WEBSOM—self-organiz<strong>in</strong>g maps of documentcollections. In Proceed<strong>in</strong>gs of WSOM’97,Workshop on Self-Organiz<strong>in</strong>g Maps, pages 310–315. Espoo, F<strong>in</strong>l<strong>and</strong>, 1997.T. Kohonen. Self-Organiz<strong>in</strong>g Maps. Spr<strong>in</strong>ger, 2001.T. Kohonen, S. Kaski, <strong>and</strong> H. Lappala<strong>in</strong>en. Selforganizedformation of various <strong>in</strong>variant-featurefilters <strong>in</strong> <strong>the</strong> adaptive-subspace SOM. Neural Computation,9:1321–1344, 1997.M. Nikravesh. Soft Comput<strong>in</strong>g <strong>in</strong> Ontologies <strong>and</strong> <strong>Semantic</strong><strong>Web</strong>, chapter Beyond <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>:Fuzzy Logic-Based <strong>Web</strong> <strong>Intelligence</strong>, pages 149–209. Spr<strong>in</strong>ger, 2006.H. Ritter <strong>and</strong> T. Kohonen. Self-organiz<strong>in</strong>g semanticmaps. Biological Cybernetics, 61(4):241–254,1989.P. Vogt. Cumulative cultural evolution: Can we everlearn more? In S. Nolfi et al., editor, Proceed<strong>in</strong>gsof SAB 2006, From Animals to Animats 9, pages738–749, Berl<strong>in</strong>, Heidelberg, 2006. Spr<strong>in</strong>ger.L. Vygotsky. Thought <strong>and</strong> language. MIT Press,1986, orig<strong>in</strong>ally published <strong>in</strong> 1934.L. A. Zadeh. Fuzzy sets. Information <strong>and</strong> Control, 8:338–353, 1965.T. Kohonen, S. Kaski, K. Lagus, J. Salojärvi,J. Honkela, V. Paatero, <strong>and</strong> A. Saarela. Self organizationof a massive text document collection.In Kohonen Maps, pages 171–182. Elsevier, Amsterdam,1999.P. Koikkala<strong>in</strong>en <strong>and</strong> E. Oja. Self-organiz<strong>in</strong>g hierarchicalfeature maps. In Proc. IJCNN-90, InternationalJo<strong>in</strong>t Conference on Neural Networks,Wash<strong>in</strong>gton, DC, volume II, pages 279–285, Piscataway,NJ, 1990. IEEE Service Center.M. Koskela, J. Laaksonen, M. Sjöberg, <strong>and</strong> H. Muur<strong>in</strong>en.PicSOM experiments <strong>in</strong> TRECVID 2005.In Proceed<strong>in</strong>gs of <strong>the</strong> TRECVID 2005 Workshop,pages 267–270, 2005.J. Laaksonen, M. Koskela, <strong>and</strong> E. Oja. Picsom: Selforganiz<strong>in</strong>gmaps for content-based image retrieval.In Proceed<strong>in</strong>gs of IEEE International Jo<strong>in</strong>t Conferenceon Neural Networks (IJCNN’99), pages2470–2473, 1999.J. Laaksonen, M. Koskela, <strong>and</strong> E. Oja. Picsom -self-organiz<strong>in</strong>g image retrieval with mpeg-7 contentdescriptions. IEEE Transactions on NeuralNetworks, Special Issue on Intelligent MultimediaProcess<strong>in</strong>g, 13(4):841–853, 2002.K. Lagus, S. Kaski, <strong>and</strong> T. Kohonen. M<strong>in</strong><strong>in</strong>g massivedocument collections by <strong>the</strong> WEBSOM method.Information Sciences, 163:135–156, 2004.Z. Ma. Soft Comput<strong>in</strong>g <strong>in</strong> Ontologies <strong>and</strong> <strong>Semantic</strong><strong>Web</strong>. Spr<strong>in</strong>ger, 2006.<strong>New</strong> <strong>Developments</strong> <strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong>Proceed<strong>in</strong>gs of <strong>the</strong> 12th F<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Conference STeP 2006 148


Julkaisuluettelo – 2006 – List of PublicationsKonferenssijulkaisuja – Conference Proceed<strong>in</strong>gs €1. Hyvönen E., Seppänen J., Syrjänen M., eds. (1984):STeP­84 – Symposium Papers, Vol. 1. 62. Hyvönen E., Seppänen J., Syrjänen M., eds. (1984):STeP­84 – Tutorial <strong>and</strong> Industrial Papers, Vol. 2. 63. Karjala<strong>in</strong>en M., Seppänen J., Tamm<strong>in</strong>en M., eds. (1986):STeP­86 – Symposium Papers: AI <strong>and</strong> Philosophy, Vol. 1 64. Karjala<strong>in</strong>en M., Seppänen J., Tamm<strong>in</strong>en M., eds. (1986):STeP­86 – Symposium Papers: Methodology, Vol. 2. 65. Karjala<strong>in</strong>en M., Seppänen J., Tamm<strong>in</strong>en M., eds. (1986):STeP­86 – Symposium Papers: Applications, Vol. 3. 66. Mäkelä M., L<strong>in</strong>na<strong>in</strong>maa S., Ukkonen E., eds. (1988):STeP­88 – Contributed Papers: Applications, Vol. 1. 67. Mäkelä M., L<strong>in</strong>na<strong>in</strong>maa S., Ukkonen E., eds. (1988):STeP­88 – Contributed Papers: Methodology, Vol. 2. 68. Syrjänen M., Oivo M., Salonen P., eds. (1990):STeP­90 – Tutorial <strong>and</strong> Symposium Papers 69. Hyvönen E., Seppänen J., Syrjänen M., eds. (1992):STeP­92 – <strong>New</strong> Directions <strong>in</strong> AI – Papers, Vol. 1 1010. Hyvönen E., Seppänen J., Syrjänen M., eds. (1992):STeP­92 – <strong>New</strong> Directions <strong>in</strong> AI – Symposia, Vol. 2 1011. Hyvönen E., Seppänen J., Syrjänen M., eds. (1992):STeP­92 – <strong>New</strong> Directions <strong>in</strong> AI – Workshops, Vol. 3 1012. Carlsson C., Järvi T., Reponen T., eds. (1994):STeP­94 – Multiple Paradigms for <strong>Artificial</strong> <strong>Intelligence</strong> 1013. Al<strong>and</strong>er J., Honkela T., Jakobsson M., eds (1996):STeP­96 – Genes, Nets <strong>and</strong> Symbols 1214. Koikkala<strong>in</strong>en P., Puuronen S., eds (1998):STeP­98 – Human <strong>and</strong> <strong>Artificial</strong> Information Process<strong>in</strong>g 1415. Hyötyniemi H., ed. (2000):Feedback to <strong>the</strong> Future Systems, Cybernetics <strong>and</strong><strong>Artificial</strong> <strong>Intelligence</strong> 1416. Hyötyniemi H., ed. (2000):STeP 2000 – Millennium of <strong>Artificial</strong> <strong>Intelligence</strong>– 'AI of Today': Symposium on Applications 1417. Hyötyniemi H., ed. (2000):STeP 2000 – Millennium of <strong>Artificial</strong> <strong>Intelligence</strong>– 'AI of Tomorrow': Symposium on Theory 1418. Ala­Siuru P., Kaski S., eds. (2002):STeP 2002 – The Art of Natural <strong>and</strong> <strong>Artificial</strong> 1419. Hyötyniemi H., Ala­Siuru P., Seppänen J. eds. (2004):STeP 2004 – Life, Cybernetics <strong>and</strong> Systems Sciences 1420. Hyvönen E., Kaupp<strong>in</strong>en T., Salm<strong>in</strong>en M., Viljanen K.Ala­Siuru P, eds. (2004): STeP 2004 – <strong>Web</strong> <strong>Intelligence</strong> 1421. Al<strong>and</strong>er J., Ala­Siuru P., Hyötyniemi H., eds. (2004):STeP­2004 – Orig<strong>in</strong> of Life <strong>and</strong> Genetic Algorithms 1422. Honkela T., Raiko T., Kortela J., Valpola H., eds. (2006):N<strong>in</strong>th Sc<strong>and</strong><strong>in</strong>avian Conference on <strong>Artificial</strong> <strong>Intelligence</strong>(SCAI 2006) 1823. Hyvönen E., Kaupp<strong>in</strong>en T., Kortela J., Laukkanen M., Raiko T.,<strong>and</strong> Viljanen K., eds. (2006): STeP­2006 – <strong>New</strong> <strong>Developments</strong><strong>in</strong> <strong>Artificial</strong> <strong>Intelligence</strong> <strong>and</strong> <strong>the</strong> <strong>Semantic</strong> <strong>Web</strong> 182. Karanta I., ed. (1989):Hyperteksti ja tekoäly 63. Hynynen J., L<strong>in</strong>na<strong>in</strong>maa S., eds. (1990):The French­F<strong>in</strong>nish Colloquium on AI Applications 64. Karanta I., Seppänen J., eds. (1993):Kaaostutkimus ja tietotekniikka – katastrofeja, attraktoreja,ja fraktaaleja 125. Stark S., Tyystjärvi K., eds. (1990):Ajattelevatko koneet? – Tekoäly, tietotekniikka ja robotiikka 126. Hautamäki A., Nyman G., toim. (1992):Kognitiotiede ja koneäly 127. Lehtola., Jok<strong>in</strong>iemi J., eds. (1992):Embedded <strong>and</strong> Real­Time Systems 148. Kurenniemi E., ed. (1992):A Bibliography on SETI 109. L<strong>in</strong>naluoto S., Seppänen J., eds. (1992):SETI – Search for Extraterrestrial <strong>Intelligence</strong> 1210. Bulsari A., Saxén B., eds. (1993):Neural Network Research <strong>in</strong> F<strong>in</strong>l<strong>and</strong> 1411. Lehtola A., Jok<strong>in</strong>iemi J., eds. (1993):Conceptual Modell<strong>in</strong>g <strong>and</strong> Object­Oriented Programm<strong>in</strong>g 1412. Hyvönen E., Seppänen J., toim. (1995):Ke<strong>in</strong>oelämä – <strong>Artificial</strong> Life. Tekniikkaa, luonnontiedettä,filosofiaa ja taidetta 1413. Haaparanta L., Hyvönen E., Seppänen J., Silvonen J.,toim. (1995): Älyn ulottuvuudet ja oppihistoria –Matka logiikan, psykologian ja tekoälyn juurille 1414. Gefwert C., Orponen P., Seppänen J., toim. (1996):Logiikka, matematiikka ja tietokone – Logic, Ma<strong>the</strong>matics<strong>and</strong> <strong>the</strong> Computer 1415. Honkela T., toim. (1999): Pelit, tietokone ja ihm<strong>in</strong>en– Games, Computers <strong>and</strong> People 14SCAI – Sc<strong>and</strong><strong>in</strong>avian AI Conference Proceed<strong>in</strong>gs €1. Jaakkola H., L<strong>in</strong>na<strong>in</strong>maa S., eds. (1989):SCAI' 1989 – Proceed<strong>in</strong>gs of <strong>the</strong> Second Sc<strong>and</strong><strong>in</strong>avianConference on <strong>Artificial</strong> <strong>Intelligence</strong>, Vols. 1­2, Tampere 102. Grahn G., ed. (1997): SCAI' 1997 – Proceed<strong>in</strong>gs of <strong>the</strong> SecondSc<strong>and</strong><strong>in</strong>avian Conference on <strong>Artificial</strong> <strong>Intelligence</strong>, Vol. 1­2,Hels<strong>in</strong>ki 103. Al<strong>and</strong>er J., ed. (1997): Proceed<strong>in</strong>gs of <strong>the</strong> Third Nordic Workshopon Genetic Algorithms <strong>and</strong> <strong>the</strong>ir Applications (3NWGA), Vaasa 10(See also: SCAI 2006 proc. item 22 <strong>in</strong> Conference Proceed<strong>in</strong>gs above.)Kansa<strong>in</strong>välisiä kokouksia – International Conferences €1. Bulsari Abhay, Kallio Sirpa, eds. (1995): Eng<strong>in</strong>eer<strong>in</strong>gApplications of <strong>Artificial</strong> Neural Networks. Proceed<strong>in</strong>gs of <strong>the</strong>International Conference EANN '95, Otaniemi,21­23 August 1995, F<strong>in</strong>l<strong>and</strong>. 142. Pylkkänen Paavo, Pylkkö Pauli, eds. (1995): <strong>New</strong> Directions <strong>in</strong>Cognitive Science. Proceed<strong>in</strong>gs of <strong>the</strong> International Symposium,Saariselkä, 4­9 August 1995, Lapl<strong>and</strong>, F<strong>in</strong>l<strong>and</strong>. 14Symposiojulkaisuja – Symposium Publications €1. Kesk<strong>in</strong>en K., toim. (1989):Epävarmuus, päätöksenteko ja tietämystekniikka 6Tiedotuslehti – Arpakannus – Magaz<strong>in</strong>e €1986 alkaen 2­4 numeroa/v – 2­4 issues/year 1986­1996 61997 alkaen ajoitta<strong>in</strong> – S<strong>in</strong>ce 1997 occasional issues 6To order, call +358 9 5617 830, send a fax to +358 9 5607 5365 or email to office@stes.fi.When order<strong>in</strong>g publications, please state <strong>the</strong> name(s) of <strong>the</strong> publication(s) <strong>and</strong> <strong>the</strong> amount ofcopies you want to buy. Please also give your post address (name, street address, zip/postal code<strong>and</strong> country) for deliver<strong>in</strong>g <strong>the</strong> publications to you by post. Shipp<strong>in</strong>g costs 5€ will be added to <strong>the</strong>total sum of your order.Contact <strong>in</strong>formationF<strong>in</strong>nish <strong>Artificial</strong> <strong>Intelligence</strong> Society, Susanna Kosk<strong>in</strong>en, c/o Toimistopalvelu Hennax T:mi,Henrik<strong>in</strong>tie 7 D, FIN­00370 HELSINKIWWW: http://www.stes.fiemail: office@stes.fiphone: +358 40 535 2617

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!