Programming Help for SR Language

Introduction to SR Programming Language

SR- Synchronizing Resources

SR Programming Language is used to write concurrent programming Language. The main part of languages constructs are resources and operations.Encapsulation of process and variable are resources and operation provides the basic mechanism for process interaction. It provides integration of the mechanism for invoking and servicing operation.

Example of SR Programming Language

In the given example it wills print the factorial of a number:

{`
resource factorial()
procedure fact(k: int) returns f: int
if k < 0 -> f := -1
[] k = 0 or k = 1 -> f := 1
[] k > 1 -> f := k * fact(k-1)
fi
end fact
var n: int
writes("How many factorials? "); read(n)
write()   # generate a linefeed, resulting in a blank line
fa i := 1 to n ->
write(i, "factorial is", fact(i))
af
end factorial
`}

How to learn SR Programming Language

Tutorial or Books for learning SR Programming Language: