16 research outputs found

    Strategic polymorphism requires just two combinators!

    Get PDF
    In previous work, we introduced the notion of functional strategies: first-class generic functions that can traverse terms of any type while mixing uniform and type-specific behaviour. Functional strategies transpose the notion of term rewriting strategies (with coverage of traversal) to the functional programming paradigm. Meanwhile, a number of Haskell-based models and combinator suites were proposed to support generic programming with functional strategies. In the present paper, we provide a compact and matured reconstruction of functional strategies. We capture strategic polymorphism by just two primitive combinators. This is done without commitment to a specific functional language. We analyse the design space for implementational models of functional strategies. For completeness, we also provide an operational reference model for implementing functional strategies (in Haskell). We demonstrate the generality of our approach by reconstructing representative fragments of the Strafunski library for functional strategies.Comment: A preliminary version of this paper was presented at IFL 2002, and included in the informal preproceedings of the worksho

    Strategic polymorphism requires just two combinators!

    Get PDF
    In previous work, we introduced the notion of functional strategies: first-class generic functions that can traverse terms of any type while mixing uniform and type-specific behaviour. Functional strategies transpose the notion of term rewriting strategies (with coverage of traversal) to the functional programming paradigm. Meanwhile, a number of Haskell-based models and combinator suites were proposed to support generic programming with functional strategies. In the present paper, we provide a compact and matured reconstruction of functional strategies. We capture strategic polymorphism by just two primitive combinators. This is done without commitment to a specific functional language. We analyse the design space for implementational models of functional strategies. For completeness, we also provide an operational reference model for implementing functional strategies (in Haskell). We demonstrate the generality of our approach by reconstructing representative fragments of the Strafunski library for functional strategies

    Typed Generic Traversal With Term Rewriting Strategies

    Full text link
    A typed model of strategic term rewriting is developed. The key innovation is that generic traversal is covered. To this end, we define a typed rewriting calculus S'_{gamma}. The calculus employs a many-sorted type system extended by designated generic strategy types gamma. We consider two generic strategy types, namely the types of type-preserving and type-unifying strategies. S'_{gamma} offers traversal combinators to construct traversals or schemes thereof from many-sorted and generic strategies. The traversal combinators model different forms of one-step traversal, that is, they process the immediate subterms of a given term without anticipating any scheme of recursion into terms. To inhabit generic types, we need to add a fundamental combinator to lift a many-sorted strategy ss to a generic type gamma. This step is called strategy extension. The semantics of the corresponding combinator states that s is only applied if the type of the term at hand fits, otherwise the extended strategy fails. This approach dictates that the semantics of strategy application must be type-dependent to a certain extent. Typed strategic term rewriting with coverage of generic term traversal is a simple but expressive model of generic programming. It has applications in program transformation and program analysis.Comment: 85 pages, submitted for publication to the Journal of Logic and Algebraic Programmin

    Reflection in conditional rewriting logic

    Get PDF
    AbstractWe recall general metalogical axioms for a reflective logic based on the notion of a universal theory, that is, a theory that can simulate the deductions of all other theories in a class of theories of interest, including itself. We then show that conditional rewriting logic is reflective, generalizing in two stages: first to the unsorted conditional case, and then to the many-sorted conditional case, the already known result for unconditional and unsorted rewriting logic (Reflection in Rewriting Logic: Metalogical Foundations and Metaprogramming Applications. CSLI Publications, 2000). This work should be seen as providing foundations for many useful applications of rewriting logic reflection. The results presented here have greatly influenced the design of the Maude language, which implements rewriting logic and supports its reflective capabilities, and have been used as a theoretical foundation for applications such as internal rewrite strategies, reflective design of theorem proving tools, module algebra and metaprogramming, and metareasoning in metalogical frameworks

    Strategy application, observability, and the choice combinator.

    Full text link

    Twenty years of rewriting logic

    Get PDF
    AbstractRewriting logic is a simple computational logic that can naturally express both concurrent computation and logical deduction with great generality. This paper provides a gentle, intuitive introduction to its main ideas, as well as a survey of the work that many researchers have carried out over the last twenty years in advancing: (i) its foundations; (ii) its semantic framework and logical framework uses; (iii) its language implementations and its formal tools; and (iv) its many applications to automated deduction, software and hardware specification and verification, security, real-time and cyber-physical systems, probabilistic systems, bioinformatics and chemical systems

    Schemagesteuerte Induktive Funktionale Programmsynthese durch Automatische Erkennung von Typmorphismen

    Get PDF
    Inductive functional programming systems can be characterised by two diametric approaches: Either they apply exhaustive program enumeration which uses input/output examples (IO) as test cases, or they perform an analytical, data-driven structural generalisation of the IO examples. Enumerative approaches ignore the structural information provided with the IO examples, but use type information to guide and restrict the search. They use higher-order functions which capture recursion schemes during their enumeration, but apply them randomly in a uninformed manner. Analytical approaches on the other side heavily exploit this structural information, but have ignored the benefits of a strong type system so far and use only recursion schemes either fixed and built in, or selected by an expert user. In category theory universal constructs, such as natural transformations or type morphisms, describe recursion schemes which can be defined on any inductively defined data type. They can be characterised by specific universal properties. Those type morphisms and related concepts provide a categorical approach to functional programming, which is often called categorical programming. This work shows how categorical programming can be applied to Inductive Programming and how universal constructs, such as catamorphisms, paramorphisms, and type functors, can be used as recursive program schemes for inductive functional programming. The use of program schemes for Inductive Programming is not new. The special appeal and novelty of this work is that, contrary to previous approaches, the program schemes are neither fixed, nor selected by an expert user: The applicability of those recursion schemes can be automatically detected in the given IO examples of a target function by checking the universal properties of the corresponding type morphisms. Applying this to the analytical system Igor2, both the capabilities and the expressiveness can be extended without a decrease in efficiency. An extension of the analytical functional inductive programming system Igor2 is proposed and its algorithms described. An empirical evaluation demonstrates the improvements with respect to efficiency and effectiveness that can be achieved by the use of type morphisms for Igor2 due to a reduction in search space complexity.Systeme zur induktiven Programmsynthese können bezĂŒglich zweier gegensĂ€tzlicher AnsĂ€tze beschrieben werden: Enumerative Systeme zĂ€hlen Programme vollstĂ€ndig auf und verwenden Eingabe/Ausgabe Beispiele (E/A) lediglich zum Testen; analytische, datengetriebene Systeme hingegegen generieren ein Programm durch strukturelle Generalisierung der E/A Beispiele. AufzĂ€hlende AnsĂ€tze ignorieren die in den E/A Beispielen enthaltene strukturelle Information völlig, benutzen aber Typinformation, um den Suchraum zu beschrĂ€nken und die Suche zu steuern. Sie verwenden Funktionen höherer Ordnung als rekursive Programmschemata wĂ€hrend der AufzĂ€hlung, wenden diese aber beliebig und nicht zielgerichtet an. Analytische AnsĂ€tze hingegen nutzen extensiv die strukturelle Information der E/A Beispiele, vernachlĂ€ssigen aber die VorzĂŒge eines starken Typsystems. Programmschemata verwenden sie lediglich starr und fest codiert oder durch Auswahl eines Experten. In der Kategorientheorie beschreiben universelle Konstrukte wie zum Beispiel natĂŒrliche Transformationen und Typmorphismen Rekursionsschemata auf beliebigen, induktiv definierten Datentypen. Diese Konstrukte zeichnen sich durch spezifische, universelle Eigenschaften aus. Derartige Typmorphismen bieten einen kategorientheoretischen Zugang zur funktionalen Programmierung. Diese Arbeit zeigt, wie Catamorphismen, Paramorphismen und Typfunktoren als universelle Konstrukte in der induktiven Programmsynthese als rekursive Programmschemata verwendet werden können. Die Verwendung von Schemata in der induktiven Programmierung ist an sich nichts Neues, die Innovation liegt jedoch in der Art und Weise der EinfĂŒhrung der Schemata. Im Gegensatz zu herkömmlichen AnsĂ€tzen wird weder ein festes Schema verwendet, noch wĂ€hlt ein Experte ein Schema aus. Die vorliegende Arbeit zeigt, dass die Anwendbarkeit eines bestimmten Schemas sich aus den E/A Beispielen einer konkreten Zielfunktion ableiten lĂ€sst, wenn man die universellen Eigenschaften das dem Programmschema entsprechenden Typmorphismus in den Beispielen erfĂŒllen kann. Im Folgenden wird eine Erweiterung des funktionalen, induktiven Programmsynthesesystems Igor2 vorgestellt und der neue Algorithmus beschrieben. Ein empirischer Vergleich untermauert die VorzĂŒge der Erweiterung und macht die Steigerung der Effizienz und der EffektivitĂ€t, die durch die Verwendung von Typmorphismen durch KomplexitĂ€tsreduktion des Suchraums erzielt werden kann, deutlich

    Components as coalgebras

    Get PDF
    In the tradition of mathematical modelling in physics and chemistry, constructive formal specification methods are based on the notion of a software model, understood as a state-based abstract machine which persists and evolves in time, according to a behavioural model capturing, for example, partiality or (different degrees of) nondeterminism. This can be identified with the more prosaic notion of a software component advocated by the software industry as ‘building block’ of large, often distributed, systems. Such a component typically encapsulates a number of services through a public interface which provides a limited access to a private state space, paying tribute to the nowadays widespread object-oriented programming principles. The tradition of communicating systems formal design, by contrast, has developed the notion of a process as an abstraction of the behavioural patterns of a computing system, deliberately ignoring the data and state aspects of software systems. Both processes and components are among the broad group of computing phenomena which are hardly definable (or simply not definable) algebraically, i.e., in terms of a complete set of constructors. Their semantics is essentially observational, in the sense that all that can be traced of their evolution is their interaction with the environment. Therefore, coalgebras, whose theory has recently witnessed remarkable developments, appear as a suitable modelling tool. The basic observation of category theory that universal constructions always come in pairs, has motivated research on the duality between algebras and coalgebras, which provides a bridge between models of static (constructive, data-oriented) and dynamical (observational, behaviour-oriented) systems. At the programming level, the intuitive symmetry between data and behaviour provides evidence of such a duality, in its canonical initial-final specialisation. This line of thought entails both definitional and proof principles, i.e., a basis for the development of program calculi directly based on (actually driven by) type specifications. Moreover, such properties can be expressed in terms of generic programming combinators which are used, not only to calculate programs, but also to program with. Framed in this context, this thesis addresses the following main themes: The investigation of a semantic model for (state-based) software components. These are regarded as concrete coalgebras for some Set endofunctors, with specified initial conditions, and organise themselves in a bicategorical setting. The model is able to capture both behavioural issues, which are usually left implicit in state-based specification methods, and interaction through structured data, which is usually a minor concern on process calculi. Two basic cases are considered entailing, respectively, a ‘functional’ and an ‘object-oriented’ shape for components. Both cases are parametrized by a model of behaviour, introduced as a strong (usually commutative) monad. The development of corresponding component calculi, also parametric on the behaviour model, which adds to the genericity of the approach. The study of processes and the ‘reconstruction’ of classical (CCS-like) process calculi on top of their representation as inhabitants of (the carriers of) final coalgebras, in an essentially pointfree, calculational style. An overall concern for genericity, in the sense that models and calculi for both components and processes are parametric on the behaviour model and the interaction discipline, respectively. The animation of both processes and components in CHARITY, a functional programming language entirely based on inductive and coinductive categorical data types. In particular this leads to the development of a process calculi interpreter parametric on the interaction discipline.PRAXIS XXI - Projecto LOGCAMP; POO11/IC-PME/II/S -Projecto KARMA; Fundação para a CiĂȘncia e Tecnologia; ALGORITMI Research Center

    Bones at a crossroads

    Get PDF
    Bone tool studies are at a crossroads. A current path is to go beyond the concatenation of methods or concepts borrowed from other disciplines and aim instead at a truly integrated approach that is more in line with the objectives of interdisciplinary and transdisciplinary research. The papers in this volume follow this direction by adopting various forms of dialogue and integration between old and new methods and approaches, including technological analysis, usewear analysis, typology, zooarchaeology, stable isotope analysis, experimental archaeology or spatial analysis. They represent a mixture of methodological issues, case studies, and discussions of larger cultural and historical phenomena that span thousands of years and many parts of the World, from South Asia to the Near East and Europe, and from North to South America. The synergies deriving from these multi-perspective approaches lead to the repeated identification of diverse social aspects of past societies, including the identification of general social contexts of bone tool production and use, transmission of knowledge, the symbolic dimensions of artifacts, and intergroup relations as well as warfare and state formation processes. All these papers grew out of communications presented at the 13th meeting of the Worked Bone Research Group (WBRG) on October 7th–13th, 2019, at the DĂ©partement d’anthropologie, UniversitĂ© de MontrĂ©al, Canada. The WBRG is an official working group of the International Council for Archaeozoology (ICAZ) dealing with the study of worked faunal remains from archaeological sites

    Wellesley College Bulletin [1987-1988]

    Get PDF
    https://repository.wellesley.edu/catalogs/1085/thumbnail.jp
    corecore