CPSC 875
description
Transcript of CPSC 875
![Page 1: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/1.jpg)
CPSC 875
John D. McGregorOcarina
![Page 2: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/2.jpg)
What you will need
• Ocarina - http://penelope.enst.fr/aadl• Cygwin – if you are using windows you will
need this implementation of Linux because Tina runs in Linux
• Tina - http://projects.laas.fr/tina/download.php
![Page 3: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/3.jpg)
Step 1
• Install everything
![Page 4: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/4.jpg)
Step 2
• Generate code using ocarina• ocarina –b –g petri_nets my_file.aadl >model.net• See the ocarina documentation for various options
• I am using csMore.aadl and Data_Model.aadl
![Page 5: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/5.jpg)
Step 3 – Edit temp• ------------------------------------------• ------ Ocarina Petri Nets Generator ------• ------------------------------------------• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~• ~~~~~~~~~~~ Timed Petri Nets ~~~~~~~~~~~• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~• net AADL_TO_TPN_GENERATED• tr clientProcess1_clientThread_Init_Dispatch [0,w[ clientProcess1_clientThread_Halted serverProcess1• …• …• pl clientProcess1_clientThread_requestData_Bus (0)• pl serverProcess1_serverThread_requestData_Bus (0)• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~• ~~~~~~~~~~~ Colored Petri Nets ~~~~~~~~~~~• ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~• CN(3:net,1)• CM(11:declaration,1,1,1,5:Class)
Erase the red text (it will not be red in your file)
Scroll down til you see “~~~~”Erase the red text to the end of the file
![Page 6: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/6.jpg)
Step 4
• Run nd which will be in the bin directory of the Tina• This brings up a GUI
![Page 7: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/7.jpg)
Step 5
![Page 8: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/8.jpg)
Step 6
![Page 9: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/9.jpg)
Step 7
![Page 10: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/10.jpg)
Step 8
![Page 11: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/11.jpg)
Click on Rand the click on |< --this is a workaround – just do it
![Page 12: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/12.jpg)
Click on > and the simulation will advance one step; continue clicking
![Page 13: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/13.jpg)
Steps
• Read the labels on the places in the petri net so that you can understand the flow of the program
![Page 14: CPSC 875](https://reader033.fdocuments.in/reader033/viewer/2022051821/56816357550346895dd40bb4/html5/thumbnails/14.jpg)
Here is what you are going to do
• There is an example aadl file on the course resource page.
• Do this analysis on your robotic surgery model• Submit a print of your petri net and the .net
file