66 research outputs found

    Transposing partial components: an exercise on coalgebraic refinement

    Get PDF
    A partial component is a process which fails or dies at some stage, thus exhibiting a finite, more ephemeral behaviour than expected (eg, operating system crash). Partiality --- which is the rule rather than exception in formal modelling --- can be treated mathematically via totalization techniques. In the case of partial functions, totalization involves error values and exceptions. In the context of a coalgebraic approach to component semantics, this paper argues that the behavioural counterpart to such functional techniques should extend behaviour with try-again cycles preventing from component collapse, thus extending totalization or transposition from the algebraic to the coalgebraic context. We show that a refinement relationship holds between original and totalized components which is reasoned about in a coalgebraic approach to component refinement expressed in the pointfree binary relation calculus. As part of the pragmatic aims of this research, we also address the factorization of every such totalized coalgebra into two coalgebraic components --- the original one and an added front-end --- which cooperate in a client-serverstyle.Fundação para a Ciência e a Tecnologia (FCT) - PURe Project under contract POSI/ICHS/44304/2002

    Components as coalgebras : the refinement dimension

    Get PDF
    This paper characterizes refinement of state-based software components modeled as pointed coalgebras for some Set endofunctors. The proposed characterization is parametric on a specification of the underlying behaviour model introduced as astrong monad. This provides a basis to reason about (and transform) state-based software designs. In particular it is shown how refinement can be applied to the development of the inequational subset of a calculus of generic software components

    A calculus for generic, QoS-aware component composition

    Get PDF
    Software QoS properties, such as response time, availability, bandwidth requirement, memory usage, among many others, play a major role in the processes of selecting and composing software components. This paper extends a component calculus to deal, in an effective way, with them. The calculus models components as generalised Mealy machines, i.e., state-based entities interacting along their life time through well defined interfaces of observers and actions. QoS is introduced through an algebraic structure specifying the relevant QoS domain and how its values are composed under different disciplines. A major effect of introducing QoS-awareness is that a number of equivalences holding in the plain calculus become refinement laws. The paper also introduces a prototyper for the calculus developed as a ‘proof-of-concept’ implementation.FCT -Fuel Cell Technologies Program(FCOMP-01-0124-FEDER-020537

    Pointfree factorization of operation refinement

    Get PDF
    The standard operation refinement ordering is a kind of “meet of op- posites”: non-determinism reduction suggests “smaller” behaviour while increase of definition suggests “larger” behaviour. Groves’ factorization of this ordering into two simpler relations, one per refinement concern, makes it more mathe- matically tractable but is far from fully exploited in the literature. We present a pointfree theory for this factorization which is more agile and calculational than the standard set-theoretic approach. In particular, we show that factorization leads to a simple proof of structural refinement for arbitrary parametric types and ex- ploit factor instantiation across different subclasses of (relational) operation. The prospect of generalizing the factorization to coalgebraic refinement is discussedFundação para a Ciência e a Tecnologia (FCT) - PURE Project (Program Understanding and Re-engineering: Calculi and Applications), contract POSI/ICHS/44304/2002

    Foundations of program refinement by calculation

    Get PDF
    Tese de doutoramento em Informática (ramo de conhecimento em Fundamentos da Computação)Embora não seja prática generalizada, aceita-se hoje o valor da especificação formal de aplicações como ingrediente essencial ao desenvolvimento de software fiável. Isso pressupõe uma noção adicional — a de refinamento — capaz de sistematizar a derivação de implementações correctas a partir de modelos abstractos (ie. especificações). No chamado estilo construtivo de desenvolvimento, faz-se refinamento passo-a-passo, provando que cada passo decorre do anterior por regras que garantem a correcção. Estas provas, que são vulgarmente feitas na lógica de predicados e teoria de conjuntos, têm, porém, problemas de escalabilidade: por um lado, não é prático provar factos envolvendo muitas variáveis e quantificações. Por outro, o nível relativamente pouco ágil em que decorrem as provas impede a sua progressão e pede ferramentas automáticas de prova. Esta tese desenvolve uma técnica alternativa de refinamento baseada na chamada transformada-pointfree. A ideia é desenvolver um cálculo ágil capaz de calcular implementações a partir das suas especificações por transformações algébricas simples. A transformada actua sempre que pretendemos raciocinar, mapeando expressões da lógica de predicados em expressões do cálculo relacional com implosão das quantificações e outras construções baseadas em variáveis. Nesse sentido, esta tese aborda os fundamentos do refinamento de programas por cálculo, através de raciocínios ao nível do cálculo de relações binárias dito pointfree, nos seus dois níveis essenciais: dados e algoritmos. Para esse efeito, desenvolvem-se e generalizam-se algumas construções do cálculo relacional, nomeadamente a transposição funcional, uma técnica que tem por objectivo converter relações em funções, de modo a exprimir a álgebra de relações através da álgebra de funções. É utilizada nesta dissertação como leit-motiv. No sentido de potenciar ao máximo a pretendida algebrização do processo de cálculo de programas, a abordagem proposta capitaliza no conceito de conexão de Galois. Em particular, mostra-se como as principais leis de refinamento de dados podem ser vistas como esse tipo de conexão. No plano do refinamento algorítmico, estuda-se a ordem padrão de refinamento ao nível pointfree e calcula-se a sua factorização em duas subordens com comportamentos opostos: redução de não-determinismo e aumento da definição. Essa factorização torna a ordem original mais tratável matematicamente. Apresenta-se a sua teoria em estilo pointfree, que inclui uma prova simples do refinamento estrutural, para tipos paramétricos arbitrários. Finalmente, mostramos que só precisamos de uma regra completa de refinamento relacional—para provar o refinamento coalgébrico—e utilizámo-la para testemunhar o refinamento por cálculo de relações de transição correspondentes a coalgebras.Design of trustworthy software calls for technologies which discuss software reliability formally, ie. by writing and reasoning about mathematical models of real-life objects and activities (vulg. specifications). Such technologies involve the additional notion of refinement (or reification), which means the systematic process of ensuring correct implementations for formal specifications. In the well-known constructive style for software development, design is factored in several steps, each intermediate step being first proposed and then proved to follow from its antecedent. However, such an ”invent-and-verify” style is often impractical due to the complexity of the mathematical reasoning involved in real-size software problems. Moreover, program reasoning is normally carried out in predicate/ temporal logic and na¨ıve set theory — notations which don’t scale up to fully detailed models of complex problems. This thesis is concerned with the foundations of an alternative technique for program refinement based on so-called pointfree calculation. The idea is to develop a calculus allowing for programs to be actually calculated from their specifications. Instead of doing proofs from first principles, this strategy leads to implementations which are “correct by construction”. Conventional refinement rules are transformed into simple, elegant equations dispensing with points and involving only binary relation combinators. The pointfree binary relational calculus is therefore at the heart of the proposed refinement theory. This thesis adds to such a mathematical framework in two ways: on the one hand it shows how to apply it to data and algorithimc refinement problems. On the other hand, some constructions are proposed which prove useful not only in refinement but also in general. This includes generic functional transposition, a technique for converting relations into functions aimed at developing relational algebra via the algebra of functions. It is employed in this dissertation as a leit motiv. Our proposed theory of data refinement draws heavily on the Galois connection approach to mathematical reasoning. This includes a simple way to calculate refinement invariants induced by the Galois connected laws. Algorithmic refinement is addressed in the same way. The standard operation refinement ordering is given a pointfree treatmentwhich includes a simple calculation of Groves’ factorization and its direct application in structural refinement involving arbitrary parametric types. Finally, coalgebraic refinement is done using an equivalent single complete rule for data refinement which is used to witness refinement by calculation of transition relations corresponding to coalgebras

    Pointfree Factorization of Operation Refinement

    Full text link
    The standard operation refinement ordering is a kind of “meet of opposites”: non-determinism reduction suggests “smaller ” behaviour while increase of definition suggests “larger ” behaviour. Groves ’ factorization of this ordering into two simpler relations, one per refinement concern, makes it more mathematically tractable but is far from fully exploited in the literature. We present a pointfree theory for this factorization which is more agile and calculational than the standard set-theoretic approach. In particular, we show that factorization leads to a simple proof of structural refinement for arbitrary parametric types and exploit factor instantiation across different subclasses of (relational) operation. The prospect of generalizing the factorization to coalgebraic refinement is discussed

    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

    Specification and refinement of software connectors

    Get PDF
    Tese de doutoramento em Informática (área de conhecimento de Fundamentos da Computação)Modern computer based systems are essentially based on the cooperation of distributed, heterogeneous component organized into open software architectures that, moreover, can survive in loosely-coupled environments and be easily adapted to changing application requirements. Such is the case, for example, of applications designed to take advantage of the increased computational power provided by massively parallel systems or of the whole business of Internet-based software development. In order to develop such systems in a systematic way, the focus in development method has switched, along the last decade, from functional to structural issues: both data and processes are encapsulated into software units which are connected into large systems resorting, to a number of techniques intended to support reusability and modifiability. Actually, the complexity and ubiquity achieved by software in present times makes it imperative, more than ever, the availability of both technologies and sound methods to drive its development. Programming ‘in–the–large’, component–based programming and software architecture become popular expressions which embody this sort of concerns and correspond to driving forces in current software engineering. In such a context this thesis aims at introducing formal models for software connectors as well as the corresponding notions of equivalence and refinement upon which calculation principles for reasoning and transforming connector-based software architectures can be developed. This research adopts an exogenous coordination point of view in order to deal with components’ temporal and spatial decoupling and, therefore, to provide support for looser levels of inter-component dependency. The thesis also characterises a notion of behavioural interface for components and services. Interfaces and connectors are put together to form configurations, an abstraction for representing software architectures. A prototype implementation of a subset of the proposed models is provided, in the form of a HASKELL library, as a proof of concept. Furthermore, the thesis reports on a case study in which exogenous coordination is applied to the specification of interactive systems.Um número crescente de sistemas computacionais é baseado na cooperação de componentes interdependentes e heterogêneas, organizadas em arquiteturas abertas capazes de sobreviverem em ambientes altamente distribuídos e facilmente adaptáveis a alterações nos requisitos das aplicações que os suportam. Tal é o caso, por exemplo, de aplicações que exploram o poder computacional de sistemas massivamente paralelos ou de sistemas desenvolvidos sobre a Internet. Para desenvolver este tipo de sistemas de forma sistemática, o foco nos métodos de desenvolvimento alterou-se, ao longo da última década, dos aspectos funcionais para os aspectos estruturais dos sistemas: ambos, estruturas de dados e processos são encapsulados em unidades computacionais que são conectadas em grandes sistemas utilizando-se de diversas técnicas que se pretendem capazes de suportar a reutilização e a adaptabilidade do software. Na realidade, a complexidade e ubiqüidade atingidas pelo software nos dias correntes tornam imperativo, mais do que nunca, a disponibilidade de tecnologias e sólidos métodos para conduzir este processo de desenvolvimento. Programação ’em-grande-escala’, programação baseada em componentes e arquiteturas de software são expressões populares que englobam esta preocupação e correspondem aos esforços direcionados pela engenharia de software. Em tal contexto, esta tese tem por objetivo introduzir modelos formais para conectores de software bem como as correspondentes noções de equivalência e refinamento que suportem cálculos para raciocinar e transformar arquiteturas de software baseada em conectores. Esta pesquisa adota um ponto de vista de coordenação exógena para lidar com a separação espacial e temporal das componentes e suportar níveis elevados de independência entre componentes. A tese caracteriza, ainda, uma noção de interface comportamental para componentes e serviços. Interfaces e conectores agregam-se para formar configurações, uma abstração introduzida para representar arquiteturas de software. A implementação, em protótipo, de parte dos modelos propostos, sob a forma de uma biblioteca em HASKELL, é fornecida como prova de conceito. Finalmente, a tese percorre um estudo de caso em que coordenação exôgena é utilizada na especificação de sistemas interactivos.Fundação para a Ciência e a Tecnologia (FCT), SFRH/BD/11083/200

    Structure and Power: an emerging landscape

    Get PDF
    In this paper, we give an overview of some recent work on applying tools from category theory in finite model theory, descriptive complexity, constraint satisfaction, and combinatorics. The motivations for this work come from Computer Science, but there may also be something of interest for model theorists and other logicians. The basic setting involves studying the category of relational structures via a resource-indexed family of adjunctions with some process category - which unfolds relational structures into treelike forms, allowing natural resource parameters to be assigned to these unfoldings. One basic instance of this scheme allows us to recover, in a purely structural, syntax-free way: the Ehrenfeucht-Fraisse~game; the quantifier rank fragments of first-order logic; the equivalences on structures induced by (i) the quantifier rank fragments, (ii) the restriction of this fragment to the existential positive part, and (iii) the extension with counting quantifiers; and the combinatorial parameter of tree-depth (Nesetril and Ossona de Mendez). Another instance recovers the k-pebble game, the finite-variable fragments, the corresponding equivalences, and the combinatorial parameter of treewidth. Other instances cover modal, guarded and hybrid fragments, generalized quantifiers, and a wide range of combinatorial parameters. This whole scheme has been axiomatized in a very general setting, of arboreal categories and arboreal covers. Beyond this basic level, a landscape is beginning to emerge, in which structural features of the resource categories, adjunctions and comonads are reflected in degrees of logical and computational tractability of the corresponding languages. Examples include semantic characterisation and preservation theorems, and Lovasz-type results on counting homomorphisms.Comment: To appear in special issue for Trakhtenbrot centenary of Fundamenta Informaticae vol. 186 no 1-
    corecore