create new tag
view all tags
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

Topic revision: r1 - 2014-09-12 - DamianLyons
This site is powered by the TWiki collaboration platform Powered by PerlCopyright © 2008-2017 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback