- Conference Article
33
- 10.1109/pdp50117.2020.00041
Lessons learned from comparing C-CUDA and Python-Numba for GPU-Computing
- Mar 01, 2020
- Lena Oden
Lessons learned from comparing C-CUDA and Python-Numba for GPU-Computing
We investigate the proof structure and models of theories of classes, where classes are ‘collections’ of entities. The theories are weaker than set theories and arise from a study of type classes in programming languages, as well as from comprehension schemata in categories. We introduce two languages of proofs: one a simple type theory and the other involving proof environments for storing and retrieving proofs. The relationship between these languages is defined in terms of a normalisation result for proofs. We use this result to define a categorical semantics for classes and establish its coherence. Finally, we show how the formal systems relate to type classes in programming languages.
Lessons learned from comparing C-CUDA and Python-Numba for GPU-Computing
Lessons learned from comparing C-CUDA and Python-Numba for GPU-Computing
Deterministic and nondeterministic flowchart interpretations
Deterministic and nondeterministic flowchart interpretations
A Coalgebraic Semantics for Imperative Programming Languages
In the theory of programming languages, one often takes two complementary perspectives. In operational semantics, one defines and reasons about the behaviour of programs; and in denotational semantics, one abstracts away implementation details, and reasons about programs as mathematical objects or denotations. The denotational semantics should be compositional, meaning that denotations of programs are determined by the denotations of their parts. It should also be adequate with respect to operational equivalence: programs with the same denotation should be behaviourally indistinguishable. One often has to prove adequacy and compositionality independently for different languages, and the proofs are often laborious and repetitive. These proofs were provided systematically in the context of process algebras by the mathematical operational semantics framework of Turi and Plotkin – which represented transition systems as coalgebras, and program syntax by free algebras; operational specifications were given by distributive laws of syntax over behaviour. By framing the semantics on this abstract level, one derives denotational and operational semantics which are guaranteed to be adequate and compositional for a wide variety of examples. However, despite speculation on the possibility, it is hard to apply the framework to programming languages, because one obtains undesirably fine-grained behavioural equivalences, and unconventional notions of operational semantics. Moreover, the behaviour of these languages is often formalised in a different way – such as computational effects, which may be thought of as an interface between programs and external factors such as non-determinism or a variable store; and comodels, or transition systems which implement these effects. This thesis adapts the mathematical operational semantics framework to provide semantics for various classes of programming languages. After identifying the need for such an adaptation, we show how program behaviour may be characterised by final coalgebras in suitably order- enriched Kleisli categories. We define both operational and denotational semantics, first for languages with syntactic effects, and then for languages with effects and/or comodels given by a Lawvere theory. To ensure adequacy and compositionality, we define concrete and abstract operational rule-formats for these languages, based on the idea of evaluation-in-context; we give syntactic and then categorical proofs that those properties are guaranteed by operational specifications in these rule-formats.
Read moreTheoretical aspects of coordination languages
Theoretical aspects of coordination languages
Linearization algorithms CLOS and LOOPS of the classes in programming languages: The formal definitions
The methods of conflict resolution of names in programming languages that allow multiple inheritance were researched. Those methods are based on the linearization of the classes. The idea of linearization is to reduce multiple inheritance to single, in which the problem of selecting a suitable attribute is solved trivially. The definition of a hierarchy of classes is introduced. The property of monotonicity was clarified. The idea of monotonicity is that all the attributes that the class inherits either identified in its direct ancestors, or inherited them. Methods of conflict resolution used in programming languages CLOS and LOOPS were formally defined.
Read moreA survey of PARLOG and Concurrent Prolog: The integration of logic and parallelism
A survey of PARLOG and Concurrent Prolog: The integration of logic and parallelism
Software architecture for control and data acquisition of linear plasma generator Magnum-PSI
Software architecture for control and data acquisition of linear plasma generator Magnum-PSI
All-in-One: Space-Time Body, Function and Metric — A Fundamentally New Approach to Computation
Every algorithm which can be executed on a computer can at least in principle be realized in hardware, i.e. by a discrete physical system. The problem is that up to now there is no programming language by which physical systems can constructively be described. Such tool, however, is essential for the compact description and automatic production of complex systems. This paper introduces a programming language, called Akton-Algebra, which provides the foundation for the complete description of discrete physical systems. The approach originates from the finding that every discrete physical system reduces to a spatiotemporal topological network of nodes, if the functional and metric properties are deleted. A next finding is that there exists a homeomorphism between the topological network and a sequence of symbols representing a program by which the original nodal network can be reconstructed. Providing Akton-Algebra with functionality turns it into a flow-controlled general data processing language, which by introducing clock control and addressing can be further transformed into a classical programming language. Providing Akton-Algebra with metrics, i.e. the shape and size of the components, turns it into a novel hardware system construction language.
Read moreQuantum Alternation: Prospects and Problems
We propose a notion of quantum control in a quantum programming language which permits the superposition of finitely many quantum operations without performing a measurement. This notion takes the form of a conditional construct similar to the IF statement in classical programming languages. We show that adding such a quantum IF statement to the QPL programming language simplifies the presentation of several quantum algorithms. This motivates the possibility of extending the denotational semantics of QPL to include this form of quantum alternation. We give a denotational semantics for this extension of QPL based on Kraus decompositions rather than on superoperators. Finally, we clarify the relation between quantum alternation and recursion, and discuss the possibility of lifting the semantics defined by Kraus operators to the superoperator semantics defined by Selinger.
Read moreKripke Semantics for Martin-L\"of's Extensional Type Theory
It is well-known that simple type theory is complete with respect to non-standard set-valued models. Completeness for standard models only holds with respect to certain extended classes of models, e.g., the class of cartesian closed categories. Similarly, dependent type theory is complete for locally cartesian closed categories. However, it is usually difficult to establish the coherence of interpretations of dependent type theory, i.e., to show that the interpretations of equal expressions are indeed equal. Several classes of models have been used to remedy this problem. We contribute to this investigation by giving a semantics that is standard, coherent, and sufficiently general for completeness while remaining relatively easy to compute with. Our models interpret types of Martin-L\"of's extensional dependent type theory as sets indexed over posets or, equivalently, as fibrations over posets. This semantics can be seen as a generalization to dependent type theory of the interpretation of intuitionistic first-order logic in Kripke models. This yields a simple coherent model theory, with respect to which simple and dependent type theory are sound and complete.
Read moreMechanized Metatheory Revisited: An Extended Abstract (Invited Paper)
Proof assistants and the programming languages that implement them need to deal with a range of linguistic expressions that involve bindings. Since most mature proof assistants do not have built-in methods to treat this aspect of syntax, many of them have been extended with various packages and libraries that allow them to encode bindings using, for example, de Bruijn numerals and nominal logic features. I put forward the argument that bindings are such an intimate aspect of the structure of expressions that they should be accounted for directly in the underlying programming language support for proof assistants and not added later using packages and libraries. One possible approach to designing programming languages and proof assistants that directly supports such an approach to bindings in syntax is presented. The roots of such an approach can be found in the mobility of binders between term-level bindings, formula-level bindings (quantifiers), and proof-level bindings (eigenvariables). In particular, by combining Church's approach to terms and formulas (found in his Simple Theory of Types) and Gentzen's approach to sequent calculus proofs, we can learn how bindings can declaratively interact with the full range of logical connectives and quantifiers. I will also illustrate how that framework provides an intimate and semantically clean treatment of computation and reasoning with syntax containing bindings. Some implemented systems, which support this intimate and built-in treatment of bindings, will be briefly described.
Read moreKripke Semantics for Martin-Löf’s Extensional Type Theory
It is well-known that simple type theory is complete with respect to non-standard models. Completeness for standard models only holds when increasing the class of models, e.g., to cartesian closed categories. Similarly, dependent type theory is complete for locally cartesian closed categories. However, it is usually difficult to establish the coherence of interpretations of dependent type theory, i.e., to show that the interpretations of equal expressions are indeed equal. Several classes of models have been used to remedy this problem. We contribute to this investigation by giving a semantics that is both coherent and sufficiently general for completeness while remaining relatively easy to compute with. Our models interpret types of Martin-Lof's extensional dependent type theory as sets indexed over posets or, equivalently, as fibrations over posets. This semantics can be seen as a generalization to dependent type theory of the interpretation of intuitionistic first-order logic in Kripke models. This yields a simple coherent model theory with respect to which simple and dependent type theory are sound and complete.
Read moreA Simple Nominal Type Theory
A Simple Nominal Type Theory
Arithmetic as a Theory Modulo
We present constructive arithmetic in Deduction modulo with rewrite rules only. In natural deduction and in sequent calculus, the cut elimination theorem and the analysis of the structure of cut free proofs is the key to many results about predicate logic with no axioms: analyticity and non-provability results, completeness results for proof search algorithms, decidability results for fragments, constructivity results for the intuitionistic case. . . Unfortunately, the properties of cut free proofs do not extend in the presence of axioms and the cut elimination theorem is not as powerful in this case as it is in pure logic. This motivates the extension of the notion of cut for various axiomatic theories such as arithmetic, Church’s simple type theory, set theory and others. In general, we can say that a new axiom will necessitate a specific extension of the notion of cut: there still is no notion of cut general enough to be applied to any axiomatic theory. Deduction modulo [2, 3] is one attempt, among others, towards this aim. In deduction modulo, a theory is not a set of axioms but a set of axioms combined with a set of rewrite rules. For instance, the axiom ∀x x + 0 = x can be replaced by the rewrite rule x + 0 −→ x. The point is that replacing the axiom by the rewrite rule introduces short-cuts in the corresponding proofs, which avoid axiomatic cuts. When the set of rewrite rules is empty, one is simply back to regular predicate logic. On the other hand, when the set of axioms is empty we have theories expressed by rewrite rules only. For such theories, cut free proofs are similar to cut free proofs in pure logic, in particular they end with an introduction rule. Thus, when a theory can be expressed in deduction modulo with rewrite rules only and, in addition, cuts can be eliminated modulo these rewrite rules, the theory has most of the properties of pure logic. This leads to the question of which theories can be expressed with rewrite rules only in such a way that cut-elimination holds. It is known that several theories can be expressed in such a setting, for instance all equational theories, type theory, set theory, etc. . . But arithmetic was an important example of a theory that lacked such a presentation. The goal of this paper is to show that arithmetic can indeed be presented in deduction modulo without axioms in such a way that cut elimination holds. The cut elimination result is built using the generic tools introduced in [3]. When considering arithmetic, it is customary to keep the cut-elimination argument predicative. We show that these generic tools also make it possible to build a predicative proof. It should be noticed that second-order arithmetic can be embedded in simple type theory with the axiom of infinity and thus that it can be expressed in deduction modulo. Our presentation of first-order arithmetic in deduction modulo uses many ideas coming from second-order arithmetic. However, our presentation of arithmetic has exactly the power of first-order arithmetic.
Read moreThe ClassiC programming language and design of synchronous concurrent object oriented languages
The ClassiC programming language and design of synchronous concurrent object oriented languages