scispace - formally typeset
Search or ask a question

Showing papers by "Saurabh Srivastava published in 2008"


Proceedings ArticleDOI
07 Jun 2008
TL;DR: This paper shows how the constraint- based approach can be used to model a wide spectrum of program analyses in an expressive domain containing disjunctions and conjunctions of linear inequalities, and presents the first constraint-based approach to weakest precondition and strongest postcondition inference.
Abstract: A constraint-based approach to invariant generation in programs translates a program into constraints that are solved using off-the-shelf constraint solvers to yield desired program invariants.In this paper we show how the constraint-based approach can be used to model a wide spectrum of program analyses in an expressive domain containing disjunctions and conjunctions of linear inequalities. In particular, we show how to model the problem of context-sensitive interprocedural program verification. We also present the first constraint-based approach to weakest precondition and strongest postcondition inference. The constraints we generate are boolean combinations of quadratic inequalities over integer variables. We reduce these constraints to SAT formulae using bitvector modeling and use off-the-shelf SAT solvers to solve them.Furthermore, we present interesting applications of the above analyses, namely bounds analysis and generation of most-general counter-examples for both safety and termination properties. We also present encouraging preliminary experimental results demonstrating the feasibility of our technique on a variety of challenging examples.

235 citations


Book ChapterDOI
16 Dec 2008
TL;DR: The key idea of the technique is to represent each invariant in bounded DNF form by means of boolean indicator variables, one for each predicate p and each disjunct d denoting whether p is present in d or not.
Abstract: This paper describes a constraint-based invariant generation technique for proving the validity of safety assertions over the domain of predicate abstraction in an interprocedural setting. The key idea of the technique is to represent each invariant in bounded DNF form by means of boolean indicator variables, one for each predicate p and each disjunct d denoting whether p is present in d or not. The verification condition of the program is then encoded by means of a boolean formula over these boolean indicator variables such that any satisfying assignment to the formula yields the inductive invariants for proving the validity of given program assertions. This paper also describes how to use the constraint-based methodology for generating maximally-weak preconditions for safety assertions. An interesting application of maximally-weak precondition generation is to produce maximally-general counterexamples for safety assertions. We also present preliminary experimental evidence demonstrating the feasibility of this technique.

62 citations


Journal ArticleDOI
TL;DR: CMod as discussed by the authors is a tool that provides a sound module system for C. CMod works by enforcing four rules that are based on principles of modular reasoning and on current programming practice.
Abstract: This paper presents CMod, a novel tool that provides a sound module system for C. CMod works by enforcing four rules that are based on principles of modular reasoning and on current programming practice. CMod's rules flesh out the convention that .h header files are module interfaces and .c source files are module implementations. Although this convention is well-known, existing explanations of it are incomplete, omitting important subtleties needed for soundness. In contrast, we have proven formally that CMod's rules enforce both information hiding and type-safe linking. To use CMod, the programmer develops and builds their software as usual, redirecting the compiler and linker to CMod's wrappers. We evaluated CMod by applying it to 30 open source programs, totaling more than one million LoC. Violations to CMod's rules revealed more than a thousand information hiding errors, dozens of typing errors, and hundreds of cases that, although not currently bugs, make programming mistakes more likely as the code evolves. At the same time, programs generally adhere to the assumptions underlying CMod's rules, and so we could fix rule violations with a modest effort. We conclude that CMod can effectively support modular programming in C: it soundly enforces type-safe linking and information-hiding while being largely compatible with existing practice.

7 citations


Patent
02 Oct 2008
TL;DR: In this paper, the Satisfiability Modulo Theories (SMT) solver is used to generate complex invariants in a program using a Satisfiability Matrices solver.
Abstract: Techniques are disclosed for generating complex invariants in a program using a Satisfiability Modulo Theories (SMT) solver. In one embodiment, the generated invariants may be used to validate assert statements in a program. Additionally or alternatively, a weakest pre-condition invariant may be generated such that parameters passed to the program that satisfy the weakest pre-condition are guaranteed to satisfy the program's assert statements. Additionally or alternatively, a strongest post-condition may be generated, determining what is guaranteed to be true about the state of the program upon completion of the program. In one embodiment, the SMT solver generates invariants by mapping predicates onto unknown variables in a template. The template may comprise unknown variables related by logical structures defined with disjunctions, universal quantifiers, and existential quantifiers. The predicates may comprise equalities and inequalities between program variables.

6 citations


Patent
02 Oct 2008
TL;DR: In this paper, the Satisfiability Modulo Theories (SMT) solver is used to generate complex invariants in a program using a Satisfiability Matrices solver.
Abstract: Techniques are disclosed for generating complex invariants in a program using a Satisfiability Modulo Theories (SMT) solver. In one embodiment, the generated invariants may be used to validate assert statements in a program. Additionally or alternatively, a weakest pre-condition invariant may be generated such that parameters passed to the program that satisfy the weakest pre-condition are guaranteed to satisfy the program's assert statements. Additionally or alternatively, a strongest post-condition may be generated, determining what is guaranteed to be true about the state of the program upon completion of the program. In one embodiment, the SMT solver generates invariants by mapping predicates onto unknown variables in a template. The template may comprise unknown variables related by logical structures defined with disjunctions, universal quantifiers, and existential quantifiers. The predicates may comprise equalities and inequalities between program variables.

3 citations


Journal ArticleDOI
TL;DR: In this article, the growth and structural properties of Ni-Mn-Al full Heusler alloy thin films on silicon substrates deposited by RF magnetron sputtering are reported.
Abstract: The initials results on growth and structural properties of Ni-Mn-Al full Heusler alloy thin films on silicon substrates deposited by RF magnetron sputtering is reported in this paper. Good crystallinity in the film is obtained by optimizing the sputtering parameters. The as-deposited film was post-annealed in vacuum in the temperature range between 150 °C, 250 °C and 450 °C for 60 min. It is observed that as deposited film shows nanocrystalline in nature. The film annealed at 450 °C shows L21 structure. The magnetic properties of the NiMnAl films at room temperature are measured by vibrating sample magnetometer [VSM]. It is found that the annealed samples shows clear saturating loop whereas the as prepared film is paramagnetic in nature.

1 citations