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

Size: px
Start display at page:

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

Transcription

1 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

2 Model-Based Testing 2

3 Model-Based Testing MBT next step in test automation model-based test generation model + test generation + result analysis test execution system pass fail 3

4 Software & System Testing Checking or measuring some quality characteristics of an executing software object by performing experiments in a controlled way w.r.t. a specification tester specification-based, active, black-box testing of functionality specification SUT System Under Test 4

5 1 : Manual Testing 1. Manual testing SUT pass fail System Under Test 5

6 2 : Scripted Testing test cases TTCN 1. Manual testing 2. Scripted testing test execution SUT pass fail 6

7 3 : Keyword-Driven Testing high-level test notation test scripts 1. Manual testing 2. Scripted testing 3. Keyword-driven testing test execution SUT pass fail 7

8 4 : Model-Based Testing model-based TTCN Test test generation cases system model 1. Manual testing 2. Scripted testing 3. Keyword-driven testing 4. Model-based testing test execution pass fail SUT 8

9 MBT : Example Models!coffee?coin!alarm?button?button 9

10 MBT : Validation, Verification, Testing informal requirements validation informal world formal world model verification real world model-based testing SUT 10

11 MBT : Ingredients off-line MBT model-based test generation system model requirements ideas test cases TTCN test execution SUT SUT verdict test result analysis pass fail test harness 11

12 MBT : Ingredients requirements ideas on-the-fly MBT model based test generation + execution system model SUT verdict test result analysis pass fail test harness 12

13 MBT : Many Tools AETG Agatha Agedis Autolink Axini Test Manager Conformiq Cooper Cover DTM G st Gotcha Graphwalker JTorX MaTeLo MBT suite M-Frame MISTA NModel OSMO ParTeG Phact/The Kit QuickCheck Reactis Recover RT-Tester SaMsTaG Smartesting CertifyIt Spec Explorer Statemate STG Temppo TestGen (Stirling) TestGen (INT) TestComposer TestOptimal TGV Tigris TorX TorXakis T-Vec Uppaal-Cover Uppaal-Tron Tveda

14 14 Model-Based Testing with TorXakis

15 15 Yet Another MBT Tool : TorXakis JTorX TorXakis TorX

16 Testing : Trends & Challenges complexity size heterogeneous components model-driven development, continuous * Model Based Testing uncertainty quest for quality systems-of-systems 16

17 MBT : Next Generation Challenges state + complex data heterogeneous components model composition model-driven test development, criteria continuous * selection abstraction complexity size Model Based Testing concurrency parallelism quest for quality usage profiles for testing scalability link to MBSD systems-of-systems multiple paradigms integration uncertainty uncertainty nondeterminism 17

18 MBT : Next Generation Challenges abstraction concurrency parallelism state + complex data model composition State of the Art MBT Tools usage profiles for testing scalability test selection criteria link to MBSD multiple paradigms integration uncertainty nondeterminism 18

19 Next Generation MBT : TorXakis abstraction concurrency parallelism state + complex data usage profiles for testing model composition TorXakis model system under test scalability test selection criteria link to MBSD multiple paradigms integration uncertainty nondeterminism 19

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

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

22 TorXakis : A Black-Box View on Systems model a?n black-box system view x!n+1 a y!`yes` a?n b?m y b SUT x a?k x!42 y!`no` modelled as state-transition system 22

23 23 TorXakis : Definition of SUT In SUT Out SUT real, black-box system communicating with its environment via messages on input- and output channels SUTDEF Sut ::= SUT IN In :: String SUT OUT Out :: String SOCK IN In HOST "localhost" PORT 7890 SOCK OUT Out HOST "localhost" PORT 7890 ENDDEF

24 24 TorXakis : Definition of Model MODEL Stimulus Response labelled transition system with actions on input- and output channels SPECDEF Spec ::= CHAN IN CHAN OUT BEHAVIOUR ENDDEF Stim Resp Stim >-> Resp

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

26 Adapter: Connecting TorXakis and SUT model ADAPTER connecting real SUT with formal model TorXakis adapter SUT pass fail 26

27 TorXakis : Definition of Adapter ADAPTER model connecting real SUT Stim TorXakis with formal model Resp adapter SUT In SUT Out ADAPDEF Adap ::= CHAN IN Stim SUT IN In :: String CHAN OUT Resp SUT OUT Out :: String MAP IN Stim -> In! stim MAP OUT Out? s -> Resp ENDDEF 27

28 28 TorXakis 1. My First TorXakis Model SUT Model Adapter...\examps.testnet\StimulusResponse\model\SRfinite.txs

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

30 30 Running TorXakis and SUT SPECDEF Spec ::= CHAN IN Stim CHAN OUT Resp ENDDEF BEHAVIOUR Stimulus >-> Response ADAPDEF Adap ::= CHAN IN Stim SUT IN In :: String CHAN OUT Resp SUT OUT Out :: String ENDDEF model MAP IN Stimu -> In! " MAP OUT Out? s -> Response SUTDEF Sut ::= SUT IN In :: String SUT OUT Out :: String model.txs TorXakis ENDDEF SOCK IN In HOST "localhost" PORT 7890 SOCK OUT Out HOST "localhost" PORT 7890 client server adapter adapter socket host portnumber SUT

31 TorXakis : Running a Test (Windows) 1. Start two Command Prompt windows, one for TorXakis, one for the SUT 2. There are two versions of SUTs: pre-compiled executables and Java sources 3. For pre-compiled, go to...\examps.testnet\stimulusresponse\winexe and run the SUT: C:> SRfinite.exe <port nr> 4. For Java JDK required* - go to:...\examps.testnet\stimulusresponse\java and compile and run the SUT C:> javac SRfinite.java C:> java SRfinite 5. In the TorXakis window, go to...\examps.testnet\stimulusresponse\model 6. Start TorXakis with the model file: C:> torxakis.exe SRfinite.txs 7. Try some TorXakis commands: TXS >> help *

32 32 Running TorXakis and SUT $ torxakis.exe StimulusResponse.txs TXS >> TorXakis :: Model-Based Testing TXS >> TorXakis :: Input File parsed... TXS >> TorXakis :: SMT Solver (Z3) initialized... TXS >> TorXakis :: Internal Environment initialized... TXS >> help

33 33 Running TorXakis and SUT TXS >> spec Spec TXS >> adap Adap TXS >> sut Sut TXS >> test 4 1 >> Input: ActIn { { ( Stimulus, [] ) } } 2 >> Output: ActOut { { ( Response, [] ) } } 3 >> Output: Delta 4 >> Output: Delta PASS TXS >>

34 34 TXS >>> help quit, q exit, x help, h,? : stop TorXakis completely : exit command run : show help spec <spec-name> adap <adap-name> sut <sut-name> : (re)set the state : (re)set the adapter : (re)set the sut

35 35 TXS >>> help const <const-def> func <func-def> var <var-decl> val <value-def> eval <value-expr> : define a constant : define a function : declare variables : define values : evaluate value-expression satsolve <value-expr> : solve value expression (open, boolean) ransolve <value-expr> : solve randomly unisolve <value-expr> : solve uniquely

36 36 TXS >>> help state btree [<state>] goto [<state>] back [<n>] init path trace : show current state number : show internal state : goto <state> number : go back <n>/[one] steps : go to initial state : path from initial state : show action trace from the initial state

37 37 TXS >>> help menu [<state>] : give possible actions step [<n>] step <action> test <action> test test <n> : make <n>/[one] random steps : make a step <action> : make test step identified by (visible) input <action> : make a test step by observing output : make <n> random test steps

38 38 TXS >>> help sutin <action> sutout adapin <action> : send input <action> to sut : receive output from sut : send input <action> through adapter to sut adapout : receive output action from sut <command> '$<' <file> : read command arg from <file> <command> args '$>' <file> : write output of <command> to <file> run <file> : run script from <file>

39 39 TorXakis: Exercise Test SUT = SRfinite.java/.exe Use Client.exe and Server.exe in...\utils to test manually via socket (with Client.exe) or simulate a SUT (Server.exe) [or use telnet or nc] against MODEL = SRfinite.txs Test SUT = SRnone.java/.exe against MODEL = SRfinite.txs Adapt SRfinite.txs such that there are two Stimuli and two Responses; test with SUT = SRfinite.java/.exe Stim Resp Stim Resp

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

41 41 Input for TorXakis TorXakis input = model = list of definitions behaviour / labelled transition system PROCESS PROCDEF test architecture data SPECIFICATION SPECDEF TYPE TYPEDEF ADAPTER ADAPDEF FUNCTION FUNCDEF SUT SUTDEF CONSTANT CONSTDEF

42 42 TorXakis: Process Definition Stim Resp SPECDEF Spec ::= CHAN IN Stim CHAN OUT Resp BEHAVIOUR Stim >-> Resp ENDDEF

43 43 TorXakis: Process Definition Stim PROCDEF stimresp [ Stim, Resp ] ( ) ::= Stimulus >-> Response ENDDEF Resp SPECDEF Spec ::= CHAN IN CHAN OUT BEHAVIOUR Stim Resp stimresp [ Stim, Resp ] ( ) ENDDEF

44 44 TorXakis: Process Definition Stim Resp {- Cyclic Stimulus-Response -} PROCDEF stimurespo [ Stim, Resp ] ( ) ::= Stim >-> Resp >-> stimurespo [ Stim, Resp ] ( ) ENDDEF SPECDEF Spec ::= CHAN IN Stim CHAN OUT Resp BEHAVIOUR stimurespo [ Stim, Resp ] ( ) ENDDEF

45 45 TorXakis: Exercise Try to a model for the looping 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.

46 46 TorXakis: Exercise Result Stim Resp implements Stim Resp Stim Resp implements Stim Resp

47 47 Input for TorXakis TorXakis input = model = list of definitions behaviour / labelled transition system PROCESS PROCDEF test architecture data SPECIFICATION SPECDEF TYPE TYPEDEF ADAPTER ADAPDEF FUNCTION FUNCDEF SUT SUTDEF CONSTANT CONSTDEF

48 48 TorXakis : Defining Behaviour basic behaviour = transition system complex behaviour = combining transition systems a named behaviour definition named behaviour use y x a b sequence choice parallel communication a x y exception interrupt hiding

49 49 Basis : Labelled Transition Systems - LTS a a a a b b c b c a b a b a c a b b c a d c b d a a d b

50 50 Representation of LTS S S0 10c S1 Explicit : { S0, S1, S2, S3 }, {10c,coffee,tea}, { (S0,10c,S1), ( S1, coffee, S2 ), (S1,tea,S3) }, S0 coffee tea Transition tree / graph S2 S3 Language : S ::= 10c >-> ( coffee ## tea )

51 51 Representation of LTS a >-> b ## a >-> c a a a b c b c a c a >-> ( b ## c ) b c a d c b d a a >-> b c >-> d d b

52 52 Representation of LTS 0 a 1 b 2 a >-> b 0 c 1 d 2 c >-> d 0,0 a c b 1,0 0,1 c a d 2,0 1,1 0,2 c b d a 2,1 1,2 d b 2,2 a >-> b c >-> d

53 53 Representation of LTS Q where Q ::= a >-> ( b Q ) a a b b a P where P ::= a >-> P a a b b

54 54 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

55 55 TorXakis: Parallel Interleaving Stim1 Resp1 Stim2 Resp2 Stim1 Stim2 Resp1 Resp2 -- Parallelism with interleaving: Stim2 Resp2 Resp1 Stim1 StimResp1 StimResp2

56 56 TorXakis: Parallel Communication [ M ] Stim1 M Resp M Resp2 Stim1 Resp2 M -- Parallelism with communication: StimResp1 [ M ] StimResp2 Resp2 Stim1

57 57 TorXakis: Communication + Hiding Stim1 [ M ] Stim1 M Resp M Resp2 Resp2 Stim1 Resp2 Resp2 Stim1 -- Communication + Hiding: HIDE [ M ] IN StimResp1 [ M ] StimResp2 NI

58 58 TorXakis: Exercise Experiment with, using testing or stepping, with SRfinite.txs, SRlnone.txs, SRloop,txs, SRnone, SRparallel.txs 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.

59 59 Input for TorXakis TorXakis input = model = list of definitions behaviour / labelled transition system PROCESS PROCDEF test architecture data SPECIFICATION SPECDEF TYPE TYPEDEF ADAPTER ADAPDEF FUNCTION FUNCDEF SUT SUTDEF CONSTANT CONSTDEF

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

61 61 TorXakis: Functions TYPEDEF Colour ::= Red Yellow Blue Functions: name, parameters, type, (recursive) value expression Overloading Standard functions for: Int, Bool, String TYPEDEF IntList ::= Nil Cons { hd :: Int, tl :: IntList } FUNCDEF add ( x, y :: Int ) :: Int ::= x + y FUNCDEF add ( x :: Int; lst :: IntList ) :: IntList ::= IF isnil ( lst ) THEN Cons ( x, Nil ) ELSE Cons ( hd ( lst ), add ( x, tl ( lst ) ) ) FI

62 62 TorXakis: Adder Plus? x? y Minus? x? y SUT Result! x + y Result! x - y Use of Data in processes

63 63 TorXakis: Exercise Test with the Adder model in SRadder.txs and corresponding SUTs. Make a mutant of SRadder.java. Investigate the possibilities with Strings and Regular Expressions using the model SRrr.txs and corresponding SUTs.

64 A More Elaborate Example: The Dispatcher-Processing System input jobs..\examps.testnet\dispatchprocs dispatcher processor processor processor processor processed jobs 64

65 65 Example: Dispatcher-Processing System Start job processor Idle processor Start Finish Finish job DisPro01-proc.txs state transition system Processing

66 66 Example: Two Parallel Processors Start Start Start Finish Start Finish Finish Finish

67 67 Example: Two Parallel Processors processor 1 processor 2 S1 0,0 S2 0 S1 1 F1 2 parallelism 0 S2 1 F2 2 1,0 0,1 F1 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

68 68 Example: Four Parallel Processors Start Start Start Start Start Finish Start Finish Start Finish Start Finish Finish Finish Finish Finish DisPro03-procs.txs

69 69 Example: Four Parallel Processors parallelism

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

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

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

73 Example: Dispatcher Processing System 73

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

75 75 Example: Dispatcher-Processing System uncertainty non-determinism Inputs: Job1, Job2, Job3: Job1 F1 J2 J2 F1 J3 F2 F2 J3 F1 F2 Finish3 J3 F2 F3 F2 F3 F1 F3 F1 F2 F3 F3 F2 F3 F2 F3 F1 F2 F1

76 76 TorXakis: Exercise Use TXS >> step to step through model DisPro04-hide.txs and check possible execution sequences. Investigate, using stepping, the use of Data and Type Definitions in DisPro05-adder.txs : for modelling an Adder DisPro06-constr.txs : for modelling input constraints and a non-deterministic result DisPro-07-nprocs.txs : for modelling an arbitrary number of processors Test with model TXDisPro08-gcd.txs and SUT SutGcd.java. Repeat with model TXDisPro09-purp.txs. Explain the difference.

77 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]+') ) /\

78 78 TorXakis: Exercise Test with model TXDisPro10-jobdata.txs and SUT SutJobData.java. Repeat with SUT model SutWithError.java. What is the Error?

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

80 80 TorXakis: Exercise Go to...\examps.testnet\readwriteconflict. Consider the model ReadWrite.txs. This model has finite behaviour, i.e., it stops after 7 steps (deadlocks). From he model, argue what the last action is. Check your argumentation by stepping through the model.

81 81 A Goat, a Wolf, Cabbage, and a Cat..\examps.testnet\RiverCrossing Model-Based Testing of a Little Game Input via standard IO Inputs: g? w? c? n? Outputs: eaten! retry! done!

82 82 A Goat, a Wolf, Cabbage, and a Cat model TorXakis adapter SUT

83 A Goat, a Wolf, Cabbage, and a Cat model TorXakis channels In socket g? w? c? n? std IO g? w? c? n? TorXakis adapter external adapter Out eaten! retry! done! eaten! retry! done! 83

84 84 TorXakis: Exercise Go to...\examps.testnet\rivercrossing. Consider the model RiverState.txs (visualization in RiverState.pdf) The SUT is sut.bat or sut.sh. Does the behaviour of SUT correspond to the model? Explain...

85 85 Next Generation MBT : TorXakis Status abstraction model composition uncertainty nondeterminism state + complex data concurrency parallelism scalability link to MBSD usage profiles multiple paradigm integration test selection criteria

86 86 TorXakis Questions? model-based test generation model test execution system pass fail

87 87

Model-Based Testing. Using TorXakis

Model-Based Testing. Using TorXakis 1 Model-Based Testing Using TorXakis 2 TorXakis : Installation 1. Installation: https://github.com/torxakis/torxakis/ 2. Windows : Get and install TorXakis.msi Also Linux and Mac-OS 3. Windows installation

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

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

Formal Specification and Verification

Formal Specification and Verification Formal Specification and Verification Introduction to Promela Bernhard Beckert Based on a lecture by Wolfgang Ahrendt and Reiner Hähnle at Chalmers University, Göteborg Formal Specification and Verification:

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt 03 September 2015 SEFM: Promela /GU 150903 1 / 36 Towards Model Checking System Model Promela Program byte n = 0; active

More information

Software Engineering using Formal Methods

Software Engineering using Formal Methods Software Engineering using Formal Methods Introduction to Promela Wolfgang Ahrendt & Richard Bubel & Reiner Hähnle & Wojciech Mostowski 31 August 2011 SEFM: Promela /GU 110831 1 / 35 Towards Model Checking

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

GNU ccscript Scripting Guide IV

GNU ccscript Scripting Guide IV GNU ccscript Scripting Guide IV David Sugar GNU Telephony 2008-08-20 (The text was slightly edited in 2017.) Contents 1 Introduction 1 2 Script file layout 2 3 Statements and syntax 4 4 Loops and conditionals

More information

CS477 Formal Software Development Methods / 39

CS477 Formal Software Development Methods / 39 CS477 Formal Software Development Methods 2112 SC, UIUC egunter@illinois.edu http://courses.engr.illinois.edu/cs477 SPIN Beginners Tutorial April 11, 2018 Hello World /* A "Hello World" Promela model for

More information

Test Execution Engine

Test Execution Engine Test Execution Engine Overview September 2003 IBM Labs in Haifa Outline Data Exchange Format Abstract Test Suite Trace Test Execution Directives SPIDER Test Execution Engine 2 Spider Test Execution Engine

More information

Programming Languages

Programming Languages CSE 130 : Winter 2009 Programming Languages News PA 2 out, and due Mon 1/26 5pm Lecture 5: Functions and Datatypes t UC San Diego Recap: Environments Phone book Variables = names Values = phone number

More information

CPL 2016, week 10. Clojure functional core. Oleg Batrashev. April 11, Institute of Computer Science, Tartu, Estonia

CPL 2016, week 10. Clojure functional core. Oleg Batrashev. April 11, Institute of Computer Science, Tartu, Estonia CPL 2016, week 10 Clojure functional core Oleg Batrashev Institute of Computer Science, Tartu, Estonia April 11, 2016 Overview Today Clojure language core Next weeks Immutable data structures Clojure simple

More information

Programming Languages

Programming Languages CSE 130 : Winter 2013 Programming Languages Lecture 3: Crash Course, Datatypes Ranjit Jhala UC San Diego 1 Story So Far... Simple Expressions Branches Let-Bindings... Today: Finish Crash Course Datatypes

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

Recap: Functions as first-class values

Recap: Functions as first-class values Recap: Functions as first-class values Arguments, return values, bindings What are the benefits? Parameterized, similar functions (e.g. Testers) Creating, (Returning) Functions Iterator, Accumul, Reuse

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 California Institute of Technology EECI 19 Mar 2013 Outline Spin model checker: modeling

More information

Synchronous Specification

Synchronous Specification Translation Validation for Synchronous Specification in the Signal Compiler Van-Chan Ngo Jean-Pierre Talpin Thierry Gautier INRIA Rennes, France FORTE 2015 Construct a modular translation validationbased

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Bernhard Beckert Mattias Ulbrich SS 2017 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State of Baden-Württemberg

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

Transforming Source Code into Symbolic Transition Systems for Practical Model-Based Testing

Transforming Source Code into Symbolic Transition Systems for Practical Model-Based Testing Transforming Source Code into Symbolic Transition Systems for Practical Model-Based Testing Stan Janssen stanjanssen@outlook.com August, 2017, 35 pages UvA supervisor: Clemens Grelck c.grelck@uva.nl Host

More information

News. Programming Languages. Recap. Recap: Environments. Functions. of functions: Closures. CSE 130 : Fall Lecture 5: Functions and Datatypes

News. Programming Languages. Recap. Recap: Environments. Functions. of functions: Closures. CSE 130 : Fall Lecture 5: Functions and Datatypes CSE 130 : Fall 2007 Programming Languages News PA deadlines shifted PA #2 now due 10/24 (next Wed) Lecture 5: Functions and Datatypes Ranjit Jhala UC San Diego Recap: Environments Phone book Variables

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2012 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Programming Languages

Programming Languages CSE 130 : Spring 2011 Programming Languages Lecture 3: Crash Course Ctd, Expressions and Types Ranjit Jhala UC San Diego A shorthand for function binding # let neg = fun f -> fun x -> not (f x); # let

More information

Computer Aided Verification 2015 The SPIN model checker

Computer Aided Verification 2015 The SPIN model checker Computer Aided Verification 2015 The SPIN model checker Grigory Fedyukovich Universita della Svizzera Italiana March 11, 2015 Material borrowed from Roberto Bruttomesso Outline 1 Introduction 2 PROcess

More information

Applications of Formal Verification

Applications of Formal Verification Applications of Formal Verification Model Checking: Introduction to PROMELA Prof. Dr. Bernhard Beckert Dr. Vladimir Klebanov SS 2010 KIT INSTITUT FÜR THEORETISCHE INFORMATIK KIT University of the State

More information

Recap. Recap. If-then-else expressions. If-then-else expressions. If-then-else expressions. If-then-else expressions

Recap. Recap. If-then-else expressions. If-then-else expressions. If-then-else expressions. If-then-else expressions Recap Epressions (Synta) Compile-time Static Eec-time Dynamic Types (Semantics) Recap Integers: +,-,* floats: +,-,* Booleans: =,

More information

Model Driven Testing Overview

Model Driven Testing Overview Software and Verification Technologies Model Driven ing Overview July 2003 www.agedis.de w3.haifa.il.ibm.com\softwaretesting\gtcb IBM Internal Use Only IBM Labs in Haifa Outline Motivation Process Technology

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

Model checking Timber program. Paweł Pietrzak

Model checking Timber program. Paweł Pietrzak Model checking Timber program Paweł Pietrzak 1 Outline Background on model checking (spam?) The SPIN model checker An exercise in SPIN - model checking Timber Deriving finite models from Timber programs

More information

OCaml. ML Flow. Complex types: Lists. Complex types: Lists. The PL for the discerning hacker. All elements must have same type.

OCaml. ML Flow. Complex types: Lists. Complex types: Lists. The PL for the discerning hacker. All elements must have same type. OCaml The PL for the discerning hacker. ML Flow Expressions (Syntax) Compile-time Static 1. Enter expression 2. ML infers a type Exec-time Dynamic Types 3. ML crunches expression down to a value 4. Value

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

PRISM An overview. automatic verification of systems with stochastic behaviour e.g. due to unreliability, uncertainty, randomisation,

PRISM An overview. automatic verification of systems with stochastic behaviour e.g. due to unreliability, uncertainty, randomisation, PRISM An overview PRISM is a probabilistic model checker automatic verification of systems with stochastic behaviour e.g. due to unreliability, uncertainty, randomisation, Construction/analysis of probabilistic

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

Towards Compositional Testing of Real-Time Systems

Towards Compositional Testing of Real-Time Systems Towards Compositional Testing of Real-Time Systems Kim G Larsen, Axel Legay, Marius Mikucionis, Brian Nielsen, Ulrik Nyman Aalborg University, DENMARK Compositional Testing Integration of fully conformant

More information

CSE 130 Programming Languages. Lecture 3: Datatypes. Ranjit Jhala UC San Diego

CSE 130 Programming Languages. Lecture 3: Datatypes. Ranjit Jhala UC San Diego CSE 130 Programming Languages Lecture 3: Datatypes Ranjit Jhala UC San Diego News? PA #2 (coming tonight) Ocaml-top issues? Pleas post questions to Piazza Recap: ML s Holy Trinity Expressions (Syntax)

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

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

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen

COP4020 Programming Languages. Functional Programming Prof. Robert van Engelen COP4020 Programming Languages Functional Programming Prof. Robert van Engelen Overview What is functional programming? Historical origins of functional programming Functional programming today Concepts

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

Recap: ML s Holy Trinity. Story So Far... CSE 130 Programming Languages. Datatypes. A function is a value! Next: functions, but remember.

Recap: ML s Holy Trinity. Story So Far... CSE 130 Programming Languages. Datatypes. A function is a value! Next: functions, but remember. CSE 130 Programming Languages Recap: ML s Holy Trinity Expressions (Syntax) Exec-time Dynamic Values (Semantics) Datatypes Compile-time Static Types Ranjit Jhala UC San Diego 1. Programmer enters expression

More information

Lecture 2: Modeling Introduction

Lecture 2: Modeling Introduction Concurrent Programming 19530-V (WS01) Lecture 2: Modeling Introduction Dr. Richard S. Hall rickhall@inf.fu-berlin.de Concurrent programming October 23, 2001 Our Approach to Concurrency Start with concurrency

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

Programming Languages

Programming Languages CSE 130: Spring 2010 Programming Languages Lecture 3: Epressions and Types Ranjit Jhala UC San Diego A Problem fun -> +1 Can functions only have a single parameter? A Solution: Simultaneous Binding Parameter

More information

CSE 130 Programming Languages. Datatypes. Ranjit Jhala UC San Diego

CSE 130 Programming Languages. Datatypes. Ranjit Jhala UC San Diego CSE 130 Programming Languages Datatypes Ranjit Jhala UC San Diego Recap: ML s Holy Trinity Expressions (Syntax) Exec-time Dynamic Values (Semantics) Compile-time Static Types 1. Programmer enters expression

More information

Names, Scope, and Bindings

Names, Scope, and Bindings Names, Scope, and Bindings COMS W4115 Prof. Stephen A. Edwards Fall 2007 Columbia University Department of Computer Science What s In a Name? Name: way to refer to something else variables, functions,

More information

Is Javacardsign correct and secure? Bachelor Thesis

Is Javacardsign correct and secure? Bachelor Thesis Is Javacardsign correct and secure? Bachelor Thesis Robert Kleinpenning rkleinpe@science.ru.nl July 14, 2012 Supervisors: dr.ir. E. Poll E.Poll@cs.ru.nl dr. W.I. Mostowski E.Poll@cs.ru.nl Abstract Javacardsign

More information

Recap: ML s Holy Trinity

Recap: ML s Holy Trinity Recap: ML s Holy Trinity Expressions (Syntax) Exec-time Dynamic Values (Semantics) Compile-time Static Types 1. Programmer enters expression 2. ML checks if expression is well-typed Using a precise set

More information

Ch 9: Control flow. Sequencers. Jumps. Jumps

Ch 9: Control flow. Sequencers. Jumps. Jumps Ch 9: Control flow Sequencers We will study a number of alternatives traditional sequencers: sequential conditional iterative jumps, low-level sequencers to transfer control escapes, sequencers to transfer

More information

A Systematic Review of Model Based Testing Tool Support

A Systematic Review of Model Based Testing Tool Support A Systematic Review of Model Based Testing Tool Support Muhammad Shafique, Yvan Labiche Software Quality Engineering Laboratory, Department of Systems and Computer Engineering, Carleton University, 1125

More information

Implementing a VSOP Compiler. March 20, 2018

Implementing a VSOP Compiler. March 20, 2018 Implementing a VSOP Compiler Cyril SOLDANI, Pr. Pierre GEURTS March 20, 2018 Part III Semantic Analysis 1 Introduction In this assignment, you will do the semantic analysis of VSOP programs, according

More information

Introduction to Functional Programming in Racket. CS 550 Programming Languages Jeremy Johnson

Introduction to Functional Programming in Racket. CS 550 Programming Languages Jeremy Johnson Introduction to Functional Programming in Racket CS 550 Programming Languages Jeremy Johnson 1 Objective To introduce functional programming in racket Programs are functions and their semantics involve

More information

Implementing a VSOP Compiler. March 12, 2018

Implementing a VSOP Compiler. March 12, 2018 Implementing a VSOP Compiler Cyril SOLDANI, Pr. Pierre GEURTS March 12, 2018 Part II Syntax Analysis 1 Introduction In this assignment, you will implement a parser for the VSOP language, according to the

More information

What is SPIN(Simple Promela Interpreter) Material About SPIN. Elements of Promela. Basic Variables and Types. Typical Structure of Promela Model

What is SPIN(Simple Promela Interpreter) Material About SPIN. Elements of Promela. Basic Variables and Types. Typical Structure of Promela Model What is SPIN(Simple Promela Interpreter) Lecture 3 SPIN and Promela A tool for analyzing mels of reactive systems Mels described in Promela Language with concurrent processes, Communication via channels,

More information

Begin at the beginning

Begin at the beginning Begin at the beginning Expressions (Syntax) Exec-time Dynamic Values (Semantics) Compile-time Static Types 1. Programmer enters expression 2. ML checks if expression is well-typed Using a precise set of

More information

Programming Languages. Next: Building datatypes. Suppose I wanted. Next: Building datatypes 10/4/2017. Review so far. Datatypes.

Programming Languages. Next: Building datatypes. Suppose I wanted. Next: Building datatypes 10/4/2017. Review so far. Datatypes. Review so far Programming Languages Expressions Values Datatypes Types Many kinds of expressions: 1. Simple 2. Variables 3. Functions Review so far We ve seen some base types and values: Integers, Floats,

More information

Principles of Programming Languages 2017W, Functional Programming

Principles of Programming Languages 2017W, Functional Programming Principles of Programming Languages 2017W, Functional Programming Assignment 3: Lisp Machine (16 points) Lisp is a language based on the lambda calculus with strict execution semantics and dynamic typing.

More information

COMP 202 Java in one week

COMP 202 Java in one week COMP 202 Java in one week... Continued CONTENTS: Return to material from previous lecture At-home programming exercises Please Do Ask Questions It's perfectly normal not to understand everything Most of

More information

Names, Scope, and Bindings

Names, Scope, and Bindings Names, Scope, and Bindings COMS W4115 Prof. Stephen A. Edwards Spring 2007 Columbia University Department of Computer Science What s In a Name? Name: way to refer to something else variables, functions,

More information

V&V: Model-based testing

V&V: Model-based testing V&V: Model-based testing Systems Engineering BSc Course Budapest University of Technology and Economics Department of Measurement and Information Systems Traceability Platform-based systems design Verification

More information

UPPAAL. Verification Engine, Options & Patterns. Alexandre David

UPPAAL. Verification Engine, Options & Patterns. Alexandre David UPPAAL Verification Engine, Options & Patterns Alexandre David 1.2.05 Outline UPPAAL Modelling Language Specification Language UPPAAL Verification Engine Symbolic exploration algorithm Zones & DBMs Verification

More information

Programming Languages. Datatypes

Programming Languages. Datatypes Programming Languages Datatypes Review so far Expressions Values Types Many kinds of expressions: 1. Simple 2. Variables 3. Functions Review so far We ve seen some base types and values: Integers, Floats,

More information

The PCAT Programming Language Reference Manual

The PCAT Programming Language Reference Manual The PCAT Programming Language Reference Manual Andrew Tolmach and Jingke Li Dept. of Computer Science Portland State University September 27, 1995 (revised October 15, 2002) 1 Introduction The PCAT language

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

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

The syntax of the OUN language

The syntax of the OUN language The syntax of the OUN language Olaf Owe Department of Informatics, University of Oslo, Norway February 21, 2002 Contents 1 The OUN language 1 1.1 Interface and contract definition.................. 2 1.2

More information

Introduction to Model Checking

Introduction to Model Checking Introduction to Model Checking René Thiemann Institute of Computer Science University of Innsbruck WS 2007/2008 RT (ICS @ UIBK) week 4 1/23 Outline Promela - Syntax and Intuitive Meaning Promela - Formal

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

Shared Objects & Mutual Exclusion

Shared Objects & Mutual Exclusion Feb. 08, 2012 Concurrent Execution Concepts Process interference Mutual exclusion Models Model checking for interference Modeling mutual exclusion Practice Multithreaded Java programs Thread interference

More information

want turn==me wait req2==0

want turn==me wait req2==0 Uppaal2k: Small Tutorial Λ 16 October 2002 1 Introduction This document is intended to be used by new comers to Uppaal and verification. Students or engineers with little background in formal methods should

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

Object Orientated Analysis and Design. Benjamin Kenwright

Object Orientated Analysis and Design. Benjamin Kenwright Notation Part 2 Object Orientated Analysis and Design Benjamin Kenwright Outline Review What do we mean by Notation and UML? Types of UML View Continue UML Diagram Types Conclusion and Discussion Summary

More information

1 Lexical Considerations

1 Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Spring 2013 Handout Decaf Language Thursday, Feb 7 The project for the course is to write a compiler

More information

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value

Paytm Programming Sample paper: 1) A copy constructor is called. a. when an object is returned by value Paytm Programming Sample paper: 1) A copy constructor is called a. when an object is returned by value b. when an object is passed by value as an argument c. when compiler generates a temporary object

More information

Design and Analysis of Distributed Interacting Systems

Design and Analysis of Distributed Interacting Systems Design and Analysis of Distributed Interacting Systems Lecture 5 Linear Temporal Logic (cont.) Prof. Dr. Joel Greenyer May 2, 2013 (Last Time:) LTL Semantics (Informally) LTL Formulae are interpreted on

More information

Mid-Term 2 Grades

Mid-Term 2 Grades Mid-Term 2 Grades 100 46 1 HW 9 Homework 9, in untyped class interpreter: Add instanceof Restrict field access to local class Implement overloading (based on argument count) Due date is the same as for

More information

DIVERSITY TG Automatic Test Case Generation from Matlab/Simulink models. Diane Bahrami, Alain Faivre, Arnault Lapitre

DIVERSITY TG Automatic Test Case Generation from Matlab/Simulink models. Diane Bahrami, Alain Faivre, Arnault Lapitre DIVERSITY TG Automatic Test Case Generation from Matlab/Simulink models Diane Bahrami, Alain Faivre, Arnault Lapitre CEA, LIST, Laboratory of Model Driven Engineering for Embedded Systems (LISE), Point

More information

Chapter 4 Defining Classes I

Chapter 4 Defining Classes I Chapter 4 Defining Classes I This chapter introduces the idea that students can create their own classes and therefore their own objects. Introduced is the idea of methods and instance variables as the

More information

Quasimodo. under uncertainty. Alexandre David & K.G Larsen & Aalborg University, DK.

Quasimodo. under uncertainty. Alexandre David & K.G Larsen & Aalborg University, DK. Quasimodo Testing real-time systems under uncertainty Alexandre David & K.G Larsen & & Shuhaoh Li & Bi Brian Nielsen Aalborg University, DK bnielsen@cs.aau.dk FMCO, Graz, December 1, 2010 Page 1 Automated

More information

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17

CONTENTS. PART 1 Structured Programming 1. 1 Getting started 3. 2 Basic programming elements 17 List of Programs xxv List of Figures xxix List of Tables xxxiii Preface to second version xxxv PART 1 Structured Programming 1 1 Getting started 3 1.1 Programming 3 1.2 Editing source code 5 Source code

More information

[CHAPTER] 1 INTRODUCTION 1

[CHAPTER] 1 INTRODUCTION 1 FM_TOC C7817 47493 1/28/11 9:29 AM Page iii Table of Contents [CHAPTER] 1 INTRODUCTION 1 1.1 Two Fundamental Ideas of Computer Science: Algorithms and Information Processing...2 1.1.1 Algorithms...2 1.1.2

More information

Meta-Programming with Modelica. Model Transformations

Meta-Programming with Modelica. Model Transformations Meta-Programming with Modelica for Meta-Modeling Modeling and Model Transformations, Adrian Pop OpenModelica Course, 2007 02 05 1 Extensibility and Modularity of Modeling Tools Modeling and simulation

More information

Automated Test Design with TTCN-3

Automated Test Design with TTCN-3 Automated Test Design with TTCN-3 TTCN-3 User Conference Beijing, June 8th 2010 Conformiq Tutorial Copyright Conformiq Inc. and its subsidiaries. All rights reserved. Tuesday, May 11, 2010 1 Conformiq,

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

Automated model-based test generation and execution

Automated model-based test generation and execution Automated model-based test generation and execution December 2002 Alan Hartman Agenda Project Overview Motivation Methodology Tools Experiments Current Status Project Overview Automated model-based test

More information

Pierce Ch. 3, 8, 11, 15. Type Systems

Pierce Ch. 3, 8, 11, 15. Type Systems Pierce Ch. 3, 8, 11, 15 Type Systems Goals Define the simple language of expressions A small subset of Lisp, with minor modifications Define the type system of this language Mathematical definition using

More information

7. Introduction to Denotational Semantics. Oscar Nierstrasz

7. Introduction to Denotational Semantics. Oscar Nierstrasz 7. Introduction to Denotational Semantics Oscar Nierstrasz Roadmap > Syntax and Semantics > Semantics of Expressions > Semantics of Assignment > Other Issues References > D. A. Schmidt, Denotational Semantics,

More information

The SPL Programming Language Reference Manual

The SPL Programming Language Reference Manual The SPL Programming Language Reference Manual Leonidas Fegaras University of Texas at Arlington Arlington, TX 76019 fegaras@cse.uta.edu February 27, 2018 1 Introduction The SPL language is a Small Programming

More information

Programming Languages

Programming Languages What about more complex data? CSE 130 : Fall 2012 Programming Languages Expressions Values Lecture 3: Datatypes Ranjit Jhala UC San Diego Types Many kinds of expressions: 1. Simple 2. Variables 3. Functions

More information

What is SPIN(Simple Promela Interpreter) Elements of Promela. Material About SPIN. Basic Variables and Types. Typical Structure of Promela Model

What is SPIN(Simple Promela Interpreter) Elements of Promela. Material About SPIN. Basic Variables and Types. Typical Structure of Promela Model What is SPIN(Simple Promela Interpreter) Lecture XX SPIN and Promela A tool for analyzing mels of reactive systems Mels described in Promela Language with concurrent processes, Communication via channels,

More information

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271

4/6/2011. Model Checking. Encoding test specifications. Model Checking. Encoding test specifications. Model Checking CS 4271 Mel Checking LTL Property System Mel Mel Checking CS 4271 Mel Checking OR Abhik Roychoudhury http://www.comp.nus.edu.sg/~abhik Yes No, with Counter-example trace 2 Recap: Mel Checking for mel-based testing

More information

Example: Haskell algebraic data types (1)

Example: Haskell algebraic data types (1) Example: Haskell algebraic data types (1) Type declaration: data Number = Exact Int Inexact Float Set of values: Each Number value consists of a tag, together with either an Integer variant (if the tag

More information

Test Case Extraction and Test Data Generation from Design Models

Test Case Extraction and Test Data Generation from Design Models Session J-17 Test Case Extraction and Test Data Generation from Design Models Xiaojing ZHANG, Takashi HOSHINO NTT Cyber Space Laboratories Tokyo, JAPAN 2011.10.31 -- 2011.11.4 5WCSQ 1 Agenda Background

More information

Composability Test of BOM based models using Petri Nets

Composability Test of BOM based models using Petri Nets I. Mahmood, R. Ayani, V. Vlassov and F. Moradi 7 Composability Test of BOM based models using Petri Nets Imran Mahmood 1, Rassul Ayani 1, Vladimir Vlassov 1, and Farshad Moradi 2 1 Royal Institute of Technology

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

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement

9/21/17. Outline. Expression Evaluation and Control Flow. Arithmetic Expressions. Operators. Operators. Notation & Placement Outline Expression Evaluation and Control Flow In Text: Chapter 6 Notation Operator evaluation order Operand evaluation order Overloaded operators Type conversions Short-circuit evaluation of conditions

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

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger

UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division. P. N. Hilfinger UNIVERSITY OF CALIFORNIA Department of Electrical Engineering and Computer Sciences Computer Science Division CS 164 Spring 2009 P. N. Hilfinger CS 164: Final Examination (corrected) Name: Login: You have

More information

COMP-520 GoLite Tutorial

COMP-520 GoLite Tutorial COMP-520 GoLite Tutorial Alexander Krolik Sable Lab McGill University Winter 2019 Plan Target languages Language constructs, emphasis on special cases General execution semantics Declarations Types Statements

More information

Lexical Considerations

Lexical Considerations Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.035, Fall 2005 Handout 6 Decaf Language Wednesday, September 7 The project for the course is to write a

More information