Exemplo n.º 1
0
        public static void EmitTheEquations(EquationBlock entryPoint, List <EquationBlock> equations, TextWriter where, InvariantQuery <APC> invariantDB)
        {
            Set <string> vars = new Set <string>();

            foreach (EquationBlock b in equations)
            {
                vars.AddRange(b.FormalParameters);
            }
            List <string> allVars = new List <string>(vars);

            allVars.Sort();

            where.WriteLine(Vars(allVars));

            where.WriteLine(Initial(entryPoint));


            where.WriteLine(BEGIN_RULES);
            foreach (EquationBlock b in equations)
            {
                b.EmitEquations(where, invariantDB);
            }
            where.WriteLine(END_RULES);
        }
Exemplo n.º 2
0
 private static string Initial(EquationBlock entry)
 {
     return(SanitizeString(String.Format(INITIAL, entry.Head())));
 }
Exemplo n.º 3
0
 public EquationBody(EquationBlock parent, EquationBlock to, IFunctionalMap <string, string> renamings)
 {
     this.parent    = parent;
     this.to        = to;
     this.renamings = renamings;
 }