modular programming
Recently Published Documents


TOTAL DOCUMENTS

85
(FIVE YEARS 4)

H-INDEX

8
(FIVE YEARS 0)

2021 ◽  
Vol 43 (3) ◽  
pp. 1-61
Author(s):  
Weixin Zhang ◽  
Yaozhu Sun ◽  
Bruno C. D. S. Oliveira

Modularity is a key concern in programming. However, programming languages remain limited in terms of modularity and extensibility. Small canonical problems, such as the Expression Problem (EP), illustrate some of the basic issues: the dilemma between choosing one kind of extensibility over another one in most programming languages. Other problems, such as how to express dependencies in a modular way, add up to the basic issues and remain a significant challenge. This article presents a new statically typed modular programming style called Compositional Programming . In Compositional Programming, there is no EP: It is easy to get extensibility in multiple dimensions (i.e., it is easy to add new variants as well as new operations). Compositional Programming offers an alternative way to model data structures that differs from both algebraic datatypes in functional programming and conventional OOP class hierarchies. We introduce four key concepts for Compositional Programming: compositional interfaces , compositional traits , method patterns , and nested trait composition . Altogether, these concepts allow us to naturally solve challenges such as the Expression Problem, model attribute-grammar-like programs, and generally deal with modular programs with complex dependencies . We present a language design, called CP , which is proved to be type-safe, together with several examples and three case studies.


2021 ◽  
Vol 1918 (4) ◽  
pp. 042011
Author(s):  
S Subhan ◽  
R Arifudin ◽  
D A Efrilianda ◽  
B Prasetiyo

2021 ◽  
Author(s):  
Ekaterina Dorogova ◽  
Larisa Gagarina

The textbook is an initial course of programming in the C language. The basics of programming, techniques and methods in the style of modular programming are considered. It can be used as a guide to the C language, contains numerous examples tested on a computer. The laboratory workshop will help readers practically master the programming techniques and technical capabilities of classical C, described in this manual. Meets the requirements of the federal state educational standards of higher education of the latest generation. It is recommended for students studying the disciplines "Fundamentals of Programming", "High-level languages", "Computer Science", as well as for teachers of these courses in higher educational institutions.


Learn PHP 8 ◽  
2020 ◽  
pp. 129-174
Author(s):  
Steve Prettyman
Keyword(s):  

Author(s):  
DANIEL HILLERSTRÖM ◽  
SAM LINDLEY ◽  
ROBERT ATKEY

Abstract Plotkin and Pretnar’s effect handlers offer a versatile abstraction for modular programming with user-defined effects. This paper focuses on foundations for implementing effect handlers, for the three different kinds of effect handlers that have been proposed in the literature: deep, shallow, and parameterised. Traditional deep handlers are defined by folds over computation trees and are the original construct proposed by Plotkin and Pretnar. Shallow handlers are defined by case splits (rather than folds) over computation trees. Parameterised handlers are deep handlers extended with a state value that is threaded through the folds over computation trees. We formulate the extensions both directly and via encodings in terms of deep handlers and illustrate how the direct implementations avoid the generation of unnecessary closures. We give two distinct foundational implementations of all the kinds of handlers we consider: a continuation-passing style (CPS) transformation and a CEK-style abstract machine. In both cases, the key ingredient is a generalisation of the notion of continuation to accommodate stacks of effect handlers. We obtain our CPS translation through a series of refinements as follows. We begin with a first-order CPS translation into untyped lambda calculus which manages a stack of continuations and handlers as a curried sequence of arguments. We then refine the initial CPS translation by uncurrying it to yield a properly tail-recursive translation and then moving towards more and more intensional representations of continuations in order to support different kinds of effect handlers. Finally, we make the translation higher order in order to contract administrative redexes at translation time. Our abstract machine design then uses the same generalised continuation representation as the CPS translation. We have implemented both the abstract machine and the CPS transformation (plus extensions) as backends for the Links web programming language.


2019 ◽  
pp. 37-40
Author(s):  
N. Yu. Dobrovolskaia

The article discusses the use of generalized schemes as language independent fragments of algorithmic problem solving in the design of training materials, the generation of sets of multilevel test tasks. The use of schemes in teaching programming develops in schoolchildren the ability to formalize a problem, to correlate its solution with the basic algorithm, and to establish block-modular programming skills.


Electronics ◽  
2019 ◽  
Vol 8 (9) ◽  
pp. 958 ◽  
Author(s):  
Zijun Hang ◽  
Mei Wen ◽  
Yang Shi ◽  
Chunyuan Zhang

Network algorithms are building blocks of network applications. They are inspired by emerging commodity programmable switches and the Programming Protocol-Independent Packet Processors (P4) language. P4 aims to provide target-independent programming neglecting the architecture of underlying infrastructure. However, commodity programmable switches have tight programming restrictions due to limited resources and latency. In addition, manufacturers tailor P4 according to their architecture, putting more restrictions on it. These intrinsic and extrinsic restrictions dilute the goal of P4. This paper proposes P4 high-level programming (P4HLP) framework, a suite of toolchains that simplifies P4 programming. The paper highlights three aspects: (i) E-Domino, a high-level programming language that defines both stateless and stateful processing of data plane in C-style codes; (ii) P4HLPc, a compiler that automatically generates P4 programs from E-Domino programs, which removes the barrier between high-level programming and low-level P4 primitives; (iii) modular programming that organizes programs into reusable modules, to enable fast reconfiguration of commodity switches. Results show that P4HLPc is efficient and robust, thus is suitable for data plane high-level programming. Compared with P4, E-Domino saves at least 5.5× codes to express the data plane algorithm. P4HLPc is robust to policy change and topology change. The generated P4 programs achieve line-rate processing.


Sign in / Sign up

Export Citation Format

Share Document