Term Rewriting System R:
[B, B1, B2, N2, H2, T2, N1, H1, T1, F0, F1, F2, NewF, Record, Name, Field, Fields, Pending, Lock, Locks, Resources, Client, Pendings, MCRLFree0, MCRLFree1, Resource, List, Head, Tail, E, Pid, Client1, Client2, E2, S2, E1, S1, CS2, CS1, E3]
or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)

Innermost Termination of R to be shown.



   R
Dependency Pair Analysis



R contains the following Dependency Pairs:

EQT(pid(N1), pid(N2)) -> EQT(N1, N2)
EQT(cons(H1, T1), cons(H2, T2)) -> AND(eqt(H1, H2), eqt(T1, T2))
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(H1, H2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(T1, T2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> AND(eqt(H1, H2), eqt(T1, T2))
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(H1, H2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(T1, T2)
EQT(tuplenil(H1), tuplenil(H2)) -> EQT(H1, H2)
ELEMENT(int(s(s(N1))), tuple(T1, T2)) -> ELEMENT(int(s(N1)), T2)
RECORDUPDATES(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> RECORDUPDATES(recordupdate(Record, Name, Field, NewF), Name, Fields)
RECORDUPDATES(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> RECORDUPDATE(Record, Name, Field, NewF)
LOCKER2MAPPROMOTEPENDING(cons(Lock, Locks), Pending) -> LOCKER2PROMOTEPENDING(Lock, Pending)
LOCKER2MAPPROMOTEPENDING(cons(Lock, Locks), Pending) -> LOCKER2MAPPROMOTEPENDING(Locks, Pending)
LOCKER2MAPCLAIMLOCK(cons(Lock, Locks), Resources, Client) -> LOCKER2MAPCLAIMLOCK(Locks, Resources, Client)
LOCKER2PROMOTEPENDING(Lock, Client) -> CASE0(Client, Lock, recordextract(Lock, lock, pending))
LOCKER2PROMOTEPENDING(Lock, Client) -> RECORDEXTRACT(Lock, lock, pending)
CASE0(Client, Lock, cons(Client, Pendings)) -> RECORDUPDATES(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
LOCKER2REMOVEPENDING(Lock, Client) -> RECORDUPDATES(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
LOCKER2REMOVEPENDING(Lock, Client) -> SUBTRACT(recordextract(Lock, lock, pending), cons(Client, nil))
LOCKER2REMOVEPENDING(Lock, Client) -> RECORDEXTRACT(Lock, lock, pending)
LOCKER2ADDPENDING(Lock, Resources, Client) -> CASE1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
LOCKER2ADDPENDING(Lock, Resources, Client) -> MEMBER(recordextract(Lock, lock, resource), Resources)
LOCKER2ADDPENDING(Lock, Resources, Client) -> RECORDEXTRACT(Lock, lock, resource)
CASE1(Client, Resources, Lock, true) -> RECORDUPDATES(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
CASE1(Client, Resources, Lock, true) -> APPEND(recordextract(Lock, lock, pending), cons(Client, nil))
CASE1(Client, Resources, Lock, true) -> RECORDEXTRACT(Lock, lock, pending)
LOCKER2RELEASELOCK(Lock, Client) -> CASE2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
LOCKER2RELEASELOCK(Lock, Client) -> GENMODTAGEQ(Client, recordextract(Lock, lock, excl))
LOCKER2RELEASELOCK(Lock, Client) -> RECORDEXTRACT(Lock, lock, excl)
CASE2(Client, Lock, true) -> RECORDUPDATES(Lock, lock, cons(tuple(excllock, excl), nil))
LOCKER2OBTAINABLES(cons(Lock, Locks), Client) -> CASE5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
LOCKER2OBTAINABLES(cons(Lock, Locks), Client) -> MEMBER(Client, recordextract(Lock, lock, pending))
LOCKER2OBTAINABLES(cons(Lock, Locks), Client) -> RECORDEXTRACT(Lock, lock, pending)
CASE5(Client, Locks, Lock, true) -> LOCKER2OBTAINABLES(Locks, Client)
CASE5(Client, Locks, Lock, false) -> LOCKER2OBTAINABLES(Locks, Client)
LOCKER2CHECKAVAILABLE(Resource, cons(Lock, Locks)) -> CASE6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
LOCKER2CHECKAVAILABLE(Resource, cons(Lock, Locks)) -> RECORDEXTRACT(Lock, lock, resource)
CASE6(Locks, Lock, Resource, true) -> RECORDEXTRACT(Lock, lock, excl)
CASE6(Locks, Lock, Resource, true) -> RECORDEXTRACT(Lock, lock, pending)
CASE6(Locks, Lock, Resource, false) -> LOCKER2CHECKAVAILABLE(Resource, Locks)
LOCKER2CHECKAVAILABLES(cons(Resource, Resources), Locks) -> LOCKER2CHECKAVAILABLE(Resource, Locks)
LOCKER2CHECKAVAILABLES(cons(Resource, Resources), Locks) -> LOCKER2CHECKAVAILABLES(Resources, Locks)
APPEND(cons(Head, Tail), List) -> APPEND(Tail, List)
SUBTRACT(List, cons(Head, Tail)) -> SUBTRACT(delete(Head, List), Tail)
SUBTRACT(List, cons(Head, Tail)) -> DELETE(Head, List)
DELETE(E, cons(Head, Tail)) -> CASE8(Tail, Head, E, equal(E, Head))
CASE8(Tail, Head, E, false) -> DELETE(E, Tail)
MEMBER(E, cons(Head, Tail)) -> CASE9(Tail, Head, E, equal(E, Head))
CASE9(Tail, Head, E, false) -> MEMBER(E, Tail)
EQS(stack(E1, S1), stack(E2, S2)) -> AND(eqt(E1, E2), eqs(S1, S2))
EQS(stack(E1, S1), stack(E2, S2)) -> EQT(E1, E2)
EQS(stack(E1, S1), stack(E2, S2)) -> EQS(S1, S2)
ISTOPS(E1, stack(E2, S1)) -> EQT(E1, E2)
EQC(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> AND(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
EQC(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> EQT(E1, E2)
EQC(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> AND(eqs(S1, S2), eqc(CS1, CS2))
EQC(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> EQS(S1, S2)
EQC(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> EQC(CS1, CS2)
PUSH(E1, E2, calls(E3, S1, CS1)) -> PUSH1(E1, E2, E3, S1, CS1, eqt(E1, E3))
PUSH(E1, E2, calls(E3, S1, CS1)) -> EQT(E1, E3)
PUSH1(E1, E2, E3, S1, CS1, T) -> PUSHS(E2, S1)

Furthermore, R contains 11 SCCs.


   R
DPs
       →DP Problem 1
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pairs:

EQT(tuplenil(H1), tuplenil(H2)) -> EQT(H1, H2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(T1, T2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(H1, H2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(T1, T2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(H1, H2)
EQT(pid(N1), pid(N2)) -> EQT(N1, N2)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

EQT(pid(N1), pid(N2)) -> EQT(N1, N2)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EQT(x1, x2))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(pid(x1))=  1 + x1  
  POL(tuplenil(x1))=  x1  
  POL(tuple(x1, x2))=  x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 12
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pairs:

EQT(tuplenil(H1), tuplenil(H2)) -> EQT(H1, H2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(T1, T2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(H1, H2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(T1, T2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(H1, H2)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

EQT(tuplenil(H1), tuplenil(H2)) -> EQT(H1, H2)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EQT(x1, x2))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(tuplenil(x1))=  1 + x1  
  POL(tuple(x1, x2))=  x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 12
Polo
             ...
               →DP Problem 13
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pairs:

EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(T1, T2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(H1, H2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(T1, T2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(H1, H2)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pairs can be strictly oriented:

EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(T1, T2)
EQT(tuple(H1, T1), tuple(H2, T2)) -> EQT(H1, H2)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EQT(x1, x2))=  x1  
  POL(cons(x1, x2))=  x1 + x2  
  POL(tuple(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 12
Polo
             ...
               →DP Problem 14
Polynomial Ordering
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pairs:

EQT(cons(H1, T1), cons(H2, T2)) -> EQT(T1, T2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(H1, H2)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pairs can be strictly oriented:

EQT(cons(H1, T1), cons(H2, T2)) -> EQT(T1, T2)
EQT(cons(H1, T1), cons(H2, T2)) -> EQT(H1, H2)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EQT(x1, x2))=  x1  
  POL(cons(x1, x2))=  1 + x1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
           →DP Problem 12
Polo
             ...
               →DP Problem 15
Dependency Graph
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polynomial Ordering
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:

ELEMENT(int(s(s(N1))), tuple(T1, T2)) -> ELEMENT(int(s(N1)), T2)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

ELEMENT(int(s(s(N1))), tuple(T1, T2)) -> ELEMENT(int(s(N1)), T2)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(int(x1))=  0  
  POL(s(x1))=  0  
  POL(tuple(x1, x2))=  1 + x2  
  POL(ELEMENT(x1, x2))=  x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
           →DP Problem 16
Dependency Graph
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polynomial Ordering
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:

RECORDUPDATES(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> RECORDUPDATES(recordupdate(Record, Name, Field, NewF), Name, Fields)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

RECORDUPDATES(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> RECORDUPDATES(recordupdate(Record, Name, Field, NewF), Name, Fields)


Additionally, the following usable rule for innermost can be oriented:

recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(pending)=  0  
  POL(RECORD_UPDATES(x1, x2, x3))=  x3  
  POL(cons(x1, x2))=  1 + x2  
  POL(lock)=  0  
  POL(tuplenil(x1))=  0  
  POL(mcrlrecord)=  0  
  POL(record_update(x1, x2, x3, x4))=  0  
  POL(tuple(x1, x2))=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
           →DP Problem 17
Dependency Graph
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polynomial Ordering
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:

LOCKER2MAPPROMOTEPENDING(cons(Lock, Locks), Pending) -> LOCKER2MAPPROMOTEPENDING(Locks, Pending)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

LOCKER2MAPPROMOTEPENDING(cons(Lock, Locks), Pending) -> LOCKER2MAPPROMOTEPENDING(Locks, Pending)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(LOCKER2_MAP_PROMOTE_PENDING(x1, x2))=  x1  
  POL(cons(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
           →DP Problem 18
Dependency Graph
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polynomial Ordering
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:

LOCKER2MAPCLAIMLOCK(cons(Lock, Locks), Resources, Client) -> LOCKER2MAPCLAIMLOCK(Locks, Resources, Client)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

LOCKER2MAPCLAIMLOCK(cons(Lock, Locks), Resources, Client) -> LOCKER2MAPCLAIMLOCK(Locks, Resources, Client)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(cons(x1, x2))=  1 + x2  
  POL(LOCKER2_MAP_CLAIM_LOCK(x1, x2, x3))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
           →DP Problem 19
Dependency Graph
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polynomial Ordering
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:

SUBTRACT(List, cons(Head, Tail)) -> SUBTRACT(delete(Head, List), Tail)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

SUBTRACT(List, cons(Head, Tail)) -> SUBTRACT(delete(Head, List), Tail)


Additionally, the following usable rules for innermost can be oriented:

delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(case8(x1, x2, x3, x4))=  1 + x1  
  POL(SUBTRACT(x1, x2))=  x2  
  POL(equal(x1, x2))=  0  
  POL(cons(x1, x2))=  1 + x2  
  POL(false)=  0  
  POL(nil)=  0  
  POL(true)=  1  
  POL(delete(x1, x2))=  x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
           →DP Problem 20
Dependency Graph
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polynomial Ordering
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:

APPEND(cons(Head, Tail), List) -> APPEND(Tail, List)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

APPEND(cons(Head, Tail), List) -> APPEND(Tail, List)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(cons(x1, x2))=  1 + x2  
  POL(APPEND(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
           →DP Problem 21
Dependency Graph
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polynomial Ordering
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pairs:

CASE5(Client, Locks, Lock, false) -> LOCKER2OBTAINABLES(Locks, Client)
CASE5(Client, Locks, Lock, true) -> LOCKER2OBTAINABLES(Locks, Client)
LOCKER2OBTAINABLES(cons(Lock, Locks), Client) -> CASE5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

LOCKER2OBTAINABLES(cons(Lock, Locks), Client) -> CASE5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))


Additionally, the following usable rules for innermost can be oriented:

member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)


Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(equal(x1, x2))=  0  
  POL(CASE5(x1, x2, x3, x4))=  x2  
  POL(false)=  0  
  POL(lock)=  0  
  POL(tuplenil(x1))=  0  
  POL(true)=  0  
  POL(tuple(x1, x2))=  0  
  POL(record_extract(x1, x2, x3))=  0  
  POL(pending)=  0  
  POL(cons(x1, x2))=  1 + x2  
  POL(case9(x1, x2, x3, x4))=  0  
  POL(member(x1, x2))=  0  
  POL(mcrlrecord)=  0  
  POL(nil)=  0  
  POL(LOCKER2_OBTAINABLES(x1, x2))=  x1  
  POL(resource)=  0  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
           →DP Problem 22
Dependency Graph
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pairs:

CASE5(Client, Locks, Lock, false) -> LOCKER2OBTAINABLES(Locks, Client)
CASE5(Client, Locks, Lock, true) -> LOCKER2OBTAINABLES(Locks, Client)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polynomial Ordering
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:

LOCKER2CHECKAVAILABLES(cons(Resource, Resources), Locks) -> LOCKER2CHECKAVAILABLES(Resources, Locks)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

LOCKER2CHECKAVAILABLES(cons(Resource, Resources), Locks) -> LOCKER2CHECKAVAILABLES(Resources, Locks)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(cons(x1, x2))=  1 + x2  
  POL(LOCKER2_CHECK_AVAILABLES(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
           →DP Problem 23
Dependency Graph
       →DP Problem 10
Polo
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polynomial Ordering
       →DP Problem 11
Polo


Dependency Pair:

EQS(stack(E1, S1), stack(E2, S2)) -> EQS(S1, S2)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

EQS(stack(E1, S1), stack(E2, S2)) -> EQS(S1, S2)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(EQS(x1, x2))=  x1  
  POL(stack(x1, x2))=  1 + x2  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
           →DP Problem 24
Dependency Graph
       →DP Problem 11
Polo


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.


   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polynomial Ordering


Dependency Pair:

EQC(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> EQC(CS1, CS2)


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




The following dependency pair can be strictly oriented:

EQC(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> EQC(CS1, CS2)


There are no usable rules for innermost that need to be oriented.

Used ordering: Polynomial ordering with Polynomial interpretation:
  POL(calls(x1, x2, x3))=  1 + x3  
  POL(EQC(x1, x2))=  x1  

resulting in one new DP problem.



   R
DPs
       →DP Problem 1
Polo
       →DP Problem 2
Polo
       →DP Problem 3
Polo
       →DP Problem 4
Polo
       →DP Problem 5
Polo
       →DP Problem 6
Polo
       →DP Problem 7
Polo
       →DP Problem 8
Polo
       →DP Problem 9
Polo
       →DP Problem 10
Polo
       →DP Problem 11
Polo
           →DP Problem 25
Dependency Graph


Dependency Pair:


Rules:


or(T, T) -> T
or(F, T) -> T
or(T, F) -> T
or(F, F) -> F
and(T, B) -> B
and(B, T) -> B
and(F, B) -> F
and(B, F) -> F
imp(T, B) -> B
imp(F, B) -> T
not(T) -> F
not(F) -> T
if(T, B1, B2) -> B1
if(F, B1, B2) -> B2
eq(T, T) -> T
eq(F, F) -> T
eq(T, F) -> F
eq(F, T) -> F
eqt(nil, undefined) -> F
eqt(nil, pid(N2)) -> F
eqt(nil, int(N2)) -> F
eqt(nil, cons(H2, T2)) -> F
eqt(nil, tuple(H2, T2)) -> F
eqt(nil, tuplenil(H2)) -> F
eqt(a, nil) -> F
eqt(a, a) -> T
eqt(a, excl) -> F
eqt(a, false) -> F
eqt(a, lock) -> F
eqt(a, locker) -> F
eqt(a, mcrlrecord) -> F
eqt(a, ok) -> F
eqt(a, pending) -> F
eqt(a, release) -> F
eqt(a, request) -> F
eqt(a, resource) -> F
eqt(a, tag) -> F
eqt(a, true) -> F
eqt(a, undefined) -> F
eqt(a, pid(N2)) -> F
eqt(a, int(N2)) -> F
eqt(a, cons(H2, T2)) -> F
eqt(a, tuple(H2, T2)) -> F
eqt(a, tuplenil(H2)) -> F
eqt(excl, nil) -> F
eqt(excl, a) -> F
eqt(excl, excl) -> T
eqt(excl, false) -> F
eqt(excl, lock) -> F
eqt(excl, locker) -> F
eqt(excl, mcrlrecord) -> F
eqt(excl, ok) -> F
eqt(excl, pending) -> F
eqt(excl, release) -> F
eqt(excl, request) -> F
eqt(excl, resource) -> F
eqt(excl, tag) -> F
eqt(excl, true) -> F
eqt(excl, undefined) -> F
eqt(excl, pid(N2)) -> F
eqt(excl, eqt(false, int(N2))) -> F
eqt(false, cons(H2, T2)) -> F
eqt(false, tuple(H2, T2)) -> F
eqt(false, tuplenil(H2)) -> F
eqt(lock, nil) -> F
eqt(lock, a) -> F
eqt(lock, excl) -> F
eqt(lock, false) -> F
eqt(lock, lock) -> T
eqt(lock, locker) -> F
eqt(lock, mcrlrecord) -> F
eqt(lock, ok) -> F
eqt(lock, pending) -> F
eqt(lock, release) -> F
eqt(lock, request) -> F
eqt(lock, resource) -> F
eqt(lock, tag) -> F
eqt(lock, true) -> F
eqt(lock, undefined) -> F
eqt(lock, pid(N2)) -> F
eqt(lock, int(N2)) -> F
eqt(lock, cons(H2, T2)) -> F
eqt(lock, tuple(H2, T2)) -> F
eqt(lock, tuplenil(H2)) -> F
eqt(locker, nil) -> F
eqt(locker, a) -> F
eqt(locker, excl) -> F
eqt(locker, false) -> F
eqt(locker, lock) -> F
eqt(locker, locker) -> T
eqt(locker, mcrlrecord) -> F
eqt(locker, ok) -> F
eqt(locker, pending) -> F
eqt(locker, release) -> F
eqt(locker, request) -> F
eqt(locker, resource) -> F
eqt(locker, tag) -> F
eqt(locker, true) -> F
eqt(locker, undefined) -> F
eqt(locker, pid(N2)) -> F
eqt(locker, int(N2)) -> F
eqt(locker, cons(H2, T2)) -> F
eqt(locker, tuple(H2, T2)) -> F
eqt(locker, tuplenil(H2)) -> F
eqt(mcrlrecord, nil) -> F
eqt(mcrlrecord, a) -> F
eqt(mcrlrecord, excl) -> F
eqt(mcrlrecord, false) -> F
eqt(mcrlrecord, lock) -> F
eqt(mcrlrecord, locker) -> F
eqt(mcrlrecord, mcrlrecord) -> T
eqt(mcrlrecord, ok) -> F
eqt(mcrlrecord, pending) -> F
eqt(mcrlrecord, release) -> F
eqt(mcrlrecord, request) -> F
eqt(mcrlrecord, resource) -> F
eqt(ok, resource) -> F
eqt(ok, tag) -> F
eqt(ok, true) -> F
eqt(ok, undefined) -> F
eqt(ok, pid(N2)) -> F
eqt(ok, int(N2)) -> F
eqt(ok, cons(H2, T2)) -> F
eqt(ok, tuple(H2, T2)) -> F
eqt(ok, tuplenil(H2)) -> F
eqt(pending, nil) -> F
eqt(pending, a) -> F
eqt(pending, excl) -> F
eqt(pending, false) -> F
eqt(pending, lock) -> F
eqt(pending, locker) -> F
eqt(pending, mcrlrecord) -> F
eqt(pending, ok) -> F
eqt(pending, pending) -> T
eqt(pending, release) -> F
eqt(pending, request) -> F
eqt(pending, resource) -> F
eqt(pending, tag) -> F
eqt(pending, true) -> F
eqt(pending, undefined) -> F
eqt(pending, pid(N2)) -> F
eqt(pending, int(N2)) -> F
eqt(pending, cons(H2, T2)) -> F
eqt(pending, tuple(H2, T2)) -> F
eqt(pending, tuplenil(H2)) -> F
eqt(release, nil) -> F
eqt(release, a) -> F
eqt(release, excl) -> F
eqt(release, false) -> F
eqt(release, lock) -> F
eqt(release, locker) -> F
eqt(release, mcrlrecord) -> F
eqt(release, ok) -> F
eqt(request, mcrlrecord) -> F
eqt(request, ok) -> F
eqt(request, pending) -> F
eqt(request, release) -> F
eqt(request, request) -> T
eqt(request, resource) -> F
eqt(request, tag) -> F
eqt(request, true) -> F
eqt(request, undefined) -> F
eqt(request, pid(N2)) -> F
eqt(request, int(N2)) -> F
eqt(request, cons(H2, T2)) -> F
eqt(request, tuple(H2, T2)) -> F
eqt(request, tuplenil(H2)) -> F
eqt(resource, nil) -> F
eqt(resource, a) -> F
eqt(resource, excl) -> F
eqt(resource, false) -> F
eqt(resource, lock) -> F
eqt(resource, locker) -> F
eqt(resource, mcrlrecord) -> F
eqt(resource, ok) -> F
eqt(resource, pending) -> F
eqt(resource, release) -> F
eqt(resource, request) -> F
eqt(resource, resource) -> T
eqt(resource, tag) -> F
eqt(resource, true) -> F
eqt(resource, undefined) -> F
eqt(resource, pid(N2)) -> F
eqt(resource, int(N2)) -> F
eqt(resource, cons(H2, T2)) -> F
eqt(resource, tuple(H2, T2)) -> F
eqt(resource, tuplenil(H2)) -> F
eqt(tag, nil) -> F
eqt(tag, a) -> F
eqt(tag, excl) -> F
eqt(tag, false) -> F
eqt(tag, lock) -> F
eqt(tag, locker) -> F
eqt(tag, mcrlrecord) -> F
eqt(tag, ok) -> F
eqt(tag, pending) -> F
eqt(tag, release) -> F
eqt(tag, request) -> F
eqt(tag, resource) -> F
eqt(tag, tag) -> T
eqt(tag, true) -> F
eqt(tag, undefined) -> F
eqt(tag, pid(N2)) -> F
eqt(tag, int(N2)) -> F
eqt(tag, cons(H2, T2)) -> F
eqt(tag, tuple(H2, T2)) -> F
eqt(tag, tuplenil(H2)) -> F
eqt(true, nil) -> F
eqt(true, a) -> F
eqt(true, excl) -> F
eqt(true, false) -> F
eqt(true, lock) -> F
eqt(true, locker) -> F
eqt(true, mcrlrecord) -> F
eqt(true, ok) -> F
eqt(true, pending) -> F
eqt(true, release) -> F
eqt(true, request) -> F
eqt(true, resource) -> F
eqt(true, tag) -> F
eqt(true, true) -> T
eqt(true, undefined) -> F
eqt(true, pid(N2)) -> F
eqt(true, int(N2)) -> F
eqt(true, cons(H2, T2)) -> F
eqt(true, tuple(H2, T2)) -> F
eqt(true, tuplenil(H2)) -> F
eqt(undefined, nil) -> F
eqt(undefined, a) -> F
eqt(undefined, tuplenil(H2)) -> F
eqt(pid(N1), nil) -> F
eqt(pid(N1), a) -> F
eqt(pid(N1), excl) -> F
eqt(pid(N1), false) -> F
eqt(pid(N1), lock) -> F
eqt(pid(N1), locker) -> F
eqt(pid(N1), mcrlrecord) -> F
eqt(pid(N1), ok) -> F
eqt(pid(N1), pending) -> F
eqt(pid(N1), release) -> F
eqt(pid(N1), request) -> F
eqt(pid(N1), resource) -> F
eqt(pid(N1), tag) -> F
eqt(pid(N1), true) -> F
eqt(pid(N1), undefined) -> F
eqt(pid(N1), pid(N2)) -> eqt(N1, N2)
eqt(pid(N1), int(N2)) -> F
eqt(pid(N1), cons(H2, T2)) -> F
eqt(pid(N1), tuple(H2, T2)) -> F
eqt(pid(N1), tuplenil(H2)) -> F
eqt(int(N1), nil) -> F
eqt(int(N1), a) -> F
eqt(int(N1), excl) -> F
eqt(int(N1), false) -> F
eqt(int(N1), lock) -> F
eqt(int(N1), locker) -> F
eqt(int(N1), mcrlrecord) -> F
eqt(int(N1), ok) -> F
eqt(int(N1), pending) -> F
eqt(int(N1), release) -> F
eqt(int(N1), request) -> F
eqt(int(N1), resource) -> F
eqt(int(N1), tag) -> F
eqt(int(N1), true) -> F
eqt(int(N1), undefined) -> F
eqt(cons(H1, T1), resource) -> F
eqt(cons(H1, T1), tag) -> F
eqt(cons(H1, T1), true) -> F
eqt(cons(H1, T1), undefined) -> F
eqt(cons(H1, T1), pid(N2)) -> F
eqt(cons(H1, T1), int(N2)) -> F
eqt(cons(H1, T1), cons(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(cons(H1, T1), tuple(H2, T2)) -> F
eqt(cons(H1, T1), tuplenil(H2)) -> F
eqt(tuple(H1, T1), nil) -> F
eqt(tuple(H1, T1), a) -> F
eqt(tuple(H1, T1), excl) -> F
eqt(tuple(H1, T1), false) -> F
eqt(tuple(H1, T1), lock) -> F
eqt(tuple(H1, T1), locker) -> F
eqt(tuple(H1, T1), mcrlrecord) -> F
eqt(tuple(H1, T1), ok) -> F
eqt(tuple(H1, T1), pending) -> F
eqt(tuple(H1, T1), release) -> F
eqt(tuple(H1, T1), request) -> F
eqt(tuple(H1, T1), resource) -> F
eqt(tuple(H1, T1), tag) -> F
eqt(tuple(H1, T1), true) -> F
eqt(tuple(H1, T1), undefined) -> F
eqt(tuple(H1, T1), pid(N2)) -> F
eqt(tuple(H1, T1), int(N2)) -> F
eqt(tuple(H1, T1), cons(H2, T2)) -> F
eqt(tuple(H1, T1), tuple(H2, T2)) -> and(eqt(H1, H2), eqt(T1, T2))
eqt(tuple(H1, T1), tuplenil(H2)) -> F
eqt(tuplenil(H1), nil) -> F
eqt(tuplenil(H1), a) -> F
eqt(tuplenil(H1), excl) -> F
eqt(tuplenil(H1), false) -> F
eqt(tuplenil(H1), lock) -> F
eqt(tuplenil(H1), locker) -> F
eqt(tuplenil(H1), mcrlrecord) -> F
eqt(tuplenil(H1), ok) -> F
eqt(tuplenil(H1), pending) -> F
eqt(tuplenil(H1), release) -> F
eqt(tuplenil(H1), request) -> F
eqt(tuplenil(H1), resource) -> F
eqt(tuplenil(H1), tag) -> F
eqt(tuplenil(H1), true) -> F
eqt(tuplenil(H1), undefined) -> F
eqt(tuplenil(H1), pid(N2)) -> F
eqt(tuplenil(H1), int(N2)) -> F
eqt(tuplenil(H1), cons(H2, T2)) -> F
eqt(tuplenil(H1), tuple(H2, T2)) -> F
eqt(tuplenil(H1), tuplenil(H2)) -> eqt(H1, H2)
element(int(s(0)), tuplenil(T1)) -> T1
element(int(s(0)), tuple(T1, T2)) -> T1
element(int(s(s(N1))), tuple(T1, T2)) -> element(int(s(N1)), T2)
recordnew(lock) -> tuple(mcrlrecord, tuple(lock, tuple(undefined, tuple(nil, tuplenil(nil)))))
recordextract(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, resource) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2)))))
recordupdate(tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(F2))))), lock, pending, NewF) -> tuple(mcrlrecord, tuple(lock, tuple(F0, tuple(F1, tuplenil(NewF)))))
recordupdates(Record, Name, nil) -> Record
recordupdates(Record, Name, cons(tuple(Field, tuplenil(NewF)), Fields)) -> recordupdates(recordupdate(Record, Name, Field, NewF), Name, Fields)
locker2mappromotepending(nil, Pending) -> nil
locker2mappromotepending(cons(Lock, Locks), Pending) -> cons(locker2promotepending(Lock, Pending), locker2mappromotepending(Locks, Pending))
locker2mapclaimlock(nil, Resources, Client) -> nil
locker2mapclaimlock(cons(Lock, Locks), Resources, Client) -> cons(locker2claimlock(Lock, Resources, Client), locker2mapclaimlock(Locks, Resources, Client))
locker2mapaddpending(nil, Resources, Client) -> nil
locker2promotepending(Lock, Client) -> case0(Client, Lock, recordextract(Lock, lock, pending))
case0(Client, Lock, cons(Client, Pendings)) -> recordupdates(Lock, lock, cons(tuple(excl, tuplenil(Client)), cons(tuple(pending, tuplenil(Pendings)), nil)))
case0(Client, Lock, MCRLFree0) -> Lock
locker2removepending(Lock, Client) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(subtract(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
locker2addpending(Lock, Resources, Client) -> case1(Client, Resources, Lock, member(recordextract(Lock, lock, resource), Resources))
case1(Client, Resources, Lock, true) -> recordupdates(Lock, lock, cons(tuple(pending, tuplenil(append(recordextract(Lock, lock, pending), cons(Client, nil)))), nil))
case1(Client, Resources, Lock, false) -> Lock
locker2releaselock(Lock, Client) -> case2(Client, Lock, genmodtageq(Client, recordextract(Lock, lock, excl)))
case2(Client, Lock, true) -> recordupdates(Lock, lock, cons(tuple(excllock, excl), nil))
case4(Client, Lock, MCRLFree1) -> false
locker2obtainables(nil, Client) -> true
locker2obtainables(cons(Lock, Locks), Client) -> case5(Client, Locks, Lock, member(Client, recordextract(Lock, lock, pending)))
case5(Client, Locks, Lock, true) -> andt(locker2obtainable(Lock, Client), locker2obtainables(Locks, Client))
case5(Client, Locks, Lock, false) -> locker2obtainables(Locks, Client)
locker2checkavailable(Resource, nil) -> false
locker2checkavailable(Resource, cons(Lock, Locks)) -> case6(Locks, Lock, Resource, equal(Resource, recordextract(Lock, lock, resource)))
case6(Locks, Lock, Resource, true) -> andt(equal(recordextract(Lock, lock, excl), nil), equal(recordextract(Lock, lock, pending), nil))
case6(Locks, Lock, Resource, false) -> locker2checkavailable(Resource, Locks)
locker2checkavailables(nil, Locks) -> true
locker2checkavailables(cons(Resource, Resources), Locks) -> andt(locker2checkavailable(Resource, Locks), locker2checkavailables(Resources, Locks))
locker2adduniq(nil, List) -> List
append(cons(Head, Tail), List) -> cons(Head, append(Tail, List))
subtract(List, nil) -> List
subtract(List, cons(Head, Tail)) -> subtract(delete(Head, List), Tail)
delete(E, nil) -> nil
delete(E, cons(Head, Tail)) -> case8(Tail, Head, E, equal(E, Head))
case8(Tail, Head, E, true) -> Tail
case8(Tail, Head, E, false) -> cons(Head, delete(E, Tail))
gentag(Pid) -> tuple(Pid, tuplenil(tag))
genmodtageq(Client1, Client2) -> equal(Client1, Client2)
member(E, nil) -> false
member(E, cons(Head, Tail)) -> case9(Tail, Head, E, equal(E, Head))
case9(Tail, Head, E, true) -> true
case9(Tail, Head, E, false) -> member(E, Tail)
eqs(empty, empty) -> T
eqs(empty, stack(E2, S2)) -> F
eqs(stack(E1, S1), empty) -> F
eqs(stack(E1, S1), stack(E2, S2)) -> and(eqt(E1, E2), eqs(S1, S2))
pushs(E1, S1) -> stack(E1, S1)
pops(stack(E1, S1)) -> S1
tops(stack(E1, S1)) -> E1
istops(E1, empty) -> F
istops(E1, stack(E2, S1)) -> eqt(E1, E2)
eqc(nocalls, nocalls) -> T
eqc(nocalls, calls(E2, S2, CS2)) -> F
eqc(calls(E1, S1, CS1), nocalls) -> F
eqc(calls(E1, S1, CS1), calls(E2, S2, CS2)) -> and(eqt(E1, E2), and(eqs(S1, S2), eqc(CS1, CS2)))
push(E1, E2, nocalls) -> calls(E1, stack(E2, empty), nocalls)
push(E1, E2, calls(E3, S1, CS1)) -> push1(E1, E2, E3, S1, CS1, eqt(E1, E3))
push1(E1, E2, E3, S1, CS1, T) -> calls(E3, pushs(E2, S1), CS1)


Strategy:

innermost




Using the Dependency Graph resulted in no new DP problems.

Innermost Termination of R successfully shown.
Duration:
0:22 minutes