Categories of Aspects Shmuel Katz Computer Science Department The Technion Haifa, Israel.

Slides:



Advertisements
Similar presentations
1 Verification by Model Checking. 2 Part 1 : Motivation.
Advertisements

Lectures on File Management
Python Programming Chapter 5: Fruitful Functions Saad Bani Mohammad Department of Computer Science Al al-Bayt University 1 st 2011/2012.
Introducing Formal Methods, Module 1, Version 1.1, Oct., Formal Specification and Analytical Verification L 5.
Automatic Verification Book: Chapter 6. What is verification? Traditionally, verification means proof of correctness automatic: model checking deductive:
ECE Synthesis & Verification - L271 ECE 697B (667) Spring 2006 Synthesis and Verification of Digital Systems Model Checking basics.
Midwestern State University Department of Computer Science Dr. Ranette Halverson CMPS 2433 – CHAPTER 4 GRAPHS 1.
1 1 Regression Verification for Multi-Threaded Programs Sagar Chaki, SEI-Pittsburgh Arie Gurfinkel, SEI-Pittsburgh Ofer Strichman, Technion-Haifa Originally.
CS6133 Software Specification and Verification
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 11.
Recursive Definitions and Structural Induction
Aspect Oriented Programming. AOP Contents 1 Overview 2 Terminology 3 The Problem 4 The Solution 4 Join point models 5 Implementation 6 Terminology Review.
1 Modular Verification of Strongly Invasive Aspects Authors: Emilia Katz, Shmuel Katz The Technion.
Rigorous Software Development CSCI-GA Instructor: Thomas Wies Spring 2012 Lecture 13.
FIT FIT1002 Computer Programming Unit 19 Testing and Debugging.
Outline. Theorem For the two processor network, Bit C(Leader) = Bit C(MaxF) = 2[log 2 ((M + 2)/3.5)] and Bit C t (Leader) = Bit C t (MaxF) = 2[log 2 ((M.
Copyright © 2006 Addison-Wesley. All rights reserved.1-1 ICS 410: Programming Languages Chapter 3 : Describing Syntax and Semantics Axiomatic Semantics.
Multiversion Access Methods - Temporal Indexing. Basics A data structure is called : Ephemeral: updates create a new version and the old version cannot.
© Katz, 2007CS Formal SpecificationsLecture - Temporal logic 1 Temporal Logic Formal Specifications CS Shmuel Katz The Technion.
© Katz, 2003 Formal Specifications of Complex Systems-- Real-time 1 Adding Real-time to Formal Specifications Formal Specifications of Complex Systems.
Katz Formal Specifications Larch 1 Algebraic Specification and Larch Formal Specifications of Complex Systems Shmuel Katz The Technion.
1 CSE1301 Computer Programming: Lecture 15 Flowcharts and Debugging.
Categories of Aspects Shmuel Katz Computer Science Department The Technion Haifa, Israel.
© Katz, 2007 Formal Specifications of Complex Systems-- Real-time 1 Adding Real-time to Formal Specifications Formal Specifications of Complex Systems.
Copyright © 2006 The McGraw-Hill Companies, Inc. Programming Languages 2nd edition Tucker and Noonan Chapter 18 Program Correctness To treat programming.
Rigorous Fault Tolerance Using Aspects and Formal Methods Shmuel Katz Computer Science Department The Technion Haifa, Israel
Aspect Oriented Programming Written by Michael Beder.
More on AspectJ. aspect MoveTracking { private static boolean _flag = false; public static boolean testAndClear() { boolean result = _flag; _flag = false;
1 CSE1301 Computer Programming: Lecture 15 Flowcharts, Testing and Debugging.
Formal Methods 1. Software Engineering and Formal Methods  Every software engineering methodology is based on a recommended development process  proceeding.
System Planning- Preliminary investigation
XP New Perspectives on Microsoft Office Access 2003 Tutorial 12 1 Microsoft Office Access 2003 Tutorial 12 – Managing and Securing a Database.
Selected topics in distributed computing Shmuel Zaks
Features, Policies and Their Interactions Joanne M. Atlee Department of Computer Science University of Waterloo.
Copyright © 2007, Oracle. All rights reserved. Managing Concurrent Requests.
1 Automatic Refinement and Vacuity Detection for Symbolic Trajectory Evaluation Orna Grumberg Technion Haifa, Israel Joint work with Rachel Tzoref.
Low-Level Detailed Design SAD (Soft Arch Design) Mid-level Detailed Design Low-Level Detailed Design Design Finalization Design Document.
On Reducing the Global State Graph for Verification of Distributed Computations Vijay K. Garg, Arindam Chakraborty Parallel and Distributed Systems Laboratory.
1 Compiler Construction (CS-636) Muhammad Bilal Bashir UIIT, Rawalpindi.
Formal Verification Lecture 9. Formal Verification Formal verification relies on Descriptions of the properties or requirements Descriptions of systems.
Nonoverlap of the Star Unfolding Boris Aronov and Joseph O’Rourke, 1991 A Summary by Brendan Lucier, 2004.
School of Computer Science, The University of Adelaide© The University of Adelaide, Australian Computer Science Week 2005 Selected papers from: ACSC.
Categories of Aspects Shmuel Katz Computer Science Department The Technion Haifa, Israel.
Inter-Type Declarations in AspectJ Awais Rashid Steffen Zschaler © Awais Rashid, Steffen Zschaler 2009.
COP4020 Programming Languages Introduction to Axiomatic Semantics Prof. Robert van Engelen.
Software Engineering Laboratory, Department of Computer Science, Graduate School of Information Science and Technology, Osaka University IWPSE 2003 Program.
Topics for exam in AOSD Basic concepts: tangling, scattering, joinpoint, advice, cross-cutting, weaving AspectJ: syntax, pointcut notations, around, proceed,
Concern Architecture View and Aspect-Oriented Design Mika Katara and Shmuel Katz Tampere U. T. Technion, Haifa.
CIS 842: Specification and Verification of Reactive Systems Lecture INTRO-Examples: Simple BIR-Lite Examples Copyright 2004, Matt Dwyer, John Hatcliff,
Lecture 5 1 CSP tools for verification of Sec Prot Overview of the lecture The Casper interface Refinement checking and FDR Model checking Theorem proving.
1 Incremental Analysis of Interference Among Aspects Authors: Emilia Katz, Shmuel Katz The Technion.
SAFEWARE System Safety and Computers Chap18:Verification of Safety Author : Nancy G. Leveson University of Washington 1995 by Addison-Wesley Publishing.
Refactoring Agile Development Project. Lecture roadmap Refactoring Some issues to address when coding.
PROGRAMMING PRE- AND POSTCONDITIONS, INVARIANTS AND METHOD CONTRACTS B MODULE 2: SOFTWARE SYSTEMS 13 NOVEMBER 2013.
Static Techniques for V&V. Hierarchy of V&V techniques Static Analysis V&V Dynamic Techniques Model Checking Simulation Symbolic Execution Testing Informal.
Superstabilizing Protocols for Dynamic Distributed Systems Authors: Shlomi Dolev, Ted Herman Presented by: Vikas Motwani CSE 291: Wireless Sensor Networks.
Design of Tree Algorithm Objectives –Learning about satisfying safety and liveness of a distributed program –Apply the method of utilizing invariants and.
1 CSE1301 Computer Programming: Lecture 16 Flow Diagrams and Debugging.
6/12/20161 a.a.2015/2016 Prof. Anna Labella Formal Methods in software development.
Formal Methods in Software Engineering
Structural testing, Path Testing
Designing and Debugging Batch and Interactive COBOL Programs
Aspect Validation: Connecting Aspects and Formal Methods
Multi-Way Search Trees
Axiomatic semantics Points to discuss: The assignment statement
IS 2935: Developing Secure Systems
Programming Languages 2nd edition Tucker and Noonan
Computer Security: Art and Science, 2nd Edition
Department of Computer Science Abdul Wali Khan University Mardan
Programming Languages 2nd edition Tucker and Noonan
Presentation transcript:

Categories of Aspects Shmuel Katz Computer Science Department The Technion Haifa, Israel

Outline Identify categories of aspects, semantically Identify types of properties and how to describe them in temporal logic Show how to check for category of aspect by syntactic analysis (data-flow) Prove that for aspects of category A, properties of type B Are automatically preserved if originally true Can be established by only considering the aspect code Can be checked separately for the original and the aspect

Spectative aspects Only gather information about original system, in variables local to the aspect Logging, performance evaluation, debugging Can be checked on the code level of the advice: all assignments are to local variables (also parameters given values)

Regulative aspects Either like spectative, or only affect control of basic, by shutting possibilities Can restrict the conditions for activating a method call of the original system Adding password authorization, restricting choices to ensure fairness, aborting Prune edges from the stategraph of the original system, plus add spectative parts

Invasive aspects Allows changing variables/state of the original system Treating discount policy, overflow, security with encode/decode Can have restricted versions, e.g., to treat invariant extension

Temporal Logic Lite A logic over sequences of states (in a tree?) Gp: for every state later in the sequence, p Fp: there is a later state with p Xp: in the next state, p A(Gp): For every possible sequence, Gp E(Gp): There is a sequence with Gp Sequence= a possible execution of the system

Types of Properties Safety: hold in every state, may relate to the history leading to the state Invariant: relates to each state (no history) Class invariant: true before and after every method call of a class (and initially) Temporal logic: AGp, (p has no future modalities) Liveness: hold eventually for every execution Termination, eventual response to a request In temporal logic: AFp, or complex combinations

Types of Properties (cont.) Next-state properties: Connect a state and the immediately following (or previous) one Written as Xp (usually q => Xp) Existence properties: There is a possible computation of the system Written as EP (where P contains other temporal assertions, e.g., EGFp) From each location, there is a path that reaches an interrupt state Visibility properties: what is known outside the module under consideration Special kind of safety properties, relates to all methods, fields (including new ones from the aspect)

Terminology Underlying (system): the system before an aspect has been woven (also Original or Basic) Aspect: pointcut plus advice Augmented (system): the result after weaving in an aspect

The Semantics of a system A state graph expands as new objects are added Contracts as objects are removed Temporal assertions are for all paths through each graph during execution Consider the changes from Original to Augmented graphs—to justify claims

Spectative aspects-- identification C = set of variables/parameters of aspect code bound to those in underlying No variable of C is assigned a value by the aspect code Each advice is straightline code (or is guaranteed to terminate) underlying resumes where interrupted (before/after, no exceptions thrown, or around with proceed)

Spectative aspects--properties All safety and liveness that are not next-state, and only involve underlying variables / methods—are maintained in augmented No new properties of only underlying are added For new properties, separate concerns: can check aspect variables in aspect, underlying variables in underlying Note: visibility can be violated, due to new methods or variables of the aspect

Regulative aspects-- identification C, as before (all variables in aspect bound to variables of underlying) Variables of C are not assigned (but…) Advice can throw exceptions that terminate execution, or prevent external calls to methods of underlying (or, as before) Strengthens conditions checked, so restricts possible transitions (erase edges in transition graph), but not skipping (which would add an edge)

Regulative-- properties Safety properties not next-state, involving only variables/methods of underlying are maintained in augmented Above is justified by considering the regulative augmented as a pruned graph of the underlying Liveness properties may not be maintained May have new safety properties, even of just the underlying variables If only external calls are restricted, existential may be violated in augmented, but otherwise maintains safety and liveness like spectative

Invasive: extending invariants For invariants of the underlying, that we want to also hold for augmented Can we just check the advice? Yes, when the invariant is inductive: just itself is needed to justify each step {I} s {I} has been shown for each step s of the underlying Then just show {I} t {I} for each step t of the advice—without reproving for the underlying Otherwise, may have to recheck underlying too

Extending inductive invariants: an example x > y > 0 is an inductive invariant of an underlying system Add an aspect with changes like:  double(x,y) Check {x>y>0} double(x,y) {x>y>0} The invariant will hold for the augmented system, with no further checks and without analyzing Can be further refined….

Additional questions Interactions among types of aspects Finer distinctions among Invasive Additional classes of properties Model checking for aspects Tools to be developed as part of a Common Aspect Proof Environment (CAPE) within AOSD-Europe

Summary Identifying categories of aspects can often be done by static code analysis Theorems on types of properties preserved, or new ones established are done only once Can save complex proof techniques, not yet developed for aspects Will sometimes still need regular proofs