Finite state process

Posted on 2006-11-23
Last Modified: 2008-11-14
i need some help construcing a fsp model in Labelled Transition System Analyzer.  

i want to model a p2p file sharing  system

o      create – adds an entry in the local buffer
o      read – accesses a local/remote file
o      write – an exclusive operation and modifies a local/remote file
o      delete – an exclusive operation and deletes a local/remote file
o      dir – displays all local files
o      rdir – displays all remote files

at the moment i can only hand draw the model  for this but i cant devise code for it.

im not asking anyone to do this.  i only want someone to direct me to  a website where i can improve my skills using LTSA

any help will be great

Question by:isarasoo

Accepted Solution

sreenathk earned 500 total points
ID: 18005773

Author Comment

ID: 18032456
hello i have derived a some code to perform some the actions however i cant get one peer to view the other peers files.
i.e. when peer "a" hits rdir it should give you options available to peer "b".  
heres my code so far its written in LTSA i need help on the RDIR function
const Max =1
range Int =0..Max

SEMA[v:Int] = (up ->SEMA[v+1] | when(v>0) down-> SEMA[v-1]),
SEMA[Max+1] = ERROR.

SLOTS[i:0..N] = (when(i>=0 && i<N)create-> SLOTS[i+1]
                  |when(i>0) d.down ->delete-> d.up->SLOTS[i-1]
                  |when(i>0) read -> SLOTS[i]
                  |when(i>0) w.down ->write -> w.up -> SLOTS[i]
                  |when(i>0) dir -> SLOTS[i]
                  |when(i>0) rdir-> SLOTS[i]).

CREATE = (create -> CREATE).
||D =(DELETE || w:SEMAPHORE(1)).
WRITE = (write->WRITE).
||W = (WRITE || w:SEMAPHORE(1)).
READ = (read -> READ).
DIR =(dir -> DIR).
RDIR = (rdir ->RDIR).

||P2P = (a:BUFFER(2) ||b:BUFFER(2)).

Expert Comment

ID: 23103556
please can some explain this code for me please

Featured Post

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
copyEvens challenge 6 64
topping1 challenge 7 53
topping3 challenge 14 52
how to update exe applicatio from internet ? 6 41
Here we come across an interesting topic of coding guidelines while designing automation test scripts. The scope of this article will not be limited to QTP but to an overall extent of using VB Scripting for automation projects. Introduction Now…
This article is meant to give a basic understanding of how to use R Sweave as a way to merge LaTeX and R code seamlessly into one presentable document.
In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …

743 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now