Model-Based Testing. Using TorXakis

Size: px
Start display at page:

Download "Model-Based Testing. Using TorXakis"

Transcription

1 1 Model-Based Testing Using TorXakis

2 2 TorXakis : Installation 1. Installation: 2. Windows : Get and install TorXakis.msi Also Linux and Mac-OS 3. Windows installation : C:\Program Files (x86)\tno TorXakis\TorXakis 4. Download examples 5. Optional: install notepad++ plug-in for keyword high-lighting 6. Optional: install eclipse plug-in for syntax directed editing (readme.txt) 7. For some SUTs, install JDK* Java Development Kit *

3 3 TorXakis View on Systems and Models

4 TorXakis : A Black-Box View on Systems Channels with messages Inputs Channels: A :: Int; B :: Struct Output Channels: X :: Int; Y :: String SUT real, black-box system communicating with its environment A? n via messages on input- and output channels Y! `yes` SUT B? s X! n+1 4

5 5 TorXakis : A View on Models A?n model MODEL labelled transition system with parameterized actions on Y!`yes` X!n+1 B?m input- and output channels A? n A?k A?n X!42 Y! `yes` Y!`no` Not (yet) in TorXakis: real-time SUT probabilities B? s X! n+1 derivatives (hybrid)

6 6 Model-Based Testing TorXakis - The Tool

7 TorXakis : An On-Line MBT Tool model TorXakis SUT pass fail 7

8 TorXakis and SUT model TorXakis CNECT SUT pass fail 8

9 TorXakis and SUT TorXakis CHANDEF MyChannels ::= Stim ; Resp ENDDEF MODELDEF Mod ::= CHAN IN Stim CHAN OUT Resp BEHAVIOUR Stim >-> Resp ENDDEF CNECTDEF Sut ::= CLIENTSOCK model CHAN OUT Stim HOST "localhost" PORT 7890 ENCODE Stim ->! "stim CHAN IN Resp HOST "localhost" PORT 7890 DECODE Resp <-? s ENDDEF model.txs CNECT SUT pass fail client server socket host portnumber 9

10 10 TorXakis : Installation 1. Installation: 2. Windows : Get and install TorXakis.msi Also Linux and Mac-OS 3. Windows installation : C:\Program Files (x86)\tno TorXakis\TorXakis 4. Download examples 5. Optional: install notepad++ plug-in for keyword high-lighting 6. Optional: install eclipse plug-in for syntax directed editing (readme.txt) 7. For some SUTs, install JDK* Java Development Kit *

11 11 TorXakis 1. My First TorXakis Test Run 2. My First TorXakis Model Channels SUT Model 3. More TorXakis Models and Runs

12 12 TorXakis 1. My First TorXakis Test Run 2. My First TorXakis Model Channels SUT Model 1. More TorXakis Models

13 TorXakis : Running a Test (Windows) 1. Start two Command Prompt windows, one for TorXakis, one for the SUT 2. There are three versions of SUT: pre-compiled (Windows) executable \winexe Java source * \java simulated TorXakis model \model 3. In SUT window, start SUT: SRfinite.exe In TorXakis window, go to...\examps\stimulusresponse\model 5. Start TorXakis with the model file C:> torxakis SRfinite.txs 6. In TorXakis start the tester TXS << tester Mod Sut 7. In TorXakis run 4 test steps TXS << test 4 8. Try some other TorXakis command TXS << help *

14 14 Running TorXakis and SUT $ torxakis SRfinite.txs TXS >> TorXakis :: Model-Based Testing TXS >> txsserver starting: "PC tsn.tno.nl" : 9876 TXS >> input files parsed: SRfinite.txs TXS >> smt solver initialized: Z3 [ build hashcode e4b7ac37f38f] TXS >> txsserver initialized TXS << help

15 15 Running TorXakis and SUT TXS >> tester Mod Sut TXS >> test 4 TXS >>...1: IN: Act { { ( Stim, [] ) } } TXS >>...2: OUT: Act { { ( Resp, [] ) } } TXS >>...3: OUT: No Output (Quiescence) TXS >>...4: OUT: No Output (Quiescence) TXS >> PASS TXS <<

16 21 TorXakis 1. My First TorXakis Test Run 2. My First TorXakis Model Channels SUT Model 3. More TorXakis Models

17 22 TorXakis : Definition of Channels Stim Resp SUT MODEL labelled transition system with parameterized actions on input- and output channels CHANDEF MyChannels ::= Stim ; Resp ENDDEF

18 TorXakis: My first model MODEL Stimulus Response labelled transition system with actions on inputand output channels MODELDEF MyModel ::= CHAN IN CHAN OUT Stim Resp ENDDEF BEHAVIOUR Stim >-> Resp

19 TorXakis : Definition of SUT Stim Resp channels CNECT socket SUT CNECTDEF Sut ::= CLIENTSOCK SUT real, black-box system communicating with its environment via messages on input- and output channels CHAN OUT Stim HOST "localhost" PORT 7890 ENCODE Stim ->! "stim CHAN IN Resp HOST "localhost" PORT 7890 DECODE Resp <-? s ENDDEF 24

20 25 TorXakis 1. My First TorXakis Test Run 2. My First TorXakis Model Channels SUT Model 3. More TorXakis Models

21 26 TorXakis 1. My First TorXakis Model SUT Model Adapter 2. My First TorXakis Test Run 3. More TorXakis Models

22 27 TorXakis: Process Definition Stim Resp MODELDEF Mod ::= CHAN IN Stim CHAN OUT Resp BEHAVIOUR Stim >-> Resp ENDDEF MODELDEF Mod Stim ::= CHAN IN Stim CHAN OUT Resp Resp BEHAVIOUR Stim >-> Resp >-> Stim >-> Resp Stim Resp Stim Resp ENDDEF

23 28 TorXakis: Process Definition Stim Resp MODELDEF Spec ::= CHAN IN Stim CHAN OUT Resp BEHAVIOUR Stim >-> Resp ENDDEF

24 29 TorXakis: Process Definition Stim PROCDEF stimresp [ Stm, Rsp ] ( ) ::= Stm >-> Rsp ENDDEF Resp MODELDEF Mod ::= CHAN IN CHAN OUT BEHAVIOUR Stim Resp stimresp [ Stim, Resp ] ( ) ENDDEF

25 30 TorXakis: Process Definition Stim Resp PROCDEF stimresp [ Stm, Rsp ] ( ) ::= Stm >-> Rsp >-> stimresp [ Stm, Rsp ] ( ) ENDDEF MODELDEF Mod ::= CHAN IN Stim CHAN OUT Resp BEHAVIOUR stimresp [ Stim, Resp ] ( ) ENDDEF

26 TorXakis: Exercise TorXakis identifiers: Type, Constructor, Model, Cnect: start with capital Make a model for the looping Function, Constant, Variable: start with small letter StimulusResponse system ( or look at SRloop.txs ) Test SUT = SRloop.java /.exe against your looping StimulusResponsemodel (SRloop.txs) Test the finite system SUT = SRfinite.java /.exe against your looping StimulusResponsemodel. Repeat for the looping SUT = SRloop.java/.exe against the old model = SRfinite.txs. Explain the results. 31

27 32 TorXakis: Exercise Result Stim implements Stim Resp Resp ioco Stim Resp implements Stim ioco Resp

28 33 TorXakis: Exercise Experiment, using testing, simulation, or stepping, with SRfinite.txs, SRlnone.txs, SRloop,txs, SRnone and corresponding SUTs. If you have JDK installed you can make mutants, i.e., small modifications/errors in the Java SUTs, and see whether you can detect the errors.

29 34 TorXakis More Models Composition and Representation

30 TorXakis : Definitions data TorXakis model SUT TorXakis input = list of definitions type function TYPEDEF FUNCDEF constant CONSTDEF pass fail test architecture channels CHANDEF behaviour / labelled transition system model MODELDEF process PROCDEF connection CNECTDEF state automaton STAUTDEF 35

31 36 TorXakis : Defining Behaviour - STS basic behaviour = transition system complex behaviour = combining transition systems A?n named behaviour definition named behaviour use Y!`yes` X!n+1 A?n B?m sequence choice parallel communication A?k X!42 exception interrupt Y!`no` hiding

32 37 TorXakis: Choice Resp Stim Err -- Stimulus-Response with Error PROCDEF errsr [ Stim, Resp, Err ] () ::= Stim >-> ( Resp >-> errsr [Stim,Resp,Err] () ## Err >-> errsr [Stim,Resp,Err] () ) ENDDEF

33 38 TorXakis: Parallel Interleaving Stim1 Resp1 Stim2 Resp2 Stim1 Stim2 Resp1 Resp2 Parallelism with interleaving: Stim2 Resp2 Resp1 Stim1 stimresp1 stimresp2

34 39 TorXakis: Parallel Communication [ M ] Stim1 MResp M Resp2 Stim1 Resp2 M Parallelism with communication: stimresp1 [ M ] stimresp2 Resp2 Stim1

35 40 TorXakis: Communication + Hiding (Abstraction) Stim1 [ M ] Stim1 MResp M Resp2 Resp2 Stim1 Resp2 Communication + Hiding: Resp2 Stim1 HIDE [ M ] IN stimresp1 [ M ] stimresp2 NI

36 TorXakis: Behaviour Compositions Enable >>> proc1 [ A, X ] ( ) proc2 [ B, Y ] ( ) when proc1 finishes, proc2 continues Disable [>> proc1 [ A, X ] ( ) proc2 [ B, Y ] ( ) the first action of proc2 disables proc1 Interrupt [>< proc1 [ A, X ] ( ) proc2 [ B, Y ] ( ) the first action of proc2 disables proc1; when proc2 finishes, proc1 continues where it stopped 41

37 42 TorXakis: Exercise Experiment, using testing, simulation, or stepping, with the different models in SRparallel.txs, and various SUTs. If you have JDK installed you can make mutants, i.e., small modifications/errors in the Java SUTs, and see whether you can detect the errors.

38 43 TorXakis Data Definitions and Functions

39 44 TorXakis: Data Types Standard types: Int, Bool, String, Regular Expression Algebraic data types TYPEDEF Colour ::= Red Yellow Blue ENDDEF TYPEDEF IntList ::= Nil Cons { hd :: Int, tl :: IntList } ENDDEF

40 45 TorXakis: Functions Functions: name, parameters, type, (recursive) value expression Overloading TYPEDEF IntList ::= Nil Cons { hd :: Int, tl :: IntList } ENDDEF Standard functions for: Int, Bool, String, Regular Expression FUNCDEF ++ ( s :: IntList; x :: Int ) :: IntList ::= FUNCDEF IF add isnil ( x, s ) y :: Int ) :: Int ::= x + y ENDDEF THEN Cons ( x, Nil ) ELSE Cons ( hd ( s ), tl ( s ) ++ x ) FI ENDDEF

41 46 More Complex Data Test data generation from XSD (XML) descriptions with constraints complex data

42 48 TorXakis 1. My First TorXakis Model SUT Model Adapter 2. My First TorXakis Test Run 3. More TorXakis Models 4. Even More TorXakis Models

43 52 TorXakis Example : Dispatcher-Processing System

44 Example: Dispatcher-Processing System input jobs dispatcher processor processor processor processor processed jobs..\examps\dispatchprocs 53

45 Example: Dispatcher-Processing System Start job processor Idle labelled transition system processor Start Finish Processing Finish job PROCDEF processor ::= Start >-> Finish >-> processor DisPro01-processor.txs ENDDEF 54

46 55 Example: Two Parallel Processors Start Start Start Finish Start Finish Finish Finish

47 56 Example: Two Parallel Processors processor 1 processor 2 S1 0,0 S2 0 S1 1 F1 2 parallelism 0 S2 1 F2 2 F1 1,0 0,1 S2 S1 F2 2,0 1,1 0,2 S2 F1 F2 S1 2,1 1,2 F2 F1 2,2 processor 1 processor 2

48 57 Example: Dispatcher-Processing System Start Start Start Start processor(i) Start Finish Start Finish Start Finish Start Finish Start Finish Finish Finish Finish Finish parallel composition processors ::= processor(1) processor(2) processor(3) processor(4)

49 58 Example: Four Parallel Processors parallelism

50 59 Example: Dispatcher-Processing System Job dispatcher dispatcher Start Job Start processor processor [ Start ] Finish Start Finish DisPro02-dispatch.txs

51 Example: Dispatcher-Processing System Job dispatcher Job Start Start Finish Start Finish Start Finish Start Finish dispatcher Finish Finish Finish Finish dispatch_procs ::= dispatcher [ Start ] processors composition DisPro03-processors.txs 60

52 Example: Dispatcher Processing System 61

53 Example: Dispatcher-Processing System Job dispatcher Job Start Start Finish Start Finish Start Finish Start Finish dispatcher Finish Finish Finish Finish dispatch_procs ::= HIDE [ Start ] IN dispatcher [ Start ] processors abstraction NI 62 DisPro04-hide.txs

54 63 Example: Dispatcher-Processing System Job dispatcher Inputs: Job1, Job2, Job3: Start Finish Start Finish Start Finish Start Finish Job1 Finish Finish Finish Finish J2 J3 F1 F2 Finish3 F2 F3 F1 F3 F1 F2 uncertainty no unique expected result F3 F2 F3 F1 F2 F1

55 64 Example: Dispatcher-Processing System Job dispatcher Inputs: Job1, Job2, Job3: Start Finish Start Finish Start Finish Start Finish Job1 Finish Finish Finish Finish F1 J2 J2 F1 J3 F2 F2 J3 F1 F2 Finish3 J3 F2 F3 F2 F3 F1 F3 F1 F2 F3 uncertainty non-determinism F3 F2 F3 F2 F3 F1 F2 F1

56 Example: Dispatcher-Processing System FUNCDEF gcd ( a, b :: Int ) :: Int ::= IF a == b THEN a ELSE IF a > b THEN gcd ( a - b, b ) ELSE gcd ( a, b - a ) FI FI Start job state + data Start Finish? job :: JobData! gcd ( job.x, job.y ) [[ isvalidjob(job) ]] TYPEDEF JobData ::= JobData { jobid :: Int ; jobdescr :: String ; x, y :: Int } processor Finish job FUNCDEF isvalidjob ( jobdata :: JobData ) :: Bool ::= jobdata.jobid > 0 /\ strinre ( jobdata.jobdescr, REGEX('[A-Z][0-9]{2}[a-z]+') ) /\

57 TorXakis Model 66

58 67 Demo: Dispatcher-Processing System 1. See...\examps\dispatchprocess\ Model...\model\DisPro10-data.txs 3. Correct SUT:...\sut\Sut.java 4. Erroneous SUT:...\sutWithError\SutWithError.java

59 73 model SUT pass fail The next step in Model-Based Testing

Model-Based Testing. with TorXakis. TestNet WerkGroep Model-Based testing. Jan Tretmans Piërre van de Laar. model. TorXakis.

Model-Based Testing. with TorXakis. TestNet WerkGroep Model-Based testing. Jan Tretmans Piërre van de Laar. model. TorXakis. Model-Based Testing with TorXakis model TestNet WerkGroep Model-Based testing Jan Tretmans Piërre van de Laar TNO Embedded Systems Innovation TorXakis pass fail system under test Model-Based Testing 2

More information

Model-Based Testing. The Next Step in Test Automation!? Jan Tretmans SUT. model. TorXakis. SUMBAT: SUpersizing. Model.

Model-Based Testing. The Next Step in Test Automation!? Jan Tretmans SUT. model. TorXakis. SUMBAT: SUpersizing. Model. Model-Based Testing The Next Step in Test Automation!? model Jan Tretmans SUMBAT: SUpersizing Model TorXakis BAsed Testing SUT TNO Embedded Systems Innovation Radboud University, Nijmegen pass fail 2 Overview

More information

Model-Based Testing. Theory Tools Applications SUT. model. Jan Tretmans

Model-Based Testing. Theory Tools Applications SUT. model. Jan Tretmans Model-Based Testing Theory Tools Applications model Jan Tretmans ESI Embedded Systems Innovation by TNO Radboud University Nijmegen Högskolan i Halmstad jan.tretmans@tno.nl pass fail SUT Jan Tretmans Embedded

More information

Type-indexed functions in Generic Haskell

Type-indexed functions in Generic Haskell Type-indexed functions in Generic Haskell Johan Jeuring September 15, 2004 Introduction Today I will talk about: a Types of polymorphism. b Type-indexed functions. c Dependencies. Read about b, and c in

More information

You should now start on Chapter 4. Chapter 4 introduces the following concepts

You should now start on Chapter 4. Chapter 4 introduces the following concepts Summary By this stage, you have met the following principles : the relationship between classes and objects that a class represents our understanding of something weʼre interested in, in a special and

More information

Metaprogramming assignment 3

Metaprogramming assignment 3 Metaprogramming assignment 3 Optimising embedded languages Due at noon on Thursday 29th November 2018 This exercise uses the BER MetaOCaml compiler, which you can install via opam. The end of this document

More information

Haskell 98 in short! CPSC 449 Principles of Programming Languages

Haskell 98 in short! CPSC 449 Principles of Programming Languages Haskell 98 in short! n Syntax and type inferencing similar to ML! n Strongly typed! n Allows for pattern matching in definitions! n Uses lazy evaluation" F definition of infinite lists possible! n Has

More information

Object-Oriented Programming

Object-Oriented Programming iuliana@cs.ubbcluj.ro Babes-Bolyai University 2018 Overview 1 2 3 4 5 6 7 I No beard, no belly, no guru... Ken Thompson (B), Dennis Ritchie (C) - UNIX Bjarne Stroustrup (C++) James Gosling (Java) Figure:

More information

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008.

Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008. Program Abstractions, Language Paradigms. CS152. Chris Pollett. Aug. 27, 2008. Outline. Abstractions for telling a computer how to do things. Computational Paradigms. Language Definition, Translation.

More information

Programming in Omega Part 1. Tim Sheard Portland State University

Programming in Omega Part 1. Tim Sheard Portland State University Programming in Omega Part 1 Tim Sheard Portland State University Tim Sheard Computer Science Department Portland State University Portland, Oregon PSU PL Research at Portland State University The Programming

More information

CSC324 Principles of Programming Languages

CSC324 Principles of Programming Languages CSC324 Principles of Programming Languages http://mcs.utm.utoronto.ca/~324 November 14, 2018 Today Final chapter of the course! Types and type systems Haskell s type system Types Terminology Type: set

More information

Recap from last time. Programming Languages. CSE 130 : Fall Lecture 3: Data Types. Put it together: a filter function

Recap from last time. Programming Languages. CSE 130 : Fall Lecture 3: Data Types. Put it together: a filter function CSE 130 : Fall 2011 Recap from last time Programming Languages Lecture 3: Data Types Ranjit Jhala UC San Diego 1 2 A shorthand for function binding Put it together: a filter function # let neg = fun f

More information

The current topic: Python. Announcements. Python. Python

The current topic: Python. Announcements. Python. Python The current topic: Python Announcements! Introduction! reasons for studying languages! language classifications! simple syntax specification Object-oriented programming: Python Types and values Syntax

More information

Copyright 2008 CS655 System Modeling and Analysis. Korea Advanced Institute of Science and Technology

Copyright 2008 CS655 System Modeling and Analysis. Korea Advanced Institute of Science and Technology The Spin Model Checker : Part I Copyright 2008 CS655 System Korea Advanced Institute of Science and Technology System Spec. In Promela Req. Spec. In LTL Overview of the Spin Architecture Spin Model pan.c

More information

RadBlue s S2S Quick Start Package (RQS) Developer s Guide. Version 0.1

RadBlue s S2S Quick Start Package (RQS) Developer s Guide. Version 0.1 RadBlue s S2S Quick Start Package (RQS) Developer s Guide Version 0.1 www.radblue.com April 17, 2007 Trademarks and Copyright Copyright 2007 Radical Blue Gaming, Inc. (RadBlue). All rights reserved. All

More information

You will need to download the Java software development kit from

You will need to download the Java software development kit from Obtaining/Setting Up an Account For the Computer Labs you should use the same login as your Blackboard and MyCSUDH accounts. If anyone is unable to log into the systems, please go to the Welch Hall Open

More information

Lecture #13: Type Inference and Unification. Typing In the Language ML. Type Inference. Doing Type Inference

Lecture #13: Type Inference and Unification. Typing In the Language ML. Type Inference. Doing Type Inference Lecture #13: Type Inference and Unification Typing In the Language ML Examples from the language ML: fun map f [] = [] map f (a :: y) = (f a) :: (map f y) fun reduce f init [] = init reduce f init (a ::

More information

Lecture 7. Log into Linux New documents posted to course webpage

Lecture 7. Log into Linux New documents posted to course webpage Lecture 7 Log into Linux New documents posted to course webpage Coding style guideline; part of project grade is following this Homework 4, due on Monday; this is a written assignment Project 1, due next

More information

Flat (Draft) Pasqualino Titto Assini 27 th of May 2016

Flat (Draft) Pasqualino Titto Assini 27 th of May 2016 Flat (Draft) Pasqualino Titto Assini (tittoassini@gmail.com) 27 th of May 206 Contents What is Flat?...................................... Design Goals...................................... Design Non-Goals...................................

More information

DATA TYPES. CS 403: Types and Classes DATA TYPES (CONT D)

DATA TYPES. CS 403: Types and Classes DATA TYPES (CONT D) DATA TYPES CS 403: Types and Classes Stefan D. Bruda Fall 2017 Algorithms + data structures = programs Abstractions of data entities highly desirable Program semantics embedded in data types Data types

More information

Observability and Controllability Issues in Conformance Testing of Web Service Compositions

Observability and Controllability Issues in Conformance Testing of Web Service Compositions Observability and Controllability Issues in Conformance Testing of Web Service Compositions Jose Pablo Escobedo 1, Christophe Gaston 2, Pascale Le Gall 3 and Ana Cavalli 1 1 TELECOM & Management SudParis

More information

L3 Programming September 19, OCaml Cheatsheet

L3 Programming September 19, OCaml Cheatsheet OCaml Cheatsheet Note: this document comes from a previous course (by Sylvain Schimdt). The explanations of the OCaml syntax in this sheet are by no means intended to be complete or even sufficient; check

More information

CS 457/557: Functional Languages

CS 457/557: Functional Languages CS 457/557: Functional Languages Lists and Algebraic Datatypes Mark P Jones Portland State University 1 Why Lists? Lists are a heavily used data structure in many functional programs Special syntax is

More information

Fundamentals of Programming. By Budditha Hettige

Fundamentals of Programming. By Budditha Hettige Fundamentals of Programming By Budditha Hettige Overview Exercises (Previous Lesson) The JAVA Programming Languages Java Virtual Machine Characteristics What is a class? JAVA Standards JAVA Keywords How

More information

Homework 3 COSE212, Fall 2018

Homework 3 COSE212, Fall 2018 Homework 3 COSE212, Fall 2018 Hakjoo Oh Due: 10/28, 24:00 Problem 1 (100pts) Let us design and implement a programming language called ML. ML is a small yet Turing-complete functional language that supports

More information

Topic 7: Algebraic Data Types

Topic 7: Algebraic Data Types Topic 7: Algebraic Data Types 1 Recommended Exercises and Readings From Haskell: The craft of functional programming (3 rd Ed.) Exercises: 5.5, 5.7, 5.8, 5.10, 5.11, 5.12, 5.14 14.4, 14.5, 14.6 14.9, 14.11,

More information

Custom Types. Outline. COMP105 Lecture 19. Today Creating our own types The type keyword The data keyword Records

Custom Types. Outline. COMP105 Lecture 19. Today Creating our own types The type keyword The data keyword Records Outline COMP105 Lecture 19 Custom Types Today Creating our own types The type keyword The data keyword Records Relevant book chapters Programming In Haskell Chapter 8 Learn You a Haskell Chapter 8 The

More information

The Algebra of Programming in Haskell

The Algebra of Programming in Haskell The Algebra of Programming in Haskell Bruno Oliveira The Algebra of Programming in Haskell p.1/21 Datatype Generic Programming - Motivation/Goals The project is to develop a novel mechanism for parameterizing

More information

COSE212: Programming Languages. Lecture 3 Functional Programming in OCaml

COSE212: Programming Languages. Lecture 3 Functional Programming in OCaml COSE212: Programming Languages Lecture 3 Functional Programming in OCaml Hakjoo Oh 2017 Fall Hakjoo Oh COSE212 2017 Fall, Lecture 3 September 18, 2017 1 / 44 Why learn ML? Learning ML is a good way of

More information

Java is a high-level programming language originally developed by Sun Microsystems and released in Java runs on a variety of

Java is a high-level programming language originally developed by Sun Microsystems and released in Java runs on a variety of Java is a high-level programming language originally developed by Sun Microsystems and released in 1995. Java runs on a variety of platforms, such as Windows, Mac OS, and the various versions of UNIX.

More information

Automatic Testing with Formal Methods

Automatic Testing with Formal Methods November 30th, 2010 Testing is Inevitable Can be applied to the actual implementation Scales up Can be applied to the actual implementation No need to build a model of the system It is complex to build

More information

Lists. Michael P. Fourman. February 2, 2010

Lists. Michael P. Fourman. February 2, 2010 Lists Michael P. Fourman February 2, 2010 1 Introduction The list is a fundamental datatype in most functional languages. ML is no exception; list is a built-in ML type constructor. However, to introduce

More information

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

Discover how to get up and running with the Java Development Environment and with the Eclipse IDE to create Java programs. Java SE11 Development Java is the most widely-used development language in the world today. It allows programmers to create objects that can interact with other objects to solve a problem. Explore Java

More information

Basic Types & User Defined Types

Basic Types & User Defined Types Basic Types & User Defined Types 1. Objectives... 2 2. Built-in Types and Primitive Types... 2 3. Data Aggregates and Type Constructors... 3 4. Constructors... 3 5. User-defined Types and Abstract Data

More information

Topic 5 Polymorphism. " Inheritance is new code that reuses old code. Polymorphism is old code that reuses new code.

Topic 5 Polymorphism.  Inheritance is new code that reuses old code. Polymorphism is old code that reuses new code. Topic 5 Polymorphism " Inheritance is new code that reuses old code. Polymorphism is old code that reuses new code. 1 Polymorphism Another feature of OOP literally having many forms object variables in

More information

Optical Character Recognition. SDK Reference. Issue 04 Date

Optical Character Recognition. SDK Reference. Issue 04 Date Issue 04 Date 2018-09-12 Contents Contents 1 SDK Environment Setup...1 1.1 Applying for a Service...1 1.2 Obtaining the SDK... 1 1.3 Preparing a Java Development Environment... 1 1.4 Installing Eclipse

More information

Practical Model-based Testing With Papyrus and RT-Tester

Practical Model-based Testing With Papyrus and RT-Tester Practical Model-based Testing With Papyrus and RT-Tester Jan Peleska and Wen-ling Huang University of Bremen Verified Systems International GmbH Fourth Halmstad Summer School on Testing, 2014-06-11 Acknowledgements.

More information

Concurrent processes. Processes and Threads. Processes and threads. Going back to Concurrency. Modelling Processes. Modeling processes

Concurrent processes. Processes and Threads. Processes and threads. Going back to Concurrency. Modelling Processes. Modeling processes Processes and Threads Abhik Roychoudhury CS 3211 National University of Singapore Modified from Kramer and Magee s lecture notes. Reading material: Chapter 2 of Textbook. Concurrent processes We structure

More information

Spin: Overview of PROMELA

Spin: Overview of PROMELA Spin: Overview of PROMELA Patrick Trentin patrick.trentin@unitn.it http://disi.unitn.it/~trentin Formal Methods Lab Class, Mar 04, 2016 These slides are derived from those by Stefano Tonetta, Alberto Griggio,

More information

DO NOT OPEN UNTIL INSTRUCTED

DO NOT OPEN UNTIL INSTRUCTED CS 345 - Programming Languages Fall 2010 MIDTERM #1 October 5, 2010 DO NOT OPEN UNTIL INSTRUCTED YOUR NAME: Collaboration policy No collaboration is permitted on this midterm. Any cheating (e.g., submitting

More information

A First Look at ML. Chapter Five Modern Programming Languages, 2nd ed. 1

A First Look at ML. Chapter Five Modern Programming Languages, 2nd ed. 1 A First Look at ML Chapter Five Modern Programming Languages, 2nd ed. 1 ML Meta Language One of the more popular functional languages (which, admittedly, isn t saying much) Edinburgh, 1974, Robin Milner

More information

SML A F unctional Functional Language Language Lecture 19

SML A F unctional Functional Language Language Lecture 19 SML A Functional Language Lecture 19 Introduction to SML SML is a functional programming language and acronym for Standard d Meta Language. SML has basic data objects as expressions, functions and list

More information

C: How to Program. Week /Mar/05

C: How to Program. Week /Mar/05 1 C: How to Program Week 2 2007/Mar/05 Chapter 2 - Introduction to C Programming 2 Outline 2.1 Introduction 2.2 A Simple C Program: Printing a Line of Text 2.3 Another Simple C Program: Adding Two Integers

More information

Lecture #23: Conversion and Type Inference

Lecture #23: Conversion and Type Inference Lecture #23: Conversion and Type Inference Administrivia. Due date for Project #2 moved to midnight tonight. Midterm mean 20, median 21 (my expectation: 17.5). Last modified: Fri Oct 20 10:46:40 2006 CS164:

More information

Getting Started with Eclipse/Java

Getting Started with Eclipse/Java Getting Started with Eclipse/Java Overview The Java programming language is based on the Java Virtual Machine. This is a piece of software that Java source code is run through to produce executables. The

More information

Conversion vs. Subtyping. Lecture #23: Conversion and Type Inference. Integer Conversions. Conversions: Implicit vs. Explicit. Object x = "Hello";

Conversion vs. Subtyping. Lecture #23: Conversion and Type Inference. Integer Conversions. Conversions: Implicit vs. Explicit. Object x = Hello; Lecture #23: Conversion and Type Inference Administrivia. Due date for Project #2 moved to midnight tonight. Midterm mean 20, median 21 (my expectation: 17.5). In Java, this is legal: Object x = "Hello";

More information

CSC324 Principles of Programming Languages

CSC324 Principles of Programming Languages CSC324 Principles of Programming Languages http://mcs.utm.utoronto.ca/~324 November 21, 2018 Last Class Types terminology Haskell s type system Currying Defining types Value constructors Algebraic data

More information

Android Sdk Setup For Windows 7 32 Bit Full Version

Android Sdk Setup For Windows 7 32 Bit Full Version Android Sdk Setup For Windows 7 32 Bit Full Version Android Sdk Tools Full Installer Free Download For Windows 7,8,Xp,Vista (32 Bit/ 64 Bit) Android Sdk tools latest version full installer free download

More information

The Calculator CS571. Abstract syntax of correct button push sequences. The Button Layout. Notes 16 Denotational Semantics of a Simple Calculator

The Calculator CS571. Abstract syntax of correct button push sequences. The Button Layout. Notes 16 Denotational Semantics of a Simple Calculator CS571 Notes 16 Denotational Semantics of a Simple Calculator The Calculator Two functions: + and * Unbounded natural numbers (no negatives Conditional: if-then-else Parentheses One memory register 1of

More information

MEAP Edition Manning Early Access Program Get Programming with Java Version 1

MEAP Edition Manning Early Access Program Get Programming with Java Version 1 MEAP Edition Manning Early Access Program Get Programming with Java Version 1 Copyright 2018 Manning Publications For more information on this and other Manning titles go to www.manning.com welcome First,

More information

CHOICE BASED CREDIT SYSTEM (With effect from )

CHOICE BASED CREDIT SYSTEM (With effect from ) B.Sc. Computer Science Syllabus Under the CHOICE BASED CREDIT SYSTEM (With effect from 2017-18) DEPARTMENT OF COMPUTER SCIENCE University College,TU,Nizamabad-503322 Syllabus for Computer Science (With

More information

IQTIDAR ALI Lecturer IBMS Agriculture University Peshawar

IQTIDAR ALI Lecturer IBMS Agriculture University Peshawar IQTIDAR ALI Lecturer IBMS Agriculture University Peshawar Upon completing the course, you will understand Create, compile, and run Java programs Primitive data types Java control flow Operator Methods

More information

SELENIUM TRAINING COURSE CONTENT

SELENIUM TRAINING COURSE CONTENT SECTION 1 : INTRODUCTION SELENIUM TRAINING COURSE CONTENT What is automation testing? When Automation Testing is needed? What is the use of automation testing? Different Automation Tools available in the

More information

Lecture 4: Higher Order Functions

Lecture 4: Higher Order Functions Lecture 4: Higher Order Functions Søren Haagerup Department of Mathematics and Computer Science University of Southern Denmark, Odense September 26, 2017 HIGHER ORDER FUNCTIONS The order of a function

More information

4. Java language basics: Function. Minhaeng Lee

4. Java language basics: Function. Minhaeng Lee 4. Java language basics: Function Minhaeng Lee Review : loop Program print from 20 to 10 (reverse order) While/for Program print from 1, 3, 5, 7.. 21 (two interval) Make a condition that make true only

More information

Algebraic data types. The case against null

Algebraic data types. The case against null Algebraic data types The case against null Motivation PL history (1970's) SML, OCaml, Haskell, Scala, F#, Rust, Swift Variants Null references User-defined Types compound ("Dunedin", 120_000) : string

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

Instructions. First, download the file

Instructions. First, download the file Instructions First, download the file http://www.cs.mcgill.ca/~cs202/2012-09/web/lectures/dan/unit0/helloworld.java from the course webpage. You can view this file in a program such as notepad (windows),

More information

Type checking of statements We change the start rule from P D ; E to P D ; S and add the following rules for statements: S id := E

Type checking of statements We change the start rule from P D ; E to P D ; S and add the following rules for statements: S id := E Type checking of statements We change the start rule from P D ; E to P D ; S and add the following rules for statements: S id := E if E then S while E do S S ; S Type checking of statements The purpose

More information

ADT. Typing. Recursive Types. Java. Preliminary: syntax, operational semantics. Untyped lambda calculus. Simply typed lambda calculus

ADT. Typing. Recursive Types. Java. Preliminary: syntax, operational semantics. Untyped lambda calculus. Simply typed lambda calculus Review Preliminary: syntax, operational semantics Untyped lambda calculus Simply typed lambda calculus Simple extension: tuples, sums, lists Subtyping Typing ADT Universal type: system F Java Recursive

More information

JDB - QUICK GUIDE JDB - INTRODUCTION

JDB - QUICK GUIDE JDB - INTRODUCTION http://www.tutorialspoint.com/jdb/jdb_quick_guide.htm JDB - QUICK GUIDE Copyright tutorialspoint.com JDB - INTRODUCTION Debugging is a technical procedure to find and remove bugs or defects in a program

More information

CS 320: Concepts of Programming Languages

CS 320: Concepts of Programming Languages CS 320: Concepts of Programming Languages Wayne Snyder Computer Science Department Boston University Lecture 02: Bare Bones Haskell Syntax: Data == Abstract Syntax Trees Functions == Rewrite Rules on ASTs

More information

SELENIUM. SELENIUM COMPONENTS Selenium IDE Selenium RC Selenium Web Driver Selenium Grid

SELENIUM. SELENIUM COMPONENTS Selenium IDE Selenium RC Selenium Web Driver Selenium Grid INTRODUCTION TO AUTOMATION Testing What is automation testing? Different types of Automation Tools 1. Functional Testing Tools 2. Test Management Tools 3. Performance Testing Tools Advantages of automation

More information

CS558 Programming Languages

CS558 Programming Languages CS558 Programming Languages Winter 2017 Lecture 7b Andrew Tolmach Portland State University 1994-2017 Values and Types We divide the universe of values according to types A type is a set of values and

More information

Haskell Overview III (3A) Young Won Lim 10/4/16

Haskell Overview III (3A) Young Won Lim 10/4/16 (3A) Copyright (c) 2016 Young W. Lim. Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published

More information

IOT-TESTWARE AN ECLIPSE PROJECT

IOT-TESTWARE AN ECLIPSE PROJECT IOT-TESTWARE AN ECLIPSE PROJECT Vadim Makhorov Ina Schieferdecker, Sascha Kretzschmann, Michael Wagner, Axel Rennoch QRS, Praha, Czech Republic, July 27, 2017 THE ECLIPSE PROJECT 2 1 THE CONTEXT 3 OUTLINE

More information

Introduction to OCaml

Introduction to OCaml Introduction to OCaml Jed Liu Department of Computer Science Cornell University CS 6110 Lecture 26 January 2009 Based on CS 3110 course notes and an SML tutorial by Mike George Jed Liu Introduction to

More information

Topics Covered Thus Far. CMSC 330: Organization of Programming Languages. Language Features Covered Thus Far. Programming Languages Revisited

Topics Covered Thus Far. CMSC 330: Organization of Programming Languages. Language Features Covered Thus Far. Programming Languages Revisited CMSC 330: Organization of Programming Languages Type Systems, Names & Binding Topics Covered Thus Far Programming languages Syntax specification Regular expressions Context free grammars Implementation

More information

Logic - CM0845 Introduction to Haskell

Logic - CM0845 Introduction to Haskell Logic - CM0845 Introduction to Haskell Diego Alejandro Montoya-Zapata EAFIT University Semester 2016-1 Diego Alejandro Montoya-Zapata (EAFIT University) Logic - CM0845 Introduction to Haskell Semester

More information

Sir Muhammad Naveed. Arslan Ahmed Shaad ( ) Muhammad Bilal ( )

Sir Muhammad Naveed. Arslan Ahmed Shaad ( ) Muhammad Bilal ( ) Sir Muhammad Naveed Arslan Ahmed Shaad (1163135 ) Muhammad Bilal ( 1163122 ) www.techo786.wordpress.com CHAPTER: 2 NOTES:- VARIABLES AND OPERATORS The given Questions can also be attempted as Long Questions.

More information

9/5/17. The Design and Implementation of Programming Languages. Compilation. Interpretation. Compilation vs. Interpretation. Hybrid Implementation

9/5/17. The Design and Implementation of Programming Languages. Compilation. Interpretation. Compilation vs. Interpretation. Hybrid Implementation Language Implementation Methods The Design and Implementation of Programming Languages Compilation Interpretation Hybrid In Text: Chapter 1 2 Compilation Interpretation Translate high-level programs to

More information

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

OOPs Concepts. 1. Data Hiding 2. Encapsulation 3. Abstraction 4. Is-A Relationship 5. Method Signature 6. Polymorphism 7. Constructors 8. OOPs Concepts 1. Data Hiding 2. Encapsulation 3. Abstraction 4. Is-A Relationship 5. Method Signature 6. Polymorphism 7. Constructors 8. Type Casting Let us discuss them in detail: 1. Data Hiding: Every

More information

CS109A ML Notes for the Week of 1/16/96. Using ML. ML can be used as an interactive language. We. shall use a version running under UNIX, called

CS109A ML Notes for the Week of 1/16/96. Using ML. ML can be used as an interactive language. We. shall use a version running under UNIX, called CS109A ML Notes for the Week of 1/16/96 Using ML ML can be used as an interactive language. We shall use a version running under UNIX, called SML/NJ or \Standard ML of New Jersey." You can get SML/NJ by

More information

Observability and Controllability Issues in Conformance Testing of Web Service Compositions

Observability and Controllability Issues in Conformance Testing of Web Service Compositions Observability and Controllability Issues in Conformance Testing of Web Service Compositions Jose Pablo Escobedo 1, Christophe Gaston 2, Pascale Le Gall 3, and Ana Cavalli 1 1 TELECOM & Management SudParis

More information

G Programming Languages - Fall 2012

G Programming Languages - Fall 2012 G22.2110-003 Programming Languages - Fall 2012 Week 13 - Part 1 Thomas Wies New York University Review Last lecture Object Oriented Programming Outline Today: Scala Sources: Programming in Scala, Second

More information

Overloading, Type Classes, and Algebraic Datatypes

Overloading, Type Classes, and Algebraic Datatypes Overloading, Type Classes, and Algebraic Datatypes Delivered by Michael Pellauer Arvind Computer Science and Artificial Intelligence Laboratory M.I.T. September 28, 2006 September 28, 2006 http://www.csg.csail.mit.edu/6.827

More information

Questions? Static Semantics. Static Semantics. Static Semantics. Next week on Wednesday (5 th of October) no

Questions? Static Semantics. Static Semantics. Static Semantics. Next week on Wednesday (5 th of October) no Questions? First exercise is online: http://www.win.tue.nl/~mvdbrand/courses/glt/1112/ Deadline 17 th of October Next week on Wednesday (5 th of October) no lectures!!! Primitive types Primitive value

More information

Exercise 1 (2+2+2 points)

Exercise 1 (2+2+2 points) 1 Exercise 1 (2+2+2 points) The following data structure represents binary trees only containing values in the inner nodes: data Tree a = Leaf Node (Tree a) a (Tree a) 1 Consider the tree t of integers

More information

IBM C Rational Functional Tester for Java. Download Full Version :

IBM C Rational Functional Tester for Java. Download Full Version : IBM C2140-842 Rational Functional Tester for Java Download Full Version : http://killexams.com/pass4sure/exam-detail/c2140-842 QUESTION: 44 Which statement is true about the Time Delayed method when you

More information

Before you start with this tutorial, you need to know basic Java programming.

Before you start with this tutorial, you need to know basic Java programming. JDB Tutorial 1 About the Tutorial The Java Debugger, commonly known as jdb, is a useful tool to detect bugs in Java programs. This is a brief tutorial that provides a basic overview of how to use this

More information

Motivation was to facilitate development of systems software, especially OS development.

Motivation was to facilitate development of systems software, especially OS development. A History Lesson C Basics 1 Development of language by Dennis Ritchie at Bell Labs culminated in the C language in 1972. Motivation was to facilitate development of systems software, especially OS development.

More information

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab)

Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Computer Lab 1: Model Checking and Logic Synthesis using Spin (lab) Richard M. Murray Nok Wongpiromsarn Ufuk Topcu Calornia Institute of Technology AFRL, 25 April 2012 Outline Spin model checker: modeling

More information

Contents Coding standard Debugging tool Text editor Version control system

Contents Coding standard Debugging tool Text editor Version control system Coding in Linux Prof. Jin-Soo Kim (jinsookim@skku.edu) TAs Jong-Sung Lee (leitia07@gmail.com) Computer Systems Laboratory Sungkyunkwan University http://csl.skku.edu Contents Coding standard Debugging

More information

Advanced features of Functional Programming (Haskell)

Advanced features of Functional Programming (Haskell) Advanced features of Functional Programming (Haskell) Polymorphism and overloading January 10, 2017 Monomorphic and polymorphic types A (data) type specifies a set of values. Examples: Bool: the type of

More information

CafeOBJ. CafeOBJ. Starting CafeOBJ. Wolfgang Schreiner 1. A Quick Overview. 2.

CafeOBJ. CafeOBJ. Starting CafeOBJ. Wolfgang Schreiner 1. A Quick Overview. 2. CafeOBJ Wolfgang Schreiner Wolfgang.Schreiner@risc.uni-linz.ac.at 1. A Quick Overview Research Institute for Symbolic Computation (RISC) Johannes Kepler University, Linz, Austria http://www.risc.uni-linz.ac.at

More information

Compiler Design Overview. Compiler Design 1

Compiler Design Overview. Compiler Design 1 Compiler Design Overview Compiler Design 1 Preliminaries Required Basic knowledge of programming languages. Basic knowledge of FSA and CFG. Knowledge of a high programming language for the programming

More information

Java Programming with Eclipse

Java Programming with Eclipse One Introduction to Java 2 Usage of Java 3 Structure of Java 4 Flexibility of Java Programming 5 Using the Eclipse Software 6 Two Running Java in Eclipse 7 Introduction 8 Using Eclipse 9 Workspace Launcher

More information

Mini-ML. CS 502 Lecture 2 8/28/08

Mini-ML. CS 502 Lecture 2 8/28/08 Mini-ML CS 502 Lecture 2 8/28/08 ML This course focuses on compilation techniques for functional languages Programs expressed in Standard ML Mini-ML (the source language) is an expressive core subset of

More information

Using Eclipse for Java. Using Eclipse for Java 1 / 1

Using Eclipse for Java. Using Eclipse for Java 1 / 1 Using Eclipse for Java Using Eclipse for Java 1 / 1 Using Eclipse IDE for Java Development Download the latest version of Eclipse (Eclipse for Java Developers or the Standard version) from the website:

More information

CSE 413 Programming Languages & Implementation. Hal Perkins Autumn 2012 Grammars, Scanners & Regular Expressions

CSE 413 Programming Languages & Implementation. Hal Perkins Autumn 2012 Grammars, Scanners & Regular Expressions CSE 413 Programming Languages & Implementation Hal Perkins Autumn 2012 Grammars, Scanners & Regular Expressions 1 Agenda Overview of language recognizers Basic concepts of formal grammars Scanner Theory

More information

Exercise 2: Automata Theory

Exercise 2: Automata Theory Exercise 2: Automata Theory Formal Methods II, Fall Semester 2013 Distributed: 11.10.2013 Due Date: 25.10.2013 Send your solutions to: tobias.klauser@uzh.ch or deliver them in the class. Finite State Automata

More information

Introduction to Programming Using Java (98-388)

Introduction to Programming Using Java (98-388) Introduction to Programming Using Java (98-388) Understand Java fundamentals Describe the use of main in a Java application Signature of main, why it is static; how to consume an instance of your own class;

More information

Upcoming ACM Events Linux Crash Course Date: Time: Location: Weekly Crack the Coding Interview Date:

Upcoming ACM Events Linux Crash Course Date: Time: Location: Weekly Crack the Coding Interview Date: Upcoming ACM Events Linux Crash Course Date: Oct. 2nd and 3rd Time: 1:15 pm - 3:15 pm Location: UW1-210 (10/02) and UW1-221 (10/03) Weekly Crack the Coding Interview Date: Weekly Fridays from Oct. 5th

More information

Threads and Continuations COS 320, David Walker

Threads and Continuations COS 320, David Walker Threads and Continuations COS 320, David Walker Concurrency Concurrency primitives are an important part of modern programming languages. Concurrency primitives allow programmers to avoid having to specify

More information

C++ Important Questions with Answers

C++ Important Questions with Answers 1. Name the operators that cannot be overloaded. sizeof,.,.*,.->, ::,? 2. What is inheritance? Inheritance is property such that a parent (or super) class passes the characteristics of itself to children

More information

Lecture 3 SPIN and Promela

Lecture 3 SPIN and Promela Lecture 3 SPIN and Promela 1 What is SPIN(Simple Promela INterpreter) A tool for analyzing mels of concurrent systems Mels described in Promela Language with concurrent processes Communication via shared

More information

Before you start working with Java, you need to set up a Java development

Before you start working with Java, you need to set up a Java development Setting Up the Java Development Environment Before you start working with Java, you need to set up a Java development environment. This includes installing the Java Standard Edition (SE) Development Kit

More information

Unit- and Sequence Test Generation with HOL-TestGen

Unit- and Sequence Test Generation with HOL-TestGen Unit- and Sequence Test Generation with HOL-TestGen Tests et Methodes Formelles Prof. Burkhart Wolff Univ - Paris-Sud / LRI 16.6.2015 B.Wolff - HOL-TestGen 1 Overview HOL-TestGen and its Business-Case

More information

The University of Nottingham

The University of Nottingham The University of Nottingham SCHOOL OF COMPUTER SCIENCE A LEVEL 2 MODULE, SPRING SEMESTER 2013-2014 G54FOP FOUNDATIONS OF PROGRAMMING Time allowed 2 hours Candidates may complete the front cover of their

More information

A First Look At Java. Didactic Module 13 Programming Languages - EEL670 1

A First Look At Java. Didactic Module 13 Programming Languages - EEL670 1 A First Look At Java Didactic Module 13 Programming Languages - EEL670 1 Outline Thinking about objects Simple expressions and statements Class definitions About references and pointers Getting started

More information