Publication:

Verifying Resource Bounds of Programs with Lazy Evaluation and Memoization

cris.legacyId

215783

cris.virtual.author-scopus

6602919120

cris.virtual.department

LARA

cris.virtual.orcid

0000-0001-7044-9522

cris.virtual.parent-organization

IINFCOM

cris.virtual.parent-organization

IC

cris.virtual.parent-organization

EPFL

cris.virtual.sciperId

177241

cris.virtual.sciperId

222382

cris.virtual.unitId

11739

cris.virtual.unitManager

Kuncak, Viktor

cris.virtualsource.author-scopus

638d3932-05d1-482b-83b7-78934cc62d07

cris.virtualsource.author-scopus

b4aa58e0-9af3-429c-8790-6755f04a5142

cris.virtualsource.department

638d3932-05d1-482b-83b7-78934cc62d07

cris.virtualsource.department

b4aa58e0-9af3-429c-8790-6755f04a5142

cris.virtualsource.orcid

638d3932-05d1-482b-83b7-78934cc62d07

cris.virtualsource.orcid

b4aa58e0-9af3-429c-8790-6755f04a5142

cris.virtualsource.parent-organization

41bc9b65-ea5d-48f9-8723-51ee9de9f74a

cris.virtualsource.parent-organization

41bc9b65-ea5d-48f9-8723-51ee9de9f74a

cris.virtualsource.parent-organization

41bc9b65-ea5d-48f9-8723-51ee9de9f74a

cris.virtualsource.parent-organization

41bc9b65-ea5d-48f9-8723-51ee9de9f74a

cris.virtualsource.rid

638d3932-05d1-482b-83b7-78934cc62d07

cris.virtualsource.rid

b4aa58e0-9af3-429c-8790-6755f04a5142

cris.virtualsource.sciperId

638d3932-05d1-482b-83b7-78934cc62d07

cris.virtualsource.sciperId

b4aa58e0-9af3-429c-8790-6755f04a5142

cris.virtualsource.unitId

41bc9b65-ea5d-48f9-8723-51ee9de9f74a

cris.virtualsource.unitManager

41bc9b65-ea5d-48f9-8723-51ee9de9f74a

datacite.rights

openaccess

dc.contributor.author

Kandhadai Madhavan, Ravichandhran

dc.contributor.author

Kulal, Sumith

dc.contributor.author

Kuncak, Viktor

dc.date.accessioned

2016-02-03T19:09:36

dc.date.available

2016-02-03T19:09:36

dc.date.created

2016-02-03

dc.date.issued

2016

dc.date.modified

2025-01-23T18:42:24.612773Z

dc.description.abstract

We present a new approach for specifying and verifying resource utilization of higher-order functional programs that use lazy eval- uation and memoization. In our approach, users can specify the desired resource bound as templates with numerical holes e.g. as steps ≤ ? ∗ size(l) + ? in the contracts of functions. They can also express invariants necessary for establishing the bounds that may depend on the state of memoization. Our approach operates in two phases: first generating an instrumented first-order program that ac- curately models the higher-order control flow and the effects of memoization on resources using sets, algebraic datatypes and mu- tual recursion, and then verifying the contracts of the first-order program by producing verification conditions of the form ∃∀ using an extended assume/guarantee reasoning. We use our approach to verify precise bounds on resources such as evaluation steps and number of heap-allocated objects on 17 challenging data struc- tures and algorithms. Our benchmarks, comprising of 5K lines of functional Scala code, include lazy mergesort, Okasaki’s real-time queue and deque data structures that rely on aliasing of references to first-class functions; lazy data structures based on numerical rep- resentations such as the conqueue data structure of Scala’s data- parallel library, cyclic streams, as well as dynamic programming algorithms such as knapsack and Viterbi. Our evaluations show that when averaged over all benchmarks the actual runtime resource consumption is 80% of the value inferred by our tool when esti- mating the number of evaluation steps, and is 88% for the number of heap-allocated objects.

dc.description.sponsorship

LARA

dc.identifier.uri

https://infoscience.epfl.ch/handle/20.500.14299/123224

dc.relation

https://infoscience.epfl.ch/record/215783/files/main_1.pdf

dc.size

28

dc.subject

Resource bounds

dc.subject

lazy evaluation

dc.subject

memoization

dc.subject

verification

dc.subject

static analysis

dc.subject

functional data structures

dc.title

Verifying Resource Bounds of Programs with Lazy Evaluation and Memoization

dc.type

text::report

dspace.entity.type

Publication

dspace.legacy.oai-identifier

oai:infoscience.tind.io:215783

epfl.legacy.fileversion

n/a

epfl.legacy.itemtype

Reports

epfl.legacy.submissionform

REP_WORK

epfl.oai.currentset

report

epfl.oai.currentset

OpenAIREv4

epfl.oai.currentset

fulltext

epfl.oai.currentset

IC

epfl.writtenAt

EPFL

Files

Original bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
main_1.pdf
Size:
592.24 KB
Format:
Adobe Portable Document Format
Description:
n/a

License bundle

Now showing 1 - 1 of 1
Loading...
Thumbnail Image
Name:
license.txt
Size:
1.71 KB
Format:
Item-specific license agreed to upon submission
Description: