==========================================
reduce in META-LEVEL : metaMatch(['MATCH], 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0)
    .
*********** equation
eq [Q:Qid] = sth Q:Qid is
  including Q:Qid .
  sorts none .
  none
  none
  none
  none
  none
  none
  none
endsth .
Q:Qid --> 'MATCH
['MATCH]
--->
sth 'MATCH is
  including 'MATCH .
  sorts none .
  none
  none
  none
  none
  none
  none
  none
endsth
*********** trial #1
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
*********** solving condition fragment
h(X:Bar) = g(Y:Bar)
*********** equation
eq h(a) = b .
empty substitution
h(a)
--->
b
*********** equation
eq g(c) = b .
empty substitution
g(c)
--->
b
*********** success for condition fragment
h(X:Bar) = g(Y:Bar)
X:Bar --> a
Y:Bar --> c
*********** success #1
*********** membership axiom
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
Bar: f(a, c) becomes Foo
*********** equation
(built-in equation for symbol metaMatch)
metaMatch(sth 'MATCH is
  including 'MATCH .
  sorts none .
  none
  none
  none
  none
  none
  none
  none
endsth, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0)
--->

  'Z:Foo <- 'f['a.Foo, 'c.Foo]
rewrites: 5
mb applications: 1  equational rewrites: 4  rule rewrites: 0  variant narrowing
    steps: 0  narrowing steps: 0
result Assignment: 
  'Z:Foo <- 'f['a.Foo, 'c.Foo]
==========================================
reduce in META-LEVEL : metaXmatch(['MATCH], 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0,
    unbounded, 0) .
*********** equation
eq [Q:Qid] = sth Q:Qid is
  including Q:Qid .
  sorts none .
  none
  none
  none
  none
  none
  none
  none
endsth .
Q:Qid --> 'MATCH
['MATCH]
--->
sth 'MATCH is
  including 'MATCH .
  sorts none .
  none
  none
  none
  none
  none
  none
  none
endsth
*********** trial #1
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
*********** solving condition fragment
h(X:Bar) = g(Y:Bar)
*********** equation
eq h(a) = b .
empty substitution
h(a)
--->
b
*********** equation
eq g(c) = b .
empty substitution
g(c)
--->
b
*********** success for condition fragment
h(X:Bar) = g(Y:Bar)
X:Bar --> a
Y:Bar --> c
*********** success #1
*********** membership axiom
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
Bar: f(a, c) becomes Foo
*********** equation
(built-in equation for symbol metaXmatch)
metaXmatch(sth 'MATCH is
  including 'MATCH .
  sorts none .
  none
  none
  none
  none
  none
  none
  none
endsth, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0, unbounded, 0)
--->
{
  'Z:Foo <- 'f['a.Foo, 'c.Foo], []}
rewrites: 5
mb applications: 1  equational rewrites: 4  rule rewrites: 0  variant narrowing
    steps: 0  narrowing steps: 0
result MatchPair: {
  'Z:Foo <- 'f['a.Foo, 'c.Foo], []}
==========================================
erewrite in MATCH-TEST : <> < me : User | soln: 0 > createInterpreter(
    interpreterManager, me, none) .
*********** rule
rl < X : User | AS > createdInterpreter(X, Y, Z) => < X : User | AS >
    insertModule(Z, X, upModule('MATCH, true)) .
X --> me
AS --> soln: 0
Y --> interpreterManager
Z --> interpreter(0)
< me : User | soln: 0 > createdInterpreter(me, interpreterManager, interpreter(
    0))
--->
< me : User | soln: 0 > insertModule(interpreter(0), me, upModule('MATCH,
    true))
*********** equation
(built-in equation for symbol upModule)
upModule('MATCH, true)
--->
fmod 'MATCH is
  nil
  sorts 'Bool ; 'Foo ; 'Bar .
  subsort 'Foo < 'Bar .
  op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0)
    special(
    id-hook('BranchSymbol, nil) 
    term-hook('1, 'true.Bool) 
    term-hook('2, 'false.Bool))] .
  op '_==_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
    id-hook('EqualitySymbol, nil) 
    term-hook('equalTerm, 'true.Bool) 
    term-hook('notEqualTerm, 'false.Bool))] .
  op '_=/=_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
    id-hook('EqualitySymbol, nil) 
    term-hook('equalTerm, 'false.Bool) 
    term-hook('notEqualTerm, 'true.Bool))] .
  op 'true : nil -> 'Bool [ctor special(
    id-hook('SystemTrue, nil))] .
  op 'false : nil -> 'Bool [ctor special(
    id-hook('SystemFalse, nil))] .
  op '_and_ : 'Bool 'Bool -> 'Bool [prec(55) assoc comm] .
  op '_or_ : 'Bool 'Bool -> 'Bool [prec(59) assoc comm] .
  op '_xor_ : 'Bool 'Bool -> 'Bool [prec(57) assoc comm] .
  op 'not_ : 'Bool -> 'Bool [prec(53)] .
  op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] .
  op 'f : 'Bar 'Bar -> 'Bar [comm] .
  op 'g : 'Foo -> 'Foo [none] .
  op 'h : 'Foo -> 'Foo [none] .
  op 'a : nil -> 'Foo [none] .
  op 'b : nil -> 'Foo [none] .
  op 'c : nil -> 'Foo [none] .
  op 'd : nil -> 'Foo [none] .
  op 'e : nil -> 'Foo [none] .
  cmb 'f['X:Bar, 'Y:Bar] : 'Foo if 'h['X:Bar] = 'g['Y:Bar] [none] .
  eq 'h['a.Foo] = 'b.Foo [none] .
  eq 'g['c.Foo] = 'b.Foo [none] .
  eq 'h['c.Foo] = 'd.Foo [none] .
  eq 'g['a.Foo] = 'd.Foo [none] .
  eq '_and_['true.Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_and_['false.Bool, 'A:Bool] = 'false.Bool [none] .
  eq '_and_['A:Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_xor_['false.Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_xor_['A:Bool, 'A:Bool] = 'false.Bool [none] .
  eq '_and_['A:Bool, '_xor_['B:Bool, 'C:Bool]] = '_xor_['_and_['A:Bool,
    'B:Bool], '_and_['A:Bool, 'C:Bool]] [none] .
  eq 'not_['A:Bool] = '_xor_['true.Bool, 'A:Bool] [none] .
  eq '_or_['A:Bool, 'B:Bool] = '_xor_['_and_['A:Bool, 'B:Bool], '_xor_['A:Bool,
    'B:Bool]] [none] .
  eq '_implies_['A:Bool, 'B:Bool] = 'not_['_xor_['A:Bool, '_and_['A:Bool,
    'B:Bool]]] [none] .
endfm
*********** rule
rl insertedModule(X, Y) < X : User | AS, soln: N > => < X : User | AS >
    getMatch(Y, X, 'MATCH, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, N) .
X --> me
Y --> interpreter(0)
AS --> (none).AttributeSet
N --> 0
insertedModule(me, interpreter(0)) < me : User | soln: 0 >
--->
< me : User | none > getMatch(interpreter(0), me, 'MATCH, 'Z:Foo, 'f['a.Foo,
    'c.Foo], nil, 0)
*********** trial #1
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
*********** solving condition fragment
h(X:Bar) = g(Y:Bar)
*********** equation
eq h(a) = b .
empty substitution
h(a)
--->
b
*********** equation
eq g(c) = b .
empty substitution
g(c)
--->
b
*********** success for condition fragment
h(X:Bar) = g(Y:Bar)
X:Bar --> a
Y:Bar --> c
*********** success #1
*********** membership axiom
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
Bar: f(a, c) becomes Foo
rewrites: 6
mb applications: 1  equational rewrites: 3  rule rewrites: 2  variant narrowing
    steps: 0  narrowing steps: 0
result Configuration: <> < me : User | none > gotMatch(me, interpreter(0), 3, 
  'Z:Foo <- 'f['a.Foo, 'c.Foo])
==========================================
erewrite in XMATCH-TEST : <> < me : User | soln: 0 > createInterpreter(
    interpreterManager, me, none) .
*********** rule
rl < X : User | AS > createdInterpreter(X, Y, Z) => < X : User | AS >
    insertModule(Z, X, upModule('MATCH, true)) .
X --> me
AS --> soln: 0
Y --> interpreterManager
Z --> interpreter(0)
< me : User | soln: 0 > createdInterpreter(me, interpreterManager, interpreter(
    0))
--->
< me : User | soln: 0 > insertModule(interpreter(0), me, upModule('MATCH,
    true))
*********** equation
(built-in equation for symbol upModule)
upModule('MATCH, true)
--->
fmod 'MATCH is
  nil
  sorts 'Bool ; 'Foo ; 'Bar .
  subsort 'Foo < 'Bar .
  op 'if_then_else_fi : 'Bool 'Universal 'Universal -> 'Universal [poly(2 3 0)
    special(
    id-hook('BranchSymbol, nil) 
    term-hook('1, 'true.Bool) 
    term-hook('2, 'false.Bool))] .
  op '_==_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
    id-hook('EqualitySymbol, nil) 
    term-hook('equalTerm, 'true.Bool) 
    term-hook('notEqualTerm, 'false.Bool))] .
  op '_=/=_ : 'Universal 'Universal -> 'Bool [poly(1 2) prec(51) special(
    id-hook('EqualitySymbol, nil) 
    term-hook('equalTerm, 'false.Bool) 
    term-hook('notEqualTerm, 'true.Bool))] .
  op 'true : nil -> 'Bool [ctor special(
    id-hook('SystemTrue, nil))] .
  op 'false : nil -> 'Bool [ctor special(
    id-hook('SystemFalse, nil))] .
  op '_and_ : 'Bool 'Bool -> 'Bool [prec(55) assoc comm] .
  op '_or_ : 'Bool 'Bool -> 'Bool [prec(59) assoc comm] .
  op '_xor_ : 'Bool 'Bool -> 'Bool [prec(57) assoc comm] .
  op 'not_ : 'Bool -> 'Bool [prec(53)] .
  op '_implies_ : 'Bool 'Bool -> 'Bool [prec(61) gather('e 'E)] .
  op 'f : 'Bar 'Bar -> 'Bar [comm] .
  op 'g : 'Foo -> 'Foo [none] .
  op 'h : 'Foo -> 'Foo [none] .
  op 'a : nil -> 'Foo [none] .
  op 'b : nil -> 'Foo [none] .
  op 'c : nil -> 'Foo [none] .
  op 'd : nil -> 'Foo [none] .
  op 'e : nil -> 'Foo [none] .
  cmb 'f['X:Bar, 'Y:Bar] : 'Foo if 'h['X:Bar] = 'g['Y:Bar] [none] .
  eq 'h['a.Foo] = 'b.Foo [none] .
  eq 'g['c.Foo] = 'b.Foo [none] .
  eq 'h['c.Foo] = 'd.Foo [none] .
  eq 'g['a.Foo] = 'd.Foo [none] .
  eq '_and_['true.Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_and_['false.Bool, 'A:Bool] = 'false.Bool [none] .
  eq '_and_['A:Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_xor_['false.Bool, 'A:Bool] = 'A:Bool [none] .
  eq '_xor_['A:Bool, 'A:Bool] = 'false.Bool [none] .
  eq '_and_['A:Bool, '_xor_['B:Bool, 'C:Bool]] = '_xor_['_and_['A:Bool,
    'B:Bool], '_and_['A:Bool, 'C:Bool]] [none] .
  eq 'not_['A:Bool] = '_xor_['true.Bool, 'A:Bool] [none] .
  eq '_or_['A:Bool, 'B:Bool] = '_xor_['_and_['A:Bool, 'B:Bool], '_xor_['A:Bool,
    'B:Bool]] [none] .
  eq '_implies_['A:Bool, 'B:Bool] = 'not_['_xor_['A:Bool, '_and_['A:Bool,
    'B:Bool]]] [none] .
endfm
*********** rule
rl insertedModule(X, Y) < X : User | AS, soln: N > => < X : User | AS >
    getXmatch(Y, X, 'MATCH, 'Z:Foo, 'f['a.Foo, 'c.Foo], nil, 0, unbounded, N) .
X --> me
Y --> interpreter(0)
AS --> (none).AttributeSet
N --> 0
insertedModule(me, interpreter(0)) < me : User | soln: 0 >
--->
< me : User | none > getXmatch(interpreter(0), me, 'MATCH, 'Z:Foo, 'f['a.Foo,
    'c.Foo], nil, 0, unbounded, 0)
*********** trial #1
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
*********** solving condition fragment
h(X:Bar) = g(Y:Bar)
*********** equation
eq h(a) = b .
empty substitution
h(a)
--->
b
*********** equation
eq g(c) = b .
empty substitution
g(c)
--->
b
*********** success for condition fragment
h(X:Bar) = g(Y:Bar)
X:Bar --> a
Y:Bar --> c
*********** success #1
*********** membership axiom
cmb f(X:Bar, Y:Bar) : Foo if h(X:Bar) = g(Y:Bar) .
X:Bar --> a
Y:Bar --> c
Bar: f(a, c) becomes Foo
rewrites: 6
mb applications: 1  equational rewrites: 3  rule rewrites: 2  variant narrowing
    steps: 0  narrowing steps: 0
result Configuration: <> < me : User | none > gotXmatch(me, interpreter(0), 3, 
  'Z:Foo <- 'f['a.Foo, 'c.Foo], [])
Bye.
