Exercise: Write a recursive process that (a) never terminates and (b) terminates after 1 iteration of its body.

T = EQ<n,n> ; T .

Since n=n always, this will recursive forever.

T = NEQ<n,n> ; T .

Since n!=n is never true, this will stop after one iteration of the body, which in this case is just the NEQ process.

-- (c) Fordham University Robotics and Computer Vision


This topic: Main > WebHome > FordhamRoboticsAndComputerVisionLaboratory > FRCVProjects > DTRA > PARS-tutorial > PARS-tutorial-ex5
Topic revision: r1 - 2014-09-12 - DamianLyons
 
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback