Example #1
0
 private MachineState(RootEnvironment rootEnv, int nArgs, int nLocals, InnerMachineState innerState)
 {
     RootEnv         = rootEnv;
     this.nArgs      = nArgs;
     this.nLocals    = nLocals;
     this.innerState = new LogicVar <InnerMachineState>(innerState);
 }
Example #2
0
        public void Unify(RootEnvironment rootEnv, InnerMachineState other, BoolRef changed)
        {
            if (Stack.Count != other.Stack.Count)
            {
                throw new InvalidOperationException("stacks must have the same depth");
            }

            for (var i = 0; i < Stack.Count; i++)
            {
                Stack[i].Unify(rootEnv, other.Stack[i], changed);
            }

            if (Ids != null || other.Ids != null)
            {
                throw new InvalidOperationException("stack slot identifiers cannot be unified");
            }

            ArgsLocalsState.Unify(other.ArgsLocalsState, changed);
        }
Example #3
0
 private MachineState(RootEnvironment rootEnv, int nArgs, int nLocals, InnerMachineState innerState)
 {
     RootEnv = rootEnv;
     this.nArgs = nArgs;
     this.nLocals = nLocals;
     this.innerState = new LogicVar<InnerMachineState>(innerState);
 }
Example #4
0
        public void Unify(RootEnvironment rootEnv, InnerMachineState other, BoolRef changed)
        {
            if (Stack.Count != other.Stack.Count)
                throw new InvalidOperationException("stacks must have the same depth");

            for (var i = 0; i < Stack.Count; i++)
                Stack[i].Unify(rootEnv, other.Stack[i], changed);

            if (Ids != null || other.Ids != null)
                throw new InvalidOperationException("stack slot identifiers cannot be unified");

            ArgsLocalsState.Unify(other.ArgsLocalsState, changed);
        }