Exemplo n.º 1
0
        public void TestStringToTransducer()
        {
            string     program = @"
class LineCount : Transducer<char, int>
{
    int count = 0;

    public override IEnumerable<int> Update(char c)
    {
        if (c == '\n')
        {
            count += 1;
        }
        yield break;
    }

    public override IEnumerable<int> Finish()
    {
        yield return count;
    }
}
";
            Z3Provider solver  = new Z3Provider();
            var        stbs    = CSharpParser.FromString(solver, program);
            //stbs.First().ShowGraph();
        }