- In general, our incrementalization task is simpler because the unchanged data elements are already abstracted/summarized for us.
- DITTO: Automatic Incrementalization of Data Structure Invariant Checks (in Java).
- Ajeet Shankar and Rastislav Bodík.
- In PLDI '07: Proceedings of the 2007 ACM SIGPLAN conference on Programming language design and implementation, pages 310-319, New York, NY, USA, 2007. ACM Press.
- http://portal.acm.org/citation.cfm?id=1250734.1250770
- (Done looking through references)
- Given Java objects with recursive "data structure invariant check" functions, they instrument the functions to cache/memoize the return value for the arguments. Any later modifications to the data structure trigger re-execution of not only all the recursive calls containing the dirty arguments but also their parent callers for any calls that have different return values than before -- this could continue recursively until the root node is reached. Like us, they break up each call into a single function body vs. the chain of calls and avoid re-executing entire chains when possible. Unlike us they have to hold every node and its checker args in memory instead of abstracting it; it seems like bitmap graphics compared to our vector graphics.
- Hybrid type checking.
- Cormac Flanagan
- In POPL '06: Conference record of the 33rd ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 245-256, New York, NY, USA, 2006. ACM Press.
- http://portal.acm.org/citation.cfm?id=1111037.1111059
- (Stuck; don't know what is relevant or not)
- He defines a variant of lambda calculus with mandatory refinement/set type annotations and a compilation process that sends casts to a theorem prover. If the theorem prover can refute the relation or provide a counterexample, compilation fails. If the prover succeeds, no extra code is inserted. If the prover times out, a dynamic check is inserted.
- Dynamic Typing with dependent types.
- X. Ou, G. Tan, Y. Mandelbaum, and D. Walker.
- In IFIP International Conference on Theoretical Computer Science, pages 437-500, 2004.
- They added dependent/set types and simple{} and dependent{} blocks to lambda calculus: "simple" means verify dependent constraints at run-time, and "dependent" means programmer must annotate the code in detail and a type checker will verify them. "Pay as you go" strategy is to add dependent types after you get the code working.
- Ccured: Type-safe retrofitting of legacy code.
- George C. Necula, Scott McPeak, and Westley Weimer.
- In ACM Symposium on Principles of Programming Languages, London, January 2002. ACM Press
- Modifies C programs to assert nonnullness and bounds checks before dereferencing pointers, unless these predicates can be proved statically. Note Section 8 "Source Changes" on cases when inserted runtime checks fail when they shouldn't. Also note in Figure 6 how proof rules rely on run-time predicates, indicated with boxes drawn around them.
- Dependent types for low-level programming.
- J. Condit, M. Harren, Z. Anderson, D. Gay, and G. C. Necula.
- In ESOP'07: Proceedings of the 16th European conference on Programming, pages 520-535, Berlin, 2007. Springer-Verlag.
- http://portal.acm.org/citation.cfm?id=1762221
- A flow-insensitive and path-insensitive analysis of annotated C programs determines what assertions to add, then later flow-sensitive optimizing/compilation passes remove/prove some of the assertions, especially trivial/redundant ones. The goal is to make pointer arithmetic and union types safer.
- "Once the program compiles, the programmer typically needs to add or modify annotations in order to eliminate run-time errors that are due to insufficient or incorrect annotations."
- "Most previous dependent type systems restrict the dependencies such that all assertions fall within theories with simple decision procedures, rejecting programs with assertions that cannot be discharged statically. In Deputy we expect that some assertions will remain in the program even after optimization, either because they use operators for which we do not have efficient decision procedures or because the programmer did not fully specify all the necessary invariants." (emphasis added)
- Liquid types
- Rondon, Patrick M. and Kawaguci, Ming and Jhala, Ranjit.
- In PLDI '08: Proceedings of the 2008 ACM SIGPLAN conference on Programming language design and implementation, pages 159-169, New York, NY, USA, 2008. ACM Press.
- http://doi.acm.org/10.1145/1375581.1375602
- They take Hindley-Milner type inference on ML and add refinements (predicates). They limit subtyping to certain provable implication checks to preserve decidability. By inferring types they dramatically reduce the annotations needed.
- "Of course, there may be safe programs which cannot be well- typed in our system due either to an inappropriate choice of qualifiers or the conservativeness of our notion of subtyping. In the former case, we can use the readable results of the inference to manually add more qualifiers, and in the latter case we can use the results of the inference to insert a minimal set of run-time checks [Ou et al. 2004, Flanagan 2006]."
- Type-based Data Structure Verification
- Kawaguchi, Ming and Rondon, Patrick and Jhala, Ranjit.
- PLDI '09: Proceedings of the 2009 ACM SIGPLAN conference on Programming language design and implementation, pages 304-315, New York, NY, USA, 2009. ACM Press.
- http://doi.acm.org/10.1145/1542476.1542510
- Now their refinement types can capture properties of recursive data structures (i.e. linked lists) like sortedness and uniqueness. They show how guaranteed uniqueness can prove non-aliasing (could it be useful for expressing separating disjunction too?) So they use fold and unfold operations. They can handle many examples including red-black trees.
- Low-level Liquid Types
- Patrick Maxim Rondon and Ming Kawaguchi and Ranjit Jhala.
- POPL '10: Proceedings of the 37th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 131-144, New York, NY, USA, 2010. ACM Press.
- http://doi.acm.org/10.1145/1706299.1706316
- They analyze C code by using SSA to separate mutable and immutable memory locations. The type include bounds information. They use "version control" for a metaphor of unfolding and folding, which seems different than our practice of shortening/lengthening a collection when unfold/fold. For function calls they separate the heap into the part that will be modified and the part that won't, inspired by the separation logic frame rule.
- "...at the lowest levels of the software stack... we cannot fall back on dynamic mechanisms to protect against bugs, crashes, or malicious attacks."
- "In contrast [to shape analysis], LTLL is an automatic technique that uses a combination of low-level types and predicate abstraction to compute invariants for data stored inside collections without using information about the shape of the underlying structure. In future work we would like to investigate ways to improve the precision of LTLL by enriching it with shape (or reachability) information, which would allow us to determine when a location has been removed from a collection."
- Relational inductive shape analysis.
- Bor-Yuh Evan Chang and Xavier Rival.
- In POPL '08: Proceedings of the 35th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 247-260, New York, NY, USA, 2008, ACM Press.
- http://portal.acm.org/citation.cfm?id=1328438.1328469
- Parts to build on: shape domain parameterized by numeric data constraint domain, coordinating shape and domain for widening, red-black tree example with inverse invariant, order invariant, and balance invariant.
- Possibly relevant: type inference, checker segment regions
- Not relevant: backward unfolding
- Shape analysis with structural invariant checkers.
- Compositional shape analysis by means of bi-abduction
- Calcagno, Cristiano and Distefano, Dino and O'Hearn, Peter and Yang, Hongseok
- In POPL '09: Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages, pages 289-300, New York, NY, USA, 2009, ACM Press.
- http://doi.acm.org/10.1145/1480881.1480917
- Their goal is infer preconditions and postconditions for procedures that are especially precise without having to do whole-program analysis. They use abduction to learn how a procedure's precondition needs additional frames to meet the preconditions of the procedures that it calls, but they also use bi-abduction to infer what spatial predicates are not necessary for the called procedures (anti-frames) and can be dropped.
- Possibly relevant to us: they define a ordering relationship for "quality of solutions," where false is the lowest quality assertion. The ordering is "used to inform design choices," since actually finding the best solution can be expensive.
- Red-Black Trees in a Functional Setting.
- Chris Okasaki.
- In Journal of Functional Programming. Vol. 9, No. 4 (Jul 1999), pages 471-477, New York, NY, USA. Cambridge University Press.
- http://portal.acm.org/citation.cfm?id=968583
- They present a recursive functional algorithm for insertion into a red-black tree using pattern matching for simplicity.
* List of references in Johnson et al. "A Systematic Incrementalization Technique and its Application to Hardware Design" http://www.cs.indiana.edu/~sjohnson/papers/Johnson-Liu-Zhang-99.pdf
* [11, 22, 17, 38, 6, 45, 50, 31, 29, 30, 34, 28] incrementalization references in Liu et al
* Liu and Teitelbaum "Systematic derivation of incremental programs" (31 in Liu et al), also mentioned in Ditto paper
* Yellin and Strom. INC: A language for incremental computations (50 in Liu et al)
* In DITTO paper: Algorithm incrementalization has been the subject of considerable research [9, 17, 18, 19, 12]; see [21] for a comprehensive bibliography of early work.
* Types and Type Inference sections of POPL '10? http://www.cse.psu.edu/popl/10/program.html
* Design Patterns in Separation Logic http://www.cs.cmu.edu/~neelk/design-patterns-tldi09.pdf
* Static Contract Checking for Haskell? http://www.cl.cam.ac.uk/techreports/UCAM-CL-TR-737.pdf
Zee et al says: The goal of shape analysis is typically to ver- ify only data structure shape properties (and not full functional correctness properties such as the change of data structure con- tent)
"Parameterized shape analyses such as TVLA have been extended to prove properties beyond shape, such as ordering of list elements [52] and the correctness of a binary search tree with a set interface [68] (using manually devised and un- verified rules for updating instrumentation predicates).
Not particularly relevant
- Incrementalization Across Object Abstraction.
- Yanhong A. Liu, Scott D. Stoller, Michael Gorbovitski, Tom Rothamel, and Yanni Ellen Liu.
- In OOPSLA '05: Proceedings of the 20th annual ACM SIGPLAN conference on Object oriented programming, systems, languages, and applications, pages 473-486, New York, NY, USA, 2005. ACM Press.
- http://portal.acm.org/citation.cfm?id=1094811.1094848
- Given a program that calls query/read and update/write methods on an object, they automatically compute a new program that rewrites repeated expensive queries as simpler queries of sets that are kept current by changes to the update methods. Unlike us, they work with unordered lists (sets). Like us, they rewrite O(N^2) programs as O(N).
- INC: a language for incremental computation.
- Daniel M. Yellin and Robert E. Strom.
- ACM Trans. Program. Lang. Syst., pages 211-236, New York, NY, USA, 1991. ACM Press.
- (Volume 13 Number 2)
- http://portal.acm.org/citation.cfm?id=103135.103137
- INC is a functional language to manipulate multisets/bags. It has Apply/Filter/Reduce etc. but not recursion or the least fixed point operator. Under the hood, intermediate results are saved. Changes to sets are also saved as sets of inserts, deletes, and remains. You call a function with a set as an argument, but internally it only runs the function for set members that are new or deleted, then merges the changes into the previous results. What interests me is the idea of compositional change propagation.
- Self-Adjusting Computation.
- Umut Acar.
- Ph.D. thesis CMU 2005.
- He presents a library that a programmer can use to quickly incrementalize a function written in a particular variant of ML. Memoized dynamic depedence graphs determine which function calls need to be re-executed and in which order. He proves that the time for the change-propagation algorithm can be bounded by the distance between the function-call trace graphs of the two program runs multiplied by the priority queue overhead.
- Contracts Made Manifest.
- Michael Greenberg, Benjamin Pierce, Stephanie Weirich
- Too theoretical about latent vs. manifest contracts.
- Findler and Felleisen 2002
- not helpful since we're only concerned about typing data, not functions
- Threesomes, With and Without Blame
- Jeremy G. Siek (University of Colorado at Boulder), Philip Wadler (University of Edinburgh)
- not helpful since we're only concerned about typing data, not functions
- From Contracts Made Manifest paper:
- - "By contrast, manifest contracts are integrated into the type system, which tracks, for each value, the most recently checked contract. Hybrid types [Flanagan 2006] are a well-known example in this style; others include the work of Ou et al. [2004], Wadler and Findler [2009], and Gronski et al. [2006]."
- Integrating Typed and Untyped Code in a Scripting Language.
- Tobias Wrigstad (Purdue University), Francesco Zappa Nardelli (INRIA), Sylvain Lebresne (Purdue University), Johan Ostlund (Purdue University), Jan Vitek (Purdue University)
- types seem limited to just object-oriented classes, not arbitrary boolean predicates