Skip to content
Free planNo credit card requiredStart writing

Search 250 million research papers

Read the abstract, see who wrote it and who cites it, and get the citation in APA, MLA, Chicago or Harvard.

About 6,849 papers for “Modular programming”

Modular and generic programming with interpreterlib

Philip Weaver, Garrin Kimmell, Nicolas Frisby et al. · 2007

Modular monadic semantics (MMS) is a well-known technique for structuring modular denotational semantic definitions. Families of language constructs are independently defined using syntactic functors and semantic algebras that can be combined in a mix-and-match fashion to create complete language definitions. We introduce InterpreterLib, a Haskell library that implements and extends MMS techniques for writing composable analyses. In addition to modular analyses composition, InterpreterLib provides algebra combinators, explicit algebra semantics, preprocessors for boiler plate generation and generic programming techniques adapted to language analysis. The key benefits of these features are reliability, increased code reuse via modularity and the ability to rapidly retarget component analyses.

Cited by 5

Modular grammars for programming language prototyping

Stephen Adams · ePrints Soton (University of Southampton) · 1992

<p>Programming languages and formal notations are central to computer science. A significant part of computer science research is conducted by constructing programming language prototypes and studying their properties. I argue that the conventional modular structure of language processors as a sequence of phase is ill-suited to language implementation and propose an alternative to <i>phase oriented modularity</i>: to structure the language processor according to the facets of the implemented language. A language should be viewed as a collection of <i>language fragments</i>, each fragment defining an independent and reusable modular component. Given this structure new languages can be built cheaply by using different combinations of language fragments, reusing many existing fragments. Cheap language implementation also makes it feasible to perform <i>language oriented programming</i> where <i>application oriented languages</i> are constructed as abstractions of problem domains enabling concise solutions to be rapidly constructed for particular problems. This report describes how to build language processors from language fragments. Language oriented modular structure is investigated in three arenas: interpreters, parsers and attribute grammars. In the first case each language fragment is embodied in an interpreter. The structure of the interpreters is changed to allow them to be combined. A modular parsing system is developed. Both the interpreters and modular parsers suffer from <i>structure clashes</i> which make some problems difficult to express. This is overcome with modular attribute grammars. A modular attribute evaluator is developed using a lazy functional programming language as a vehicle for experimentation. The resulting system has interesting properties: it allows language fragments to be based on the semantic structure of the language as well as the syntactic structure and includes support for programming by explicit refinement. Finally, I argue that the implementation of languages as collections of component fragments may alter our perception of programming languages themselves.</p>

Cited by 23

Modular Generic Programming with Extensible Superclasses

2008

We show that none of these type class features are necessary if weuse the single feature of extensible superclasses, the complement of subclass extension. We formalize type classes with extensiblesuperclasses as the combination of a previously introduced typepassing translation scheme and a general type class framework. Ourresults shed some new light on the use of type classes to support generic programming. 1. Introduction Generic programming is a style of programming where a singlegeneric function definition is applicable to a wide range of data

Cited by 0

Aspect-oriented programming and modular reasoning

Gregor Kiczales, M. Mezini · Proceedings. 27th International Conference on Software Engineering, 2005. ICSE 2005. · 2005

Aspects cut new interfaces through the primary decomposition of a system. This implies that in the presence of aspects, the complete interface of a module can only be determined once the complete configuration of modules in the system is known. While this may seem anti-modular, it is an inherent property of crosscutting concerns, and using aspect-oriented programming enables modular reasoning in the presence of such concerns.

Cited by 0

Modular GPU Programming with Typed Perspectives

Anonymous · Zenodo (CERN European Organization for Nuclear Research) · 2026

This artifact describes how to reproduce the quantitative GPU benchmark results presented in "Modular GPU Programming with Typed Perspective". The paper describes a language called Prism, which generates CUDA kernels from low-level specifications; this evaluation compiles and benchmarks those kernels on real hardware (NVIDIA H100 and RTX 4090) against vendor libraries (cuBLAS, CUB). The eval scripts handle uploading generated code, compiling, benchmarking, collecting results and tearing down a remote machines.

Cited by 0Open access

Designing Modular Auto-graded Programming Projects

Can Kültür, Jaromír Šavelka, Christopher Bogart et al. · 2024

In this poster we propose an approach to designing auto-graded programming course projects that are modular and easily manageable by an instructor. Based on our experiences with the Sail() platform which supports auto-grading and feedback generation in multiple contexts, we design the approach to overcome the challenges we observed. The approach is especially focused on designing projects that can be utilized by multiple instructors who may have various scopes or students with varying backgrounds. The approach enables differentiated learning-thereby improving learning experiences and outcomes. We also discuss challenges of using such a modular approach to auto-graded projects.

Cited by 0

Forgetting in Modular Answer Set Programming

Ricardo Gonçalves, Tomi Janhunen, Matthias Knorr et al. · Proceedings of the AAAI Conference on Artificial Intelligence · 2019

Modular programming facilitates the creation and reuse of large software, and has recently gathered considerable interest in the context of Answer Set Programming (ASP). In this setting, forgetting, or the elimination of middle variables no longer deemed relevant, is of importance as it allows one to, e.g., simplify a program, make it more declarative, or even hide some of its parts without affecting the consequences for those parts that are relevant. While forgetting in the context of ASP has been extensively studied, its known limitations make it unsuitable to be used in Modular ASP. In this paper, we present a novel class of forgetting operators and show that such operators can always be successfully applied in Modular ASP to forget all kinds of atoms – input, output and hidden – overcoming the impossibility results that exist for general ASP. Additionally, we investigate conditions under which this class of operators preserves the module theorem in Modular ASP, thus ensuring that answer sets of modules can still be composed, and how the module theorem can always be preserved if we further allow the reconfiguration of modules.

Cited by 12Open access

Programming Modular Robots with the TOTA

Marco Mamei, Franco Zambonelli · 2015

Abstract. Modular robots represent a perfect application scenario for multiagent coordination. The autonomous modules composing the robot must coordinate their respective activities to enforce a specic global shape or a coherent motion gait. Here we show how the TOTA (\\Tuples On The Air") middleware can be eectively exploited to support agents' coordination in this context. The key idea in TOTA is to rely on spa-tially distributed tuples, spread across the robot, to guide the agents' activities in moving and reshaping the robot. Three simulated examples are presented to support our claims. 1

Cited by 0

PRIME: Programming In-Network Modular Extensions

Ricardo Parizotto, Lucas Castanheira, Fernanda Bonetti et al. · 2020

Programmable Data Planes (PDP) enable more flexibility for the operation of networks. The various benefits of programmability have led the community to develop new software on both academic and industrial capacities. To fully reap the benefits of programmability, it should be feasible to compose and operate multiple PDP programs into a single target switch as needed. However, existing techniques are not suitable in the sense that they: (1) use an excessive number of parser states and tables; and (2) lack abstractions for the steering of packets through the control flows of programs. As such, they do not support modular composition of PDP programs. This paper proposes a composition mechanism that also addresses the fundamental needs of packet steering between PDP program modules. PRIME (Programming In-Network Modular Extensions) enables network operators to specify compositions of P4 programs and how traffic traverses these programs. The composition employs a verification phase to identify ambiguities between applications and avoid loops inside the switch pipeline. An additional table and a control plane management framework enforce the steering of packets through control flows. We present a prototype of PRIME, along with a proof of the steering correctness. The prototype shows that it is possible to achieve module-wide compositions at little additional cost in terms of delay and throughput.

Cited by 9

M.; Modelbased programming of modular robots

David Arney, Sebastian Fischmeister, Insup Lee et al. · 2016

Modular robots are a powerful concept for robotics. A modular robot consists of many individual modules so it can adjust its configuration to the problem. However, the fact that a modular robot consists of many individual modules makes it a highly distributed, highly concurrent real-time system, which are notoriously hard to program. In this work, we present our programming framework for writing control applications for modular robots. The framework includes a toolset that allows a model-based programing approach for control application of modular robots with code generation and verification. The framework is characterized by the following three features. First, it provides a complex programming model that is based on standard finite state machines extended in syntax and semantics to support communication, variables, and actions. Second, the framework provides compositionality at the hardware and at the software level and allows building the modular robot and its control application from small building blocks. And third, the framework supports formal verification of the control application to aid the gait and task developer in identifying problems and

Cited by 0

Modular and Safe Event-Driven Programming

Ankush Desai · eScholarship (California Digital Library) · 2019

Asynchronous event-driven systems are ubiquitous across domains such as device drivers, distributed systems, and robotics. These systems are notoriously hard to get right as the programmer needs to reason about numerous control paths resulting from the complex interleaving of events (or messages) and failures. Unsurprisingly, it is easy to introduce subtle errors while attempting to fill in gaps between high-level system specifications and their concrete implementations.This dissertation proposes new methods for programming safe event-driven asynchronous systems.In the first part of the thesis, we present ModP, a modular programming framework for compositional programming and testing of event-driven asynchronous systems.The ModP module system supports a novel theory of compositional refinement for assume-guarantee reasoning of dynamic event-driven asynchronous systems. We build a complex distributed systems software stack using ModP.Our results demonstrate that compositional reasoning can help scale model-checking (both explicit and symbolic) to large distributed systems.ModP is transforming the way asynchronous software is built at Microsoft and Amazon Web Services (AWS). Microsoft uses ModP for implementing safe device drivers and other software in the Windows kernel.AWS uses ModP for compositional model checking of complex distributed systems. While ModP simplifies analysis of such systems, the state space of industrial-scale systems remains extremely large.In the second part of this thesis, we present scalable verification and systematic testing approaches to further mitigate this state-space explosion problem.First, we introduce the concept of a delaying explorer to perform prioritized exploration of the behaviors of an asynchronous reactive program. A delaying explorer stratifies the search space using a custom strategy (tailored towards finding bugs faster), and a delay operation that allows deviation from that strategy. We show that prioritized search with a delaying explorer performs significantly better than existing approaches for finding bugs in asynchronous programs.Next, we consider the challenge of verifying time-synchronized systems; these are almost-synchronous systems as they are neither completely asynchronous nor synchronous.We introduce approximate synchrony, a sound and tunable abstraction for verification of almost-synchronous systems. We show how approximate synchrony can be used for verification of both time-synchronization protocols and applications running on top of them.Moreover, we show how approximate synchrony also provides a useful strategy to guide state-space exploration during model-checking.Using approximate synchrony and implementing it as a delaying explorer, we were able to verify the correctness of the IEEE 1588 distributed time-synchronization protocol and, in the process, uncovered a bug in the protocol that was well appreciated by the standards committee.In the final part of this thesis, we consider the challenge of programming a special class of event-driven asynchronous systems -- safe autonomous robotics systems.Our approach towards achieving assured autonomy for robotics systems consists of two parts: (1) a high-level programming language for implementing and validating the reactive robotics software stack; and (2) an integrated runtime assurance system to ensure that the assumptions used during design-time validation of the high-level software hold at runtime.Combining high-level programming language and model-checking with runtime assurance helps us bridge the gap between design-time software validation that makes assumptions about the untrusted components (e.g., low-level controllers), and the physical world, and the actual execution of the software on a real robotic platform in the physical world. We implemented our approach as DRONA, a programming framework for building safe robotics systems.We used DRONA for building a distributed mobile robotics system and deployed it on real drone platforms. Our results demonstrate that DRONA (with the runtime-assurance capabilities) enables programmers to build an autonomous robotics software stack with formal safety guarantees.To summarize, this thesis contributes new theory and tools to the areas of programming languages, verification, systematic testing, and runtime assurance for programming safe asynchronous event-driven across the domains of fault-tolerant distributed systems and safe autonomous robotics systems.

Cited by 0Open access

Synchronization Mechanism for Modular Programming Language

Bloom, Toby · DSpace@MIT (Massachusetts Institute of Technology) · 1979

Any programming language that supports concurrency needs a synchronization construct with which to express access control for shared resources. This thesis examines synchronization constructs from the standpoint of language design for reliable software. The criteria a synchronization mechanism must satisfy to support construction of reliable, easily maintainable concurrent software are defined.

Cited by 0Open access

Modular Programming in C for MCU

Peng Zhao, Yongming Zhang, Yong Chen et al. · 2025

The main program serves as the entry point of the application and executes subsequent code sequentially. In largescale projects, relying solely on the main function would result in thousands of lines of code lacking hierarchy, especially when repetitive code segments are used multiple times. This reduces program readability and increases the difficulty of troubleshooting warnings and errors. To enhance program readability and leverage the strong portability of the $\mathbf{C}$ language, functions can be organized based on program functionality. Separate functions can be written for each functional module, and the project’s program design can be completed by having the main function call these sub-functions. For large-scale projects with numerous subroutines, a modular programming architecture should be adopted. This involves organizing source and header files of peripheral functions into dedicated directories based on their functionality, constructing library functions, and adjusting compilation paths. This approach achieves a streamlined and well-structured design, enhances portability, and facilitates error debugging. This approach provides an effective programming solution for MCU that lack officially provided library functions and integrated development environments with resource configuration capabilities. The validity of this modular programming approach has been verified in practical project development.

Cited by 0

Synchronization Mechanisms for Modular Programming Languages

Bloom,Toby · Defense Technical Information Center (DTIC) · 1979

Any programming language that supports concurrency needs a synchronization construct with which to express access control for shared resources. This thesis examines synchronization constructs from the standpoint of language design for reliable software. The criteria a synchronization mechanism must satisfy to support construction of reliable, easily maintainable concurrent software are defined. Some of these criteria, such as expressive power, can be defined only with respect to the set of problems the mechanism is expected to handle. A definition of the range of problems considered to be synchronization problems is therefore needed. Such a definition is provided by describing the possible types of constraints that may be imposed on access to shared resources. We then use this taxonomy of synchronization constraints to develop techniques for evaluating how well synchronization constructs meet the criteria discussed. These techniques are then applied to three existing synchronization mechanisms: monitors, path expressions, and serializers. Evaluations are presented, and the three mechanisms compared. (Author)

Cited by 2

Modular GPU Programming with Typed Perspectives

Anonymous · Zenodo (CERN European Organization for Nuclear Research) · 2026

This artifact describes how to reproduce the quantitative GPU benchmark results presented in "Modular GPU Programming with Typed Perspective". The paper describes a language called Prism, which generates CUDA kernels from low-level specifications; this evaluation compiles and benchmarks those kernels on real hardware (NVIDIA H100 and RTX 4090) against vendor libraries (cuBLAS, CUB). The eval scripts handle uploading generated code, compiling, benchmarking, collecting results and tearing down a remote machines.

Cited by 0Open access