Search engine for discovering works of Art, research articles, and books related to Art and Culture
ShareThis
Javascript must be enabled to continue!

CSP as a Domain-Specific Language Embedded in Python and Jython

View through CrossRef
Recently, much discussion has taken place within the Python programming community on how best to support concurrent programming. This paper describes a new Python library, python-csp, which implements synchronous, message-passing concurrency based on Hoare's Communicating Sequential Processes. Although other CSP libraries have been written for Python, python-csp has a number of novel features. The library is implemented both as an object hierarchy and as a domain-specific language, meaning that programmers can compose processes and guards using infix operators, similar to the original CSP syntax. The language design is intended to be idiomatic Python and is therefore quite different to other CSP libraries. python-csp targets the CPython interpreter and has variants which reify CSP process as Python threads and operating system processes. An equivalent library targets the Jython interpreter, where CSP processes are reified as Java threads. jython-csp also has Java wrappers which allow the library to be used from pure Java programs. We describe these aspects of python-csp, together with performance benchmarks and a formal analysis of channel synchronisation and choice, using the model checker SPIN.
Title: CSP as a Domain-Specific Language Embedded in Python and Jython
Description:
Recently, much discussion has taken place within the Python programming community on how best to support concurrent programming.
This paper describes a new Python library, python-csp, which implements synchronous, message-passing concurrency based on Hoare's Communicating Sequential Processes.
Although other CSP libraries have been written for Python, python-csp has a number of novel features.
The library is implemented both as an object hierarchy and as a domain-specific language, meaning that programmers can compose processes and guards using infix operators, similar to the original CSP syntax.
The language design is intended to be idiomatic Python and is therefore quite different to other CSP libraries.
python-csp targets the CPython interpreter and has variants which reify CSP process as Python threads and operating system processes.
An equivalent library targets the Jython interpreter, where CSP processes are reified as Java threads.
jython-csp also has Java wrappers which allow the library to be used from pure Java programs.
We describe these aspects of python-csp, together with performance benchmarks and a formal analysis of channel synchronisation and choice, using the model checker SPIN.

Related Results

Hubungan Perilaku Pola Makan dengan Kejadian Anak Obesitas
Hubungan Perilaku Pola Makan dengan Kejadian Anak Obesitas
<p><em><span style="font-size: 11.0pt; font-family: 'Times New Roman',serif; mso-fareast-font-family: 'Times New Roman'; mso-ansi-language: EN-US; mso-fareast-langua...
Analysis of pregnancy outcomes following surgical treatment of cesarean scar pregnancy
Analysis of pregnancy outcomes following surgical treatment of cesarean scar pregnancy
Abstract Purpose To investigate the surgical treatment approaches for patients with Cesarean scar pregnancy (CSP) and the effects on subsequent preg...
Methodological developments for sustainability assessment of energy technologies
Methodological developments for sustainability assessment of energy technologies
During the last centuries, human activities have intensified their influence over the environment triggering environmental, social and economic problems. Among these, climate chang...
Učinak poučavanja razrednomu jeziku u izobrazbi nastavnika njemačkoga
Učinak poučavanja razrednomu jeziku u izobrazbi nastavnika njemačkoga
The actual use of classroom language is principally limited to the classroom environment. As far as foreign language learning is concerned, the classroom often turns out to be the ...
Bioactive Lipid Mediators Predict Platelet Function in Transfusion Recipients: A Phase 1 Randomized Clinical Trial in Healthy Humans
Bioactive Lipid Mediators Predict Platelet Function in Transfusion Recipients: A Phase 1 Randomized Clinical Trial in Healthy Humans
Background: Platelets are stored at room temperature for 5-7 days (RSP) and are transfused to patients who are bleeding or at risk of bleeding. Due to frequent and severe shortages...
Safety and Efficacy of 14-Day Cold Stored Platelets in Reversing Effects of Aspirin
Safety and Efficacy of 14-Day Cold Stored Platelets in Reversing Effects of Aspirin
Abstract Background: Aspirin is an antiplatelet therapy used to reduce the risk of vascular occlusive events. However, this therapy is associated with an increased r...
Basic and Advance: Phython Programming
Basic and Advance: Phython Programming
"This book will introduce you to the python programming language. It's aimed at beginning programmers, but even if you have written programs before and just want to add python to y...
Etude des Mécanismes de Transformation de Modèles CSP/SAT
Etude des Mécanismes de Transformation de Modèles CSP/SAT
A Study on the CSP/SAT Model Transformation Mechanisms La plupart des problèmes combinatoires peuvent être formulés comme des CSP (Constraint Satisfaction Problems)...

Back to Top