195 research outputs found
Formalizing restriction categories
Restriction categories are an abstract axiomatic framework by Cockett and Lack for reasoning about (generalizations of the idea of) partiality of functions. In a restriction category, every map defines an endomap on its domain, the corresponding partial identity map. Restriction categories cover a number of examples of different flavors and are sound and complete with respect to the more synthetic and concrete partial map categories. A partial map category is based on a given category (of total maps) and a map in it is a map from a subobject of the domain. In this paper, we report on an Agda formalization of the first chapters of the theory of restriction categories, including the challenging completeness result. We explain the mathematics formalized, comment on the design decisions we made for the formalization, and illustrate them at work
Relative monads formalised
Relative monads are a generalisation of ordinary monads where the underlying functor need not be an endofunctor. In this paper, we describe a formalisation of the basic theory of relative monads in the interactive theorem prover and dependently typed programming language Agda. The formalisation comprises the requisite basic category theory, the central concepts of the theory of relative monads and adjunctions, which are compared to their ordinary counterparts, and two running examples from programming theory
Comparison of Haskell and F# Programming Languages for Enterprise Applications Development
Tato práce porovnává dva funkcionální jazyky Haskell a F#. Oba jazyky jsou analyzovány na základě kritérií, které by byly použity při výběru nejvhodnějšího jazyka pro vývoj podnikové aplikace. Práce také vysvětluje event sourcing a jeho implementaci v obou jazycích. Důvodem, proč je Haskell oproti F# lepší pro event sourcing je, že je referenčně transparentní. Dále práce vysvětluje, že je jednodušší psát frontend aplikace v F# ve srovnání s Haskellem, z důvodu toho, že F# není čistě funkcionální. V závěru se v práci dospěje k tomu, že ve většině případů je F# vhodnější pro vývoj podnikových aplikací.This thesis compares two functional languages Haskell and F#. Both languages are analyzed based on the criteria that would be used in order to choose the most suitable language for developing an enterprise application. It explains event sourcing and its implementation in both of the languages and why Haskell is better for event sourcing due to the fact it is referentially transparent. It explains how it is easier to write F# frontend applications compared to Haskell, due to its impurity. It concludes that it seems, that in most of the cases, F# is more suitable for enterprise application development
Isabelle/HOL as a Meta-Language for Teaching Logic
Proof assistants are important tools for teaching logic. We support this
claim by discussing three formalizations in Isabelle/HOL used in a recent
course on automated reasoning. The first is a formalization of System W (a
system of classical propositional logic with only two primitive symbols), the
second is the Natural Deduction Assistant (NaDeA), and the third is a one-sided
sequent calculus that uses our Sequent Calculus Verifier (SeCaV). We describe
each formalization in turn, concentrating on how we used them in our teaching,
and commenting on features that are interesting or useful from a logic
education perspective. In the conclusion, we reflect on the lessons learned and
where they might lead us next.Comment: In Proceedings ThEdu'20, arXiv:2010.1583
How functional programming mattered
In 1989 when functional programming was still considered a niche topic, Hughes wrote a visionary paper arguing convincingly ‘why functional programming matters’. More than two decades have passed. Has functional programming really mattered? Our answer is a resounding ‘Yes!’. Functional programming is now at the forefront of a new generation of programming technologies, and enjoying increasing popularity and influence. In this paper, we review the impact of functional programming, focusing on how it has changed the way we may construct programs, the way we may verify programs, and fundamentally the way we may think about programs
A new approach to the semantics of model diagrams
Sometimes, a diagram can say more than a thousand lines of code. But, sadly, most of the time, software engineers give up on diagrams after the design phase, and all real work is done in code. The supremacy of code over diagrams would be leveled if diagrams were code. This paper suggests that model and instance diagrams, or, which amounts to the same, class and object diagrams, become first level entities in a suitably expressive programming language, viz., type theory.
The proposed semantics of diagrams is compositional and self-describing, i.e., reflexive, or metacircular. Moreover, it is
well suited for metamodelling and model driven engineering, as it is
possible to prove model transformations correct in type theory. The
encoding into type theory has the additional benefit of making
diagrams immediately useful, given an implementation of type theory
Polymonad programming in Haskell
Polymonads were recently introduced by Hicks et al. as a unified approach to programming with different notions of monads. Their work was mainly focussed on foundational aspects of the approach. In this article, we show how to incorporate the notion of polymonads into Haskell, which is the first time this has been done in a full-scale language. In particular, we show how polymonads can be represented in Haskell, give a justification of the representation through proofs in Agda, and provide a plugin for the Glasgow Haskell Compiler (GHC) that enables their use in practice. Finally, we demonstrate the utility of our system by means of examples concerned with session types and the parameterized effect monad. This work provides a common representation of a number of existing approaches to generalized monads in Haskell
- …