scholarly journals Automatic Space Bound Analysis for Functional Programs with Garbage Collection

10.29007/xkwx ◽  
2018 ◽  
Author(s):  
Yue Niu ◽  
Jan Hoffmann

This article introduces a novel system for deriving upper bounds on the heap-space requirements of functional programs with garbage collection. The space cost model is based on a perfect garbage collector that immediately deallocates memory cells when they become unreachable. Heap-space bounds are derived using type-based automatic amortized resource analysis (AARA), a template-based technique that efficiently reduces bound inference to linear programming. The first technical contribution of the work is a new operational cost semantics that models a perfect garbage collector. The second technical contribution is an extension of AARA to take into account automatic deallocation. A key observation is that deallocation of a perfect collector can be modeled with destructive pattern matching if data structures are used in a linear way. However, the analysis uses destructive pattern matching to accurately model deallocation even if data is shared. The soundness of the extended AARA with respect to the new cost semantics is proven in two parts via an intermediate linear cost semantics. The analysis and the cost semantics have been implemented as an extension to Resource Aware ML (RaML). An experimental evaluation shows that the system is able to derive tight symbolic heap-space bounds for common algorithms. Often the bounds are asymptotic improvements over bounds that RaML derives without taking into account garbage collection.

2001 ◽  
Vol 02 (02) ◽  
pp. 175-188 ◽  
Author(s):  
BRUNO BEAUQUIER ◽  
STÉPHANE PÉRENNES ◽  
OLIVIER DELMAS

This work considers broadcast protocols made of successive communication rounds in the linear cost model: the time needed to send a message of length L is defined as α + Lτ, where α stands for a start-up time while Lτ represents the cost of sending L bits of data in a channel with bandwidth 1/τ. In this model, the communication time of any algorithm [Formula: see text] is expressed as the sum [Formula: see text], where [Formula: see text] is the number of rounds and [Formula: see text] the transmission cost of the algorithm. In order to design an efficient algorithm realizing a given communication pattern, it appears that minimizing [Formula: see text] and [Formula: see text] are antinomic goals. We study this trade-off issue for broadcast protocols. Surprisingly, such a general theoretical study has almost never been done. In the literature, only the two opposite issues are actually considered: minimizing the number of rounds in the case of short messages, or minimizing the transmission cost in the case of large messages. Our results concern the fully-connected N-nodes network KN, with N = (k + 1)T, in the bidirectional k–ports mode. We derive tight bounds on the communication time for broadcasting in T + r rounds, our lower bounds holding for any network.


2020 ◽  
Vol 177 (3-4) ◽  
pp. 203-234
Author(s):  
Elvira Albert ◽  
Nikolaos Bezirgiannis ◽  
Frank de Boer ◽  
Enrique Martin-Martin

We present a formal translation of a resource-aware extension of the Abstract Behavioral Specification (ABS) language to the functional language Haskell. ABS is an actor-based language tailored to the modeling of distributed systems. It combines asynchronous method calls with a suspend and resume mode of execution of the method invocations. To cater for the resulting cooperative scheduling of the method invocations of an actor, the translation exploits for the compilation of ABS methods Haskell functions with continuations. The main result of this article is a correctness proof of the translation by means of a simulation relation between a formal semantics of the source language and a high-level operational semantics of the target language, i.e., a subset of Haskell. We further prove that the resource consumption of an ABS program extended with a cost model is preserved over this translation, as we establish an equivalence of the cost of executing the ABS program and its corresponding Haskell-translation. Concretely, the resources consumed by the original ABS program and those consumed by the Haskell program are the same, considering a cost model. Consequently, the resource bounds automatically inferred for ABS programs extended with a cost model, using resource analysis tools, are sound resource bounds also for the translated Haskell programs. Our experimental evaluation confirms the resource preservation over a set of benchmarks featuring different asymptotic costs.


2021 ◽  
Vol 6 (1) ◽  
Author(s):  
Fulgence Niyibitegeka ◽  
Arthorn Riewpaiboon ◽  
Sitaporn Youngkong ◽  
Montarat Thavorncharoensap

Abstract Background In 2016, diarrhea killed around 7 children aged under 5 years per 1000 live births in Burundi. The objective of this study was to estimate the economic burden associated with diarrhea in Burundi and to examine factors affecting the cost to provide economic evidence useful for the policymaking about clinical management of diarrhea. Methods The study was designed as a prospective cost-of-illness study using an incidence-based approach from the societal perspective. The study included patients aged under 5 years with acute non-bloody diarrhea who visited Buyenzi health center and Prince Regent Charles hospital from November to December 2019. Data were collected through interviews with patients’ caregivers and review of patients’ medical and financial records. Multiple linear regression was performed to identify factors affecting cost, and a cost model was used to generate predictions of various clinical and care management costs. All costs were converted into international dollars for the year 2019. Results One hundred thirty-eight patients with an average age of 14.45 months were included in this study. Twenty-one percent of the total patients included were admitted. The average total cost per episode of diarrhea was Int$109.01. Outpatient visit and hospitalization costs per episode of diarrhea were Int$59.87 and Int$292, respectively. The costs were significantly affected by the health facility type, patient type, health insurance scheme, complications with dehydration, and duration of the episode before consultation. Our model indicates that the prevention of one case of dehydration results in savings of Int$16.81, accounting for approximately 11 times of the primary treatment cost of one case of diarrhea in the community-based management program for diarrhea in Burundi. Conclusion Diarrhea is associated with a substantial economic burden to society. Evidence from this study provides useful information to support health interventions aimed at prevention of diarrhea and dehydration related to diarrhea in Burundi. Appropriate and timely care provided to patients with diarrhea in their communities and primary health centers can significantly reduce the economic burden of diarrhea. Implementing a health policy to provide inexpensive treatment to prevent dehydration can save significant amount of health expenditure.


2002 ◽  
Vol 13 (06) ◽  
pp. 873-887
Author(s):  
NADIA NEDJAH ◽  
LUIZA DE MACEDO MOURELLE

We compile pattern matching for overlapping patterns in term rewriting systems into a minimal, tree matching automata. The use of directed acyclic graphs that shares all the isomorphic subautomata allows us to reduce space requirements. These are duplicated in the tree automaton. We design an efficient method to identify such subautomata and avoid duplicating their construction while generating the dag automaton. We compute some bounds on the size of the automata, thereby improving on previously known equivalent bounds for the tree automaton.


2020 ◽  
Vol 10 (24) ◽  
pp. 9154
Author(s):  
Paula Morella ◽  
María Pilar Lambán ◽  
Jesús Royo ◽  
Juan Carlos Sánchez ◽  
Jaime Latapia

The purpose of this work is to develop a new Key Performance Indicator (KPI) that can quantify the cost of Six Big Losses developed by Nakajima and implements it in a Cyber Physical System (CPS), achieving a real-time monitorization of the KPI. This paper follows the methodology explained below. A cost model has been used to accurately develop this indicator together with the Six Big Losses description. At the same time, the machine tool has been integrated into a CPS, enhancing the real-time data acquisition, using the Industry 4.0 technologies. Once the KPI has been defined, we have developed the software that can turn these real-time data into relevant information (using Python) through the calculation of our indicator. Finally, we have carried out a case of study showing our new KPI results and comparing them to other indicators related with the Six Big Losses but in different dimensions. As a result, our research quantifies economically the Six Big Losses, enhances the detection of the bigger ones to improve them, and enlightens the importance of paying attention to different dimensions, mainly, the productive, sustainable, and economic at the same time.


2021 ◽  
Vol 1 (9) ◽  
pp. 79-84
Author(s):  
NGUYEN THI THU HUONG ◽  
◽  
O. N. LARIN ◽  
◽  

The article describes the factors associated with the planning of logistics support for the disposal of household electronic waste. Identifying these factors plays an important role in coordinating to ensure the cost-effectiveness of the costs of recycling e-waste at all stages of the supply chain from the source of waste to where it is accumulated and then recycled. The article describes the importance of such processes as: the development of a method for determining the volume of household electronic waste generated in the administrative-territorial district, the creation of a network of waste collection points, the determination of the amount and throughput of waste collection points, the need to organize garbage collection from the place of collection at the lowest cost. The study was conducted on the basis of an analysis of official statistics from the five most populous cities in Vietnam and thirty regions of Hanoi.


Author(s):  
Elvira Albert ◽  
Jesús Correas ◽  
Pablo Gordillo ◽  
Guillermo Román-Díez ◽  
Albert Rubio

Abstract We present the main concepts, components, and usage of Gasol, a Gas AnalysiS and Optimization tooL for Ethereum smart contracts. Gasol offers a wide variety of cost models that allow inferring the gas consumption associated to selected types of EVM instructions and/or inferring the number of times that such types of bytecode instructions are executed. Among others, we have cost models to measure only storage opcodes, to measure a selected family of gas-consumption opcodes following the Ethereum’s classification, to estimate the cost of a selected program line, etc. After choosing the desired cost model and the function of interest, Gasol returns to the user an upper bound of the cost for this function. As the gas consumption is often dominated by the instructions that access the storage, Gasol uses the gas analysis to detect under-optimized storage patterns, and includes an (optional) automatic optimization of the selected function. Our tool can be used within an Eclipse plugin for which displays the gas and instructions bounds and, when applicable, the gas-optimized function.


2009 ◽  
Vol 1 (4) ◽  
pp. 286 ◽  
Author(s):  
Nikki Turner ◽  
Paul Rouse ◽  
Stacey Airey ◽  
Helen Petousis-Harris

INTRODUCTION: Childhood immunisation is one of the most cost-effective activities in health care. However, New Zealand (NZ) has failed to achieve national coverage targets. NZ general practice is the primary site of service delivery and is funded on a fee-for-service basis for delivery of immunisation events. AIM: To determine the average cost to a general practice of delivering childhood immunisation events and to develop a cost model for the typical practice. METHODS: A purposeful selection of 24 diverse practices provided data via questionnaires and a daily log over a week. Costs were modelled using activity-based costing. RESULTS: The mean time spent on an immunisation activity was 23.8 minutes, with 90.7% of all staff time provided by practice nurses. Only 2% of the total time recorded was spent on childhood immunisation opportunistic activities. Practice nurses spent 15% of their total work time on immunisation activity. The mean estimated cost per vaccination event was $25.90; however, there was considerable variability across practices. A ‘typical practice’ model was developed to better understand costs at different levels of activity. CONCLUSIONS: The current level of immunisation benefit subsidy is considerably lower than the cost of a standard vaccination event, although there is wide variability across practices. The costs of delivery exceeding the subsidy may be one reason why there is an apparently small amount of time spent on extra opportunistic activities and a barrier to increasing efforts to raise immunisation rates. KEYWORDS: Immunisation; vaccination; patient care management; cost analysis; cost allocation


2021 ◽  
Vol 2121 (1) ◽  
pp. 012006
Author(s):  
Zhaolong Quan ◽  
Jie Xing ◽  
Ruilin Cao

Abstract With the development of the city, a huge number of distribution networks are waiting for planning. A reasonable planning scheme can meet the power demand and reduce the investment cost. In this paper, a life cycle cost model including the investments of substation and wiring is established with the constraints about load flow calculation and maxi-mum load of wiring. Additionally, a multilayer planning method based on the Floyd-Warshall algorithm has been proposed to solve the model. The area of the city containing substations is divided based on the position of load through the hybrid clusters algorithm in the method. Then, using the divided result of power supply area, the cost matrix for the multilayer path planning method can be constructed through the principle of the method. Lastly, with the cost matrix, the planning scheme in each area will be provided by the Floyd-Warshall algorithm. The result on the actual planning area between the two algorithms shows the total cost of the investment is decreased through using the planning method in this paper.


2020 ◽  
Vol 20 (2) ◽  
pp. 7
Author(s):  
Waldemar Mercado ◽  
Felipe Vásquez Lavín ◽  
Karina Ubillus ◽  
Carlos Enrique Orihuela

<div data-canvas-width="450.13143999999994">The aim was to determine the importance of the biodiversity on the decision to visit six Natural Parks of Peru. For this, a sample of tourists and the discrete travel cost model are used to estimate the demand of multiple places with different attributes. The results confirm that the probability of choice depends on the access routes, the biodiversity, the distance, and the cost of the trip. The effect of the biodiversity is less important than that of access routes. A conservation policy that considers these attributes will be key for the management of the biodiversity.</div>


Sign in / Sign up

Export Citation Format

Share Document