The Abstract Behavioral Specification Language

Similar documents
EECS168 Exam 3 Review

Introduction to Programming Using Java (98-388)

Chapter 4 Defining Classes I

Modeling Spatial and Temporal Variability with the HATS Abstract Behavioral Modeling Language

AP COMPUTER SCIENCE JAVA CONCEPTS IV: RESERVED WORDS

Lecture 6. Introduction to Message Passing

Discover how to get up and running with the Java Development Environment and with the Eclipse IDE to create Java programs.

Message Passing. Lecture 7. Shared Variables? Shared Variables? Synchronisation. Overview of Message Passing

Programming and Deployment of Active Objects with Application-Level Scheduling

AP Computer Science Chapter 10 Implementing and Using Classes Study Guide

Assertions, pre/postconditions

Cover Page. The handle holds various files of this Leiden University dissertation

Introduction to Java

Programming for Mobile Computing

Chapter 5: Procedural abstraction. Function procedures. Function procedures. Proper procedures and function procedures

Course Description. Learn To: : Intro to JAVA SE7 and Programming using JAVA SE7. Course Outline ::

Performance Throughput Utilization of system resources

Executable Modeling of Deployment Decisions for Resource-Aware Distributed Applications. Silvia Lizeth Tapia Tarifa

Talen en Compilers. Jurriaan Hage , period 2. November 13, Department of Information and Computing Sciences Utrecht University

Outline. Java Models for variables Types and type checking, type safety Interpretation vs. compilation. Reasoning about code. CSCI 2600 Spring

Implementing Garbage Collection for Active Objects on Top of Erlang

Java Primer 1: Types, Classes and Operators

Second-generation: Assembly language. Figure 6.1 Generations of programming languages. Assembly Language Characteristics.

Chapter 6: Programming Languages

Chapter 6 Introduction to Defining Classes

A Survey of Active Object Languages

Outline. Introduction Concepts and terminology The case for static typing. Implementing a static type system Basic typing relations Adding context

(800) Toll Free (804) Fax Introduction to Java and Enterprise Java using Eclipse IDE Duration: 5 days

Scalable Performance for Scala Message-Passing Concurrency

CMSC 330: Organization of Programming Languages

Seminar on Languages for Scientific Computing Aachen, 6 Feb Navid Abbaszadeh.

Introduction to Locks. Intrinsic Locks

Design and Analysis of Executable Software Models:

Lecture 10. Overriding & Casting About

Page 1

OOPs Concepts. 1. Data Hiding 2. Encapsulation 3. Abstraction 4. Is-A Relationship 5. Method Signature 6. Polymorphism 7. Constructors 8.

Java SE 7 Programming

M.C.A DEGREE EXAMINATION,NOVEMBER/DECEMBER 2010 Second Semester MC 9222-OBJECT ORIENTED PROGRAMMING (Regulation 2009)

Data abstractions: ADTs Invariants, Abstraction function. Lecture 4: OOP, autumn 2003

CS152 Programming Language Paradigms Prof. Tom Austin, Fall Syntax & Semantics, and Language Design Criteria

Operating Systems (2INC0) 2017/18

15CS45 : OBJECT ORIENTED CONCEPTS

Exam 1 Prep. Dr. Demetrios Glinos University of Central Florida. COP3330 Object Oriented Programming

CS558 Programming Languages

C++ (Non for C Programmer) (BT307) 40 Hours

User-defined Schedulers for Real-Time Concurrent Objects

Designing and Implementing Classes Topic 6

Peers Techno log ies Pv t. L td. Core Java & Core Java &Adv Adv Java Java

Conformance. Object-Oriented Programming Spring 2015

DOWNLOAD PDF CORE JAVA APTITUDE QUESTIONS AND ANSWERS

Software Development & Education Center. Java Platform, Standard Edition 7 (JSE 7)

Type checking. Jianguo Lu. November 27, slides adapted from Sean Treichler and Alex Aiken s. Jianguo Lu November 27, / 39

Chapter Machine instruction level 2. High-level language statement level 3. Unit level 4. Program level

2 rd class Department of Programming. OOP with Java Programming

JAVA MOCK TEST JAVA MOCK TEST II

6. Operatoren. 7. Safe Programming: Assertions. Table of Operators. Table of Operators - Explanations. Tabular overview of all relevant operators

Resource management. Real-Time Systems. Resource management. Resource management

CS153: Compilers Lecture 15: Local Optimization

Final CSE 131B Spring 2004

Objects as Session-Typed Processes

Type Inference Systems. Type Judgments. Deriving a Type Judgment. Deriving a Judgment. Hypothetical Type Judgments CS412/CS413

Fault in the Future. Ivan Lanese Computer Science Department University of Bologna/INRIA Italy

CS412/CS413. Introduction to Compilers Tim Teitelbaum. Lecture 17: Types and Type-Checking 25 Feb 08

CS 3360 Design and Implementation of Programming Languages. Exam 1

Advances in Programming Languages

Testing Concurrent Objects with Application-Specific Schedulers

Static program checking and verification

Design Issues. Subroutines and Control Abstraction. Subroutines and Control Abstraction. CSC 4101: Programming Languages 1. Textbook, Chapter 8

R13 SET Discuss how producer-consumer problem and Dining philosopher s problem are solved using concurrency in ADA.

CS159. Nathan Sprague

Computer Science II (20082) Week 1: Review and Inheritance

Semantic Analysis. How to Ensure Type-Safety. What Are Types? Static vs. Dynamic Typing. Type Checking. Last time: CS412/CS413

Java Threads and intrinsic locks

Crash Course in Java. Why Java? Java notes for C++ programmers. Network Programming in Java is very different than in C/C++

Changes in JHawk 6 1 Changes in JHawk6 Virtual Machinery 2015

Project 5 Due 11:59:59pm Tuesday, April 25, 2017

Java SE7 Fundamentals

M : an Open Model for Measuring Code Artifacts

Overview. CMSC 330: Organization of Programming Languages. Concurrency. Multiprocessors. Processes vs. Threads. Computation Abstractions

A Temporal Language for SystemC

Continuations provide a novel way to suspend and reexecute

Tool demonstration: Spin

Testing, Debugging, and Verification

The ABS Tool Suite: Modelling, Executing and Analysing Distributed Adaptable Object-Oriented Systems

The Compiler So Far. CSC 4181 Compiler Construction. Semantic Analysis. Beyond Syntax. Goals of a Semantic Analyzer.

Outline. Object Oriented Programming. Course goals. Staff. Course resources. Assignments. Course organization Introduction Java overview Autumn 2003

Java SE 7 Programming

Model Requirements and JAVA Programs MVP 2 1

Homework 12 Due Wednesday, 12/8/10

Multithreading and Interactive Programs

Microsoft Visual C# Step by Step. John Sharp

Classes, Objects, and OOP in Java. June 16, 2017

Core Java - SCJP. Q2Technologies, Rajajinagar. Course content

General Concepts. Abstraction Computational Paradigms Implementation Application Domains Influence on Success Influences on Design

Object Oriented Programming: In this course we began an introduction to programming from an object-oriented approach.

Object Oriented Paradigm

Compilers. Cool Semantics II. Alex Aiken

4. Semantic Processing and Attributed Grammars

Computer Science II (20073) Week 1: Review and Inheritance

K-Java: A Complete Semantics of Java

Transcription:

The Abstract Behavioral Specification Language Frank S. de Boer CWI frb@cwi.nl Scientific Meeting CWI, November 29, 2013

How It All Started? Simula (Ole Johan Dahl, Turing award 2001) Credo FP6 project (Modeling and analysis of evolutionary structures for distributed services) HATS FP7 project (Highly Adaptable and Trustworthy Software using Formal Models)

Main Challenges: Cloud and Multicore Resource-aware programming models Monitoring resources Resource management Executable deployment models Simulation Analysis

Approach Abstract behavioral specification language for leveraging resources and their dynamic management to the abstraction level of models. Abstraction level matches that of a high-level programming language, in order to be easily usable and accessible to software developers. Formal methods for the analysis of resource needs and deployment scenarios at the design stage.

Our Goal Full development cycle Modeling Analysis Code generation

The Abstract Behavioral Specification Language (ABS) Main features User-defined Algebraic Data Types Concurrent Objects Encapsulation Cooperative multitasking (multiple tasks originating from asynchronous calls)

Encapsulation: Classes and Interfaces Interfaces Provide reference types of objects (implementation abstraction) Subinterfaces allowed Multiple inheritance allowed Reference types may occur in data types, but: no method calls in function definitions (possible side effects) Classes Only for object construction Class name is not a type Classes can implement several interfaces Fields are private

Class Initialization, Active Classes Class Initialization Optional class parameters = fields = constructor signature Fields with primitive types must be initialized when declared Optional init block executed first Active Classes Characterized by presence of run() method Objects from active classes start activity after initialization Passive classes react only to incoming calls Example: Unit run() { // active behavior...

Asynchronous Method Calls Syntax and Semantics target! methodname(arg1, arg2,...) Sends an asynchronous message to the target object Creates new task Caller continues execution and allocates a future to store the result Fut<T> v = o!m(e);

Scheduling Unconditional Scheduling suspend command yields control to other task (in the object) Conditional Scheduling await g, where g is a polling guard Guards are inductively defined as: b - where b is a side-effect-free boolean expression f? - future guards g & g - conjunction (not Boolean operator) Yields task execution until guard is true (continue immediately if guard is true already)

Synchronization and Blocking Reading Futures f.get - reads future f and blocks execution until result is available Deadlocks possible (use static analyzer for detection) Programming idiom: use await f? to prevent blocking (safe access) Fut<T> v = o!m(e);...; await v?; r = v.get; Blocking vs. Suspension Suspension Lets other task in same object continue (if any) Blocking No task in the same object can continue until future resolved

The ABS Basic Tool Chain Feature models, Product selections, Configurations, Delta modules, Core ABS code Emacs Mode Legend external data internal data Parser ABS tool Extended AST existing tool Rewriter ABS Integrated Development Environment Core AST Type-Checked AST Name Resolution Maude Back End Java Back End Core ABS code gen. Resolved AST Maude Files Java Files Core ABS Files Type Checker Maude VM Java VM

Capabilities of the ABS Tool Set ABS IDE (Eclipse-based), parser, compiler, type checker Maude, Java and Erlang code generation Execution visualization Monitor inlining Deployment components with timing constraints Run-time assertion checking Deadlock analysis Automated resource (time, space) analysis Automated test case generation

Sieve of Eratosthenes

A Parallel Sieve of Eratosthenes interface IPrime { Unit divide (Int n); class Generator(Int b) { Int n = 3 ; IPrime two; { two = new Prime(2); Unit run() { while (n < b) { two!divide(n) ; n = n + 1;

class Prime (Int p) implements IPrime { IPrime next; Unit divide (Int n) { if ( (n % p)!= 0) { if (next!= null) { next!divide (n); else { next = new Prime(n); Main { new Generator(read());