-
An Incremental Slicing Method for Functional Programs
Authors:
Prasanna Kumar K.,
Amitabha Sanyal,
Amey Karkare
Abstract:
Several applications of slicing require a program to be sliced with respect to more than one slicing criterion. Program specialization, parallelization and cohesion measurement are examples of such applications. These applications can benefit from an incremental static slicing method in which a significant extent of the computations for slicing with respect to one criterion could be reused for ano…
▽ More
Several applications of slicing require a program to be sliced with respect to more than one slicing criterion. Program specialization, parallelization and cohesion measurement are examples of such applications. These applications can benefit from an incremental static slicing method in which a significant extent of the computations for slicing with respect to one criterion could be reused for another. In this paper, we consider the problem of incremental slicing of functional programs. We first present a non-incremental version of the slicing algorithm which does a polyvariant analysis 1 of functions. Since polyvariant analyses tend to be costly, we compute a compact context-independent summary of each function and then use this summary at the call sites of the function. The construction of the function summary is non-trivial and helps in the development of the incremental version. The incremental method, on the other hand, consists of a one-time pre-computation step that uses the non-incremental version to slice the program with respect to a fixed default slicing criterion and processes the results further to a canonical form. Presented with an actual slicing criterion, the incremental step involves a low-cost computation that uses the results of the pre-computation to obtain the slice. We have implemented a prototype of the slicer for a pure subset of Scheme, with pairs and lists as the only algebraic data types. Our experiments show that the incremental step of the slicer runs orders of magnitude faster than the non-incremental version. We have also proved the correctness of our incremental algorithm with respect to the non-incremental version.
△ Less
Submitted 23 September, 2017;
originally announced September 2017.
-
Liveness-Based Garbage Collection for Lazy Languages
Authors:
Prasanna Kumar. K,
Amitabha Sanyal,
Amey Karkare
Abstract:
We consider the problem of reducing the memory required to run lazy first-order functional programs. Our approach is to analyze programs for liveness of heap-allocated data. The result of the analysis is used to preserve only live data---a subset of reachable data---during garbage collection. The result is an increase in the garbage reclaimed and a reduction in the peak memory requirement of progr…
▽ More
We consider the problem of reducing the memory required to run lazy first-order functional programs. Our approach is to analyze programs for liveness of heap-allocated data. The result of the analysis is used to preserve only live data---a subset of reachable data---during garbage collection. The result is an increase in the garbage reclaimed and a reduction in the peak memory requirement of programs. While this technique has already been shown to yield benefits for eager first-order languages, the lack of a statically determinable execution order and the presence of closures pose new challenges for lazy languages. These require changes both in the liveness analysis itself and in the design of the garbage collector.
To show the effectiveness of our method, we implemented a copying collector that uses the results of the liveness analysis to preserve live objects, both evaluated (i.e., in WHNF) and closures. Our experiments confirm that for programs running with a liveness-based garbage collector, there is a significant decrease in peak memory requirements. In addition, a sizable reduction in the number of collections ensures that in spite of using a more complex garbage collector, the execution times of programs running with liveness and reachability-based collectors remain comparable.
△ Less
Submitted 2 May, 2016; v1 submitted 20 April, 2016;
originally announced April 2016.
-
Software Oriented Data Monitoring System
Authors:
Phani Nandan K,
Pavan Kumar K
Abstract:
This project "Software Oriented Data Monitoring System" deals with real time monitoring of patients' parameters like body temperature, heart rate etc. The parameters are checked at regular intervals and Short Messaging Service (SMS) is sent to concerned doctor regarding the measured values. If the obtained parameters are above or below critical values, an alert SMS is also sent to the concerned do…
▽ More
This project "Software Oriented Data Monitoring System" deals with real time monitoring of patients' parameters like body temperature, heart rate etc. The parameters are checked at regular intervals and Short Messaging Service (SMS) is sent to concerned doctor regarding the measured values. If the obtained parameters are above or below critical values, an alert SMS is also sent to the concerned doctor. This system is very much useful in hospitals, which saves the valuable time of the doctor who otherwise will have to monitor the patients throughout the day. Here the analog data from the sensors is first converted into digital form and is fed to the parallel port of the computer. This data obtained is converted into useful parameters, which is monitored and checked for safe limits. Appropriate SMS is sent to the doctor depending on whether the request is from an alert or routine signal. This is possible by interfacing a mobile phone (Siemens c35i) to the serial port of the computer. The SMS is sent from the computer using proper AT commands.
△ Less
Submitted 11 January, 2011; v1 submitted 21 December, 2010;
originally announced December 2010.