// ** This file was generated with DemFGen (vers:12/15/2010) package gen; import edu.neu.ccs.demeterf.Fields; import edu.neu.ccs.demeterf.lib.ident; import edu.neu.ccs.demeterf.lib.verbatim; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; import edu.neu.ccs.demeterf.lib.*; import edu.neu.ccs.demeterf.*; import java.lang.Integer; /** Computes a simple String representation */ public class ToStr extends edu.neu.ccs.demeterf.FC{ /** Static stub method for calling toStr */ public static String ToStrM(Object o){ return new edu.neu.ccs.demeterf.Traversal(new ToStr(),edu.neu.ccs.demeterf.Control.builtins()).traverse(o); } public String combine(byte _h_) { return ""+_h_; } public String combine(short _h_) { return ""+_h_; } public String combine(int _h_) { return ""+_h_; } public String combine(long _h_) { return ""+_h_; } public String combine(float _h_) { return ""+_h_; } public String combine(double _h_) { return ""+_h_; } public String combine(char _h_) { return "\'"+escape(""+_h_)+"\'"; } public String combine(boolean _h_) { return ""+_h_; } public String combine(String _h_) { return "\""+escape(""+_h_)+"\""; } public String combine(ident _h_) { return ""+_h_; } public String combine(verbatim _h_) { return ""+_h_; } public String combine(ProposeClaimExpectation _h_, String forbidden) { return "ProposeClaimExpectation("+forbidden+")"; } public String combine(OpposeOrAgreeClaimExpectation _h_, String claims) { return "OpposeOrAgreeClaimExpectation("+claims+")"; } public String combine(ProvideInstanceExpectation _h_, String belongsTo) { return "ProvideInstanceExpectation("+belongsTo+")"; } public String combine(ProvideSolutionExpectation _h_, String toBeSolved, String belongsTo) { return "ProvideSolutionExpectation("+toBeSolved+","+belongsTo+")"; } public String combine(ClaimReply _h_, String c) { return "ClaimReply("+c+")"; } public String combine(InstanceReply _h_, String i) { return "InstanceReply("+i+")"; } public String combine(SolutionReply _h_, String s) { return "SolutionReply("+s+")"; } public String combine(RefuteReply _h_, String c) { return "RefuteReply("+c+")"; } public String combine(StrengthenReply _h_, String c) { return "StrengthenReply("+c+")"; } public String combine(AgreeReply _h_) { return "AgreeReply("+")"; } public String combine(TestER _h_, String es, String ss, String d) { return "TestER("+es+","+ss+","+d+")"; } public String combine(InstanceSet _h_) { return "InstanceSet("+")"; } public String combine(Claim _h_, String is, String p) { return "Claim("+is+","+p+")"; } public String combine(Protocol _h_, String state) { return "Protocol("+state+")"; } public String combine(InstanceProvided _h_) { return "InstanceProvided("+")"; } public String combine(InstanceSolved _h_) { return "InstanceSolved("+")"; } public String combine(Start _h_) { return "Start("+")"; } public String combine(End _h_) { return "End("+")"; } public String combine(PlayerProxy _h_) { return "PlayerProxy("+")"; } public String combine(EP _h_, String e, String p, String ok) { return "EP("+e+","+p+","+ok+")"; } public String combine(Expectation _h_) { return "Expectation("+")"; } public String combine(Transaction _h_) { return "Transaction("+")"; } public String combine(Test2 _h_, String i, String s, String d, String c) { return "Test2("+i+","+s+","+d+","+c+")"; } public String combine(Instance _h_) { return "Instance("+")"; } public String combine(Solution _h_) { return "Solution("+")"; } public String combine(Domain _h_) { return "Domain("+")"; } public String combine(Test1 _h_, String i, String s, String d) { return "Test1("+i+","+s+","+d+")"; } public String combine(RED _h_) { return "RED("+")"; } public String combine(BLACK _h_) { return "BLACK("+")"; } public static String escape(String s){ char str[] = s.toCharArray(); StringBuffer ret = new StringBuffer(""); for(char c:str)ret.append(escape(c)); return ret.toString(); } public static String escape(char c){ switch(c){ case '\n':return "\\n"; case '\t':return "\\t"; case '\b':return "\\b"; case '\r':return "\\r"; case '\f':return "\\f"; case '\\':return "\\\\"; case '\'':return "\\'"; case '\"':return "\\\""; default: return ""+c; } } public String combine(Empty _h_) { return "Empty("+")"; } public String combine(Cons _h_, String first, String rest) { return "Cons("+first+","+rest+")"; } }