101 research outputs found
Functional programming and graph algorithms
This thesis is an investigation of graph algorithms in the non-strict purely functional language Haskell. Emphasis is placed on the importance of achieving an asymptotic complexity as good as with conventional languages. This is achieved by using the monadic model for including actions on the state. Work on the monadic model was carried out at Glasgow University by Wadler, Peyton Jones, and Launchbury in the early nineties and has opened up many diverse application areas. One area is the ability to express data structures that require sharing. Although graphs are not presented in this style, data structures that graph algorithms use are expressed in this style. Several examples of stateful algorithms are given including union/find for disjoint sets, and the linear time sort binsort.
The graph algorithms presented are not new, but are traditional algorithms recast in a functional setting. Examples include strongly connected components, biconnected components, Kruskal's minimum cost spanning tree, and Dijkstra's shortest paths. The presentation is lucid giving more insight than usual. The functional setting allows for complete calculational style correctness proofs - which is demonstrated with many examples.
The benefits of using a functional language for expressing graph algorithms are quantified by looking at the issues of execution times, asymptotic complexity, correctness, and clarity, in comparison with traditional approaches. The intention is to be as objective as possible, pointing out both the weaknesses and the strengths of using a functional language
Computer-Assisted Program Reasoning Based on a Relational Semantics of Programs
We present an approach to program reasoning which inserts between a program
and its verification conditions an additional layer, the denotation of the
program expressed in a declarative form. The program is first translated into
its denotation from which subsequently the verification conditions are
generated. However, even before (and independently of) any verification
attempt, one may investigate the denotation itself to get insight into the
"semantic essence" of the program, in particular to see whether the denotation
indeed gives reason to believe that the program has the expected behavior.
Errors in the program and in the meta-information may thus be detected and
fixed prior to actually performing the formal verification. More concretely,
following the relational approach to program semantics, we model the effect of
a program as a binary relation on program states. A formal calculus is devised
to derive from a program a logic formula that describes this relation and is
subject for inspection and manipulation. We have implemented this idea in a
comprehensive form in the RISC ProgramExplorer, a new program reasoning
environment for educational purposes which encompasses the previously developed
RISC ProofNavigator as an interactive proving assistant.Comment: In Proceedings THedu'11, arXiv:1202.453
Modal Kleene algebra and applications - a survey
Modal Kleene algebras are Kleene algebras with forward and backward modal operators defined via domain and codomain operations. They provide a concise and convenient algebraic framework that subsumes various other calculi and allows treating quite a variety of areas. We survey the basic theory and some prominent applications. These include, on the system semantics side, Hoare logic and PDL (Propositional Dynamic Logic), wp calculus and predicate transformer semantics, temporal logics and termination analysis of rewrite and state transition systems. On the derivation side we apply the framework to game analysis and greedy-like algorithms
Algebraic calculation of graph and sorting algorithms
We introduce operators and laws of an algebra of formal languages, a subalgebra of which corresponds to the algebra of (multiary) relations. This algebra is then used in the formal specification and derivation of some graph and sorting algorithms. This study is part of an attempt to single out a framework for program development at a very high level of discourse, close to informal reasoning but still with full formal precision
Structured editing of handwritten mathematics
Teaching effectively requires a clear presentation of the material being taught and interaction with the students. Studies have shown that Tablet PCs provide a good technological support for teaching. The aim of the work presented in this thesis is to design a structure editor of handwritten mathematics that explores the facilities provided by Tablet PCs. The editor is made available in the form of a class library that can be used to extend existing tools.
The central feature of the library is the definition of structure for handwritten mathematical expressions which allows syntactic manipulation of expressions. This makes it possible to accurately select, copy and apply algebraic rules, while avoiding the introduction of errors. To facilitate structured manipulation, gestures are used to apply manipulation rules and animations that demonstrate the use of these rules are introduced. Also, some experimental features that can improve the user’s experience and the usability of the library are presented. Furthermore, it is described how to integrate the library into existing tools. In particular, Classroom Presenter, a system developed to create interactive presentations using a Tablet PC, is extended and used to demonstrate how the library’s features can be used in some teaching scenarios.
Although there are limitations in the current system, tests performed with teachers and students indicate that it can help to improve the experience of teaching and learning mathematics, particularly calculational mathematics
Adaptive Discontinuous Galerkin Finite Element Methods for Second and Fourth Order Elliptic Partial Differential Equations
A unified mathematical and computational framework for implementation of an adaptive discontinuous Galerkin (DG) finite element method (FEM) is developed using the symmetric interior penalty formulation to obtain numerical approximations to solutions of second and fourth order elliptic partial differential equations. The DG-FEM formulation implemented allows for h-adaptivity and has the capability to work with linear, quadratic, cubic, and quartic polynomials on triangular elements in two dimensions. Two different formulations of DG are implemented based on how fluxes are represented on interior edges and comparisons are made. Explicit representations of two a posteriori error estimators, a residual based type and a “local” based type, are extended to include both Dirichlet and Neumann type boundary conditions on bounded domains. New list-based approaches to data management in an adaptive computational environment are introduced in an effort to utilize computational resources in an efficient and flexible manner
Greedy and dynamic programming by calculation
Dissertação mestrado integrado em Informatics EngineeringThe mathematical study of the greedy algorithm provides a blueprint for the study of Dynamic Programming (DP),
whose body of knowledge is largely unorganized, remaining obscure to a large part of the software engineering
community. This study aims to structure this body of knowledge, narrowing the gap between a purely examplebased
approach to DP and its scientific foundations. To that effect, matroid theory is leveraged through a pointfree
relation algebra, which is applied to greedy and DP problems. A catalogue of such problems is compiled, and a
broad characterization of DP algorithms is given. Alongside, the theory underlying the thinning relational operator
is explored.O estudo matemático do algoritmo ganancioso («greedy») serve como guia para o estudo da programação
dinâmica, cujo corpo de conhecimento permanece desorganizado e obscuro a uma grande parte da comunidade
de engenharia de software. Este estudo visa estruturar esse corpo de conhecimento, fazendo a ponte entre a
abordagem popular baseada em exemplos e os métodos mais teóricos da literatura científica. Para esse efeito,
a teoria dos matroides é explorada pelo uso de uma álgebra de relações pointfree, e aplicada a problemas
«greedy» e de programação dinâmica. Um catálogo de tais problemas é compilado, e é feita uma caraterização
geral de algoritmos de programação dinâmica. Em paralelo, é explorada a teoria do combinador relacional de
«thinning».This work is financed by National Funds through the Portuguese funding agency, FCT - Fundação para a
Ciência e a Tecnologia, within project UIDB/50014/202
- …