Exploiting Term Hiding to Reduce Run-time Checking Overhead

05/18/2017
by   Nataliia Stulova, et al.
0

One of the most attractive features of untyped languages is the flexibility in term creation and manipulation. However, with such power comes the responsibility of ensuring the correctness of these operations. A solution is adding run-time checks to the program via assertions, but this can introduce overheads that are in many cases impractical. While static analysis can greatly reduce such overheads, the gains depend strongly on the quality of the information inferred. Reusable libraries, i.e., library modules that are pre-compiled independently of the client, pose special challenges in this context. We propose a technique which takes advantage of module systems which can hide a selected set of functor symbols to significantly enrich the shape information that can be inferred for reusable libraries, as well as an improved run-time checking approach that leverages the proposed mechanisms to achieve large reductions in overhead, closer to those of static languages, even in the reusable-library context. While the approach is general and system-independent, we present it for concreteness in the context of the Ciao assertion language and combined static/dynamic checking framework. Our method maintains the full expressiveness of the assertion language in this context. In contrast to other approaches it does not introduce the need to switch the language to a (static) type system, which is known to change the semantics in languages like Prolog. We also study the approach experimentally and evaluate the overhead reduction achieved in the run-time checks.

READ FULL TEXT

page 1

page 2

page 3

page 4

research
04/06/2018

An Approach to Static Performance Guarantees for Programs with Run-time Checks

Instrumenting programs for performing run-time checking of properties, s...
research
02/25/2020

Security Wrappers for Information-Flow Control in Active Object Languages with Futures

This paper introduces a run-time mechanism for preventing leakage of sec...
research
09/28/2017

Thread-Modular Static Analysis for Relaxed Memory Models

We propose a memory-model-aware static program analysis method for accur...
research
06/19/2017

Generic Approach to Certified Static Checking of Module-like Constructs

In this paper we consider the problem of certified static checking of mo...
research
04/06/2019

Type-Level Computations for Ruby Libraries

Many researchers have explored ways to bring static typing to dynamic la...
research
11/24/2021

CircuitFlow: A Domain Specific Language for Dataflow Programming (with appendices)

Dataflow applications, such as machine learning algorithms, can run for ...
research
11/04/2021

A thread-safe Term Library

Terms are one of the fundamental data structures for computing. E.g. eve...

Please sign up or login with your details

Forgot password? Click here to reset