AlpsArbiter.mesa
Copyright © 1984 by Xerox Corporation. All rights reversed.
Created by: Serlet, June 14, 1985 2:59:02 pm PDT
DIRECTORY
AlpsBool, Convert, Rope;
AlpsArbiter: CEDAR PROGRAM
IMPORTS AlpsBool, Convert, Rope =
BEGIN
Arbiter: PUBLIC PROC [n: INT] RETURNS [table: AlpsBool.TableOfVariables] = {
SMl, SMh, FRl, FRh, G, Gl, SM, FR, Gh: AlpsBool.Expression;
table ← AlpsBool.InitTableOfVariables[10];
SMl ← AlpsBool.ExprFromVarNb[AlpsBool.MakeVar[table, "SMl"]];
FRl ← AlpsBool.ExprFromVarNb[AlpsBool.MakeVar[table, "FRl"]];
G ← AlpsBool.ExprFromVarNb[AlpsBool.MakeVar[table, "G"]];
SMh ← AlpsBool.ExprFromVarNb[AlpsBool.MakeVar[table, "SMh"]];
FRh ← AlpsBool.ExprFromVarNb[AlpsBool.MakeVar[table, "FRh"]];
Gl ← AlpsBool.And[table,
G,
AlpsBool.Or[table,
AlpsBool.And[table, SMl, AlpsBool.Or[table, FRl, AlpsBool.Not[FRh]]],
AlpsBool.And[table, SMh, FRl, AlpsBool.Not[FRh]],
AlpsBool.And[table, AlpsBool.Not[SMl], AlpsBool.Not[SMh], FRl]]];
SM ← AlpsBool.Or[table, SMl, SMh];
FR ← AlpsBool.Or[table, AlpsBool.And[table, FRl, AlpsBool.Not[SMh]], FRh];
Gh ← AlpsBool.And[table,
G,
AlpsBool.Or[table,
AlpsBool.And[table, SMh,AlpsBool.Or[table, FRh, AlpsBool.Not[FRl]]],
AlpsBool.And[table, SMl, FRh, AlpsBool.Not[FRl]],
AlpsBool.And[table, AlpsBool.Not[SMl], AlpsBool.Not[SMh], FRh]]];
[] ← AlpsBool.MakeVar[table, "Gl", output, Gl];
[] ← AlpsBool.MakeVar[table, "SM", output, SM];
[] ← AlpsBool.MakeVar[table, "FR", output, FR];
[] ← AlpsBool.MakeVar[table, "Gh", output, Gh];
};
END.