Transforming concurrent programs with semaphores into logically constrained term rewrite systems
In this paper, as a first step of modeling concurrent programs by logically constrained term rewrite systems (LCTRSs, for short), we show transformations of concurrent programs with semaphore-based exclusive control into LCTRSs. To this end, we show how to encode configurations of concurrent program...
Saved in:
Published in | Journal of logical and algebraic methods in programming Vol. 143; p. 101033 |
---|---|
Main Authors | , , |
Format | Journal Article |
Language | English |
Published |
Elsevier Inc
01.02.2025
|
Subjects | |
Online Access | Get full text |
Cover
Loading…
Summary: | In this paper, as a first step of modeling concurrent programs by logically constrained term rewrite systems (LCTRSs, for short), we show transformations of concurrent programs with semaphore-based exclusive control into LCTRSs. To this end, we show how to encode configurations of concurrent programs with a fixed number of processes. Then, we show how to encode some well-known operations for semaphores by rewrite rules, showing two transformations of concurrent programs with semaphores into LCTRSs. We adopt list-using and list-free approaches to the encoding of waiting queues for semaphores in LCTRSs. While the former straightforwardly uses lists, the latter uses a so-called take-a-number system in order to avoid using any recursive data structures for waiting queues.
•We extend a transformation of sequential programs into LCTRSs to concurrent programs with semaphores.•We show list-using and list-free approaches to the encoding of waiting queues for semaphores.•The list-free approach uses a take-a-number system to avoid using any recursive data structures for waiting queues. |
---|---|
ISSN: | 2352-2208 |
DOI: | 10.1016/j.jlamp.2024.101033 |