Example #1
0
        protected override ILattice <DSDomain> TransferFunctions(int label)
        {
            var block     = GetBlock(label);
            var domain    = _analysisCircle[label].GetDomain();
            var newDomain = block switch
            {
                IntDecl intDecl => IntDeclTransfer(intDecl, domain),
                ArrayDecl arrayDecl => ArrayDeclTransfer(arrayDecl, domain),
                RecordDecl recordDecl => RecDeclTransfer(recordDecl, domain),
                AssignStmt assignStmt => AssignTransfer(assignStmt, domain),
                RecAssignStmt recAssignStmt => RecAssignTransfer(recAssignStmt, domain),
                IfStmt ifStmt => ConditionTransfer(ifStmt.Condition, domain),
                IfElseStmt ifElseStmt => ConditionTransfer(ifElseStmt.Condition, domain),
                WhileStmt whileStmt => ConditionTransfer(whileStmt.Condition, domain),
                WriteStmt writeStmt => WriteTransfer(writeStmt, domain),
                ReadStmt readStmt => ReadTransfer(readStmt, domain),
                _ => DSLattice.Bottom(_program).GetDomain(),
            };

            return(new DSLattice(newDomain));
        }
Example #2
0
 protected override ILattice <DSDomain> Bottom() => DSLattice.Bottom(_program);
Example #3
0
 protected override ILattice <DSDomain> Iota() => DSLattice.Top(_program);