public void Visit(Open open)
 {
     _sb.Append("open (");
     open.Exp.Accept(this);
     _sb.Append(" | ");
     foreach (var a in open.Args)
     {
         a.Accept(this);
     }
     _sb.Append(")");
 }
        public void Visit(Open open)
        {
            if (!_env.IsVisitingServer())
                throw new TypeCheckingException("Open(..|..) can be used only within server");

            foreach (var id in open.Args)
            {
                SmclType tmpt = _env.GetMyTypeFromId(id.Name);

                if (!tmpt.IsSecret())
                    throw new TypeCheckingException("open only on secret variables --> " + id.Name);
                tmpt = ConvertToPublic(tmpt);
                _env.VisitPartEnv.Functions[_env.VisitFunName].SymbolTable[id.Name] = tmpt;
            }
            open.Exp.Accept(this);
            open.SmclType = open.Exp.SmclType;
            foreach (var id in open.Args)
            {
                SmclType tmpt = _env.VisitPartEnv.Functions[_env.VisitFunName].SymbolTable[id.Name];
                tmpt = ConvertToSecret(tmpt);
                _env.VisitPartEnv.Functions[_env.VisitFunName].SymbolTable[id.Name] = tmpt;
            }
        }