# PFL

 home  Bib  Algorithms  Bioinfo  FP  Logic  MML  Prog.Lang and the  mmlist

FP (external)
FP (local)
PFL
Syntax
Examples

Also see:
λ-calculus
Prolog
Semantics

The PFL interpreter, [e.g.], is based on the [λ-calculus] interpreter and was inspired by CCS and the original PFL[Hol83,Mit84].

 PFL.p main, driver lazy.D.P lazy.O.P binary ops lazy.U.P unary ops lazy.apply.P lazy.env.P lazy.eval.P lazy.exec.P set up the initial processes and start them running lazy.mkval.P make values lazy.show.P printing lazy.type.P

 pfl.interact.P process interactions of complimentary pairs c!v->... and c?x->... pfl.count.P count processes lex.insym.P lexical lex.type.P syntax.P parser syntax.print.P syntax.type.P

#### Example

 let fact = lambda n. let rec f = lambda lo. lambda hi. lambda opch. if lo = hi then opch!hi -> stop else {lo < hi} let mid = (lo+hi)/2, ch = chan in {parallel divide and conquer} f lo mid ch || {small numbers's} f (mid+1) hi ch || {big numbers's} ch?x -> ch?y -> opch!x*y {combine} -> stop in f 1 n output in fact 10 {\fB Parallel Factorial Program. \fP}

The trace shows values exchanged over all channels. output is the standard output channel. The user's process is run in parallel (||) with the input process (not implemented) and the output process. If more than two processes remain at the end this may be because of deadlock.

### References

• [Mit84] K. Mitchell. A user's guide to PFL. Dept. of Computer Science, University of Edinburgh, 1984.
• [Hol83] S. Holmstrom. PFL: a functional language for parallel programming and its implementation. Programming Methodology Group, University of Goteborg and Chalmers University of Technology, 1983.
• Also search for one or more, but not too many, of [ pfl  pfp  ccs  csp  pi calculus ] in the [bibliography].
window on the wide world:
 The Darwin Awards V: Next Evolution

 Linux  Ubuntu free op. sys. OpenOffice free office suite, ver 3.4+ The GIMP ~ free photoshop Firefox web browser FlashBlock like it says!

 © L. Allison   http://www.allisons.org/ll/   (or as otherwise indicated), Faculty of Information Technology (Clayton), Monash University, Australia 3800 (6/'05 was School of Computer Science and Software Engineering, Fac. Info. Tech., Monash University, was Department of Computer Science, Fac. Comp. & Info. Tech., '89 was Department of Computer Science, Fac. Sci., '68-'71 was Department of Information Science, Fac. Sci.) Created with "vi (Linux + Solaris)",  charset=iso-8859-1,  fetched Thursday, 29-Oct-2020 05:11:21 AEDT.