Ejemplo n.º 1
0
        public void Liv_FindPhi()
        {
            List <SsaIdentifier>          a   = BuildScc();
            LinearInductionVariableFinder liv = new LinearInductionVariableFinder(null, dom);
            PhiFunction p = liv.FindPhiFunction(a);

            Assert.IsNotNull(p, "Didn't find phi function!");
        }
Ejemplo n.º 2
0
        public void Liv_FindInitialValue()
        {
            List <SsaIdentifier>          a   = BuildScc();
            LinearInductionVariableFinder liv = new LinearInductionVariableFinder(ssa, dom);
            PhiFunction phi = liv.FindPhiFunction(a);
            Constant    c   = liv.FindInitialValue(phi);

            Assert.AreEqual(0, c.ToInt32());
            Assert.AreEqual("a_1 = 0<32>", liv.Context.InitialStatement.ToString());
        }
		public void Liv_FindInitialValue()
		{
			List<SsaIdentifier> a = BuildScc();
			LinearInductionVariableFinder liv = new LinearInductionVariableFinder(null, ssaIds, dom);
			PhiFunction phi = liv.FindPhiFunction(a);
			Constant c = liv.FindInitialValue(phi);
            Assert.AreEqual(0, c.ToInt32());
            Assert.AreEqual("a_0 = 0x00000000", liv.Context.InitialStatement.ToString());
		}
		public void Liv_FindPhi()
		{
			List<SsaIdentifier> a = BuildScc();
			LinearInductionVariableFinder liv = new LinearInductionVariableFinder(null, null, dom);
			PhiFunction p = liv.FindPhiFunction(a);
			Assert.IsNotNull(p, "Didn't find phi function!");
		}