7 research outputs found

    Rule-based Metaprogramming for Smart Spaces

    Get PDF
    The motivation of this work is goes back to the objective of achieving interoperability in multiparty environments such as ubiquitous systems. Full interoperability in an open environment requires mutually sharing the behavior of the participants, so that the behavioral interoperability becomes as relevant as interoperability of data. This requires analysis or evaluation of behavioral descriptions from untrusted parties in a controlled manner. Furthermore we need to manage the evaluation process based on the content and provenance of the descriptions and other information on which the descriptions operate. This information allows one to choose which behaviour is to be used and which data is to be operated on. To enable this vision we propose to present behavioral descriptions as Answer Set Programming (ASP) rules. In this work we present a method for the evaluation of ASP rules based on metaprogramming: the evaluator for the rules is implemented using ASP rules themselves. To facilitate metaevaluation, we transform rules to a reified format, which enables representing rules as facts, and construct the metaevaluator to work directly on this reified format. Facts corresponding to reified rules and the metaevaluation rules are then treated by native ASP tools. We give a proof that our metaevaluator adheres to the stable model semantics for ASP evaluation. Having rules in the reified format is beneficial as behavioral rules can then be shared and manipulated as any other data. We have implemented a mechanism which maintains the provenance information of data during the rule evaluation along with hooks to allow control over the context of the use of that data. This allows attaching arbitrary metainformation to rules and facts and allows independently creating policies which control on how different data is handled in the ASP solving phase. In addition to the metaevaluation phase, we have implemented syntactical safety analysis of reified rules. These methods enable sharing, analyzing and executing behavioral descriptions in a controlled manner within the same semantic ASP framework, providing one solution for the interoperability problem. The evaluation of ASP rules has two logical phases: grounding and actual solving. We have separated provenance handling and syntactic analysis to the metagrounding phase with the intention that rules and data, which do not match the provenance criteria, are never delivered to the solving phase. To the best of our knowledge, this work presents the first implementation of a metagrounder for ASP programs. According to performance analysis, the metagrounder is not yet competitive with current grounder technology.Tämän opinnäytteen motivaationa on yhteensopivuus ubiikkien järjestelmien kaltaisissa usean käyttäjän ympäristöissä. Täydellinen yhteensopivuus avoimissa ympäristöissä vaatii osapuolten käyttäytymisten kuvausten jakamista käyttäjien kesken. Tällöin käyttäytymisen kuvausten yhteensopivuus muodostuu yhtä tärkeäksi kuin muun tiedon yhteensopivuus. Tästä johtuen on tarpeellista analysoida tai evaluoida hallitusti käyttäytymisten kuvauksia, jotka ovat peräisin mahdollisesti epäluotettavilta tahoilta. Tämän lisäksi evaluointiprosessia täytyy hallinnoida perustuen sekä käyttäytymisten kuvausten että muun käytetyn tiedon sisältöön ja alkuperään. Tämän tiedon avulla valitaan mitä käyttäytymiskuvauksia ja mitä tietoa tullaan käyttämään evaluoinnissa. Tämän vision mahdollistamiseksi tässä työssä ehdotetaan käyttäytymiskuvausten esitettämistä sääntöpohjaisella rajoiteohjelmoinnilla (engl. Answer Set Programming, ASP). Tässä opinnäytteessä kuvataan metaohjelmointipohjainen menetelmä sääntöjen evaluoimiseen, missä itse evaluaattori on toteutettu ASP-säännöillä. Jotta metaevaluaatio olisi mahdollista, säännöt muunnetaan reifioituun muotoon, joka sallii sääntöjen esittämisen faktoina ja metaevaluaattori toteutetaan toimimaan näiden reifioitujen kuvausten kanssa. Faktoina esitetyt reifioidut säännöt ja metaevaluaattorin säännöt evaluoidaan olemassaolevilla ASP-työkaluilla. Työssä esitetään oikeellisuustodistus, jonka perusteella toteutettu metaevaluaattori noudattaa stabiilien mallien semantiikkaa. Sääntöjen esittäminen reifioidussa muodossa on hyödyllistä, sillä tällöin sääntöjä voidaan jakaa ja käsitellä samoin kuin muutakin tietoa. Tässä työssä esitetään lisäksi menetelmä, joka säilyttää sääntöjen käyttämien tietojen alkuperän sääntöjen evaluoinnissa. Tämän ohella esitellään edelliseen laajennus jonka avulla voidaan kontrolloida syötetiedon käyttökonteksti. Tämä mekanismi mahdollistaa mielivaltaisen metainformaation liittämisen sääntöihin sekä muuhun tietoon ja suo erityisesti mahdollisuuden määrittää lisätoimintaperiaatteita sääntöevaluoinnin ohjaamiseen. Nämä menetelmät mahdollistavat käyttäytymissääntöjen turvallisen ja hallitun jakamisen, analysoinnin sekä evaluaation yhdessä semanttisessa viitekehyksessä, tarjoten erään mahdollisen ratkaisun yhteensopivuusongelmaan. Työssä esitetään myös syntaktinen turvallisuusanalyysi reifioiduille säännöille. ASP-sääntöjen evaluaatiossa on kaksi loogista vaihetta: muuttujien instantiointi ja varsinainen ratkaiseminen. Tietojen alkuperän käsittely sekä syntaktinen analyysi on rajattu metatasolle. Näin varmistetaan, että tiedot tai säännöt, jotka eivät ole toimintaperiaatteiden mukaisia, eivät koskaan päädy ratkaisuvaiheeseen. Tässä työssä on esitetty käsittääkseemme ensimmäinen toteutus ASP-sääntöjen instantioinnista metatasolla. Suoritetun vertailun perusteella metatason instantioinnin tehokkuus ei ole vielä kilpailukykyinen nykyisten instantiointitekniikoiden kanssa

    SEA09:Software Engineering for Answer Set Programming

    Get PDF

    Kiel Declarative Programming Days 2013

    Get PDF
    This report contains the papers presented at the Kiel Declarative Programming Days 2013, held in Kiel (Germany) during September 11-13, 2013. The Kiel Declarative Programming Days 2013 unified the following events: * 20th International Conference on Applications of Declarative Programming and Knowledge Management (INAP 2013) * 22nd International Workshop on Functional and (Constraint) Logic Programming (WFLP 2013) * 27th Workshop on Logic Programming (WLP 2013) All these events are centered around declarative programming, an advanced paradigm for the modeling and solving of complex problems. These specification and implementation methods attracted increasing attention over the last decades, e.g., in the domains of databases and natural language processing, for modeling and processing combinatorial problems, and for high-level programming of complex, in particular, knowledge-based systems

    Tools and Techniques for Easing the Application of Answer Set Programming

    No full text
    Dottorato di Ricerca in: Matematica ed Informatica. Ciclo XXVIAnswer Set Programming (ASP) is a well-established declarative problem solving paradigm; it features high expressiveness and the ability to deal with incomplete knowledge, so it became widely used in AI and it is now recognized as a powerful tool for knowledge representation and reasoning (KRR). Thanks to the expressive language and the availability of diverse robust systems, Answer Set Programming has recently gained popularity and has been applied fruitfully to a wide range of domains. This made clear the need for proper tools and interoperability mechanisms that ease the development of ASP-based applications. Also, the spreading of ASP from a strictly theoretical ambit to more practical aspects requires additional features for easing the interoperability and integration with other software; furthermore, improving the performance of actual ASP system is crucial for allowing the use of the potential of ASP in new practical contexts. The contribution of this thesis aims at addressing such challenges; we introduce new tools and techniques for easing the application of ASP. In particular, we present EMBASP: a framework for the integration of ASP in external systems for general applications to different platforms and ASP reasoners. The framework features explicit mechanisms for two-way translations between strings recognisable by ASP solvers and objects in the programming language. Furthermore, we define proper means for handling external computations in ASP programs, and implement a proper framework for explicit calls to Python scripts via external atoms into the ASP grounder I-DLV. We also define and implement, into the same system, an additional framework for creating ad-hoc directives for interoperability and make use of it for providing some ready-made ones for the connection with relational and graph databases. Eventually, we work at improving the ASP computation, and present two new ASP systems: DLV2 and I-DLV+MS. DLV2 updates DLV with modern evaluation techniques, combining I-DLV with the solver wasp, while I-DLV+MS is a new ASP system that integrates I-DLV, with an automatic solver selector for inductively choose the best solver, depending on some inherent features of the instantiation produced by I-DLV.Università della Calabri
    corecore