00001: // ===========================================================================
00002: // This file has been generated by
00003: // Typical, version 1.13.2,
00004: // (C) 2004-2007 Robert Grimm and New York University,
00005: // on Thursday, November 29, 2007 at 11:36:00 PM.
00006: // Edit at your own risk.
00007: // ===========================================================================
00008:
00009: package xtc.typical;
00010:
00011: import java.math.BigInteger;
00012:
00013: import java.util.List;
00014: import java.util.ArrayList;
00015:
00016: import xtc.util.Pair;
00017: import xtc.util.Runtime;
00018: import xtc.util.Function;
00019:
00020: import xtc.tree.Node;
00021: import xtc.tree.GNode;
00022:
00023: /** Type checker for Typical. */
00024: public class TypicalAnalyzer extends Analyzer {
00025: protected String nodeType = null;
00026:
00027: public TypicalAnalyzer(Runtime runt, String nodeType) {
00028: super (runt);
00029: analyzer = analyze;
00030: this .nodeType = nodeType;
00031: }
00032:
00033: public void getScopeNodes() {
00034: processScopeNodes.add("ValueDefinition");
00035: processScopeNodes.add("LetExpression");
00036: processScopeNodes.add("PatternMatch");
00037: }
00038:
00039: final Function.F1<Tuple.T3<Name, String, String>, Node> getNameSpace = new Function.F1<Tuple.T3<Name, String, String>, Node>() {
00040: public Tuple.T3<Name, String, String> apply(final Node n) {
00041: return new Match<Tuple.T3<Name, String, String>>() {
00042: public Tuple.T3<Name, String, String> apply() {
00043: final Node arg$0 = GNode.cast(n);
00044:
00045: if ((null == arg$0)) {
00046: return null;
00047: }
00048: if (TypicalSupport.match$1(arg$0)) {
00049: final String s = (arg$0.size() > 0 ? arg$0
00050: .getString(0) : null);
00051:
00052: matching_nodes.add(arg$0);
00053: if ((null != arg$0 && processScopeNodes
00054: .contains(arg$0.getName()))) {
00055: processScope(arg$0, getScope);
00056: }
00057: checkEnterScope(arg$0);
00058:
00059: final Object retValue$4 = Analyzer
00060: .cast(new Tuple.T3<Name, String, String>(
00061: new Name.SimpleName(s),
00062: "constructor", "type"));
00063:
00064: checkExitScope(arg$0);
00065: matching_nodes
00066: .remove(matching_nodes.size() - 1);
00067: return Analyzer.cast(retValue$4);
00068: }
00069: if (TypicalSupport.match$5(arg$0)) {
00070: final String s = (arg$0.size() > 0 ? arg$0
00071: .getString(0) : null);
00072:
00073: matching_nodes.add(arg$0);
00074: if ((null != arg$0 && processScopeNodes
00075: .contains(arg$0.getName()))) {
00076: processScope(arg$0, getScope);
00077: }
00078: checkEnterScope(arg$0);
00079:
00080: final Object retValue$8 = Analyzer
00081: .cast(new Tuple.T3<Name, String, String>(
00082: new Name.SimpleName(s),
00083: "constructor", "type"));
00084:
00085: checkExitScope(arg$0);
00086: matching_nodes
00087: .remove(matching_nodes.size() - 1);
00088: return Analyzer.cast(retValue$8);
00089: }
00090: if (TypicalSupport.match$9(arg$0)) {
00091: final String s = (arg$0.size() > 0 ? arg$0
00092: .getString(0) : null);
00093:
00094: matching_nodes.add(arg$0);
00095: if ((null != arg$0 && processScopeNodes
00096: .contains(arg$0.getName()))) {
00097: processScope(arg$0, getScope);
00098: }
00099: checkEnterScope(arg$0);
00100:
00101: final Object retValue$12 = Analyzer
00102: .cast(new Tuple.T3<Name, String, String>(
00103: new Name.SimpleName(s),
00104: "constructor", "type"));
00105:
00106: checkExitScope(arg$0);
00107: matching_nodes
00108: .remove(matching_nodes.size() - 1);
00109: return Analyzer.cast(retValue$12);
00110: }
00111: if (TypicalSupport.match$13(arg$0)) {
00112: final String s = (arg$0.size() > 0 ? arg$0
00113: .getString(0) : null);
00114:
00115: matching_nodes.add(arg$0);
00116: if ((null != arg$0 && processScopeNodes
00117: .contains(arg$0.getName()))) {
00118: processScope(arg$0, getScope);
00119: }
00120: checkEnterScope(arg$0);
00121:
00122: final Object retValue$16 = Analyzer
00123: .cast(new Tuple.T3<Name, String, String>(
00124: new Name.SimpleName(s),
00125: "constructor", "type"));
00126:
00127: checkExitScope(arg$0);
00128: matching_nodes
00129: .remove(matching_nodes.size() - 1);
00130: return Analyzer.cast(retValue$16);
00131: }
00132: if (TypicalSupport.match$17(arg$0)) {
00133: final String s = (arg$0.size() > 0 ? arg$0
00134: .getString(0) : null);
00135:
00136: matching_nodes.add(arg$0);
00137: if ((null != arg$0 && processScopeNodes
00138: .contains(arg$0.getName()))) {
00139: processScope(arg$0, getScope);
00140: }
00141: checkEnterScope(arg$0);
00142:
00143: final Object retValue$20 = Analyzer
00144: .cast(new Tuple.T3<Name, String, String>(
00145: new Name.SimpleName(s), "poly",
00146: "type"));
00147:
00148: checkExitScope(arg$0);
00149: matching_nodes
00150: .remove(matching_nodes.size() - 1);
00151: return Analyzer.cast(retValue$20);
00152: }
00153: if (TypicalSupport.match$21(arg$0)) {
00154: final String s = (arg$0.size() > 1 ? arg$0
00155: .getString(1) : null);
00156:
00157: matching_nodes.add(arg$0);
00158: if ((null != arg$0 && processScopeNodes
00159: .contains(arg$0.getName()))) {
00160: processScope(arg$0, getScope);
00161: }
00162: checkEnterScope(arg$0);
00163:
00164: final Object retValue$24 = Analyzer
00165: .cast(new Tuple.T3<Name, String, String>(
00166: new Name.SimpleName(s), "type",
00167: "type"));
00168:
00169: checkExitScope(arg$0);
00170: matching_nodes
00171: .remove(matching_nodes.size() - 1);
00172: return Analyzer.cast(retValue$24);
00173: }
00174: if (TypicalSupport.match$25(arg$0)) {
00175: final String s = (arg$0.size() > 1 ? arg$0
00176: .getString(1) : null);
00177:
00178: matching_nodes.add(arg$0);
00179: if ((null != arg$0 && processScopeNodes
00180: .contains(arg$0.getName()))) {
00181: processScope(arg$0, getScope);
00182: }
00183: checkEnterScope(arg$0);
00184:
00185: final Object retValue$28 = Analyzer
00186: .cast(new Tuple.T3<Name, String, String>(
00187: new Name.SimpleName(s), "type",
00188: "type"));
00189:
00190: checkExitScope(arg$0);
00191: matching_nodes
00192: .remove(matching_nodes.size() - 1);
00193: return Analyzer.cast(retValue$28);
00194: }
00195: if (TypicalSupport.match$29(arg$0)) {
00196: final String s = (arg$0.size() > 0 ? arg$0
00197: .getString(0) : null);
00198:
00199: matching_nodes.add(arg$0);
00200: if ((null != arg$0 && processScopeNodes
00201: .contains(arg$0.getName()))) {
00202: processScope(arg$0, getScope);
00203: }
00204: checkEnterScope(arg$0);
00205:
00206: final Object retValue$32 = Analyzer
00207: .cast(new Tuple.T3<Name, String, String>(
00208: new Name.SimpleName(s), "type",
00209: "type"));
00210:
00211: checkExitScope(arg$0);
00212: matching_nodes
00213: .remove(matching_nodes.size() - 1);
00214: return Analyzer.cast(retValue$32);
00215: }
00216: if (TypicalSupport.match$33(arg$0)) {
00217: final String s = (arg$0.size() > 0 ? arg$0
00218: .getString(0) : null);
00219:
00220: matching_nodes.add(arg$0);
00221: if ((null != arg$0 && processScopeNodes
00222: .contains(arg$0.getName()))) {
00223: processScope(arg$0, getScope);
00224: }
00225: checkEnterScope(arg$0);
00226:
00227: final Object retValue$36 = Analyzer
00228: .cast(new Tuple.T3<Name, String, String>(
00229: new Name.SimpleName(s),
00230: "field", "type"));
00231:
00232: checkExitScope(arg$0);
00233: matching_nodes
00234: .remove(matching_nodes.size() - 1);
00235: return Analyzer.cast(retValue$36);
00236: }
00237: if (TypicalSupport.match$37(arg$0)) {
00238: final String s = (arg$0.size() > 0 ? arg$0
00239: .getString(0) : null);
00240:
00241: matching_nodes.add(arg$0);
00242: if ((null != arg$0 && processScopeNodes
00243: .contains(arg$0.getName()))) {
00244: processScope(arg$0, getScope);
00245: }
00246: checkEnterScope(arg$0);
00247:
00248: final Object retValue$40 = Analyzer
00249: .cast(new Tuple.T3<Name, String, String>(
00250: new Name.SimpleName(s),
00251: "field", "type"));
00252:
00253: checkExitScope(arg$0);
00254: matching_nodes
00255: .remove(matching_nodes.size() - 1);
00256: return Analyzer.cast(retValue$40);
00257: }
00258: if (TypicalSupport.match$41(arg$0)) {
00259: final String s = (arg$0.size() > 0 ? arg$0
00260: .getString(0) : null);
00261:
00262: matching_nodes.add(arg$0);
00263: if ((null != arg$0 && processScopeNodes
00264: .contains(arg$0.getName()))) {
00265: processScope(arg$0, getScope);
00266: }
00267: checkEnterScope(arg$0);
00268:
00269: final Object retValue$44 = Analyzer
00270: .cast(new Tuple.T3<Name, String, String>(
00271: new Name.SimpleName(s),
00272: "field", "type"));
00273:
00274: checkExitScope(arg$0);
00275: matching_nodes
00276: .remove(matching_nodes.size() - 1);
00277: return Analyzer.cast(retValue$44);
00278: }
00279: if (TypicalSupport.match$45(arg$0)) {
00280: final String s = (arg$0.size() > 0 ? arg$0
00281: .getString(0) : null);
00282:
00283: matching_nodes.add(arg$0);
00284: if ((null != arg$0 && processScopeNodes
00285: .contains(arg$0.getName()))) {
00286: processScope(arg$0, getScope);
00287: }
00288: checkEnterScope(arg$0);
00289:
00290: final Object retValue$48 = Analyzer
00291: .cast(new Tuple.T3<Name, String, String>(
00292: new Name.SimpleName(s),
00293: "field", "type"));
00294:
00295: checkExitScope(arg$0);
00296: matching_nodes
00297: .remove(matching_nodes.size() - 1);
00298: return Analyzer.cast(retValue$48);
00299: }
00300: if (TypicalSupport.match$49(arg$0)) {
00301: final String s = (arg$0.size() > 1 ? arg$0
00302: .getString(1) : null);
00303:
00304: matching_nodes.add(arg$0);
00305: if ((null != arg$0 && processScopeNodes
00306: .contains(arg$0.getName()))) {
00307: processScope(arg$0, getScope);
00308: }
00309: checkEnterScope(arg$0);
00310:
00311: final Object retValue$52 = Analyzer
00312: .cast(new Tuple.T3<Name, String, String>(
00313: new Name.SimpleName(s),
00314: "field", "type"));
00315:
00316: checkExitScope(arg$0);
00317: matching_nodes
00318: .remove(matching_nodes.size() - 1);
00319: return Analyzer.cast(retValue$52);
00320: }
00321: if (TypicalSupport.match$53(arg$0)) {
00322: final String s = (arg$0.getGeneric(0).size() > 0 ? arg$0
00323: .getGeneric(0).getString(0)
00324: : null);
00325:
00326: matching_nodes.add(arg$0);
00327: if ((null != arg$0 && processScopeNodes
00328: .contains(arg$0.getName()))) {
00329: processScope(arg$0, getScope);
00330: }
00331: checkEnterScope(arg$0);
00332:
00333: List<Node> listName$55 = new ArrayList<Node>();
00334: Node nodeName$54 = arg$0;
00335:
00336: nodeName$54 = nodeName$54.getGeneric(0);
00337: if ((null != nodeName$54 && processScopeNodes
00338: .contains(nodeName$54.getName()))) {
00339: processScope(nodeName$54, getScope);
00340: }
00341: checkEnterScope(nodeName$54);
00342: listName$55.add(0, nodeName$54);
00343:
00344: final Object retValue$56 = Analyzer
00345: .cast(new Tuple.T3<Name, String, String>(
00346: new Name.SimpleName(s),
00347: "field", "type"));
00348:
00349: for (Node no : listName$55) {
00350: checkExitScope(no);
00351: }
00352: checkExitScope(arg$0);
00353: matching_nodes
00354: .remove(matching_nodes.size() - 1);
00355: return Analyzer.cast(retValue$56);
00356: }
00357: if (TypicalSupport.match$57(arg$0)) {
00358: final String s = (arg$0.size() > 1 ? arg$0
00359: .getString(1) : null);
00360:
00361: matching_nodes.add(arg$0);
00362: if ((null != arg$0 && processScopeNodes
00363: .contains(arg$0.getName()))) {
00364: processScope(arg$0, getScope);
00365: }
00366: checkEnterScope(arg$0);
00367:
00368: final Object retValue$60 = Analyzer
00369: .cast(new Tuple.T3<Name, String, String>(
00370: new Name.SimpleName(s),
00371: "value", "type"));
00372:
00373: checkExitScope(arg$0);
00374: matching_nodes
00375: .remove(matching_nodes.size() - 1);
00376: return Analyzer.cast(retValue$60);
00377: }
00378: if (TypicalSupport.match$61(arg$0)) {
00379: final String s = (arg$0.size() > 0 ? arg$0
00380: .getString(0) : null);
00381:
00382: matching_nodes.add(arg$0);
00383: if ((null != arg$0 && processScopeNodes
00384: .contains(arg$0.getName()))) {
00385: processScope(arg$0, getScope);
00386: }
00387: checkEnterScope(arg$0);
00388:
00389: final Object retValue$64 = Analyzer
00390: .cast(new Tuple.T3<Name, String, String>(
00391: new Name.SimpleName(s),
00392: "value", "type"));
00393:
00394: checkExitScope(arg$0);
00395: matching_nodes
00396: .remove(matching_nodes.size() - 1);
00397: return Analyzer.cast(retValue$64);
00398: }
00399: if (TypicalSupport.match$65(arg$0)) {
00400: final String s = (arg$0.size() > 0 ? arg$0
00401: .getString(0) : null);
00402:
00403: matching_nodes.add(arg$0);
00404: if ((null != arg$0 && processScopeNodes
00405: .contains(arg$0.getName()))) {
00406: processScope(arg$0, getScope);
00407: }
00408: checkEnterScope(arg$0);
00409:
00410: final Object retValue$68 = Analyzer
00411: .cast(new Tuple.T3<Name, String, String>(
00412: new Name.SimpleName(s),
00413: "value", "type"));
00414:
00415: checkExitScope(arg$0);
00416: matching_nodes
00417: .remove(matching_nodes.size() - 1);
00418: return Analyzer.cast(retValue$68);
00419: }
00420: if (TypicalSupport.match$69(arg$0)) {
00421: final String s = (arg$0.size() > 0 ? arg$0
00422: .getString(0) : null);
00423:
00424: matching_nodes.add(arg$0);
00425: if ((null != arg$0 && processScopeNodes
00426: .contains(arg$0.getName()))) {
00427: processScope(arg$0, getScope);
00428: }
00429: checkEnterScope(arg$0);
00430:
00431: final Object retValue$72 = Analyzer
00432: .cast(new Tuple.T3<Name, String, String>(
00433: new Name.SimpleName(s),
00434: "value", "type"));
00435:
00436: checkExitScope(arg$0);
00437: matching_nodes
00438: .remove(matching_nodes.size() - 1);
00439: return Analyzer.cast(retValue$72);
00440: }
00441: if (TypicalSupport.match$73(arg$0)) {
00442: final String s = (arg$0.size() > 0 ? arg$0
00443: .getString(0) : null);
00444:
00445: matching_nodes.add(arg$0);
00446: if ((null != arg$0 && processScopeNodes
00447: .contains(arg$0.getName()))) {
00448: processScope(arg$0, getScope);
00449: }
00450: checkEnterScope(arg$0);
00451:
00452: final Object retValue$76 = Analyzer
00453: .cast(new Tuple.T3<Name, String, String>(
00454: new Name.SimpleName(s),
00455: "value", "type"));
00456:
00457: checkExitScope(arg$0);
00458: matching_nodes
00459: .remove(matching_nodes.size() - 1);
00460: return Analyzer.cast(retValue$76);
00461: }
00462: if (TypicalSupport.match$77(arg$0)) {
00463: final String s = (arg$0.size() > 0 ? arg$0
00464: .getString(0) : null);
00465:
00466: matching_nodes.add(arg$0);
00467: if ((null != arg$0 && processScopeNodes
00468: .contains(arg$0.getName()))) {
00469: processScope(arg$0, getScope);
00470: }
00471: checkEnterScope(arg$0);
00472:
00473: final Object retValue$80 = Analyzer
00474: .cast(new Tuple.T3<Name, String, String>(
00475: new Name.SimpleName(s), "node",
00476: "node"));
00477:
00478: checkExitScope(arg$0);
00479: matching_nodes
00480: .remove(matching_nodes.size() - 1);
00481: return Analyzer.cast(retValue$80);
00482: }
00483: return null;
00484: }
00485: }.apply();
00486: }
00487: };
00488:
00489: final Function.F1<Scope, Node> getScope = new Function.F1<Scope, Node>() {
00490: public Scope apply(final Node n) {
00491: if (TypicalSupport.match$73(n)) {
00492: final String s = (n.size() > 0 ? n.getString(0) : null);
00493: final Node a = (n.size() > 1 ? n.getGeneric(1) : null);
00494: final Node b = (n.size() > 2 ? n.getGeneric(2) : null);
00495:
00496: return Analyzer.cast(new Scope(new ScopeKind.Named(
00497: new Name.SimpleName(s)), new Pair<Node>(a)
00498: .append(new Pair<Node>(b))));
00499: }
00500: if (TypicalSupport.match$83(n)) {
00501: final Node a = (n.size() > 1 ? n.getGeneric(1) : null);
00502:
00503: return Analyzer.cast(new Scope(new ScopeKind.Anonymous(
00504: "let"), new Pair<Node>(a)));
00505: }
00506: if (TypicalSupport.match$84(n)) {
00507: final Node a = Analyzer.cast(n);
00508:
00509: return Analyzer.cast(new Scope(new ScopeKind.Anonymous(
00510: "patternmatching"), new Pair<Node>(a)));
00511: }
00512: return null;
00513: }
00514: };
00515:
00516: final TypicalTypes.raw_type<?> wildt = Analyzer
00517: .cast(new TypicalTypes.WildcardT());
00518: final TypicalTypes.raw_type<?> typet = Analyzer
00519: .cast(new TypicalTypes.TypeName("type"));
00520: final TypicalTypes.raw_type<?> strt = Analyzer
00521: .cast(new TypicalTypes.StringT());
00522: final TypicalTypes.raw_type<?> intt = Analyzer
00523: .cast(new TypicalTypes.IntT());
00524: final TypicalTypes.raw_type<?> boolt = Analyzer
00525: .cast(new TypicalTypes.BoolT());
00526: final TypicalTypes.raw_type<?> floatt = Analyzer
00527: .cast(new TypicalTypes.Float64T());
00528: final TypicalTypes.raw_type<?> nodet = Analyzer
00529: .cast(new TypicalTypes.NodeTypeT());
00530:
00531: final Function.F1<String, TypicalTypes.raw_type<?>> getTypeName = new Function.F1<String, TypicalTypes.raw_type<?>>() {
00532: public String apply(final TypicalTypes.raw_type<?> t) {
00533: return (null == Primitives.isBottom.apply(t) ? null
00534: : Primitives.isBottom.apply(t) ? "null type"
00535: : new Match<String>() {
00536: public String apply() {
00537: final TypicalTypes.raw_type<?> arg$86 = Analyzer
00538: .cast(t);
00539:
00540: if ((null == arg$86)) {
00541: return null;
00542: }
00543: if ((null != arg$86))
00544: switch (arg$86.tag()) {
00545: case PairOfType:
00546: if (TypicalSupport
00547: .match$116(arg$86)) {
00548: final TypicalTypes.raw_type<?> t1 = Analyzer
00549: .cast(arg$86
00550: .getTuple()
00551: .get1());
00552: final TypicalTypes.raw_type<?> t2 = Analyzer
00553: .cast(arg$86
00554: .getTuple()
00555: .get2());
00556:
00557: return Analyzer
00558: .cast(Primitives.concat
00559: .apply(
00560: Primitives.concat
00561: .apply(
00562: Primitives.concat
00563: .apply(
00564: "pair of types of ",
00565: getTypeName
00566: .apply(t1)),
00567: " -> "),
00568: getTypeName
00569: .apply(t2)));
00570: }
00571: break;
00572: case VariableT:
00573: if (TypicalSupport
00574: .match$117(arg$86)) {
00575: final String str = Analyzer
00576: .cast(arg$86
00577: .getTuple()
00578: .get1());
00579:
00580: return Analyzer
00581: .cast(new Let<String>() {
00582: final TypicalTypes.raw_type<?> ty;
00583:
00584: {
00585: ty = Analyzer
00586: .cast(Analyzer
00587: .cast(Primitives.get
00588: .apply(
00589: str,
00590: hashTable)));
00591: }
00592:
00593: public String apply() {
00594: return Analyzer
00595: .cast(null == Primitives.isBottom
00596: .apply(ty) ? null
00597: : Primitives.isBottom
00598: .apply(ty) ? "variable type"
00599: : getTypeName
00600: .apply(ty));
00601: }
00602: }.apply());
00603: }
00604: break;
00605: case StringT:
00606: if (TypicalSupport
00607: .match$91(arg$86)) {
00608: return Analyzer
00609: .cast("string");
00610: }
00611: break;
00612: case FunctionT:
00613: if (TypicalSupport
00614: .match$97(arg$86)) {
00615: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
00616: .cast(arg$86
00617: .getTuple()
00618: .get1());
00619: final TypicalTypes.raw_type<?> t = Analyzer
00620: .cast(arg$86
00621: .getTuple()
00622: .get2());
00623:
00624: return Analyzer
00625: .cast(Primitives.concat
00626: .apply(
00627: Primitives.concat
00628: .apply(
00629: Primitives.concat
00630: .apply(
00631: Primitives.concat
00632: .apply(
00633: "function type (",
00634: getTypeName
00635: .apply(TypicalSupport.head$98
00636: .apply(tl))),
00637: getTypeListName
00638: .apply(
00639: TypicalSupport.tail$99
00640: .apply(tl),
00641: "")),
00642: ") -> "),
00643: getTypeName
00644: .apply(t)));
00645: }
00646: break;
00647: case IntT:
00648: if (TypicalSupport
00649: .match$88(arg$86)) {
00650: return Analyzer
00651: .cast("integer");
00652: }
00653: break;
00654: case VariantT:
00655: if (TypicalSupport
00656: .match$100(arg$86)) {
00657: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
00658: .cast(arg$86
00659: .getTuple()
00660: .get1());
00661:
00662: return Analyzer
00663: .cast(new Let<String>() {
00664: final TypicalTypes.raw_type<?> t;
00665:
00666: {
00667: t = Analyzer
00668: .cast(TypicalSupport.head$98
00669: .apply(tl));
00670: }
00671:
00672: public String apply() {
00673: return Analyzer
00674: .cast(new Match<String>() {
00675: public String apply() {
00676: final TypicalTypes.raw_type<?> arg$104 = Analyzer
00677: .cast(t);
00678:
00679: if ((null == arg$104)) {
00680: return null;
00681: }
00682: if ((null != arg$104))
00683: switch (arg$104
00684: .tag()) {
00685: case ConstructorT:
00686: if (TypicalSupport
00687: .match$94(arg$104)) {
00688: final String s = Analyzer
00689: .cast(arg$104
00690: .getTuple()
00691: .get1());
00692:
00693: return Analyzer
00694: .cast(s);
00695: }
00696: break;
00697: default:
00698: break;
00699: }
00700: ;
00701: if (true) {
00702: return Analyzer
00703: .cast(null);
00704: }
00705: return null;
00706: }
00707: }
00708: .apply());
00709: }
00710: }.apply());
00711: }
00712: break;
00713: case Float64T:
00714: if (TypicalSupport
00715: .match$90(arg$86)) {
00716: return Analyzer
00717: .cast("64-bit float");
00718: }
00719: break;
00720: case ConstructorT:
00721: if (TypicalSupport
00722: .match$94(arg$86)) {
00723: final String s = Analyzer
00724: .cast(arg$86
00725: .getTuple()
00726: .get1());
00727:
00728: return Analyzer.cast(s);
00729: }
00730: break;
00731: case PolyVariantT:
00732: if (TypicalSupport
00733: .match$118(arg$86)) {
00734: return Analyzer
00735: .cast("node");
00736: }
00737: break;
00738: case NodeTypeT:
00739: if (TypicalSupport
00740: .match$119(arg$86)) {
00741: return Analyzer
00742: .cast("node");
00743: }
00744: break;
00745: case AnyT:
00746: if (TypicalSupport
00747: .match$93(arg$86)) {
00748: return Analyzer
00749: .cast("'any'");
00750: }
00751: break;
00752: case WildcardT:
00753: if (TypicalSupport
00754: .match$92(arg$86)) {
00755: return Analyzer
00756: .cast("wildcard");
00757: }
00758: break;
00759: case ConstructedT:
00760: if (TypicalSupport
00761: .match$115(arg$86)) {
00762: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
00763: .cast(arg$86
00764: .getTuple()
00765: .get1());
00766: final String s = Analyzer
00767: .cast(arg$86
00768: .getTuple()
00769: .get2());
00770:
00771: return Analyzer
00772: .cast(Primitives.concat
00773: .apply(
00774: Primitives.concat
00775: .apply(
00776: Primitives.concat
00777: .apply(
00778: Primitives.concat
00779: .apply(
00780: s,
00781: " of ("),
00782: getTypeName
00783: .apply(TypicalSupport.head$98
00784: .apply(tl))),
00785: getTypeListName
00786: .apply(
00787: TypicalSupport.tail$99
00788: .apply(tl),
00789: "")),
00790: ")"));
00791: }
00792: break;
00793: case TypeName:
00794: if (TypicalSupport
00795: .match$95(arg$86)) {
00796: final String s = Analyzer
00797: .cast(arg$86
00798: .getTuple()
00799: .get1());
00800:
00801: return Analyzer.cast(s);
00802: }
00803: break;
00804: case Float32T:
00805: if (TypicalSupport
00806: .match$89(arg$86)) {
00807: return Analyzer
00808: .cast("32-bit float");
00809: }
00810: break;
00811: case BoolT:
00812: if (TypicalSupport
00813: .match$87(arg$86)) {
00814: return Analyzer
00815: .cast("boolean");
00816: }
00817: break;
00818: case FieldT:
00819: if (TypicalSupport
00820: .match$96(arg$86)) {
00821: final TypicalTypes.raw_type<?> ty = Analyzer
00822: .cast(arg$86
00823: .getTuple()
00824: .get3());
00825:
00826: return Analyzer
00827: .cast(getTypeName
00828: .apply(ty));
00829: }
00830: break;
00831: case TupleT:
00832: if (TypicalSupport
00833: .match$114(arg$86)) {
00834: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
00835: .cast(arg$86
00836: .getTuple()
00837: .get1());
00838:
00839: return Analyzer
00840: .cast(Primitives.concat
00841: .apply(
00842: Primitives.concat
00843: .apply(
00844: Primitives.concat
00845: .apply(
00846: "tuple type (",
00847: getTypeName
00848: .apply(TypicalSupport.head$98
00849: .apply(tl))),
00850: getTypeListName
00851: .apply(
00852: TypicalSupport.tail$99
00853: .apply(tl),
00854: "")),
00855: ")"));
00856: }
00857: break;
00858: case RecordT:
00859: if (TypicalSupport
00860: .match$107(arg$86)) {
00861: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
00862: .cast(arg$86
00863: .getTuple()
00864: .get1());
00865:
00866: return Analyzer
00867: .cast(new Let<String>() {
00868: final TypicalTypes.raw_type<?> t;
00869:
00870: {
00871: t = Analyzer
00872: .cast(TypicalSupport.head$98
00873: .apply(tl));
00874: }
00875:
00876: public String apply() {
00877: return Analyzer
00878: .cast(new Match<String>() {
00879: public String apply() {
00880: final TypicalTypes.raw_type<?> arg$111 = Analyzer
00881: .cast(t);
00882:
00883: if ((null == arg$111)) {
00884: return null;
00885: }
00886: if ((null != arg$111))
00887: switch (arg$111
00888: .tag()) {
00889: case FieldT:
00890: if (TypicalSupport
00891: .match$96(arg$111)) {
00892: final String s = Analyzer
00893: .cast(arg$111
00894: .getTuple()
00895: .get1());
00896:
00897: return Analyzer
00898: .cast(s);
00899: }
00900: break;
00901: default:
00902: break;
00903: }
00904: ;
00905: if (true) {
00906: return Analyzer
00907: .cast(null);
00908: }
00909: return null;
00910: }
00911: }
00912: .apply());
00913: }
00914: }.apply());
00915: }
00916: break;
00917: default:
00918: break;
00919: }
00920: ;
00921: if (true) {
00922: return Analyzer.cast(null);
00923: }
00924: return null;
00925: }
00926: }.apply());
00927: }
00928: };
00929:
00930: final Function.F2<String, Pair<TypicalTypes.raw_type<?>>, String> getTypeListName = new Function.F2<String, Pair<TypicalTypes.raw_type<?>>, String>() {
00931: public String apply(final Pair<TypicalTypes.raw_type<?>> tl,
00932: final String str) {
00933: return (null == Primitives.isBottom.apply(tl) ? null
00934: : Primitives.isBottom.apply(tl) ? str
00935: : new Match<String>() {
00936: public String apply() {
00937: final Pair<TypicalTypes.raw_type<?>> arg$121 = Analyzer
00938: .cast(tl);
00939:
00940: if ((null == arg$121)) {
00941: return null;
00942: }
00943: if (TypicalSupport
00944: .match$122(arg$121)) {
00945: return Analyzer.cast(str);
00946: }
00947: if (true) {
00948: final Pair<TypicalTypes.raw_type<?>> list$123 = Analyzer
00949: .cast(Analyzer
00950: .cast(arg$121));
00951: final TypicalTypes.raw_type<?> x = Analyzer
00952: .cast(Primitives
00953: .wrapHead(list$123));
00954: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
00955: .cast(Primitives
00956: .wrapTail(list$123));
00957:
00958: return Analyzer
00959: .cast(getTypeListName
00960: .apply(
00961: xs,
00962: Primitives.concat
00963: .apply(
00964: Primitives.concat
00965: .apply(
00966: str,
00967: ","),
00968: getTypeName
00969: .apply(x))));
00970: }
00971: return null;
00972: }
00973: }.apply());
00974: }
00975: };
00976:
00977: final Function.F1<TypicalTypes.raw_type<?>, Node> analyze = new Function.F1<TypicalTypes.raw_type<?>, Node>() {
00978: public TypicalTypes.raw_type<?> apply(final Node no) {
00979: return new Match<TypicalTypes.raw_type<?>>() {
00980: public TypicalTypes.raw_type<?> apply() {
00981: final Node arg$125 = GNode.cast(no);
00982:
00983: if ((null == arg$125)) {
00984: return null;
00985: }
00986: if (TypicalSupport.match$126(arg$125)) {
00987: final Node n = (arg$125.size() > 0 ? arg$125
00988: .getGeneric(0) : null);
00989: final Pair<Node> l = Analyzer
00990: .cast(Primitives.getChildren(arg$125,
00991: 1, arg$125.size()));
00992:
00993: matching_nodes.add(arg$125);
00994: if ((null != arg$125 && processScopeNodes
00995: .contains(arg$125.getName()))) {
00996: processScope(arg$125, getScope);
00997: }
00998: checkEnterScope(arg$125);
00999:
01000: final Object retValue$132 = Analyzer
01001: .cast(new Let<TypicalTypes.raw_type<?>>() {
01002: final Pair<Node> nl;
01003: final Pair<TypicalTypes.raw_type<?>> atts;
01004: final Pair<String> strList;
01005:
01006: {
01007: nl = Analyzer
01008: .cast(TypicalSupport.append$127
01009: .apply(
01010: new Pair<Node>(
01011: n),
01012: l));
01013: TypicalSupport.map$128.apply(
01014: scanNode, nl);
01015: atts = Analyzer
01016: .cast(processAttributes
01017: .apply(nl));
01018: createTypeRecord.apply(atts);
01019: preload.apply(no);
01020: strList = Analyzer
01021: .cast(getNodeTypes
01022: .apply(nl));
01023: Primitives.annotate
01024: .apply(
01025: no,
01026: "__node_types",
01027: new TypicalTypes.StringList(
01028: strList));
01029: TypicalSupport.map$129.apply(
01030: analyzeTypeDefinition,
01031: nl);
01032: processFunctionCalls.apply(nl);
01033: processScopeSpace.apply(nl);
01034: TypicalSupport.map$129.apply(
01035: analyze, nl);
01036: checkUnusedParameters.apply(nl);
01037: TypicalSupport.map$128.apply(
01038: resolveNode, nl);
01039: }
01040:
01041: public TypicalTypes.raw_type<?> apply() {
01042: return Analyzer.cast(null);
01043: }
01044: }.apply());
01045:
01046: checkExitScope(arg$125);
01047: matching_nodes
01048: .remove(matching_nodes.size() - 1);
01049: if ((null != arg$125)) {
01050: arg$125.setProperty("__type", retValue$132);
01051: }
01052: return Analyzer.cast(retValue$132);
01053: }
01054: if (TypicalSupport.match$21(arg$125)) {
01055: final Node tp = (arg$125.size() > 0 ? arg$125
01056: .getGeneric(0) : null);
01057: final String s = (arg$125.size() > 1 ? arg$125
01058: .getString(1) : null);
01059: final Node dec = (arg$125.size() > 2 ? arg$125
01060: .getGeneric(2) : null);
01061:
01062: matching_nodes.add(arg$125);
01063: if ((null != arg$125 && processScopeNodes
01064: .contains(arg$125.getName()))) {
01065: processScope(arg$125, getScope);
01066: }
01067: checkEnterScope(arg$125);
01068:
01069: final Object retValue$138 = Analyzer
01070: .cast(null == Primitives.hasAnnotation
01071: .apply(no, "visited") ? null
01072: : Primitives.hasAnnotation
01073: .apply(no, "visited") ? null
01074: : new Let<TypicalTypes.raw_type<?>>() {
01075: {
01076: Primitives.annotate
01077: .apply(
01078: no,
01079: "visited",
01080: wildt);
01081: Primitives.annotate
01082: .apply(
01083: dec,
01084: "parent",
01085: new TypicalTypes.StringName(
01086: s));
01087: }
01088:
01089: public TypicalTypes.raw_type<?> apply() {
01090: return Analyzer
01091: .cast(new Require<TypicalTypes.raw_type<?>>() {
01092: public TypicalTypes.raw_type<?> apply() {
01093: final Boolean var$135 = checkMonomorphic
01094: .apply(
01095: no,
01096: dec);
01097:
01098: if ((null != var$135 && !var$135)) {
01099: showMessage(
01100: "error",
01101: Primitives.concat
01102: .apply(
01103: s,
01104: " must be a monomorphic variant"),
01105: null);
01106: }
01107: if ((null == var$135)) {
01108: return null;
01109: }
01110: if (var$135) {
01111: return (null == Primitives.isBottom
01112: .apply(tp) ? null
01113: : Primitives.isBottom
01114: .apply(tp) ? new Let<TypicalTypes.raw_type<?>>() {
01115: final TypicalTypes.raw_type<?> tdec;
01116:
01117: {
01118: tdec = Analyzer
01119: .cast(analyze
01120: .apply(dec));
01121: redefine
01122: .apply(
01123: no,
01124: tdec,
01125: getNameSpace);
01126: }
01127:
01128: public TypicalTypes.raw_type<?> apply() {
01129: return Analyzer
01130: .cast(tdec);
01131: }
01132: }
01133: .apply()
01134: : new Let<TypicalTypes.raw_type<?>>() {
01135: final Pair<Node> nl;
01136: final Pair<String> vars;
01137:
01138: {
01139: nl = Analyzer
01140: .cast(getNodeList
01141: .apply(tp));
01142: vars = Analyzer
01143: .cast(getTypeVariables
01144: .apply(
01145: nl,
01146: Pair
01147: .<String> empty()));
01148: }
01149:
01150: public TypicalTypes.raw_type<?> apply() {
01151: return Analyzer
01152: .cast(null == Primitives.isNotBottom
01153: .apply(vars)
01154: || !Primitives.isNotBottom
01155: .apply(vars) ? null
01156: : new Let<TypicalTypes.raw_type<?>>() {
01157: final TypicalTypes.raw_type<?> tdec;
01158:
01159: {
01160: Primitives.annotate
01161: .apply(
01162: dec,
01163: "type_variables",
01164: new TypicalTypes.StringList(
01165: vars));
01166: Primitives.annotate
01167: .apply(
01168: no,
01169: "type_variables",
01170: new TypicalTypes.StringList(
01171: vars));
01172: tdec = Analyzer
01173: .cast(analyze
01174: .apply(dec));
01175: checkUnusedVariables
01176: .apply(
01177: vars,
01178: dec);
01179: redefine
01180: .apply(
01181: no,
01182: tdec,
01183: getNameSpace);
01184: }
01185:
01186: public TypicalTypes.raw_type<?> apply() {
01187: return Analyzer
01188: .cast(tdec);
01189: }
01190: }
01191: .apply());
01192: }
01193: }
01194: .apply());
01195: }
01196: return null;
01197: }
01198: }
01199: .apply());
01200: }
01201: }.apply());
01202:
01203: checkExitScope(arg$125);
01204: matching_nodes
01205: .remove(matching_nodes.size() - 1);
01206: if ((null != arg$125)) {
01207: arg$125.setProperty("__type", retValue$138);
01208: }
01209: return Analyzer.cast(retValue$138);
01210: }
01211: if (TypicalSupport.match$33(arg$125)) {
01212: final String s = (arg$125.size() > 0 ? arg$125
01213: .getString(0) : null);
01214: final Node n = (arg$125.size() > 1 ? arg$125
01215: .getGeneric(1) : null);
01216:
01217: matching_nodes.add(arg$125);
01218: if ((null != arg$125 && processScopeNodes
01219: .contains(arg$125.getName()))) {
01220: processScope(arg$125, getScope);
01221: }
01222: checkEnterScope(arg$125);
01223:
01224: final Object retValue$142 = Analyzer
01225: .cast(null == Primitives.hasAnnotation
01226: .apply(no, "visited") ? null
01227: : Primitives.hasAnnotation
01228: .apply(no, "visited") ? Analyzer
01229: .cast(lookup2.apply(no,
01230: getNameSpace))
01231: : new Let<TypicalTypes.raw_type<?>>() {
01232: final TypicalTypes.raw_type<?> t;
01233:
01234: {
01235: Primitives.annotate
01236: .apply(
01237: no,
01238: "visited",
01239: wildt);
01240: t = Analyzer
01241: .cast(analyze
01242: .apply(n));
01243: }
01244:
01245: public TypicalTypes.raw_type<?> apply() {
01246: return Analyzer
01247: .cast(null == Primitives.isNotBottom
01248: .apply(t)
01249: || !Primitives.isNotBottom
01250: .apply(t) ? null
01251: : new Let<TypicalTypes.raw_type<?>>() {
01252: {
01253: define5
01254: .apply(
01255: no,
01256: new TypicalTypes.FieldT(
01257: "type",
01258: s,
01259: t),
01260: "error",
01261: Primitives.concat
01262: .apply(
01263: Primitives.concat
01264: .apply(
01265: "attribute ",
01266: s),
01267: " has been previously defined"),
01268: getNameSpace);
01269: }
01270:
01271: public TypicalTypes.raw_type<?> apply() {
01272: return Analyzer
01273: .cast(new TypicalTypes.FieldT(
01274: "type",
01275: s,
01276: t));
01277: }
01278: }
01279: .apply());
01280: }
01281: }.apply());
01282:
01283: checkExitScope(arg$125);
01284: matching_nodes
01285: .remove(matching_nodes.size() - 1);
01286: if ((null != arg$125)) {
01287: arg$125.setProperty("__type", retValue$142);
01288: }
01289: return Analyzer.cast(retValue$142);
01290: }
01291: if (TypicalSupport.match$37(arg$125)) {
01292: final String s = (arg$125.size() > 0 ? arg$125
01293: .getString(0) : null);
01294: final Node n = (arg$125.size() > 1 ? arg$125
01295: .getGeneric(1) : null);
01296:
01297: matching_nodes.add(arg$125);
01298: if ((null != arg$125 && processScopeNodes
01299: .contains(arg$125.getName()))) {
01300: processScope(arg$125, getScope);
01301: }
01302: checkEnterScope(arg$125);
01303:
01304: final Object retValue$146 = Analyzer
01305: .cast(null == Primitives.hasAnnotation
01306: .apply(no, "visited") ? null
01307: : Primitives.hasAnnotation
01308: .apply(no, "visited") ? Analyzer
01309: .cast(lookup2.apply(no,
01310: getNameSpace))
01311: : new Let<TypicalTypes.raw_type<?>>() {
01312: final TypicalTypes.raw_type<?> t;
01313:
01314: {
01315: Primitives.annotate
01316: .apply(
01317: no,
01318: "visited",
01319: wildt);
01320: t = Analyzer
01321: .cast(analyze
01322: .apply(n));
01323: }
01324:
01325: public TypicalTypes.raw_type<?> apply() {
01326: return Analyzer
01327: .cast(null == Primitives.isNotBottom
01328: .apply(t)
01329: || !Primitives.isNotBottom
01330: .apply(t) ? null
01331: : new Let<TypicalTypes.raw_type<?>>() {
01332: {
01333: define5
01334: .apply(
01335: no,
01336: new TypicalTypes.FieldT(
01337: "type",
01338: s,
01339: t),
01340: "error",
01341: Primitives.concat
01342: .apply(
01343: Primitives.concat
01344: .apply(
01345: "attribute ",
01346: s),
01347: " has been previously defined"),
01348: getNameSpace);
01349: }
01350:
01351: public TypicalTypes.raw_type<?> apply() {
01352: return Analyzer
01353: .cast(new TypicalTypes.FieldT(
01354: "type",
01355: s,
01356: t));
01357: }
01358: }
01359: .apply());
01360: }
01361: }.apply());
01362:
01363: checkExitScope(arg$125);
01364: matching_nodes
01365: .remove(matching_nodes.size() - 1);
01366: if ((null != arg$125)) {
01367: arg$125.setProperty("__type", retValue$146);
01368: }
01369: return Analyzer.cast(retValue$146);
01370: }
01371: if (TypicalSupport.match$147(arg$125)) {
01372: final String s = (arg$125.size() > 0 ? arg$125
01373: .getString(0) : null);
01374: final Pair<Node> l = Analyzer
01375: .cast(Primitives.getChildren(arg$125,
01376: 1, arg$125.size()));
01377:
01378: matching_nodes.add(arg$125);
01379: if ((null != arg$125 && processScopeNodes
01380: .contains(arg$125.getName()))) {
01381: processScope(arg$125, getScope);
01382: }
01383: checkEnterScope(arg$125);
01384:
01385: final Object retValue$152 = Analyzer
01386: .cast(new Let<TypicalTypes.raw_type<?>>() {
01387: {
01388: TypicalSupport.map$129.apply(
01389: analyze, l);
01390: }
01391:
01392: public TypicalTypes.raw_type<?> apply() {
01393: return Analyzer
01394: .cast(new Require<Object>() {
01395: public Object apply() {
01396: final Boolean var$149 = Primitives.equal
01397: .apply(
01398: "raw_type",
01399: s);
01400:
01401: if ((null != var$149 && !var$149)) {
01402: showMessage(
01403: "error",
01404: "raw_type is expected in equality definition",
01405: null);
01406: }
01407: if ((null == var$149)) {
01408: return null;
01409: }
01410: if (var$149) {
01411: return null;
01412: }
01413: return null;
01414: }
01415: }.apply());
01416: }
01417: }.apply());
01418:
01419: checkExitScope(arg$125);
01420: matching_nodes
01421: .remove(matching_nodes.size() - 1);
01422: if ((null != arg$125)) {
01423: arg$125.setProperty("__type", retValue$152);
01424: }
01425: return Analyzer.cast(retValue$152);
01426: }
01427: if (TypicalSupport.match$153(arg$125)) {
01428: final Node up = (arg$125.size() > 0 ? arg$125
01429: .getGeneric(0) : null);
01430: final Node n = (arg$125.size() > 1 ? arg$125
01431: .getGeneric(1) : null);
01432: final Pair<Node> l = Analyzer
01433: .cast(Primitives.getChildren(arg$125,
01434: 2, arg$125.size()));
01435:
01436: matching_nodes.add(arg$125);
01437: if ((null != arg$125 && processScopeNodes
01438: .contains(arg$125.getName()))) {
01439: processScope(arg$125, getScope);
01440: }
01441: checkEnterScope(arg$125);
01442:
01443: final Object retValue$182 = Analyzer
01444: .cast(new Let<TypicalTypes.raw_type<?>>() {
01445: final String s;
01446: final Pair<Node> nl;
01447: final TypicalTypes.raw_type<?> t;
01448:
01449: {
01450: s = Analyzer.cast(getString
01451: .apply(up));
01452: nl = Analyzer
01453: .cast(TypicalSupport.append$127
01454: .apply(
01455: new Pair<Node>(
01456: n),
01457: l));
01458: t = Analyzer
01459: .cast(Analyzer
01460: .cast(lookup4
01461: .apply(
01462: up,
01463: "error",
01464: Primitives.concat
01465: .apply(
01466: Primitives.concat
01467: .apply(
01468: "constructor ",
01469: s),
01470: " is undefined"),
01471: getNameSpace)));
01472: }
01473:
01474: public TypicalTypes.raw_type<?> apply() {
01475: return Analyzer
01476: .cast(new Match<TypicalTypes.raw_type<?>>() {
01477: public TypicalTypes.raw_type<?> apply() {
01478: final TypicalTypes.raw_type<?> arg$167 = Analyzer
01479: .cast(t);
01480:
01481: if ((null == arg$167)) {
01482: return null;
01483: }
01484: if ((null != arg$167))
01485: switch (arg$167
01486: .tag()) {
01487: case ConstructorT:
01488: if (TypicalSupport
01489: .match$155(arg$167)) {
01490: final TypicalTypes.raw_type<?> ty = Analyzer
01491: .cast(arg$167
01492: .getTuple()
01493: .get3());
01494:
01495: return Analyzer
01496: .cast(new Match<TypicalTypes.raw_type<?>>() {
01497: public TypicalTypes.raw_type<?> apply() {
01498: final TypicalTypes.raw_type<?> arg$174 = Analyzer
01499: .cast(ty);
01500:
01501: if ((null == arg$174)) {
01502: return null;
01503: }
01504: if ((null != arg$174))
01505: switch (arg$174
01506: .tag()) {
01507: case TupleT:
01508: if (TypicalSupport
01509: .match$114(arg$174)) {
01510: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
01511: .cast(arg$174
01512: .getTuple()
01513: .get1());
01514:
01515: return Analyzer
01516: .cast(null == Primitives.lessInt
01517: .apply(
01518: Primitives.length
01519: .apply(nl),
01520: Primitives.length
01521: .apply(tl)) ? null
01522: : Primitives.lessInt
01523: .apply(
01524: Primitives.length
01525: .apply(nl),
01526: Primitives.length
01527: .apply(tl)) ? error(
01528: Primitives.concat
01529: .apply(
01530: s,
01531: " does not have enough children"),
01532: null)
01533: : null == Primitives.greaterInt
01534: .apply(
01535: Primitives.length
01536: .apply(nl),
01537: Primitives.length
01538: .apply(tl))
01539: || !Primitives.greaterInt
01540: .apply(
01541: Primitives.length
01542: .apply(nl),
01543: Primitives.length
01544: .apply(tl)) ? null
01545: : error(
01546: Primitives.concat
01547: .apply(
01548: s,
01549: " has too many children"),
01550: null));
01551: }
01552: break;
01553: default:
01554: break;
01555: }
01556: ;
01557: if (true) {
01558: return Analyzer
01559: .cast(new Require<Object>() {
01560: public Object apply() {
01561: final Boolean var$177 = Primitives.equal
01562: .apply(
01563: Primitives.length
01564: .apply(nl),
01565: BigInteger
01566: .valueOf(1));
01567:
01568: if ((null != var$177 && !var$177)) {
01569: showMessage(
01570: "error",
01571: Primitives.concat
01572: .apply(
01573: s,
01574: " must have only one child"),
01575: null);
01576: }
01577: if ((null == var$177)) {
01578: return null;
01579: }
01580: if (var$177) {
01581: return null;
01582: }
01583: return null;
01584: }
01585: }
01586: .apply());
01587: }
01588: return null;
01589: }
01590: }
01591: .apply());
01592: }
01593: break;
01594: default:
01595: break;
01596: }
01597: ;
01598: if (true) {
01599: return Analyzer
01600: .cast(error(
01601: "raw_type constructor is expected in equality definition",
01602: null));
01603: }
01604: return null;
01605: }
01606: }.apply());
01607: }
01608: }.apply());
01609:
01610: checkExitScope(arg$125);
01611: matching_nodes
01612: .remove(matching_nodes.size() - 1);
01613: if ((null != arg$125)) {
01614: arg$125.setProperty("__type", retValue$182);
01615: }
01616: return Analyzer.cast(retValue$182);
01617: }
01618: if (TypicalSupport.match$183(arg$125)) {
01619: final Pair<Node> l = Analyzer
01620: .cast(Primitives.getChildren(arg$125,
01621: 0, arg$125.size()));
01622:
01623: matching_nodes.add(arg$125);
01624: if ((null != arg$125 && processScopeNodes
01625: .contains(arg$125.getName()))) {
01626: processScope(arg$125, getScope);
01627: }
01628: checkEnterScope(arg$125);
01629:
01630: final Object retValue$187 = Analyzer
01631: .cast(new Let<TypicalTypes.raw_type<?>>() {
01632: final String str;
01633: final Pair<String> vars;
01634: final Pair<TypicalTypes.raw_type<?>> tl;
01635:
01636: {
01637: str = Analyzer
01638: .cast(getAnnotatedString
01639: .apply(no,
01640: "parent"));
01641: vars = Analyzer
01642: .cast(getAnnotatedStringList
01643: .apply(no,
01644: "type_variables"));
01645: Primitives.annotateList
01646: .apply(
01647: l,
01648: "parent",
01649: new TypicalTypes.StringName(
01650: str));
01651: Analyzer
01652: .discard(null == Primitives.isNotBottom
01653: .apply(vars)
01654: || !Primitives.isNotBottom
01655: .apply(vars) ? null
01656: : Primitives.annotateList
01657: .apply(
01658: l,
01659: "type_variables",
01660: new TypicalTypes.StringList(
01661: vars)));
01662: tl = Analyzer
01663: .cast(TypicalSupport.map$129
01664: .apply(analyze,
01665: l));
01666: }
01667:
01668: public TypicalTypes.raw_type<?> apply() {
01669: return Analyzer
01670: .cast(null == Primitives.not
01671: .apply(TypicalSupport.exists$184
01672: .apply(
01673: Primitives.isBottom,
01674: tl))
01675: || !Primitives.not
01676: .apply(TypicalSupport.exists$184
01677: .apply(
01678: Primitives.isBottom,
01679: tl)) ? null
01680: : new TypicalTypes.RecordT(
01681: tl));
01682: }
01683: }.apply());
01684:
01685: checkExitScope(arg$125);
01686: matching_nodes
01687: .remove(matching_nodes.size() - 1);
01688: if ((null != arg$125)) {
01689: arg$125.setProperty("__type", retValue$187);
01690: }
01691: return Analyzer.cast(retValue$187);
01692: }
01693: if (TypicalSupport.match$41(arg$125)) {
01694: final String s = (arg$125.size() > 0 ? arg$125
01695: .getString(0) : null);
01696: final Node n = (arg$125.size() > 1 ? arg$125
01697: .getGeneric(1) : null);
01698:
01699: matching_nodes.add(arg$125);
01700: if ((null != arg$125 && processScopeNodes
01701: .contains(arg$125.getName()))) {
01702: processScope(arg$125, getScope);
01703: }
01704: checkEnterScope(arg$125);
01705:
01706: final Object retValue$191 = Analyzer
01707: .cast(new Let<TypicalTypes.raw_type<?>>() {
01708: final String ano;
01709: final Pair<String> vars;
01710: final TypicalTypes.raw_type<?> t;
01711:
01712: {
01713: ano = Analyzer
01714: .cast(getAnnotatedString
01715: .apply(no,
01716: "parent"));
01717: vars = Analyzer
01718: .cast(getAnnotatedStringList
01719: .apply(no,
01720: "type_variables"));
01721: Analyzer
01722: .discard(null == Primitives.isNotBottom
01723: .apply(vars)
01724: || !Primitives.isNotBottom
01725: .apply(vars) ? null
01726: : Primitives.annotate
01727: .apply(
01728: n,
01729: "type_variables",
01730: new TypicalTypes.StringList(
01731: vars)));
01732: t = Analyzer.cast(analyze
01733: .apply(n));
01734: }
01735:
01736: public TypicalTypes.raw_type<?> apply() {
01737: return Analyzer
01738: .cast(null == isDefined
01739: .apply(no,
01740: getNameSpace) ? null
01741: : isDefined
01742: .apply(
01743: no,
01744: getNameSpace) ? error(
01745: Primitives.concat
01746: .apply(
01747: Primitives.concat
01748: .apply(
01749: "field ",
01750: s),
01751: " has been previously defined"),
01752: null)
01753: : null == Primitives.isNotBottom
01754: .apply(t)
01755: || !Primitives.isNotBottom
01756: .apply(t) ? null
01757: : new Let<TypicalTypes.raw_type<?>>() {
01758: {
01759: redefine
01760: .apply(
01761: no,
01762: new TypicalTypes.FieldT(
01763: ano,
01764: s,
01765: t),
01766: getNameSpace);
01767: }
01768:
01769: public TypicalTypes.raw_type<?> apply() {
01770: return Analyzer
01771: .cast(new TypicalTypes.FieldT(
01772: ano,
01773: s,
01774: t));
01775: }
01776: }
01777: .apply());
01778: }
01779: }.apply());
01780:
01781: checkExitScope(arg$125);
01782: matching_nodes
01783: .remove(matching_nodes.size() - 1);
01784: if ((null != arg$125)) {
01785: arg$125.setProperty("__type", retValue$191);
01786: }
01787: return Analyzer.cast(retValue$191);
01788: }
01789: if (TypicalSupport.match$192(arg$125)) {
01790: final Pair<Node> nl = Analyzer
01791: .cast(Primitives.getChildren(arg$125,
01792: 0, arg$125.size()));
01793:
01794: matching_nodes.add(arg$125);
01795: if ((null != arg$125 && processScopeNodes
01796: .contains(arg$125.getName()))) {
01797: processScope(arg$125, getScope);
01798: }
01799: checkEnterScope(arg$125);
01800:
01801: final Object retValue$195 = Analyzer
01802: .cast(new Let<TypicalTypes.raw_type<?>>() {
01803: final String str;
01804: final Pair<String> vars;
01805: final Pair<TypicalTypes.raw_type<?>> tl;
01806:
01807: {
01808: str = Analyzer
01809: .cast(getAnnotatedString
01810: .apply(no,
01811: "parent"));
01812: vars = Analyzer
01813: .cast(getAnnotatedStringList
01814: .apply(no,
01815: "type_variables"));
01816: Primitives.annotateList
01817: .apply(
01818: nl,
01819: "parent",
01820: new TypicalTypes.StringName(
01821: str));
01822: Analyzer
01823: .discard(null == Primitives.isNotBottom
01824: .apply(vars)
01825: || !Primitives.isNotBottom
01826: .apply(vars) ? null
01827: : Primitives.annotateList
01828: .apply(
01829: nl,
01830: "type_variables",
01831: new TypicalTypes.StringList(
01832: vars)));
01833: tl = Analyzer
01834: .cast(TypicalSupport.map$129
01835: .apply(analyze,
01836: nl));
01837: }
01838:
01839: public TypicalTypes.raw_type<?> apply() {
01840: return Analyzer
01841: .cast(null == Primitives.not
01842: .apply(TypicalSupport.exists$184
01843: .apply(
01844: Primitives.isBottom,
01845: tl))
01846: || !Primitives.not
01847: .apply(TypicalSupport.exists$184
01848: .apply(
01849: Primitives.isBottom,
01850: tl)) ? null
01851: : new TypicalTypes.VariantT(
01852: tl));
01853: }
01854: }.apply());
01855:
01856: checkExitScope(arg$125);
01857: matching_nodes
01858: .remove(matching_nodes.size() - 1);
01859: if ((null != arg$125)) {
01860: arg$125.setProperty("__type", retValue$195);
01861: }
01862: return Analyzer.cast(retValue$195);
01863: }
01864: if (TypicalSupport.match$13(arg$125)) {
01865: final String s = (arg$125.size() > 0 ? arg$125
01866: .getString(0) : null);
01867: final Node n = (arg$125.size() > 1 ? arg$125
01868: .getGeneric(1) : null);
01869:
01870: matching_nodes.add(arg$125);
01871: if ((null != arg$125 && processScopeNodes
01872: .contains(arg$125.getName()))) {
01873: processScope(arg$125, getScope);
01874: }
01875: checkEnterScope(arg$125);
01876:
01877: final Object retValue$199 = Analyzer
01878: .cast(new Let<TypicalTypes.raw_type<?>>() {
01879: final String ano;
01880: final Pair<String> vars;
01881: final TypicalTypes.raw_type<?> t;
01882:
01883: {
01884: ano = Analyzer
01885: .cast(getAnnotatedString
01886: .apply(no,
01887: "parent"));
01888: vars = Analyzer
01889: .cast(getAnnotatedStringList
01890: .apply(no,
01891: "type_variables"));
01892: Analyzer
01893: .discard(null == Primitives.isNotBottom
01894: .apply(vars)
01895: || !Primitives.isNotBottom
01896: .apply(vars) ? null
01897: : Primitives.annotate
01898: .apply(
01899: n,
01900: "type_variables",
01901: new TypicalTypes.StringList(
01902: vars)));
01903: Primitives.annotate
01904: .apply(
01905: n,
01906: "parent",
01907: new TypicalTypes.StringName(
01908: ano));
01909: t = Analyzer.cast(analyze
01910: .apply(n));
01911: }
01912:
01913: public TypicalTypes.raw_type<?> apply() {
01914: return Analyzer
01915: .cast(null == isDefined
01916: .apply(no,
01917: getNameSpace) ? null
01918: : isDefined
01919: .apply(
01920: no,
01921: getNameSpace) ? error(
01922: Primitives.concat
01923: .apply(
01924: Primitives.concat
01925: .apply(
01926: "constructor ",
01927: s),
01928: " has been previously defined"),
01929: null)
01930: : new Let<TypicalTypes.raw_type<?>>() {
01931: {
01932: redefine
01933: .apply(
01934: no,
01935: new TypicalTypes.ConstructorT(
01936: ano,
01937: s,
01938: t),
01939: getNameSpace);
01940: }
01941:
01942: public TypicalTypes.raw_type<?> apply() {
01943: return Analyzer
01944: .cast(new TypicalTypes.ConstructorT(
01945: ano,
01946: s,
01947: t));
01948: }
01949: }
01950: .apply());
01951: }
01952: }.apply());
01953:
01954: checkExitScope(arg$125);
01955: matching_nodes
01956: .remove(matching_nodes.size() - 1);
01957: if ((null != arg$125)) {
01958: arg$125.setProperty("__type", retValue$199);
01959: }
01960: return Analyzer.cast(retValue$199);
01961: }
01962: if (TypicalSupport.match$200(arg$125)) {
01963: final Pair<Node> nl = Analyzer
01964: .cast(Primitives.getChildren(arg$125,
01965: 0, arg$125.size()));
01966:
01967: matching_nodes.add(arg$125);
01968: if ((null != arg$125 && processScopeNodes
01969: .contains(arg$125.getName()))) {
01970: processScope(arg$125, getScope);
01971: }
01972: checkEnterScope(arg$125);
01973:
01974: final Object retValue$203 = Analyzer
01975: .cast(new Let<TypicalTypes.raw_type<?>>() {
01976: final String str;
01977:
01978: {
01979: str = Analyzer
01980: .cast(getAnnotatedString
01981: .apply(no,
01982: "parent"));
01983: }
01984:
01985: public TypicalTypes.raw_type<?> apply() {
01986: return Analyzer
01987: .cast(null == reachableFromNode
01988: .apply(str) ? null
01989: : reachableFromNode
01990: .apply(str) ? new Let<TypicalTypes.raw_type<?>>() {
01991: final Pair<TypicalTypes.raw_type<?>> tl;
01992:
01993: {
01994: tl = Analyzer
01995: .cast(TypicalSupport.map$129
01996: .apply(
01997: analyze,
01998: nl));
01999: }
02000:
02001: public TypicalTypes.raw_type<?> apply() {
02002: return Analyzer
02003: .cast(null == Primitives.not
02004: .apply(TypicalSupport.exists$184
02005: .apply(
02006: Primitives.isBottom,
02007: tl)) ? null
02008: : Primitives.not
02009: .apply(TypicalSupport.exists$184
02010: .apply(
02011: Primitives.isBottom,
02012: tl)) ? new TypicalTypes.PolyVariantT(
02013: tl)
02014: : null);
02015: }
02016: }.apply()
02017: : error(
02018: "polymorphic variant is not allowed outside node closure",
02019: null));
02020: }
02021: }.apply());
02022:
02023: checkExitScope(arg$125);
02024: matching_nodes
02025: .remove(matching_nodes.size() - 1);
02026: if ((null != arg$125)) {
02027: arg$125.setProperty("__type", retValue$203);
02028: }
02029: return Analyzer.cast(retValue$203);
02030: }
02031: if (TypicalSupport.match$17(arg$125)) {
02032: final String s1 = (arg$125.size() > 0 ? arg$125
02033: .getString(0) : null);
02034: final String s2 = (arg$125.size() > 1 ? arg$125
02035: .getString(1) : null);
02036:
02037: matching_nodes.add(arg$125);
02038: if ((null != arg$125 && processScopeNodes
02039: .contains(arg$125.getName()))) {
02040: processScope(arg$125, getScope);
02041: }
02042: checkEnterScope(arg$125);
02043:
02044: final Object retValue$215 = Analyzer
02045: .cast(new Require<TypicalTypes.raw_type<?>>() {
02046: public TypicalTypes.raw_type<?> apply() {
02047: final Boolean var$212 = isDefined
02048: .apply(
02049: GNode
02050: .create(
02051: "UserDefinedType",
02052: s2),
02053: getNameSpace);
02054:
02055: if ((null != var$212 && !var$212)) {
02056: showMessage(
02057: "error",
02058: Primitives.concat
02059: .apply(s2,
02060: " is undefined"),
02061: null);
02062: }
02063: if ((null == var$212)) {
02064: return null;
02065: }
02066: if (var$212) {
02067: return (null == isDefined
02068: .apply(no,
02069: getNameSpace) ? null
02070: : isDefined
02071: .apply(no,
02072: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
02073: final TypicalTypes.raw_type<?> t;
02074:
02075: {
02076: t = Analyzer
02077: .cast(Analyzer
02078: .cast(lookup2
02079: .apply(
02080: no,
02081: getNameSpace)));
02082: }
02083:
02084: public TypicalTypes.raw_type<?> apply() {
02085: return Analyzer
02086: .cast(new Match<TypicalTypes.raw_type<?>>() {
02087: public TypicalTypes.raw_type<?> apply() {
02088: final TypicalTypes.raw_type<?> arg$209 = Analyzer
02089: .cast(t);
02090:
02091: if ((null == arg$209)) {
02092: return null;
02093: }
02094: if ((null != arg$209))
02095: switch (arg$209
02096: .tag()) {
02097: case TypeName:
02098: if (TypicalSupport
02099: .match$95(arg$209)) {
02100: final String s = Analyzer
02101: .cast(arg$209
02102: .getTuple()
02103: .get1());
02104:
02105: return Analyzer
02106: .cast(null == Primitives.equal
02107: .apply(
02108: s,
02109: s2) ? null
02110: : Primitives.equal
02111: .apply(
02112: s,
02113: s2) ? t
02114: : error(
02115: Primitives.concat
02116: .apply(
02117: Primitives.concat
02118: .apply(
02119: s1,
02120: " is previously defined with "),
02121: s),
02122: null));
02123: }
02124: break;
02125: default:
02126: break;
02127: }
02128: ;
02129: if (true) {
02130: return Analyzer
02131: .cast(error(
02132: Primitives.concat
02133: .apply(
02134: Primitives.concat
02135: .apply(
02136: s1,
02137: " is previously defined with "),
02138: getTypeName
02139: .apply(t)),
02140: null));
02141: }
02142: return null;
02143: }
02144: }
02145: .apply());
02146: }
02147: }.apply()
02148: : new Let<TypicalTypes.raw_type<?>>() {
02149: {
02150: redefine
02151: .apply(
02152: no,
02153: new TypicalTypes.TypeName(
02154: s2),
02155: getNameSpace);
02156: }
02157:
02158: public TypicalTypes.raw_type<?> apply() {
02159: return Analyzer
02160: .cast(new TypicalTypes.TypeName(
02161: s2));
02162: }
02163: }.apply());
02164: }
02165: return null;
02166: }
02167: }.apply());
02168:
02169: checkExitScope(arg$125);
02170: matching_nodes
02171: .remove(matching_nodes.size() - 1);
02172: if ((null != arg$125)) {
02173: arg$125.setProperty("__type", retValue$215);
02174: }
02175: return Analyzer.cast(retValue$215);
02176: }
02177: if (TypicalSupport.match$216(arg$125)) {
02178: final Node n = (arg$125.size() > 0 ? arg$125
02179: .getGeneric(0) : null);
02180:
02181: matching_nodes.add(arg$125);
02182: if ((null != arg$125 && processScopeNodes
02183: .contains(arg$125.getName()))) {
02184: processScope(arg$125, getScope);
02185: }
02186: checkEnterScope(arg$125);
02187:
02188: final Object retValue$219 = Analyzer
02189: .cast(new Let<TypicalTypes.raw_type<?>>() {
02190: {
02191: Primitives.annotate
02192: .apply(
02193: n,
02194: "non_exhaustive",
02195: wildt);
02196: Primitives.annotate.apply(n,
02197: "no_binding_check",
02198: wildt);
02199: Primitives.annotate.apply(n,
02200: "ensure_node", wildt);
02201: }
02202:
02203: public TypicalTypes.raw_type<?> apply() {
02204: return Analyzer.cast(analyze
02205: .apply(n));
02206: }
02207: }.apply());
02208:
02209: checkExitScope(arg$125);
02210: matching_nodes
02211: .remove(matching_nodes.size() - 1);
02212: if ((null != arg$125)) {
02213: arg$125.setProperty("__type", retValue$219);
02214: }
02215: return Analyzer.cast(retValue$219);
02216: }
02217: if (TypicalSupport.match$220(arg$125)) {
02218: final Pair<Node> nl = Analyzer
02219: .cast(Primitives.getChildren(arg$125,
02220: 0, arg$125.size()));
02221:
02222: matching_nodes.add(arg$125);
02223: if ((null != arg$125 && processScopeNodes
02224: .contains(arg$125.getName()))) {
02225: processScope(arg$125, getScope);
02226: }
02227: checkEnterScope(arg$125);
02228:
02229: final Object retValue$226 = Analyzer
02230: .cast(new Let<TypicalTypes.raw_type<?>>() {
02231: final Pair<TypicalTypes.raw_type<?>> tl;
02232:
02233: {
02234: tl = Analyzer
02235: .cast(TypicalSupport.map$129
02236: .apply(analyze,
02237: nl));
02238: }
02239:
02240: public TypicalTypes.raw_type<?> apply() {
02241: return Analyzer
02242: .cast(null == Primitives.not
02243: .apply(TypicalSupport.exists$184
02244: .apply(
02245: Primitives.isBottom,
02246: tl))
02247: || !Primitives.not
02248: .apply(TypicalSupport.exists$184
02249: .apply(
02250: Primitives.isBottom,
02251: tl)) ? null
02252: : new Let<TypicalTypes.raw_type<?>>() {
02253: final TypicalTypes.raw_type<?> res;
02254:
02255: {
02256: res = Analyzer
02257: .cast(TypicalSupport.foldl$222
02258: .apply(
02259: unify,
02260: tl,
02261: wildt));
02262: }
02263:
02264: public TypicalTypes.raw_type<?> apply() {
02265: return Analyzer
02266: .cast(new Require<TypicalTypes.raw_type<?>>() {
02267: public TypicalTypes.raw_type<?> apply() {
02268: final Boolean var$223 = Primitives.isNotBottom
02269: .apply(res);
02270:
02271: if ((null != var$223 && !var$223)) {
02272: showMessage(
02273: "error",
02274: Primitives.concat
02275: .apply(
02276: "types of pattern matches in matching structure ",
02277: "do not match together"),
02278: null);
02279: }
02280: if ((null == var$223)) {
02281: return null;
02282: }
02283: if (var$223) {
02284: return res;
02285: }
02286: return null;
02287: }
02288: }
02289: .apply());
02290: }
02291: }.apply());
02292: }
02293: }.apply());
02294:
02295: checkExitScope(arg$125);
02296: matching_nodes
02297: .remove(matching_nodes.size() - 1);
02298: if ((null != arg$125)) {
02299: arg$125.setProperty("__type", retValue$226);
02300: }
02301: return Analyzer.cast(retValue$226);
02302: }
02303: if (TypicalSupport.match$77(arg$125)) {
02304: final String tagStr = (arg$125.size() > 0 ? arg$125
02305: .getString(0)
02306: : null);
02307: final String typeStr = (arg$125.size() > 1 ? arg$125
02308: .getString(1)
02309: : null);
02310: final Node pat = (arg$125.size() > 2 ? arg$125
02311: .getGeneric(2) : null);
02312:
02313: matching_nodes.add(arg$125);
02314: if ((null != arg$125 && processScopeNodes
02315: .contains(arg$125.getName()))) {
02316: processScope(arg$125, getScope);
02317: }
02318: checkEnterScope(arg$125);
02319:
02320: final Object retValue$232 = Analyzer
02321: .cast(new Let<TypicalTypes.raw_type<?>>() {
02322: final TypicalTypes.raw_type<?> ty;
02323:
02324: {
02325: ty = Analyzer
02326: .cast(Analyzer
02327: .cast(lookup4
02328: .apply(
02329: GNode
02330: .create(
02331: "UserDefinedType",
02332: typeStr),
02333: "error",
02334: Primitives.concat
02335: .apply(
02336: typeStr,
02337: " is an undefined type"),
02338: getNameSpace)));
02339: Primitives.annotate.apply(pat,
02340: "no_binding_check",
02341: wildt);
02342: Primitives.annotate
02343: .apply(
02344: pat,
02345: "non_exhaustive",
02346: wildt);
02347: Primitives.annotate.apply(pat,
02348: "ensure_node", wildt);
02349: }
02350:
02351: public TypicalTypes.raw_type<?> apply() {
02352: return Analyzer
02353: .cast(null == Primitives.isNotBottom
02354: .apply(ty)
02355: || !Primitives.isNotBottom
02356: .apply(ty) ? null
02357: : null == Primitives.not
02358: .apply(isDefined
02359: .apply(
02360: GNode
02361: .create(
02362: "UserDefinedType",
02363: Primitives.concat
02364: .apply(
02365: "tag",
02366: tagStr)),
02367: getNameSpace)) ? null
02368: : Primitives.not
02369: .apply(isDefined
02370: .apply(
02371: GNode
02372: .create(
02373: "UserDefinedType",
02374: Primitives.concat
02375: .apply(
02376: "tag",
02377: tagStr)),
02378: getNameSpace)) ? new Let<TypicalTypes.raw_type<?>>() {
02379: {
02380: redefine
02381: .apply(
02382: GNode
02383: .create(
02384: "UserDefinedType",
02385: Primitives.concat
02386: .apply(
02387: "tag",
02388: tagStr)),
02389: new TypicalTypes.TypeName(
02390: typeStr),
02391: getNameSpace);
02392: }
02393:
02394: public TypicalTypes.raw_type<?> apply() {
02395: return Analyzer
02396: .cast(analyze
02397: .apply(pat));
02398: }
02399: }
02400: .apply()
02401: : new Let<TypicalTypes.raw_type<?>>() {
02402: final TypicalTypes.raw_type<?> ta;
02403:
02404: {
02405: ta = Analyzer
02406: .cast(Analyzer
02407: .cast(lookup2
02408: .apply(
02409: GNode
02410: .create(
02411: "UserDefinedType",
02412: Primitives.concat
02413: .apply(
02414: "tag",
02415: tagStr)),
02416: getNameSpace)));
02417: }
02418:
02419: public TypicalTypes.raw_type<?> apply() {
02420: return Analyzer
02421: .cast(new Require<TypicalTypes.raw_type<?>>() {
02422: public TypicalTypes.raw_type<?> apply() {
02423: final Boolean var$229 = Primitives.isNotBottom
02424: .apply(unify
02425: .apply(
02426: ta,
02427: ty));
02428:
02429: if ((null != var$229 && !var$229)) {
02430: showMessage(
02431: "error",
02432: Primitives.concat
02433: .apply(
02434: Primitives.concat
02435: .apply(
02436: Primitives.concat
02437: .apply(
02438: Primitives.concat
02439: .apply(
02440: Primitives.concat
02441: .apply(
02442: "tag ",
02443: tagStr),
02444: " must be defined with "),
02445: getTypeName
02446: .apply(ta)),
02447: ", found "),
02448: getTypeName
02449: .apply(ty)),
02450: null);
02451: }
02452: if ((null == var$229)) {
02453: return null;
02454: }
02455: if (var$229) {
02456: return analyze
02457: .apply(pat);
02458: }
02459: return null;
02460: }
02461: }
02462: .apply());
02463: }
02464: }
02465: .apply());
02466: }
02467: }.apply());
02468:
02469: checkExitScope(arg$125);
02470: matching_nodes
02471: .remove(matching_nodes.size() - 1);
02472: if ((null != arg$125)) {
02473: arg$125.setProperty("__type", retValue$232);
02474: }
02475: return Analyzer.cast(retValue$232);
02476: }
02477: if (TypicalSupport.match$73(arg$125)) {
02478: final Node p = (arg$125.size() > 1 ? arg$125
02479: .getGeneric(1) : null);
02480: final Node v = (arg$125.size() > 2 ? arg$125
02481: .getGeneric(2) : null);
02482:
02483: matching_nodes.add(arg$125);
02484: if ((null != arg$125 && processScopeNodes
02485: .contains(arg$125.getName()))) {
02486: processScope(arg$125, getScope);
02487: }
02488: checkEnterScope(arg$125);
02489:
02490: final Object retValue$244 = Analyzer
02491: .cast(null == Primitives.hasAnnotation
02492: .apply(no, "visited") ? null
02493: : Primitives.hasAnnotation
02494: .apply(no, "visited") ? Analyzer
02495: .cast(lookup2.apply(no,
02496: getNameSpace))
02497: : new Let<TypicalTypes.raw_type<?>>() {
02498: {
02499: Primitives.annotate
02500: .apply(
02501: no,
02502: "visited",
02503: wildt);
02504: visitDepend
02505: .apply(no);
02506: }
02507:
02508: public TypicalTypes.raw_type<?> apply() {
02509: return Analyzer
02510: .cast(null == Primitives.not
02511: .apply(Primitives.hasAnnotation
02512: .apply(
02513: no,
02514: "secondary")) ? null
02515: : Primitives.not
02516: .apply(Primitives.hasAnnotation
02517: .apply(
02518: no,
02519: "secondary")) ? new Let<TypicalTypes.raw_type<?>>() {
02520: final TypicalTypes.raw_type<?> pts;
02521:
02522: {
02523: pts = Analyzer
02524: .cast(analyze
02525: .apply(p));
02526: }
02527:
02528: public TypicalTypes.raw_type<?> apply() {
02529: return Analyzer
02530: .cast(new Match<TypicalTypes.raw_type<?>>() {
02531: public TypicalTypes.raw_type<?> apply() {
02532: final TypicalTypes.raw_type<?> arg$238 = Analyzer
02533: .cast(pts);
02534:
02535: if ((null == arg$238)) {
02536: return null;
02537: }
02538: if ((null != arg$238))
02539: switch (arg$238
02540: .tag()) {
02541: case TupleT:
02542: if (TypicalSupport
02543: .match$235(arg$238)) {
02544: return Analyzer
02545: .cast(new Let<TypicalTypes.raw_type<?>>() {
02546: final TypicalTypes.raw_type<?> ty;
02547: final TypicalTypes.raw_type<?> ret;
02548:
02549: {
02550: ty = Analyzer
02551: .cast(new TypicalTypes.VariableT(
02552: freshName
02553: .apply("type"),
02554: Boolean.FALSE));
02555: redefine
02556: .apply(
02557: no,
02558: ty,
02559: getNameSpace);
02560: processMutual
02561: .apply(no);
02562: ret = Analyzer
02563: .cast(analyze
02564: .apply(v));
02565: unify
02566: .apply(
02567: ty,
02568: ret);
02569: resolveMutual
02570: .apply(no);
02571: }
02572:
02573: public TypicalTypes.raw_type<?> apply() {
02574: return Analyzer
02575: .cast(Analyzer
02576: .cast(lookup2
02577: .apply(
02578: no,
02579: getNameSpace)));
02580: }
02581: }
02582: .apply());
02583: }
02584: if (TypicalSupport
02585: .match$114(arg$238)) {
02586: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
02587: .cast(arg$238
02588: .getTuple()
02589: .get1());
02590:
02591: return Analyzer
02592: .cast(new Let<TypicalTypes.raw_type<?>>() {
02593: final TypicalTypes.raw_type<?> ty;
02594: final TypicalTypes.raw_type<?> ret;
02595:
02596: {
02597: ty = Analyzer
02598: .cast(new TypicalTypes.VariableT(
02599: freshName
02600: .apply("type"),
02601: Boolean.FALSE));
02602: redefine
02603: .apply(
02604: no,
02605: new TypicalTypes.FunctionT(
02606: tl,
02607: ty),
02608: getNameSpace);
02609: processMutual
02610: .apply(no);
02611: ret = Analyzer
02612: .cast(analyze
02613: .apply(v));
02614: unify
02615: .apply(
02616: ty,
02617: ret);
02618: resolveMutual
02619: .apply(no);
02620: }
02621:
02622: public TypicalTypes.raw_type<?> apply() {
02623: return Analyzer
02624: .cast(Analyzer
02625: .cast(lookup2
02626: .apply(
02627: no,
02628: getNameSpace)));
02629: }
02630: }
02631: .apply());
02632: }
02633: break;
02634: default:
02635: break;
02636: }
02637: ;
02638: if (true) {
02639: return Analyzer
02640: .cast(null);
02641: }
02642: return null;
02643: }
02644: }
02645: .apply());
02646: }
02647: }
02648: .apply()
02649: : Analyzer
02650: .cast(lookup2
02651: .apply(
02652: no,
02653: getNameSpace)));
02654: }
02655: }.apply());
02656:
02657: checkExitScope(arg$125);
02658: matching_nodes
02659: .remove(matching_nodes.size() - 1);
02660: if ((null != arg$125)) {
02661: arg$125.setProperty("__type", retValue$244);
02662: }
02663: return Analyzer.cast(retValue$244);
02664: }
02665: if (TypicalSupport.match$245(arg$125)) {
02666: final Pair<Node> pl = Analyzer
02667: .cast(Primitives.getChildren(arg$125,
02668: 0, arg$125.size()));
02669:
02670: matching_nodes.add(arg$125);
02671: if ((null != arg$125 && processScopeNodes
02672: .contains(arg$125.getName()))) {
02673: processScope(arg$125, getScope);
02674: }
02675: checkEnterScope(arg$125);
02676:
02677: final Object retValue$248 = Analyzer
02678: .cast(new Let<TypicalTypes.raw_type<?>>() {
02679: final Pair<TypicalTypes.raw_type<?>> tl;
02680:
02681: {
02682: tl = Analyzer
02683: .cast(TypicalSupport.map$129
02684: .apply(analyze,
02685: pl));
02686: }
02687:
02688: public TypicalTypes.raw_type<?> apply() {
02689: return Analyzer
02690: .cast(null == Primitives.not
02691: .apply(TypicalSupport.exists$184
02692: .apply(
02693: Primitives.isBottom,
02694: tl))
02695: || !Primitives.not
02696: .apply(TypicalSupport.exists$184
02697: .apply(
02698: Primitives.isBottom,
02699: tl)) ? null
02700: : new TypicalTypes.TupleT(
02701: tl));
02702: }
02703: }.apply());
02704:
02705: checkExitScope(arg$125);
02706: matching_nodes
02707: .remove(matching_nodes.size() - 1);
02708: if ((null != arg$125)) {
02709: arg$125.setProperty("__type", retValue$248);
02710: }
02711: return Analyzer.cast(retValue$248);
02712: }
02713: if (TypicalSupport.match$69(arg$125)) {
02714: final String s = (arg$125.size() > 0 ? arg$125
02715: .getString(0) : null);
02716: final Node n = (arg$125.size() > 1 ? arg$125
02717: .getGeneric(1) : null);
02718:
02719: matching_nodes.add(arg$125);
02720: if ((null != arg$125 && processScopeNodes
02721: .contains(arg$125.getName()))) {
02722: processScope(arg$125, getScope);
02723: }
02724: checkEnterScope(arg$125);
02725:
02726: final Object retValue$254 = Analyzer
02727: .cast(new Require<TypicalTypes.raw_type<?>>() {
02728: public TypicalTypes.raw_type<?> apply() {
02729: final Boolean var$251 = Primitives.not
02730: .apply(isDefinedLocally
02731: .apply(no,
02732: getNameSpace));
02733:
02734: if ((null != var$251 && !var$251)) {
02735: showMessage(
02736: "error",
02737: Primitives.concat
02738: .apply(
02739: Primitives.concat
02740: .apply(
02741: "parameter ",
02742: s),
02743: " has been previously defined"),
02744: null);
02745: }
02746: if ((null == var$251)) {
02747: return null;
02748: }
02749: if (var$251) {
02750: return (null == Primitives.isBottom
02751: .apply(n) ? null
02752: : Primitives.isBottom
02753: .apply(n) ? new Let<TypicalTypes.raw_type<?>>() {
02754: final TypicalTypes.raw_type<?> ty;
02755:
02756: {
02757: ty = Analyzer
02758: .cast(new TypicalTypes.VariableT(
02759: freshName
02760: .apply("type"),
02761: Boolean.FALSE));
02762: define3
02763: .apply(
02764: no,
02765: ty,
02766: getNameSpace);
02767: }
02768:
02769: public TypicalTypes.raw_type<?> apply() {
02770: return Analyzer
02771: .cast(ty);
02772: }
02773: }.apply()
02774: : new Let<TypicalTypes.raw_type<?>>() {
02775: final TypicalTypes.raw_type<?> t;
02776:
02777: {
02778: t = Analyzer
02779: .cast(analyze
02780: .apply(n));
02781: define3
02782: .apply(
02783: no,
02784: t,
02785: getNameSpace);
02786: }
02787:
02788: public TypicalTypes.raw_type<?> apply() {
02789: return Analyzer
02790: .cast(t);
02791: }
02792: }.apply());
02793: }
02794: return null;
02795: }
02796: }.apply());
02797:
02798: checkExitScope(arg$125);
02799: matching_nodes
02800: .remove(matching_nodes.size() - 1);
02801: if ((null != arg$125)) {
02802: arg$125.setProperty("__type", retValue$254);
02803: }
02804: return Analyzer.cast(retValue$254);
02805: }
02806: if (TypicalSupport.match$255(arg$125)) {
02807: final Node n1 = (arg$125.size() > 0 ? arg$125
02808: .getGeneric(0) : null);
02809: final Node n2 = (arg$125.size() > 1 ? arg$125
02810: .getGeneric(1) : null);
02811:
02812: matching_nodes.add(arg$125);
02813: if ((null != arg$125 && processScopeNodes
02814: .contains(arg$125.getName()))) {
02815: processScope(arg$125, getScope);
02816: }
02817: checkEnterScope(arg$125);
02818:
02819: final Object retValue$268 = Analyzer
02820: .cast(new Let<TypicalTypes.raw_type<?>>() {
02821: final TypicalTypes.raw_type<?> t;
02822: final TypicalTypes.raw_type<?> ty;
02823:
02824: {
02825: t = Analyzer.cast(analyze
02826: .apply(n1));
02827: ty = Analyzer.cast(analyze
02828: .apply(n2));
02829: }
02830:
02831: public TypicalTypes.raw_type<?> apply() {
02832: return Analyzer
02833: .cast(new Match<TypicalTypes.raw_type<?>>() {
02834: public TypicalTypes.raw_type<?> apply() {
02835: final TypicalTypes.raw_type<?> arg$261 = Analyzer
02836: .cast(ty);
02837:
02838: if ((null == arg$261)) {
02839: return null;
02840: }
02841: if ((null != arg$261))
02842: switch (arg$261
02843: .tag()) {
02844: case PairOfType:
02845: if (TypicalSupport
02846: .match$116(arg$261)) {
02847: final TypicalTypes.raw_type<?> t1 = Analyzer
02848: .cast(arg$261
02849: .getTuple()
02850: .get1());
02851: final TypicalTypes.raw_type<?> t2 = Analyzer
02852: .cast(arg$261
02853: .getTuple()
02854: .get2());
02855:
02856: return Analyzer
02857: .cast(new Let<TypicalTypes.raw_type<?>>() {
02858: {
02859: new Guard<TypicalTypes.raw_type<?>>() {
02860: public TypicalTypes.raw_type<?> apply() {
02861: if ((null == unify)) {
02862: return null;
02863: }
02864: if ((null == t1)) {
02865: return null;
02866: }
02867: if ((null == t)) {
02868: return null;
02869: }
02870:
02871: final TypicalTypes.raw_type<?> result$264 = unify
02872: .apply(
02873: t,
02874: t1);
02875:
02876: if ((null == result$264)) {
02877: return Analyzer
02878: .cast(error(
02879: Primitives.concat
02880: .apply(
02881: "type of the expression does not match ",
02882: "the type of patterns"),
02883: null));
02884: }
02885: return result$264;
02886: }
02887: }
02888: .apply();
02889: }
02890:
02891: public TypicalTypes.raw_type<?> apply() {
02892: return Analyzer
02893: .cast(t2);
02894: }
02895: }
02896: .apply());
02897: }
02898: break;
02899: default:
02900: break;
02901: }
02902: ;
02903: if (true) {
02904: return Analyzer
02905: .cast(null);
02906: }
02907: return null;
02908: }
02909: }.apply());
02910: }
02911: }.apply());
02912:
02913: checkExitScope(arg$125);
02914: matching_nodes
02915: .remove(matching_nodes.size() - 1);
02916: if ((null != arg$125)) {
02917: arg$125.setProperty("__type", retValue$268);
02918: }
02919: return Analyzer.cast(retValue$268);
02920: }
02921: if (TypicalSupport.match$269(arg$125)) {
02922: final Pair<Node> l = Analyzer
02923: .cast(Primitives.getChildren(arg$125,
02924: 0, arg$125.size()));
02925:
02926: matching_nodes.add(arg$125);
02927: if ((null != arg$125 && processScopeNodes
02928: .contains(arg$125.getName()))) {
02929: processScope(arg$125, getScope);
02930: }
02931: checkEnterScope(arg$125);
02932:
02933: final Object retValue$272 = Analyzer
02934: .cast(new Let<TypicalTypes.raw_type<?>>() {
02935: final Pair<TypicalTypes.raw_type<?>> typeList;
02936:
02937: {
02938: Analyzer
02939: .discard(null == Primitives.hasAnnotation
02940: .apply(no,
02941: "no_binding_check")
02942: || !Primitives.hasAnnotation
02943: .apply(
02944: no,
02945: "no_binding_check") ? null
02946: : Primitives.annotateList
02947: .apply(
02948: l,
02949: "no_binding_check",
02950: wildt));
02951: Analyzer
02952: .discard(null == Primitives.hasAnnotation
02953: .apply(no,
02954: "ensure_node")
02955: || !Primitives.hasAnnotation
02956: .apply(
02957: no,
02958: "ensure_node") ? null
02959: : Primitives.annotateList
02960: .apply(
02961: l,
02962: "ensure_node",
02963: wildt));
02964: typeList = Analyzer
02965: .cast(TypicalSupport.map$129
02966: .apply(analyze,
02967: l));
02968: }
02969:
02970: public TypicalTypes.raw_type<?> apply() {
02971: return Analyzer
02972: .cast(null == Primitives.not
02973: .apply(TypicalSupport.exists$184
02974: .apply(
02975: Primitives.isBottom,
02976: typeList))
02977: || !Primitives.not
02978: .apply(TypicalSupport.exists$184
02979: .apply(
02980: Primitives.isBottom,
02981: typeList)) ? null
02982: : new Let<TypicalTypes.raw_type<?>>() {
02983: final TypicalTypes.raw_type<?> res;
02984:
02985: {
02986: res = Analyzer
02987: .cast(TypicalSupport.foldl$222
02988: .apply(
02989: unify,
02990: typeList,
02991: wildt));
02992: }
02993:
02994: public TypicalTypes.raw_type<?> apply() {
02995: return Analyzer
02996: .cast(null == Primitives.isNotBottom
02997: .apply(res) ? null
02998: : Primitives.isNotBottom
02999: .apply(res) ? new Let<TypicalTypes.raw_type<?>>() {
03000: {
03001: Analyzer
03002: .discard(null == Primitives.hasAnnotation
03003: .apply(
03004: no,
03005: "is_reduce") ? null
03006: : Primitives.hasAnnotation
03007: .apply(
03008: no,
03009: "is_reduce") ? checkReduceMatching
03010: .apply(l)
03011: : checkIrredundant
03012: .apply(l));
03013: Analyzer
03014: .discard(null == Primitives.not
03015: .apply(Primitives.hasAnnotation
03016: .apply(
03017: no,
03018: "non_exhaustive")) ? null
03019: : Primitives.not
03020: .apply(Primitives.hasAnnotation
03021: .apply(
03022: no,
03023: "non_exhaustive")) ? checkExhaustive
03024: .apply(l)
03025: : Boolean.TRUE);
03026: }
03027:
03028: public TypicalTypes.raw_type<?> apply() {
03029: return Analyzer
03030: .cast(res);
03031: }
03032: }
03033: .apply()
03034: : error(
03035: Primitives.concat
03036: .apply(
03037: "types of pattern matches in pattern matching structure ",
03038: "do not match together"),
03039: null));
03040: }
03041: }.apply());
03042: }
03043: }.apply());
03044:
03045: checkExitScope(arg$125);
03046: matching_nodes
03047: .remove(matching_nodes.size() - 1);
03048: if ((null != arg$125)) {
03049: arg$125.setProperty("__type", retValue$272);
03050: }
03051: return Analyzer.cast(retValue$272);
03052: }
03053: if (TypicalSupport.match$84(arg$125)) {
03054: final Node pat = (arg$125.size() > 0 ? arg$125
03055: .getGeneric(0) : null);
03056: final Node ne = (arg$125.size() > 1 ? arg$125
03057: .getGeneric(1) : null);
03058:
03059: matching_nodes.add(arg$125);
03060: if ((null != arg$125 && processScopeNodes
03061: .contains(arg$125.getName()))) {
03062: processScope(arg$125, getScope);
03063: }
03064: checkEnterScope(arg$125);
03065:
03066: final Object retValue$276 = Analyzer
03067: .cast(new Let<TypicalTypes.raw_type<?>>() {
03068: final TypicalTypes.raw_type<?> tpat;
03069: final TypicalTypes.raw_type<?> tne;
03070: final Pair<String> strList;
03071: final Pair<String> newList;
03072:
03073: {
03074: Analyzer
03075: .discard(null == Primitives.hasAnnotation
03076: .apply(no,
03077: "no_binding_check")
03078: || !Primitives.hasAnnotation
03079: .apply(
03080: no,
03081: "no_binding_check") ? null
03082: : Primitives.annotate
03083: .apply(
03084: pat,
03085: "no_binding_check",
03086: wildt));
03087: Analyzer
03088: .discard(null == Primitives.hasAnnotation
03089: .apply(no,
03090: "ensure_node")
03091: || !Primitives.hasAnnotation
03092: .apply(
03093: no,
03094: "ensure_node") ? null
03095: : Primitives.annotate
03096: .apply(
03097: pat,
03098: "ensure_node",
03099: wildt));
03100: tpat = Analyzer.cast(analyze
03101: .apply(pat));
03102: tne = Analyzer.cast(analyze
03103: .apply(ne));
03104: strList = Analyzer
03105: .cast(retrieveVariables
03106: .apply(pat));
03107: Primitives.annotate
03108: .apply(
03109: no,
03110: "variables",
03111: new TypicalTypes.StringList(
03112: strList));
03113: newList = Analyzer
03114: .cast(removeUsedVariables
03115: .apply(strList,
03116: pat));
03117: checkUnusedVariables.apply(
03118: newList, ne);
03119: }
03120:
03121: public TypicalTypes.raw_type<?> apply() {
03122: return Analyzer
03123: .cast(null == Primitives.and
03124: .apply(
03125: Primitives.isNotBottom
03126: .apply(tpat),
03127: Primitives.isNotBottom
03128: .apply(tne))
03129: || !Primitives.and
03130: .apply(
03131: Primitives.isNotBottom
03132: .apply(tpat),
03133: Primitives.isNotBottom
03134: .apply(tne)) ? null
03135: : new TypicalTypes.PairOfType(
03136: tpat,
03137: tne));
03138: }
03139: }.apply());
03140:
03141: checkExitScope(arg$125);
03142: matching_nodes
03143: .remove(matching_nodes.size() - 1);
03144: if ((null != arg$125)) {
03145: arg$125.setProperty("__type", retValue$276);
03146: }
03147: return Analyzer.cast(retValue$276);
03148: }
03149: if (TypicalSupport.match$277(arg$125)) {
03150: final Pair<Node> pl = Analyzer
03151: .cast(Primitives.getChildren(arg$125,
03152: 0, arg$125.size()));
03153:
03154: matching_nodes.add(arg$125);
03155: if ((null != arg$125 && processScopeNodes
03156: .contains(arg$125.getName()))) {
03157: processScope(arg$125, getScope);
03158: }
03159: checkEnterScope(arg$125);
03160:
03161: final Object retValue$282 = Analyzer
03162: .cast(new Let<TypicalTypes.raw_type<?>>() {
03163: final Pair<TypicalTypes.raw_type<?>> tl;
03164:
03165: {
03166: Analyzer
03167: .discard(null == Primitives.hasAnnotation
03168: .apply(no,
03169: "no_binding_check")
03170: || !Primitives.hasAnnotation
03171: .apply(
03172: no,
03173: "no_binding_check") ? null
03174: : Primitives.annotateList
03175: .apply(
03176: pl,
03177: "no_binding_check",
03178: wildt));
03179: tl = Analyzer
03180: .cast(TypicalSupport.map$129
03181: .apply(analyze,
03182: pl));
03183: }
03184:
03185: public TypicalTypes.raw_type<?> apply() {
03186: return Analyzer
03187: .cast(null == Primitives.not
03188: .apply(TypicalSupport.exists$184
03189: .apply(
03190: Primitives.isBottom,
03191: tl))
03192: || !Primitives.not
03193: .apply(TypicalSupport.exists$184
03194: .apply(
03195: Primitives.isBottom,
03196: tl)) ? null
03197: : new Let<TypicalTypes.raw_type<?>>() {
03198: final TypicalTypes.raw_type<?> res;
03199:
03200: {
03201: res = Analyzer
03202: .cast(null == Primitives.hasAnnotation
03203: .apply(
03204: no,
03205: "ensure_node") ? null
03206: : Primitives.hasAnnotation
03207: .apply(
03208: no,
03209: "ensure_node") ? checkNodeList
03210: .apply(tl)
03211: : TypicalSupport.foldl$222
03212: .apply(
03213: unify,
03214: tl,
03215: wildt));
03216: }
03217:
03218: public TypicalTypes.raw_type<?> apply() {
03219: return Analyzer
03220: .cast(null == Primitives.and
03221: .apply(
03222: Primitives.isBottom
03223: .apply(res),
03224: Primitives.not
03225: .apply(Primitives.hasAnnotation
03226: .apply(
03227: no,
03228: "ensure_node"))) ? null
03229: : Primitives.and
03230: .apply(
03231: Primitives.isBottom
03232: .apply(res),
03233: Primitives.not
03234: .apply(Primitives.hasAnnotation
03235: .apply(
03236: no,
03237: "ensure_node"))) ? error(
03238: "types of the patterns do not match together",
03239: null)
03240: : new Let<TypicalTypes.raw_type<?>>() {
03241: final Pair<String> strList;
03242:
03243: {
03244: strList = Analyzer
03245: .cast(retrieveVariables
03246: .apply(TypicalSupport.head$279
03247: .apply(pl)));
03248: }
03249:
03250: public TypicalTypes.raw_type<?> apply() {
03251: return Analyzer
03252: .cast(null == haveSameVariables
03253: .apply(
03254: strList,
03255: TypicalSupport.tail$278
03256: .apply(pl)) ? null
03257: : haveSameVariables
03258: .apply(
03259: strList,
03260: TypicalSupport.tail$278
03261: .apply(pl)) ? new Let<TypicalTypes.raw_type<?>>() {
03262: {
03263: Primitives.annotate
03264: .apply(
03265: no,
03266: "variables",
03267: new TypicalTypes.StringList(
03268: strList));
03269: }
03270:
03271: public TypicalTypes.raw_type<?> apply() {
03272: return Analyzer
03273: .cast(res);
03274: }
03275: }
03276: .apply()
03277: : error(
03278: "parallel patterns do not have the same variables",
03279: null));
03280: }
03281: }
03282: .apply());
03283: }
03284: }.apply());
03285: }
03286: }.apply());
03287:
03288: checkExitScope(arg$125);
03289: matching_nodes
03290: .remove(matching_nodes.size() - 1);
03291: if ((null != arg$125)) {
03292: arg$125.setProperty("__type", retValue$282);
03293: }
03294: return Analyzer.cast(retValue$282);
03295: }
03296: if (TypicalSupport.match$283(arg$125)) {
03297: final Pair<Node> pl = Analyzer
03298: .cast(Primitives.getChildren(arg$125,
03299: 0, arg$125.size()));
03300:
03301: matching_nodes.add(arg$125);
03302: if ((null != arg$125 && processScopeNodes
03303: .contains(arg$125.getName()))) {
03304: processScope(arg$125, getScope);
03305: }
03306: checkEnterScope(arg$125);
03307:
03308: final Object retValue$286 = Analyzer
03309: .cast(new Let<TypicalTypes.raw_type<?>>() {
03310: final Pair<TypicalTypes.raw_type<?>> tl;
03311:
03312: {
03313: Analyzer
03314: .discard(null == Primitives.hasAnnotation
03315: .apply(no,
03316: "no_binding_check")
03317: || !Primitives.hasAnnotation
03318: .apply(
03319: no,
03320: "no_binding_check") ? null
03321: : Primitives.annotateList
03322: .apply(
03323: pl,
03324: "no_binding_check",
03325: wildt));
03326: tl = Analyzer
03327: .cast(TypicalSupport.map$129
03328: .apply(analyze,
03329: pl));
03330: }
03331:
03332: public TypicalTypes.raw_type<?> apply() {
03333: return Analyzer
03334: .cast(null == Primitives.not
03335: .apply(TypicalSupport.exists$184
03336: .apply(
03337: Primitives.isBottom,
03338: tl))
03339: || !Primitives.not
03340: .apply(TypicalSupport.exists$184
03341: .apply(
03342: Primitives.isBottom,
03343: tl)) ? null
03344: : new Let<TypicalTypes.raw_type<?>>() {
03345: final Pair<String> strList;
03346:
03347: {
03348: strList = Analyzer
03349: .cast(combineVariables
03350: .apply(pl));
03351: Primitives.annotate
03352: .apply(
03353: no,
03354: "variables",
03355: new TypicalTypes.StringList(
03356: strList));
03357: }
03358:
03359: public TypicalTypes.raw_type<?> apply() {
03360: return Analyzer
03361: .cast(new TypicalTypes.TupleT(
03362: tl));
03363: }
03364: }.apply());
03365: }
03366: }.apply());
03367:
03368: checkExitScope(arg$125);
03369: matching_nodes
03370: .remove(matching_nodes.size() - 1);
03371: if ((null != arg$125)) {
03372: arg$125.setProperty("__type", retValue$286);
03373: }
03374: return Analyzer.cast(retValue$286);
03375: }
03376: if (TypicalSupport.match$287(arg$125)) {
03377: final Node p = (arg$125.size() > 0 ? arg$125
03378: .getGeneric(0) : null);
03379: final Node e = (arg$125.size() > 1 ? arg$125
03380: .getGeneric(1) : null);
03381:
03382: matching_nodes.add(arg$125);
03383: if ((null != arg$125 && processScopeNodes
03384: .contains(arg$125.getName()))) {
03385: processScope(arg$125, getScope);
03386: }
03387: checkEnterScope(arg$125);
03388:
03389: final Object retValue$292 = Analyzer
03390: .cast(new Let<TypicalTypes.raw_type<?>>() {
03391: final TypicalTypes.raw_type<?> tp;
03392: final TypicalTypes.raw_type<?> te;
03393:
03394: {
03395: Analyzer
03396: .discard(null == Primitives.hasAnnotation
03397: .apply(no,
03398: "no_binding_check")
03399: || !Primitives.hasAnnotation
03400: .apply(
03401: no,
03402: "no_binding_check") ? null
03403: : Primitives.annotate
03404: .apply(
03405: p,
03406: "no_binding_check",
03407: wildt));
03408: tp = Analyzer.cast(analyze
03409: .apply(p));
03410: te = Analyzer.cast(analyze
03411: .apply(e));
03412: new Guard<TypicalTypes.raw_type<?>>() {
03413: public TypicalTypes.raw_type<?> apply() {
03414: if ((null == unify)) {
03415: return null;
03416: }
03417: if ((null == boolt)) {
03418: return null;
03419: }
03420: if ((null == te)) {
03421: return null;
03422: }
03423:
03424: final TypicalTypes.raw_type<?> result$289 = unify
03425: .apply(te,
03426: boolt);
03427:
03428: if ((null == result$289)) {
03429: return Analyzer
03430: .cast(error(
03431: Primitives.concat
03432: .apply(
03433: "expected boolean, found ",
03434: getTypeName
03435: .apply(te)),
03436: e));
03437: }
03438: return result$289;
03439: }
03440: }.apply();
03441: Primitives.annotate
03442: .apply(
03443: no,
03444: "variables",
03445: new TypicalTypes.StringList(
03446: retrieveVariables
03447: .apply(p)));
03448: }
03449:
03450: public TypicalTypes.raw_type<?> apply() {
03451: return Analyzer
03452: .cast(null == Primitives.not
03453: .apply(Primitives.hasAnnotation
03454: .apply(
03455: p,
03456: "has_bindings")) ? null
03457: : Primitives.not
03458: .apply(Primitives.hasAnnotation
03459: .apply(
03460: p,
03461: "has_bindings")) ? tp
03462: : new Let<TypicalTypes.raw_type<?>>() {
03463: {
03464: Primitives.annotate
03465: .apply(
03466: no,
03467: "has_bindings",
03468: wildt);
03469: }
03470:
03471: public TypicalTypes.raw_type<?> apply() {
03472: return Analyzer
03473: .cast(tp);
03474: }
03475: }
03476: .apply());
03477: }
03478: }.apply());
03479:
03480: checkExitScope(arg$125);
03481: matching_nodes
03482: .remove(matching_nodes.size() - 1);
03483: if ((null != arg$125)) {
03484: arg$125.setProperty("__type", retValue$292);
03485: }
03486: return Analyzer.cast(retValue$292);
03487: }
03488: if (TypicalSupport.match$57(arg$125)) {
03489: final Node p = (arg$125.size() > 0 ? arg$125
03490: .getGeneric(0) : null);
03491: final String s = (arg$125.size() > 1 ? arg$125
03492: .getString(1) : null);
03493:
03494: matching_nodes.add(arg$125);
03495: if ((null != arg$125 && processScopeNodes
03496: .contains(arg$125.getName()))) {
03497: processScope(arg$125, getScope);
03498: }
03499: checkEnterScope(arg$125);
03500:
03501: final Object retValue$305 = Analyzer
03502: .cast(new Let<TypicalTypes.raw_type<?>>() {
03503: final TypicalTypes.raw_type<?> tp;
03504:
03505: {
03506: Analyzer
03507: .discard(null == Primitives.hasAnnotation
03508: .apply(no,
03509: "no_binding_check")
03510: || !Primitives.hasAnnotation
03511: .apply(
03512: no,
03513: "no_binding_check") ? null
03514: : Primitives.annotate
03515: .apply(
03516: p,
03517: "no_binding_check",
03518: wildt));
03519: tp = Analyzer.cast(analyze
03520: .apply(p));
03521: }
03522:
03523: public TypicalTypes.raw_type<?> apply() {
03524: return Analyzer
03525: .cast(new Require<TypicalTypes.raw_type<?>>() {
03526: public TypicalTypes.raw_type<?> apply() {
03527: final Boolean var$302 = Primitives.not
03528: .apply(isDefinedLocally
03529: .apply(
03530: no,
03531: getNameSpace));
03532:
03533: if ((null != var$302 && !var$302)) {
03534: showMessage(
03535: "error",
03536: Primitives.concat
03537: .apply(
03538: Primitives.concat
03539: .apply(
03540: "variable ",
03541: s),
03542: " has been previously defined"),
03543: null);
03544: }
03545: if ((null == var$302)) {
03546: return null;
03547: }
03548: if (var$302) {
03549: return new Let<TypicalTypes.raw_type<?>>() {
03550: final TypicalTypes.raw_type<?> res;
03551: final Pair<String> strList;
03552:
03553: {
03554: res = Analyzer
03555: .cast(null == Primitives.isBottom
03556: .apply(tp) ? null
03557: : Primitives.isBottom
03558: .apply(tp) ? null
03559: : new Match<TypicalTypes.raw_type<?>>() {
03560: public TypicalTypes.raw_type<?> apply() {
03561: final TypicalTypes.raw_type<?> arg$299 = Analyzer
03562: .cast(tp);
03563:
03564: if ((null == arg$299)) {
03565: return null;
03566: }
03567: if ((null != arg$299))
03568: switch (arg$299
03569: .tag()) {
03570: case WildcardT:
03571: if (TypicalSupport
03572: .match$92(arg$299)) {
03573: return Analyzer
03574: .cast(new TypicalTypes.VariableT(
03575: freshName
03576: .apply("type"),
03577: Boolean.FALSE));
03578: }
03579: break;
03580: default:
03581: break;
03582: }
03583: ;
03584: if (true) {
03585: return Analyzer
03586: .cast(tp);
03587: }
03588: return null;
03589: }
03590: }
03591: .apply());
03592: redefine
03593: .apply(
03594: no,
03595: res,
03596: getNameSpace);
03597: strList = Analyzer
03598: .cast(TypicalSupport.append$297
03599: .apply(
03600: retrieveVariables
03601: .apply(p),
03602: new Pair<String>(
03603: s)));
03604: Primitives.annotate
03605: .apply(
03606: no,
03607: "variables",
03608: new TypicalTypes.StringList(
03609: strList));
03610: }
03611:
03612: public TypicalTypes.raw_type<?> apply() {
03613: return Analyzer
03614: .cast(null == Primitives.and
03615: .apply(
03616: Primitives.hasAnnotation
03617: .apply(
03618: p,
03619: "has_bindings"),
03620: Primitives.not
03621: .apply(Primitives.hasAnnotation
03622: .apply(
03623: no,
03624: "no_binding_check"))) ? null
03625: : Primitives.and
03626: .apply(
03627: Primitives.hasAnnotation
03628: .apply(
03629: p,
03630: "has_bindings"),
03631: Primitives.not
03632: .apply(Primitives.hasAnnotation
03633: .apply(
03634: no,
03635: "no_binding_check"))) ? error(
03636: "AsPattern contains bindings in the pattern",
03637: null)
03638: : res);
03639: }
03640: }.apply();
03641: }
03642: return null;
03643: }
03644: }.apply());
03645: }
03646: }.apply());
03647:
03648: checkExitScope(arg$125);
03649: matching_nodes
03650: .remove(matching_nodes.size() - 1);
03651: if ((null != arg$125)) {
03652: arg$125.setProperty("__type", retValue$305);
03653: }
03654: return Analyzer.cast(retValue$305);
03655: }
03656: if (TypicalSupport.match$306(arg$125)) {
03657: final Node pat = (arg$125.size() > 0 ? arg$125
03658: .getGeneric(0) : null);
03659: final Node ty = (arg$125.size() > 1 ? arg$125
03660: .getGeneric(1) : null);
03661:
03662: matching_nodes.add(arg$125);
03663: if ((null != arg$125 && processScopeNodes
03664: .contains(arg$125.getName()))) {
03665: processScope(arg$125, getScope);
03666: }
03667: checkEnterScope(arg$125);
03668:
03669: final Object retValue$311 = Analyzer
03670: .cast(new Let<TypicalTypes.raw_type<?>>() {
03671: final TypicalTypes.raw_type<?> tp;
03672: final TypicalTypes.raw_type<?> t;
03673: final TypicalTypes.raw_type<?> res;
03674:
03675: {
03676: Analyzer
03677: .discard(null == Primitives.hasAnnotation
03678: .apply(no,
03679: "no_binding_check")
03680: || !Primitives.hasAnnotation
03681: .apply(
03682: no,
03683: "no_binding_check") ? null
03684: : Primitives.annotate
03685: .apply(
03686: pat,
03687: "no_binding_check",
03688: wildt));
03689: tp = Analyzer.cast(analyze
03690: .apply(pat));
03691: t = Analyzer.cast(analyze
03692: .apply(ty));
03693: res = Analyzer.cast(unify
03694: .apply(t, tp));
03695: new Guard<TypicalTypes.raw_type<?>>() {
03696: public TypicalTypes.raw_type<?> apply() {
03697: if ((null == unify)) {
03698: return null;
03699: }
03700: if ((null == t)) {
03701: return null;
03702: }
03703: if ((null == tp)) {
03704: return null;
03705: }
03706:
03707: final TypicalTypes.raw_type<?> result$308 = unify
03708: .apply(t, tp);
03709:
03710: if ((null == result$308)) {
03711: return Analyzer
03712: .cast(error(
03713: Primitives.concat
03714: .apply(
03715: "type of the pattern does not match ",
03716: "with the explicit type"),
03717: pat));
03718: }
03719: return result$308;
03720: }
03721: }.apply();
03722: Primitives.annotate
03723: .apply(
03724: no,
03725: "variables",
03726: new TypicalTypes.StringList(
03727: retrieveVariables
03728: .apply(pat)));
03729: }
03730:
03731: public TypicalTypes.raw_type<?> apply() {
03732: return Analyzer
03733: .cast(null == Primitives.not
03734: .apply(Primitives.hasAnnotation
03735: .apply(
03736: pat,
03737: "has_bindings")) ? null
03738: : Primitives.not
03739: .apply(Primitives.hasAnnotation
03740: .apply(
03741: pat,
03742: "has_bindings")) ? res
03743: : new Let<TypicalTypes.raw_type<?>>() {
03744: {
03745: Primitives.annotate
03746: .apply(
03747: no,
03748: "has_bindings",
03749: wildt);
03750: }
03751:
03752: public TypicalTypes.raw_type<?> apply() {
03753: return Analyzer
03754: .cast(res);
03755: }
03756: }
03757: .apply());
03758: }
03759: }.apply());
03760:
03761: checkExitScope(arg$125);
03762: matching_nodes
03763: .remove(matching_nodes.size() - 1);
03764: if ((null != arg$125)) {
03765: arg$125.setProperty("__type", retValue$311);
03766: }
03767: return Analyzer.cast(retValue$311);
03768: }
03769: if (TypicalSupport.match$312(arg$125)) {
03770: final Node n = (arg$125.size() > 0 ? arg$125
03771: .getGeneric(0) : null);
03772: final Node con = (arg$125.size() > 1 ? arg$125
03773: .getGeneric(1) : null);
03774:
03775: matching_nodes.add(arg$125);
03776: if ((null != arg$125 && processScopeNodes
03777: .contains(arg$125.getName()))) {
03778: processScope(arg$125, getScope);
03779: }
03780: checkEnterScope(arg$125);
03781:
03782: final Object retValue$320 = Analyzer
03783: .cast(new Let<TypicalTypes.raw_type<?>>() {
03784: final TypicalTypes.raw_type<?> t;
03785: final TypicalTypes.raw_type<?> tl;
03786:
03787: {
03788: Analyzer
03789: .discard(null == Primitives.hasAnnotation
03790: .apply(no,
03791: "no_binding_check")
03792: || !Primitives.hasAnnotation
03793: .apply(
03794: no,
03795: "no_binding_check") ? null
03796: : new Let<Object>() {
03797: {
03798: Primitives.annotate
03799: .apply(
03800: n,
03801: "no_binding_check",
03802: wildt);
03803: }
03804:
03805: public Object apply() {
03806: return Analyzer
03807: .cast(Primitives.annotate
03808: .apply(
03809: con,
03810: "no_binding_check",
03811: wildt));
03812: }
03813: }.apply());
03814: t = Analyzer.cast(analyze
03815: .apply(n));
03816: tl = Analyzer.cast(analyze
03817: .apply(con));
03818: }
03819:
03820: public TypicalTypes.raw_type<?> apply() {
03821: return Analyzer
03822: .cast(null == Primitives.and
03823: .apply(
03824: Primitives.isNotBottom
03825: .apply(t),
03826: Primitives.isNotBottom
03827: .apply(tl))
03828: || !Primitives.and
03829: .apply(
03830: Primitives.isNotBottom
03831: .apply(t),
03832: Primitives.isNotBottom
03833: .apply(tl)) ? null
03834: : null == isListType
03835: .apply(tl) ? null
03836: : isListType
03837: .apply(tl) ? new Let<TypicalTypes.raw_type<?>>() {
03838: final TypicalTypes.raw_type<?> res;
03839:
03840: {
03841: res = Analyzer
03842: .cast(unify
03843: .apply(
03844: tl,
03845: new TypicalTypes.ConstructedT(
03846: new Pair<TypicalTypes.raw_type<?>>(
03847: t),
03848: "list")));
03849: }
03850:
03851: public TypicalTypes.raw_type<?> apply() {
03852: return Analyzer
03853: .cast(new Require<TypicalTypes.raw_type<?>>() {
03854: public TypicalTypes.raw_type<?> apply() {
03855: final Boolean var$317 = Primitives.isNotBottom
03856: .apply(res);
03857:
03858: if ((null != var$317 && !var$317)) {
03859: showMessage(
03860: "error",
03861: Primitives.concat
03862: .apply(
03863: Primitives.concat
03864: .apply(
03865: "type of the head does not match with ",
03866: "type in the list"),
03867: " in cons pattern"),
03868: null);
03869: }
03870: if ((null == var$317)) {
03871: return null;
03872: }
03873: if (var$317) {
03874: return new Require<TypicalTypes.raw_type<?>>() {
03875: public TypicalTypes.raw_type<?> apply() {
03876: final Boolean var$316 = Primitives.or
03877: .apply(
03878: Primitives.not
03879: .apply(isNodeType
03880: .apply(t)),
03881: checkBindings
03882: .apply(
03883: new Pair<Node>(
03884: n)
03885: .append(new Pair<Node>(
03886: con)),
03887: BigInteger
03888: .valueOf(0),
03889: BigInteger
03890: .valueOf(0)));
03891:
03892: if ((null != var$316 && !var$316)) {
03893: showMessage(
03894: "error",
03895: "bindings in different nodes in cons pattern",
03896: null);
03897: }
03898: if ((null == var$316)) {
03899: return null;
03900: }
03901: if (var$316) {
03902: return new Let<TypicalTypes.raw_type<?>>() {
03903: final Pair<String> strList;
03904:
03905: {
03906: strList = Analyzer
03907: .cast(TypicalSupport.union$313
03908: .apply(
03909: retrieveVariables
03910: .apply(n),
03911: retrieveVariables
03912: .apply(con)));
03913: }
03914:
03915: public TypicalTypes.raw_type<?> apply() {
03916: return Analyzer
03917: .cast(null == Primitives.isEmpty
03918: .apply(strList) ? null
03919: : Primitives.isEmpty
03920: .apply(strList) ? res
03921: : new Let<TypicalTypes.raw_type<?>>() {
03922: {
03923: Primitives.annotate
03924: .apply(
03925: no,
03926: "variables",
03927: new TypicalTypes.StringList(
03928: strList));
03929: Primitives.annotate
03930: .apply(
03931: no,
03932: "has_bindings",
03933: wildt);
03934: }
03935:
03936: public TypicalTypes.raw_type<?> apply() {
03937: return Analyzer
03938: .cast(res);
03939: }
03940: }
03941: .apply());
03942: }
03943: }
03944: .apply();
03945: }
03946: return null;
03947: }
03948: }
03949: .apply();
03950: }
03951: return null;
03952: }
03953: }
03954: .apply());
03955: }
03956: }
03957: .apply()
03958: : error(
03959: "the tail of a cons pattern must be a list",
03960: null));
03961: }
03962: }.apply());
03963:
03964: checkExitScope(arg$125);
03965: matching_nodes
03966: .remove(matching_nodes.size() - 1);
03967: if ((null != arg$125)) {
03968: arg$125.setProperty("__type", retValue$320);
03969: }
03970: return Analyzer.cast(retValue$320);
03971: }
03972: if (TypicalSupport.match$321(arg$125)) {
03973: final Pair<Node> nl = Analyzer
03974: .cast(Primitives.getChildren(arg$125,
03975: 0, arg$125.size()));
03976:
03977: matching_nodes.add(arg$125);
03978: if ((null != arg$125 && processScopeNodes
03979: .contains(arg$125.getName()))) {
03980: processScope(arg$125, getScope);
03981: }
03982: checkEnterScope(arg$125);
03983:
03984: final Object retValue$338 = Analyzer
03985: .cast(new Let<TypicalTypes.raw_type<?>>() {
03986: {
03987: Analyzer
03988: .discard(null == Primitives.hasAnnotation
03989: .apply(no,
03990: "no_binding_check")
03991: || !Primitives.hasAnnotation
03992: .apply(
03993: no,
03994: "no_binding_check") ? null
03995: : Primitives.annotateList
03996: .apply(
03997: nl,
03998: "no_binding_check",
03999: wildt));
04000: }
04001:
04002: public TypicalTypes.raw_type<?> apply() {
04003: return Analyzer
04004: .cast(new Match<TypicalTypes.raw_type<?>>() {
04005: public TypicalTypes.raw_type<?> apply() {
04006: final Pair<Node> arg$329 = Analyzer
04007: .cast(nl);
04008:
04009: if ((null == arg$329)) {
04010: return null;
04011: }
04012: if (TypicalSupport
04013: .match$323(arg$329)) {
04014: return Analyzer
04015: .cast(new Let<TypicalTypes.raw_type<?>>() {
04016: final TypicalTypes.raw_type<?> varT;
04017:
04018: {
04019: varT = Analyzer
04020: .cast(new TypicalTypes.VariableT(
04021: freshName
04022: .apply("type"),
04023: Boolean.FALSE));
04024: }
04025:
04026: public TypicalTypes.raw_type<?> apply() {
04027: return Analyzer
04028: .cast(new TypicalTypes.ConstructedT(
04029: new Pair<TypicalTypes.raw_type<?>>(
04030: varT),
04031: "list"));
04032: }
04033: }
04034: .apply());
04035: }
04036: if (true) {
04037: return Analyzer
04038: .cast(new Let<TypicalTypes.raw_type<?>>() {
04039: final Pair<TypicalTypes.raw_type<?>> tl;
04040:
04041: {
04042: tl = Analyzer
04043: .cast(TypicalSupport.map$129
04044: .apply(
04045: analyze,
04046: nl));
04047: }
04048:
04049: public TypicalTypes.raw_type<?> apply() {
04050: return Analyzer
04051: .cast(null == Primitives.not
04052: .apply(TypicalSupport.exists$184
04053: .apply(
04054: Primitives.isBottom,
04055: tl))
04056: || !Primitives.not
04057: .apply(TypicalSupport.exists$184
04058: .apply(
04059: Primitives.isBottom,
04060: tl)) ? null
04061: : new Let<TypicalTypes.raw_type<?>>() {
04062: final TypicalTypes.raw_type<?> res;
04063:
04064: {
04065: res = Analyzer
04066: .cast(TypicalSupport.foldl$222
04067: .apply(
04068: unify,
04069: tl,
04070: wildt));
04071: }
04072:
04073: public TypicalTypes.raw_type<?> apply() {
04074: return Analyzer
04075: .cast(new Require<TypicalTypes.raw_type<?>>() {
04076: public TypicalTypes.raw_type<?> apply() {
04077: final Boolean var$334 = Primitives.isNotBottom
04078: .apply(res);
04079:
04080: if ((null != var$334 && !var$334)) {
04081: showMessage(
04082: "error",
04083: "types do not match in list pattern",
04084: null);
04085: }
04086: if ((null == var$334)) {
04087: return null;
04088: }
04089: if (var$334) {
04090: return new Require<TypicalTypes.raw_type<?>>() {
04091: public TypicalTypes.raw_type<?> apply() {
04092: final Boolean var$333 = Primitives.or
04093: .apply(
04094: Primitives.not
04095: .apply(isNodeType
04096: .apply(res)),
04097: checkBindings
04098: .apply(
04099: nl,
04100: BigInteger
04101: .valueOf(0),
04102: BigInteger
04103: .valueOf(0)));
04104:
04105: if ((null != var$333 && !var$333)) {
04106: showMessage(
04107: "error",
04108: Primitives.concat
04109: .apply(
04110: "bindings in different nodes ",
04111: "in list pattern"),
04112: null);
04113: }
04114: if ((null == var$333)) {
04115: return null;
04116: }
04117: if (var$333) {
04118: return new Let<TypicalTypes.raw_type<?>>() {
04119: final Pair<String> strList;
04120:
04121: {
04122: strList = Analyzer
04123: .cast(combineVariables
04124: .apply(nl));
04125: }
04126:
04127: public TypicalTypes.raw_type<?> apply() {
04128: return Analyzer
04129: .cast(null == Primitives.isEmpty
04130: .apply(strList) ? null
04131: : Primitives.isEmpty
04132: .apply(strList) ? new TypicalTypes.ConstructedT(
04133: new Pair<TypicalTypes.raw_type<?>>(
04134: res),
04135: "list")
04136: : new Let<TypicalTypes.raw_type<?>>() {
04137: {
04138: Primitives.annotate
04139: .apply(
04140: no,
04141: "variables",
04142: new TypicalTypes.StringList(
04143: strList));
04144: Primitives.annotate
04145: .apply(
04146: no,
04147: "has_bindings",
04148: wildt);
04149: }
04150:
04151: public TypicalTypes.raw_type<?> apply() {
04152: return Analyzer
04153: .cast(new TypicalTypes.ConstructedT(
04154: new Pair<TypicalTypes.raw_type<?>>(
04155: res),
04156: "list"));
04157: }
04158: }
04159: .apply());
04160: }
04161: }
04162: .apply();
04163: }
04164: return null;
04165: }
04166: }
04167: .apply();
04168: }
04169: return null;
04170: }
04171: }
04172: .apply());
04173: }
04174: }
04175: .apply());
04176: }
04177: }
04178: .apply());
04179: }
04180: return null;
04181: }
04182: }.apply());
04183: }
04184: }.apply());
04185:
04186: checkExitScope(arg$125);
04187: matching_nodes
04188: .remove(matching_nodes.size() - 1);
04189: if ((null != arg$125)) {
04190: arg$125.setProperty("__type", retValue$338);
04191: }
04192: return Analyzer.cast(retValue$338);
04193: }
04194: if (TypicalSupport.match$339(arg$125)) {
04195: final Pair<Node> nl = Analyzer
04196: .cast(Primitives.getChildren(arg$125,
04197: 0, arg$125.size()));
04198:
04199: matching_nodes.add(arg$125);
04200: if ((null != arg$125 && processScopeNodes
04201: .contains(arg$125.getName()))) {
04202: processScope(arg$125, getScope);
04203: }
04204: checkEnterScope(arg$125);
04205:
04206: final Object retValue$362 = Analyzer
04207: .cast(new Match<TypicalTypes.raw_type<?>>() {
04208: public TypicalTypes.raw_type<?> apply() {
04209: final Pair<Node> arg$350 = Analyzer
04210: .cast(nl);
04211:
04212: if ((null == arg$350)) {
04213: return null;
04214: }
04215: if (TypicalSupport
04216: .match$323(arg$350)) {
04217: return Analyzer
04218: .cast(error(
04219: "empty record pattern",
04220: null));
04221: }
04222: if (true) {
04223: final Pair<Node> list$352 = Analyzer
04224: .cast(Analyzer
04225: .cast(arg$350));
04226: final Node x = GNode
04227: .cast(Primitives
04228: .wrapHead(list$352));
04229: final Pair<Node> xs = Analyzer
04230: .cast(Primitives
04231: .wrapTail(list$352));
04232:
04233: return Analyzer
04234: .cast(new Let<TypicalTypes.raw_type<?>>() {
04235: final TypicalTypes.raw_type<?> tx;
04236:
04237: {
04238: tx = Analyzer
04239: .cast(analyze
04240: .apply(x));
04241: }
04242:
04243: public TypicalTypes.raw_type<?> apply() {
04244: return Analyzer
04245: .cast(new Match<TypicalTypes.raw_type<?>>() {
04246: public TypicalTypes.raw_type<?> apply() {
04247: final TypicalTypes.raw_type<?> arg$356 = Analyzer
04248: .cast(tx);
04249:
04250: if ((null == arg$356)) {
04251: return null;
04252: }
04253: if ((null != arg$356))
04254: switch (arg$356
04255: .tag()) {
04256: case FieldT:
04257: if (TypicalSupport
04258: .match$96(arg$356)) {
04259: final String s = Analyzer
04260: .cast(arg$356
04261: .getTuple()
04262: .get1());
04263:
04264: return Analyzer
04265: .cast(new Let<TypicalTypes.raw_type<?>>() {
04266: final Pair<String> strList;
04267:
04268: {
04269: Primitives.annotateList
04270: .apply(
04271: xs,
04272: "parent",
04273: new TypicalTypes.StringName(
04274: s));
04275: TypicalSupport.map$129
04276: .apply(
04277: analyze,
04278: xs);
04279: strList = Analyzer
04280: .cast(combineVariables
04281: .apply(nl));
04282: Primitives.annotate
04283: .apply(
04284: no,
04285: "variables",
04286: new TypicalTypes.StringList(
04287: strList));
04288: }
04289:
04290: public TypicalTypes.raw_type<?> apply() {
04291: return Analyzer
04292: .cast(Analyzer
04293: .cast(lookup2
04294: .apply(
04295: GNode
04296: .create(
04297: "UserDefinedType",
04298: s),
04299: getNameSpace)));
04300: }
04301: }
04302: .apply());
04303: }
04304: break;
04305: default:
04306: break;
04307: }
04308: ;
04309: if (true) {
04310: return Analyzer
04311: .cast(null);
04312: }
04313: return null;
04314: }
04315: }
04316: .apply());
04317: }
04318: }.apply());
04319: }
04320: return null;
04321: }
04322: }.apply());
04323:
04324: checkExitScope(arg$125);
04325: matching_nodes
04326: .remove(matching_nodes.size() - 1);
04327: if ((null != arg$125)) {
04328: arg$125.setProperty("__type", retValue$362);
04329: }
04330: return Analyzer.cast(retValue$362);
04331: }
04332: if (TypicalSupport.match$363(arg$125)) {
04333: final Node name = (arg$125.size() > 0 ? arg$125
04334: .getGeneric(0) : null);
04335: final Node p = (arg$125.size() > 1 ? arg$125
04336: .getGeneric(1) : null);
04337:
04338: matching_nodes.add(arg$125);
04339: if ((null != arg$125 && processScopeNodes
04340: .contains(arg$125.getName()))) {
04341: processScope(arg$125, getScope);
04342: }
04343: checkEnterScope(arg$125);
04344:
04345: final Object retValue$380 = Analyzer
04346: .cast(new Let<TypicalTypes.raw_type<?>>() {
04347: final String s;
04348: final TypicalTypes.raw_type<?> t;
04349:
04350: {
04351: s = Analyzer.cast(getString
04352: .apply(name));
04353: t = Analyzer
04354: .cast(Analyzer
04355: .cast(lookup4
04356: .apply(
04357: no,
04358: "error",
04359: Primitives.concat
04360: .apply(
04361: Primitives.concat
04362: .apply(
04363: "field ",
04364: s),
04365: " is undefined"),
04366: getNameSpace)));
04367: }
04368:
04369: public TypicalTypes.raw_type<?> apply() {
04370: return Analyzer
04371: .cast(new Match<TypicalTypes.raw_type<?>>() {
04372: public TypicalTypes.raw_type<?> apply() {
04373: final TypicalTypes.raw_type<?> arg$371 = Analyzer
04374: .cast(t);
04375:
04376: if ((null == arg$371)) {
04377: return null;
04378: }
04379: if ((null != arg$371))
04380: switch (arg$371
04381: .tag()) {
04382: case FieldT:
04383: if (TypicalSupport
04384: .match$96(arg$371)) {
04385: final String str = Analyzer
04386: .cast(arg$371
04387: .getTuple()
04388: .get1());
04389:
04390: return Analyzer
04391: .cast(new Let<TypicalTypes.raw_type<?>>() {
04392: final String ps;
04393:
04394: {
04395: ps = Analyzer
04396: .cast(null == Primitives.hasAnnotation
04397: .apply(
04398: no,
04399: "parent") ? null
04400: : Primitives.hasAnnotation
04401: .apply(
04402: no,
04403: "parent") ? new Let<String>() {
04404: final String stri;
04405:
04406: {
04407: stri = Analyzer
04408: .cast(getAnnotatedString
04409: .apply(
04410: no,
04411: "parent"));
04412: }
04413:
04414: public String apply() {
04415: return Analyzer
04416: .cast(stri);
04417: }
04418: }
04419: .apply()
04420: : str);
04421: }
04422:
04423: public TypicalTypes.raw_type<?> apply() {
04424: return Analyzer
04425: .cast(new Require<TypicalTypes.raw_type<?>>() {
04426: public TypicalTypes.raw_type<?> apply() {
04427: final Boolean var$376 = Primitives.equal
04428: .apply(
04429: ps,
04430: str);
04431:
04432: if ((null != var$376 && !var$376)) {
04433: showMessage(
04434: "error",
04435: Primitives.concat
04436: .apply(
04437: Primitives.concat
04438: .apply(
04439: Primitives.concat
04440: .apply(
04441: "record ",
04442: ps),
04443: " does not contain the field "),
04444: s),
04445: null);
04446: }
04447: if ((null == var$376)) {
04448: return null;
04449: }
04450: if (var$376) {
04451: return new Let<TypicalTypes.raw_type<?>>() {
04452: final TypicalTypes.raw_type<?> tp;
04453:
04454: {
04455: tp = Analyzer
04456: .cast(analyze
04457: .apply(p));
04458: new Guard<TypicalTypes.raw_type<?>>() {
04459: public TypicalTypes.raw_type<?> apply() {
04460: if ((null == unify)) {
04461: return null;
04462: }
04463: if ((null == t)) {
04464: return null;
04465: }
04466: if ((null == tp)) {
04467: return null;
04468: }
04469:
04470: final TypicalTypes.raw_type<?> result$375 = unify
04471: .apply(
04472: t,
04473: tp);
04474:
04475: if ((null == result$375)) {
04476: return Analyzer
04477: .cast(error(
04478: Primitives.concat
04479: .apply(
04480: Primitives.concat
04481: .apply(
04482: "type of the pattern does not match with ",
04483: "the declared type of field "),
04484: s),
04485: null));
04486: }
04487: return result$375;
04488: }
04489: }
04490: .apply();
04491: Primitives.annotate
04492: .apply(
04493: no,
04494: "variables",
04495: new TypicalTypes.StringList(
04496: retrieveVariables
04497: .apply(p)));
04498: }
04499:
04500: public TypicalTypes.raw_type<?> apply() {
04501: return Analyzer
04502: .cast(t);
04503: }
04504: }
04505: .apply();
04506: }
04507: return null;
04508: }
04509: }
04510: .apply());
04511: }
04512: }
04513: .apply());
04514: }
04515: break;
04516: default:
04517: break;
04518: }
04519: ;
04520: if (true) {
04521: return Analyzer
04522: .cast(null);
04523: }
04524: return null;
04525: }
04526: }.apply());
04527: }
04528: }.apply());
04529:
04530: checkExitScope(arg$125);
04531: matching_nodes
04532: .remove(matching_nodes.size() - 1);
04533: if ((null != arg$125)) {
04534: arg$125.setProperty("__type", retValue$380);
04535: }
04536: return Analyzer.cast(retValue$380);
04537: }
04538: if (TypicalSupport.match$65(arg$125)) {
04539: final String s = (arg$125.size() > 0 ? arg$125
04540: .getString(0) : null);
04541:
04542: matching_nodes.add(arg$125);
04543: if ((null != arg$125 && processScopeNodes
04544: .contains(arg$125.getName()))) {
04545: processScope(arg$125, getScope);
04546: }
04547: checkEnterScope(arg$125);
04548:
04549: final Object retValue$384 = Analyzer
04550: .cast(null == isDefinedLocally.apply(
04551: no, getNameSpace) ? null
04552: : isDefinedLocally.apply(no,
04553: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
04554: {
04555: Primitives.annotate
04556: .apply(
04557: no,
04558: "variables",
04559: new TypicalTypes.StringList(
04560: new Pair<String>(
04561: s)));
04562: }
04563:
04564: public TypicalTypes.raw_type<?> apply() {
04565: return Analyzer
04566: .cast(Analyzer
04567: .cast(lookup2
04568: .apply(
04569: no,
04570: getNameSpace)));
04571: }
04572: }.apply()
04573: : new Let<TypicalTypes.raw_type<?>>() {
04574: final TypicalTypes.raw_type<?> t;
04575:
04576: {
04577: t = Analyzer
04578: .cast(new TypicalTypes.VariableT(
04579: freshName
04580: .apply("type"),
04581: Boolean.FALSE));
04582: define3
04583: .apply(
04584: no,
04585: t,
04586: getNameSpace);
04587: Primitives.annotate
04588: .apply(
04589: no,
04590: "variables",
04591: new TypicalTypes.StringList(
04592: new Pair<String>(
04593: s)));
04594: }
04595:
04596: public TypicalTypes.raw_type<?> apply() {
04597: return Analyzer
04598: .cast(t);
04599: }
04600: }.apply());
04601:
04602: checkExitScope(arg$125);
04603: matching_nodes
04604: .remove(matching_nodes.size() - 1);
04605: if ((null != arg$125)) {
04606: arg$125.setProperty("__type", retValue$384);
04607: }
04608: return Analyzer.cast(retValue$384);
04609: }
04610: if (TypicalSupport.match$5(arg$125)) {
04611: final String s = (arg$125.size() > 0 ? arg$125
04612: .getString(0) : null);
04613: final Pair<Node> nl = Analyzer
04614: .cast(Primitives.getChildren(arg$125,
04615: 1, arg$125.size()));
04616:
04617: matching_nodes.add(arg$125);
04618: if ((null != arg$125 && processScopeNodes
04619: .contains(arg$125.getName()))) {
04620: processScope(arg$125, getScope);
04621: }
04622: checkEnterScope(arg$125);
04623:
04624: final Object retValue$478 = Analyzer
04625: .cast(new Let<TypicalTypes.raw_type<?>>() {
04626: final TypicalTypes.raw_type<?> ty;
04627: final Boolean check;
04628:
04629: {
04630: ty = Analyzer
04631: .cast(Analyzer
04632: .cast(lookup4
04633: .apply(
04634: no,
04635: "error",
04636: Primitives.concat
04637: .apply(
04638: Primitives.concat
04639: .apply(
04640: "constructor ",
04641: s),
04642: " is undefined"),
04643: getNameSpace)));
04644: check = Analyzer
04645: .cast(Primitives.hasAnnotation
04646: .apply(no,
04647: "no_binding_check"));
04648: }
04649:
04650: public TypicalTypes.raw_type<?> apply() {
04651: return Analyzer
04652: .cast(null == Primitives.isNotBottom
04653: .apply(ty)
04654: || !Primitives.isNotBottom
04655: .apply(ty) ? null
04656: : new Let<TypicalTypes.raw_type<?>>() {
04657: final String p;
04658: final TypicalTypes.raw_type<?> t;
04659:
04660: {
04661: p = Analyzer
04662: .cast(getParent
04663: .apply(ty));
04664: t = Analyzer
04665: .cast(null == Primitives.not
04666: .apply(hasTypeVariables
04667: .apply(p)) ? null
04668: : Primitives.not
04669: .apply(hasTypeVariables
04670: .apply(p)) ? ty
04671: : copy
04672: .apply(ty));
04673: }
04674:
04675: public TypicalTypes.raw_type<?> apply() {
04676: return Analyzer
04677: .cast(new Match<TypicalTypes.raw_type<?>>() {
04678: public TypicalTypes.raw_type<?> apply() {
04679: final Pair<Node> arg$431 = Analyzer
04680: .cast(nl);
04681:
04682: if ((null == arg$431)) {
04683: return null;
04684: }
04685: if (TypicalSupport
04686: .match$387(arg$431)) {
04687: final Pair<Node> pl = Analyzer
04688: .cast(Primitives
04689: .getChildren(
04690: arg$431
04691: .get(0),
04692: 0,
04693: arg$431
04694: .get(
04695: 0)
04696: .size()));
04697:
04698: return Analyzer
04699: .cast(new Let<TypicalTypes.raw_type<?>>() {
04700: {
04701: Analyzer
04702: .discard(null == check
04703: || !check ? null
04704: : Primitives.annotateList
04705: .apply(
04706: pl,
04707: "no_binding_check",
04708: wildt));
04709: }
04710:
04711: public TypicalTypes.raw_type<?> apply() {
04712: return Analyzer
04713: .cast(new Match<TypicalTypes.raw_type<?>>() {
04714: public TypicalTypes.raw_type<?> apply() {
04715: final TypicalTypes.raw_type<?> arg$450 = Analyzer
04716: .cast(t);
04717:
04718: if ((null == arg$450)) {
04719: return null;
04720: }
04721: if ((null != arg$450))
04722: switch (arg$450
04723: .tag()) {
04724: case ConstructorT:
04725: if (TypicalSupport
04726: .match$94(arg$450)) {
04727: final TypicalTypes.raw_type<?> ty = Analyzer
04728: .cast(arg$450
04729: .getTuple()
04730: .get3());
04731:
04732: return Analyzer
04733: .cast(null == Primitives.isBottom
04734: .apply(ty) ? null
04735: : Primitives.isBottom
04736: .apply(ty) ? error(
04737: Primitives.concat
04738: .apply(
04739: Primitives.concat
04740: .apply(
04741: "constructor ",
04742: s),
04743: " must have no children"),
04744: null)
04745: : new Match<TypicalTypes.raw_type<?>>() {
04746: public TypicalTypes.raw_type<?> apply() {
04747: final TypicalTypes.raw_type<?> arg$459 = Analyzer
04748: .cast(ty);
04749:
04750: if ((null == arg$459)) {
04751: return null;
04752: }
04753: if ((null != arg$459))
04754: switch (arg$459
04755: .tag()) {
04756: case TupleT:
04757: if (TypicalSupport
04758: .match$114(arg$459)) {
04759: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
04760: .cast(arg$459
04761: .getTuple()
04762: .get1());
04763:
04764: return Analyzer
04765: .cast(null == Primitives.lessInt
04766: .apply(
04767: Primitives.length
04768: .apply(pl),
04769: Primitives.length
04770: .apply(tl)) ? null
04771: : Primitives.lessInt
04772: .apply(
04773: Primitives.length
04774: .apply(pl),
04775: Primitives.length
04776: .apply(tl)) ? error(
04777: Primitives.concat
04778: .apply(
04779: Primitives.concat
04780: .apply(
04781: "constructor ",
04782: s),
04783: " does not have enough children"),
04784: null)
04785: : null == Primitives.greaterInt
04786: .apply(
04787: Primitives.length
04788: .apply(pl),
04789: Primitives.length
04790: .apply(tl)) ? null
04791: : Primitives.greaterInt
04792: .apply(
04793: Primitives.length
04794: .apply(pl),
04795: Primitives.length
04796: .apply(tl)) ? error(
04797: Primitives.concat
04798: .apply(
04799: Primitives.concat
04800: .apply(
04801: "constructor ",
04802: s),
04803: " has too many children"),
04804: null)
04805: : new Let<TypicalTypes.raw_type<?>>() {
04806: final TypicalTypes.raw_type<?> res;
04807:
04808: {
04809: res = Analyzer
04810: .cast(processArguments
04811: .apply(
04812: pl,
04813: tl,
04814: t));
04815: }
04816:
04817: public TypicalTypes.raw_type<?> apply() {
04818: return Analyzer
04819: .cast(null == Primitives.isNotBottom
04820: .apply(res)
04821: || !Primitives.isNotBottom
04822: .apply(res) ? null
04823: : new Require<TypicalTypes.raw_type<?>>() {
04824: public TypicalTypes.raw_type<?> apply() {
04825: final Boolean var$462 = Primitives.or
04826: .apply(
04827: Primitives.or
04828: .apply(
04829: Primitives.not
04830: .apply(isNodeType
04831: .apply(t)),
04832: check),
04833: checkBindings
04834: .apply(
04835: pl,
04836: BigInteger
04837: .valueOf(0),
04838: BigInteger
04839: .valueOf(0)));
04840:
04841: if ((null != var$462 && !var$462)) {
04842: showMessage(
04843: "error",
04844: Primitives.concat
04845: .apply(
04846: "bindings in different nodes ***",
04847: "in the node pattern"),
04848: null);
04849: }
04850: if ((null == var$462)) {
04851: return null;
04852: }
04853: if (var$462) {
04854: return new Let<TypicalTypes.raw_type<?>>() {
04855: final Pair<String> strList;
04856:
04857: {
04858: strList = Analyzer
04859: .cast(combineVariables
04860: .apply(pl));
04861: }
04862:
04863: public TypicalTypes.raw_type<?> apply() {
04864: return Analyzer
04865: .cast(null == Primitives.isEmpty
04866: .apply(strList) ? null
04867: : Primitives.isEmpty
04868: .apply(strList) ? res
04869: : new Let<TypicalTypes.raw_type<?>>() {
04870: {
04871: Primitives.annotate
04872: .apply(
04873: no,
04874: "variables",
04875: new TypicalTypes.StringList(
04876: strList));
04877: Primitives.annotate
04878: .apply(
04879: no,
04880: "has_bindings",
04881: wildt);
04882: }
04883:
04884: public TypicalTypes.raw_type<?> apply() {
04885: return Analyzer
04886: .cast(res);
04887: }
04888: }
04889: .apply());
04890: }
04891: }
04892: .apply();
04893: }
04894: return null;
04895: }
04896: }
04897: .apply());
04898: }
04899: }
04900: .apply());
04901: }
04902: break;
04903: default:
04904: break;
04905: }
04906: ;
04907: if (true) {
04908: return Analyzer
04909: .cast(new Require<TypicalTypes.raw_type<?>>() {
04910: public TypicalTypes.raw_type<?> apply() {
04911: final Boolean var$464 = Primitives.equal
04912: .apply(
04913: Primitives.length
04914: .apply(pl),
04915: BigInteger
04916: .valueOf(1));
04917:
04918: if ((null != var$464 && !var$464)) {
04919: showMessage(
04920: "error",
04921: Primitives.concat
04922: .apply(
04923: s,
04924: " must have only one child"),
04925: null);
04926: }
04927: if ((null == var$464)) {
04928: return null;
04929: }
04930: if (var$464) {
04931: return new Let<TypicalTypes.raw_type<?>>() {
04932: final TypicalTypes.raw_type<?> res;
04933:
04934: {
04935: res = Analyzer
04936: .cast(processArguments
04937: .apply(
04938: pl,
04939: new Pair<TypicalTypes.raw_type<?>>(
04940: ty),
04941: t));
04942: }
04943:
04944: public TypicalTypes.raw_type<?> apply() {
04945: return Analyzer
04946: .cast(null == Primitives.isNotBottom
04947: .apply(res)
04948: || !Primitives.isNotBottom
04949: .apply(res) ? null
04950: : new Let<TypicalTypes.raw_type<?>>() {
04951: final Pair<String> strList;
04952:
04953: {
04954: strList = Analyzer
04955: .cast(combineVariables
04956: .apply(pl));
04957: }
04958:
04959: public TypicalTypes.raw_type<?> apply() {
04960: return Analyzer
04961: .cast(null == Primitives.isEmpty
04962: .apply(strList) ? null
04963: : Primitives.isEmpty
04964: .apply(strList) ? res
04965: : new Let<TypicalTypes.raw_type<?>>() {
04966: {
04967: Primitives.annotate
04968: .apply(
04969: no,
04970: "variables",
04971: new TypicalTypes.StringList(
04972: strList));
04973: Primitives.annotate
04974: .apply(
04975: no,
04976: "has_bindings",
04977: wildt);
04978: }
04979:
04980: public TypicalTypes.raw_type<?> apply() {
04981: return Analyzer
04982: .cast(res);
04983: }
04984: }
04985: .apply());
04986: }
04987: }
04988: .apply());
04989: }
04990: }
04991: .apply();
04992: }
04993: return null;
04994: }
04995: }
04996: .apply());
04997: }
04998: return null;
04999: }
05000: }
05001: .apply());
05002: }
05003: break;
05004: default:
05005: break;
05006: }
05007: ;
05008: if (true) {
05009: return Analyzer
05010: .cast(error(
05011: Primitives.concat
05012: .apply(
05013: "expected constructor type, found ",
05014: getTypeName
05015: .apply(t)),
05016: null));
05017: }
05018: return null;
05019: }
05020: }
05021: .apply());
05022: }
05023: }
05024: .apply());
05025: }
05026: if (TypicalSupport
05027: .match$422(arg$431)) {
05028: return Analyzer
05029: .cast(t);
05030: }
05031: if (TypicalSupport
05032: .match$323(arg$431)) {
05033: return Analyzer
05034: .cast(new Match<TypicalTypes.raw_type<?>>() {
05035: public TypicalTypes.raw_type<?> apply() {
05036: final TypicalTypes.raw_type<?> arg$472 = Analyzer
05037: .cast(t);
05038:
05039: if ((null == arg$472)) {
05040: return null;
05041: }
05042: if ((null != arg$472))
05043: switch (arg$472
05044: .tag()) {
05045: case ConstructorT:
05046: if (TypicalSupport
05047: .match$94(arg$472)) {
05048: final TypicalTypes.raw_type<?> ty = Analyzer
05049: .cast(arg$472
05050: .getTuple()
05051: .get3());
05052:
05053: return Analyzer
05054: .cast(null == Primitives.isBottom
05055: .apply(ty) ? null
05056: : Primitives.isBottom
05057: .apply(ty) ? t
05058: : error(
05059: Primitives.concat
05060: .apply(
05061: Primitives.concat
05062: .apply(
05063: "constructor ",
05064: s),
05065: " does not have enough children"),
05066: null));
05067: }
05068: break;
05069: default:
05070: break;
05071: }
05072: ;
05073: if (true) {
05074: return Analyzer
05075: .cast(error(
05076: Primitives.concat
05077: .apply(
05078: "expected constructor type, found ",
05079: getTypeName
05080: .apply(t)),
05081: null));
05082: }
05083: return null;
05084: }
05085: }
05086: .apply());
05087: }
05088: if (true) {
05089: return Analyzer
05090: .cast(null);
05091: }
05092: return null;
05093: }
05094: }
05095: .apply());
05096: }
05097: }.apply());
05098: }
05099: }.apply());
05100:
05101: checkExitScope(arg$125);
05102: matching_nodes
05103: .remove(matching_nodes.size() - 1);
05104: if ((null != arg$125)) {
05105: arg$125.setProperty("__type", retValue$478);
05106: }
05107: return Analyzer.cast(retValue$478);
05108: }
05109: if (TypicalSupport.match$479(arg$125)) {
05110: final Pair<Node> nl = Analyzer
05111: .cast(Primitives.getChildren(arg$125,
05112: 0, arg$125.size()));
05113:
05114: matching_nodes.add(arg$125);
05115: if ((null != arg$125 && processScopeNodes
05116: .contains(arg$125.getName()))) {
05117: processScope(arg$125, getScope);
05118: }
05119: checkEnterScope(arg$125);
05120:
05121: final Object retValue$482 = Analyzer
05122: .cast(new Let<TypicalTypes.raw_type<?>>() {
05123: final Pair<TypicalTypes.raw_type<?>> tl;
05124:
05125: {
05126: tl = Analyzer
05127: .cast(TypicalSupport.map$129
05128: .apply(analyze,
05129: nl));
05130: }
05131:
05132: public TypicalTypes.raw_type<?> apply() {
05133: return Analyzer
05134: .cast(null == Primitives.not
05135: .apply(TypicalSupport.exists$184
05136: .apply(
05137: Primitives.isBottom,
05138: tl))
05139: || !Primitives.not
05140: .apply(TypicalSupport.exists$184
05141: .apply(
05142: Primitives.isBottom,
05143: tl)) ? null
05144: : new TypicalTypes.TupleT(
05145: tl));
05146: }
05147: }.apply());
05148:
05149: checkExitScope(arg$125);
05150: matching_nodes
05151: .remove(matching_nodes.size() - 1);
05152: if ((null != arg$125)) {
05153: arg$125.setProperty("__type", retValue$482);
05154: }
05155: return Analyzer.cast(retValue$482);
05156: }
05157: if (TypicalSupport.match$483(arg$125)) {
05158: final Node left = (arg$125.size() > 0 ? arg$125
05159: .getGeneric(0) : null);
05160: final Node right = (arg$125.size() > 1 ? arg$125
05161: .getGeneric(1)
05162: : null);
05163:
05164: matching_nodes.add(arg$125);
05165: if ((null != arg$125 && processScopeNodes
05166: .contains(arg$125.getName()))) {
05167: processScope(arg$125, getScope);
05168: }
05169: checkEnterScope(arg$125);
05170:
05171: final Object retValue$490 = Analyzer
05172: .cast(new Let<TypicalTypes.raw_type<?>>() {
05173: final TypicalTypes.raw_type<?> tl;
05174: final TypicalTypes.raw_type<?> tr;
05175:
05176: {
05177: tl = Analyzer.cast(analyze
05178: .apply(left));
05179: tr = Analyzer.cast(analyze
05180: .apply(right));
05181: new Guard<TypicalTypes.raw_type<?>>() {
05182: public TypicalTypes.raw_type<?> apply() {
05183: if ((null == unify)) {
05184: return null;
05185: }
05186: if ((null == tl)) {
05187: return null;
05188: }
05189: if ((null == boolt)) {
05190: return null;
05191: }
05192:
05193: final TypicalTypes.raw_type<?> result$486 = unify
05194: .apply(boolt,
05195: tl);
05196:
05197: if ((null == result$486)) {
05198: return Analyzer
05199: .cast(error(
05200: Primitives.concat
05201: .apply(
05202: "expected boolean, found ",
05203: getTypeName
05204: .apply(tl)),
05205: left));
05206: }
05207: return result$486;
05208: }
05209: }.apply();
05210: new Guard<TypicalTypes.raw_type<?>>() {
05211: public TypicalTypes.raw_type<?> apply() {
05212: if ((null == unify)) {
05213: return null;
05214: }
05215: if ((null == boolt)) {
05216: return null;
05217: }
05218: if ((null == tr)) {
05219: return null;
05220: }
05221:
05222: final TypicalTypes.raw_type<?> result$487 = unify
05223: .apply(boolt,
05224: tr);
05225:
05226: if ((null == result$487)) {
05227: return Analyzer
05228: .cast(error(
05229: Primitives.concat
05230: .apply(
05231: "expected boolean, found ",
05232: getTypeName
05233: .apply(tr)),
05234: right));
05235: }
05236: return result$487;
05237: }
05238: }.apply();
05239: }
05240:
05241: public TypicalTypes.raw_type<?> apply() {
05242: return Analyzer.cast(boolt);
05243: }
05244: }.apply());
05245:
05246: checkExitScope(arg$125);
05247: matching_nodes
05248: .remove(matching_nodes.size() - 1);
05249: if ((null != arg$125)) {
05250: arg$125.setProperty("__type", retValue$490);
05251: }
05252: return Analyzer.cast(retValue$490);
05253: }
05254: if (TypicalSupport.match$491(arg$125)) {
05255: final Node left = (arg$125.size() > 0 ? arg$125
05256: .getGeneric(0) : null);
05257: final Node right = (arg$125.size() > 1 ? arg$125
05258: .getGeneric(1)
05259: : null);
05260:
05261: matching_nodes.add(arg$125);
05262: if ((null != arg$125 && processScopeNodes
05263: .contains(arg$125.getName()))) {
05264: processScope(arg$125, getScope);
05265: }
05266: checkEnterScope(arg$125);
05267:
05268: final Object retValue$498 = Analyzer
05269: .cast(new Let<TypicalTypes.raw_type<?>>() {
05270: final TypicalTypes.raw_type<?> tl;
05271: final TypicalTypes.raw_type<?> tr;
05272:
05273: {
05274: tl = Analyzer.cast(analyze
05275: .apply(left));
05276: tr = Analyzer.cast(analyze
05277: .apply(right));
05278: new Guard<TypicalTypes.raw_type<?>>() {
05279: public TypicalTypes.raw_type<?> apply() {
05280: if ((null == unify)) {
05281: return null;
05282: }
05283: if ((null == tl)) {
05284: return null;
05285: }
05286: if ((null == boolt)) {
05287: return null;
05288: }
05289:
05290: final TypicalTypes.raw_type<?> result$494 = unify
05291: .apply(boolt,
05292: tl);
05293:
05294: if ((null == result$494)) {
05295: return Analyzer
05296: .cast(error(
05297: Primitives.concat
05298: .apply(
05299: "expected boolean, found ",
05300: getTypeName
05301: .apply(tl)),
05302: left));
05303: }
05304: return result$494;
05305: }
05306: }.apply();
05307: new Guard<TypicalTypes.raw_type<?>>() {
05308: public TypicalTypes.raw_type<?> apply() {
05309: if ((null == unify)) {
05310: return null;
05311: }
05312: if ((null == boolt)) {
05313: return null;
05314: }
05315: if ((null == tr)) {
05316: return null;
05317: }
05318:
05319: final TypicalTypes.raw_type<?> result$495 = unify
05320: .apply(boolt,
05321: tr);
05322:
05323: if ((null == result$495)) {
05324: return Analyzer
05325: .cast(error(
05326: Primitives.concat
05327: .apply(
05328: "expected boolean, found ",
05329: getTypeName
05330: .apply(tr)),
05331: right));
05332: }
05333: return result$495;
05334: }
05335: }.apply();
05336: }
05337:
05338: public TypicalTypes.raw_type<?> apply() {
05339: return Analyzer.cast(boolt);
05340: }
05341: }.apply());
05342:
05343: checkExitScope(arg$125);
05344: matching_nodes
05345: .remove(matching_nodes.size() - 1);
05346: if ((null != arg$125)) {
05347: arg$125.setProperty("__type", retValue$498);
05348: }
05349: return Analyzer.cast(retValue$498);
05350: }
05351: if (TypicalSupport.match$499(arg$125)) {
05352: final Node left = (arg$125.size() > 0 ? arg$125
05353: .getGeneric(0) : null);
05354: final Node right = (arg$125.size() > 2 ? arg$125
05355: .getGeneric(2)
05356: : null);
05357:
05358: matching_nodes.add(arg$125);
05359: if ((null != arg$125 && processScopeNodes
05360: .contains(arg$125.getName()))) {
05361: processScope(arg$125, getScope);
05362: }
05363: checkEnterScope(arg$125);
05364:
05365: final Object retValue$504 = Analyzer
05366: .cast(new Let<TypicalTypes.raw_type<?>>() {
05367: final TypicalTypes.raw_type<?> tl;
05368: final TypicalTypes.raw_type<?> tr;
05369:
05370: {
05371: tl = Analyzer.cast(analyze
05372: .apply(left));
05373: tr = Analyzer.cast(analyze
05374: .apply(right));
05375: new Guard<TypicalTypes.raw_type<?>>() {
05376: public TypicalTypes.raw_type<?> apply() {
05377: if ((null == unify)) {
05378: return null;
05379: }
05380: if ((null == tl)) {
05381: return null;
05382: }
05383: if ((null == tr)) {
05384: return null;
05385: }
05386:
05387: final TypicalTypes.raw_type<?> result$501 = unify
05388: .apply(tl, tr);
05389:
05390: if ((null == result$501)) {
05391: return Analyzer
05392: .cast(error(
05393: Primitives.concat
05394: .apply(
05395: "types of left and right expressions",
05396: " do not match"),
05397: null));
05398: }
05399: return result$501;
05400: }
05401: }.apply();
05402: }
05403:
05404: public TypicalTypes.raw_type<?> apply() {
05405: return Analyzer.cast(boolt);
05406: }
05407: }.apply());
05408:
05409: checkExitScope(arg$125);
05410: matching_nodes
05411: .remove(matching_nodes.size() - 1);
05412: if ((null != arg$125)) {
05413: arg$125.setProperty("__type", retValue$504);
05414: }
05415: return Analyzer.cast(retValue$504);
05416: }
05417: if (TypicalSupport.match$505(arg$125)) {
05418: final Node left = (arg$125.size() > 0 ? arg$125
05419: .getGeneric(0) : null);
05420: final String s = (arg$125.size() > 1 ? arg$125
05421: .getString(1) : null);
05422: final Node right = (arg$125.size() > 2 ? arg$125
05423: .getGeneric(2)
05424: : null);
05425:
05426: matching_nodes.add(arg$125);
05427: if ((null != arg$125 && processScopeNodes
05428: .contains(arg$125.getName()))) {
05429: processScope(arg$125, getScope);
05430: }
05431: checkEnterScope(arg$125);
05432:
05433: final Object retValue$552 = Analyzer
05434: .cast(new Let<TypicalTypes.raw_type<?>>() {
05435: final TypicalTypes.raw_type<?> tl;
05436: final TypicalTypes.raw_type<?> tr;
05437:
05438: {
05439: tl = Analyzer.cast(analyze
05440: .apply(left));
05441: tr = Analyzer.cast(analyze
05442: .apply(right));
05443: }
05444:
05445: public TypicalTypes.raw_type<?> apply() {
05446: return Analyzer
05447: .cast(new Match<TypicalTypes.raw_type<?>>() {
05448: public TypicalTypes.raw_type<?> apply() {
05449: final String arg$528 = Analyzer
05450: .cast(s);
05451:
05452: if ((null == arg$528)) {
05453: return null;
05454: }
05455: if ((null != "<=" && "<="
05456: .equals(arg$528))) {
05457: return Analyzer
05458: .cast(new Let<TypicalTypes.raw_type<?>>() {
05459: {
05460: new Guard<TypicalTypes.raw_type<?>>() {
05461: public TypicalTypes.raw_type<?> apply() {
05462: if ((null == unify)) {
05463: return null;
05464: }
05465: if ((null == tl)) {
05466: return null;
05467: }
05468: if ((null == intt)) {
05469: return null;
05470: }
05471:
05472: final TypicalTypes.raw_type<?> result$531 = unify
05473: .apply(
05474: tl,
05475: intt);
05476:
05477: if ((null == result$531)) {
05478: return Analyzer
05479: .cast(error(
05480: Primitives.concat
05481: .apply(
05482: "expected integer, found ",
05483: getTypeName
05484: .apply(tl)),
05485: left));
05486: }
05487: return result$531;
05488: }
05489: }
05490: .apply();
05491: new Guard<TypicalTypes.raw_type<?>>() {
05492: public TypicalTypes.raw_type<?> apply() {
05493: if ((null == unify)) {
05494: return null;
05495: }
05496: if ((null == intt)) {
05497: return null;
05498: }
05499: if ((null == tr)) {
05500: return null;
05501: }
05502:
05503: final TypicalTypes.raw_type<?> result$532 = unify
05504: .apply(
05505: tr,
05506: intt);
05507:
05508: if ((null == result$532)) {
05509: return Analyzer
05510: .cast(error(
05511: Primitives.concat
05512: .apply(
05513: "expected integer, found ",
05514: getTypeName
05515: .apply(tr)),
05516: right));
05517: }
05518: return result$532;
05519: }
05520: }
05521: .apply();
05522: }
05523:
05524: public TypicalTypes.raw_type<?> apply() {
05525: return Analyzer
05526: .cast(boolt);
05527: }
05528: }
05529: .apply());
05530: }
05531: if ((null != "<" && "<"
05532: .equals(arg$528))) {
05533: return Analyzer
05534: .cast(new Let<TypicalTypes.raw_type<?>>() {
05535: {
05536: new Guard<TypicalTypes.raw_type<?>>() {
05537: public TypicalTypes.raw_type<?> apply() {
05538: if ((null == unify)) {
05539: return null;
05540: }
05541: if ((null == tl)) {
05542: return null;
05543: }
05544: if ((null == intt)) {
05545: return null;
05546: }
05547:
05548: final TypicalTypes.raw_type<?> result$535 = unify
05549: .apply(
05550: tl,
05551: intt);
05552:
05553: if ((null == result$535)) {
05554: return Analyzer
05555: .cast(error(
05556: Primitives.concat
05557: .apply(
05558: "expected integer, found ",
05559: getTypeName
05560: .apply(tl)),
05561: left));
05562: }
05563: return result$535;
05564: }
05565: }
05566: .apply();
05567: new Guard<TypicalTypes.raw_type<?>>() {
05568: public TypicalTypes.raw_type<?> apply() {
05569: if ((null == unify)) {
05570: return null;
05571: }
05572: if ((null == intt)) {
05573: return null;
05574: }
05575: if ((null == tr)) {
05576: return null;
05577: }
05578:
05579: final TypicalTypes.raw_type<?> result$536 = unify
05580: .apply(
05581: tr,
05582: intt);
05583:
05584: if ((null == result$536)) {
05585: return Analyzer
05586: .cast(error(
05587: Primitives.concat
05588: .apply(
05589: "expected integer, found ",
05590: getTypeName
05591: .apply(tr)),
05592: right));
05593: }
05594: return result$536;
05595: }
05596: }
05597: .apply();
05598: }
05599:
05600: public TypicalTypes.raw_type<?> apply() {
05601: return Analyzer
05602: .cast(boolt);
05603: }
05604: }
05605: .apply());
05606: }
05607: if ((null != ">=" && ">="
05608: .equals(arg$528))) {
05609: return Analyzer
05610: .cast(new Let<TypicalTypes.raw_type<?>>() {
05611: {
05612: new Guard<TypicalTypes.raw_type<?>>() {
05613: public TypicalTypes.raw_type<?> apply() {
05614: if ((null == unify)) {
05615: return null;
05616: }
05617: if ((null == tl)) {
05618: return null;
05619: }
05620: if ((null == intt)) {
05621: return null;
05622: }
05623:
05624: final TypicalTypes.raw_type<?> result$539 = unify
05625: .apply(
05626: tl,
05627: intt);
05628:
05629: if ((null == result$539)) {
05630: return Analyzer
05631: .cast(error(
05632: Primitives.concat
05633: .apply(
05634: "expected integer, found ",
05635: getTypeName
05636: .apply(tl)),
05637: left));
05638: }
05639: return result$539;
05640: }
05641: }
05642: .apply();
05643: new Guard<TypicalTypes.raw_type<?>>() {
05644: public TypicalTypes.raw_type<?> apply() {
05645: if ((null == unify)) {
05646: return null;
05647: }
05648: if ((null == intt)) {
05649: return null;
05650: }
05651: if ((null == tr)) {
05652: return null;
05653: }
05654:
05655: final TypicalTypes.raw_type<?> result$540 = unify
05656: .apply(
05657: tr,
05658: intt);
05659:
05660: if ((null == result$540)) {
05661: return Analyzer
05662: .cast(error(
05663: Primitives.concat
05664: .apply(
05665: "expected integer, found ",
05666: getTypeName
05667: .apply(tr)),
05668: right));
05669: }
05670: return result$540;
05671: }
05672: }
05673: .apply();
05674: }
05675:
05676: public TypicalTypes.raw_type<?> apply() {
05677: return Analyzer
05678: .cast(boolt);
05679: }
05680: }
05681: .apply());
05682: }
05683: if ((null != ">" && ">"
05684: .equals(arg$528))) {
05685: return Analyzer
05686: .cast(new Let<TypicalTypes.raw_type<?>>() {
05687: {
05688: new Guard<TypicalTypes.raw_type<?>>() {
05689: public TypicalTypes.raw_type<?> apply() {
05690: if ((null == unify)) {
05691: return null;
05692: }
05693: if ((null == tl)) {
05694: return null;
05695: }
05696: if ((null == intt)) {
05697: return null;
05698: }
05699:
05700: final TypicalTypes.raw_type<?> result$543 = unify
05701: .apply(
05702: tl,
05703: intt);
05704:
05705: if ((null == result$543)) {
05706: return Analyzer
05707: .cast(error(
05708: Primitives.concat
05709: .apply(
05710: "expected integer, found ",
05711: getTypeName
05712: .apply(tl)),
05713: left));
05714: }
05715: return result$543;
05716: }
05717: }
05718: .apply();
05719: new Guard<TypicalTypes.raw_type<?>>() {
05720: public TypicalTypes.raw_type<?> apply() {
05721: if ((null == unify)) {
05722: return null;
05723: }
05724: if ((null == intt)) {
05725: return null;
05726: }
05727: if ((null == tr)) {
05728: return null;
05729: }
05730:
05731: final TypicalTypes.raw_type<?> result$544 = unify
05732: .apply(
05733: tr,
05734: intt);
05735:
05736: if ((null == result$544)) {
05737: return Analyzer
05738: .cast(error(
05739: Primitives.concat
05740: .apply(
05741: "expected integer, found ",
05742: getTypeName
05743: .apply(tr)),
05744: right));
05745: }
05746: return result$544;
05747: }
05748: }
05749: .apply();
05750: }
05751:
05752: public TypicalTypes.raw_type<?> apply() {
05753: return Analyzer
05754: .cast(boolt);
05755: }
05756: }
05757: .apply());
05758: }
05759: if (true) {
05760: return Analyzer
05761: .cast(new Let<TypicalTypes.raw_type<?>>() {
05762: {
05763: new Guard<TypicalTypes.raw_type<?>>() {
05764: public TypicalTypes.raw_type<?> apply() {
05765: if ((null == unify)) {
05766: return null;
05767: }
05768: if ((null == tl)) {
05769: return null;
05770: }
05771: if ((null == floatt)) {
05772: return null;
05773: }
05774:
05775: final TypicalTypes.raw_type<?> result$547 = unify
05776: .apply(
05777: tl,
05778: floatt);
05779:
05780: if ((null == result$547)) {
05781: return Analyzer
05782: .cast(error(
05783: Primitives.concat
05784: .apply(
05785: Primitives.concat
05786: .apply(
05787: "expected 64-bit float",
05788: ", found "),
05789: getTypeName
05790: .apply(tl)),
05791: left));
05792: }
05793: return result$547;
05794: }
05795: }
05796: .apply();
05797: new Guard<TypicalTypes.raw_type<?>>() {
05798: public TypicalTypes.raw_type<?> apply() {
05799: if ((null == unify)) {
05800: return null;
05801: }
05802: if ((null == floatt)) {
05803: return null;
05804: }
05805: if ((null == tr)) {
05806: return null;
05807: }
05808:
05809: final TypicalTypes.raw_type<?> result$548 = unify
05810: .apply(
05811: tr,
05812: floatt);
05813:
05814: if ((null == result$548)) {
05815: return Analyzer
05816: .cast(error(
05817: Primitives.concat
05818: .apply(
05819: Primitives.concat
05820: .apply(
05821: "expected 64-bit float",
05822: ", found "),
05823: getTypeName
05824: .apply(tr)),
05825: right));
05826: }
05827: return result$548;
05828: }
05829: }
05830: .apply();
05831: }
05832:
05833: public TypicalTypes.raw_type<?> apply() {
05834: return Analyzer
05835: .cast(boolt);
05836: }
05837: }
05838: .apply());
05839: }
05840: return null;
05841: }
05842: }.apply());
05843: }
05844: }.apply());
05845:
05846: checkExitScope(arg$125);
05847: matching_nodes
05848: .remove(matching_nodes.size() - 1);
05849: if ((null != arg$125)) {
05850: arg$125.setProperty("__type", retValue$552);
05851: }
05852: return Analyzer.cast(retValue$552);
05853: }
05854: if (TypicalSupport.match$553(arg$125)) {
05855: final Node left = (arg$125.size() > 0 ? arg$125
05856: .getGeneric(0) : null);
05857: final String s = (arg$125.size() > 1 ? arg$125
05858: .getString(1) : null);
05859: final Node right = (arg$125.size() > 2 ? arg$125
05860: .getGeneric(2)
05861: : null);
05862:
05863: matching_nodes.add(arg$125);
05864: if ((null != arg$125 && processScopeNodes
05865: .contains(arg$125.getName()))) {
05866: processScope(arg$125, getScope);
05867: }
05868: checkEnterScope(arg$125);
05869:
05870: final Object retValue$608 = Analyzer
05871: .cast(new Let<TypicalTypes.raw_type<?>>() {
05872: final TypicalTypes.raw_type<?> tl;
05873: final TypicalTypes.raw_type<?> tr;
05874:
05875: {
05876: tl = Analyzer.cast(analyze
05877: .apply(left));
05878: tr = Analyzer.cast(analyze
05879: .apply(right));
05880: }
05881:
05882: public TypicalTypes.raw_type<?> apply() {
05883: return Analyzer
05884: .cast(new Match<TypicalTypes.raw_type<?>>() {
05885: public TypicalTypes.raw_type<?> apply() {
05886: final String arg$580 = Analyzer
05887: .cast(s);
05888:
05889: if ((null == arg$580)) {
05890: return null;
05891: }
05892: if ((null != "+" && "+"
05893: .equals(arg$580))) {
05894: return Analyzer
05895: .cast(new Let<TypicalTypes.raw_type<?>>() {
05896: {
05897: new Guard<TypicalTypes.raw_type<?>>() {
05898: public TypicalTypes.raw_type<?> apply() {
05899: if ((null == unify)) {
05900: return null;
05901: }
05902: if ((null == tl)) {
05903: return null;
05904: }
05905: if ((null == intt)) {
05906: return null;
05907: }
05908:
05909: final TypicalTypes.raw_type<?> result$583 = unify
05910: .apply(
05911: tl,
05912: intt);
05913:
05914: if ((null == result$583)) {
05915: return Analyzer
05916: .cast(error(
05917: Primitives.concat
05918: .apply(
05919: "expected integer, found ",
05920: getTypeName
05921: .apply(tl)),
05922: left));
05923: }
05924: return result$583;
05925: }
05926: }
05927: .apply();
05928: new Guard<TypicalTypes.raw_type<?>>() {
05929: public TypicalTypes.raw_type<?> apply() {
05930: if ((null == unify)) {
05931: return null;
05932: }
05933: if ((null == intt)) {
05934: return null;
05935: }
05936: if ((null == tr)) {
05937: return null;
05938: }
05939:
05940: final TypicalTypes.raw_type<?> result$584 = unify
05941: .apply(
05942: tr,
05943: intt);
05944:
05945: if ((null == result$584)) {
05946: return Analyzer
05947: .cast(error(
05948: Primitives.concat
05949: .apply(
05950: "expected integer, found ",
05951: getTypeName
05952: .apply(tr)),
05953: right));
05954: }
05955: return result$584;
05956: }
05957: }
05958: .apply();
05959: }
05960:
05961: public TypicalTypes.raw_type<?> apply() {
05962: return Analyzer
05963: .cast(intt);
05964: }
05965: }
05966: .apply());
05967: }
05968: if ((null != "-" && "-"
05969: .equals(arg$580))) {
05970: return Analyzer
05971: .cast(new Let<TypicalTypes.raw_type<?>>() {
05972: {
05973: new Guard<TypicalTypes.raw_type<?>>() {
05974: public TypicalTypes.raw_type<?> apply() {
05975: if ((null == unify)) {
05976: return null;
05977: }
05978: if ((null == tl)) {
05979: return null;
05980: }
05981: if ((null == intt)) {
05982: return null;
05983: }
05984:
05985: final TypicalTypes.raw_type<?> result$587 = unify
05986: .apply(
05987: tl,
05988: intt);
05989:
05990: if ((null == result$587)) {
05991: return Analyzer
05992: .cast(error(
05993: Primitives.concat
05994: .apply(
05995: "expected integer, found ",
05996: getTypeName
05997: .apply(tl)),
05998: left));
05999: }
06000: return result$587;
06001: }
06002: }
06003: .apply();
06004: new Guard<TypicalTypes.raw_type<?>>() {
06005: public TypicalTypes.raw_type<?> apply() {
06006: if ((null == unify)) {
06007: return null;
06008: }
06009: if ((null == intt)) {
06010: return null;
06011: }
06012: if ((null == tr)) {
06013: return null;
06014: }
06015:
06016: final TypicalTypes.raw_type<?> result$588 = unify
06017: .apply(
06018: tr,
06019: intt);
06020:
06021: if ((null == result$588)) {
06022: return Analyzer
06023: .cast(error(
06024: Primitives.concat
06025: .apply(
06026: "expected integer, found ",
06027: getTypeName
06028: .apply(tr)),
06029: right));
06030: }
06031: return result$588;
06032: }
06033: }
06034: .apply();
06035: }
06036:
06037: public TypicalTypes.raw_type<?> apply() {
06038: return Analyzer
06039: .cast(intt);
06040: }
06041: }
06042: .apply());
06043: }
06044: if ((null != "*" && "*"
06045: .equals(arg$580))) {
06046: return Analyzer
06047: .cast(new Let<TypicalTypes.raw_type<?>>() {
06048: {
06049: new Guard<TypicalTypes.raw_type<?>>() {
06050: public TypicalTypes.raw_type<?> apply() {
06051: if ((null == unify)) {
06052: return null;
06053: }
06054: if ((null == tl)) {
06055: return null;
06056: }
06057: if ((null == intt)) {
06058: return null;
06059: }
06060:
06061: final TypicalTypes.raw_type<?> result$591 = unify
06062: .apply(
06063: tl,
06064: intt);
06065:
06066: if ((null == result$591)) {
06067: return Analyzer
06068: .cast(error(
06069: Primitives.concat
06070: .apply(
06071: "expected integer, found ",
06072: getTypeName
06073: .apply(tl)),
06074: left));
06075: }
06076: return result$591;
06077: }
06078: }
06079: .apply();
06080: new Guard<TypicalTypes.raw_type<?>>() {
06081: public TypicalTypes.raw_type<?> apply() {
06082: if ((null == unify)) {
06083: return null;
06084: }
06085: if ((null == intt)) {
06086: return null;
06087: }
06088: if ((null == tr)) {
06089: return null;
06090: }
06091:
06092: final TypicalTypes.raw_type<?> result$592 = unify
06093: .apply(
06094: tr,
06095: intt);
06096:
06097: if ((null == result$592)) {
06098: return Analyzer
06099: .cast(error(
06100: Primitives.concat
06101: .apply(
06102: "expected integer, found ",
06103: getTypeName
06104: .apply(tr)),
06105: right));
06106: }
06107: return result$592;
06108: }
06109: }
06110: .apply();
06111: }
06112:
06113: public TypicalTypes.raw_type<?> apply() {
06114: return Analyzer
06115: .cast(intt);
06116: }
06117: }
06118: .apply());
06119: }
06120: if ((null != "/" && "/"
06121: .equals(arg$580))) {
06122: return Analyzer
06123: .cast(new Let<TypicalTypes.raw_type<?>>() {
06124: {
06125: new Guard<TypicalTypes.raw_type<?>>() {
06126: public TypicalTypes.raw_type<?> apply() {
06127: if ((null == unify)) {
06128: return null;
06129: }
06130: if ((null == tl)) {
06131: return null;
06132: }
06133: if ((null == intt)) {
06134: return null;
06135: }
06136:
06137: final TypicalTypes.raw_type<?> result$595 = unify
06138: .apply(
06139: tl,
06140: intt);
06141:
06142: if ((null == result$595)) {
06143: return Analyzer
06144: .cast(error(
06145: Primitives.concat
06146: .apply(
06147: "expected integer, found ",
06148: getTypeName
06149: .apply(tl)),
06150: left));
06151: }
06152: return result$595;
06153: }
06154: }
06155: .apply();
06156: new Guard<TypicalTypes.raw_type<?>>() {
06157: public TypicalTypes.raw_type<?> apply() {
06158: if ((null == unify)) {
06159: return null;
06160: }
06161: if ((null == intt)) {
06162: return null;
06163: }
06164: if ((null == tr)) {
06165: return null;
06166: }
06167:
06168: final TypicalTypes.raw_type<?> result$596 = unify
06169: .apply(
06170: tr,
06171: intt);
06172:
06173: if ((null == result$596)) {
06174: return Analyzer
06175: .cast(error(
06176: Primitives.concat
06177: .apply(
06178: "expected integer, found ",
06179: getTypeName
06180: .apply(tr)),
06181: right));
06182: }
06183: return result$596;
06184: }
06185: }
06186: .apply();
06187: }
06188:
06189: public TypicalTypes.raw_type<?> apply() {
06190: return Analyzer
06191: .cast(intt);
06192: }
06193: }
06194: .apply());
06195: }
06196: if ((null != "%" && "%"
06197: .equals(arg$580))) {
06198: return Analyzer
06199: .cast(new Let<TypicalTypes.raw_type<?>>() {
06200: {
06201: new Guard<TypicalTypes.raw_type<?>>() {
06202: public TypicalTypes.raw_type<?> apply() {
06203: if ((null == unify)) {
06204: return null;
06205: }
06206: if ((null == tl)) {
06207: return null;
06208: }
06209: if ((null == intt)) {
06210: return null;
06211: }
06212:
06213: final TypicalTypes.raw_type<?> result$599 = unify
06214: .apply(
06215: tl,
06216: intt);
06217:
06218: if ((null == result$599)) {
06219: return Analyzer
06220: .cast(error(
06221: Primitives.concat
06222: .apply(
06223: "expected integer, found ",
06224: getTypeName
06225: .apply(tl)),
06226: left));
06227: }
06228: return result$599;
06229: }
06230: }
06231: .apply();
06232: new Guard<TypicalTypes.raw_type<?>>() {
06233: public TypicalTypes.raw_type<?> apply() {
06234: if ((null == unify)) {
06235: return null;
06236: }
06237: if ((null == intt)) {
06238: return null;
06239: }
06240: if ((null == tr)) {
06241: return null;
06242: }
06243:
06244: final TypicalTypes.raw_type<?> result$600 = unify
06245: .apply(
06246: tr,
06247: intt);
06248:
06249: if ((null == result$600)) {
06250: return Analyzer
06251: .cast(error(
06252: Primitives.concat
06253: .apply(
06254: "expected integer, found ",
06255: getTypeName
06256: .apply(tr)),
06257: right));
06258: }
06259: return result$600;
06260: }
06261: }
06262: .apply();
06263: }
06264:
06265: public TypicalTypes.raw_type<?> apply() {
06266: return Analyzer
06267: .cast(intt);
06268: }
06269: }
06270: .apply());
06271: }
06272: if (true) {
06273: return Analyzer
06274: .cast(new Let<TypicalTypes.raw_type<?>>() {
06275: {
06276: new Guard<TypicalTypes.raw_type<?>>() {
06277: public TypicalTypes.raw_type<?> apply() {
06278: if ((null == unify)) {
06279: return null;
06280: }
06281: if ((null == tl)) {
06282: return null;
06283: }
06284: if ((null == floatt)) {
06285: return null;
06286: }
06287:
06288: final TypicalTypes.raw_type<?> result$603 = unify
06289: .apply(
06290: tl,
06291: floatt);
06292:
06293: if ((null == result$603)) {
06294: return Analyzer
06295: .cast(error(
06296: Primitives.concat
06297: .apply(
06298: Primitives.concat
06299: .apply(
06300: "expected 64-bit float",
06301: ", found "),
06302: getTypeName
06303: .apply(tl)),
06304: left));
06305: }
06306: return result$603;
06307: }
06308: }
06309: .apply();
06310: new Guard<TypicalTypes.raw_type<?>>() {
06311: public TypicalTypes.raw_type<?> apply() {
06312: if ((null == unify)) {
06313: return null;
06314: }
06315: if ((null == floatt)) {
06316: return null;
06317: }
06318: if ((null == tr)) {
06319: return null;
06320: }
06321:
06322: final TypicalTypes.raw_type<?> result$604 = unify
06323: .apply(
06324: tr,
06325: floatt);
06326:
06327: if ((null == result$604)) {
06328: return Analyzer
06329: .cast(error(
06330: Primitives.concat
06331: .apply(
06332: Primitives.concat
06333: .apply(
06334: "expected 64-bit float",
06335: ", found "),
06336: getTypeName
06337: .apply(tr)),
06338: right));
06339: }
06340: return result$604;
06341: }
06342: }
06343: .apply();
06344: }
06345:
06346: public TypicalTypes.raw_type<?> apply() {
06347: return Analyzer
06348: .cast(floatt);
06349: }
06350: }
06351: .apply());
06352: }
06353: return null;
06354: }
06355: }.apply());
06356: }
06357: }.apply());
06358:
06359: checkExitScope(arg$125);
06360: matching_nodes
06361: .remove(matching_nodes.size() - 1);
06362: if ((null != arg$125)) {
06363: arg$125.setProperty("__type", retValue$608);
06364: }
06365: return Analyzer.cast(retValue$608);
06366: }
06367: if (TypicalSupport.match$609(arg$125)) {
06368: final Node left = (arg$125.size() > 0 ? arg$125
06369: .getGeneric(0) : null);
06370: final String s = (arg$125.size() > 1 ? arg$125
06371: .getString(1) : null);
06372: final Node right = (arg$125.size() > 2 ? arg$125
06373: .getGeneric(2)
06374: : null);
06375:
06376: matching_nodes.add(arg$125);
06377: if ((null != arg$125 && processScopeNodes
06378: .contains(arg$125.getName()))) {
06379: processScope(arg$125, getScope);
06380: }
06381: checkEnterScope(arg$125);
06382:
06383: final Object retValue$664 = Analyzer
06384: .cast(new Let<TypicalTypes.raw_type<?>>() {
06385: final TypicalTypes.raw_type<?> tl;
06386: final TypicalTypes.raw_type<?> tr;
06387:
06388: {
06389: tl = Analyzer.cast(analyze
06390: .apply(left));
06391: tr = Analyzer.cast(analyze
06392: .apply(right));
06393: }
06394:
06395: public TypicalTypes.raw_type<?> apply() {
06396: return Analyzer
06397: .cast(new Match<TypicalTypes.raw_type<?>>() {
06398: public TypicalTypes.raw_type<?> apply() {
06399: final String arg$636 = Analyzer
06400: .cast(s);
06401:
06402: if ((null == arg$636)) {
06403: return null;
06404: }
06405: if ((null != "+" && "+"
06406: .equals(arg$636))) {
06407: return Analyzer
06408: .cast(new Let<TypicalTypes.raw_type<?>>() {
06409: {
06410: new Guard<TypicalTypes.raw_type<?>>() {
06411: public TypicalTypes.raw_type<?> apply() {
06412: if ((null == unify)) {
06413: return null;
06414: }
06415: if ((null == tl)) {
06416: return null;
06417: }
06418: if ((null == intt)) {
06419: return null;
06420: }
06421:
06422: final TypicalTypes.raw_type<?> result$639 = unify
06423: .apply(
06424: tl,
06425: intt);
06426:
06427: if ((null == result$639)) {
06428: return Analyzer
06429: .cast(error(
06430: Primitives.concat
06431: .apply(
06432: "expected integer, found ",
06433: getTypeName
06434: .apply(tl)),
06435: left));
06436: }
06437: return result$639;
06438: }
06439: }
06440: .apply();
06441: new Guard<TypicalTypes.raw_type<?>>() {
06442: public TypicalTypes.raw_type<?> apply() {
06443: if ((null == unify)) {
06444: return null;
06445: }
06446: if ((null == intt)) {
06447: return null;
06448: }
06449: if ((null == tr)) {
06450: return null;
06451: }
06452:
06453: final TypicalTypes.raw_type<?> result$640 = unify
06454: .apply(
06455: tr,
06456: intt);
06457:
06458: if ((null == result$640)) {
06459: return Analyzer
06460: .cast(error(
06461: Primitives.concat
06462: .apply(
06463: "expected integer, found ",
06464: getTypeName
06465: .apply(tr)),
06466: right));
06467: }
06468: return result$640;
06469: }
06470: }
06471: .apply();
06472: }
06473:
06474: public TypicalTypes.raw_type<?> apply() {
06475: return Analyzer
06476: .cast(intt);
06477: }
06478: }
06479: .apply());
06480: }
06481: if ((null != "-" && "-"
06482: .equals(arg$636))) {
06483: return Analyzer
06484: .cast(new Let<TypicalTypes.raw_type<?>>() {
06485: {
06486: new Guard<TypicalTypes.raw_type<?>>() {
06487: public TypicalTypes.raw_type<?> apply() {
06488: if ((null == unify)) {
06489: return null;
06490: }
06491: if ((null == tl)) {
06492: return null;
06493: }
06494: if ((null == intt)) {
06495: return null;
06496: }
06497:
06498: final TypicalTypes.raw_type<?> result$643 = unify
06499: .apply(
06500: tl,
06501: intt);
06502:
06503: if ((null == result$643)) {
06504: return Analyzer
06505: .cast(error(
06506: Primitives.concat
06507: .apply(
06508: "expected integer, found ",
06509: getTypeName
06510: .apply(tl)),
06511: left));
06512: }
06513: return result$643;
06514: }
06515: }
06516: .apply();
06517: new Guard<TypicalTypes.raw_type<?>>() {
06518: public TypicalTypes.raw_type<?> apply() {
06519: if ((null == unify)) {
06520: return null;
06521: }
06522: if ((null == intt)) {
06523: return null;
06524: }
06525: if ((null == tr)) {
06526: return null;
06527: }
06528:
06529: final TypicalTypes.raw_type<?> result$644 = unify
06530: .apply(
06531: tr,
06532: intt);
06533:
06534: if ((null == result$644)) {
06535: return Analyzer
06536: .cast(error(
06537: Primitives.concat
06538: .apply(
06539: "expected integer, found ",
06540: getTypeName
06541: .apply(tr)),
06542: right));
06543: }
06544: return result$644;
06545: }
06546: }
06547: .apply();
06548: }
06549:
06550: public TypicalTypes.raw_type<?> apply() {
06551: return Analyzer
06552: .cast(intt);
06553: }
06554: }
06555: .apply());
06556: }
06557: if ((null != "*" && "*"
06558: .equals(arg$636))) {
06559: return Analyzer
06560: .cast(new Let<TypicalTypes.raw_type<?>>() {
06561: {
06562: new Guard<TypicalTypes.raw_type<?>>() {
06563: public TypicalTypes.raw_type<?> apply() {
06564: if ((null == unify)) {
06565: return null;
06566: }
06567: if ((null == tl)) {
06568: return null;
06569: }
06570: if ((null == intt)) {
06571: return null;
06572: }
06573:
06574: final TypicalTypes.raw_type<?> result$647 = unify
06575: .apply(
06576: tl,
06577: intt);
06578:
06579: if ((null == result$647)) {
06580: return Analyzer
06581: .cast(error(
06582: Primitives.concat
06583: .apply(
06584: "expected integer, found ",
06585: getTypeName
06586: .apply(tl)),
06587: left));
06588: }
06589: return result$647;
06590: }
06591: }
06592: .apply();
06593: new Guard<TypicalTypes.raw_type<?>>() {
06594: public TypicalTypes.raw_type<?> apply() {
06595: if ((null == unify)) {
06596: return null;
06597: }
06598: if ((null == intt)) {
06599: return null;
06600: }
06601: if ((null == tr)) {
06602: return null;
06603: }
06604:
06605: final TypicalTypes.raw_type<?> result$648 = unify
06606: .apply(
06607: tr,
06608: intt);
06609:
06610: if ((null == result$648)) {
06611: return Analyzer
06612: .cast(error(
06613: Primitives.concat
06614: .apply(
06615: "expected integer, found ",
06616: getTypeName
06617: .apply(tr)),
06618: right));
06619: }
06620: return result$648;
06621: }
06622: }
06623: .apply();
06624: }
06625:
06626: public TypicalTypes.raw_type<?> apply() {
06627: return Analyzer
06628: .cast(intt);
06629: }
06630: }
06631: .apply());
06632: }
06633: if ((null != "/" && "/"
06634: .equals(arg$636))) {
06635: return Analyzer
06636: .cast(new Let<TypicalTypes.raw_type<?>>() {
06637: {
06638: new Guard<TypicalTypes.raw_type<?>>() {
06639: public TypicalTypes.raw_type<?> apply() {
06640: if ((null == unify)) {
06641: return null;
06642: }
06643: if ((null == tl)) {
06644: return null;
06645: }
06646: if ((null == intt)) {
06647: return null;
06648: }
06649:
06650: final TypicalTypes.raw_type<?> result$651 = unify
06651: .apply(
06652: tl,
06653: intt);
06654:
06655: if ((null == result$651)) {
06656: return Analyzer
06657: .cast(error(
06658: Primitives.concat
06659: .apply(
06660: "expected integer, found ",
06661: getTypeName
06662: .apply(tl)),
06663: left));
06664: }
06665: return result$651;
06666: }
06667: }
06668: .apply();
06669: new Guard<TypicalTypes.raw_type<?>>() {
06670: public TypicalTypes.raw_type<?> apply() {
06671: if ((null == unify)) {
06672: return null;
06673: }
06674: if ((null == intt)) {
06675: return null;
06676: }
06677: if ((null == tr)) {
06678: return null;
06679: }
06680:
06681: final TypicalTypes.raw_type<?> result$652 = unify
06682: .apply(
06683: tr,
06684: intt);
06685:
06686: if ((null == result$652)) {
06687: return Analyzer
06688: .cast(error(
06689: Primitives.concat
06690: .apply(
06691: "expected integer, found ",
06692: getTypeName
06693: .apply(tr)),
06694: right));
06695: }
06696: return result$652;
06697: }
06698: }
06699: .apply();
06700: }
06701:
06702: public TypicalTypes.raw_type<?> apply() {
06703: return Analyzer
06704: .cast(intt);
06705: }
06706: }
06707: .apply());
06708: }
06709: if ((null != "%" && "%"
06710: .equals(arg$636))) {
06711: return Analyzer
06712: .cast(new Let<TypicalTypes.raw_type<?>>() {
06713: {
06714: new Guard<TypicalTypes.raw_type<?>>() {
06715: public TypicalTypes.raw_type<?> apply() {
06716: if ((null == unify)) {
06717: return null;
06718: }
06719: if ((null == tl)) {
06720: return null;
06721: }
06722: if ((null == intt)) {
06723: return null;
06724: }
06725:
06726: final TypicalTypes.raw_type<?> result$655 = unify
06727: .apply(
06728: tl,
06729: intt);
06730:
06731: if ((null == result$655)) {
06732: return Analyzer
06733: .cast(error(
06734: Primitives.concat
06735: .apply(
06736: "expected integer, found ",
06737: getTypeName
06738: .apply(tl)),
06739: left));
06740: }
06741: return result$655;
06742: }
06743: }
06744: .apply();
06745: new Guard<TypicalTypes.raw_type<?>>() {
06746: public TypicalTypes.raw_type<?> apply() {
06747: if ((null == unify)) {
06748: return null;
06749: }
06750: if ((null == intt)) {
06751: return null;
06752: }
06753: if ((null == tr)) {
06754: return null;
06755: }
06756:
06757: final TypicalTypes.raw_type<?> result$656 = unify
06758: .apply(
06759: tr,
06760: intt);
06761:
06762: if ((null == result$656)) {
06763: return Analyzer
06764: .cast(error(
06765: Primitives.concat
06766: .apply(
06767: "expected integer, found ",
06768: getTypeName
06769: .apply(tr)),
06770: right));
06771: }
06772: return result$656;
06773: }
06774: }
06775: .apply();
06776: }
06777:
06778: public TypicalTypes.raw_type<?> apply() {
06779: return Analyzer
06780: .cast(intt);
06781: }
06782: }
06783: .apply());
06784: }
06785: if (true) {
06786: return Analyzer
06787: .cast(new Let<TypicalTypes.raw_type<?>>() {
06788: {
06789: new Guard<TypicalTypes.raw_type<?>>() {
06790: public TypicalTypes.raw_type<?> apply() {
06791: if ((null == unify)) {
06792: return null;
06793: }
06794: if ((null == tl)) {
06795: return null;
06796: }
06797: if ((null == floatt)) {
06798: return null;
06799: }
06800:
06801: final TypicalTypes.raw_type<?> result$659 = unify
06802: .apply(
06803: tl,
06804: floatt);
06805:
06806: if ((null == result$659)) {
06807: return Analyzer
06808: .cast(error(
06809: Primitives.concat
06810: .apply(
06811: Primitives.concat
06812: .apply(
06813: "expected 64-bit float",
06814: ", found "),
06815: getTypeName
06816: .apply(tl)),
06817: left));
06818: }
06819: return result$659;
06820: }
06821: }
06822: .apply();
06823: new Guard<TypicalTypes.raw_type<?>>() {
06824: public TypicalTypes.raw_type<?> apply() {
06825: if ((null == unify)) {
06826: return null;
06827: }
06828: if ((null == floatt)) {
06829: return null;
06830: }
06831: if ((null == tr)) {
06832: return null;
06833: }
06834:
06835: final TypicalTypes.raw_type<?> result$660 = unify
06836: .apply(
06837: tr,
06838: floatt);
06839:
06840: if ((null == result$660)) {
06841: return Analyzer
06842: .cast(error(
06843: Primitives.concat
06844: .apply(
06845: Primitives.concat
06846: .apply(
06847: "expected 64-bit float",
06848: ", found "),
06849: getTypeName
06850: .apply(tr)),
06851: right));
06852: }
06853: return result$660;
06854: }
06855: }
06856: .apply();
06857: }
06858:
06859: public TypicalTypes.raw_type<?> apply() {
06860: return Analyzer
06861: .cast(floatt);
06862: }
06863: }
06864: .apply());
06865: }
06866: return null;
06867: }
06868: }.apply());
06869: }
06870: }.apply());
06871:
06872: checkExitScope(arg$125);
06873: matching_nodes
06874: .remove(matching_nodes.size() - 1);
06875: if ((null != arg$125)) {
06876: arg$125.setProperty("__type", retValue$664);
06877: }
06878: return Analyzer.cast(retValue$664);
06879: }
06880: if (TypicalSupport.match$665(arg$125)) {
06881: final Node left = (arg$125.size() > 0 ? arg$125
06882: .getGeneric(0) : null);
06883: final Node right = (arg$125.size() > 2 ? arg$125
06884: .getGeneric(2)
06885: : null);
06886:
06887: matching_nodes.add(arg$125);
06888: if ((null != arg$125 && processScopeNodes
06889: .contains(arg$125.getName()))) {
06890: processScope(arg$125, getScope);
06891: }
06892: checkEnterScope(arg$125);
06893:
06894: final Object retValue$672 = Analyzer
06895: .cast(new Let<TypicalTypes.raw_type<?>>() {
06896: final TypicalTypes.raw_type<?> tl;
06897: final TypicalTypes.raw_type<?> tr;
06898:
06899: {
06900: tl = Analyzer.cast(analyze
06901: .apply(left));
06902: tr = Analyzer.cast(analyze
06903: .apply(right));
06904: new Guard<TypicalTypes.raw_type<?>>() {
06905: public TypicalTypes.raw_type<?> apply() {
06906: if ((null == unify)) {
06907: return null;
06908: }
06909: if ((null == tl)) {
06910: return null;
06911: }
06912: if ((null == strt)) {
06913: return null;
06914: }
06915:
06916: final TypicalTypes.raw_type<?> result$668 = unify
06917: .apply(tl, strt);
06918:
06919: if ((null == result$668)) {
06920: return Analyzer
06921: .cast(error(
06922: Primitives.concat
06923: .apply(
06924: "expected string, found ",
06925: getTypeName
06926: .apply(tl)),
06927: left));
06928: }
06929: return result$668;
06930: }
06931: }.apply();
06932: new Guard<TypicalTypes.raw_type<?>>() {
06933: public TypicalTypes.raw_type<?> apply() {
06934: if ((null == unify)) {
06935: return null;
06936: }
06937: if ((null == strt)) {
06938: return null;
06939: }
06940: if ((null == tr)) {
06941: return null;
06942: }
06943:
06944: final TypicalTypes.raw_type<?> result$669 = unify
06945: .apply(tr, strt);
06946:
06947: if ((null == result$669)) {
06948: return Analyzer
06949: .cast(error(
06950: Primitives.concat
06951: .apply(
06952: "expected string, found ",
06953: getTypeName
06954: .apply(tr)),
06955: right));
06956: }
06957: return result$669;
06958: }
06959: }.apply();
06960: }
06961:
06962: public TypicalTypes.raw_type<?> apply() {
06963: return Analyzer.cast(strt);
06964: }
06965: }.apply());
06966:
06967: checkExitScope(arg$125);
06968: matching_nodes
06969: .remove(matching_nodes.size() - 1);
06970: if ((null != arg$125)) {
06971: arg$125.setProperty("__type", retValue$672);
06972: }
06973: return Analyzer.cast(retValue$672);
06974: }
06975: if (TypicalSupport.match$673(arg$125)) {
06976: final Node n = (arg$125.size() > 0 ? arg$125
06977: .getGeneric(0) : null);
06978: final Node con = (arg$125.size() > 1 ? arg$125
06979: .getGeneric(1) : null);
06980:
06981: matching_nodes.add(arg$125);
06982: if ((null != arg$125 && processScopeNodes
06983: .contains(arg$125.getName()))) {
06984: processScope(arg$125, getScope);
06985: }
06986: checkEnterScope(arg$125);
06987:
06988: final Object retValue$678 = Analyzer
06989: .cast(new Let<TypicalTypes.raw_type<?>>() {
06990: final TypicalTypes.raw_type<?> t;
06991: final TypicalTypes.raw_type<?> tl;
06992:
06993: {
06994: t = Analyzer.cast(analyze
06995: .apply(n));
06996: tl = Analyzer.cast(analyze
06997: .apply(con));
06998: }
06999:
07000: public TypicalTypes.raw_type<?> apply() {
07001: return Analyzer
07002: .cast(null == Primitives.and
07003: .apply(
07004: Primitives.isNotBottom
07005: .apply(t),
07006: Primitives.isNotBottom
07007: .apply(tl))
07008: || !Primitives.and
07009: .apply(
07010: Primitives.isNotBottom
07011: .apply(t),
07012: Primitives.isNotBottom
07013: .apply(tl)) ? null
07014: : null == isListType
07015: .apply(tl) ? null
07016: : isListType
07017: .apply(tl) ? new Let<TypicalTypes.raw_type<?>>() {
07018: final TypicalTypes.raw_type<?> res;
07019:
07020: {
07021: res = Analyzer
07022: .cast(unify
07023: .apply(
07024: tl,
07025: new TypicalTypes.ConstructedT(
07026: new Pair<TypicalTypes.raw_type<?>>(
07027: t),
07028: "list")));
07029: }
07030:
07031: public TypicalTypes.raw_type<?> apply() {
07032: return Analyzer
07033: .cast(new Require<TypicalTypes.raw_type<?>>() {
07034: public TypicalTypes.raw_type<?> apply() {
07035: final Boolean var$675 = Primitives.isNotBottom
07036: .apply(res);
07037:
07038: if ((null != var$675 && !var$675)) {
07039: showMessage(
07040: "error",
07041: "type of the head does not match type of the tail",
07042: null);
07043: }
07044: if ((null == var$675)) {
07045: return null;
07046: }
07047: if (var$675) {
07048: return res;
07049: }
07050: return null;
07051: }
07052: }
07053: .apply());
07054: }
07055: }
07056: .apply()
07057: : error(
07058: "the tail of a cons expression must be a list",
07059: null));
07060: }
07061: }.apply());
07062:
07063: checkExitScope(arg$125);
07064: matching_nodes
07065: .remove(matching_nodes.size() - 1);
07066: if ((null != arg$125)) {
07067: arg$125.setProperty("__type", retValue$678);
07068: }
07069: return Analyzer.cast(retValue$678);
07070: }
07071: if (TypicalSupport.match$679(arg$125)) {
07072: final Pair<Node> pl = Analyzer
07073: .cast(Primitives.getChildren(arg$125,
07074: 0, arg$125.size()));
07075:
07076: matching_nodes.add(arg$125);
07077: if ((null != arg$125 && processScopeNodes
07078: .contains(arg$125.getName()))) {
07079: processScope(arg$125, getScope);
07080: }
07081: checkEnterScope(arg$125);
07082:
07083: final Object retValue$2266 = Analyzer
07084: .cast(new Match<TypicalTypes.raw_type<?>>() {
07085: public TypicalTypes.raw_type<?> apply() {
07086: final Pair<Node> arg$1472 = Analyzer
07087: .cast(pl);
07088:
07089: if ((null == arg$1472)) {
07090: return null;
07091: }
07092: if (TypicalSupport
07093: .match$681(arg$1472)) {
07094: final Node mod = Analyzer
07095: .cast(arg$1472
07096: .get(0));
07097: final Node name = Analyzer
07098: .cast(arg$1472
07099: .get(1));
07100: final Node args = Analyzer
07101: .cast(arg$1472
07102: .get(2));
07103:
07104: return Analyzer
07105: .cast(new Let<TypicalTypes.raw_type<?>>() {
07106: final String mol;
07107: final String s;
07108: final Pair<Node> nl;
07109:
07110: {
07111: mol = Analyzer
07112: .cast(getString
07113: .apply(mod));
07114: s = Analyzer
07115: .cast(getString
07116: .apply(name));
07117: nl = Analyzer
07118: .cast(getNodeList
07119: .apply(args));
07120: }
07121:
07122: public TypicalTypes.raw_type<?> apply() {
07123: return Analyzer
07124: .cast(new Match<TypicalTypes.raw_type<?>>() {
07125: public TypicalTypes.raw_type<?> apply() {
07126: final String arg$1476 = Analyzer
07127: .cast(mol);
07128:
07129: if ((null == arg$1476)) {
07130: return null;
07131: }
07132: if ((null != "List" && "List"
07133: .equals(arg$1476))) {
07134: return Analyzer
07135: .cast(null == isDefined
07136: .apply(
07137: GNode
07138: .create(
07139: "Parameter",
07140: Primitives.concat
07141: .apply(
07142: Primitives.concat
07143: .apply(
07144: mol,
07145: "."),
07146: s),
07147: null),
07148: getNameSpace) ? null
07149: : isDefined
07150: .apply(
07151: GNode
07152: .create(
07153: "Parameter",
07154: Primitives.concat
07155: .apply(
07156: Primitives.concat
07157: .apply(
07158: mol,
07159: "."),
07160: s),
07161: null),
07162: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
07163: final TypicalTypes.raw_type<?> funcType;
07164:
07165: {
07166: funcType = Analyzer
07167: .cast(Analyzer
07168: .cast(lookup2
07169: .apply(
07170: GNode
07171: .create(
07172: "Parameter",
07173: Primitives.concat
07174: .apply(
07175: Primitives.concat
07176: .apply(
07177: mol,
07178: "."),
07179: s),
07180: null),
07181: getNameSpace)));
07182: }
07183:
07184: public TypicalTypes.raw_type<?> apply() {
07185: return Analyzer
07186: .cast(processFunctionApplication
07187: .apply(
07188: copy
07189: .apply(funcType),
07190: nl));
07191: }
07192: }
07193: .apply()
07194: : error(
07195: Primitives.concat
07196: .apply(
07197: Primitives.concat
07198: .apply(
07199: Primitives.concat
07200: .apply(
07201: mol,
07202: "."),
07203: s),
07204: " is undefined"),
07205: null));
07206: }
07207: if ((null != "String" && "String"
07208: .equals(arg$1476))) {
07209: return Analyzer
07210: .cast(null == isDefined
07211: .apply(
07212: GNode
07213: .create(
07214: "Parameter",
07215: Primitives.concat
07216: .apply(
07217: Primitives.concat
07218: .apply(
07219: mol,
07220: "."),
07221: s),
07222: null),
07223: getNameSpace) ? null
07224: : isDefined
07225: .apply(
07226: GNode
07227: .create(
07228: "Parameter",
07229: Primitives.concat
07230: .apply(
07231: Primitives.concat
07232: .apply(
07233: mol,
07234: "."),
07235: s),
07236: null),
07237: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
07238: final TypicalTypes.raw_type<?> funcType;
07239:
07240: {
07241: funcType = Analyzer
07242: .cast(Analyzer
07243: .cast(lookup2
07244: .apply(
07245: GNode
07246: .create(
07247: "Parameter",
07248: Primitives.concat
07249: .apply(
07250: Primitives.concat
07251: .apply(
07252: mol,
07253: "."),
07254: s),
07255: null),
07256: getNameSpace)));
07257: }
07258:
07259: public TypicalTypes.raw_type<?> apply() {
07260: return Analyzer
07261: .cast(processFunctionApplication
07262: .apply(
07263: copy
07264: .apply(funcType),
07265: nl));
07266: }
07267: }
07268: .apply()
07269: : error(
07270: Primitives.concat
07271: .apply(
07272: Primitives.concat
07273: .apply(
07274: Primitives.concat
07275: .apply(
07276: mol,
07277: "."),
07278: s),
07279: " is undefined"),
07280: null));
07281: }
07282: if ((null != "Map" && "Map"
07283: .equals(arg$1476))) {
07284: return Analyzer
07285: .cast(null == isDefined
07286: .apply(
07287: GNode
07288: .create(
07289: "Parameter",
07290: Primitives.concat
07291: .apply(
07292: Primitives.concat
07293: .apply(
07294: mol,
07295: "."),
07296: s),
07297: null),
07298: getNameSpace) ? null
07299: : isDefined
07300: .apply(
07301: GNode
07302: .create(
07303: "Parameter",
07304: Primitives.concat
07305: .apply(
07306: Primitives.concat
07307: .apply(
07308: mol,
07309: "."),
07310: s),
07311: null),
07312: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
07313: final TypicalTypes.raw_type<?> funcType;
07314:
07315: {
07316: funcType = Analyzer
07317: .cast(Analyzer
07318: .cast(lookup2
07319: .apply(
07320: GNode
07321: .create(
07322: "Parameter",
07323: Primitives.concat
07324: .apply(
07325: Primitives.concat
07326: .apply(
07327: mol,
07328: "."),
07329: s),
07330: null),
07331: getNameSpace)));
07332: }
07333:
07334: public TypicalTypes.raw_type<?> apply() {
07335: return Analyzer
07336: .cast(processFunctionApplication
07337: .apply(
07338: copy
07339: .apply(funcType),
07340: nl));
07341: }
07342: }
07343: .apply()
07344: : error(
07345: Primitives.concat
07346: .apply(
07347: Primitives.concat
07348: .apply(
07349: Primitives.concat
07350: .apply(
07351: mol,
07352: "."),
07353: s),
07354: " is undefined"),
07355: null));
07356: }
07357: if ((null != "Float32" && "Float32"
07358: .equals(arg$1476))) {
07359: return Analyzer
07360: .cast(null == isDefined
07361: .apply(
07362: GNode
07363: .create(
07364: "Parameter",
07365: Primitives.concat
07366: .apply(
07367: Primitives.concat
07368: .apply(
07369: mol,
07370: "."),
07371: s),
07372: null),
07373: getNameSpace) ? null
07374: : isDefined
07375: .apply(
07376: GNode
07377: .create(
07378: "Parameter",
07379: Primitives.concat
07380: .apply(
07381: Primitives.concat
07382: .apply(
07383: mol,
07384: "."),
07385: s),
07386: null),
07387: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
07388: final TypicalTypes.raw_type<?> funcType;
07389:
07390: {
07391: funcType = Analyzer
07392: .cast(Analyzer
07393: .cast(lookup2
07394: .apply(
07395: GNode
07396: .create(
07397: "Parameter",
07398: Primitives.concat
07399: .apply(
07400: Primitives.concat
07401: .apply(
07402: mol,
07403: "."),
07404: s),
07405: null),
07406: getNameSpace)));
07407: }
07408:
07409: public TypicalTypes.raw_type<?> apply() {
07410: return Analyzer
07411: .cast(processFunctionApplication
07412: .apply(
07413: copy
07414: .apply(funcType),
07415: nl));
07416: }
07417: }
07418: .apply()
07419: : error(
07420: Primitives.concat
07421: .apply(
07422: Primitives.concat
07423: .apply(
07424: Primitives.concat
07425: .apply(
07426: mol,
07427: "."),
07428: s),
07429: " is undefined"),
07430: null));
07431: }
07432: if ((null != "Prelude" && "Prelude"
07433: .equals(arg$1476))) {
07434: return Analyzer
07435: .cast(null == isDefined
07436: .apply(
07437: GNode
07438: .create(
07439: "Parameter",
07440: s,
07441: null),
07442: getNameSpace) ? null
07443: : isDefined
07444: .apply(
07445: GNode
07446: .create(
07447: "Parameter",
07448: s,
07449: null),
07450: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
07451: final TypicalTypes.raw_type<?> funcType;
07452:
07453: {
07454: funcType = Analyzer
07455: .cast(Analyzer
07456: .cast(lookup2
07457: .apply(
07458: GNode
07459: .create(
07460: "Parameter",
07461: s,
07462: null),
07463: getNameSpace)));
07464: }
07465:
07466: public TypicalTypes.raw_type<?> apply() {
07467: return Analyzer
07468: .cast(processFunctionApplication
07469: .apply(
07470: copy
07471: .apply(funcType),
07472: nl));
07473: }
07474: }
07475: .apply()
07476: : error(
07477: Primitives.concat
07478: .apply(
07479: Primitives.concat
07480: .apply(
07481: Primitives.concat
07482: .apply(
07483: mol,
07484: "."),
07485: s),
07486: " is undefined"),
07487: null));
07488: }
07489: if (true) {
07490: return Analyzer
07491: .cast(error(
07492: Primitives.concat
07493: .apply(
07494: Primitives.concat
07495: .apply(
07496: "module ",
07497: mol),
07498: " is undefined"),
07499: null));
07500: }
07501: return null;
07502: }
07503: }
07504: .apply());
07505: }
07506: }.apply());
07507: }
07508: if (TypicalSupport
07509: .match$686(arg$1472)) {
07510: final Node name = Analyzer
07511: .cast(arg$1472
07512: .get(0));
07513: final Node args = Analyzer
07514: .cast(arg$1472
07515: .get(1));
07516:
07517: return Analyzer
07518: .cast(new Let<TypicalTypes.raw_type<?>>() {
07519: final String s;
07520: final Pair<Node> nl;
07521:
07522: {
07523: s = Analyzer
07524: .cast(getString
07525: .apply(name));
07526: nl = Analyzer
07527: .cast(getNodeList
07528: .apply(args));
07529: }
07530:
07531: public TypicalTypes.raw_type<?> apply() {
07532: return Analyzer
07533: .cast(new Match<TypicalTypes.raw_type<?>>() {
07534: public TypicalTypes.raw_type<?> apply() {
07535: final String arg$1871 = Analyzer
07536: .cast(s);
07537:
07538: if ((null == arg$1871)) {
07539: return null;
07540: }
07541: if ((null != "lookup" && "lookup"
07542: .equals(arg$1871))) {
07543: return Analyzer
07544: .cast(new Match<TypicalTypes.raw_type<?>>() {
07545: public TypicalTypes.raw_type<?> apply() {
07546: final Pair<Node> arg$1930 = Analyzer
07547: .cast(nl);
07548:
07549: if ((null == arg$1930)) {
07550: return null;
07551: }
07552: if (TypicalSupport
07553: .match$689(arg$1930)) {
07554: final Node e1 = Analyzer
07555: .cast(arg$1930
07556: .get(0));
07557: final Node strNode = Analyzer
07558: .cast(arg$1930
07559: .get(1));
07560: final Node errNode = Analyzer
07561: .cast(arg$1930
07562: .get(2));
07563:
07564: return Analyzer
07565: .cast(new Let<TypicalTypes.raw_type<?>>() {
07566: final String str;
07567: final Node e2;
07568: final TypicalTypes.raw_type<?> t1;
07569: final TypicalTypes.raw_type<?> t2;
07570:
07571: {
07572: str = Analyzer
07573: .cast(getString
07574: .apply(strNode));
07575: e2 = Analyzer
07576: .cast(new Match<Node>() {
07577: public Node apply() {
07578: final Node arg$1945 = GNode
07579: .cast(errNode);
07580:
07581: if ((null == arg$1945)) {
07582: return null;
07583: }
07584: if (TypicalSupport
07585: .match$692(arg$1945)) {
07586: final Node ne = (arg$1945
07587: .size() > 1 ? arg$1945
07588: .getGeneric(1)
07589: : null);
07590:
07591: matching_nodes
07592: .add(arg$1945);
07593: if ((null != arg$1945 && processScopeNodes
07594: .contains(arg$1945
07595: .getName()))) {
07596: processScope(
07597: arg$1945,
07598: getScope);
07599: }
07600: checkEnterScope(arg$1945);
07601:
07602: final Object retValue$1949 = Analyzer
07603: .cast(ne);
07604:
07605: checkExitScope(arg$1945);
07606: matching_nodes
07607: .remove(matching_nodes
07608: .size() - 1);
07609: return Analyzer
07610: .cast(retValue$1949);
07611: }
07612: if (true) {
07613: matching_nodes
07614: .add(arg$1945);
07615: if ((null != arg$1945 && processScopeNodes
07616: .contains(arg$1945
07617: .getName()))) {
07618: processScope(
07619: arg$1945,
07620: getScope);
07621: }
07622: checkEnterScope(arg$1945);
07623:
07624: final Object retValue$1952 = Analyzer
07625: .cast(error(
07626: "ErrorClause is expected",
07627: null));
07628:
07629: checkExitScope(arg$1945);
07630: matching_nodes
07631: .remove(matching_nodes
07632: .size() - 1);
07633: return Analyzer
07634: .cast(retValue$1952);
07635: }
07636: return null;
07637: }
07638: }
07639: .apply());
07640: t1 = Analyzer
07641: .cast(analyze
07642: .apply(e1));
07643: t2 = Analyzer
07644: .cast(analyze
07645: .apply(e2));
07646: new Guard<TypicalTypes.raw_type<?>>() {
07647: public TypicalTypes.raw_type<?> apply() {
07648: if ((null == t1)) {
07649: return null;
07650: }
07651: if ((null == ensureNodeType)) {
07652: return null;
07653: }
07654:
07655: final TypicalTypes.raw_type<?> result$1954 = ensureNodeType
07656: .apply(t1);
07657:
07658: if ((null == result$1954)) {
07659: return Analyzer
07660: .cast(error(
07661: Primitives.concat
07662: .apply(
07663: "expected node, found ",
07664: getTypeName
07665: .apply(t1)),
07666: e1));
07667: }
07668: return result$1954;
07669: }
07670: }
07671: .apply();
07672: new Guard<TypicalTypes.raw_type<?>>() {
07673: public TypicalTypes.raw_type<?> apply() {
07674: if ((null == unify)) {
07675: return null;
07676: }
07677: if ((null == strt)) {
07678: return null;
07679: }
07680: if ((null == t2)) {
07681: return null;
07682: }
07683:
07684: final TypicalTypes.raw_type<?> result$1955 = unify
07685: .apply(
07686: t2,
07687: strt);
07688:
07689: if ((null == result$1955)) {
07690: return Analyzer
07691: .cast(error(
07692: Primitives.concat
07693: .apply(
07694: "expected string, found ",
07695: getTypeName
07696: .apply(t2)),
07697: e2));
07698: }
07699: return result$1955;
07700: }
07701: }
07702: .apply();
07703: }
07704:
07705: public TypicalTypes.raw_type<?> apply() {
07706: return Analyzer
07707: .cast(new Require<TypicalTypes.raw_type<?>>() {
07708: public TypicalTypes.raw_type<?> apply() {
07709: final Boolean var$1944 = isDefined
07710: .apply(
07711: GNode
07712: .create(
07713: "UserDefinedType",
07714: Primitives.concat
07715: .apply(
07716: "tag",
07717: str)),
07718: getNameSpace);
07719:
07720: if ((null != var$1944 && !var$1944)) {
07721: showMessage(
07722: "error",
07723: Primitives.concat
07724: .apply(
07725: Primitives.concat
07726: .apply(
07727: "tag ",
07728: str),
07729: " is undefined"),
07730: null);
07731: }
07732: if ((null == var$1944)) {
07733: return null;
07734: }
07735: if (var$1944) {
07736: return Analyzer
07737: .cast(lookup2
07738: .apply(
07739: GNode
07740: .create(
07741: "UserDefinedType",
07742: Primitives.concat
07743: .apply(
07744: "tag",
07745: str)),
07746: getNameSpace));
07747: }
07748: return null;
07749: }
07750: }
07751: .apply());
07752: }
07753: }
07754: .apply());
07755: }
07756: if (TypicalSupport
07757: .match$714(arg$1930)) {
07758: final Node e1 = Analyzer
07759: .cast(arg$1930
07760: .get(0));
07761: final Node errNode = Analyzer
07762: .cast(arg$1930
07763: .get(1));
07764:
07765: return Analyzer
07766: .cast(new Let<TypicalTypes.raw_type<?>>() {
07767: final Node e2;
07768: final TypicalTypes.raw_type<?> t1;
07769: final TypicalTypes.raw_type<?> t2;
07770:
07771: {
07772: e2 = Analyzer
07773: .cast(new Match<Node>() {
07774: public Node apply() {
07775: final Node arg$1968 = GNode
07776: .cast(errNode);
07777:
07778: if ((null == arg$1968)) {
07779: return null;
07780: }
07781: if (TypicalSupport
07782: .match$692(arg$1968)) {
07783: final Node ne = (arg$1968
07784: .size() > 1 ? arg$1968
07785: .getGeneric(1)
07786: : null);
07787:
07788: matching_nodes
07789: .add(arg$1968);
07790: if ((null != arg$1968 && processScopeNodes
07791: .contains(arg$1968
07792: .getName()))) {
07793: processScope(
07794: arg$1968,
07795: getScope);
07796: }
07797: checkEnterScope(arg$1968);
07798:
07799: final Object retValue$1972 = Analyzer
07800: .cast(ne);
07801:
07802: checkExitScope(arg$1968);
07803: matching_nodes
07804: .remove(matching_nodes
07805: .size() - 1);
07806: return Analyzer
07807: .cast(retValue$1972);
07808: }
07809: if (true) {
07810: matching_nodes
07811: .add(arg$1968);
07812: if ((null != arg$1968 && processScopeNodes
07813: .contains(arg$1968
07814: .getName()))) {
07815: processScope(
07816: arg$1968,
07817: getScope);
07818: }
07819: checkEnterScope(arg$1968);
07820:
07821: final Object retValue$1975 = Analyzer
07822: .cast(error(
07823: "ErrorClause is expected",
07824: null));
07825:
07826: checkExitScope(arg$1968);
07827: matching_nodes
07828: .remove(matching_nodes
07829: .size() - 1);
07830: return Analyzer
07831: .cast(retValue$1975);
07832: }
07833: return null;
07834: }
07835: }
07836: .apply());
07837: t1 = Analyzer
07838: .cast(analyze
07839: .apply(e1));
07840: t2 = Analyzer
07841: .cast(analyze
07842: .apply(e2));
07843: new Guard<TypicalTypes.raw_type<?>>() {
07844: public TypicalTypes.raw_type<?> apply() {
07845: if ((null == t1)) {
07846: return null;
07847: }
07848: if ((null == ensureNodeType)) {
07849: return null;
07850: }
07851:
07852: final TypicalTypes.raw_type<?> result$1977 = ensureNodeType
07853: .apply(t1);
07854:
07855: if ((null == result$1977)) {
07856: return Analyzer
07857: .cast(error(
07858: Primitives.concat
07859: .apply(
07860: "node is expedted, found ",
07861: getTypeName
07862: .apply(t1)),
07863: e1));
07864: }
07865: return result$1977;
07866: }
07867: }
07868: .apply();
07869: new Guard<TypicalTypes.raw_type<?>>() {
07870: public TypicalTypes.raw_type<?> apply() {
07871: if ((null == unify)) {
07872: return null;
07873: }
07874: if ((null == strt)) {
07875: return null;
07876: }
07877: if ((null == t2)) {
07878: return null;
07879: }
07880:
07881: final TypicalTypes.raw_type<?> result$1978 = unify
07882: .apply(
07883: t2,
07884: strt);
07885:
07886: if ((null == result$1978)) {
07887: return Analyzer
07888: .cast(error(
07889: Primitives.concat
07890: .apply(
07891: "expected string, found ",
07892: getTypeName
07893: .apply(t2)),
07894: e2));
07895: }
07896: return result$1978;
07897: }
07898: }
07899: .apply();
07900: }
07901:
07902: public TypicalTypes.raw_type<?> apply() {
07903: return Analyzer
07904: .cast(typet);
07905: }
07906: }
07907: .apply());
07908: }
07909: if (TypicalSupport
07910: .match$737(arg$1930)) {
07911: final Node e1 = Analyzer
07912: .cast(arg$1930
07913: .get(0));
07914: final Node strNode = Analyzer
07915: .cast(arg$1930
07916: .get(1));
07917:
07918: return Analyzer
07919: .cast(new Let<TypicalTypes.raw_type<?>>() {
07920: final TypicalTypes.raw_type<?> t1;
07921: final String str;
07922:
07923: {
07924: t1 = Analyzer
07925: .cast(analyze
07926: .apply(e1));
07927: str = Analyzer
07928: .cast(getString
07929: .apply(strNode));
07930: new Guard<TypicalTypes.raw_type<?>>() {
07931: public TypicalTypes.raw_type<?> apply() {
07932: if ((null == t1)) {
07933: return null;
07934: }
07935: if ((null == ensureNodeType)) {
07936: return null;
07937: }
07938:
07939: final TypicalTypes.raw_type<?> result$1983 = ensureNodeType
07940: .apply(t1);
07941:
07942: if ((null == result$1983)) {
07943: return Analyzer
07944: .cast(error(
07945: Primitives.concat
07946: .apply(
07947: "expected node, found ",
07948: getTypeName
07949: .apply(t1)),
07950: e1));
07951: }
07952: return result$1983;
07953: }
07954: }
07955: .apply();
07956: }
07957:
07958: public TypicalTypes.raw_type<?> apply() {
07959: return Analyzer
07960: .cast(new Require<TypicalTypes.raw_type<?>>() {
07961: public TypicalTypes.raw_type<?> apply() {
07962: final Boolean var$1982 = isDefined
07963: .apply(
07964: GNode
07965: .create(
07966: "UserDefinedType",
07967: Primitives.concat
07968: .apply(
07969: "tag",
07970: str)),
07971: getNameSpace);
07972:
07973: if ((null != var$1982 && !var$1982)) {
07974: showMessage(
07975: "error",
07976: Primitives.concat
07977: .apply(
07978: Primitives.concat
07979: .apply(
07980: "tag ",
07981: str),
07982: " is undefined"),
07983: null);
07984: }
07985: if ((null == var$1982)) {
07986: return null;
07987: }
07988: if (var$1982) {
07989: return Analyzer
07990: .cast(lookup2
07991: .apply(
07992: GNode
07993: .create(
07994: "UserDefinedType",
07995: Primitives.concat
07996: .apply(
07997: "tag",
07998: str)),
07999: getNameSpace));
08000: }
08001: return null;
08002: }
08003: }
08004: .apply());
08005: }
08006: }
08007: .apply());
08008: }
08009: if (TypicalSupport
08010: .match$742(arg$1930)) {
08011: final Node e1 = Analyzer
08012: .cast(arg$1930
08013: .get(0));
08014:
08015: return Analyzer
08016: .cast(new Let<TypicalTypes.raw_type<?>>() {
08017: final TypicalTypes.raw_type<?> t1;
08018:
08019: {
08020: t1 = Analyzer
08021: .cast(analyze
08022: .apply(e1));
08023: new Guard<TypicalTypes.raw_type<?>>() {
08024: public TypicalTypes.raw_type<?> apply() {
08025: if ((null == t1)) {
08026: return null;
08027: }
08028: if ((null == ensureNodeType)) {
08029: return null;
08030: }
08031:
08032: final TypicalTypes.raw_type<?> result$1986 = ensureNodeType
08033: .apply(t1);
08034:
08035: if ((null == result$1986)) {
08036: return Analyzer
08037: .cast(error(
08038: Primitives.concat
08039: .apply(
08040: "expected node, found ",
08041: getTypeName
08042: .apply(t1)),
08043: e1));
08044: }
08045: return result$1986;
08046: }
08047: }
08048: .apply();
08049: }
08050:
08051: public TypicalTypes.raw_type<?> apply() {
08052: return Analyzer
08053: .cast(typet);
08054: }
08055: }
08056: .apply());
08057: }
08058: if (true) {
08059: return Analyzer
08060: .cast(error(
08061: Primitives.concat
08062: .apply(
08063: s,
08064: " is applied with invalid arguments"),
08065: null));
08066: }
08067: return null;
08068: }
08069: }
08070: .apply());
08071: }
08072: if ((null != "lookup_locally" && "lookup_locally"
08073: .equals(arg$1871))) {
08074: return Analyzer
08075: .cast(new Match<TypicalTypes.raw_type<?>>() {
08076: public TypicalTypes.raw_type<?> apply() {
08077: final Pair<Node> arg$2046 = Analyzer
08078: .cast(nl);
08079:
08080: if ((null == arg$2046)) {
08081: return null;
08082: }
08083: if (TypicalSupport
08084: .match$689(arg$2046)) {
08085: final Node e1 = Analyzer
08086: .cast(arg$2046
08087: .get(0));
08088: final Node strNode = Analyzer
08089: .cast(arg$2046
08090: .get(1));
08091: final Node errNode = Analyzer
08092: .cast(arg$2046
08093: .get(2));
08094:
08095: return Analyzer
08096: .cast(new Let<TypicalTypes.raw_type<?>>() {
08097: final String str;
08098: final Node e2;
08099: final TypicalTypes.raw_type<?> t1;
08100: final TypicalTypes.raw_type<?> t2;
08101:
08102: {
08103: str = Analyzer
08104: .cast(getString
08105: .apply(strNode));
08106: e2 = Analyzer
08107: .cast(new Match<Node>() {
08108: public Node apply() {
08109: final Node arg$2061 = GNode
08110: .cast(errNode);
08111:
08112: if ((null == arg$2061)) {
08113: return null;
08114: }
08115: if (TypicalSupport
08116: .match$692(arg$2061)) {
08117: final Node ne = (arg$2061
08118: .size() > 1 ? arg$2061
08119: .getGeneric(1)
08120: : null);
08121:
08122: matching_nodes
08123: .add(arg$2061);
08124: if ((null != arg$2061 && processScopeNodes
08125: .contains(arg$2061
08126: .getName()))) {
08127: processScope(
08128: arg$2061,
08129: getScope);
08130: }
08131: checkEnterScope(arg$2061);
08132:
08133: final Object retValue$2065 = Analyzer
08134: .cast(ne);
08135:
08136: checkExitScope(arg$2061);
08137: matching_nodes
08138: .remove(matching_nodes
08139: .size() - 1);
08140: return Analyzer
08141: .cast(retValue$2065);
08142: }
08143: if (true) {
08144: matching_nodes
08145: .add(arg$2061);
08146: if ((null != arg$2061 && processScopeNodes
08147: .contains(arg$2061
08148: .getName()))) {
08149: processScope(
08150: arg$2061,
08151: getScope);
08152: }
08153: checkEnterScope(arg$2061);
08154:
08155: final Object retValue$2068 = Analyzer
08156: .cast(error(
08157: "ErrorClause is expected",
08158: null));
08159:
08160: checkExitScope(arg$2061);
08161: matching_nodes
08162: .remove(matching_nodes
08163: .size() - 1);
08164: return Analyzer
08165: .cast(retValue$2068);
08166: }
08167: return null;
08168: }
08169: }
08170: .apply());
08171: t1 = Analyzer
08172: .cast(analyze
08173: .apply(e1));
08174: t2 = Analyzer
08175: .cast(analyze
08176: .apply(e2));
08177: new Guard<TypicalTypes.raw_type<?>>() {
08178: public TypicalTypes.raw_type<?> apply() {
08179: if ((null == t1)) {
08180: return null;
08181: }
08182: if ((null == ensureNodeType)) {
08183: return null;
08184: }
08185:
08186: final TypicalTypes.raw_type<?> result$2070 = ensureNodeType
08187: .apply(t1);
08188:
08189: if ((null == result$2070)) {
08190: return Analyzer
08191: .cast(error(
08192: Primitives.concat
08193: .apply(
08194: "expected node, found ",
08195: getTypeName
08196: .apply(t1)),
08197: e1));
08198: }
08199: return result$2070;
08200: }
08201: }
08202: .apply();
08203: new Guard<TypicalTypes.raw_type<?>>() {
08204: public TypicalTypes.raw_type<?> apply() {
08205: if ((null == unify)) {
08206: return null;
08207: }
08208: if ((null == strt)) {
08209: return null;
08210: }
08211: if ((null == t2)) {
08212: return null;
08213: }
08214:
08215: final TypicalTypes.raw_type<?> result$2071 = unify
08216: .apply(
08217: t2,
08218: strt);
08219:
08220: if ((null == result$2071)) {
08221: return Analyzer
08222: .cast(error(
08223: Primitives.concat
08224: .apply(
08225: "expected string, found ",
08226: getTypeName
08227: .apply(t2)),
08228: e2));
08229: }
08230: return result$2071;
08231: }
08232: }
08233: .apply();
08234: }
08235:
08236: public TypicalTypes.raw_type<?> apply() {
08237: return Analyzer
08238: .cast(new Require<TypicalTypes.raw_type<?>>() {
08239: public TypicalTypes.raw_type<?> apply() {
08240: final Boolean var$2060 = isDefined
08241: .apply(
08242: GNode
08243: .create(
08244: "UserDefinedType",
08245: Primitives.concat
08246: .apply(
08247: "tag",
08248: str)),
08249: getNameSpace);
08250:
08251: if ((null != var$2060 && !var$2060)) {
08252: showMessage(
08253: "error",
08254: Primitives.concat
08255: .apply(
08256: Primitives.concat
08257: .apply(
08258: "tag ",
08259: str),
08260: " is undefined"),
08261: null);
08262: }
08263: if ((null == var$2060)) {
08264: return null;
08265: }
08266: if (var$2060) {
08267: return Analyzer
08268: .cast(lookup2
08269: .apply(
08270: GNode
08271: .create(
08272: "UserDefinedType",
08273: Primitives.concat
08274: .apply(
08275: "tag",
08276: str)),
08277: getNameSpace));
08278: }
08279: return null;
08280: }
08281: }
08282: .apply());
08283: }
08284: }
08285: .apply());
08286: }
08287: if (TypicalSupport
08288: .match$714(arg$2046)) {
08289: final Node e1 = Analyzer
08290: .cast(arg$2046
08291: .get(0));
08292: final Node errNode = Analyzer
08293: .cast(arg$2046
08294: .get(1));
08295:
08296: return Analyzer
08297: .cast(new Let<TypicalTypes.raw_type<?>>() {
08298: final Node e2;
08299: final TypicalTypes.raw_type<?> t1;
08300: final TypicalTypes.raw_type<?> t2;
08301:
08302: {
08303: e2 = Analyzer
08304: .cast(new Match<Node>() {
08305: public Node apply() {
08306: final Node arg$2084 = GNode
08307: .cast(errNode);
08308:
08309: if ((null == arg$2084)) {
08310: return null;
08311: }
08312: if (TypicalSupport
08313: .match$692(arg$2084)) {
08314: final Node ne = (arg$2084
08315: .size() > 1 ? arg$2084
08316: .getGeneric(1)
08317: : null);
08318:
08319: matching_nodes
08320: .add(arg$2084);
08321: if ((null != arg$2084 && processScopeNodes
08322: .contains(arg$2084
08323: .getName()))) {
08324: processScope(
08325: arg$2084,
08326: getScope);
08327: }
08328: checkEnterScope(arg$2084);
08329:
08330: final Object retValue$2088 = Analyzer
08331: .cast(ne);
08332:
08333: checkExitScope(arg$2084);
08334: matching_nodes
08335: .remove(matching_nodes
08336: .size() - 1);
08337: return Analyzer
08338: .cast(retValue$2088);
08339: }
08340: if (true) {
08341: matching_nodes
08342: .add(arg$2084);
08343: if ((null != arg$2084 && processScopeNodes
08344: .contains(arg$2084
08345: .getName()))) {
08346: processScope(
08347: arg$2084,
08348: getScope);
08349: }
08350: checkEnterScope(arg$2084);
08351:
08352: final Object retValue$2091 = Analyzer
08353: .cast(error(
08354: "ErrorClause is expected",
08355: null));
08356:
08357: checkExitScope(arg$2084);
08358: matching_nodes
08359: .remove(matching_nodes
08360: .size() - 1);
08361: return Analyzer
08362: .cast(retValue$2091);
08363: }
08364: return null;
08365: }
08366: }
08367: .apply());
08368: t1 = Analyzer
08369: .cast(analyze
08370: .apply(e1));
08371: t2 = Analyzer
08372: .cast(analyze
08373: .apply(e2));
08374: new Guard<TypicalTypes.raw_type<?>>() {
08375: public TypicalTypes.raw_type<?> apply() {
08376: if ((null == t1)) {
08377: return null;
08378: }
08379: if ((null == ensureNodeType)) {
08380: return null;
08381: }
08382:
08383: final TypicalTypes.raw_type<?> result$2093 = ensureNodeType
08384: .apply(t1);
08385:
08386: if ((null == result$2093)) {
08387: return Analyzer
08388: .cast(error(
08389: Primitives.concat
08390: .apply(
08391: "node is expedted, found ",
08392: getTypeName
08393: .apply(t1)),
08394: e1));
08395: }
08396: return result$2093;
08397: }
08398: }
08399: .apply();
08400: new Guard<TypicalTypes.raw_type<?>>() {
08401: public TypicalTypes.raw_type<?> apply() {
08402: if ((null == unify)) {
08403: return null;
08404: }
08405: if ((null == strt)) {
08406: return null;
08407: }
08408: if ((null == t2)) {
08409: return null;
08410: }
08411:
08412: final TypicalTypes.raw_type<?> result$2094 = unify
08413: .apply(
08414: t2,
08415: strt);
08416:
08417: if ((null == result$2094)) {
08418: return Analyzer
08419: .cast(error(
08420: Primitives.concat
08421: .apply(
08422: "expected string, found ",
08423: getTypeName
08424: .apply(t2)),
08425: e2));
08426: }
08427: return result$2094;
08428: }
08429: }
08430: .apply();
08431: }
08432:
08433: public TypicalTypes.raw_type<?> apply() {
08434: return Analyzer
08435: .cast(typet);
08436: }
08437: }
08438: .apply());
08439: }
08440: if (TypicalSupport
08441: .match$737(arg$2046)) {
08442: final Node e1 = Analyzer
08443: .cast(arg$2046
08444: .get(0));
08445: final Node strNode = Analyzer
08446: .cast(arg$2046
08447: .get(1));
08448:
08449: return Analyzer
08450: .cast(new Let<TypicalTypes.raw_type<?>>() {
08451: final TypicalTypes.raw_type<?> t1;
08452: final String str;
08453:
08454: {
08455: t1 = Analyzer
08456: .cast(analyze
08457: .apply(e1));
08458: str = Analyzer
08459: .cast(getString
08460: .apply(strNode));
08461: new Guard<TypicalTypes.raw_type<?>>() {
08462: public TypicalTypes.raw_type<?> apply() {
08463: if ((null == t1)) {
08464: return null;
08465: }
08466: if ((null == ensureNodeType)) {
08467: return null;
08468: }
08469:
08470: final TypicalTypes.raw_type<?> result$2099 = ensureNodeType
08471: .apply(t1);
08472:
08473: if ((null == result$2099)) {
08474: return Analyzer
08475: .cast(error(
08476: Primitives.concat
08477: .apply(
08478: "expected node, found ",
08479: getTypeName
08480: .apply(t1)),
08481: e1));
08482: }
08483: return result$2099;
08484: }
08485: }
08486: .apply();
08487: }
08488:
08489: public TypicalTypes.raw_type<?> apply() {
08490: return Analyzer
08491: .cast(new Require<TypicalTypes.raw_type<?>>() {
08492: public TypicalTypes.raw_type<?> apply() {
08493: final Boolean var$2098 = isDefined
08494: .apply(
08495: GNode
08496: .create(
08497: "UserDefinedType",
08498: Primitives.concat
08499: .apply(
08500: "tag",
08501: str)),
08502: getNameSpace);
08503:
08504: if ((null != var$2098 && !var$2098)) {
08505: showMessage(
08506: "error",
08507: Primitives.concat
08508: .apply(
08509: Primitives.concat
08510: .apply(
08511: "tag ",
08512: str),
08513: " is undefined"),
08514: null);
08515: }
08516: if ((null == var$2098)) {
08517: return null;
08518: }
08519: if (var$2098) {
08520: return Analyzer
08521: .cast(lookup2
08522: .apply(
08523: GNode
08524: .create(
08525: "UserDefinedType",
08526: Primitives.concat
08527: .apply(
08528: "tag",
08529: str)),
08530: getNameSpace));
08531: }
08532: return null;
08533: }
08534: }
08535: .apply());
08536: }
08537: }
08538: .apply());
08539: }
08540: if (TypicalSupport
08541: .match$742(arg$2046)) {
08542: final Node e1 = Analyzer
08543: .cast(arg$2046
08544: .get(0));
08545:
08546: return Analyzer
08547: .cast(new Let<TypicalTypes.raw_type<?>>() {
08548: final TypicalTypes.raw_type<?> t1;
08549:
08550: {
08551: t1 = Analyzer
08552: .cast(analyze
08553: .apply(e1));
08554: new Guard<TypicalTypes.raw_type<?>>() {
08555: public TypicalTypes.raw_type<?> apply() {
08556: if ((null == t1)) {
08557: return null;
08558: }
08559: if ((null == ensureNodeType)) {
08560: return null;
08561: }
08562:
08563: final TypicalTypes.raw_type<?> result$2102 = ensureNodeType
08564: .apply(t1);
08565:
08566: if ((null == result$2102)) {
08567: return Analyzer
08568: .cast(error(
08569: Primitives.concat
08570: .apply(
08571: "expected node, found ",
08572: getTypeName
08573: .apply(t1)),
08574: e1));
08575: }
08576: return result$2102;
08577: }
08578: }
08579: .apply();
08580: }
08581:
08582: public TypicalTypes.raw_type<?> apply() {
08583: return Analyzer
08584: .cast(typet);
08585: }
08586: }
08587: .apply());
08588: }
08589: if (true) {
08590: return Analyzer
08591: .cast(error(
08592: Primitives.concat
08593: .apply(
08594: s,
08595: " is applied with invalid arguments"),
08596: null));
08597: }
08598: return null;
08599: }
08600: }
08601: .apply());
08602: }
08603: if ((null != "define" && "define"
08604: .equals(arg$1871))) {
08605: return Analyzer
08606: .cast(new Match<TypicalTypes.raw_type<?>>() {
08607: public TypicalTypes.raw_type<?> apply() {
08608: final Pair<Node> arg$2132 = Analyzer
08609: .cast(nl);
08610:
08611: if ((null == arg$2132)) {
08612: return null;
08613: }
08614: if (TypicalSupport
08615: .match$689(arg$2132)) {
08616: final Node e1 = Analyzer
08617: .cast(arg$2132
08618: .get(0));
08619: final Node e2 = Analyzer
08620: .cast(arg$2132
08621: .get(1));
08622: final Node errNode = Analyzer
08623: .cast(arg$2132
08624: .get(2));
08625:
08626: return Analyzer
08627: .cast(new Let<TypicalTypes.raw_type<?>>() {
08628: final Node e3;
08629: final TypicalTypes.raw_type<?> t1;
08630: final TypicalTypes.raw_type<?> t3;
08631:
08632: {
08633: e3 = Analyzer
08634: .cast(new Match<Node>() {
08635: public Node apply() {
08636: final Node arg$2145 = GNode
08637: .cast(errNode);
08638:
08639: if ((null == arg$2145)) {
08640: return null;
08641: }
08642: if (TypicalSupport
08643: .match$692(arg$2145)) {
08644: final Node ne = (arg$2145
08645: .size() > 1 ? arg$2145
08646: .getGeneric(1)
08647: : null);
08648:
08649: matching_nodes
08650: .add(arg$2145);
08651: if ((null != arg$2145 && processScopeNodes
08652: .contains(arg$2145
08653: .getName()))) {
08654: processScope(
08655: arg$2145,
08656: getScope);
08657: }
08658: checkEnterScope(arg$2145);
08659:
08660: final Object retValue$2149 = Analyzer
08661: .cast(ne);
08662:
08663: checkExitScope(arg$2145);
08664: matching_nodes
08665: .remove(matching_nodes
08666: .size() - 1);
08667: return Analyzer
08668: .cast(retValue$2149);
08669: }
08670: if (true) {
08671: matching_nodes
08672: .add(arg$2145);
08673: if ((null != arg$2145 && processScopeNodes
08674: .contains(arg$2145
08675: .getName()))) {
08676: processScope(
08677: arg$2145,
08678: getScope);
08679: }
08680: checkEnterScope(arg$2145);
08681:
08682: final Object retValue$2152 = Analyzer
08683: .cast(error(
08684: "ErrorClause is expected",
08685: null));
08686:
08687: checkExitScope(arg$2145);
08688: matching_nodes
08689: .remove(matching_nodes
08690: .size() - 1);
08691: return Analyzer
08692: .cast(retValue$2152);
08693: }
08694: return null;
08695: }
08696: }
08697: .apply());
08698: t1 = Analyzer
08699: .cast(analyze
08700: .apply(e1));
08701: analyze
08702: .apply(e2);
08703: t3 = Analyzer
08704: .cast(analyze
08705: .apply(e3));
08706: new Guard<TypicalTypes.raw_type<?>>() {
08707: public TypicalTypes.raw_type<?> apply() {
08708: if ((null == t1)) {
08709: return null;
08710: }
08711: if ((null == ensureNodeType)) {
08712: return null;
08713: }
08714:
08715: final TypicalTypes.raw_type<?> result$2154 = ensureNodeType
08716: .apply(t1);
08717:
08718: if ((null == result$2154)) {
08719: return Analyzer
08720: .cast(error(
08721: Primitives.concat
08722: .apply(
08723: "expected node, found ",
08724: getTypeName
08725: .apply(t1)),
08726: e1));
08727: }
08728: return result$2154;
08729: }
08730: }
08731: .apply();
08732: new Guard<TypicalTypes.raw_type<?>>() {
08733: public TypicalTypes.raw_type<?> apply() {
08734: if ((null == unify)) {
08735: return null;
08736: }
08737: if ((null == t3)) {
08738: return null;
08739: }
08740: if ((null == strt)) {
08741: return null;
08742: }
08743:
08744: final TypicalTypes.raw_type<?> result$2155 = unify
08745: .apply(
08746: t3,
08747: strt);
08748:
08749: if ((null == result$2155)) {
08750: return Analyzer
08751: .cast(error(
08752: Primitives.concat
08753: .apply(
08754: "expected string, found ",
08755: getTypeName
08756: .apply(t3)),
08757: e3));
08758: }
08759: return result$2155;
08760: }
08761: }
08762: .apply();
08763: }
08764:
08765: public TypicalTypes.raw_type<?> apply() {
08766: return Analyzer
08767: .cast(wildt);
08768: }
08769: }
08770: .apply());
08771: }
08772: if (TypicalSupport
08773: .match$686(arg$2132)) {
08774: final Node e1 = Analyzer
08775: .cast(arg$2132
08776: .get(0));
08777: final Node e2 = Analyzer
08778: .cast(arg$2132
08779: .get(1));
08780:
08781: return Analyzer
08782: .cast(new Let<TypicalTypes.raw_type<?>>() {
08783: final TypicalTypes.raw_type<?> t1;
08784:
08785: {
08786: t1 = Analyzer
08787: .cast(analyze
08788: .apply(e1));
08789: analyze
08790: .apply(e2);
08791: new Guard<TypicalTypes.raw_type<?>>() {
08792: public TypicalTypes.raw_type<?> apply() {
08793: if ((null == t1)) {
08794: return null;
08795: }
08796: if ((null == ensureNodeType)) {
08797: return null;
08798: }
08799:
08800: final TypicalTypes.raw_type<?> result$2158 = ensureNodeType
08801: .apply(t1);
08802:
08803: if ((null == result$2158)) {
08804: return Analyzer
08805: .cast(error(
08806: Primitives.concat
08807: .apply(
08808: "expected node, found ",
08809: getTypeName
08810: .apply(t1)),
08811: e1));
08812: }
08813: return result$2158;
08814: }
08815: }
08816: .apply();
08817: }
08818:
08819: public TypicalTypes.raw_type<?> apply() {
08820: return Analyzer
08821: .cast(wildt);
08822: }
08823: }
08824: .apply());
08825: }
08826: if (true) {
08827: return Analyzer
08828: .cast(error(
08829: Primitives.concat
08830: .apply(
08831: s,
08832: " is applied with invalid arguments"),
08833: null));
08834: }
08835: return null;
08836: }
08837: }
08838: .apply());
08839: }
08840: if ((null != "redefine" && "redefine"
08841: .equals(arg$1871))) {
08842: return Analyzer
08843: .cast(new Match<TypicalTypes.raw_type<?>>() {
08844: public TypicalTypes.raw_type<?> apply() {
08845: final Pair<Node> arg$2165 = Analyzer
08846: .cast(nl);
08847:
08848: if ((null == arg$2165)) {
08849: return null;
08850: }
08851: if (TypicalSupport
08852: .match$686(arg$2165)) {
08853: final Node e1 = Analyzer
08854: .cast(arg$2165
08855: .get(0));
08856: final Node e2 = Analyzer
08857: .cast(arg$2165
08858: .get(1));
08859:
08860: return Analyzer
08861: .cast(new Let<TypicalTypes.raw_type<?>>() {
08862: final TypicalTypes.raw_type<?> t1;
08863:
08864: {
08865: t1 = Analyzer
08866: .cast(analyze
08867: .apply(e1));
08868: analyze
08869: .apply(e2);
08870: new Guard<TypicalTypes.raw_type<?>>() {
08871: public TypicalTypes.raw_type<?> apply() {
08872: if ((null == t1)) {
08873: return null;
08874: }
08875: if ((null == ensureNodeType)) {
08876: return null;
08877: }
08878:
08879: final TypicalTypes.raw_type<?> result$2168 = ensureNodeType
08880: .apply(t1);
08881:
08882: if ((null == result$2168)) {
08883: return Analyzer
08884: .cast(error(
08885: Primitives.concat
08886: .apply(
08887: "expected node, found ",
08888: getTypeName
08889: .apply(t1)),
08890: e1));
08891: }
08892: return result$2168;
08893: }
08894: }
08895: .apply();
08896: }
08897:
08898: public TypicalTypes.raw_type<?> apply() {
08899: return Analyzer
08900: .cast(wildt);
08901: }
08902: }
08903: .apply());
08904: }
08905: if (true) {
08906: return Analyzer
08907: .cast(error(
08908: Primitives.concat
08909: .apply(
08910: s,
08911: " is applied with invalid arguments"),
08912: null));
08913: }
08914: return null;
08915: }
08916: }
08917: .apply());
08918: }
08919: if ((null != "is_defined" && "is_defined"
08920: .equals(arg$1871))) {
08921: return Analyzer
08922: .cast(new Match<TypicalTypes.raw_type<?>>() {
08923: public TypicalTypes.raw_type<?> apply() {
08924: final Pair<Node> arg$2175 = Analyzer
08925: .cast(nl);
08926:
08927: if ((null == arg$2175)) {
08928: return null;
08929: }
08930: if (TypicalSupport
08931: .match$742(arg$2175)) {
08932: final Node e1 = Analyzer
08933: .cast(arg$2175
08934: .get(0));
08935:
08936: return Analyzer
08937: .cast(new Let<TypicalTypes.raw_type<?>>() {
08938: final TypicalTypes.raw_type<?> t1;
08939:
08940: {
08941: t1 = Analyzer
08942: .cast(analyze
08943: .apply(e1));
08944: new Guard<TypicalTypes.raw_type<?>>() {
08945: public TypicalTypes.raw_type<?> apply() {
08946: if ((null == t1)) {
08947: return null;
08948: }
08949: if ((null == ensureNodeType)) {
08950: return null;
08951: }
08952:
08953: final TypicalTypes.raw_type<?> result$2178 = ensureNodeType
08954: .apply(t1);
08955:
08956: if ((null == result$2178)) {
08957: return Analyzer
08958: .cast(error(
08959: Primitives.concat
08960: .apply(
08961: "expected node, found ",
08962: getTypeName
08963: .apply(t1)),
08964: e1));
08965: }
08966: return result$2178;
08967: }
08968: }
08969: .apply();
08970: }
08971:
08972: public TypicalTypes.raw_type<?> apply() {
08973: return Analyzer
08974: .cast(boolt);
08975: }
08976: }
08977: .apply());
08978: }
08979: if (true) {
08980: return Analyzer
08981: .cast(error(
08982: Primitives.concat
08983: .apply(
08984: s,
08985: "must have one argument"),
08986: null));
08987: }
08988: return null;
08989: }
08990: }
08991: .apply());
08992: }
08993: if ((null != "is_defined_locally" && "is_defined_locally"
08994: .equals(arg$1871))) {
08995: return Analyzer
08996: .cast(new Match<TypicalTypes.raw_type<?>>() {
08997: public TypicalTypes.raw_type<?> apply() {
08998: final Pair<Node> arg$2185 = Analyzer
08999: .cast(nl);
09000:
09001: if ((null == arg$2185)) {
09002: return null;
09003: }
09004: if (TypicalSupport
09005: .match$742(arg$2185)) {
09006: final Node e1 = Analyzer
09007: .cast(arg$2185
09008: .get(0));
09009:
09010: return Analyzer
09011: .cast(new Let<TypicalTypes.raw_type<?>>() {
09012: final TypicalTypes.raw_type<?> t1;
09013:
09014: {
09015: t1 = Analyzer
09016: .cast(analyze
09017: .apply(e1));
09018: new Guard<TypicalTypes.raw_type<?>>() {
09019: public TypicalTypes.raw_type<?> apply() {
09020: if ((null == t1)) {
09021: return null;
09022: }
09023: if ((null == ensureNodeType)) {
09024: return null;
09025: }
09026:
09027: final TypicalTypes.raw_type<?> result$2188 = ensureNodeType
09028: .apply(t1);
09029:
09030: if ((null == result$2188)) {
09031: return Analyzer
09032: .cast(error(
09033: Primitives.concat
09034: .apply(
09035: "expected node, found ",
09036: getTypeName
09037: .apply(t1)),
09038: e1));
09039: }
09040: return result$2188;
09041: }
09042: }
09043: .apply();
09044: }
09045:
09046: public TypicalTypes.raw_type<?> apply() {
09047: return Analyzer
09048: .cast(boolt);
09049: }
09050: }
09051: .apply());
09052: }
09053: if (true) {
09054: return Analyzer
09055: .cast(error(
09056: Primitives.concat
09057: .apply(
09058: s,
09059: "must have one argument"),
09060: null));
09061: }
09062: return null;
09063: }
09064: }
09065: .apply());
09066: }
09067: if ((null != "annotate" && "annotate"
09068: .equals(arg$1871))) {
09069: return Analyzer
09070: .cast(new Match<TypicalTypes.raw_type<?>>() {
09071: public TypicalTypes.raw_type<?> apply() {
09072: final Pair<Node> arg$2199 = Analyzer
09073: .cast(nl);
09074:
09075: if ((null == arg$2199)) {
09076: return null;
09077: }
09078: if (TypicalSupport
09079: .match$681(arg$2199)) {
09080: final Node e1 = Analyzer
09081: .cast(arg$2199
09082: .get(0));
09083: final Node e2 = Analyzer
09084: .cast(arg$2199
09085: .get(1));
09086: final Node e3 = Analyzer
09087: .cast(arg$2199
09088: .get(2));
09089:
09090: return Analyzer
09091: .cast(new Let<TypicalTypes.raw_type<?>>() {
09092: final TypicalTypes.raw_type<?> t1;
09093: final TypicalTypes.raw_type<?> t2;
09094: final TypicalTypes.raw_type<?> t3;
09095:
09096: {
09097: t1 = Analyzer
09098: .cast(analyze
09099: .apply(e1));
09100: t2 = Analyzer
09101: .cast(analyze
09102: .apply(e2));
09103: t3 = Analyzer
09104: .cast(analyze
09105: .apply(e3));
09106: new Guard<TypicalTypes.raw_type<?>>() {
09107: public TypicalTypes.raw_type<?> apply() {
09108: if ((null == t1)) {
09109: return null;
09110: }
09111: if ((null == ensureNodeType)) {
09112: return null;
09113: }
09114:
09115: final TypicalTypes.raw_type<?> result$2204 = ensureNodeType
09116: .apply(t1);
09117:
09118: if ((null == result$2204)) {
09119: return Analyzer
09120: .cast(error(
09121: Primitives.concat
09122: .apply(
09123: "expected node, found ",
09124: getTypeName
09125: .apply(t1)),
09126: e1));
09127: }
09128: return result$2204;
09129: }
09130: }
09131: .apply();
09132: new Guard<TypicalTypes.raw_type<?>>() {
09133: public TypicalTypes.raw_type<?> apply() {
09134: if ((null == unify)) {
09135: return null;
09136: }
09137: if ((null == strt)) {
09138: return null;
09139: }
09140: if ((null == t2)) {
09141: return null;
09142: }
09143:
09144: final TypicalTypes.raw_type<?> result$2205 = unify
09145: .apply(
09146: t2,
09147: strt);
09148:
09149: if ((null == result$2205)) {
09150: return Analyzer
09151: .cast(error(
09152: Primitives.concat
09153: .apply(
09154: "expected string, found ",
09155: getTypeName
09156: .apply(t2)),
09157: e2));
09158: }
09159: return result$2205;
09160: }
09161: }
09162: .apply();
09163: new Guard<TypicalTypes.raw_type<?>>() {
09164: public TypicalTypes.raw_type<?> apply() {
09165: if ((null == unify)) {
09166: return null;
09167: }
09168: if ((null == t3)) {
09169: return null;
09170: }
09171: if ((null == typet)) {
09172: return null;
09173: }
09174:
09175: final TypicalTypes.raw_type<?> result$2206 = unify
09176: .apply(
09177: t3,
09178: typet);
09179:
09180: if ((null == result$2206)) {
09181: return Analyzer
09182: .cast(error(
09183: Primitives.concat
09184: .apply(
09185: "expected type, found ",
09186: getTypeName
09187: .apply(t3)),
09188: e3));
09189: }
09190: return result$2206;
09191: }
09192: }
09193: .apply();
09194: }
09195:
09196: public TypicalTypes.raw_type<?> apply() {
09197: return Analyzer
09198: .cast(wildt);
09199: }
09200: }
09201: .apply());
09202: }
09203: if (true) {
09204: return Analyzer
09205: .cast(null);
09206: }
09207: return null;
09208: }
09209: }
09210: .apply());
09211: }
09212: if ((null != "has_annotation" && "has_annotation"
09213: .equals(arg$1871))) {
09214: return Analyzer
09215: .cast(new Match<TypicalTypes.raw_type<?>>() {
09216: public TypicalTypes.raw_type<?> apply() {
09217: final Pair<Node> arg$2215 = Analyzer
09218: .cast(nl);
09219:
09220: if ((null == arg$2215)) {
09221: return null;
09222: }
09223: if (TypicalSupport
09224: .match$686(arg$2215)) {
09225: final Node e1 = Analyzer
09226: .cast(arg$2215
09227: .get(0));
09228: final Node e2 = Analyzer
09229: .cast(arg$2215
09230: .get(1));
09231:
09232: return Analyzer
09233: .cast(new Let<TypicalTypes.raw_type<?>>() {
09234: final TypicalTypes.raw_type<?> t1;
09235: final TypicalTypes.raw_type<?> t2;
09236:
09237: {
09238: t1 = Analyzer
09239: .cast(analyze
09240: .apply(e1));
09241: t2 = Analyzer
09242: .cast(analyze
09243: .apply(e2));
09244: new Guard<TypicalTypes.raw_type<?>>() {
09245: public TypicalTypes.raw_type<?> apply() {
09246: if ((null == t1)) {
09247: return null;
09248: }
09249: if ((null == ensureNodeType)) {
09250: return null;
09251: }
09252:
09253: final TypicalTypes.raw_type<?> result$2219 = ensureNodeType
09254: .apply(t1);
09255:
09256: if ((null == result$2219)) {
09257: return Analyzer
09258: .cast(error(
09259: Primitives.concat
09260: .apply(
09261: "expected node, found ",
09262: getTypeName
09263: .apply(t1)),
09264: e1));
09265: }
09266: return result$2219;
09267: }
09268: }
09269: .apply();
09270: new Guard<TypicalTypes.raw_type<?>>() {
09271: public TypicalTypes.raw_type<?> apply() {
09272: if ((null == unify)) {
09273: return null;
09274: }
09275: if ((null == strt)) {
09276: return null;
09277: }
09278: if ((null == t2)) {
09279: return null;
09280: }
09281:
09282: final TypicalTypes.raw_type<?> result$2220 = unify
09283: .apply(
09284: t2,
09285: strt);
09286:
09287: if ((null == result$2220)) {
09288: return Analyzer
09289: .cast(error(
09290: Primitives.concat
09291: .apply(
09292: "expected string, found ",
09293: getTypeName
09294: .apply(t2)),
09295: e2));
09296: }
09297: return result$2220;
09298: }
09299: }
09300: .apply();
09301: }
09302:
09303: public TypicalTypes.raw_type<?> apply() {
09304: return Analyzer
09305: .cast(boolt);
09306: }
09307: }
09308: .apply());
09309: }
09310: if (true) {
09311: return Analyzer
09312: .cast(null);
09313: }
09314: return null;
09315: }
09316: }
09317: .apply());
09318: }
09319: if ((null != "get_annotation" && "get_annotation"
09320: .equals(arg$1871))) {
09321: return Analyzer
09322: .cast(new Match<TypicalTypes.raw_type<?>>() {
09323: public TypicalTypes.raw_type<?> apply() {
09324: final Pair<Node> arg$2229 = Analyzer
09325: .cast(nl);
09326:
09327: if ((null == arg$2229)) {
09328: return null;
09329: }
09330: if (TypicalSupport
09331: .match$686(arg$2229)) {
09332: final Node e1 = Analyzer
09333: .cast(arg$2229
09334: .get(0));
09335: final Node e2 = Analyzer
09336: .cast(arg$2229
09337: .get(1));
09338:
09339: return Analyzer
09340: .cast(new Let<TypicalTypes.raw_type<?>>() {
09341: final TypicalTypes.raw_type<?> t1;
09342: final TypicalTypes.raw_type<?> t2;
09343:
09344: {
09345: t1 = Analyzer
09346: .cast(analyze
09347: .apply(e1));
09348: t2 = Analyzer
09349: .cast(analyze
09350: .apply(e2));
09351: new Guard<TypicalTypes.raw_type<?>>() {
09352: public TypicalTypes.raw_type<?> apply() {
09353: if ((null == t1)) {
09354: return null;
09355: }
09356: if ((null == ensureNodeType)) {
09357: return null;
09358: }
09359:
09360: final TypicalTypes.raw_type<?> result$2233 = ensureNodeType
09361: .apply(t1);
09362:
09363: if ((null == result$2233)) {
09364: return Analyzer
09365: .cast(error(
09366: Primitives.concat
09367: .apply(
09368: "expected node, found ",
09369: getTypeName
09370: .apply(t1)),
09371: e1));
09372: }
09373: return result$2233;
09374: }
09375: }
09376: .apply();
09377: new Guard<TypicalTypes.raw_type<?>>() {
09378: public TypicalTypes.raw_type<?> apply() {
09379: if ((null == unify)) {
09380: return null;
09381: }
09382: if ((null == strt)) {
09383: return null;
09384: }
09385: if ((null == t2)) {
09386: return null;
09387: }
09388:
09389: final TypicalTypes.raw_type<?> result$2234 = unify
09390: .apply(
09391: t2,
09392: strt);
09393:
09394: if ((null == result$2234)) {
09395: return Analyzer
09396: .cast(error(
09397: Primitives.concat
09398: .apply(
09399: "expected string, found ",
09400: getTypeName
09401: .apply(t2)),
09402: e2));
09403: }
09404: return result$2234;
09405: }
09406: }
09407: .apply();
09408: }
09409:
09410: public TypicalTypes.raw_type<?> apply() {
09411: return Analyzer
09412: .cast(typet);
09413: }
09414: }
09415: .apply());
09416: }
09417: if (true) {
09418: return Analyzer
09419: .cast(null);
09420: }
09421: return null;
09422: }
09423: }
09424: .apply());
09425: }
09426: if ((null != "annotate_list" && "annotate_list"
09427: .equals(arg$1871))) {
09428: return Analyzer
09429: .cast(new Match<TypicalTypes.raw_type<?>>() {
09430: public TypicalTypes.raw_type<?> apply() {
09431: final Pair<Node> arg$2245 = Analyzer
09432: .cast(nl);
09433:
09434: if ((null == arg$2245)) {
09435: return null;
09436: }
09437: if (TypicalSupport
09438: .match$681(arg$2245)) {
09439: final Node e1 = Analyzer
09440: .cast(arg$2245
09441: .get(0));
09442: final Node e2 = Analyzer
09443: .cast(arg$2245
09444: .get(1));
09445: final Node e3 = Analyzer
09446: .cast(arg$2245
09447: .get(2));
09448:
09449: return Analyzer
09450: .cast(new Let<TypicalTypes.raw_type<?>>() {
09451: final TypicalTypes.raw_type<?> t1;
09452: final TypicalTypes.raw_type<?> t2;
09453: final TypicalTypes.raw_type<?> t3;
09454:
09455: {
09456: t1 = Analyzer
09457: .cast(analyze
09458: .apply(e1));
09459: t2 = Analyzer
09460: .cast(analyze
09461: .apply(e2));
09462: t3 = Analyzer
09463: .cast(analyze
09464: .apply(e3));
09465: new Guard<TypicalTypes.raw_type<?>>() {
09466: public TypicalTypes.raw_type<?> apply() {
09467: if ((null == t1)) {
09468: return null;
09469: }
09470: if ((null == ensureNodeList)) {
09471: return null;
09472: }
09473:
09474: final TypicalTypes.raw_type<?> result$2250 = ensureNodeList
09475: .apply(t1);
09476:
09477: if ((null == result$2250)) {
09478: return Analyzer
09479: .cast(error(
09480: Primitives.concat
09481: .apply(
09482: "expected list of node, found ",
09483: getTypeName
09484: .apply(t1)),
09485: e1));
09486: }
09487: return result$2250;
09488: }
09489: }
09490: .apply();
09491: new Guard<TypicalTypes.raw_type<?>>() {
09492: public TypicalTypes.raw_type<?> apply() {
09493: if ((null == unify)) {
09494: return null;
09495: }
09496: if ((null == strt)) {
09497: return null;
09498: }
09499: if ((null == t2)) {
09500: return null;
09501: }
09502:
09503: final TypicalTypes.raw_type<?> result$2251 = unify
09504: .apply(
09505: t2,
09506: strt);
09507:
09508: if ((null == result$2251)) {
09509: return Analyzer
09510: .cast(error(
09511: Primitives.concat
09512: .apply(
09513: "expected string, found ",
09514: getTypeName
09515: .apply(t2)),
09516: e2));
09517: }
09518: return result$2251;
09519: }
09520: }
09521: .apply();
09522: new Guard<TypicalTypes.raw_type<?>>() {
09523: public TypicalTypes.raw_type<?> apply() {
09524: if ((null == unify)) {
09525: return null;
09526: }
09527: if ((null == t3)) {
09528: return null;
09529: }
09530: if ((null == typet)) {
09531: return null;
09532: }
09533:
09534: final TypicalTypes.raw_type<?> result$2252 = unify
09535: .apply(
09536: t3,
09537: typet);
09538:
09539: if ((null == result$2252)) {
09540: return Analyzer
09541: .cast(error(
09542: Primitives.concat
09543: .apply(
09544: "expected type, found ",
09545: getTypeName
09546: .apply(t2)),
09547: e2));
09548: }
09549: return result$2252;
09550: }
09551: }
09552: .apply();
09553: }
09554:
09555: public TypicalTypes.raw_type<?> apply() {
09556: return Analyzer
09557: .cast(wildt);
09558: }
09559: }
09560: .apply());
09561: }
09562: if (true) {
09563: return Analyzer
09564: .cast(null);
09565: }
09566: return null;
09567: }
09568: }
09569: .apply());
09570: }
09571: if (true) {
09572: return Analyzer
09573: .cast(new Let<TypicalTypes.raw_type<?>>() {
09574: final Node lo;
09575: final TypicalTypes.raw_type<?> funcT;
09576: final Node nod;
09577: final Pair<String> muts;
09578:
09579: {
09580: lo = Analyzer
09581: .cast(TypicalSupport.head$279
09582: .apply(pl));
09583: funcT = Analyzer
09584: .cast(Analyzer
09585: .cast(lookup4
09586: .apply(
09587: lo,
09588: "error",
09589: Primitives.concat
09590: .apply(
09591: s,
09592: " is undefined"),
09593: getNameSpace)));
09594: nod = Analyzer
09595: .cast(null == isDefined
09596: .apply(
09597: GNode
09598: .create(
09599: "NameSpaceStructure",
09600: s,
09601: null,
09602: null),
09603: getNameSpace)
09604: || !isDefined
09605: .apply(
09606: GNode
09607: .create(
09608: "NameSpaceStructure",
09609: s,
09610: null,
09611: null),
09612: getNameSpace) ? null
09613: : Analyzer
09614: .cast(lookup2
09615: .apply(
09616: GNode
09617: .create(
09618: "NameSpaceStructure",
09619: s,
09620: null,
09621: null),
09622: getNameSpace)));
09623: muts = Analyzer
09624: .cast(null == Primitives.isNotBottom
09625: .apply(nod)
09626: || !Primitives.isNotBottom
09627: .apply(nod) ? null
09628: : getAnnotatedStringList
09629: .apply(
09630: nod,
09631: "mutual"));
09632: Analyzer
09633: .discard(null == Primitives.isNotBottom
09634: .apply(muts)
09635: || !Primitives.isNotBottom
09636: .apply(muts) ? null
09637: : Primitives.annotateList
09638: .apply(
09639: nl,
09640: "mutual",
09641: new TypicalTypes.StringList(
09642: TypicalSupport.append$297
09643: .apply(
09644: muts,
09645: new Pair<String>(
09646: s)))));
09647: }
09648:
09649: public TypicalTypes.raw_type<?> apply() {
09650: return Analyzer
09651: .cast(null == Primitives.isNotBottom
09652: .apply(funcT)
09653: || !Primitives.isNotBottom
09654: .apply(funcT) ? null
09655: : new Match<TypicalTypes.raw_type<?>>() {
09656: public TypicalTypes.raw_type<?> apply() {
09657: final TypicalTypes.raw_type<?> arg$2258 = Analyzer
09658: .cast(funcT);
09659:
09660: if ((null == arg$2258)) {
09661: return null;
09662: }
09663: if ((null != arg$2258))
09664: switch (arg$2258
09665: .tag()) {
09666: case VariableT:
09667: if (TypicalSupport
09668: .match$117(arg$2258)) {
09669: return Analyzer
09670: .cast(processFunctionApplication
09671: .apply(
09672: funcT,
09673: nl));
09674: }
09675: break;
09676: case FunctionT:
09677: if (TypicalSupport
09678: .match$97(arg$2258)) {
09679: return Analyzer
09680: .cast(processFunctionApplication
09681: .apply(
09682: copy
09683: .apply(funcT),
09684: nl));
09685: }
09686: break;
09687: default:
09688: break;
09689: }
09690: ;
09691: if ((null == arg$2258)) {
09692: return Analyzer
09693: .cast(null);
09694: }
09695: if (true) {
09696: return Analyzer
09697: .cast(error(
09698: Primitives.concat
09699: .apply(
09700: "expected function type, found ",
09701: getTypeName
09702: .apply(funcT)),
09703: null));
09704: }
09705: return null;
09706: }
09707: }
09708: .apply());
09709: }
09710: }
09711: .apply());
09712: }
09713: return null;
09714: }
09715: }
09716: .apply());
09717: }
09718: }.apply());
09719: }
09720: if (true) {
09721: return Analyzer.cast(null);
09722: }
09723: return null;
09724: }
09725: }.apply());
09726:
09727: checkExitScope(arg$125);
09728: matching_nodes
09729: .remove(matching_nodes.size() - 1);
09730: if ((null != arg$125)) {
09731: arg$125
09732: .setProperty("__type",
09733: retValue$2266);
09734: }
09735: return Analyzer.cast(retValue$2266);
09736: }
09737: if (TypicalSupport.match$2267(arg$125)) {
09738: final Node pat = (arg$125.size() > 0 ? arg$125
09739: .getGeneric(0) : null);
09740: final Node e = (arg$125.size() > 1 ? arg$125
09741: .getGeneric(1) : null);
09742:
09743: matching_nodes.add(arg$125);
09744: if ((null != arg$125 && processScopeNodes
09745: .contains(arg$125.getName()))) {
09746: processScope(arg$125, getScope);
09747: }
09748: checkEnterScope(arg$125);
09749:
09750: final Object retValue$2272 = Analyzer
09751: .cast(new Let<TypicalTypes.raw_type<?>>() {
09752: final TypicalTypes.raw_type<?> left;
09753: final TypicalTypes.raw_type<?> right;
09754:
09755: {
09756: left = Analyzer.cast(analyze
09757: .apply(pat));
09758: right = Analyzer.cast(analyze
09759: .apply(e));
09760: new Guard<TypicalTypes.raw_type<?>>() {
09761: public TypicalTypes.raw_type<?> apply() {
09762: if ((null == unify)) {
09763: return null;
09764: }
09765: if ((null == right)) {
09766: return null;
09767: }
09768: if ((null == left)) {
09769: return null;
09770: }
09771:
09772: final TypicalTypes.raw_type<?> result$2269 = unify
09773: .apply(left,
09774: right);
09775:
09776: if ((null == result$2269)) {
09777: return Analyzer
09778: .cast(error(
09779: "types of the pattern and the expression do not match",
09780: null));
09781: }
09782: return result$2269;
09783: }
09784: }.apply();
09785: }
09786:
09787: public TypicalTypes.raw_type<?> apply() {
09788: return Analyzer.cast(boolt);
09789: }
09790: }.apply());
09791:
09792: checkExitScope(arg$125);
09793: matching_nodes
09794: .remove(matching_nodes.size() - 1);
09795: if ((null != arg$125)) {
09796: arg$125
09797: .setProperty("__type",
09798: retValue$2272);
09799: }
09800: return Analyzer.cast(retValue$2272);
09801: }
09802: if (TypicalSupport.match$2273(arg$125)) {
09803: final Node pat = (arg$125.size() > 0 ? arg$125
09804: .getGeneric(0) : null);
09805:
09806: matching_nodes.add(arg$125);
09807: if ((null != arg$125 && processScopeNodes
09808: .contains(arg$125.getName()))) {
09809: processScope(arg$125, getScope);
09810: }
09811: checkEnterScope(arg$125);
09812:
09813: final Object retValue$2276 = Analyzer
09814: .cast(analyze.apply(pat));
09815:
09816: checkExitScope(arg$125);
09817: matching_nodes
09818: .remove(matching_nodes.size() - 1);
09819: if ((null != arg$125)) {
09820: arg$125
09821: .setProperty("__type",
09822: retValue$2276);
09823: }
09824: return Analyzer.cast(retValue$2276);
09825: }
09826: if (TypicalSupport.match$49(arg$125)) {
09827: final Node n = (arg$125.size() > 0 ? arg$125
09828: .getGeneric(0) : null);
09829: final String s = (arg$125.size() > 1 ? arg$125
09830: .getString(1) : null);
09831:
09832: matching_nodes.add(arg$125);
09833: if ((null != arg$125 && processScopeNodes
09834: .contains(arg$125.getName()))) {
09835: processScope(arg$125, getScope);
09836: }
09837: checkEnterScope(arg$125);
09838:
09839: final Object retValue$2378 = Analyzer
09840: .cast(new Match<TypicalTypes.raw_type<?>>() {
09841: public TypicalTypes.raw_type<?> apply() {
09842: final Node arg$2327 = GNode
09843: .cast(n);
09844:
09845: if ((null == arg$2327)) {
09846: return null;
09847: }
09848: if (TypicalSupport
09849: .match$9(arg$2327)) {
09850: final String str = (arg$2327
09851: .size() > 0 ? arg$2327
09852: .getString(0)
09853: : null);
09854:
09855: matching_nodes
09856: .add(arg$2327);
09857: if ((null != arg$2327 && processScopeNodes
09858: .contains(arg$2327
09859: .getName()))) {
09860: processScope(arg$2327,
09861: getScope);
09862: }
09863: checkEnterScope(arg$2327);
09864:
09865: final Object retValue$2331 = Analyzer
09866: .cast(new Let<TypicalTypes.raw_type<?>>() {
09867: final String name;
09868:
09869: {
09870: name = Analyzer
09871: .cast(null == Primitives.equal
09872: .apply(
09873: "Prelude",
09874: str) ? null
09875: : Primitives.equal
09876: .apply(
09877: "Prelude",
09878: str) ? s
09879: : Primitives.concat
09880: .apply(
09881: Primitives.concat
09882: .apply(
09883: str,
09884: "."),
09885: s));
09886: }
09887:
09888: public TypicalTypes.raw_type<?> apply() {
09889: return Analyzer
09890: .cast(null == isDefined
09891: .apply(
09892: GNode
09893: .create(
09894: "Parameter",
09895: name,
09896: null),
09897: getNameSpace) ? null
09898: : isDefined
09899: .apply(
09900: GNode
09901: .create(
09902: "Parameter",
09903: name,
09904: null),
09905: getNameSpace) ? Analyzer
09906: .cast(lookup2
09907: .apply(
09908: GNode
09909: .create(
09910: "Parameter",
09911: name,
09912: null),
09913: getNameSpace))
09914: : error(
09915: Primitives.concat
09916: .apply(
09917: name,
09918: " is undefined"),
09919: null));
09920: }
09921: }.apply());
09922:
09923: checkExitScope(arg$2327);
09924: matching_nodes
09925: .remove(matching_nodes
09926: .size() - 1);
09927: return Analyzer
09928: .cast(retValue$2331);
09929: }
09930: if (true) {
09931: matching_nodes
09932: .add(arg$2327);
09933: if ((null != arg$2327 && processScopeNodes
09934: .contains(arg$2327
09935: .getName()))) {
09936: processScope(arg$2327,
09937: getScope);
09938: }
09939: checkEnterScope(arg$2327);
09940:
09941: final Object retValue$2374 = Analyzer
09942: .cast(new Let<TypicalTypes.raw_type<?>>() {
09943: final TypicalTypes.raw_type<?> temp;
09944: final TypicalTypes.raw_type<?> tn;
09945: final TypicalTypes.raw_type<?> ts;
09946:
09947: {
09948: temp = Analyzer
09949: .cast(analyze
09950: .apply(n));
09951: tn = Analyzer
09952: .cast(resolveRecordType
09953: .apply(temp));
09954: ts = Analyzer
09955: .cast(Analyzer
09956: .cast(lookup4
09957: .apply(
09958: no,
09959: "error",
09960: Primitives.concat
09961: .apply(
09962: Primitives.concat
09963: .apply(
09964: "field ",
09965: s),
09966: " is undefined"),
09967: getNameSpace)));
09968: }
09969:
09970: public TypicalTypes.raw_type<?> apply() {
09971: return Analyzer
09972: .cast(null == Primitives.isNotBottom
09973: .apply(ts)
09974: || !Primitives.isNotBottom
09975: .apply(ts) ? null
09976: : new Match<TypicalTypes.raw_type<?>>() {
09977: public TypicalTypes.raw_type<?> apply() {
09978: final TypicalTypes.raw_type<?> arg$2352 = Analyzer
09979: .cast(tn);
09980:
09981: if ((null == arg$2352)) {
09982: return null;
09983: }
09984: if ((null != arg$2352))
09985: switch (arg$2352
09986: .tag()) {
09987: case VariableT:
09988: if (TypicalSupport
09989: .match$117(arg$2352)) {
09990: return Analyzer
09991: .cast(new Match<TypicalTypes.raw_type<?>>() {
09992: public TypicalTypes.raw_type<?> apply() {
09993: final TypicalTypes.raw_type<?> arg$2368 = Analyzer
09994: .cast(ts);
09995:
09996: if ((null == arg$2368)) {
09997: return null;
09998: }
09999: if ((null != arg$2368))
10000: switch (arg$2368
10001: .tag()) {
10002: case FieldT:
10003: if (TypicalSupport
10004: .match$96(arg$2368)) {
10005: final String pa = Analyzer
10006: .cast(arg$2368
10007: .getTuple()
10008: .get1());
10009:
10010: return Analyzer
10011: .cast(new Let<TypicalTypes.raw_type<?>>() {
10012: final TypicalTypes.raw_type<?> res;
10013:
10014: {
10015: res = Analyzer
10016: .cast(Analyzer
10017: .cast(lookup2
10018: .apply(
10019: GNode
10020: .create(
10021: "UserDefinedType",
10022: pa),
10023: getNameSpace)));
10024: unify
10025: .apply(
10026: tn,
10027: res);
10028: }
10029:
10030: public TypicalTypes.raw_type<?> apply() {
10031: return Analyzer
10032: .cast(ts);
10033: }
10034: }
10035: .apply());
10036: }
10037: break;
10038: default:
10039: break;
10040: }
10041: ;
10042: if (true) {
10043: return Analyzer
10044: .cast(null);
10045: }
10046: return null;
10047: }
10048: }
10049: .apply());
10050: }
10051: break;
10052: case RecordT:
10053: if (TypicalSupport
10054: .match$107(arg$2352)) {
10055: return Analyzer
10056: .cast(new Match<TypicalTypes.raw_type<?>>() {
10057: public TypicalTypes.raw_type<?> apply() {
10058: final TypicalTypes.raw_type<?> arg$2359 = Analyzer
10059: .cast(ts);
10060:
10061: if ((null == arg$2359)) {
10062: return null;
10063: }
10064: if ((null != arg$2359))
10065: switch (arg$2359
10066: .tag()) {
10067: case FieldT:
10068: if (TypicalSupport
10069: .match$96(arg$2359)) {
10070: final String pa = Analyzer
10071: .cast(arg$2359
10072: .getTuple()
10073: .get1());
10074:
10075: return Analyzer
10076: .cast(new Let<TypicalTypes.raw_type<?>>() {
10077: final TypicalTypes.raw_type<?> res;
10078: final TypicalTypes.raw_type<?> tem;
10079:
10080: {
10081: res = Analyzer
10082: .cast(Analyzer
10083: .cast(lookup2
10084: .apply(
10085: GNode
10086: .create(
10087: "UserDefinedType",
10088: pa),
10089: getNameSpace)));
10090: tem = Analyzer
10091: .cast(unify
10092: .apply(
10093: tn,
10094: res));
10095: }
10096:
10097: public TypicalTypes.raw_type<?> apply() {
10098: return Analyzer
10099: .cast(new Require<TypicalTypes.raw_type<?>>() {
10100: public TypicalTypes.raw_type<?> apply() {
10101: final Boolean var$2362 = Primitives.isNotBottom
10102: .apply(tem);
10103:
10104: if ((null != var$2362 && !var$2362)) {
10105: showMessage(
10106: "error",
10107: Primitives.concat
10108: .apply(
10109: Primitives.concat
10110: .apply(
10111: getTypeName
10112: .apply(tn),
10113: " does not contain the field "),
10114: s),
10115: null);
10116: }
10117: if ((null == var$2362)) {
10118: return null;
10119: }
10120: if (var$2362) {
10121: return ts;
10122: }
10123: return null;
10124: }
10125: }
10126: .apply());
10127: }
10128: }
10129: .apply());
10130: }
10131: break;
10132: default:
10133: break;
10134: }
10135: ;
10136: if (true) {
10137: return Analyzer
10138: .cast(null);
10139: }
10140: return null;
10141: }
10142: }
10143: .apply());
10144: }
10145: break;
10146: default:
10147: break;
10148: }
10149: ;
10150: if (true) {
10151: return Analyzer
10152: .cast(error(
10153: Primitives.concat
10154: .apply(
10155: "expected record, found ",
10156: getTypeName
10157: .apply(tn)),
10158: null));
10159: }
10160: return null;
10161: }
10162: }
10163: .apply());
10164: }
10165: }.apply());
10166:
10167: checkExitScope(arg$2327);
10168: matching_nodes
10169: .remove(matching_nodes
10170: .size() - 1);
10171: return Analyzer
10172: .cast(retValue$2374);
10173: }
10174: return null;
10175: }
10176: }.apply());
10177:
10178: checkExitScope(arg$125);
10179: matching_nodes
10180: .remove(matching_nodes.size() - 1);
10181: if ((null != arg$125)) {
10182: arg$125
10183: .setProperty("__type",
10184: retValue$2378);
10185: }
10186: return Analyzer.cast(retValue$2378);
10187: }
10188: if (TypicalSupport.match$2379(arg$125)) {
10189: final Node n = (arg$125.size() > 0 ? arg$125
10190: .getGeneric(0) : null);
10191:
10192: matching_nodes.add(arg$125);
10193: if ((null != arg$125 && processScopeNodes
10194: .contains(arg$125.getName()))) {
10195: processScope(arg$125, getScope);
10196: }
10197: checkEnterScope(arg$125);
10198:
10199: final Object retValue$2384 = Analyzer
10200: .cast(new Let<TypicalTypes.raw_type<?>>() {
10201: final TypicalTypes.raw_type<?> t;
10202:
10203: {
10204: t = Analyzer.cast(analyze
10205: .apply(n));
10206: }
10207:
10208: public TypicalTypes.raw_type<?> apply() {
10209: return Analyzer
10210: .cast(new Guard<TypicalTypes.raw_type<?>>() {
10211: public TypicalTypes.raw_type<?> apply() {
10212: if ((null == unify)) {
10213: return null;
10214: }
10215: if ((null == boolt)) {
10216: return null;
10217: }
10218: if ((null == t)) {
10219: return null;
10220: }
10221:
10222: final TypicalTypes.raw_type<?> result$2381 = unify
10223: .apply(
10224: t,
10225: boolt);
10226:
10227: if ((null == result$2381)) {
10228: return Analyzer
10229: .cast(error(
10230: Primitives.concat
10231: .apply(
10232: "expected boolean, found ",
10233: getTypeName
10234: .apply(t)),
10235: null));
10236: }
10237: return result$2381;
10238: }
10239: }.apply());
10240: }
10241: }.apply());
10242:
10243: checkExitScope(arg$125);
10244: matching_nodes
10245: .remove(matching_nodes.size() - 1);
10246: if ((null != arg$125)) {
10247: arg$125
10248: .setProperty("__type",
10249: retValue$2384);
10250: }
10251: return Analyzer.cast(retValue$2384);
10252: }
10253: if (TypicalSupport.match$83(arg$125)) {
10254: final Node n1 = (arg$125.size() > 0 ? arg$125
10255: .getGeneric(0) : null);
10256: final Node n2 = (arg$125.size() > 1 ? arg$125
10257: .getGeneric(1) : null);
10258:
10259: matching_nodes.add(arg$125);
10260: if ((null != arg$125 && processScopeNodes
10261: .contains(arg$125.getName()))) {
10262: processScope(arg$125, getScope);
10263: }
10264: checkEnterScope(arg$125);
10265:
10266: final Object retValue$2389 = Analyzer
10267: .cast(new Let<TypicalTypes.raw_type<?>>() {
10268: final Pair<Node> nl;
10269: final Pair<TypicalTypes.entry> enList;
10270:
10271: {
10272: nl = Analyzer.cast(getNodeList
10273: .apply(n1));
10274: enList = Analyzer
10275: .cast(analyzeBindings
10276: .apply(
10277: nl,
10278: Pair
10279: .<TypicalTypes.entry> empty()));
10280: }
10281:
10282: public TypicalTypes.raw_type<?> apply() {
10283: return Analyzer
10284: .cast(null == Primitives.not
10285: .apply(TypicalSupport.exists$2386
10286: .apply(
10287: Primitives.isBottom,
10288: enList))
10289: || !Primitives.not
10290: .apply(TypicalSupport.exists$2386
10291: .apply(
10292: Primitives.isBottom,
10293: enList)) ? null
10294: : new Let<TypicalTypes.raw_type<?>>() {
10295: final TypicalTypes.raw_type<?> res;
10296: final Pair<String> strList;
10297:
10298: {
10299: res = Analyzer
10300: .cast(analyzeExpression
10301: .apply(
10302: n2,
10303: enList));
10304: strList = Analyzer
10305: .cast(getNames
10306: .apply(enList));
10307: }
10308:
10309: public TypicalTypes.raw_type<?> apply() {
10310: return Analyzer
10311: .cast(null == Primitives.isNotBottom
10312: .apply(res)
10313: || !Primitives.isNotBottom
10314: .apply(res) ? null
10315: : new Let<TypicalTypes.raw_type<?>>() {
10316: {
10317: checkUnusedVariables
10318: .apply(
10319: strList,
10320: n2);
10321: Primitives.annotate
10322: .apply(
10323: no,
10324: "variables",
10325: new TypicalTypes.StringList(
10326: strList));
10327: }
10328:
10329: public TypicalTypes.raw_type<?> apply() {
10330: return Analyzer
10331: .cast(res);
10332: }
10333: }
10334: .apply());
10335: }
10336: }.apply());
10337: }
10338: }.apply());
10339:
10340: checkExitScope(arg$125);
10341: matching_nodes
10342: .remove(matching_nodes.size() - 1);
10343: if ((null != arg$125)) {
10344: arg$125
10345: .setProperty("__type",
10346: retValue$2389);
10347: }
10348: return Analyzer.cast(retValue$2389);
10349: }
10350: if (TypicalSupport.match$2390(arg$125)) {
10351: final Node n = (arg$125.size() > 0 ? arg$125
10352: .getGeneric(0) : null);
10353:
10354: matching_nodes.add(arg$125);
10355: if ((null != arg$125 && processScopeNodes
10356: .contains(arg$125.getName()))) {
10357: processScope(arg$125, getScope);
10358: }
10359: checkEnterScope(arg$125);
10360:
10361: final Object retValue$2399 = Analyzer
10362: .cast(new Let<TypicalTypes.raw_type<?>>() {
10363: final TypicalTypes.raw_type<?> t;
10364:
10365: {
10366: t = Analyzer.cast(analyze
10367: .apply(n));
10368: }
10369:
10370: public TypicalTypes.raw_type<?> apply() {
10371: return Analyzer
10372: .cast(new Match<TypicalTypes.raw_type<?>>() {
10373: public TypicalTypes.raw_type<?> apply() {
10374: final TypicalTypes.raw_type<?> arg$2394 = Analyzer
10375: .cast(t);
10376:
10377: if ((null == arg$2394)) {
10378: return null;
10379: }
10380: if ((null != arg$2394))
10381: switch (arg$2394
10382: .tag()) {
10383: case PairOfType:
10384: if (TypicalSupport
10385: .match$116(arg$2394)) {
10386: final TypicalTypes.raw_type<?> tl = Analyzer
10387: .cast(arg$2394
10388: .getTuple()
10389: .get1());
10390: final TypicalTypes.raw_type<?> ret = Analyzer
10391: .cast(arg$2394
10392: .getTuple()
10393: .get2());
10394:
10395: return Analyzer
10396: .cast(new TypicalTypes.FunctionT(
10397: new Pair<TypicalTypes.raw_type<?>>(
10398: tl),
10399: ret));
10400: }
10401: break;
10402: default:
10403: break;
10404: }
10405: ;
10406: if (true) {
10407: return Analyzer
10408: .cast(null);
10409: }
10410: return null;
10411: }
10412: }.apply());
10413: }
10414: }.apply());
10415:
10416: checkExitScope(arg$125);
10417: matching_nodes
10418: .remove(matching_nodes.size() - 1);
10419: if ((null != arg$125)) {
10420: arg$125
10421: .setProperty("__type",
10422: retValue$2399);
10423: }
10424: return Analyzer.cast(retValue$2399);
10425: }
10426: if (TypicalSupport.match$2400(arg$125)) {
10427: final Pair<Node> l = Analyzer
10428: .cast(Primitives.getChildren(arg$125,
10429: 0, arg$125.size()));
10430:
10431: matching_nodes.add(arg$125);
10432: if ((null != arg$125 && processScopeNodes
10433: .contains(arg$125.getName()))) {
10434: processScope(arg$125, getScope);
10435: }
10436: checkEnterScope(arg$125);
10437:
10438: final Object retValue$2404 = Analyzer
10439: .cast(new Let<TypicalTypes.raw_type<?>>() {
10440: final Node last;
10441: final TypicalTypes.raw_type<?> te;
10442:
10443: {
10444: last = Analyzer
10445: .cast(TypicalSupport.nth$2401
10446: .apply(
10447: l,
10448: Primitives.subtractInt
10449: .apply(
10450: Primitives.length
10451: .apply(l),
10452: BigInteger
10453: .valueOf(1))));
10454: te = Analyzer.cast(analyze
10455: .apply(last));
10456: TypicalSupport.map$129.apply(
10457: analyze, removeLast
10458: .apply(l));
10459: }
10460:
10461: public TypicalTypes.raw_type<?> apply() {
10462: return Analyzer.cast(te);
10463: }
10464: }.apply());
10465:
10466: checkExitScope(arg$125);
10467: matching_nodes
10468: .remove(matching_nodes.size() - 1);
10469: if ((null != arg$125)) {
10470: arg$125
10471: .setProperty("__type",
10472: retValue$2404);
10473: }
10474: return Analyzer.cast(retValue$2404);
10475: }
10476: if (TypicalSupport.match$2405(arg$125)) {
10477: final Node e = (arg$125.size() > 0 ? arg$125
10478: .getGeneric(0) : null);
10479: final Node ne = (arg$125.size() > 2 ? arg$125
10480: .getGeneric(2) : null);
10481: final Node atNode = (arg$125.size() > 3 ? arg$125
10482: .getGeneric(3)
10483: : null);
10484:
10485: matching_nodes.add(arg$125);
10486: if ((null != arg$125 && processScopeNodes
10487: .contains(arg$125.getName()))) {
10488: processScope(arg$125, getScope);
10489: }
10490: checkEnterScope(arg$125);
10491:
10492: final Object retValue$2414 = Analyzer
10493: .cast(new Let<TypicalTypes.raw_type<?>>() {
10494: final TypicalTypes.raw_type<?> te;
10495: final TypicalTypes.raw_type<?> tne;
10496:
10497: {
10498: te = Analyzer.cast(analyze
10499: .apply(e));
10500: tne = Analyzer.cast(analyze
10501: .apply(ne));
10502: new Guard<TypicalTypes.raw_type<?>>() {
10503: public TypicalTypes.raw_type<?> apply() {
10504: if ((null == unify)) {
10505: return null;
10506: }
10507: if ((null == boolt)) {
10508: return null;
10509: }
10510: if ((null == te)) {
10511: return null;
10512: }
10513:
10514: final TypicalTypes.raw_type<?> result$2410 = unify
10515: .apply(te,
10516: boolt);
10517:
10518: if ((null == result$2410)) {
10519: return Analyzer
10520: .cast(error(
10521: Primitives.concat
10522: .apply(
10523: "expected boolean, found ",
10524: getTypeName
10525: .apply(te)),
10526: e));
10527: }
10528: return result$2410;
10529: }
10530: }.apply();
10531: new Guard<TypicalTypes.raw_type<?>>() {
10532: public TypicalTypes.raw_type<?> apply() {
10533: if ((null == unify)) {
10534: return null;
10535: }
10536: if ((null == strt)) {
10537: return null;
10538: }
10539: if ((null == tne)) {
10540: return null;
10541: }
10542:
10543: final TypicalTypes.raw_type<?> result$2411 = unify
10544: .apply(tne,
10545: strt);
10546:
10547: if ((null == result$2411)) {
10548: return Analyzer
10549: .cast(error(
10550: Primitives.concat
10551: .apply(
10552: "expected string, found ",
10553: getTypeName
10554: .apply(tne)),
10555: ne));
10556: }
10557: return result$2411;
10558: }
10559: }.apply();
10560: }
10561:
10562: public TypicalTypes.raw_type<?> apply() {
10563: return Analyzer
10564: .cast(null == Primitives.isBottom
10565: .apply(atNode) ? null
10566: : Primitives.isBottom
10567: .apply(atNode) ? null
10568: : new Let<TypicalTypes.raw_type<?>>() {
10569: final String s;
10570: final TypicalTypes.raw_type<?> ts;
10571:
10572: {
10573: s = Analyzer
10574: .cast(getString
10575: .apply(atNode));
10576: ts = Analyzer
10577: .cast(Analyzer
10578: .cast(lookup4
10579: .apply(
10580: atNode,
10581: "error",
10582: Primitives.concat
10583: .apply(
10584: s,
10585: " is undefined"),
10586: getNameSpace)));
10587: }
10588:
10589: public TypicalTypes.raw_type<?> apply() {
10590: return Analyzer
10591: .cast(new Guard<TypicalTypes.raw_type<?>>() {
10592: public TypicalTypes.raw_type<?> apply() {
10593: if ((null == ts)) {
10594: return null;
10595: }
10596: if ((null == ensureNodeType)) {
10597: return null;
10598: }
10599:
10600: final TypicalTypes.raw_type<?> result$2409 = ensureNodeType
10601: .apply(ts);
10602:
10603: if ((null == result$2409)) {
10604: return Analyzer
10605: .cast(error(
10606: Primitives.concat
10607: .apply(
10608: "expected node, found ",
10609: getTypeName
10610: .apply(ts)),
10611: null));
10612: }
10613: return result$2409;
10614: }
10615: }
10616: .apply());
10617: }
10618: }
10619: .apply());
10620: }
10621: }.apply());
10622:
10623: checkExitScope(arg$125);
10624: matching_nodes
10625: .remove(matching_nodes.size() - 1);
10626: if ((null != arg$125)) {
10627: arg$125
10628: .setProperty("__type",
10629: retValue$2414);
10630: }
10631: return Analyzer.cast(retValue$2414);
10632: }
10633: if (TypicalSupport.match$2415(arg$125)) {
10634: final Node n1 = (arg$125.size() > 0 ? arg$125
10635: .getGeneric(0) : null);
10636: final Node n2 = (arg$125.size() > 1 ? arg$125
10637: .getGeneric(1) : null);
10638:
10639: matching_nodes.add(arg$125);
10640: if ((null != arg$125 && processScopeNodes
10641: .contains(arg$125.getName()))) {
10642: processScope(arg$125, getScope);
10643: }
10644: checkEnterScope(arg$125);
10645:
10646: final Object retValue$2418 = Analyzer
10647: .cast(new Let<TypicalTypes.raw_type<?>>() {
10648: {
10649: analyze.apply(n2);
10650: }
10651:
10652: public TypicalTypes.raw_type<?> apply() {
10653: return Analyzer.cast(analyze
10654: .apply(n1));
10655: }
10656: }.apply());
10657:
10658: checkExitScope(arg$125);
10659: matching_nodes
10660: .remove(matching_nodes.size() - 1);
10661: if ((null != arg$125)) {
10662: arg$125
10663: .setProperty("__type",
10664: retValue$2418);
10665: }
10666: return Analyzer.cast(retValue$2418);
10667: }
10668: if (TypicalSupport.match$692(arg$125)) {
10669: final Node e = (arg$125.size() > 1 ? arg$125
10670: .getGeneric(1) : null);
10671: final Node n = (arg$125.size() > 2 ? arg$125
10672: .getGeneric(2) : null);
10673:
10674: matching_nodes.add(arg$125);
10675: if ((null != arg$125 && processScopeNodes
10676: .contains(arg$125.getName()))) {
10677: processScope(arg$125, getScope);
10678: }
10679: checkEnterScope(arg$125);
10680:
10681: final Object retValue$2426 = Analyzer
10682: .cast(new Let<TypicalTypes.raw_type<?>>() {
10683: final TypicalTypes.raw_type<?> t;
10684:
10685: {
10686: t = Analyzer.cast(analyze
10687: .apply(e));
10688: new Guard<TypicalTypes.raw_type<?>>() {
10689: public TypicalTypes.raw_type<?> apply() {
10690: if ((null == unify)) {
10691: return null;
10692: }
10693: if ((null == strt)) {
10694: return null;
10695: }
10696: if ((null == t)) {
10697: return null;
10698: }
10699:
10700: final TypicalTypes.raw_type<?> result$2423 = unify
10701: .apply(t, strt);
10702:
10703: if ((null == result$2423)) {
10704: return Analyzer
10705: .cast(error(
10706: Primitives.concat
10707: .apply(
10708: "expected string, found ",
10709: getTypeName
10710: .apply(t)),
10711: e));
10712: }
10713: return result$2423;
10714: }
10715: }.apply();
10716: }
10717:
10718: public TypicalTypes.raw_type<?> apply() {
10719: return Analyzer
10720: .cast(null == Primitives.isBottom
10721: .apply(n) ? null
10722: : Primitives.isBottom
10723: .apply(n) ? new TypicalTypes.VariableT(
10724: freshName
10725: .apply("type"),
10726: Boolean.FALSE)
10727: : new Let<TypicalTypes.raw_type<?>>() {
10728: final TypicalTypes.raw_type<?> tn;
10729:
10730: {
10731: tn = Analyzer
10732: .cast(analyze
10733: .apply(n));
10734: new Guard<TypicalTypes.raw_type<?>>() {
10735: public TypicalTypes.raw_type<?> apply() {
10736: if ((null == ensureNodeType)) {
10737: return null;
10738: }
10739: if ((null == tn)) {
10740: return null;
10741: }
10742:
10743: final TypicalTypes.raw_type<?> result$2422 = ensureNodeType
10744: .apply(tn);
10745:
10746: if ((null == result$2422)) {
10747: return Analyzer
10748: .cast(error(
10749: Primitives.concat
10750: .apply(
10751: "expected node, found ",
10752: getTypeName
10753: .apply(tn)),
10754: null));
10755: }
10756: return result$2422;
10757: }
10758: }
10759: .apply();
10760: }
10761:
10762: public TypicalTypes.raw_type<?> apply() {
10763: return Analyzer
10764: .cast(new TypicalTypes.VariableT(
10765: freshName
10766: .apply("type"),
10767: Boolean.FALSE));
10768: }
10769: }
10770: .apply());
10771: }
10772: }.apply());
10773:
10774: checkExitScope(arg$125);
10775: matching_nodes
10776: .remove(matching_nodes.size() - 1);
10777: if ((null != arg$125)) {
10778: arg$125
10779: .setProperty("__type",
10780: retValue$2426);
10781: }
10782: return Analyzer.cast(retValue$2426);
10783: }
10784: if (TypicalSupport.match$2427(arg$125)) {
10785: final Node e1 = (arg$125.size() > 0 ? arg$125
10786: .getGeneric(0) : null);
10787: final Node e2 = (arg$125.size() > 1 ? arg$125
10788: .getGeneric(1) : null);
10789:
10790: matching_nodes.add(arg$125);
10791: if ((null != arg$125 && processScopeNodes
10792: .contains(arg$125.getName()))) {
10793: processScope(arg$125, getScope);
10794: }
10795: checkEnterScope(arg$125);
10796:
10797: final Object retValue$2434 = Analyzer
10798: .cast(new Let<TypicalTypes.raw_type<?>>() {
10799: final TypicalTypes.raw_type<?> t1;
10800: final TypicalTypes.raw_type<?> t2;
10801:
10802: {
10803: t1 = Analyzer.cast(analyze
10804: .apply(e1));
10805: t2 = Analyzer.cast(analyze
10806: .apply(e2));
10807: new Guard<TypicalTypes.raw_type<?>>() {
10808: public TypicalTypes.raw_type<?> apply() {
10809: if ((null == unify)) {
10810: return null;
10811: }
10812: if ((null == t1)) {
10813: return null;
10814: }
10815: if ((null == boolt)) {
10816: return null;
10817: }
10818:
10819: final TypicalTypes.raw_type<?> result$2430 = unify
10820: .apply(t1,
10821: boolt);
10822:
10823: if ((null == result$2430)) {
10824: return Analyzer
10825: .cast(error(
10826: Primitives.concat
10827: .apply(
10828: "expected boolean, found ",
10829: getTypeName
10830: .apply(t1)),
10831: e1));
10832: }
10833: return result$2430;
10834: }
10835: }.apply();
10836: new Guard<TypicalTypes.raw_type<?>>() {
10837: public TypicalTypes.raw_type<?> apply() {
10838: if ((null == unify)) {
10839: return null;
10840: }
10841: if ((null == strt)) {
10842: return null;
10843: }
10844: if ((null == t2)) {
10845: return null;
10846: }
10847:
10848: final TypicalTypes.raw_type<?> result$2431 = unify
10849: .apply(t2, strt);
10850:
10851: if ((null == result$2431)) {
10852: return Analyzer
10853: .cast(error(
10854: Primitives.concat
10855: .apply(
10856: "expected string, found ",
10857: getTypeName
10858: .apply(t2)),
10859: e1));
10860: }
10861: return result$2431;
10862: }
10863: }.apply();
10864: }
10865:
10866: public TypicalTypes.raw_type<?> apply() {
10867: return Analyzer
10868: .cast(new TypicalTypes.VariableT(
10869: freshName
10870: .apply("type"),
10871: Boolean.FALSE));
10872: }
10873: }.apply());
10874:
10875: checkExitScope(arg$125);
10876: matching_nodes
10877: .remove(matching_nodes.size() - 1);
10878: if ((null != arg$125)) {
10879: arg$125
10880: .setProperty("__type",
10881: retValue$2434);
10882: }
10883: return Analyzer.cast(retValue$2434);
10884: }
10885: if (TypicalSupport.match$9(arg$125)) {
10886: final String s = (arg$125.size() > 0 ? arg$125
10887: .getString(0) : null);
10888: final Pair<Node> nl = Analyzer
10889: .cast(Primitives.getChildren(arg$125,
10890: 1, arg$125.size()));
10891:
10892: matching_nodes.add(arg$125);
10893: if ((null != arg$125 && processScopeNodes
10894: .contains(arg$125.getName()))) {
10895: processScope(arg$125, getScope);
10896: }
10897: checkEnterScope(arg$125);
10898:
10899: final Object retValue$2508 = Analyzer
10900: .cast(new Let<TypicalTypes.raw_type<?>>() {
10901: final TypicalTypes.raw_type<?> ty;
10902:
10903: {
10904: ty = Analyzer
10905: .cast(Analyzer
10906: .cast(lookup4
10907: .apply(
10908: no,
10909: "error",
10910: Primitives.concat
10911: .apply(
10912: Primitives.concat
10913: .apply(
10914: "constructor ",
10915: s),
10916: " is undefined"),
10917: getNameSpace)));
10918: }
10919:
10920: public TypicalTypes.raw_type<?> apply() {
10921: return Analyzer
10922: .cast(null == Primitives.isNotBottom
10923: .apply(ty)
10924: || !Primitives.isNotBottom
10925: .apply(ty) ? null
10926: : new Let<TypicalTypes.raw_type<?>>() {
10927: final String p;
10928: final TypicalTypes.raw_type<?> t;
10929:
10930: {
10931: p = Analyzer
10932: .cast(getParent
10933: .apply(ty));
10934: t = Analyzer
10935: .cast(null == Primitives.not
10936: .apply(hasTypeVariables
10937: .apply(p)) ? null
10938: : Primitives.not
10939: .apply(hasTypeVariables
10940: .apply(p)) ? ty
10941: : copy
10942: .apply(ty));
10943: }
10944:
10945: public TypicalTypes.raw_type<?> apply() {
10946: return Analyzer
10947: .cast(new Match<TypicalTypes.raw_type<?>>() {
10948: public TypicalTypes.raw_type<?> apply() {
10949: final Pair<Node> arg$2471 = Analyzer
10950: .cast(nl);
10951:
10952: if ((null == arg$2471)) {
10953: return null;
10954: }
10955: if (TypicalSupport
10956: .match$323(arg$2471)) {
10957: return Analyzer
10958: .cast(new Match<TypicalTypes.raw_type<?>>() {
10959: public TypicalTypes.raw_type<?> apply() {
10960: final TypicalTypes.raw_type<?> arg$2476 = Analyzer
10961: .cast(t);
10962:
10963: if ((null == arg$2476)) {
10964: return null;
10965: }
10966: if ((null != arg$2476))
10967: switch (arg$2476
10968: .tag()) {
10969: case ConstructorT:
10970: if (TypicalSupport
10971: .match$94(arg$2476)) {
10972: final TypicalTypes.raw_type<?> ty = Analyzer
10973: .cast(arg$2476
10974: .getTuple()
10975: .get3());
10976:
10977: return Analyzer
10978: .cast(null == Primitives.isBottom
10979: .apply(ty) ? null
10980: : Primitives.isBottom
10981: .apply(ty) ? t
10982: : error(
10983: Primitives.concat
10984: .apply(
10985: Primitives.concat
10986: .apply(
10987: "contructor ",
10988: s),
10989: " does not have enough children"),
10990: null));
10991: }
10992: break;
10993: default:
10994: break;
10995: }
10996: ;
10997: if (true) {
10998: return Analyzer
10999: .cast(error(
11000: Primitives.concat
11001: .apply(
11002: "expected constructor type, found ",
11003: getTypeName
11004: .apply(t)),
11005: null));
11006: }
11007: return null;
11008: }
11009: }
11010: .apply());
11011: }
11012: if (true) {
11013: return Analyzer
11014: .cast(new Match<TypicalTypes.raw_type<?>>() {
11015: public TypicalTypes.raw_type<?> apply() {
11016: final TypicalTypes.raw_type<?> arg$2492 = Analyzer
11017: .cast(t);
11018:
11019: if ((null == arg$2492)) {
11020: return null;
11021: }
11022: if ((null != arg$2492))
11023: switch (arg$2492
11024: .tag()) {
11025: case ConstructorT:
11026: if (TypicalSupport
11027: .match$94(arg$2492)) {
11028: final TypicalTypes.raw_type<?> ty = Analyzer
11029: .cast(arg$2492
11030: .getTuple()
11031: .get3());
11032:
11033: return Analyzer
11034: .cast(new Match<TypicalTypes.raw_type<?>>() {
11035: public TypicalTypes.raw_type<?> apply() {
11036: final TypicalTypes.raw_type<?> arg$2499 = Analyzer
11037: .cast(ty);
11038:
11039: if ((null == arg$2499)) {
11040: return null;
11041: }
11042: if ((null != arg$2499))
11043: switch (arg$2499
11044: .tag()) {
11045: case TupleT:
11046: if (TypicalSupport
11047: .match$114(arg$2499)) {
11048: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
11049: .cast(arg$2499
11050: .getTuple()
11051: .get1());
11052:
11053: return Analyzer
11054: .cast(null == Primitives.lessInt
11055: .apply(
11056: Primitives.length
11057: .apply(nl),
11058: Primitives.length
11059: .apply(tl)) ? null
11060: : Primitives.lessInt
11061: .apply(
11062: Primitives.length
11063: .apply(nl),
11064: Primitives.length
11065: .apply(tl)) ? error(
11066: Primitives.concat
11067: .apply(
11068: Primitives.concat
11069: .apply(
11070: "constructor ",
11071: s),
11072: "does not have enough children"),
11073: null)
11074: : null == Primitives.greaterInt
11075: .apply(
11076: Primitives.length
11077: .apply(nl),
11078: Primitives.length
11079: .apply(tl)) ? null
11080: : Primitives.greaterInt
11081: .apply(
11082: Primitives.length
11083: .apply(nl),
11084: Primitives.length
11085: .apply(tl)) ? error(
11086: Primitives.concat
11087: .apply(
11088: Primitives.concat
11089: .apply(
11090: "constructor ",
11091: s),
11092: "has too many children"),
11093: null)
11094: : processArguments
11095: .apply(
11096: nl,
11097: tl,
11098: t));
11099: }
11100: break;
11101: default:
11102: break;
11103: }
11104: ;
11105: if (true) {
11106: return Analyzer
11107: .cast(new Require<TypicalTypes.raw_type<?>>() {
11108: public TypicalTypes.raw_type<?> apply() {
11109: final Boolean var$2502 = Primitives.equal
11110: .apply(
11111: Primitives.length
11112: .apply(nl),
11113: BigInteger
11114: .valueOf(1));
11115:
11116: if ((null != var$2502 && !var$2502)) {
11117: showMessage(
11118: "error",
11119: Primitives.concat
11120: .apply(
11121: s,
11122: " must have only one child"),
11123: null);
11124: }
11125: if ((null == var$2502)) {
11126: return null;
11127: }
11128: if (var$2502) {
11129: return processArguments
11130: .apply(
11131: nl,
11132: new Pair<TypicalTypes.raw_type<?>>(
11133: ty),
11134: t);
11135: }
11136: return null;
11137: }
11138: }
11139: .apply());
11140: }
11141: return null;
11142: }
11143: }
11144: .apply());
11145: }
11146: break;
11147: default:
11148: break;
11149: }
11150: ;
11151: if (true) {
11152: return Analyzer
11153: .cast(error(
11154: Primitives.concat
11155: .apply(
11156: "expected constructor type, found ",
11157: getTypeName
11158: .apply(t)),
11159: null));
11160: }
11161: return null;
11162: }
11163: }
11164: .apply());
11165: }
11166: return null;
11167: }
11168: }
11169: .apply());
11170: }
11171: }.apply());
11172: }
11173: }.apply());
11174:
11175: checkExitScope(arg$125);
11176: matching_nodes
11177: .remove(matching_nodes.size() - 1);
11178: if ((null != arg$125)) {
11179: arg$125
11180: .setProperty("__type",
11181: retValue$2508);
11182: }
11183: return Analyzer.cast(retValue$2508);
11184: }
11185: if (TypicalSupport.match$2509(arg$125)) {
11186: final Pair<Node> nl = Analyzer
11187: .cast(Primitives.getChildren(arg$125,
11188: 0, arg$125.size()));
11189:
11190: matching_nodes.add(arg$125);
11191: if ((null != arg$125 && processScopeNodes
11192: .contains(arg$125.getName()))) {
11193: processScope(arg$125, getScope);
11194: }
11195: checkEnterScope(arg$125);
11196:
11197: final Object retValue$2776 = Analyzer
11198: .cast(new Match<TypicalTypes.raw_type<?>>() {
11199: public TypicalTypes.raw_type<?> apply() {
11200: final Pair<Node> arg$2642 = Analyzer
11201: .cast(nl);
11202:
11203: if ((null == arg$2642)) {
11204: return null;
11205: }
11206: if (TypicalSupport
11207: .match$323(arg$2642)) {
11208: return Analyzer
11209: .cast(error(
11210: "empty record expression",
11211: null));
11212: }
11213: if (true) {
11214: final Pair<Node> list$2644 = Analyzer
11215: .cast(Analyzer
11216: .cast(arg$2642));
11217: final Node x = GNode
11218: .cast(Primitives
11219: .wrapHead(list$2644));
11220: final Pair<Node> xs = Analyzer
11221: .cast(Primitives
11222: .wrapTail(list$2644));
11223:
11224: return Analyzer
11225: .cast(null == Primitives.isBottom
11226: .apply(x) ? null
11227: : Primitives.isBottom
11228: .apply(x) ? new Let<TypicalTypes.raw_type<?>>() {
11229: final Pair<Node> tai;
11230: final Node hea;
11231: final TypicalTypes.raw_type<?> tx;
11232:
11233: {
11234: tai = Analyzer
11235: .cast(TypicalSupport.tail$278
11236: .apply(TypicalSupport.tail$278
11237: .apply(nl)));
11238: hea = Analyzer
11239: .cast(TypicalSupport.head$279
11240: .apply(TypicalSupport.tail$278
11241: .apply(nl)));
11242: tx = Analyzer
11243: .cast(analyze
11244: .apply(hea));
11245: }
11246:
11247: public TypicalTypes.raw_type<?> apply() {
11248: return Analyzer
11249: .cast(new Match<TypicalTypes.raw_type<?>>() {
11250: public TypicalTypes.raw_type<?> apply() {
11251: final TypicalTypes.raw_type<?> arg$2709 = Analyzer
11252: .cast(tx);
11253:
11254: if ((null == arg$2709)) {
11255: return null;
11256: }
11257: if ((null != arg$2709))
11258: switch (arg$2709
11259: .tag()) {
11260: case FieldT:
11261: if (TypicalSupport
11262: .match$96(arg$2709)) {
11263: final String s = Analyzer
11264: .cast(arg$2709
11265: .getTuple()
11266: .get1());
11267:
11268: return Analyzer
11269: .cast(new Let<TypicalTypes.raw_type<?>>() {
11270: final Pair<TypicalTypes.raw_type<?>> tl;
11271:
11272: {
11273: Primitives.annotateList
11274: .apply(
11275: tai,
11276: "parent",
11277: new TypicalTypes.StringName(
11278: s));
11279: tl = Analyzer
11280: .cast(TypicalSupport.map$129
11281: .apply(
11282: analyze,
11283: tai));
11284: }
11285:
11286: public TypicalTypes.raw_type<?> apply() {
11287: return Analyzer
11288: .cast(null == Primitives.not
11289: .apply(TypicalSupport.exists$184
11290: .apply(
11291: Primitives.isBottom,
11292: tl))
11293: || !Primitives.not
11294: .apply(TypicalSupport.exists$184
11295: .apply(
11296: Primitives.isBottom,
11297: tl)) ? null
11298: : new Let<TypicalTypes.raw_type<?>>() {
11299: final TypicalTypes.raw_type<?> recT;
11300:
11301: {
11302: recT = Analyzer
11303: .cast(Analyzer
11304: .cast(lookup2
11305: .apply(
11306: GNode
11307: .create(
11308: "UserDefinedType",
11309: s),
11310: getNameSpace)));
11311: }
11312:
11313: public TypicalTypes.raw_type<?> apply() {
11314: return Analyzer
11315: .cast(new Match<TypicalTypes.raw_type<?>>() {
11316: public TypicalTypes.raw_type<?> apply() {
11317: final TypicalTypes.raw_type<?> arg$2716 = Analyzer
11318: .cast(recT);
11319:
11320: if ((null == arg$2716)) {
11321: return null;
11322: }
11323: if ((null != arg$2716))
11324: switch (arg$2716
11325: .tag()) {
11326: case RecordT:
11327: if (TypicalSupport
11328: .match$107(arg$2716)) {
11329: final Pair<TypicalTypes.raw_type<?>> rectl = Analyzer
11330: .cast(arg$2716
11331: .getTuple()
11332: .get1());
11333:
11334: return Analyzer
11335: .cast(new Require<TypicalTypes.raw_type<?>>() {
11336: public TypicalTypes.raw_type<?> apply() {
11337: final Boolean var$2719 = Primitives.equal
11338: .apply(
11339: Primitives.length
11340: .apply(rectl),
11341: Primitives.addInt
11342: .apply(
11343: Primitives.length
11344: .apply(tl),
11345: BigInteger
11346: .valueOf(1)));
11347:
11348: if ((null != var$2719 && !var$2719)) {
11349: showMessage(
11350: "error",
11351: Primitives.concat
11352: .apply(
11353: s,
11354: " does not have enough fields"),
11355: no);
11356: }
11357: if ((null == var$2719)) {
11358: return null;
11359: }
11360: if (var$2719) {
11361: return new TypicalTypes.RecordT(
11362: Primitives
11363: .wrapCons(
11364: tx,
11365: tl));
11366: }
11367: return null;
11368: }
11369: }
11370: .apply());
11371: }
11372: break;
11373: default:
11374: break;
11375: }
11376: ;
11377: if (true) {
11378: return Analyzer
11379: .cast(null);
11380: }
11381: return null;
11382: }
11383: }
11384: .apply());
11385: }
11386: }
11387: .apply());
11388: }
11389: }
11390: .apply());
11391: }
11392: break;
11393: default:
11394: break;
11395: }
11396: ;
11397: if (true) {
11398: return Analyzer
11399: .cast(null);
11400: }
11401: return null;
11402: }
11403: }
11404: .apply());
11405: }
11406: }.apply()
11407: : new Match<TypicalTypes.raw_type<?>>() {
11408: public TypicalTypes.raw_type<?> apply() {
11409: final Node arg$2722 = GNode
11410: .cast(x);
11411:
11412: if ((null == arg$2722)) {
11413: return null;
11414: }
11415: if (TypicalSupport
11416: .match$2527(arg$2722)) {
11417: matching_nodes
11418: .add(arg$2722);
11419: if ((null != arg$2722 && processScopeNodes
11420: .contains(arg$2722
11421: .getName()))) {
11422: processScope(
11423: arg$2722,
11424: getScope);
11425: }
11426: checkEnterScope(arg$2722);
11427:
11428: final Object retValue$2732 = Analyzer
11429: .cast(new Let<TypicalTypes.raw_type<?>>() {
11430: final Pair<Node> tai;
11431: final Node hea;
11432: final TypicalTypes.raw_type<?> tx;
11433:
11434: {
11435: tai = Analyzer
11436: .cast(TypicalSupport.tail$278
11437: .apply(TypicalSupport.tail$278
11438: .apply(nl)));
11439: hea = Analyzer
11440: .cast(TypicalSupport.head$279
11441: .apply(TypicalSupport.tail$278
11442: .apply(nl)));
11443: tx = Analyzer
11444: .cast(analyze
11445: .apply(hea));
11446: }
11447:
11448: public TypicalTypes.raw_type<?> apply() {
11449: return Analyzer
11450: .cast(new Match<TypicalTypes.raw_type<?>>() {
11451: public TypicalTypes.raw_type<?> apply() {
11452: final TypicalTypes.raw_type<?> arg$2727 = Analyzer
11453: .cast(tx);
11454:
11455: if ((null == arg$2727)) {
11456: return null;
11457: }
11458: if ((null != arg$2727))
11459: switch (arg$2727
11460: .tag()) {
11461: case FieldT:
11462: if (TypicalSupport
11463: .match$96(arg$2727)) {
11464: final String s = Analyzer
11465: .cast(arg$2727
11466: .getTuple()
11467: .get1());
11468:
11469: return Analyzer
11470: .cast(new Let<TypicalTypes.raw_type<?>>() {
11471: final Pair<TypicalTypes.raw_type<?>> tl;
11472:
11473: {
11474: Primitives.annotateList
11475: .apply(
11476: tai,
11477: "parent",
11478: new TypicalTypes.StringName(
11479: s));
11480: tl = Analyzer
11481: .cast(TypicalSupport.map$129
11482: .apply(
11483: analyze,
11484: tai));
11485: }
11486:
11487: public TypicalTypes.raw_type<?> apply() {
11488: return Analyzer
11489: .cast(null == Primitives.not
11490: .apply(TypicalSupport.exists$184
11491: .apply(
11492: Primitives.isBottom,
11493: tl))
11494: || !Primitives.not
11495: .apply(TypicalSupport.exists$184
11496: .apply(
11497: Primitives.isBottom,
11498: tl)) ? null
11499: : Analyzer
11500: .cast(lookup2
11501: .apply(
11502: GNode
11503: .create(
11504: "UserDefinedType",
11505: s),
11506: getNameSpace)));
11507: }
11508: }
11509: .apply());
11510: }
11511: break;
11512: default:
11513: break;
11514: }
11515: ;
11516: if (true) {
11517: return Analyzer
11518: .cast(null);
11519: }
11520: return null;
11521: }
11522: }
11523: .apply());
11524: }
11525: }
11526: .apply());
11527:
11528: checkExitScope(arg$2722);
11529: matching_nodes
11530: .remove(matching_nodes
11531: .size() - 1);
11532: return Analyzer
11533: .cast(retValue$2732);
11534: }
11535: if (TypicalSupport
11536: .match$2537(arg$2722)) {
11537: final Node e = (arg$2722
11538: .size() > 0 ? arg$2722
11539: .getGeneric(0)
11540: : null);
11541:
11542: matching_nodes
11543: .add(arg$2722);
11544: if ((null != arg$2722 && processScopeNodes
11545: .contains(arg$2722
11546: .getName()))) {
11547: processScope(
11548: arg$2722,
11549: getScope);
11550: }
11551: checkEnterScope(arg$2722);
11552:
11553: final Object retValue$2768 = Analyzer
11554: .cast(new Let<TypicalTypes.raw_type<?>>() {
11555: final TypicalTypes.raw_type<?> tx;
11556:
11557: {
11558: tx = Analyzer
11559: .cast(resolveRecordType
11560: .apply(analyze
11561: .apply(e)));
11562: }
11563:
11564: public TypicalTypes.raw_type<?> apply() {
11565: return Analyzer
11566: .cast(new Match<TypicalTypes.raw_type<?>>() {
11567: public TypicalTypes.raw_type<?> apply() {
11568: final TypicalTypes.raw_type<?> arg$2750 = Analyzer
11569: .cast(tx);
11570:
11571: if ((null == arg$2750)) {
11572: return null;
11573: }
11574: if ((null != arg$2750))
11575: switch (arg$2750
11576: .tag()) {
11577: case VariableT:
11578: if (TypicalSupport
11579: .match$117(arg$2750)) {
11580: return Analyzer
11581: .cast(new Let<TypicalTypes.raw_type<?>>() {
11582: final TypicalTypes.raw_type<?> ht;
11583:
11584: {
11585: ht = Analyzer
11586: .cast(analyze
11587: .apply(TypicalSupport.head$279
11588: .apply(xs)));
11589: }
11590:
11591: public TypicalTypes.raw_type<?> apply() {
11592: return Analyzer
11593: .cast(null == Primitives.isNotBottom
11594: .apply(ht) ? null
11595: : Primitives.isNotBottom
11596: .apply(ht) ? new Match<TypicalTypes.raw_type<?>>() {
11597: public TypicalTypes.raw_type<?> apply() {
11598: final TypicalTypes.raw_type<?> arg$2762 = Analyzer
11599: .cast(ht);
11600:
11601: if ((null == arg$2762)) {
11602: return null;
11603: }
11604: if ((null != arg$2762))
11605: switch (arg$2762
11606: .tag()) {
11607: case FieldT:
11608: if (TypicalSupport
11609: .match$96(arg$2762)) {
11610: final String s = Analyzer
11611: .cast(arg$2762
11612: .getTuple()
11613: .get1());
11614:
11615: return Analyzer
11616: .cast(new Let<TypicalTypes.raw_type<?>>() {
11617: final Pair<TypicalTypes.raw_type<?>> tl;
11618:
11619: {
11620: Primitives.annotateList
11621: .apply(
11622: TypicalSupport.tail$278
11623: .apply(xs),
11624: "parent",
11625: new TypicalTypes.StringName(
11626: s));
11627: tl = Analyzer
11628: .cast(TypicalSupport.map$129
11629: .apply(
11630: analyze,
11631: TypicalSupport.tail$278
11632: .apply(xs)));
11633: }
11634:
11635: public TypicalTypes.raw_type<?> apply() {
11636: return Analyzer
11637: .cast(null == Primitives.not
11638: .apply(TypicalSupport.exists$184
11639: .apply(
11640: Primitives.isBottom,
11641: tl))
11642: || !Primitives.not
11643: .apply(TypicalSupport.exists$184
11644: .apply(
11645: Primitives.isBottom,
11646: tl)) ? null
11647: : new Let<TypicalTypes.raw_type<?>>() {
11648: final TypicalTypes.raw_type<?> recT;
11649:
11650: {
11651: recT = Analyzer
11652: .cast(Analyzer
11653: .cast(lookup2
11654: .apply(
11655: GNode
11656: .create(
11657: "UserDefinedType",
11658: s),
11659: getNameSpace)));
11660: }
11661:
11662: public TypicalTypes.raw_type<?> apply() {
11663: return Analyzer
11664: .cast(unify
11665: .apply(
11666: recT,
11667: tx));
11668: }
11669: }
11670: .apply());
11671: }
11672: }
11673: .apply());
11674: }
11675: break;
11676: default:
11677: break;
11678: }
11679: ;
11680: if (true) {
11681: return Analyzer
11682: .cast(null);
11683: }
11684: return null;
11685: }
11686: }
11687: .apply()
11688: : null);
11689: }
11690: }
11691: .apply());
11692: }
11693: break;
11694: case RecordT:
11695: if (TypicalSupport
11696: .match$107(arg$2750)) {
11697: final Pair<TypicalTypes.raw_type<?>> rectl = Analyzer
11698: .cast(arg$2750
11699: .getTuple()
11700: .get1());
11701:
11702: return Analyzer
11703: .cast(new Let<TypicalTypes.raw_type<?>>() {
11704: final TypicalTypes.raw_type<?> field;
11705:
11706: {
11707: field = Analyzer
11708: .cast(TypicalSupport.head$98
11709: .apply(rectl));
11710: }
11711:
11712: public TypicalTypes.raw_type<?> apply() {
11713: return Analyzer
11714: .cast(new Match<TypicalTypes.raw_type<?>>() {
11715: public TypicalTypes.raw_type<?> apply() {
11716: final TypicalTypes.raw_type<?> arg$2755 = Analyzer
11717: .cast(field);
11718:
11719: if ((null == arg$2755)) {
11720: return null;
11721: }
11722: if ((null != arg$2755))
11723: switch (arg$2755
11724: .tag()) {
11725: case FieldT:
11726: if (TypicalSupport
11727: .match$96(arg$2755)) {
11728: final String s = Analyzer
11729: .cast(arg$2755
11730: .getTuple()
11731: .get1());
11732:
11733: return Analyzer
11734: .cast(new Let<TypicalTypes.raw_type<?>>() {
11735: final Pair<TypicalTypes.raw_type<?>> tl;
11736:
11737: {
11738: Primitives.annotateList
11739: .apply(
11740: xs,
11741: "parent",
11742: new TypicalTypes.StringName(
11743: s));
11744: tl = Analyzer
11745: .cast(TypicalSupport.map$129
11746: .apply(
11747: analyze,
11748: xs));
11749: }
11750:
11751: public TypicalTypes.raw_type<?> apply() {
11752: return Analyzer
11753: .cast(null == Primitives.not
11754: .apply(TypicalSupport.exists$184
11755: .apply(
11756: Primitives.isBottom,
11757: tl))
11758: || !Primitives.not
11759: .apply(TypicalSupport.exists$184
11760: .apply(
11761: Primitives.isBottom,
11762: tl)) ? null
11763: : tx);
11764: }
11765: }
11766: .apply());
11767: }
11768: break;
11769: default:
11770: break;
11771: }
11772: ;
11773: if (true) {
11774: return Analyzer
11775: .cast(null);
11776: }
11777: return null;
11778: }
11779: }
11780: .apply());
11781: }
11782: }
11783: .apply());
11784: }
11785: break;
11786: default:
11787: break;
11788: }
11789: ;
11790: if (true) {
11791: return Analyzer
11792: .cast(error(
11793: Primitives.concat
11794: .apply(
11795: "expected record type, found ",
11796: getTypeName
11797: .apply(tx)),
11798: null));
11799: }
11800: return null;
11801: }
11802: }
11803: .apply());
11804: }
11805: }
11806: .apply());
11807:
11808: checkExitScope(arg$2722);
11809: matching_nodes
11810: .remove(matching_nodes
11811: .size() - 1);
11812: return Analyzer
11813: .cast(retValue$2768);
11814: }
11815: if (true) {
11816: matching_nodes
11817: .add(arg$2722);
11818: if ((null != arg$2722 && processScopeNodes
11819: .contains(arg$2722
11820: .getName()))) {
11821: processScope(
11822: arg$2722,
11823: getScope);
11824: }
11825: checkEnterScope(arg$2722);
11826:
11827: final Object retValue$2771 = Analyzer
11828: .cast(null);
11829:
11830: checkExitScope(arg$2722);
11831: matching_nodes
11832: .remove(matching_nodes
11833: .size() - 1);
11834: return Analyzer
11835: .cast(retValue$2771);
11836: }
11837: return null;
11838: }
11839: }
11840: .apply());
11841: }
11842: return null;
11843: }
11844: }.apply());
11845:
11846: checkExitScope(arg$125);
11847: matching_nodes
11848: .remove(matching_nodes.size() - 1);
11849: if ((null != arg$125)) {
11850: arg$125
11851: .setProperty("__type",
11852: retValue$2776);
11853: }
11854: return Analyzer.cast(retValue$2776);
11855: }
11856: if (TypicalSupport.match$45(arg$125)) {
11857: final String s = (arg$125.size() > 0 ? arg$125
11858: .getString(0) : null);
11859: final Node p = (arg$125.size() > 1 ? arg$125
11860: .getGeneric(1) : null);
11861:
11862: matching_nodes.add(arg$125);
11863: if ((null != arg$125 && processScopeNodes
11864: .contains(arg$125.getName()))) {
11865: processScope(arg$125, getScope);
11866: }
11867: checkEnterScope(arg$125);
11868:
11869: final Object retValue$2794 = Analyzer
11870: .cast(new Let<TypicalTypes.raw_type<?>>() {
11871: final TypicalTypes.raw_type<?> t;
11872:
11873: {
11874: t = Analyzer
11875: .cast(Analyzer
11876: .cast(lookup4
11877: .apply(
11878: no,
11879: "error",
11880: Primitives.concat
11881: .apply(
11882: Primitives.concat
11883: .apply(
11884: "field ",
11885: s),
11886: " is undefined"),
11887: getNameSpace)));
11888: }
11889:
11890: public TypicalTypes.raw_type<?> apply() {
11891: return Analyzer
11892: .cast(new Match<TypicalTypes.raw_type<?>>() {
11893: public TypicalTypes.raw_type<?> apply() {
11894: final TypicalTypes.raw_type<?> arg$2785 = Analyzer
11895: .cast(t);
11896:
11897: if ((null == arg$2785)) {
11898: return null;
11899: }
11900: if ((null != arg$2785))
11901: switch (arg$2785
11902: .tag()) {
11903: case FieldT:
11904: if (TypicalSupport
11905: .match$96(arg$2785)) {
11906: final String str = Analyzer
11907: .cast(arg$2785
11908: .getTuple()
11909: .get1());
11910:
11911: return Analyzer
11912: .cast(new Let<TypicalTypes.raw_type<?>>() {
11913: final String ps;
11914:
11915: {
11916: ps = Analyzer
11917: .cast(null == Primitives.hasAnnotation
11918: .apply(
11919: no,
11920: "parent") ? null
11921: : Primitives.hasAnnotation
11922: .apply(
11923: no,
11924: "parent") ? new Let<String>() {
11925: final String stri;
11926:
11927: {
11928: stri = Analyzer
11929: .cast(getAnnotatedString
11930: .apply(
11931: no,
11932: "parent"));
11933: }
11934:
11935: public String apply() {
11936: return Analyzer
11937: .cast(stri);
11938: }
11939: }
11940: .apply()
11941: : str);
11942: }
11943:
11944: public TypicalTypes.raw_type<?> apply() {
11945: return Analyzer
11946: .cast(new Require<TypicalTypes.raw_type<?>>() {
11947: public TypicalTypes.raw_type<?> apply() {
11948: final Boolean var$2790 = Primitives.equal
11949: .apply(
11950: ps,
11951: str);
11952:
11953: if ((null != var$2790 && !var$2790)) {
11954: showMessage(
11955: "error",
11956: Primitives.concat
11957: .apply(
11958: Primitives.concat
11959: .apply(
11960: ps,
11961: " does not contain the field "),
11962: s),
11963: null);
11964: }
11965: if ((null == var$2790)) {
11966: return null;
11967: }
11968: if (var$2790) {
11969: return new Let<TypicalTypes.raw_type<?>>() {
11970: final TypicalTypes.raw_type<?> tp;
11971:
11972: {
11973: tp = Analyzer
11974: .cast(analyze
11975: .apply(p));
11976: new Guard<TypicalTypes.raw_type<?>>() {
11977: public TypicalTypes.raw_type<?> apply() {
11978: if ((null == unify)) {
11979: return null;
11980: }
11981: if ((null == t)) {
11982: return null;
11983: }
11984: if ((null == tp)) {
11985: return null;
11986: }
11987:
11988: final TypicalTypes.raw_type<?> result$2789 = unify
11989: .apply(
11990: t,
11991: tp);
11992:
11993: if ((null == result$2789)) {
11994: return Analyzer
11995: .cast(error(
11996: Primitives.concat
11997: .apply(
11998: Primitives.concat
11999: .apply(
12000: Primitives.concat
12001: .apply(
12002: Primitives.concat
12003: .apply(
12004: Primitives.concat
12005: .apply(
12006: "type of field ",
12007: s),
12008: " must be "),
12009: getTypeName
12010: .apply(t)),
12011: ", found "),
12012: getTypeName
12013: .apply(tp)),
12014: null));
12015: }
12016: return result$2789;
12017: }
12018: }
12019: .apply();
12020: }
12021:
12022: public TypicalTypes.raw_type<?> apply() {
12023: return Analyzer
12024: .cast(t);
12025: }
12026: }
12027: .apply();
12028: }
12029: return null;
12030: }
12031: }
12032: .apply());
12033: }
12034: }
12035: .apply());
12036: }
12037: break;
12038: default:
12039: break;
12040: }
12041: ;
12042: if (true) {
12043: return Analyzer
12044: .cast(null);
12045: }
12046: return null;
12047: }
12048: }.apply());
12049: }
12050: }.apply());
12051:
12052: checkExitScope(arg$125);
12053: matching_nodes
12054: .remove(matching_nodes.size() - 1);
12055: if ((null != arg$125)) {
12056: arg$125
12057: .setProperty("__type",
12058: retValue$2794);
12059: }
12060: return Analyzer.cast(retValue$2794);
12061: }
12062: if (TypicalSupport.match$2795(arg$125)) {
12063: final Node e1 = (arg$125.size() > 0 ? arg$125
12064: .getGeneric(0) : null);
12065: final Node e2 = (arg$125.size() > 1 ? arg$125
12066: .getGeneric(1) : null);
12067:
12068: matching_nodes.add(arg$125);
12069: if ((null != arg$125 && processScopeNodes
12070: .contains(arg$125.getName()))) {
12071: processScope(arg$125, getScope);
12072: }
12073: checkEnterScope(arg$125);
12074:
12075: final Object retValue$2800 = Analyzer
12076: .cast(new Let<TypicalTypes.raw_type<?>>() {
12077: final TypicalTypes.raw_type<?> t1;
12078: final TypicalTypes.raw_type<?> t2;
12079:
12080: {
12081: t1 = Analyzer.cast(analyze
12082: .apply(e1));
12083: t2 = Analyzer.cast(analyze
12084: .apply(e2));
12085: new Guard<TypicalTypes.raw_type<?>>() {
12086: public TypicalTypes.raw_type<?> apply() {
12087: if ((null == unify)) {
12088: return null;
12089: }
12090: if ((null == t1)) {
12091: return null;
12092: }
12093: if ((null == boolt)) {
12094: return null;
12095: }
12096:
12097: final TypicalTypes.raw_type<?> result$2797 = unify
12098: .apply(t1,
12099: boolt);
12100:
12101: if ((null == result$2797)) {
12102: return Analyzer
12103: .cast(error(
12104: Primitives.concat
12105: .apply(
12106: "expected boolean, found ",
12107: getTypeName
12108: .apply(t1)),
12109: null));
12110: }
12111: return result$2797;
12112: }
12113: }.apply();
12114: }
12115:
12116: public TypicalTypes.raw_type<?> apply() {
12117: return Analyzer.cast(t2);
12118: }
12119: }.apply());
12120:
12121: checkExitScope(arg$125);
12122: matching_nodes
12123: .remove(matching_nodes.size() - 1);
12124: if ((null != arg$125)) {
12125: arg$125
12126: .setProperty("__type",
12127: retValue$2800);
12128: }
12129: return Analyzer.cast(retValue$2800);
12130: }
12131: if (TypicalSupport.match$2801(arg$125)) {
12132: final Node e1 = (arg$125.size() > 0 ? arg$125
12133: .getGeneric(0) : null);
12134: final Node e2 = (arg$125.size() > 1 ? arg$125
12135: .getGeneric(1) : null);
12136: final Node e3 = (arg$125.size() > 2 ? arg$125
12137: .getGeneric(2) : null);
12138:
12139: matching_nodes.add(arg$125);
12140: if ((null != arg$125 && processScopeNodes
12141: .contains(arg$125.getName()))) {
12142: processScope(arg$125, getScope);
12143: }
12144: checkEnterScope(arg$125);
12145:
12146: final Object retValue$2808 = Analyzer
12147: .cast(new Let<TypicalTypes.raw_type<?>>() {
12148: final TypicalTypes.raw_type<?> t1;
12149: final TypicalTypes.raw_type<?> t2;
12150: final TypicalTypes.raw_type<?> t3;
12151:
12152: {
12153: t1 = Analyzer.cast(analyze
12154: .apply(e1));
12155: t2 = Analyzer.cast(analyze
12156: .apply(e2));
12157: t3 = Analyzer.cast(analyze
12158: .apply(e3));
12159: new Guard<TypicalTypes.raw_type<?>>() {
12160: public TypicalTypes.raw_type<?> apply() {
12161: if ((null == unify)) {
12162: return null;
12163: }
12164: if ((null == t1)) {
12165: return null;
12166: }
12167: if ((null == boolt)) {
12168: return null;
12169: }
12170:
12171: final TypicalTypes.raw_type<?> result$2805 = unify
12172: .apply(t1,
12173: boolt);
12174:
12175: if ((null == result$2805)) {
12176: return Analyzer
12177: .cast(error(
12178: Primitives.concat
12179: .apply(
12180: "expected boolean, found ",
12181: getTypeName
12182: .apply(t1)),
12183: null));
12184: }
12185: return result$2805;
12186: }
12187: }.apply();
12188: }
12189:
12190: public TypicalTypes.raw_type<?> apply() {
12191: return Analyzer
12192: .cast(new Guard<TypicalTypes.raw_type<?>>() {
12193: public TypicalTypes.raw_type<?> apply() {
12194: if ((null == unify)) {
12195: return null;
12196: }
12197: if ((null == t3)) {
12198: return null;
12199: }
12200: if ((null == t2)) {
12201: return null;
12202: }
12203:
12204: final TypicalTypes.raw_type<?> result$2804 = unify
12205: .apply(
12206: t2,
12207: t3);
12208:
12209: if ((null == result$2804)) {
12210: return Analyzer
12211: .cast(error(
12212: "types of if and else expressions do not match",
12213: null));
12214: }
12215: return result$2804;
12216: }
12217: }.apply());
12218: }
12219: }.apply());
12220:
12221: checkExitScope(arg$125);
12222: matching_nodes
12223: .remove(matching_nodes.size() - 1);
12224: if ((null != arg$125)) {
12225: arg$125
12226: .setProperty("__type",
12227: retValue$2808);
12228: }
12229: return Analyzer.cast(retValue$2808);
12230: }
12231: if (TypicalSupport.match$2809(arg$125)) {
12232: final Pair<Node> nl = Analyzer
12233: .cast(Primitives.getChildren(arg$125,
12234: 0, arg$125.size()));
12235:
12236: matching_nodes.add(arg$125);
12237: if ((null != arg$125 && processScopeNodes
12238: .contains(arg$125.getName()))) {
12239: processScope(arg$125, getScope);
12240: }
12241: checkEnterScope(arg$125);
12242:
12243: final Object retValue$2827 = Analyzer
12244: .cast(new Match<TypicalTypes.raw_type<?>>() {
12245: public TypicalTypes.raw_type<?> apply() {
12246: final Pair<Node> arg$2818 = Analyzer
12247: .cast(nl);
12248:
12249: if ((null == arg$2818)) {
12250: return null;
12251: }
12252: if (TypicalSupport
12253: .match$323(arg$2818)) {
12254: return Analyzer
12255: .cast(new Let<TypicalTypes.raw_type<?>>() {
12256: final TypicalTypes.raw_type<?> varT;
12257:
12258: {
12259: varT = Analyzer
12260: .cast(new TypicalTypes.VariableT(
12261: freshName
12262: .apply("type"),
12263: Boolean.FALSE));
12264: }
12265:
12266: public TypicalTypes.raw_type<?> apply() {
12267: return Analyzer
12268: .cast(new TypicalTypes.ConstructedT(
12269: new Pair<TypicalTypes.raw_type<?>>(
12270: varT),
12271: "list"));
12272: }
12273: }.apply());
12274: }
12275: if (true) {
12276: return Analyzer
12277: .cast(new Let<TypicalTypes.raw_type<?>>() {
12278: final Pair<TypicalTypes.raw_type<?>> tl;
12279:
12280: {
12281: tl = Analyzer
12282: .cast(TypicalSupport.map$129
12283: .apply(
12284: analyze,
12285: nl));
12286: }
12287:
12288: public TypicalTypes.raw_type<?> apply() {
12289: return Analyzer
12290: .cast(null == Primitives.isNotBottom
12291: .apply(ancestor
12292: .apply(TypicalSupport.nodeMatch$2813)) ? null
12293: : Primitives.isNotBottom
12294: .apply(ancestor
12295: .apply(TypicalSupport.nodeMatch$2813)) ? new Let<TypicalTypes.raw_type<?>>() {
12296: final TypicalTypes.raw_type<?> res;
12297:
12298: {
12299: res = Analyzer
12300: .cast(checkNodeList
12301: .apply(tl));
12302: }
12303:
12304: public TypicalTypes.raw_type<?> apply() {
12305: return Analyzer
12306: .cast(null == Primitives.isBottom
12307: .apply(res) ? null
12308: : Primitives.isBottom
12309: .apply(res) ? null
12310: : new TypicalTypes.ConstructedT(
12311: new Pair<TypicalTypes.raw_type<?>>(
12312: nodet),
12313: "list"));
12314: }
12315: }
12316: .apply()
12317: : null == Primitives.not
12318: .apply(TypicalSupport.exists$184
12319: .apply(
12320: Primitives.isBottom,
12321: tl))
12322: || !Primitives.not
12323: .apply(TypicalSupport.exists$184
12324: .apply(
12325: Primitives.isBottom,
12326: tl)) ? null
12327: : new Let<TypicalTypes.raw_type<?>>() {
12328: final TypicalTypes.raw_type<?> res;
12329:
12330: {
12331: res = Analyzer
12332: .cast(TypicalSupport.foldl$222
12333: .apply(
12334: unify,
12335: tl,
12336: wildt));
12337: }
12338:
12339: public TypicalTypes.raw_type<?> apply() {
12340: return Analyzer
12341: .cast(new Require<TypicalTypes.raw_type<?>>() {
12342: public TypicalTypes.raw_type<?> apply() {
12343: final Boolean var$2823 = Primitives.isNotBottom
12344: .apply(res);
12345:
12346: if ((null != var$2823 && !var$2823)) {
12347: showMessage(
12348: "error",
12349: "types do not match in list literal",
12350: null);
12351: }
12352: if ((null == var$2823)) {
12353: return null;
12354: }
12355: if (var$2823) {
12356: return new TypicalTypes.ConstructedT(
12357: new Pair<TypicalTypes.raw_type<?>>(
12358: res),
12359: "list");
12360: }
12361: return null;
12362: }
12363: }
12364: .apply());
12365: }
12366: }
12367: .apply());
12368: }
12369: }.apply());
12370: }
12371: return null;
12372: }
12373: }.apply());
12374:
12375: checkExitScope(arg$125);
12376: matching_nodes
12377: .remove(matching_nodes.size() - 1);
12378: if ((null != arg$125)) {
12379: arg$125
12380: .setProperty("__type",
12381: retValue$2827);
12382: }
12383: return Analyzer.cast(retValue$2827);
12384: }
12385: if (TypicalSupport.match$2828(arg$125)) {
12386: final Node ops = (arg$125.size() > 0 ? arg$125
12387: .getGeneric(0) : null);
12388: final Node lit = (arg$125.size() > 1 ? arg$125
12389: .getGeneric(1) : null);
12390: final Node pat = (arg$125.size() > 2 ? arg$125
12391: .getGeneric(2) : null);
12392:
12393: matching_nodes.add(arg$125);
12394: if ((null != arg$125 && processScopeNodes
12395: .contains(arg$125.getName()))) {
12396: processScope(arg$125, getScope);
12397: }
12398: checkEnterScope(arg$125);
12399:
12400: final Object retValue$2837 = Analyzer
12401: .cast(new Let<TypicalTypes.raw_type<?>>() {
12402: final Pair<String> opList;
12403: final TypicalTypes.raw_type<?> nodeL;
12404: final TypicalTypes.raw_type<?> tpat;
12405:
12406: {
12407: analyze.apply(ops);
12408: opList = Analyzer
12409: .cast(getStringList
12410: .apply(ops));
12411: analyze.apply(lit);
12412: Primitives.annotate.apply(pat,
12413: "is_reduce", wildt);
12414: Primitives.annotate
12415: .apply(
12416: pat,
12417: "non_exhaustive",
12418: wildt);
12419: nodeL = Analyzer
12420: .cast(new TypicalTypes.ConstructedT(
12421: new Pair<TypicalTypes.raw_type<?>>(
12422: nodet),
12423: "list"));
12424: tpat = Analyzer.cast(analyze
12425: .apply(pat));
12426: }
12427:
12428: public TypicalTypes.raw_type<?> apply() {
12429: return Analyzer
12430: .cast(new Match<TypicalTypes.raw_type<?>>() {
12431: public TypicalTypes.raw_type<?> apply() {
12432: final TypicalTypes.raw_type<?> arg$2832 = Analyzer
12433: .cast(tpat);
12434:
12435: if ((null == arg$2832)) {
12436: return null;
12437: }
12438: if ((null != arg$2832))
12439: switch (arg$2832
12440: .tag()) {
12441: case PairOfType:
12442: if (TypicalSupport
12443: .match$116(arg$2832)) {
12444: final TypicalTypes.raw_type<?> right = Analyzer
12445: .cast(arg$2832
12446: .getTuple()
12447: .get2());
12448:
12449: return Analyzer
12450: .cast(null == Primitives.contains
12451: .apply(
12452: "list",
12453: opList) ? null
12454: : Primitives.contains
12455: .apply(
12456: "list",
12457: opList) ? new Let<TypicalTypes.raw_type<?>>() {
12458: final TypicalTypes.raw_type<?> rightL;
12459:
12460: {
12461: rightL = Analyzer
12462: .cast(new TypicalTypes.ConstructedT(
12463: new Pair<TypicalTypes.raw_type<?>>(
12464: right),
12465: "list"));
12466: }
12467:
12468: public TypicalTypes.raw_type<?> apply() {
12469: return Analyzer
12470: .cast(new TypicalTypes.FunctionT(
12471: new Pair<TypicalTypes.raw_type<?>>(
12472: nodeL),
12473: rightL));
12474: }
12475: }
12476: .apply()
12477: : new TypicalTypes.FunctionT(
12478: new Pair<TypicalTypes.raw_type<?>>(
12479: nodeL),
12480: right));
12481: }
12482: break;
12483: default:
12484: break;
12485: }
12486: ;
12487: if (true) {
12488: return Analyzer
12489: .cast(null);
12490: }
12491: return null;
12492: }
12493: }.apply());
12494: }
12495: }.apply());
12496:
12497: checkExitScope(arg$125);
12498: matching_nodes
12499: .remove(matching_nodes.size() - 1);
12500: if ((null != arg$125)) {
12501: arg$125
12502: .setProperty("__type",
12503: retValue$2837);
12504: }
12505: return Analyzer.cast(retValue$2837);
12506: }
12507: if (TypicalSupport.match$2838(arg$125)) {
12508: final Pair<String> sl = Analyzer
12509: .cast(Primitives.getChildren(arg$125,
12510: 0, arg$125.size()));
12511:
12512: matching_nodes.add(arg$125);
12513: if ((null != arg$125 && processScopeNodes
12514: .contains(arg$125.getName()))) {
12515: processScope(arg$125, getScope);
12516: }
12517: checkEnterScope(arg$125);
12518:
12519: final Object retValue$2841 = Analyzer
12520: .cast(null == Primitives.and.apply(
12521: Primitives.contains.apply(
12522: "list", sl),
12523: Primitives.contains.apply(
12524: "singleton", sl)) ? null
12525: : Primitives.and
12526: .apply(
12527: Primitives.contains
12528: .apply(
12529: "list",
12530: sl),
12531: Primitives.contains
12532: .apply(
12533: "singleton",
12534: sl)) ? error(
12535: "'list' and 'singleton' are not compatible",
12536: null)
12537: : null == Primitives.and
12538: .apply(
12539: Primitives.contains
12540: .apply(
12541: "list",
12542: sl),
12543: Primitives.contains
12544: .apply(
12545: "set",
12546: sl)) ? null
12547: : Primitives.and
12548: .apply(
12549: Primitives.contains
12550: .apply(
12551: "list",
12552: sl),
12553: Primitives.contains
12554: .apply(
12555: "set",
12556: sl)) ? error(
12557: "'list' and 'set' are not compatible",
12558: null)
12559: : null == Primitives.and
12560: .apply(
12561: Primitives.contains
12562: .apply(
12563: "singleton",
12564: sl),
12565: Primitives.contains
12566: .apply(
12567: "set",
12568: sl)) ? null
12569: : Primitives.and
12570: .apply(
12571: Primitives.contains
12572: .apply(
12573: "singleton",
12574: sl),
12575: Primitives.contains
12576: .apply(
12577: "set",
12578: sl)) ? error(
12579: "'singleton' and 'set' are not compatible",
12580: null)
12581: : null == Primitives.and
12582: .apply(
12583: Primitives.contains
12584: .apply(
12585: "required",
12586: sl),
12587: Primitives.contains
12588: .apply(
12589: "optional",
12590: sl)) ? null
12591: : Primitives.and
12592: .apply(
12593: Primitives.contains
12594: .apply(
12595: "required",
12596: sl),
12597: Primitives.contains
12598: .apply(
12599: "optional",
12600: sl)) ? error(
12601: "'required' and 'optional' are not compatible",
12602: null)
12603: : new TypicalTypes.ConstructedT(
12604: new Pair<TypicalTypes.raw_type<?>>(
12605: strt),
12606: "list"));
12607:
12608: checkExitScope(arg$125);
12609: matching_nodes
12610: .remove(matching_nodes.size() - 1);
12611: if ((null != arg$125)) {
12612: arg$125
12613: .setProperty("__type",
12614: retValue$2841);
12615: }
12616: return Analyzer.cast(retValue$2841);
12617: }
12618: if (TypicalSupport.match$61(arg$125)) {
12619: final String s = (arg$125.size() > 0 ? arg$125
12620: .getString(0) : null);
12621:
12622: matching_nodes.add(arg$125);
12623: if ((null != arg$125 && processScopeNodes
12624: .contains(arg$125.getName()))) {
12625: processScope(arg$125, getScope);
12626: }
12627: checkEnterScope(arg$125);
12628:
12629: final Object retValue$2845 = Analyzer
12630: .cast(Analyzer.cast(lookup4.apply(no,
12631: "error",
12632: Primitives.concat.apply(s,
12633: " is undefined"),
12634: getNameSpace)));
12635:
12636: checkExitScope(arg$125);
12637: matching_nodes
12638: .remove(matching_nodes.size() - 1);
12639: if ((null != arg$125)) {
12640: arg$125
12641: .setProperty("__type",
12642: retValue$2845);
12643: }
12644: return Analyzer.cast(retValue$2845);
12645: }
12646: if (TypicalSupport.match$1(arg$125)) {
12647: final String s = (arg$125.size() > 0 ? arg$125
12648: .getString(0) : null);
12649:
12650: matching_nodes.add(arg$125);
12651: if ((null != arg$125 && processScopeNodes
12652: .contains(arg$125.getName()))) {
12653: processScope(arg$125, getScope);
12654: }
12655: checkEnterScope(arg$125);
12656:
12657: final Object retValue$2849 = Analyzer
12658: .cast(Analyzer.cast(lookup4.apply(no,
12659: "error",
12660: Primitives.concat.apply(s,
12661: " is undefined"),
12662: getNameSpace)));
12663:
12664: checkExitScope(arg$125);
12665: matching_nodes
12666: .remove(matching_nodes.size() - 1);
12667: if ((null != arg$125)) {
12668: arg$125
12669: .setProperty("__type",
12670: retValue$2849);
12671: }
12672: return Analyzer.cast(retValue$2849);
12673: }
12674: if (TypicalSupport.match$29(arg$125)) {
12675: final String s = (arg$125.size() > 0 ? arg$125
12676: .getString(0) : null);
12677:
12678: matching_nodes.add(arg$125);
12679: if ((null != arg$125 && processScopeNodes
12680: .contains(arg$125.getName()))) {
12681: processScope(arg$125, getScope);
12682: }
12683: checkEnterScope(arg$125);
12684:
12685: final Object retValue$2855 = Analyzer
12686: .cast(new Require<TypicalTypes.raw_type<?>>() {
12687: public TypicalTypes.raw_type<?> apply() {
12688: final Boolean var$2852 = isDefined
12689: .apply(no, getNameSpace);
12690:
12691: if ((null != var$2852 && !var$2852)) {
12692: showMessage(
12693: "error",
12694: Primitives.concat
12695: .apply(
12696: Primitives.concat
12697: .apply(
12698: "type ",
12699: s),
12700: " is undefined"),
12701: null);
12702: }
12703: if ((null == var$2852)) {
12704: return null;
12705: }
12706: if (var$2852) {
12707: return new TypicalTypes.TypeName(
12708: s);
12709: }
12710: return null;
12711: }
12712: }.apply());
12713:
12714: checkExitScope(arg$125);
12715: matching_nodes
12716: .remove(matching_nodes.size() - 1);
12717: if ((null != arg$125)) {
12718: arg$125
12719: .setProperty("__type",
12720: retValue$2855);
12721: }
12722: return Analyzer.cast(retValue$2855);
12723: }
12724: if (TypicalSupport.match$2856(arg$125)) {
12725: final String s = (arg$125.size() > 0 ? arg$125
12726: .getString(0) : null);
12727:
12728: matching_nodes.add(arg$125);
12729: if ((null != arg$125 && processScopeNodes
12730: .contains(arg$125.getName()))) {
12731: processScope(arg$125, getScope);
12732: }
12733: checkEnterScope(arg$125);
12734:
12735: final Object retValue$2859 = Analyzer
12736: .cast(new Let<TypicalTypes.raw_type<?>>() {
12737: final Pair<String> vars;
12738:
12739: {
12740: vars = Analyzer
12741: .cast(getAnnotatedStringList
12742: .apply(no,
12743: "type_variables"));
12744: }
12745:
12746: public TypicalTypes.raw_type<?> apply() {
12747: return Analyzer
12748: .cast(null == Primitives.or
12749: .apply(
12750: Primitives.isBottom
12751: .apply(vars),
12752: Primitives.not
12753: .apply(Primitives.contains
12754: .apply(
12755: s,
12756: vars))) ? null
12757: : Primitives.or
12758: .apply(
12759: Primitives.isBottom
12760: .apply(vars),
12761: Primitives.not
12762: .apply(Primitives.contains
12763: .apply(
12764: s,
12765: vars))) ? error(
12766: Primitives.concat
12767: .apply(
12768: Primitives.concat
12769: .apply(
12770: "type variable ",
12771: s),
12772: " is undefined"),
12773: null)
12774: : new TypicalTypes.VariableT(
12775: s,
12776: Boolean.TRUE));
12777: }
12778: }.apply());
12779:
12780: checkExitScope(arg$125);
12781: matching_nodes
12782: .remove(matching_nodes.size() - 1);
12783: if ((null != arg$125)) {
12784: arg$125
12785: .setProperty("__type",
12786: retValue$2859);
12787: }
12788: return Analyzer.cast(retValue$2859);
12789: }
12790: if (TypicalSupport.match$2860(arg$125)) {
12791: final Node n = (arg$125.size() > 0 ? arg$125
12792: .getGeneric(0) : null);
12793:
12794: matching_nodes.add(arg$125);
12795: if ((null != arg$125 && processScopeNodes
12796: .contains(arg$125.getName()))) {
12797: processScope(arg$125, getScope);
12798: }
12799: checkEnterScope(arg$125);
12800:
12801: final Object retValue$2863 = Analyzer
12802: .cast(new Let<TypicalTypes.raw_type<?>>() {
12803: final String s;
12804:
12805: {
12806: s = Analyzer.cast(getString
12807: .apply(n));
12808: Analyzer.cast(Primitives.put
12809: .apply(s, nodet,
12810: hashTable));
12811: }
12812:
12813: public TypicalTypes.raw_type<?> apply() {
12814: return Analyzer.cast(nodet);
12815: }
12816: }.apply());
12817:
12818: checkExitScope(arg$125);
12819: matching_nodes
12820: .remove(matching_nodes.size() - 1);
12821: if ((null != arg$125)) {
12822: arg$125
12823: .setProperty("__type",
12824: retValue$2863);
12825: }
12826: return Analyzer.cast(retValue$2863);
12827: }
12828: if (TypicalSupport.match$2864(arg$125)) {
12829: final Pair<Node> nl = Analyzer
12830: .cast(Primitives.getChildren(arg$125,
12831: 0, arg$125.size()));
12832:
12833: matching_nodes.add(arg$125);
12834: if ((null != arg$125 && processScopeNodes
12835: .contains(arg$125.getName()))) {
12836: processScope(arg$125, getScope);
12837: }
12838: checkEnterScope(arg$125);
12839:
12840: final Object retValue$2867 = Analyzer
12841: .cast(new Let<TypicalTypes.raw_type<?>>() {
12842: final String str;
12843:
12844: {
12845: str = Analyzer
12846: .cast(getAnnotatedString
12847: .apply(no,
12848: "parent"));
12849: }
12850:
12851: public TypicalTypes.raw_type<?> apply() {
12852: return Analyzer
12853: .cast(null == reachableFromNode
12854: .apply(str) ? null
12855: : reachableFromNode
12856: .apply(str) ? new Let<TypicalTypes.raw_type<?>>() {
12857: final Pair<TypicalTypes.raw_type<?>> tl;
12858:
12859: {
12860: tl = Analyzer
12861: .cast(TypicalSupport.map$129
12862: .apply(
12863: analyze,
12864: nl));
12865: }
12866:
12867: public TypicalTypes.raw_type<?> apply() {
12868: return Analyzer
12869: .cast(null == Primitives.not
12870: .apply(TypicalSupport.exists$184
12871: .apply(
12872: Primitives.isBottom,
12873: tl)) ? null
12874: : Primitives.not
12875: .apply(TypicalSupport.exists$184
12876: .apply(
12877: Primitives.isBottom,
12878: tl)) ? new TypicalTypes.PolyVariantT(
12879: tl)
12880: : null);
12881: }
12882: }.apply()
12883: : error(
12884: "polymorphic variant is not allowed outside node closure",
12885: null));
12886: }
12887: }.apply());
12888:
12889: checkExitScope(arg$125);
12890: matching_nodes
12891: .remove(matching_nodes.size() - 1);
12892: if ((null != arg$125)) {
12893: arg$125
12894: .setProperty("__type",
12895: retValue$2867);
12896: }
12897: return Analyzer.cast(retValue$2867);
12898: }
12899: if (TypicalSupport.match$2868(arg$125)) {
12900: final Pair<Node> l = Analyzer
12901: .cast(Primitives.getChildren(arg$125,
12902: 0, arg$125.size()));
12903:
12904: matching_nodes.add(arg$125);
12905: if ((null != arg$125 && processScopeNodes
12906: .contains(arg$125.getName()))) {
12907: processScope(arg$125, getScope);
12908: }
12909: checkEnterScope(arg$125);
12910:
12911: final Object retValue$2871 = Analyzer
12912: .cast(new Let<TypicalTypes.raw_type<?>>() {
12913: final String str;
12914: final Pair<String> vars;
12915: final Pair<TypicalTypes.raw_type<?>> tl;
12916:
12917: {
12918: str = Analyzer
12919: .cast(getAnnotatedString
12920: .apply(no,
12921: "parent"));
12922: vars = Analyzer
12923: .cast(getAnnotatedStringList
12924: .apply(no,
12925: "type_variables"));
12926: Analyzer
12927: .discard(null == Primitives.isNotBottom
12928: .apply(vars)
12929: || !Primitives.isNotBottom
12930: .apply(vars) ? null
12931: : Primitives.annotateList
12932: .apply(
12933: l,
12934: "type_variables",
12935: new TypicalTypes.StringList(
12936: vars)));
12937: Primitives.annotateList
12938: .apply(
12939: l,
12940: "parent",
12941: new TypicalTypes.StringName(
12942: str));
12943: tl = Analyzer
12944: .cast(TypicalSupport.map$129
12945: .apply(analyze,
12946: l));
12947: }
12948:
12949: public TypicalTypes.raw_type<?> apply() {
12950: return Analyzer
12951: .cast(null == Primitives.not
12952: .apply(TypicalSupport.exists$184
12953: .apply(
12954: Primitives.isBottom,
12955: tl))
12956: || !Primitives.not
12957: .apply(TypicalSupport.exists$184
12958: .apply(
12959: Primitives.isBottom,
12960: tl)) ? null
12961: : new TypicalTypes.TupleT(
12962: tl));
12963: }
12964: }.apply());
12965:
12966: checkExitScope(arg$125);
12967: matching_nodes
12968: .remove(matching_nodes.size() - 1);
12969: if ((null != arg$125)) {
12970: arg$125
12971: .setProperty("__type",
12972: retValue$2871);
12973: }
12974: return Analyzer.cast(retValue$2871);
12975: }
12976: if (TypicalSupport.match$25(arg$125)) {
12977: final Node n = (arg$125.size() > 0 ? arg$125
12978: .getGeneric(0) : null);
12979: final String s = (arg$125.size() > 1 ? arg$125
12980: .getString(1) : null);
12981:
12982: matching_nodes.add(arg$125);
12983: if ((null != arg$125 && processScopeNodes
12984: .contains(arg$125.getName()))) {
12985: processScope(arg$125, getScope);
12986: }
12987: checkEnterScope(arg$125);
12988:
12989: final Object retValue$2883 = Analyzer
12990: .cast(new Let<TypicalTypes.raw_type<?>>() {
12991: final String str;
12992: final Pair<String> vars;
12993: final TypicalTypes.raw_type<?> t;
12994:
12995: {
12996: str = Analyzer
12997: .cast(getAnnotatedString
12998: .apply(no,
12999: "parent"));
13000: vars = Analyzer
13001: .cast(getAnnotatedStringList
13002: .apply(no,
13003: "type_variables"));
13004: Analyzer
13005: .discard(null == Primitives.isNotBottom
13006: .apply(vars)
13007: || !Primitives.isNotBottom
13008: .apply(vars) ? null
13009: : Primitives.annotate
13010: .apply(
13011: n,
13012: "type_variables",
13013: new TypicalTypes.StringList(
13014: vars)));
13015: Primitives.annotate
13016: .apply(
13017: n,
13018: "parent",
13019: new TypicalTypes.StringName(
13020: str));
13021: t = Analyzer.cast(analyze
13022: .apply(n));
13023: }
13024:
13025: public TypicalTypes.raw_type<?> apply() {
13026: return Analyzer
13027: .cast(new Match<TypicalTypes.raw_type<?>>() {
13028: public TypicalTypes.raw_type<?> apply() {
13029: final String arg$2877 = Analyzer
13030: .cast(s);
13031:
13032: if ((null == arg$2877)) {
13033: return null;
13034: }
13035: if ((null != "list" && "list"
13036: .equals(arg$2877))) {
13037: return Analyzer
13038: .cast(null == Primitives.isNotBottom
13039: .apply(t)
13040: || !Primitives.isNotBottom
13041: .apply(t) ? null
13042: : new TypicalTypes.ConstructedT(
13043: new Pair<TypicalTypes.raw_type<?>>(
13044: t),
13045: s));
13046: }
13047: if ((null != "var" && "var"
13048: .equals(arg$2877))) {
13049: return Analyzer
13050: .cast(null == Primitives.isNotBottom
13051: .apply(t)
13052: || !Primitives.isNotBottom
13053: .apply(t) ? null
13054: : new TypicalTypes.ConstructedT(
13055: new Pair<TypicalTypes.raw_type<?>>(
13056: t),
13057: s));
13058: }
13059: if ((null != "opt" && "opt"
13060: .equals(arg$2877))) {
13061: return Analyzer
13062: .cast(t);
13063: }
13064: if (true) {
13065: return Analyzer
13066: .cast(new Require<TypicalTypes.raw_type<?>>() {
13067: public TypicalTypes.raw_type<?> apply() {
13068: final Boolean var$2879 = isDefined
13069: .apply(
13070: no,
13071: getNameSpace);
13072:
13073: if ((null != var$2879 && !var$2879)) {
13074: showMessage(
13075: "error",
13076: Primitives.concat
13077: .apply(
13078: Primitives.concat
13079: .apply(
13080: "type ",
13081: s),
13082: " is undefined"),
13083: null);
13084: }
13085: if ((null == var$2879)) {
13086: return null;
13087: }
13088: if (var$2879) {
13089: return new Let<TypicalTypes.raw_type<?>>() {
13090: final Node nod;
13091: final Pair<String> var_list;
13092:
13093: {
13094: nod = Analyzer
13095: .cast(Analyzer
13096: .cast(lookup2
13097: .apply(
13098: GNode
13099: .create(
13100: "NameSpaceStructure",
13101: s,
13102: null,
13103: null),
13104: getNameSpace)));
13105: var_list = Analyzer
13106: .cast(getAnnotatedStringList
13107: .apply(
13108: nod,
13109: "type_variables"));
13110: }
13111:
13112: public TypicalTypes.raw_type<?> apply() {
13113: return Analyzer
13114: .cast(null == Primitives.isBottom
13115: .apply(var_list) ? null
13116: : Primitives.isBottom
13117: .apply(var_list) ? error(
13118: Primitives.concat
13119: .apply(
13120: s,
13121: " is not a constructed type"),
13122: null)
13123: : null == Primitives.not
13124: .apply(Primitives.equal
13125: .apply(
13126: Primitives.length
13127: .apply(var_list),
13128: BigInteger
13129: .valueOf(1))) ? null
13130: : Primitives.not
13131: .apply(Primitives.equal
13132: .apply(
13133: Primitives.length
13134: .apply(var_list),
13135: BigInteger
13136: .valueOf(1))) ? error(
13137: Primitives.concat
13138: .apply(
13139: Primitives.concat
13140: .apply(
13141: "constructed type ",
13142: s),
13143: " does not have enough type parameters"),
13144: null)
13145: : null == Primitives.isNotBottom
13146: .apply(t)
13147: || !Primitives.isNotBottom
13148: .apply(t) ? null
13149: : new TypicalTypes.ConstructedT(
13150: new Pair<TypicalTypes.raw_type<?>>(
13151: t),
13152: s));
13153: }
13154: }
13155: .apply();
13156: }
13157: return null;
13158: }
13159: }
13160: .apply());
13161: }
13162: return null;
13163: }
13164: }.apply());
13165: }
13166: }.apply());
13167:
13168: checkExitScope(arg$125);
13169: matching_nodes
13170: .remove(matching_nodes.size() - 1);
13171: if ((null != arg$125)) {
13172: arg$125
13173: .setProperty("__type",
13174: retValue$2883);
13175: }
13176: return Analyzer.cast(retValue$2883);
13177: }
13178: if (TypicalSupport.match$2884(arg$125)) {
13179: final Node n = (arg$125.size() > 0 ? arg$125
13180: .getGeneric(0) : null);
13181: final Node tv = (arg$125.size() > 1 ? arg$125
13182: .getGeneric(1) : null);
13183:
13184: matching_nodes.add(arg$125);
13185: if ((null != arg$125 && processScopeNodes
13186: .contains(arg$125.getName()))) {
13187: processScope(arg$125, getScope);
13188: }
13189: checkEnterScope(arg$125);
13190:
13191: final Object retValue$2887 = Analyzer
13192: .cast(new Let<TypicalTypes.raw_type<?>>() {
13193: final String s;
13194:
13195: {
13196: s = Analyzer.cast(getString
13197: .apply(tv));
13198: }
13199:
13200: public TypicalTypes.raw_type<?> apply() {
13201: return Analyzer
13202: .cast(null == isDefined
13203: .apply(
13204: GNode
13205: .create(
13206: "UserDefinedType",
13207: s),
13208: getNameSpace) ? null
13209: : isDefined
13210: .apply(
13211: GNode
13212: .create(
13213: "UserDefinedType",
13214: s),
13215: getNameSpace) ? error(
13216: Primitives.concat
13217: .apply(
13218: s,
13219: " has been previously defined"),
13220: null)
13221: : new Let<TypicalTypes.raw_type<?>>() {
13222: final Pair<String> vars;
13223: final TypicalTypes.raw_type<?> t;
13224:
13225: {
13226: vars = Analyzer
13227: .cast(getAnnotatedStringList
13228: .apply(
13229: no,
13230: "type_variables"));
13231: Analyzer
13232: .discard(null == Primitives.isNotBottom
13233: .apply(vars)
13234: || !Primitives.isNotBottom
13235: .apply(vars) ? null
13236: : Primitives.annotate
13237: .apply(
13238: n,
13239: "type_variabls",
13240: new TypicalTypes.StringList(
13241: vars)));
13242: t = Analyzer
13243: .cast(analyze
13244: .apply(n));
13245: redefine
13246: .apply(
13247: GNode
13248: .create(
13249: "UserDefinedType",
13250: s),
13251: t,
13252: getNameSpace);
13253: }
13254:
13255: public TypicalTypes.raw_type<?> apply() {
13256: return Analyzer
13257: .cast(t);
13258: }
13259: }
13260: .apply());
13261: }
13262: }.apply());
13263:
13264: checkExitScope(arg$125);
13265: matching_nodes
13266: .remove(matching_nodes.size() - 1);
13267: if ((null != arg$125)) {
13268: arg$125
13269: .setProperty("__type",
13270: retValue$2887);
13271: }
13272: return Analyzer.cast(retValue$2887);
13273: }
13274: if (TypicalSupport.match$2888(arg$125)) {
13275: final Node n1 = (arg$125.size() > 0 ? arg$125
13276: .getGeneric(0) : null);
13277: final Node n2 = (arg$125.size() > 1 ? arg$125
13278: .getGeneric(1) : null);
13279:
13280: matching_nodes.add(arg$125);
13281: if ((null != arg$125 && processScopeNodes
13282: .contains(arg$125.getName()))) {
13283: processScope(arg$125, getScope);
13284: }
13285: checkEnterScope(arg$125);
13286:
13287: final Object retValue$2909 = Analyzer
13288: .cast(new Let<TypicalTypes.raw_type<?>>() {
13289: final Pair<String> vars;
13290: final Pair<Node> nl;
13291: final Pair<TypicalTypes.raw_type<?>> tl;
13292: final TypicalTypes.raw_type<?> ret;
13293:
13294: {
13295: vars = Analyzer
13296: .cast(getAnnotatedStringList
13297: .apply(no,
13298: "type_variables"));
13299: nl = Analyzer
13300: .cast(new Match<Pair<Node>>() {
13301: public Pair<Node> apply() {
13302: final Node arg$2898 = GNode
13303: .cast(n1);
13304:
13305: if ((null == arg$2898)) {
13306: return null;
13307: }
13308: if (TypicalSupport
13309: .match$2868(arg$2898)) {
13310: final Pair<Node> l = Analyzer
13311: .cast(Primitives
13312: .getChildren(
13313: arg$2898,
13314: 0,
13315: arg$2898
13316: .size()));
13317:
13318: matching_nodes
13319: .add(arg$2898);
13320: if ((null != arg$2898 && processScopeNodes
13321: .contains(arg$2898
13322: .getName()))) {
13323: processScope(
13324: arg$2898,
13325: getScope);
13326: }
13327: checkEnterScope(arg$2898);
13328:
13329: final Object retValue$2902 = Analyzer
13330: .cast(l);
13331:
13332: checkExitScope(arg$2898);
13333: matching_nodes
13334: .remove(matching_nodes
13335: .size() - 1);
13336: return Analyzer
13337: .cast(retValue$2902);
13338: }
13339: if (true) {
13340: matching_nodes
13341: .add(arg$2898);
13342: if ((null != arg$2898 && processScopeNodes
13343: .contains(arg$2898
13344: .getName()))) {
13345: processScope(
13346: arg$2898,
13347: getScope);
13348: }
13349: checkEnterScope(arg$2898);
13350:
13351: final Object retValue$2905 = Analyzer
13352: .cast(new Pair<Node>(
13353: n1));
13354:
13355: checkExitScope(arg$2898);
13356: matching_nodes
13357: .remove(matching_nodes
13358: .size() - 1);
13359: return Analyzer
13360: .cast(retValue$2905);
13361: }
13362: return null;
13363: }
13364: }.apply());
13365: Analyzer
13366: .discard(null == Primitives.isNotBottom
13367: .apply(vars)
13368: || !Primitives.isNotBottom
13369: .apply(vars) ? null
13370: : Primitives.annotateList
13371: .apply(
13372: Primitives
13373: .wrapCons(
13374: n2,
13375: nl),
13376: "type_variables",
13377: new TypicalTypes.StringList(
13378: vars)));
13379: tl = Analyzer
13380: .cast(TypicalSupport.map$129
13381: .apply(analyze,
13382: nl));
13383: ret = Analyzer.cast(analyze
13384: .apply(n2));
13385: }
13386:
13387: public TypicalTypes.raw_type<?> apply() {
13388: return Analyzer
13389: .cast(null == Primitives.and
13390: .apply(
13391: Primitives.isNotBottom
13392: .apply(ret),
13393: Primitives.not
13394: .apply(TypicalSupport.exists$184
13395: .apply(
13396: Primitives.isBottom,
13397: tl)))
13398: || !Primitives.and
13399: .apply(
13400: Primitives.isNotBottom
13401: .apply(ret),
13402: Primitives.not
13403: .apply(TypicalSupport.exists$184
13404: .apply(
13405: Primitives.isBottom,
13406: tl))) ? null
13407: : new TypicalTypes.FunctionT(
13408: tl, ret));
13409: }
13410: }.apply());
13411:
13412: checkExitScope(arg$125);
13413: matching_nodes
13414: .remove(matching_nodes.size() - 1);
13415: if ((null != arg$125)) {
13416: arg$125
13417: .setProperty("__type",
13418: retValue$2909);
13419: }
13420: return Analyzer.cast(retValue$2909);
13421: }
13422: if (TypicalSupport.match$2910(arg$125)) {
13423: final Node n = (arg$125.size() > 0 ? arg$125
13424: .getGeneric(0) : null);
13425: final String s = (arg$125.size() > 1 ? arg$125
13426: .getString(1) : null);
13427:
13428: matching_nodes.add(arg$125);
13429: if ((null != arg$125 && processScopeNodes
13430: .contains(arg$125.getName()))) {
13431: processScope(arg$125, getScope);
13432: }
13433: checkEnterScope(arg$125);
13434:
13435: final Object retValue$2913 = Analyzer
13436: .cast(null == Primitives.not
13437: .apply(isDefined
13438: .apply(
13439: GNode
13440: .create(
13441: "UserDefinedType",
13442: s),
13443: getNameSpace)) ? null
13444: : Primitives.not
13445: .apply(isDefined
13446: .apply(
13447: GNode
13448: .create(
13449: "UserDefinedType",
13450: s),
13451: getNameSpace)) ? error(
13452: Primitives.concat
13453: .apply(
13454: Primitives.concat
13455: .apply(
13456: "type ",
13457: s),
13458: " is undefined"),
13459: null)
13460: : new Let<TypicalTypes.raw_type<?>>() {
13461: final Node nod;
13462: final Pair<Node> nl;
13463:
13464: {
13465: nod = Analyzer
13466: .cast(Analyzer
13467: .cast(lookup2
13468: .apply(
13469: GNode
13470: .create(
13471: "NameSpaceStructure",
13472: s,
13473: null,
13474: null),
13475: getNameSpace)));
13476: nl = Analyzer
13477: .cast(getNodeList
13478: .apply(n));
13479: }
13480:
13481: public TypicalTypes.raw_type<?> apply() {
13482: return Analyzer
13483: .cast(null == Primitives.not
13484: .apply(Primitives.hasAnnotation
13485: .apply(
13486: nod,
13487: "type_variables")) ? null
13488: : Primitives.not
13489: .apply(Primitives.hasAnnotation
13490: .apply(
13491: nod,
13492: "type_variables")) ? error(
13493: Primitives.concat
13494: .apply(
13495: s,
13496: " is not a contructed type"),
13497: null)
13498: : new Let<TypicalTypes.raw_type<?>>() {
13499: final Pair<String> vars;
13500: final Pair<TypicalTypes.raw_type<?>> tl;
13501:
13502: {
13503: vars = Analyzer
13504: .cast(getAnnotatedStringList
13505: .apply(
13506: nod,
13507: "type_variables"));
13508: Analyzer
13509: .discard(null == Primitives.isNotBottom
13510: .apply(vars)
13511: || !Primitives.isNotBottom
13512: .apply(vars) ? null
13513: : Primitives.annotateList
13514: .apply(
13515: nl,
13516: "type_variables",
13517: new TypicalTypes.StringList(
13518: vars)));
13519: tl = Analyzer
13520: .cast(TypicalSupport.map$129
13521: .apply(
13522: analyze,
13523: nl));
13524: }
13525:
13526: public TypicalTypes.raw_type<?> apply() {
13527: return Analyzer
13528: .cast(null == Primitives.lessInt
13529: .apply(
13530: Primitives.length
13531: .apply(nl),
13532: Primitives.length
13533: .apply(vars)) ? null
13534: : Primitives.lessInt
13535: .apply(
13536: Primitives.length
13537: .apply(nl),
13538: Primitives.length
13539: .apply(vars)) ? error(
13540: Primitives.concat
13541: .apply(
13542: Primitives.concat
13543: .apply(
13544: "contructed type ",
13545: s),
13546: " does not have enough type parameters"),
13547: null)
13548: : null == Primitives.greaterInt
13549: .apply(
13550: Primitives.length
13551: .apply(nl),
13552: Primitives.length
13553: .apply(vars)) ? null
13554: : Primitives.greaterInt
13555: .apply(
13556: Primitives.length
13557: .apply(nl),
13558: Primitives.length
13559: .apply(vars)) ? error(
13560: Primitives.concat
13561: .apply(
13562: Primitives.concat
13563: .apply(
13564: "contructed type ",
13565: s),
13566: " has too many type parameters"),
13567: null)
13568: : null == Primitives.not
13569: .apply(TypicalSupport.exists$184
13570: .apply(
13571: Primitives.isBottom,
13572: tl))
13573: || !Primitives.not
13574: .apply(TypicalSupport.exists$184
13575: .apply(
13576: Primitives.isBottom,
13577: tl)) ? null
13578: : new TypicalTypes.ConstructedT(
13579: tl,
13580: s));
13581: }
13582: }
13583: .apply());
13584: }
13585: }.apply());
13586:
13587: checkExitScope(arg$125);
13588: matching_nodes
13589: .remove(matching_nodes.size() - 1);
13590: if ((null != arg$125)) {
13591: arg$125
13592: .setProperty("__type",
13593: retValue$2913);
13594: }
13595: return Analyzer.cast(retValue$2913);
13596: }
13597: if (TypicalSupport.match$2914(arg$125)) {
13598: matching_nodes.add(arg$125);
13599: if ((null != arg$125 && processScopeNodes
13600: .contains(arg$125.getName()))) {
13601: processScope(arg$125, getScope);
13602: }
13603: checkEnterScope(arg$125);
13604:
13605: final Object retValue$2917 = Analyzer
13606: .cast(new TypicalTypes.VariableT(
13607: freshName.apply("type"),
13608: Boolean.FALSE));
13609:
13610: checkExitScope(arg$125);
13611: matching_nodes
13612: .remove(matching_nodes.size() - 1);
13613: if ((null != arg$125)) {
13614: arg$125
13615: .setProperty("__type",
13616: retValue$2917);
13617: }
13618: return Analyzer.cast(retValue$2917);
13619: }
13620: if (TypicalSupport.match$2918(arg$125)) {
13621: matching_nodes.add(arg$125);
13622: if ((null != arg$125 && processScopeNodes
13623: .contains(arg$125.getName()))) {
13624: processScope(arg$125, getScope);
13625: }
13626: checkEnterScope(arg$125);
13627:
13628: final Object retValue$2921 = Analyzer
13629: .cast(new TypicalTypes.VariableT(
13630: freshName.apply("type"),
13631: Boolean.FALSE));
13632:
13633: checkExitScope(arg$125);
13634: matching_nodes
13635: .remove(matching_nodes.size() - 1);
13636: if ((null != arg$125)) {
13637: arg$125
13638: .setProperty("__type",
13639: retValue$2921);
13640: }
13641: return Analyzer.cast(retValue$2921);
13642: }
13643: if (TypicalSupport.match$2922(arg$125)) {
13644: matching_nodes.add(arg$125);
13645: if ((null != arg$125 && processScopeNodes
13646: .contains(arg$125.getName()))) {
13647: processScope(arg$125, getScope);
13648: }
13649: checkEnterScope(arg$125);
13650:
13651: final Object retValue$2925 = Analyzer
13652: .cast(new TypicalTypes.VariableT(
13653: freshName.apply("type"),
13654: Boolean.FALSE));
13655:
13656: checkExitScope(arg$125);
13657: matching_nodes
13658: .remove(matching_nodes.size() - 1);
13659: if ((null != arg$125)) {
13660: arg$125
13661: .setProperty("__type",
13662: retValue$2925);
13663: }
13664: return Analyzer.cast(retValue$2925);
13665: }
13666: if (TypicalSupport.match$2926(arg$125)) {
13667: matching_nodes.add(arg$125);
13668: if ((null != arg$125 && processScopeNodes
13669: .contains(arg$125.getName()))) {
13670: processScope(arg$125, getScope);
13671: }
13672: checkEnterScope(arg$125);
13673:
13674: final Object retValue$2929 = Analyzer
13675: .cast(new Let<TypicalTypes.raw_type<?>>() {
13676: final String str;
13677:
13678: {
13679: str = Analyzer
13680: .cast(getAnnotatedString
13681: .apply(no,
13682: "parent"));
13683: }
13684:
13685: public TypicalTypes.raw_type<?> apply() {
13686: return Analyzer
13687: .cast(null == reachableFromNode
13688: .apply(str) ? null
13689: : reachableFromNode
13690: .apply(str) ? new TypicalTypes.AnyT()
13691: : error(
13692: "any is not allowed outside node closure",
13693: null));
13694: }
13695: }.apply());
13696:
13697: checkExitScope(arg$125);
13698: matching_nodes
13699: .remove(matching_nodes.size() - 1);
13700: if ((null != arg$125)) {
13701: arg$125
13702: .setProperty("__type",
13703: retValue$2929);
13704: }
13705: return Analyzer.cast(retValue$2929);
13706: }
13707: if (TypicalSupport.match$2930(arg$125)) {
13708: matching_nodes.add(arg$125);
13709: if ((null != arg$125 && processScopeNodes
13710: .contains(arg$125.getName()))) {
13711: processScope(arg$125, getScope);
13712: }
13713: checkEnterScope(arg$125);
13714:
13715: final Object retValue$2933 = Analyzer
13716: .cast(strt);
13717:
13718: checkExitScope(arg$125);
13719: matching_nodes
13720: .remove(matching_nodes.size() - 1);
13721: if ((null != arg$125)) {
13722: arg$125
13723: .setProperty("__type",
13724: retValue$2933);
13725: }
13726: return Analyzer.cast(retValue$2933);
13727: }
13728: if (TypicalSupport.match$2934(arg$125)) {
13729: matching_nodes.add(arg$125);
13730: if ((null != arg$125 && processScopeNodes
13731: .contains(arg$125.getName()))) {
13732: processScope(arg$125, getScope);
13733: }
13734: checkEnterScope(arg$125);
13735:
13736: final Object retValue$2937 = Analyzer
13737: .cast(strt);
13738:
13739: checkExitScope(arg$125);
13740: matching_nodes
13741: .remove(matching_nodes.size() - 1);
13742: if ((null != arg$125)) {
13743: arg$125
13744: .setProperty("__type",
13745: retValue$2937);
13746: }
13747: return Analyzer.cast(retValue$2937);
13748: }
13749: if (TypicalSupport.match$2938(arg$125)) {
13750: matching_nodes.add(arg$125);
13751: if ((null != arg$125 && processScopeNodes
13752: .contains(arg$125.getName()))) {
13753: processScope(arg$125, getScope);
13754: }
13755: checkEnterScope(arg$125);
13756:
13757: final Object retValue$2941 = Analyzer
13758: .cast(intt);
13759:
13760: checkExitScope(arg$125);
13761: matching_nodes
13762: .remove(matching_nodes.size() - 1);
13763: if ((null != arg$125)) {
13764: arg$125
13765: .setProperty("__type",
13766: retValue$2941);
13767: }
13768: return Analyzer.cast(retValue$2941);
13769: }
13770: if (TypicalSupport.match$2942(arg$125)) {
13771: matching_nodes.add(arg$125);
13772: if ((null != arg$125 && processScopeNodes
13773: .contains(arg$125.getName()))) {
13774: processScope(arg$125, getScope);
13775: }
13776: checkEnterScope(arg$125);
13777:
13778: final Object retValue$2945 = Analyzer
13779: .cast(intt);
13780:
13781: checkExitScope(arg$125);
13782: matching_nodes
13783: .remove(matching_nodes.size() - 1);
13784: if ((null != arg$125)) {
13785: arg$125
13786: .setProperty("__type",
13787: retValue$2945);
13788: }
13789: return Analyzer.cast(retValue$2945);
13790: }
13791: if (TypicalSupport.match$2946(arg$125)) {
13792: matching_nodes.add(arg$125);
13793: if ((null != arg$125 && processScopeNodes
13794: .contains(arg$125.getName()))) {
13795: processScope(arg$125, getScope);
13796: }
13797: checkEnterScope(arg$125);
13798:
13799: final Object retValue$2949 = Analyzer
13800: .cast(boolt);
13801:
13802: checkExitScope(arg$125);
13803: matching_nodes
13804: .remove(matching_nodes.size() - 1);
13805: if ((null != arg$125)) {
13806: arg$125
13807: .setProperty("__type",
13808: retValue$2949);
13809: }
13810: return Analyzer.cast(retValue$2949);
13811: }
13812: if (TypicalSupport.match$2950(arg$125)) {
13813: matching_nodes.add(arg$125);
13814: if ((null != arg$125 && processScopeNodes
13815: .contains(arg$125.getName()))) {
13816: processScope(arg$125, getScope);
13817: }
13818: checkEnterScope(arg$125);
13819:
13820: final Object retValue$2953 = Analyzer
13821: .cast(boolt);
13822:
13823: checkExitScope(arg$125);
13824: matching_nodes
13825: .remove(matching_nodes.size() - 1);
13826: if ((null != arg$125)) {
13827: arg$125
13828: .setProperty("__type",
13829: retValue$2953);
13830: }
13831: return Analyzer.cast(retValue$2953);
13832: }
13833: if (TypicalSupport.match$2954(arg$125)) {
13834: matching_nodes.add(arg$125);
13835: if ((null != arg$125 && processScopeNodes
13836: .contains(arg$125.getName()))) {
13837: processScope(arg$125, getScope);
13838: }
13839: checkEnterScope(arg$125);
13840:
13841: final Object retValue$2957 = Analyzer
13842: .cast(floatt);
13843:
13844: checkExitScope(arg$125);
13845: matching_nodes
13846: .remove(matching_nodes.size() - 1);
13847: if ((null != arg$125)) {
13848: arg$125
13849: .setProperty("__type",
13850: retValue$2957);
13851: }
13852: return Analyzer.cast(retValue$2957);
13853: }
13854: if (TypicalSupport.match$2958(arg$125)) {
13855: matching_nodes.add(arg$125);
13856: if ((null != arg$125 && processScopeNodes
13857: .contains(arg$125.getName()))) {
13858: processScope(arg$125, getScope);
13859: }
13860: checkEnterScope(arg$125);
13861:
13862: final Object retValue$2961 = Analyzer
13863: .cast(floatt);
13864:
13865: checkExitScope(arg$125);
13866: matching_nodes
13867: .remove(matching_nodes.size() - 1);
13868: if ((null != arg$125)) {
13869: arg$125
13870: .setProperty("__type",
13871: retValue$2961);
13872: }
13873: return Analyzer.cast(retValue$2961);
13874: }
13875: if (TypicalSupport.match$2962(arg$125)) {
13876: matching_nodes.add(arg$125);
13877: if ((null != arg$125 && processScopeNodes
13878: .contains(arg$125.getName()))) {
13879: processScope(arg$125, getScope);
13880: }
13881: checkEnterScope(arg$125);
13882:
13883: final Object retValue$2965 = Analyzer
13884: .cast(new TypicalTypes.Float32T());
13885:
13886: checkExitScope(arg$125);
13887: matching_nodes
13888: .remove(matching_nodes.size() - 1);
13889: if ((null != arg$125)) {
13890: arg$125
13891: .setProperty("__type",
13892: retValue$2965);
13893: }
13894: return Analyzer.cast(retValue$2965);
13895: }
13896: if (true) {
13897: matching_nodes.add(arg$125);
13898: if ((null != arg$125 && processScopeNodes
13899: .contains(arg$125.getName()))) {
13900: processScope(arg$125, getScope);
13901: }
13902: checkEnterScope(arg$125);
13903:
13904: final Object retValue$2968 = Analyzer
13905: .cast(null);
13906:
13907: checkExitScope(arg$125);
13908: matching_nodes
13909: .remove(matching_nodes.size() - 1);
13910: if ((null != arg$125)) {
13911: arg$125
13912: .setProperty("__type",
13913: retValue$2968);
13914: }
13915: return Analyzer.cast(retValue$2968);
13916: }
13917: return null;
13918: }
13919: }.apply();
13920: }
13921: };
13922:
13923: final Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> unify = new Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
13924: public TypicalTypes.raw_type<?> apply(
13925: final TypicalTypes.raw_type<?> t1,
13926: final TypicalTypes.raw_type<?> t2) {
13927: return (null == Primitives.or.apply(Primitives.isBottom
13928: .apply(t1), Primitives.isBottom.apply(t2)) ? null
13929: : Primitives.or.apply(
13930: Primitives.isBottom.apply(t1),
13931: Primitives.isBottom.apply(t2)) ? null
13932: : new Match<TypicalTypes.raw_type<?>>() {
13933: public TypicalTypes.raw_type<?> apply() {
13934: final Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> arg$2970 = Analyzer
13935: .cast(new Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>(
13936: t1, t2));
13937:
13938: if ((null == arg$2970)) {
13939: return null;
13940: }
13941: if (TypicalSupport
13942: .match$2971(arg$2970)) {
13943: return Analyzer.cast(t2);
13944: }
13945: if (TypicalSupport
13946: .match$2972(arg$2970)) {
13947: return Analyzer.cast(t1);
13948: }
13949: if (TypicalSupport
13950: .match$2973(arg$2970)) {
13951: return Analyzer.cast(t1);
13952: }
13953: if (TypicalSupport
13954: .match$2974(arg$2970)) {
13955: return Analyzer.cast(t1);
13956: }
13957: if (TypicalSupport
13958: .match$2975(arg$2970)) {
13959: return Analyzer.cast(t1);
13960: }
13961: if (TypicalSupport
13962: .match$2976(arg$2970)) {
13963: return Analyzer.cast(t1);
13964: }
13965: if (TypicalSupport
13966: .match$2977(arg$2970)) {
13967: return Analyzer.cast(t1);
13968: }
13969: if (TypicalSupport
13970: .match$2978(arg$2970)) {
13971: return Analyzer.cast(t1);
13972: }
13973: if (TypicalSupport
13974: .match$2979(arg$2970)) {
13975: return Analyzer
13976: .cast(new TypicalTypes.AnyT());
13977: }
13978: if (TypicalSupport
13979: .match$2980(arg$2970)) {
13980: return Analyzer
13981: .cast(new TypicalTypes.AnyT());
13982: }
13983: if (TypicalSupport
13984: .match$2981(arg$2970)) {
13985: return Analyzer
13986: .cast(new Let<TypicalTypes.raw_type<?>>() {
13987: final TypicalTypes.raw_type<?> res;
13988:
13989: {
13990: res = Analyzer
13991: .cast(unify
13992: .apply(
13993: t2,
13994: strt));
13995: }
13996:
13997: public TypicalTypes.raw_type<?> apply() {
13998: return Analyzer
13999: .cast(null == Primitives.or
14000: .apply(
14001: Primitives.isNotBottom
14002: .apply(res),
14003: Primitives.isNotBottom
14004: .apply(ensureNodeType
14005: .apply(t2)))
14006: || !Primitives.or
14007: .apply(
14008: Primitives.isNotBottom
14009: .apply(res),
14010: Primitives.isNotBottom
14011: .apply(ensureNodeType
14012: .apply(t2))) ? null
14013: : t1);
14014: }
14015: }.apply());
14016: }
14017: if (TypicalSupport
14018: .match$2982(arg$2970)) {
14019: return Analyzer.cast(unify
14020: .apply(t2, t1));
14021: }
14022: if (TypicalSupport
14023: .match$2983(arg$2970)) {
14024: return Analyzer
14025: .cast(null == Primitives.isNotBottom
14026: .apply(ensureNodeType
14027: .apply(t2))
14028: || !Primitives.isNotBottom
14029: .apply(ensureNodeType
14030: .apply(t2)) ? null
14031: : t1);
14032: }
14033: if (TypicalSupport
14034: .match$2984(arg$2970)) {
14035: return Analyzer
14036: .cast(null == Primitives.isNotBottom
14037: .apply(ensureNodeType
14038: .apply(t1))
14039: || !Primitives.isNotBottom
14040: .apply(ensureNodeType
14041: .apply(t1)) ? null
14042: : t2);
14043: }
14044: if (TypicalSupport
14045: .match$2985(arg$2970)) {
14046: final String s1 = Analyzer
14047: .cast(arg$2970.get1()
14048: .getTuple()
14049: .get1());
14050: final String s2 = Analyzer
14051: .cast(arg$2970.get2()
14052: .getTuple()
14053: .get1());
14054:
14055: return Analyzer
14056: .cast(null == Primitives.equal
14057: .apply(s1, s2)
14058: || !Primitives.equal
14059: .apply(
14060: s1,
14061: s2) ? null
14062: : t1);
14063: }
14064: if (TypicalSupport
14065: .match$2986(arg$2970)) {
14066: final String s = Analyzer
14067: .cast(arg$2970.get1()
14068: .getTuple()
14069: .get1());
14070:
14071: return Analyzer
14072: .cast(new Let<TypicalTypes.raw_type<?>>() {
14073: final TypicalTypes.raw_type<?> t;
14074: final TypicalTypes.raw_type<?> res;
14075:
14076: {
14077: t = Analyzer
14078: .cast(Analyzer
14079: .cast(lookup2
14080: .apply(
14081: GNode
14082: .create(
14083: "UserDefinedType",
14084: s),
14085: getNameSpace)));
14086: res = Analyzer
14087: .cast(unify
14088: .apply(
14089: t,
14090: t2));
14091: }
14092:
14093: public TypicalTypes.raw_type<?> apply() {
14094: return Analyzer
14095: .cast(null == Primitives.isNotBottom
14096: .apply(res)
14097: || !Primitives.isNotBottom
14098: .apply(res) ? null
14099: : t1);
14100: }
14101: }.apply());
14102: }
14103: if (TypicalSupport
14104: .match$2987(arg$2970)) {
14105: return Analyzer.cast(unify
14106: .apply(t2, t1));
14107: }
14108: if (TypicalSupport
14109: .match$2988(arg$2970)) {
14110: final String str1 = Analyzer
14111: .cast(arg$2970.get1()
14112: .getTuple()
14113: .get1());
14114: final String str2 = Analyzer
14115: .cast(arg$2970.get2()
14116: .getTuple()
14117: .get1());
14118:
14119: return Analyzer
14120: .cast(null == Primitives.equal
14121: .apply(str1,
14122: str2) ? null
14123: : Primitives.equal
14124: .apply(
14125: str1,
14126: str2) ? t1
14127: : new Let<TypicalTypes.raw_type<?>>() {
14128: final TypicalTypes.raw_type<?> t;
14129:
14130: {
14131: t = Analyzer
14132: .cast(Analyzer
14133: .cast(Primitives.get
14134: .apply(
14135: str1,
14136: hashTable)));
14137: }
14138:
14139: public TypicalTypes.raw_type<?> apply() {
14140: return Analyzer
14141: .cast(null == Primitives.isBottom
14142: .apply(t) ? null
14143: : Primitives.isBottom
14144: .apply(t) ? new Let<TypicalTypes.raw_type<?>>() {
14145: final TypicalTypes.raw_type<?> ty;
14146:
14147: {
14148: ty = Analyzer
14149: .cast(Analyzer
14150: .cast(Primitives.get
14151: .apply(
14152: str2,
14153: hashTable)));
14154: }
14155:
14156: public TypicalTypes.raw_type<?> apply() {
14157: return Analyzer
14158: .cast(null == Primitives.isBottom
14159: .apply(ty) ? null
14160: : Primitives.isBottom
14161: .apply(ty) ? new Let<TypicalTypes.raw_type<?>>() {
14162: {
14163: Analyzer
14164: .cast(Primitives.put
14165: .apply(
14166: str1,
14167: t2,
14168: hashTable));
14169: }
14170:
14171: public TypicalTypes.raw_type<?> apply() {
14172: return Analyzer
14173: .cast(t2);
14174: }
14175: }
14176: .apply()
14177: : unify
14178: .apply(
14179: t1,
14180: ty));
14181: }
14182: }
14183: .apply()
14184: : unify
14185: .apply(
14186: t,
14187: t2));
14188: }
14189: }
14190: .apply());
14191: }
14192: if (TypicalSupport
14193: .match$2989(arg$2970)) {
14194: final String str = Analyzer
14195: .cast(arg$2970.get1()
14196: .getTuple()
14197: .get1());
14198:
14199: return Analyzer
14200: .cast(new Let<TypicalTypes.raw_type<?>>() {
14201: final TypicalTypes.raw_type<?> t;
14202:
14203: {
14204: t = Analyzer
14205: .cast(Analyzer
14206: .cast(Primitives.get
14207: .apply(
14208: str,
14209: hashTable)));
14210: }
14211:
14212: public TypicalTypes.raw_type<?> apply() {
14213: return Analyzer
14214: .cast(null == Primitives.isBottom
14215: .apply(t) ? null
14216: : Primitives.isBottom
14217: .apply(t) ? new Let<TypicalTypes.raw_type<?>>() {
14218: {
14219: Analyzer
14220: .cast(Primitives.put
14221: .apply(
14222: str,
14223: t2,
14224: hashTable));
14225: }
14226:
14227: public TypicalTypes.raw_type<?> apply() {
14228: return Analyzer
14229: .cast(t2);
14230: }
14231: }
14232: .apply()
14233: : unify
14234: .apply(
14235: t,
14236: t2));
14237: }
14238: }.apply());
14239: }
14240: if (TypicalSupport
14241: .match$2990(arg$2970)) {
14242: return Analyzer.cast(unify
14243: .apply(t2, t1));
14244: }
14245: if (TypicalSupport
14246: .match$2991(arg$2970)) {
14247: final TypicalTypes.raw_type<?> tl1 = Analyzer
14248: .cast(arg$2970.get1()
14249: .getTuple()
14250: .get1());
14251: final TypicalTypes.raw_type<?> tr1 = Analyzer
14252: .cast(arg$2970.get1()
14253: .getTuple()
14254: .get2());
14255: final TypicalTypes.raw_type<?> tl2 = Analyzer
14256: .cast(arg$2970.get2()
14257: .getTuple()
14258: .get1());
14259: final TypicalTypes.raw_type<?> tr2 = Analyzer
14260: .cast(arg$2970.get2()
14261: .getTuple()
14262: .get2());
14263:
14264: return Analyzer
14265: .cast(new Let<TypicalTypes.raw_type<?>>() {
14266: final TypicalTypes.raw_type<?> tl;
14267: final TypicalTypes.raw_type<?> tr;
14268:
14269: {
14270: tl = Analyzer
14271: .cast(unify
14272: .apply(
14273: tl1,
14274: tl2));
14275: tr = Analyzer
14276: .cast(unify
14277: .apply(
14278: tr1,
14279: tr2));
14280: }
14281:
14282: public TypicalTypes.raw_type<?> apply() {
14283: return Analyzer
14284: .cast(null == Primitives.and
14285: .apply(
14286: Primitives.isNotBottom
14287: .apply(tl),
14288: Primitives.isNotBottom
14289: .apply(tr))
14290: || !Primitives.and
14291: .apply(
14292: Primitives.isNotBottom
14293: .apply(tl),
14294: Primitives.isNotBottom
14295: .apply(tr)) ? null
14296: : new TypicalTypes.PairOfType(
14297: tl,
14298: tr));
14299: }
14300: }.apply());
14301: }
14302: if (TypicalSupport
14303: .match$2992(arg$2970)) {
14304: final String s1 = Analyzer
14305: .cast(arg$2970.get1()
14306: .getTuple()
14307: .get1());
14308: final String s2 = Analyzer
14309: .cast(arg$2970.get1()
14310: .getTuple()
14311: .get2());
14312: final TypicalTypes.raw_type<?> ty1 = Analyzer
14313: .cast(arg$2970.get1()
14314: .getTuple()
14315: .get3());
14316: final String s3 = Analyzer
14317: .cast(arg$2970.get2()
14318: .getTuple()
14319: .get1());
14320: final String s4 = Analyzer
14321: .cast(arg$2970.get2()
14322: .getTuple()
14323: .get2());
14324: final TypicalTypes.raw_type<?> ty2 = Analyzer
14325: .cast(arg$2970.get2()
14326: .getTuple()
14327: .get3());
14328:
14329: return Analyzer
14330: .cast(null == Primitives.and
14331: .apply(
14332: Primitives.equal
14333: .apply(
14334: s1,
14335: s3),
14336: Primitives.equal
14337: .apply(
14338: s2,
14339: s4)) ? null
14340: : Primitives.and
14341: .apply(
14342: Primitives.equal
14343: .apply(
14344: s1,
14345: s3),
14346: Primitives.equal
14347: .apply(
14348: s2,
14349: s4)) ? t1
14350: : unify
14351: .apply(
14352: ty1,
14353: ty2));
14354: }
14355: if (TypicalSupport
14356: .match$2993(arg$2970)) {
14357: final TypicalTypes.raw_type<?> ty = Analyzer
14358: .cast(arg$2970.get1()
14359: .getTuple()
14360: .get3());
14361:
14362: return Analyzer.cast(unify
14363: .apply(ty, t2));
14364: }
14365: if (TypicalSupport
14366: .match$2994(arg$2970)) {
14367: final TypicalTypes.raw_type<?> ty = Analyzer
14368: .cast(arg$2970.get2()
14369: .getTuple()
14370: .get3());
14371:
14372: return Analyzer.cast(unify
14373: .apply(ty, t1));
14374: }
14375: if (TypicalSupport
14376: .match$2995(arg$2970)) {
14377: final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer
14378: .cast(arg$2970.get1()
14379: .getTuple()
14380: .get1());
14381: final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer
14382: .cast(arg$2970.get2()
14383: .getTuple()
14384: .get1());
14385:
14386: return Analyzer
14387: .cast(null == Primitives.equal
14388: .apply(
14389: Primitives.length
14390: .apply(tl1),
14391: Primitives.length
14392: .apply(tl2))
14393: || !Primitives.equal
14394: .apply(
14395: Primitives.length
14396: .apply(tl1),
14397: Primitives.length
14398: .apply(tl2)) ? null
14399: : new Let<TypicalTypes.raw_type<?>>() {
14400: final Pair<TypicalTypes.raw_type<?>> tl;
14401:
14402: {
14403: tl = Analyzer
14404: .cast(unifyTwoList
14405: .apply(
14406: tl1,
14407: tl2));
14408: }
14409:
14410: public TypicalTypes.raw_type<?> apply() {
14411: return Analyzer
14412: .cast(null == Primitives.isNotBottom
14413: .apply(tl)
14414: || !Primitives.isNotBottom
14415: .apply(tl) ? null
14416: : new TypicalTypes.RecordT(
14417: tl));
14418: }
14419: }.apply());
14420: }
14421: if (TypicalSupport
14422: .match$2996(arg$2970)) {
14423: final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer
14424: .cast(arg$2970.get1()
14425: .getTuple()
14426: .get1());
14427: final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer
14428: .cast(arg$2970.get2()
14429: .getTuple()
14430: .get1());
14431:
14432: return Analyzer
14433: .cast(null == Primitives.equal
14434: .apply(
14435: Primitives.length
14436: .apply(tl1),
14437: Primitives.length
14438: .apply(tl2))
14439: || !Primitives.equal
14440: .apply(
14441: Primitives.length
14442: .apply(tl1),
14443: Primitives.length
14444: .apply(tl2)) ? null
14445: : new Let<TypicalTypes.raw_type<?>>() {
14446: final Pair<TypicalTypes.raw_type<?>> tl;
14447:
14448: {
14449: tl = Analyzer
14450: .cast(unifyTwoList
14451: .apply(
14452: tl1,
14453: tl2));
14454: }
14455:
14456: public TypicalTypes.raw_type<?> apply() {
14457: return Analyzer
14458: .cast(null == Primitives.isNotBottom
14459: .apply(tl)
14460: || !Primitives.isNotBottom
14461: .apply(tl) ? null
14462: : new TypicalTypes.TupleT(
14463: tl));
14464: }
14465: }.apply());
14466: }
14467: if (TypicalSupport
14468: .match$2997(arg$2970)) {
14469: final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer
14470: .cast(arg$2970.get1()
14471: .getTuple()
14472: .get1());
14473: final String s1 = Analyzer
14474: .cast(arg$2970.get1()
14475: .getTuple()
14476: .get2());
14477: final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer
14478: .cast(arg$2970.get2()
14479: .getTuple()
14480: .get1());
14481: final String s2 = Analyzer
14482: .cast(arg$2970.get2()
14483: .getTuple()
14484: .get2());
14485:
14486: return Analyzer
14487: .cast(null == Primitives.and
14488: .apply(
14489: Primitives.equal
14490: .apply(
14491: Primitives.length
14492: .apply(tl1),
14493: Primitives.length
14494: .apply(tl2)),
14495: Primitives.equal
14496: .apply(
14497: s1,
14498: s2))
14499: || !Primitives.and
14500: .apply(
14501: Primitives.equal
14502: .apply(
14503: Primitives.length
14504: .apply(tl1),
14505: Primitives.length
14506: .apply(tl2)),
14507: Primitives.equal
14508: .apply(
14509: s1,
14510: s2)) ? null
14511: : new Let<TypicalTypes.raw_type<?>>() {
14512: final Pair<TypicalTypes.raw_type<?>> tl;
14513:
14514: {
14515: tl = Analyzer
14516: .cast(unifyTwoList
14517: .apply(
14518: tl1,
14519: tl2));
14520: }
14521:
14522: public TypicalTypes.raw_type<?> apply() {
14523: return Analyzer
14524: .cast(null == Primitives.isNotBottom
14525: .apply(tl)
14526: || !Primitives.isNotBottom
14527: .apply(tl) ? null
14528: : new TypicalTypes.ConstructedT(
14529: tl,
14530: s1));
14531: }
14532: }.apply());
14533: }
14534: if (TypicalSupport
14535: .match$2998(arg$2970)) {
14536: final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer
14537: .cast(arg$2970.get1()
14538: .getTuple()
14539: .get1());
14540:
14541: return Analyzer
14542: .cast(new Let<TypicalTypes.raw_type<?>>() {
14543: final TypicalTypes.raw_type<?> ty;
14544:
14545: {
14546: ty = Analyzer
14547: .cast(TypicalSupport.head$98
14548: .apply(tl1));
14549: }
14550:
14551: public TypicalTypes.raw_type<?> apply() {
14552: return Analyzer
14553: .cast(unify
14554: .apply(
14555: ty,
14556: t2));
14557: }
14558: }.apply());
14559: }
14560: if (TypicalSupport
14561: .match$2999(arg$2970)) {
14562: final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer
14563: .cast(arg$2970.get2()
14564: .getTuple()
14565: .get1());
14566:
14567: return Analyzer
14568: .cast(new Let<TypicalTypes.raw_type<?>>() {
14569: final TypicalTypes.raw_type<?> ty;
14570:
14571: {
14572: ty = Analyzer
14573: .cast(TypicalSupport.head$98
14574: .apply(tl2));
14575: }
14576:
14577: public TypicalTypes.raw_type<?> apply() {
14578: return Analyzer
14579: .cast(unify
14580: .apply(
14581: t1,
14582: ty));
14583: }
14584: }.apply());
14585: }
14586: if (TypicalSupport
14587: .match$3000(arg$2970)) {
14588: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
14589: .cast(arg$2970.get1()
14590: .getTuple()
14591: .get1());
14592:
14593: return Analyzer
14594: .cast(null == checkPolyUnify
14595: .apply(tl, t2)
14596: || !checkPolyUnify
14597: .apply(
14598: tl,
14599: t2) ? null
14600: : t1);
14601: }
14602: if (TypicalSupport
14603: .match$3001(arg$2970)) {
14604: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
14605: .cast(arg$2970.get2()
14606: .getTuple()
14607: .get1());
14608:
14609: return Analyzer
14610: .cast(null == checkPolyUnify
14611: .apply(tl, t1)
14612: || !checkPolyUnify
14613: .apply(
14614: tl,
14615: t1) ? null
14616: : t2);
14617: }
14618: if (TypicalSupport
14619: .match$3002(arg$2970)) {
14620: final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer
14621: .cast(arg$2970.get1()
14622: .getTuple()
14623: .get1());
14624: final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer
14625: .cast(arg$2970.get2()
14626: .getTuple()
14627: .get1());
14628:
14629: return Analyzer
14630: .cast(new Let<TypicalTypes.raw_type<?>>() {
14631: final TypicalTypes.raw_type<?> h1;
14632: final TypicalTypes.raw_type<?> h2;
14633:
14634: {
14635: h1 = Analyzer
14636: .cast(TypicalSupport.head$98
14637: .apply(tl1));
14638: h2 = Analyzer
14639: .cast(TypicalSupport.head$98
14640: .apply(tl2));
14641: }
14642:
14643: public TypicalTypes.raw_type<?> apply() {
14644: return Analyzer
14645: .cast(new Match<TypicalTypes.raw_type<?>>() {
14646: public TypicalTypes.raw_type<?> apply() {
14647: final Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> arg$3006 = Analyzer
14648: .cast(new Tuple.T2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>(
14649: h1,
14650: h2));
14651:
14652: if ((null == arg$3006)) {
14653: return null;
14654: }
14655: if (TypicalSupport
14656: .match$3004(arg$3006)) {
14657: final String p1 = Analyzer
14658: .cast(arg$3006
14659: .get1()
14660: .getTuple()
14661: .get1());
14662: final String p2 = Analyzer
14663: .cast(arg$3006
14664: .get2()
14665: .getTuple()
14666: .get1());
14667:
14668: return Analyzer
14669: .cast(null == Primitives.equal
14670: .apply(
14671: p1,
14672: p2)
14673: || !Primitives.equal
14674: .apply(
14675: p1,
14676: p2) ? null
14677: : null == Primitives.not
14678: .apply(hasTypeVariables
14679: .apply(p1)) ? null
14680: : Primitives.not
14681: .apply(hasTypeVariables
14682: .apply(p1)) ? new TypicalTypes.TypeName(
14683: p1)
14684: : new Let<TypicalTypes.raw_type<?>>() {
14685: final Pair<TypicalTypes.raw_type<?>> tl;
14686:
14687: {
14688: tl = Analyzer
14689: .cast(unifyTwoList
14690: .apply(
14691: tl1,
14692: tl2));
14693: }
14694:
14695: public TypicalTypes.raw_type<?> apply() {
14696: return Analyzer
14697: .cast(null == Primitives.isNotBottom
14698: .apply(tl)
14699: || !Primitives.isNotBottom
14700: .apply(tl) ? null
14701: : new TypicalTypes.VariantT(
14702: tl));
14703: }
14704: }
14705: .apply());
14706: }
14707: if (true) {
14708: return Analyzer
14709: .cast(null);
14710: }
14711: return null;
14712: }
14713: }
14714: .apply());
14715: }
14716: }.apply());
14717: }
14718: if (TypicalSupport
14719: .match$3009(arg$2970)) {
14720: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
14721: .cast(arg$2970.get1()
14722: .getTuple()
14723: .get1());
14724: final String p2 = Analyzer
14725: .cast(arg$2970.get2()
14726: .getTuple()
14727: .get1());
14728: final String s2 = Analyzer
14729: .cast(arg$2970.get2()
14730: .getTuple()
14731: .get2());
14732:
14733: return Analyzer
14734: .cast(new Let<TypicalTypes.raw_type<?>>() {
14735: final TypicalTypes.raw_type<?> h;
14736:
14737: {
14738: h = Analyzer
14739: .cast(TypicalSupport.head$98
14740: .apply(tl));
14741: }
14742:
14743: public TypicalTypes.raw_type<?> apply() {
14744: return Analyzer
14745: .cast(new Match<TypicalTypes.raw_type<?>>() {
14746: public TypicalTypes.raw_type<?> apply() {
14747: final TypicalTypes.raw_type<?> arg$3013 = Analyzer
14748: .cast(h);
14749:
14750: if ((null == arg$3013)) {
14751: return null;
14752: }
14753: if ((null != arg$3013))
14754: switch (arg$3013
14755: .tag()) {
14756: case ConstructorT:
14757: if (TypicalSupport
14758: .match$94(arg$3013)) {
14759: final String p1 = Analyzer
14760: .cast(arg$3013
14761: .getTuple()
14762: .get1());
14763:
14764: return Analyzer
14765: .cast(null == Primitives.equal
14766: .apply(
14767: p1,
14768: p2)
14769: || !Primitives.equal
14770: .apply(
14771: p1,
14772: p2) ? null
14773: : null == Primitives.not
14774: .apply(hasTypeVariables
14775: .apply(p1)) ? null
14776: : Primitives.not
14777: .apply(hasTypeVariables
14778: .apply(p1)) ? new TypicalTypes.TypeName(
14779: p1)
14780: : new Let<TypicalTypes.raw_type<?>>() {
14781: final TypicalTypes.raw_type<?> t;
14782: final TypicalTypes.raw_type<?> res;
14783:
14784: {
14785: t = Analyzer
14786: .cast(getConstructorType
14787: .apply(
14788: s2,
14789: tl));
14790: res = Analyzer
14791: .cast(unify
14792: .apply(
14793: t,
14794: t2));
14795: }
14796:
14797: public TypicalTypes.raw_type<?> apply() {
14798: return Analyzer
14799: .cast(null == Primitives.isNotBottom
14800: .apply(res)
14801: || !Primitives.isNotBottom
14802: .apply(res) ? null
14803: : t1);
14804: }
14805: }
14806: .apply());
14807: }
14808: break;
14809: default:
14810: break;
14811: }
14812: ;
14813: if (true) {
14814: return Analyzer
14815: .cast(null);
14816: }
14817: return null;
14818: }
14819: }
14820: .apply());
14821: }
14822: }.apply());
14823: }
14824: if (TypicalSupport
14825: .match$3016(arg$2970)) {
14826: return Analyzer.cast(unify
14827: .apply(t2, t1));
14828: }
14829: if (TypicalSupport
14830: .match$3004(arg$2970)) {
14831: final String s1 = Analyzer
14832: .cast(arg$2970.get1()
14833: .getTuple()
14834: .get1());
14835: final String s2 = Analyzer
14836: .cast(arg$2970.get1()
14837: .getTuple()
14838: .get2());
14839: final TypicalTypes.raw_type<?> ty1 = Analyzer
14840: .cast(arg$2970.get1()
14841: .getTuple()
14842: .get3());
14843: final String s3 = Analyzer
14844: .cast(arg$2970.get2()
14845: .getTuple()
14846: .get1());
14847: final String s4 = Analyzer
14848: .cast(arg$2970.get2()
14849: .getTuple()
14850: .get2());
14851: final TypicalTypes.raw_type<?> ty2 = Analyzer
14852: .cast(arg$2970.get2()
14853: .getTuple()
14854: .get3());
14855:
14856: return Analyzer
14857: .cast(null == Primitives.equal
14858: .apply(s1, s3)
14859: || !Primitives.equal
14860: .apply(
14861: s1,
14862: s3) ? null
14863: : null == Primitives.not
14864: .apply(hasTypeVariables
14865: .apply(s1)) ? null
14866: : Primitives.not
14867: .apply(hasTypeVariables
14868: .apply(s1)) ? (null == Primitives.equal
14869: .apply(
14870: s2,
14871: s4) ? null
14872: : Primitives.equal
14873: .apply(
14874: s2,
14875: s4) ? t1
14876: : new TypicalTypes.TypeName(
14877: s1))
14878: : null == Primitives.equal
14879: .apply(
14880: s2,
14881: s4) ? null
14882: : Primitives.equal
14883: .apply(
14884: s2,
14885: s4) ? new Let<TypicalTypes.raw_type<?>>() {
14886: final TypicalTypes.raw_type<?> res;
14887:
14888: {
14889: res = Analyzer
14890: .cast(unify
14891: .apply(
14892: ty1,
14893: ty2));
14894: }
14895:
14896: public TypicalTypes.raw_type<?> apply() {
14897: return Analyzer
14898: .cast(null == Primitives.isNotBottom
14899: .apply(res) ? null
14900: : Primitives.isNotBottom
14901: .apply(res) ? new TypicalTypes.ConstructorT(
14902: s1,
14903: s2,
14904: res)
14905: : null == Primitives.isBottom
14906: .apply(ty1) ? null
14907: : Primitives.isBottom
14908: .apply(ty1) ? t1
14909: : null);
14910: }
14911: }
14912: .apply()
14913: : new Let<TypicalTypes.raw_type<?>>() {
14914: final TypicalTypes.raw_type<?> t;
14915: final TypicalTypes.raw_type<?> res1;
14916: final TypicalTypes.raw_type<?> res2;
14917:
14918: {
14919: t = Analyzer
14920: .cast(copy
14921: .apply(new TypicalTypes.TypeName(
14922: s1)));
14923: res1 = Analyzer
14924: .cast(unify
14925: .apply(
14926: t,
14927: t1));
14928: res2 = Analyzer
14929: .cast(unify
14930: .apply(
14931: res1,
14932: t2));
14933: }
14934:
14935: public TypicalTypes.raw_type<?> apply() {
14936: return Analyzer
14937: .cast(res2);
14938: }
14939: }
14940: .apply());
14941: }
14942: if (TypicalSupport
14943: .match$3018(arg$2970)) {
14944: final Pair<TypicalTypes.raw_type<?>> tl1 = Analyzer
14945: .cast(arg$2970.get1()
14946: .getTuple()
14947: .get1());
14948: final TypicalTypes.raw_type<?> ret1 = Analyzer
14949: .cast(arg$2970.get1()
14950: .getTuple()
14951: .get2());
14952: final Pair<TypicalTypes.raw_type<?>> tl2 = Analyzer
14953: .cast(arg$2970.get2()
14954: .getTuple()
14955: .get1());
14956: final TypicalTypes.raw_type<?> ret2 = Analyzer
14957: .cast(arg$2970.get2()
14958: .getTuple()
14959: .get2());
14960:
14961: return Analyzer
14962: .cast(null == Primitives.equal
14963: .apply(
14964: Primitives.length
14965: .apply(tl1),
14966: Primitives.length
14967: .apply(tl2))
14968: || !Primitives.equal
14969: .apply(
14970: Primitives.length
14971: .apply(tl1),
14972: Primitives.length
14973: .apply(tl2)) ? null
14974: : new Let<TypicalTypes.raw_type<?>>() {
14975: final Pair<TypicalTypes.raw_type<?>> tl;
14976: final TypicalTypes.raw_type<?> ret;
14977:
14978: {
14979: tl = Analyzer
14980: .cast(unifyTwoList
14981: .apply(
14982: tl1,
14983: tl2));
14984: ret = Analyzer
14985: .cast(unify
14986: .apply(
14987: ret1,
14988: ret2));
14989: }
14990:
14991: public TypicalTypes.raw_type<?> apply() {
14992: return Analyzer
14993: .cast(null == Primitives.and
14994: .apply(
14995: Primitives.isNotBottom
14996: .apply(tl),
14997: Primitives.isNotBottom
14998: .apply(ret))
14999: || !Primitives.and
15000: .apply(
15001: Primitives.isNotBottom
15002: .apply(tl),
15003: Primitives.isNotBottom
15004: .apply(ret)) ? null
15005: : new TypicalTypes.FunctionT(
15006: tl,
15007: ret));
15008: }
15009: }.apply());
15010: }
15011: if (true) {
15012: return Analyzer.cast(null);
15013: }
15014: return null;
15015: }
15016: }.apply());
15017: }
15018: };
15019:
15020: final Function.F2<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>> unifyTwoList = new Function.F2<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>>() {
15021: public Pair<TypicalTypes.raw_type<?>> apply(
15022: final Pair<TypicalTypes.raw_type<?>> tl1,
15023: final Pair<TypicalTypes.raw_type<?>> tl2) {
15024: return new Match<Pair<TypicalTypes.raw_type<?>>>() {
15025: public Pair<TypicalTypes.raw_type<?>> apply() {
15026: final Pair<TypicalTypes.raw_type<?>> arg$3020 = Analyzer
15027: .cast(tl1);
15028:
15029: if ((null == arg$3020)) {
15030: return null;
15031: }
15032: if (TypicalSupport.match$122(arg$3020)) {
15033: return Analyzer.cast(Pair
15034: .<TypicalTypes.raw_type<?>> empty());
15035: }
15036: if (true) {
15037: final Pair<TypicalTypes.raw_type<?>> list$3022 = Analyzer
15038: .cast(Analyzer.cast(arg$3020));
15039: final TypicalTypes.raw_type<?> x = Analyzer
15040: .cast(Primitives.wrapHead(list$3022));
15041: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
15042: .cast(Primitives.wrapTail(list$3022));
15043:
15044: return Analyzer
15045: .cast(new Match<Pair<TypicalTypes.raw_type<?>>>() {
15046: public Pair<TypicalTypes.raw_type<?>> apply() {
15047: final Pair<TypicalTypes.raw_type<?>> arg$3026 = Analyzer
15048: .cast(tl2);
15049:
15050: if ((null == arg$3026)) {
15051: return null;
15052: }
15053: if (true) {
15054: final Pair<TypicalTypes.raw_type<?>> list$3027 = Analyzer
15055: .cast(Analyzer
15056: .cast(arg$3026));
15057: final TypicalTypes.raw_type<?> y = Analyzer
15058: .cast(Primitives
15059: .wrapHead(list$3027));
15060: final Pair<TypicalTypes.raw_type<?>> ys = Analyzer
15061: .cast(Primitives
15062: .wrapTail(list$3027));
15063:
15064: return Analyzer
15065: .cast(new Let<Pair<TypicalTypes.raw_type<?>>>() {
15066: final TypicalTypes.raw_type<?> t;
15067:
15068: {
15069: t = Analyzer
15070: .cast(unify
15071: .apply(
15072: x,
15073: y));
15074: }
15075:
15076: public Pair<TypicalTypes.raw_type<?>> apply() {
15077: return Analyzer
15078: .cast(null == Primitives.isNotBottom
15079: .apply(t)
15080: || !Primitives.isNotBottom
15081: .apply(t) ? null
15082: : Primitives
15083: .wrapCons(
15084: t,
15085: unifyTwoList
15086: .apply(
15087: xs,
15088: ys)));
15089: }
15090: }.apply());
15091: }
15092: if (true) {
15093: return Analyzer.cast(null);
15094: }
15095: return null;
15096: }
15097: }.apply());
15098: }
15099: return null;
15100: }
15101: }.apply();
15102: }
15103: };
15104:
15105: final Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>> getConstructorType = new Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>>() {
15106: public TypicalTypes.raw_type<?> apply(final String name,
15107: final Pair<TypicalTypes.raw_type<?>> tl) {
15108: return new Match<TypicalTypes.raw_type<?>>() {
15109: public TypicalTypes.raw_type<?> apply() {
15110: final Pair<TypicalTypes.raw_type<?>> arg$3030 = Analyzer
15111: .cast(tl);
15112:
15113: if ((null == arg$3030)) {
15114: return null;
15115: }
15116: if (TypicalSupport.match$122(arg$3030)) {
15117: return Analyzer.cast(null);
15118: }
15119: if (true) {
15120: final Pair<TypicalTypes.raw_type<?>> list$3032 = Analyzer
15121: .cast(Analyzer.cast(arg$3030));
15122: final TypicalTypes.raw_type<?> x = Analyzer
15123: .cast(Primitives.wrapHead(list$3032));
15124: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
15125: .cast(Primitives.wrapTail(list$3032));
15126:
15127: return Analyzer
15128: .cast(new Match<TypicalTypes.raw_type<?>>() {
15129: public TypicalTypes.raw_type<?> apply() {
15130: final TypicalTypes.raw_type<?> arg$3036 = Analyzer
15131: .cast(x);
15132:
15133: if ((null == arg$3036)) {
15134: return null;
15135: }
15136: if ((null != arg$3036))
15137: switch (arg$3036.tag()) {
15138: case ConstructorT:
15139: if (TypicalSupport
15140: .match$94(arg$3036)) {
15141: final String s = Analyzer
15142: .cast(arg$3036
15143: .getTuple()
15144: .get2());
15145:
15146: return Analyzer
15147: .cast(null == Primitives.equal
15148: .apply(
15149: name,
15150: s) ? null
15151: : Primitives.equal
15152: .apply(
15153: name,
15154: s) ? x
15155: : getConstructorType
15156: .apply(
15157: name,
15158: xs));
15159: }
15160: break;
15161: default:
15162: break;
15163: }
15164: ;
15165: if (true) {
15166: return Analyzer.cast(null);
15167: }
15168: return null;
15169: }
15170: }.apply());
15171: }
15172: return null;
15173: }
15174: }.apply();
15175: }
15176: };
15177:
15178: final Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>> getFieldType = new Function.F2<TypicalTypes.raw_type<?>, String, Pair<TypicalTypes.raw_type<?>>>() {
15179: public TypicalTypes.raw_type<?> apply(final String name,
15180: final Pair<TypicalTypes.raw_type<?>> tl) {
15181: return new Match<TypicalTypes.raw_type<?>>() {
15182: public TypicalTypes.raw_type<?> apply() {
15183: final Pair<TypicalTypes.raw_type<?>> arg$3040 = Analyzer
15184: .cast(tl);
15185:
15186: if ((null == arg$3040)) {
15187: return null;
15188: }
15189: if (TypicalSupport.match$122(arg$3040)) {
15190: return Analyzer.cast(null);
15191: }
15192: if (true) {
15193: final Pair<TypicalTypes.raw_type<?>> list$3042 = Analyzer
15194: .cast(Analyzer.cast(arg$3040));
15195: final TypicalTypes.raw_type<?> x = Analyzer
15196: .cast(Primitives.wrapHead(list$3042));
15197: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
15198: .cast(Primitives.wrapTail(list$3042));
15199:
15200: return Analyzer
15201: .cast(new Match<TypicalTypes.raw_type<?>>() {
15202: public TypicalTypes.raw_type<?> apply() {
15203: final TypicalTypes.raw_type<?> arg$3046 = Analyzer
15204: .cast(x);
15205:
15206: if ((null == arg$3046)) {
15207: return null;
15208: }
15209: if ((null != arg$3046))
15210: switch (arg$3046.tag()) {
15211: case FieldT:
15212: if (TypicalSupport
15213: .match$96(arg$3046)) {
15214: final String s = Analyzer
15215: .cast(arg$3046
15216: .getTuple()
15217: .get2());
15218:
15219: return Analyzer
15220: .cast(null == Primitives.equal
15221: .apply(
15222: name,
15223: s) ? null
15224: : Primitives.equal
15225: .apply(
15226: name,
15227: s) ? x
15228: : getFieldType
15229: .apply(
15230: name,
15231: xs));
15232: }
15233: break;
15234: default:
15235: break;
15236: }
15237: ;
15238: if (true) {
15239: return Analyzer.cast(null);
15240: }
15241: return null;
15242: }
15243: }.apply());
15244: }
15245: return null;
15246: }
15247: }.apply();
15248: }
15249: };
15250:
15251: final Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>> checkPolyUnify = new Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>>() {
15252: public Boolean apply(final Pair<TypicalTypes.raw_type<?>> tl,
15253: final TypicalTypes.raw_type<?> t) {
15254: return new Match<Boolean>() {
15255: public Boolean apply() {
15256: final Pair<TypicalTypes.raw_type<?>> arg$3050 = Analyzer
15257: .cast(tl);
15258:
15259: if ((null == arg$3050)) {
15260: return null;
15261: }
15262: if (TypicalSupport.match$122(arg$3050)) {
15263: return Analyzer.cast(Boolean.FALSE);
15264: }
15265: if (true) {
15266: final Pair<TypicalTypes.raw_type<?>> list$3052 = Analyzer
15267: .cast(Analyzer.cast(arg$3050));
15268: final TypicalTypes.raw_type<?> x = Analyzer
15269: .cast(Primitives.wrapHead(list$3052));
15270: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
15271: .cast(Primitives.wrapTail(list$3052));
15272:
15273: return Analyzer.cast(new Let<Boolean>() {
15274: final TypicalTypes.raw_type<?> res;
15275:
15276: {
15277: res = Analyzer.cast(unify.apply(x, t));
15278: }
15279:
15280: public Boolean apply() {
15281: return Analyzer
15282: .cast(null == Primitives.isNotBottom
15283: .apply(res) ? null
15284: : Primitives.isNotBottom
15285: .apply(res) ? Boolean.TRUE
15286: : checkPolyUnify
15287: .apply(
15288: xs,
15289: t));
15290: }
15291: }.apply());
15292: }
15293: return null;
15294: }
15295: }.apply();
15296: }
15297: };
15298:
15299: final Function.F1<Object, Node> scanNode = new Function.F1<Object, Node>() {
15300: public Object apply(final Node n) {
15301: return new Match<Object>() {
15302: public Object apply() {
15303: final Node arg$3054 = GNode.cast(n);
15304:
15305: if ((null == arg$3054)) {
15306: return null;
15307: }
15308: if (TypicalSupport.match$73(arg$3054)) {
15309: final String s = (arg$3054.size() > 0 ? arg$3054
15310: .getString(0)
15311: : null);
15312:
15313: matching_nodes.add(arg$3054);
15314: if ((null != arg$3054 && processScopeNodes
15315: .contains(arg$3054.getName()))) {
15316: processScope(arg$3054, getScope);
15317: }
15318: checkEnterScope(arg$3054);
15319:
15320: final Object retValue$3060 = Analyzer
15321: .cast(new Require<Object>() {
15322: public Object apply() {
15323: final Boolean var$3057 = Primitives.not
15324: .apply(isDefined
15325: .apply(n,
15326: getNameSpace));
15327:
15328: if ((null != var$3057 && !var$3057)) {
15329: showMessage(
15330: "error",
15331: Primitives.concat
15332: .apply(s,
15333: " has been previously defined"),
15334: n);
15335: }
15336: if ((null == var$3057)) {
15337: return null;
15338: }
15339: if (var$3057) {
15340: return new Let<Object>() {
15341: {
15342: redefine
15343: .apply(
15344: n,
15345: wildt,
15346: getNameSpace);
15347: define3
15348: .apply(
15349: GNode
15350: .create(
15351: "NameSpaceStructure",
15352: s,
15353: null,
15354: null),
15355: n,
15356: getNameSpace);
15357: }
15358:
15359: public Object apply() {
15360: return Analyzer
15361: .cast(null);
15362: }
15363: }.apply();
15364: }
15365: return null;
15366: }
15367: }.apply());
15368:
15369: checkExitScope(arg$3054);
15370: matching_nodes
15371: .remove(matching_nodes.size() - 1);
15372: return Analyzer.cast(retValue$3060);
15373: }
15374: if (TypicalSupport.match$21(arg$3054)) {
15375: final String s = (arg$3054.size() > 1 ? arg$3054
15376: .getString(1)
15377: : null);
15378:
15379: matching_nodes.add(arg$3054);
15380: if ((null != arg$3054 && processScopeNodes
15381: .contains(arg$3054.getName()))) {
15382: processScope(arg$3054, getScope);
15383: }
15384: checkEnterScope(arg$3054);
15385:
15386: final Object retValue$3066 = Analyzer
15387: .cast(new Require<Object>() {
15388: public Object apply() {
15389: final Boolean var$3063 = Primitives.not
15390: .apply(isDefined
15391: .apply(n,
15392: getNameSpace));
15393:
15394: if ((null != var$3063 && !var$3063)) {
15395: showMessage(
15396: "error",
15397: Primitives.concat
15398: .apply(
15399: Primitives.concat
15400: .apply(
15401: "type ",
15402: s),
15403: " has been previously defined"),
15404: n);
15405: }
15406: if ((null == var$3063)) {
15407: return null;
15408: }
15409: if (var$3063) {
15410: return new Let<Object>() {
15411: {
15412: redefine
15413: .apply(
15414: GNode
15415: .create(
15416: "NameSpaceStructure",
15417: s,
15418: null,
15419: null),
15420: n,
15421: getNameSpace);
15422: redefine
15423: .apply(
15424: n,
15425: wildt,
15426: getNameSpace);
15427: }
15428:
15429: public Object apply() {
15430: return Analyzer
15431: .cast(null);
15432: }
15433: }.apply();
15434: }
15435: return null;
15436: }
15437: }.apply());
15438:
15439: checkExitScope(arg$3054);
15440: matching_nodes
15441: .remove(matching_nodes.size() - 1);
15442: return Analyzer.cast(retValue$3066);
15443: }
15444: if (true) {
15445: matching_nodes.add(arg$3054);
15446: if ((null != arg$3054 && processScopeNodes
15447: .contains(arg$3054.getName()))) {
15448: processScope(arg$3054, getScope);
15449: }
15450: checkEnterScope(arg$3054);
15451:
15452: final Object retValue$3069 = Analyzer
15453: .cast(null);
15454:
15455: checkExitScope(arg$3054);
15456: matching_nodes
15457: .remove(matching_nodes.size() - 1);
15458: return Analyzer.cast(retValue$3069);
15459: }
15460: return null;
15461: }
15462: }.apply();
15463: }
15464: };
15465:
15466: final Function.F1<TypicalTypes.raw_type<?>, Node> analyzeTypeDefinition = new Function.F1<TypicalTypes.raw_type<?>, Node>() {
15467: public TypicalTypes.raw_type<?> apply(final Node n) {
15468: return new Match<TypicalTypes.raw_type<?>>() {
15469: public TypicalTypes.raw_type<?> apply() {
15470: final Node arg$3071 = GNode.cast(n);
15471:
15472: if ((null == arg$3071)) {
15473: return null;
15474: }
15475: if (TypicalSupport.match$3072(arg$3071)) {
15476: matching_nodes.add(arg$3071);
15477: if ((null != arg$3071 && processScopeNodes
15478: .contains(arg$3071.getName()))) {
15479: processScope(arg$3071, getScope);
15480: }
15481: checkEnterScope(arg$3071);
15482:
15483: final Object retValue$3075 = Analyzer
15484: .cast(analyze.apply(n));
15485:
15486: checkExitScope(arg$3071);
15487: matching_nodes
15488: .remove(matching_nodes.size() - 1);
15489: return Analyzer.cast(retValue$3075);
15490: }
15491: if (true) {
15492: matching_nodes.add(arg$3071);
15493: if ((null != arg$3071 && processScopeNodes
15494: .contains(arg$3071.getName()))) {
15495: processScope(arg$3071, getScope);
15496: }
15497: checkEnterScope(arg$3071);
15498:
15499: final Object retValue$3078 = Analyzer
15500: .cast(null);
15501:
15502: checkExitScope(arg$3071);
15503: matching_nodes
15504: .remove(matching_nodes.size() - 1);
15505: return Analyzer.cast(retValue$3078);
15506: }
15507: return null;
15508: }
15509: }.apply();
15510: }
15511: };
15512:
15513: final Function.F1<Pair<TypicalTypes.raw_type<?>>, Pair<Node>> processAttributes = new Function.F1<Pair<TypicalTypes.raw_type<?>>, Pair<Node>>() {
15514: public Pair<TypicalTypes.raw_type<?>> apply(final Pair<Node> nl) {
15515: return new Match<Pair<TypicalTypes.raw_type<?>>>() {
15516: public Pair<TypicalTypes.raw_type<?>> apply() {
15517: final Pair<Node> arg$3080 = Analyzer.cast(nl);
15518:
15519: if ((null == arg$3080)) {
15520: return null;
15521: }
15522: if (TypicalSupport.match$323(arg$3080)) {
15523: return Analyzer.cast(Pair
15524: .<TypicalTypes.raw_type<?>> empty());
15525: }
15526: if (true) {
15527: final Pair<Node> list$3082 = Analyzer
15528: .cast(Analyzer.cast(arg$3080));
15529: final Node x = GNode.cast(Primitives
15530: .wrapHead(list$3082));
15531: final Pair<Node> xs = Analyzer.cast(Primitives
15532: .wrapTail(list$3082));
15533:
15534: return Analyzer
15535: .cast(new Match<Pair<TypicalTypes.raw_type<?>>>() {
15536: public Pair<TypicalTypes.raw_type<?>> apply() {
15537: final Node arg$3096 = GNode
15538: .cast(x);
15539:
15540: if ((null == arg$3096)) {
15541: return null;
15542: }
15543: if (TypicalSupport
15544: .match$3084(arg$3096)) {
15545: matching_nodes
15546: .add(arg$3096);
15547: if ((null != arg$3096 && processScopeNodes
15548: .contains(arg$3096
15549: .getName()))) {
15550: processScope(arg$3096,
15551: getScope);
15552: }
15553: checkEnterScope(arg$3096);
15554:
15555: final Object retValue$3100 = Analyzer
15556: .cast(Primitives
15557: .wrapCons(
15558: analyze
15559: .apply(x),
15560: processAttributes
15561: .apply(xs)));
15562:
15563: checkExitScope(arg$3096);
15564: matching_nodes
15565: .remove(matching_nodes
15566: .size() - 1);
15567: return Analyzer
15568: .cast(retValue$3100);
15569: }
15570: if (TypicalSupport
15571: .match$3088(arg$3096)) {
15572: matching_nodes
15573: .add(arg$3096);
15574: if ((null != arg$3096 && processScopeNodes
15575: .contains(arg$3096
15576: .getName()))) {
15577: processScope(arg$3096,
15578: getScope);
15579: }
15580: checkEnterScope(arg$3096);
15581:
15582: final Object retValue$3104 = Analyzer
15583: .cast(Primitives
15584: .wrapCons(
15585: analyze
15586: .apply(x),
15587: processAttributes
15588: .apply(xs)));
15589:
15590: checkExitScope(arg$3096);
15591: matching_nodes
15592: .remove(matching_nodes
15593: .size() - 1);
15594: return Analyzer
15595: .cast(retValue$3104);
15596: }
15597: if (true) {
15598: matching_nodes
15599: .add(arg$3096);
15600: if ((null != arg$3096 && processScopeNodes
15601: .contains(arg$3096
15602: .getName()))) {
15603: processScope(arg$3096,
15604: getScope);
15605: }
15606: checkEnterScope(arg$3096);
15607:
15608: final Object retValue$3107 = Analyzer
15609: .cast(processAttributes
15610: .apply(xs));
15611:
15612: checkExitScope(arg$3096);
15613: matching_nodes
15614: .remove(matching_nodes
15615: .size() - 1);
15616: return Analyzer
15617: .cast(retValue$3107);
15618: }
15619: return null;
15620: }
15621: }.apply());
15622: }
15623: return null;
15624: }
15625: }.apply();
15626: }
15627: };
15628:
15629: final Function.F1<Object, Pair<Node>> processScopeSpace = new Function.F1<Object, Pair<Node>>() {
15630: public Object apply(final Pair<Node> nl) {
15631: return new Let<Object>() {
15632: final Pair<Node> noList;
15633: final Node n1;
15634: final Node n2;
15635: final Pair<TypicalTypes.call> calls1;
15636: final Pair<TypicalTypes.call> calls2;
15637: final Pair<String> callees1;
15638: final Pair<String> callees2;
15639:
15640: {
15641: noList = Analyzer.cast(getScopeSpace.apply(nl, Pair
15642: .<Node> empty()));
15643: n1 = Analyzer.cast(TypicalSupport.head$279
15644: .apply(noList));
15645: n2 = Analyzer.cast(TypicalSupport.head$279
15646: .apply(TypicalSupport.tail$278
15647: .apply(noList)));
15648: calls1 = Analyzer.cast(getCall.apply(n1, "", Pair
15649: .<TypicalTypes.call> empty()));
15650: calls2 = Analyzer.cast(getCall.apply(n2, "", Pair
15651: .<TypicalTypes.call> empty()));
15652: callees1 = Analyzer.cast(getCallees.apply(calls1,
15653: Pair.<String> empty()));
15654: callees2 = Analyzer.cast(getCallees.apply(calls2,
15655: Pair.<String> empty()));
15656: }
15657:
15658: public Object apply() {
15659: return Analyzer.cast(visitFunctions.apply(
15660: TypicalSupport.union$313.apply(callees1,
15661: callees2), nl));
15662: }
15663: }.apply();
15664: }
15665: };
15666:
15667: final Function.F2<Pair<Node>, Pair<Node>, Pair<Node>> getScopeSpace = new Function.F2<Pair<Node>, Pair<Node>, Pair<Node>>() {
15668: public Pair<Node> apply(final Pair<Node> nl,
15669: final Pair<Node> res) {
15670: return new Match<Pair<Node>>() {
15671: public Pair<Node> apply() {
15672: final Pair<Node> arg$3110 = Analyzer.cast(nl);
15673:
15674: if ((null == arg$3110)) {
15675: return null;
15676: }
15677: if (TypicalSupport.match$323(arg$3110)) {
15678: return Analyzer.cast(res);
15679: }
15680: if (true) {
15681: final Pair<Node> list$3112 = Analyzer
15682: .cast(Analyzer.cast(arg$3110));
15683: final Node x = GNode.cast(Primitives
15684: .wrapHead(list$3112));
15685: final Pair<Node> xs = Analyzer.cast(Primitives
15686: .wrapTail(list$3112));
15687:
15688: return Analyzer.cast(new Match<Pair<Node>>() {
15689: public Pair<Node> apply() {
15690: final Node arg$3126 = GNode.cast(x);
15691:
15692: if ((null == arg$3126)) {
15693: return null;
15694: }
15695: if (TypicalSupport.match$3114(arg$3126)) {
15696: matching_nodes.add(arg$3126);
15697: if ((null != arg$3126 && processScopeNodes
15698: .contains(arg$3126
15699: .getName()))) {
15700: processScope(arg$3126, getScope);
15701: }
15702: checkEnterScope(arg$3126);
15703:
15704: final Object retValue$3130 = Analyzer
15705: .cast(getScopeSpace
15706: .apply(
15707: xs,
15708: Primitives
15709: .wrapCons(
15710: x,
15711: res)));
15712:
15713: checkExitScope(arg$3126);
15714: matching_nodes
15715: .remove(matching_nodes
15716: .size() - 1);
15717: return Analyzer.cast(retValue$3130);
15718: }
15719: if (TypicalSupport.match$3118(arg$3126)) {
15720: matching_nodes.add(arg$3126);
15721: if ((null != arg$3126 && processScopeNodes
15722: .contains(arg$3126
15723: .getName()))) {
15724: processScope(arg$3126, getScope);
15725: }
15726: checkEnterScope(arg$3126);
15727:
15728: final Object retValue$3134 = Analyzer
15729: .cast(getScopeSpace
15730: .apply(
15731: xs,
15732: Primitives
15733: .wrapCons(
15734: x,
15735: res)));
15736:
15737: checkExitScope(arg$3126);
15738: matching_nodes
15739: .remove(matching_nodes
15740: .size() - 1);
15741: return Analyzer.cast(retValue$3134);
15742: }
15743: if (true) {
15744: matching_nodes.add(arg$3126);
15745: if ((null != arg$3126 && processScopeNodes
15746: .contains(arg$3126
15747: .getName()))) {
15748: processScope(arg$3126, getScope);
15749: }
15750: checkEnterScope(arg$3126);
15751:
15752: final Object retValue$3137 = Analyzer
15753: .cast(getScopeSpace.apply(
15754: xs, res));
15755:
15756: checkExitScope(arg$3126);
15757: matching_nodes
15758: .remove(matching_nodes
15759: .size() - 1);
15760: return Analyzer.cast(retValue$3137);
15761: }
15762: return null;
15763: }
15764: }.apply());
15765: }
15766: return null;
15767: }
15768: }.apply();
15769: }
15770: };
15771:
15772: final Function.F2<Object, Pair<String>, Pair<Node>> visitFunctions = new Function.F2<Object, Pair<String>, Pair<Node>>() {
15773: public Object apply(final Pair<String> strL, final Pair<Node> nl) {
15774: return new Match<Object>() {
15775: public Object apply() {
15776: final Pair<Node> arg$3140 = Analyzer.cast(nl);
15777:
15778: if ((null == arg$3140)) {
15779: return null;
15780: }
15781: if (TypicalSupport.match$323(arg$3140)) {
15782: return Analyzer.cast(null);
15783: }
15784: if (true) {
15785: final Pair<Node> list$3142 = Analyzer
15786: .cast(Analyzer.cast(arg$3140));
15787: final Node x = GNode.cast(Primitives
15788: .wrapHead(list$3142));
15789: final Pair<Node> xs = Analyzer.cast(Primitives
15790: .wrapTail(list$3142));
15791:
15792: return Analyzer.cast(new Match<Object>() {
15793: public Object apply() {
15794: final Node arg$3152 = GNode.cast(x);
15795:
15796: if ((null == arg$3152)) {
15797: return null;
15798: }
15799: if (TypicalSupport.match$73(arg$3152)) {
15800: final String s = (arg$3152.size() > 0 ? arg$3152
15801: .getString(0)
15802: : null);
15803:
15804: matching_nodes.add(arg$3152);
15805: if ((null != arg$3152 && processScopeNodes
15806: .contains(arg$3152
15807: .getName()))) {
15808: processScope(arg$3152, getScope);
15809: }
15810: checkEnterScope(arg$3152);
15811:
15812: final Object retValue$3156 = Analyzer
15813: .cast(null == Primitives.contains
15814: .apply(s, strL) ? null
15815: : Primitives.contains
15816: .apply(s,
15817: strL) ? new Let<Object>() {
15818: {
15819: analyze
15820: .apply(x);
15821: }
15822:
15823: public Object apply() {
15824: return Analyzer
15825: .cast(visitFunctions
15826: .apply(
15827: strL,
15828: xs));
15829: }
15830: }.apply()
15831: : visitFunctions
15832: .apply(
15833: strL,
15834: xs));
15835:
15836: checkExitScope(arg$3152);
15837: matching_nodes
15838: .remove(matching_nodes
15839: .size() - 1);
15840: return Analyzer.cast(retValue$3156);
15841: }
15842: if (true) {
15843: matching_nodes.add(arg$3152);
15844: if ((null != arg$3152 && processScopeNodes
15845: .contains(arg$3152
15846: .getName()))) {
15847: processScope(arg$3152, getScope);
15848: }
15849: checkEnterScope(arg$3152);
15850:
15851: final Object retValue$3159 = Analyzer
15852: .cast(visitFunctions.apply(
15853: strL, xs));
15854:
15855: checkExitScope(arg$3152);
15856: matching_nodes
15857: .remove(matching_nodes
15858: .size() - 1);
15859: return Analyzer.cast(retValue$3159);
15860: }
15861: return null;
15862: }
15863: }.apply());
15864: }
15865: return null;
15866: }
15867: }.apply();
15868: }
15869: };
15870:
15871: final Function.F2<Pair<String>, Pair<TypicalTypes.call>, Pair<String>> getCallees = new Function.F2<Pair<String>, Pair<TypicalTypes.call>, Pair<String>>() {
15872: public Pair<String> apply(final Pair<TypicalTypes.call> cl,
15873: final Pair<String> res) {
15874: return new Match<Pair<String>>() {
15875: public Pair<String> apply() {
15876: final Pair<TypicalTypes.call> arg$3162 = Analyzer
15877: .cast(cl);
15878:
15879: if ((null == arg$3162)) {
15880: return null;
15881: }
15882: if (TypicalSupport.match$3163(arg$3162)) {
15883: return Analyzer.cast(res);
15884: }
15885: if (true) {
15886: final Pair<TypicalTypes.call> list$3164 = Analyzer
15887: .cast(Analyzer.cast(arg$3162));
15888: final TypicalTypes.call x = Analyzer
15889: .cast(Primitives.wrapHead(list$3164));
15890: final Pair<TypicalTypes.call> xs = Analyzer
15891: .cast(Primitives.wrapTail(list$3164));
15892:
15893: return Analyzer.cast(new Let<Pair<String>>() {
15894: final String name;
15895:
15896: {
15897: name = Analyzer.cast(null == x ? null
15898: : x.callee);
15899: }
15900:
15901: public Pair<String> apply() {
15902: return Analyzer.cast(getCallees.apply(
15903: xs, Primitives.wrapCons(name,
15904: res)));
15905: }
15906: }.apply());
15907: }
15908: return null;
15909: }
15910: }.apply();
15911: }
15912: };
15913:
15914: final Function.F2<Pair<String>, String, Node> getTypeNames = new Function.F2<Pair<String>, String, Node>() {
15915: public Pair<String> apply(final String s, final Node n) {
15916: return (null == Primitives.isBottom.apply(n) ? null
15917: : Primitives.isBottom.apply(n) ? Pair
15918: .<String> empty()
15919: : new Match<Pair<String>>() {
15920: public Pair<String> apply() {
15921: final Node arg$3166 = GNode.cast(n);
15922:
15923: if ((null == arg$3166)) {
15924: return null;
15925: }
15926: if (TypicalSupport
15927: .match$192(arg$3166)) {
15928: final Pair<Node> nl = Analyzer
15929: .cast(Primitives
15930: .getChildren(
15931: arg$3166,
15932: 0,
15933: arg$3166
15934: .size()));
15935:
15936: matching_nodes.add(arg$3166);
15937: if ((null != arg$3166 && processScopeNodes
15938: .contains(arg$3166
15939: .getName()))) {
15940: processScope(arg$3166,
15941: getScope);
15942: }
15943: checkEnterScope(arg$3166);
15944:
15945: final Object retValue$3170 = Analyzer
15946: .cast(getTypeNameList
15947: .apply(s, nl));
15948:
15949: checkExitScope(arg$3166);
15950: matching_nodes
15951: .remove(matching_nodes
15952: .size() - 1);
15953: return Analyzer
15954: .cast(retValue$3170);
15955: }
15956: if (TypicalSupport
15957: .match$200(arg$3166)) {
15958: final Pair<Node> nl = Analyzer
15959: .cast(Primitives
15960: .getChildren(
15961: arg$3166,
15962: 0,
15963: arg$3166
15964: .size()));
15965:
15966: matching_nodes.add(arg$3166);
15967: if ((null != arg$3166 && processScopeNodes
15968: .contains(arg$3166
15969: .getName()))) {
15970: processScope(arg$3166,
15971: getScope);
15972: }
15973: checkEnterScope(arg$3166);
15974:
15975: final Object retValue$3174 = Analyzer
15976: .cast(getTypeNameList
15977: .apply(s, nl));
15978:
15979: checkExitScope(arg$3166);
15980: matching_nodes
15981: .remove(matching_nodes
15982: .size() - 1);
15983: return Analyzer
15984: .cast(retValue$3174);
15985: }
15986: if (TypicalSupport
15987: .match$2868(arg$3166)) {
15988: final Pair<Node> nl = Analyzer
15989: .cast(Primitives
15990: .getChildren(
15991: arg$3166,
15992: 0,
15993: arg$3166
15994: .size()));
15995:
15996: matching_nodes.add(arg$3166);
15997: if ((null != arg$3166 && processScopeNodes
15998: .contains(arg$3166
15999: .getName()))) {
16000: processScope(arg$3166,
16001: getScope);
16002: }
16003: checkEnterScope(arg$3166);
16004:
16005: final Object retValue$3178 = Analyzer
16006: .cast(getTypeNameList
16007: .apply(s, nl));
16008:
16009: checkExitScope(arg$3166);
16010: matching_nodes
16011: .remove(matching_nodes
16012: .size() - 1);
16013: return Analyzer
16014: .cast(retValue$3178);
16015: }
16016: if (TypicalSupport
16017: .match$2864(arg$3166)) {
16018: final Pair<Node> nl = Analyzer
16019: .cast(Primitives
16020: .getChildren(
16021: arg$3166,
16022: 0,
16023: arg$3166
16024: .size()));
16025:
16026: matching_nodes.add(arg$3166);
16027: if ((null != arg$3166 && processScopeNodes
16028: .contains(arg$3166
16029: .getName()))) {
16030: processScope(arg$3166,
16031: getScope);
16032: }
16033: checkEnterScope(arg$3166);
16034:
16035: final Object retValue$3182 = Analyzer
16036: .cast(getTypeNameList
16037: .apply(s, nl));
16038:
16039: checkExitScope(arg$3166);
16040: matching_nodes
16041: .remove(matching_nodes
16042: .size() - 1);
16043: return Analyzer
16044: .cast(retValue$3182);
16045: }
16046: if (TypicalSupport
16047: .match$13(arg$3166)) {
16048: final Node no = (arg$3166
16049: .size() > 1 ? arg$3166
16050: .getGeneric(1) : null);
16051:
16052: matching_nodes.add(arg$3166);
16053: if ((null != arg$3166 && processScopeNodes
16054: .contains(arg$3166
16055: .getName()))) {
16056: processScope(arg$3166,
16057: getScope);
16058: }
16059: checkEnterScope(arg$3166);
16060:
16061: final Object retValue$3186 = Analyzer
16062: .cast(getTypeNames
16063: .apply(s, no));
16064:
16065: checkExitScope(arg$3166);
16066: matching_nodes
16067: .remove(matching_nodes
16068: .size() - 1);
16069: return Analyzer
16070: .cast(retValue$3186);
16071: }
16072: if (TypicalSupport
16073: .match$29(arg$3166)) {
16074: final String str = (arg$3166
16075: .size() > 0 ? arg$3166
16076: .getString(0) : null);
16077:
16078: matching_nodes.add(arg$3166);
16079: if ((null != arg$3166 && processScopeNodes
16080: .contains(arg$3166
16081: .getName()))) {
16082: processScope(arg$3166,
16083: getScope);
16084: }
16085: checkEnterScope(arg$3166);
16086:
16087: final Object retValue$3190 = Analyzer
16088: .cast(null == Primitives.or
16089: .apply(
16090: Primitives.equal
16091: .apply(
16092: s,
16093: str),
16094: Primitives.not
16095: .apply(isDefined
16096: .apply(
16097: GNode
16098: .create(
16099: "UserDefinedType",
16100: str),
16101: getNameSpace))) ? null
16102: : Primitives.or
16103: .apply(
16104: Primitives.equal
16105: .apply(
16106: s,
16107: str),
16108: Primitives.not
16109: .apply(isDefined
16110: .apply(
16111: GNode
16112: .create(
16113: "UserDefinedType",
16114: str),
16115: getNameSpace))) ? Pair
16116: .<String> empty()
16117: : new Pair<String>(
16118: str));
16119:
16120: checkExitScope(arg$3166);
16121: matching_nodes
16122: .remove(matching_nodes
16123: .size() - 1);
16124: return Analyzer
16125: .cast(retValue$3190);
16126: }
16127: if (TypicalSupport
16128: .match$17(arg$3166)) {
16129: final String str = (arg$3166
16130: .size() > 1 ? arg$3166
16131: .getString(1) : null);
16132:
16133: matching_nodes.add(arg$3166);
16134: if ((null != arg$3166 && processScopeNodes
16135: .contains(arg$3166
16136: .getName()))) {
16137: processScope(arg$3166,
16138: getScope);
16139: }
16140: checkEnterScope(arg$3166);
16141:
16142: final Object retValue$3194 = Analyzer
16143: .cast(null == isDefined
16144: .apply(
16145: GNode
16146: .create(
16147: "UserDefinedType",
16148: str),
16149: getNameSpace) ? null
16150: : isDefined
16151: .apply(
16152: GNode
16153: .create(
16154: "UserDefinedType",
16155: str),
16156: getNameSpace) ? new Let<Pair<String>>() {
16157: final Node no;
16158:
16159: {
16160: no = Analyzer
16161: .cast(Analyzer
16162: .cast(lookup2
16163: .apply(
16164: GNode
16165: .create(
16166: "NameSpaceStructure",
16167: str,
16168: null,
16169: null),
16170: getNameSpace)));
16171: Primitives.annotate
16172: .apply(
16173: no,
16174: "monomorphic",
16175: wildt);
16176: }
16177:
16178: public Pair<String> apply() {
16179: return Analyzer
16180: .cast(null == Primitives.equal
16181: .apply(
16182: s,
16183: str) ? null
16184: : Primitives.equal
16185: .apply(
16186: s,
16187: str) ? Pair
16188: .<String> empty()
16189: : new Pair<String>(
16190: str));
16191: }
16192: }.apply()
16193: : Pair
16194: .<String> empty());
16195:
16196: checkExitScope(arg$3166);
16197: matching_nodes
16198: .remove(matching_nodes
16199: .size() - 1);
16200: return Analyzer
16201: .cast(retValue$3194);
16202: }
16203: if (TypicalSupport
16204: .match$25(arg$3166)) {
16205: final Node tn = (arg$3166
16206: .size() > 0 ? arg$3166
16207: .getGeneric(0) : null);
16208:
16209: matching_nodes.add(arg$3166);
16210: if ((null != arg$3166 && processScopeNodes
16211: .contains(arg$3166
16212: .getName()))) {
16213: processScope(arg$3166,
16214: getScope);
16215: }
16216: checkEnterScope(arg$3166);
16217:
16218: final Object retValue$3198 = Analyzer
16219: .cast(getTypeNames
16220: .apply(s, tn));
16221:
16222: checkExitScope(arg$3166);
16223: matching_nodes
16224: .remove(matching_nodes
16225: .size() - 1);
16226: return Analyzer
16227: .cast(retValue$3198);
16228: }
16229: if (true) {
16230: matching_nodes.add(arg$3166);
16231: if ((null != arg$3166 && processScopeNodes
16232: .contains(arg$3166
16233: .getName()))) {
16234: processScope(arg$3166,
16235: getScope);
16236: }
16237: checkEnterScope(arg$3166);
16238:
16239: final Object retValue$3201 = Analyzer
16240: .cast(Pair
16241: .<String> empty());
16242:
16243: checkExitScope(arg$3166);
16244: matching_nodes
16245: .remove(matching_nodes
16246: .size() - 1);
16247: return Analyzer
16248: .cast(retValue$3201);
16249: }
16250: return null;
16251: }
16252: }.apply());
16253: }
16254: };
16255:
16256: final Function.F2<Pair<String>, String, Pair<Node>> getTypeNameList = new Function.F2<Pair<String>, String, Pair<Node>>() {
16257: public Pair<String> apply(final String s, final Pair<Node> nl) {
16258: return new Match<Pair<String>>() {
16259: public Pair<String> apply() {
16260: final Pair<Node> arg$3203 = Analyzer.cast(nl);
16261:
16262: if ((null == arg$3203)) {
16263: return null;
16264: }
16265: if (TypicalSupport.match$323(arg$3203)) {
16266: return Analyzer.cast(Pair.<String> empty());
16267: }
16268: if (true) {
16269: final Pair<Node> list$3205 = Analyzer
16270: .cast(Analyzer.cast(arg$3203));
16271: final Node x = GNode.cast(Primitives
16272: .wrapHead(list$3205));
16273: final Pair<Node> xs = Analyzer.cast(Primitives
16274: .wrapTail(list$3205));
16275:
16276: return Analyzer.cast(TypicalSupport.union$313
16277: .apply(getTypeNames.apply(s, x),
16278: getTypeNameList.apply(s, xs)));
16279: }
16280: return null;
16281: }
16282: }.apply();
16283: }
16284: };
16285:
16286: final Function.F2<Pair<String>, String, Pair<Node>> getReachableTypes = new Function.F2<Pair<String>, String, Pair<Node>>() {
16287: public Pair<String> apply(final String s, final Pair<Node> nl) {
16288: return new Match<Pair<String>>() {
16289: public Pair<String> apply() {
16290: final Pair<Node> arg$3207 = Analyzer.cast(nl);
16291:
16292: if ((null == arg$3207)) {
16293: return null;
16294: }
16295: if (TypicalSupport.match$323(arg$3207)) {
16296: return Analyzer.cast(null);
16297: }
16298: if (true) {
16299: final Pair<Node> list$3209 = Analyzer
16300: .cast(Analyzer.cast(arg$3207));
16301: final Node x = GNode.cast(Primitives
16302: .wrapHead(list$3209));
16303: final Pair<Node> xs = Analyzer.cast(Primitives
16304: .wrapTail(list$3209));
16305:
16306: return Analyzer.cast(new Match<Pair<String>>() {
16307: public Pair<String> apply() {
16308: final Node arg$3219 = GNode.cast(x);
16309:
16310: if ((null == arg$3219)) {
16311: return null;
16312: }
16313: if (TypicalSupport.match$21(arg$3219)) {
16314: final String str = (arg$3219.size() > 1 ? arg$3219
16315: .getString(1)
16316: : null);
16317: final Node n = (arg$3219.size() > 2 ? arg$3219
16318: .getGeneric(2)
16319: : null);
16320:
16321: matching_nodes.add(arg$3219);
16322: if ((null != arg$3219 && processScopeNodes
16323: .contains(arg$3219
16324: .getName()))) {
16325: processScope(arg$3219, getScope);
16326: }
16327: checkEnterScope(arg$3219);
16328:
16329: final Object retValue$3223 = Analyzer
16330: .cast(null == Primitives.equal
16331: .apply(str, s) ? null
16332: : Primitives.equal
16333: .apply(str,
16334: s) ? new Let<Pair<String>>() {
16335: {
16336: Primitives.annotate
16337: .apply(
16338: x,
16339: "__node",
16340: wildt);
16341: }
16342:
16343: public Pair<String> apply() {
16344: return Analyzer
16345: .cast(getTypeNames
16346: .apply(
16347: s,
16348: n));
16349: }
16350: }.apply()
16351: : getReachableTypes
16352: .apply(
16353: s,
16354: xs));
16355:
16356: checkExitScope(arg$3219);
16357: matching_nodes
16358: .remove(matching_nodes
16359: .size() - 1);
16360: return Analyzer.cast(retValue$3223);
16361: }
16362: if (true) {
16363: matching_nodes.add(arg$3219);
16364: if ((null != arg$3219 && processScopeNodes
16365: .contains(arg$3219
16366: .getName()))) {
16367: processScope(arg$3219, getScope);
16368: }
16369: checkEnterScope(arg$3219);
16370:
16371: final Object retValue$3226 = Analyzer
16372: .cast(getReachableTypes
16373: .apply(s, xs));
16374:
16375: checkExitScope(arg$3219);
16376: matching_nodes
16377: .remove(matching_nodes
16378: .size() - 1);
16379: return Analyzer.cast(retValue$3226);
16380: }
16381: return null;
16382: }
16383: }.apply());
16384: }
16385: return null;
16386: }
16387: }.apply();
16388: }
16389: };
16390:
16391: final Function.F1<Pair<String>, Pair<Node>> getNodeTypes = new Function.F1<Pair<String>, Pair<Node>>() {
16392: public Pair<String> apply(final Pair<Node> nl) {
16393: return new Let<Pair<String>>() {
16394: final Pair<String> strL;
16395:
16396: {
16397: strL = Analyzer.cast(getReachableTypes.apply(
16398: nodeType, nl));
16399: }
16400:
16401: public Pair<String> apply() {
16402: return Analyzer.cast(null == Primitives.isBottom
16403: .apply(strL) ? null : Primitives.isBottom
16404: .apply(strL) ? error(
16405: "Can not find the root node definition",
16406: null) : processNodeType.apply(strL, nl,
16407: new Pair<String>(nodeType)));
16408: }
16409: }.apply();
16410: }
16411: };
16412:
16413: final Function.F3<Pair<String>, Pair<String>, Pair<Node>, Pair<String>> processNodeType = new Function.F3<Pair<String>, Pair<String>, Pair<Node>, Pair<String>>() {
16414: public Pair<String> apply(final Pair<String> strL,
16415: final Pair<Node> nl, final Pair<String> resL) {
16416: return new Match<Pair<String>>() {
16417: public Pair<String> apply() {
16418: final Pair<String> arg$3229 = Analyzer.cast(strL);
16419:
16420: if ((null == arg$3229)) {
16421: return null;
16422: }
16423: if (TypicalSupport.match$3230(arg$3229)) {
16424: return Analyzer.cast(resL);
16425: }
16426: if (true) {
16427: final Pair<String> list$3231 = Analyzer
16428: .cast(Analyzer.cast(arg$3229));
16429: final String x = Analyzer.cast(Primitives
16430: .wrapHead(list$3231));
16431: final Pair<String> xs = Analyzer
16432: .cast(Primitives.wrapTail(list$3231));
16433:
16434: return Analyzer
16435: .cast(null == Primitives.contains
16436: .apply(x, resL) ? null
16437: : Primitives.contains.apply(x,
16438: resL) ? processNodeType
16439: .apply(xs, nl, resL)
16440: : new Let<Pair<String>>() {
16441: final Pair<String> l;
16442: final Pair<String> newStrL;
16443:
16444: {
16445: l = Analyzer
16446: .cast(getReachableTypes
16447: .apply(
16448: x,
16449: nl));
16450: newStrL = Analyzer
16451: .cast(unionAppend
16452: .apply(
16453: xs,
16454: l));
16455: }
16456:
16457: public Pair<String> apply() {
16458: return Analyzer
16459: .cast(processNodeType
16460: .apply(
16461: newStrL,
16462: nl,
16463: Primitives
16464: .wrapCons(
16465: x,
16466: resL)));
16467: }
16468: }.apply());
16469: }
16470: return null;
16471: }
16472: }.apply();
16473: }
16474: };
16475:
16476: final Function.F2<Pair<String>, Pair<String>, Pair<String>> unionAppend = new Function.F2<Pair<String>, Pair<String>, Pair<String>>() {
16477: public Pair<String> apply(final Pair<String> l1,
16478: final Pair<String> l2) {
16479: return new Match<Pair<String>>() {
16480: public Pair<String> apply() {
16481: final Pair<String> arg$3233 = Analyzer.cast(l2);
16482:
16483: if ((null == arg$3233)) {
16484: return null;
16485: }
16486: if (TypicalSupport.match$3230(arg$3233)) {
16487: return Analyzer.cast(l1);
16488: }
16489: if (true) {
16490: final Pair<String> list$3235 = Analyzer
16491: .cast(Analyzer.cast(arg$3233));
16492: final String x = Analyzer.cast(Primitives
16493: .wrapHead(list$3235));
16494: final Pair<String> xs = Analyzer
16495: .cast(Primitives.wrapTail(list$3235));
16496:
16497: return Analyzer
16498: .cast(null == Primitives.contains
16499: .apply(x, l1) ? null
16500: : Primitives.contains.apply(x,
16501: l1) ? unionAppend
16502: .apply(l1, xs)
16503: : new Let<Pair<String>>() {
16504: final Pair<String> l;
16505:
16506: {
16507: l = Analyzer
16508: .cast(TypicalSupport.append$297
16509: .apply(
16510: l1,
16511: new Pair<String>(
16512: x)));
16513: }
16514:
16515: public Pair<String> apply() {
16516: return Analyzer
16517: .cast(unionAppend
16518: .apply(
16519: l,
16520: xs));
16521: }
16522: }.apply());
16523: }
16524: return null;
16525: }
16526: }.apply();
16527: }
16528: };
16529:
16530: final Function.F1<Boolean, String> reachableFromNode = new Function.F1<Boolean, String>() {
16531: public Boolean apply(final String s) {
16532: return (null == Primitives.equal.apply(nodeType, s) ? null
16533: : Primitives.equal.apply(nodeType, s) ? Boolean.TRUE
16534: : null == isDefined.apply(GNode
16535: .create("NameSpaceStructure", s,
16536: null, null), getNameSpace) ? null
16537: : isDefined.apply(GNode.create(
16538: "NameSpaceStructure", s,
16539: null, null), getNameSpace) ? new Let<Boolean>() {
16540: final Node nod;
16541:
16542: {
16543: nod = Analyzer
16544: .cast(Analyzer
16545: .cast(lookup2
16546: .apply(
16547: GNode
16548: .create(
16549: "NameSpaceStructure",
16550: s,
16551: null,
16552: null),
16553: getNameSpace)));
16554: }
16555:
16556: public Boolean apply() {
16557: return Analyzer
16558: .cast(Primitives.hasAnnotation
16559: .apply(nod,
16560: "__node"));
16561: }
16562: }.apply()
16563: : Boolean.FALSE);
16564: }
16565: };
16566:
16567: final Function.F2<Boolean, Node, Node> checkMonomorphic = new Function.F2<Boolean, Node, Node>() {
16568: public Boolean apply(final Node n, final Node dec) {
16569: return (null == Primitives.not
16570: .apply(Primitives.hasAnnotation.apply(n,
16571: "monomorphic")) ? null : Primitives.not
16572: .apply(Primitives.hasAnnotation.apply(n,
16573: "monomorphic")) ? Boolean.TRUE
16574: : new Match<Boolean>() {
16575: public Boolean apply() {
16576: final Node arg$3237 = GNode.cast(dec);
16577:
16578: if ((null == arg$3237)) {
16579: return null;
16580: }
16581: if (TypicalSupport.match$3238(arg$3237)) {
16582: matching_nodes.add(arg$3237);
16583: if ((null != arg$3237 && processScopeNodes
16584: .contains(arg$3237.getName()))) {
16585: processScope(arg$3237, getScope);
16586: }
16587: checkEnterScope(arg$3237);
16588:
16589: final Object retValue$3241 = Analyzer
16590: .cast(Boolean.FALSE);
16591:
16592: checkExitScope(arg$3237);
16593: matching_nodes.remove(matching_nodes
16594: .size() - 1);
16595: return Analyzer.cast(retValue$3241);
16596: }
16597: if (true) {
16598: matching_nodes.add(arg$3237);
16599: if ((null != arg$3237 && processScopeNodes
16600: .contains(arg$3237.getName()))) {
16601: processScope(arg$3237, getScope);
16602: }
16603: checkEnterScope(arg$3237);
16604:
16605: final Object retValue$3244 = Analyzer
16606: .cast(Boolean.TRUE);
16607:
16608: checkExitScope(arg$3237);
16609: matching_nodes.remove(matching_nodes
16610: .size() - 1);
16611: return Analyzer.cast(retValue$3244);
16612: }
16613: return null;
16614: }
16615: }.apply());
16616: }
16617: };
16618:
16619: final Function.F2<Pair<TypicalTypes.entry>, Pair<Node>, Pair<TypicalTypes.entry>> analyzeBindings = new Function.F2<Pair<TypicalTypes.entry>, Pair<Node>, Pair<TypicalTypes.entry>>() {
16620: public Pair<TypicalTypes.entry> apply(final Pair<Node> nl,
16621: final Pair<TypicalTypes.entry> enList) {
16622: return new Match<Pair<TypicalTypes.entry>>() {
16623: public Pair<TypicalTypes.entry> apply() {
16624: final Pair<Node> arg$3246 = Analyzer.cast(nl);
16625:
16626: if ((null == arg$3246)) {
16627: return null;
16628: }
16629: if (TypicalSupport.match$323(arg$3246)) {
16630: return Analyzer.cast(enList);
16631: }
16632: if (true) {
16633: final Pair<Node> list$3248 = Analyzer
16634: .cast(Analyzer.cast(arg$3246));
16635: final Node x = GNode.cast(Primitives
16636: .wrapHead(list$3248));
16637: final Pair<Node> xs = Analyzer.cast(Primitives
16638: .wrapTail(list$3248));
16639:
16640: return Analyzer
16641: .cast(new Let<Pair<TypicalTypes.entry>>() {
16642: final TypicalTypes.entry en;
16643:
16644: {
16645: en = Analyzer
16646: .cast(analyzeBinding
16647: .apply(x));
16648: }
16649:
16650: public Pair<TypicalTypes.entry> apply() {
16651: return Analyzer
16652: .cast(null == Primitives.isNotBottom
16653: .apply(en) ? null
16654: : Primitives.isNotBottom
16655: .apply(en) ? (null == Primitives.isBottom
16656: .apply(null == en ? null
16657: : en.entryName) ? null
16658: : Primitives.isBottom
16659: .apply(null == en ? null
16660: : en.entryName) ? analyzeBindings
16661: .apply(
16662: xs,
16663: enList)
16664: : null == Primitives.not
16665: .apply(checkDefined
16666: .apply(
16667: null == en ? null
16668: : en.entryName,
16669: enList)) ? null
16670: : Primitives.not
16671: .apply(checkDefined
16672: .apply(
16673: null == en ? null
16674: : en.entryName,
16675: enList)) ? analyzeBindings
16676: .apply(
16677: xs,
16678: TypicalSupport.append$3249
16679: .apply(
16680: enList,
16681: new Pair<TypicalTypes.entry>(
16682: en)))
16683: : new Let<Pair<TypicalTypes.entry>>() {
16684: {
16685: error(
16686: Primitives.concat
16687: .apply(
16688: null == en ? null
16689: : en.entryName,
16690: " has been previously defined"),
16691: x);
16692: }
16693:
16694: public Pair<TypicalTypes.entry> apply() {
16695: return Analyzer
16696: .cast(analyzeBindings
16697: .apply(
16698: xs,
16699: TypicalSupport.append$3249
16700: .apply(
16701: enList,
16702: null)));
16703: }
16704: }
16705: .apply())
16706: : analyzeBindings
16707: .apply(
16708: xs,
16709: TypicalSupport.append$3249
16710: .apply(
16711: enList,
16712: new Pair<TypicalTypes.entry>(
16713: en))));
16714: }
16715: }.apply());
16716: }
16717: return null;
16718: }
16719: }.apply();
16720: }
16721: };
16722:
16723: final Function.F2<Boolean, String, Pair<TypicalTypes.entry>> checkDefined = new Function.F2<Boolean, String, Pair<TypicalTypes.entry>>() {
16724: public Boolean apply(final String name,
16725: final Pair<TypicalTypes.entry> enList) {
16726: return new Match<Boolean>() {
16727: public Boolean apply() {
16728: final Pair<TypicalTypes.entry> arg$3251 = Analyzer
16729: .cast(enList);
16730:
16731: if ((null == arg$3251)) {
16732: return null;
16733: }
16734: if (TypicalSupport.match$3252(arg$3251)) {
16735: return Analyzer.cast(Boolean.FALSE);
16736: }
16737: if (true) {
16738: final Pair<TypicalTypes.entry> list$3253 = Analyzer
16739: .cast(Analyzer.cast(arg$3251));
16740: final TypicalTypes.entry x = Analyzer
16741: .cast(Primitives.wrapHead(list$3253));
16742: final Pair<TypicalTypes.entry> xs = Analyzer
16743: .cast(Primitives.wrapTail(list$3253));
16744:
16745: return Analyzer
16746: .cast(null == Primitives.equal.apply(
16747: name, null == x ? null
16748: : x.entryName) ? null
16749: : Primitives.equal.apply(name,
16750: null == x ? null
16751: : x.entryName) ? Boolean.TRUE
16752: : checkDefined.apply(
16753: name, xs));
16754: }
16755: return null;
16756: }
16757: }.apply();
16758: }
16759: };
16760:
16761: final Function.F1<TypicalTypes.entry, Node> analyzeBinding = new Function.F1<TypicalTypes.entry, Node>() {
16762: public TypicalTypes.entry apply(final Node n) {
16763: return new Match<TypicalTypes.entry>() {
16764: public TypicalTypes.entry apply() {
16765: final Node arg$3255 = GNode.cast(n);
16766:
16767: if ((null == arg$3255)) {
16768: return null;
16769: }
16770: if (TypicalSupport.match$3256(arg$3255)) {
16771: final Node l = (arg$3255.size() > 0 ? arg$3255
16772: .getGeneric(0) : null);
16773: final Node r = (arg$3255.size() > 1 ? arg$3255
16774: .getGeneric(1) : null);
16775:
16776: matching_nodes.add(arg$3255);
16777: if ((null != arg$3255 && processScopeNodes
16778: .contains(arg$3255.getName()))) {
16779: processScope(arg$3255, getScope);
16780: }
16781: checkEnterScope(arg$3255);
16782:
16783: final Object retValue$3289 = Analyzer
16784: .cast(new Let<TypicalTypes.entry>() {
16785: final TypicalTypes.raw_type<?> tr;
16786:
16787: {
16788: tr = Analyzer.cast(analyze
16789: .apply(r));
16790: }
16791:
16792: public TypicalTypes.entry apply() {
16793: return Analyzer
16794: .cast(null == Primitives.isNotBottom
16795: .apply(tr)
16796: || !Primitives.isNotBottom
16797: .apply(tr) ? null
16798: : new Match<TypicalTypes.entry>() {
16799: public TypicalTypes.entry apply() {
16800: final Node arg$3272 = GNode
16801: .cast(l);
16802:
16803: if ((null == arg$3272)) {
16804: return null;
16805: }
16806: if (TypicalSupport
16807: .match$3258(arg$3272)) {
16808: final Node var = Analyzer
16809: .cast(arg$3272
16810: .getGeneric(0));
16811: final Node typ = (arg$3272
16812: .size() > 1 ? arg$3272
16813: .getGeneric(1)
16814: : null);
16815:
16816: matching_nodes
16817: .add(arg$3272);
16818: if ((null != arg$3272 && processScopeNodes
16819: .contains(arg$3272
16820: .getName()))) {
16821: processScope(
16822: arg$3272,
16823: getScope);
16824: }
16825: checkEnterScope(arg$3272);
16826:
16827: final Object retValue$3278 = Analyzer
16828: .cast(new Let<TypicalTypes.entry>() {
16829: final TypicalTypes.raw_type<?> ty;
16830: final String s;
16831:
16832: {
16833: ty = Analyzer
16834: .cast(analyze
16835: .apply(typ));
16836: s = Analyzer
16837: .cast(getString
16838: .apply(var));
16839: new Guard<TypicalTypes.raw_type<?>>() {
16840: public TypicalTypes.raw_type<?> apply() {
16841: if ((null == unify)) {
16842: return null;
16843: }
16844: if ((null == ty)) {
16845: return null;
16846: }
16847: if ((null == tr)) {
16848: return null;
16849: }
16850:
16851: final TypicalTypes.raw_type<?> result$3275 = unify
16852: .apply(
16853: tr,
16854: ty);
16855:
16856: if ((null == result$3275)) {
16857: return Analyzer
16858: .cast(error(
16859: "types of left and right expressions do not match",
16860: null));
16861: }
16862: return result$3275;
16863: }
16864: }
16865: .apply();
16866: Primitives.annotate
16867: .apply(
16868: var,
16869: "__type",
16870: ty);
16871: Primitives.annotate
16872: .apply(
16873: l,
16874: "__type",
16875: ty);
16876: Primitives.annotate
16877: .apply(
16878: n,
16879: "__type",
16880: ty);
16881: }
16882:
16883: public TypicalTypes.entry apply() {
16884: return Analyzer
16885: .cast(new TypicalTypes.entry(
16886: s,
16887: ty));
16888: }
16889: }
16890: .apply());
16891:
16892: checkExitScope(arg$3272);
16893: matching_nodes
16894: .remove(matching_nodes
16895: .size() - 1);
16896: return Analyzer
16897: .cast(retValue$3278);
16898: }
16899: if (TypicalSupport
16900: .match$65(arg$3272)) {
16901: final String s = (arg$3272
16902: .size() > 0 ? arg$3272
16903: .getString(0)
16904: : null);
16905:
16906: matching_nodes
16907: .add(arg$3272);
16908: if ((null != arg$3272 && processScopeNodes
16909: .contains(arg$3272
16910: .getName()))) {
16911: processScope(
16912: arg$3272,
16913: getScope);
16914: }
16915: checkEnterScope(arg$3272);
16916:
16917: final Object retValue$3282 = Analyzer
16918: .cast(new Let<TypicalTypes.entry>() {
16919: {
16920: Primitives.annotate
16921: .apply(
16922: l,
16923: "__type",
16924: tr);
16925: Primitives.annotate
16926: .apply(
16927: n,
16928: "__type",
16929: tr);
16930: }
16931:
16932: public TypicalTypes.entry apply() {
16933: return Analyzer
16934: .cast(new TypicalTypes.entry(
16935: s,
16936: tr));
16937: }
16938: }
16939: .apply());
16940:
16941: checkExitScope(arg$3272);
16942: matching_nodes
16943: .remove(matching_nodes
16944: .size() - 1);
16945: return Analyzer
16946: .cast(retValue$3282);
16947: }
16948: if (true) {
16949: matching_nodes
16950: .add(arg$3272);
16951: if ((null != arg$3272 && processScopeNodes
16952: .contains(arg$3272
16953: .getName()))) {
16954: processScope(
16955: arg$3272,
16956: getScope);
16957: }
16958: checkEnterScope(arg$3272);
16959:
16960: final Object retValue$3285 = Analyzer
16961: .cast(new Let<TypicalTypes.entry>() {
16962: {
16963: Primitives.annotate
16964: .apply(
16965: l,
16966: "__type",
16967: tr);
16968: Primitives.annotate
16969: .apply(
16970: n,
16971: "__type",
16972: tr);
16973: }
16974:
16975: public TypicalTypes.entry apply() {
16976: return Analyzer
16977: .cast(new TypicalTypes.entry(
16978: null,
16979: tr));
16980: }
16981: }
16982: .apply());
16983:
16984: checkExitScope(arg$3272);
16985: matching_nodes
16986: .remove(matching_nodes
16987: .size() - 1);
16988: return Analyzer
16989: .cast(retValue$3285);
16990: }
16991: return null;
16992: }
16993: }.apply());
16994: }
16995: }.apply());
16996:
16997: checkExitScope(arg$3255);
16998: matching_nodes
16999: .remove(matching_nodes.size() - 1);
17000: return Analyzer.cast(retValue$3289);
17001: }
17002: if (true) {
17003: matching_nodes.add(arg$3255);
17004: if ((null != arg$3255 && processScopeNodes
17005: .contains(arg$3255.getName()))) {
17006: processScope(arg$3255, getScope);
17007: }
17008: checkEnterScope(arg$3255);
17009:
17010: final Object retValue$3292 = Analyzer
17011: .cast(null);
17012:
17013: checkExitScope(arg$3255);
17014: matching_nodes
17015: .remove(matching_nodes.size() - 1);
17016: return Analyzer.cast(retValue$3292);
17017: }
17018: return null;
17019: }
17020: }.apply();
17021: }
17022: };
17023:
17024: final Function.F2<TypicalTypes.raw_type<?>, Node, Pair<TypicalTypes.entry>> analyzeExpression = new Function.F2<TypicalTypes.raw_type<?>, Node, Pair<TypicalTypes.entry>>() {
17025: public TypicalTypes.raw_type<?> apply(final Node n,
17026: final Pair<TypicalTypes.entry> enList) {
17027: return new Match<TypicalTypes.raw_type<?>>() {
17028: public TypicalTypes.raw_type<?> apply() {
17029: final Node arg$3294 = GNode.cast(n);
17030:
17031: if ((null == arg$3294)) {
17032: return null;
17033: }
17034: if (true) {
17035: matching_nodes.add(arg$3294);
17036: if ((null != arg$3294 && processScopeNodes
17037: .contains(arg$3294.getName()))) {
17038: processScope(arg$3294, getScope);
17039: }
17040: checkEnterScope(arg$3294);
17041:
17042: final Object retValue$3298 = Analyzer
17043: .cast(new Let<TypicalTypes.raw_type<?>>() {
17044: {
17045: TypicalSupport.map$3295.apply(
17046: defineEntry, enList);
17047: }
17048:
17049: public TypicalTypes.raw_type<?> apply() {
17050: return Analyzer.cast(analyze
17051: .apply(n));
17052: }
17053: }.apply());
17054:
17055: checkExitScope(arg$3294);
17056: matching_nodes
17057: .remove(matching_nodes.size() - 1);
17058: return Analyzer.cast(retValue$3298);
17059: }
17060: return null;
17061: }
17062: }.apply();
17063: }
17064: };
17065:
17066: final Function.F1<Object, TypicalTypes.entry> defineEntry = new Function.F1<Object, TypicalTypes.entry>() {
17067: public Object apply(final TypicalTypes.entry en) {
17068: return new Let<Object>() {
17069: {
17070: redefine.apply(GNode.create("LowerID",
17071: null == en ? null : en.entryName),
17072: null == en ? null : en.entryType,
17073: getNameSpace);
17074: }
17075:
17076: public Object apply() {
17077: return Analyzer.cast(null);
17078: }
17079: }.apply();
17080: }
17081: };
17082:
17083: final Function.F1<Boolean, TypicalTypes.raw_type<?>> isNodeType = new Function.F1<Boolean, TypicalTypes.raw_type<?>>() {
17084: public Boolean apply(final TypicalTypes.raw_type<?> t) {
17085: return new Match<Boolean>() {
17086: public Boolean apply() {
17087: final TypicalTypes.raw_type<?> arg$3300 = Analyzer
17088: .cast(t);
17089:
17090: if ((null == arg$3300)) {
17091: return null;
17092: }
17093: if ((null != arg$3300))
17094: switch (arg$3300.tag()) {
17095: case VariableT:
17096: if (TypicalSupport.match$117(arg$3300)) {
17097: final String str = Analyzer
17098: .cast(arg$3300.getTuple()
17099: .get1());
17100:
17101: return Analyzer
17102: .cast(new Let<Boolean>() {
17103: final TypicalTypes.raw_type<?> t1;
17104:
17105: {
17106: t1 = Analyzer
17107: .cast(Analyzer
17108: .cast(Primitives.get
17109: .apply(
17110: str,
17111: hashTable)));
17112: }
17113:
17114: public Boolean apply() {
17115: return Analyzer
17116: .cast(null == Primitives.isBottom
17117: .apply(t1) ? null
17118: : Primitives.isBottom
17119: .apply(t1) ? Boolean.FALSE
17120: : isNodeType
17121: .apply(t1));
17122: }
17123: }.apply());
17124: }
17125: break;
17126: case ConstructedT:
17127: if (TypicalSupport.match$3314(arg$3300)) {
17128: return Analyzer.cast(Boolean.TRUE);
17129: }
17130: break;
17131: case VariantT:
17132: if (TypicalSupport.match$100(arg$3300)) {
17133: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
17134: .cast(arg$3300.getTuple()
17135: .get1());
17136:
17137: return Analyzer
17138: .cast(new Let<Boolean>() {
17139: final TypicalTypes.raw_type<?> ty;
17140:
17141: {
17142: ty = Analyzer
17143: .cast(TypicalSupport.head$98
17144: .apply(tl));
17145: }
17146:
17147: public Boolean apply() {
17148: return Analyzer
17149: .cast(new Match<Boolean>() {
17150: public Boolean apply() {
17151: final TypicalTypes.raw_type<?> arg$3308 = Analyzer
17152: .cast(ty);
17153:
17154: if ((null == arg$3308)) {
17155: return null;
17156: }
17157: if ((null != arg$3308))
17158: switch (arg$3308
17159: .tag()) {
17160: case ConstructorT:
17161: if (TypicalSupport
17162: .match$94(arg$3308)) {
17163: final String s = Analyzer
17164: .cast(arg$3308
17165: .getTuple()
17166: .get1());
17167:
17168: return Analyzer
17169: .cast(reachableFromNode
17170: .apply(s));
17171: }
17172: break;
17173: default:
17174: break;
17175: }
17176: ;
17177: if (true) {
17178: return Analyzer
17179: .cast(null);
17180: }
17181: return null;
17182: }
17183: }.apply());
17184: }
17185: }.apply());
17186: }
17187: break;
17188: case TypeName:
17189: if (TypicalSupport.match$95(arg$3300)) {
17190: final String s = Analyzer.cast(arg$3300
17191: .getTuple().get1());
17192:
17193: return Analyzer.cast(reachableFromNode
17194: .apply(s));
17195: }
17196: break;
17197: case ConstructorT:
17198: if (TypicalSupport.match$94(arg$3300)) {
17199: final String s = Analyzer.cast(arg$3300
17200: .getTuple().get1());
17201:
17202: return Analyzer.cast(reachableFromNode
17203: .apply(s));
17204: }
17205: break;
17206: case PolyVariantT:
17207: if (TypicalSupport.match$118(arg$3300)) {
17208: return Analyzer.cast(Boolean.TRUE);
17209: }
17210: break;
17211: case FieldT:
17212: if (TypicalSupport.match$96(arg$3300)) {
17213: final TypicalTypes.raw_type<?> ty = Analyzer
17214: .cast(arg$3300.getTuple()
17215: .get3());
17216:
17217: return Analyzer.cast(isNodeType
17218: .apply(ty));
17219: }
17220: break;
17221: case NodeTypeT:
17222: if (TypicalSupport.match$119(arg$3300)) {
17223: return Analyzer.cast(Boolean.TRUE);
17224: }
17225: break;
17226: default:
17227: break;
17228: }
17229: ;
17230: if (true) {
17231: return Analyzer.cast(Boolean.FALSE);
17232: }
17233: return null;
17234: }
17235: }.apply();
17236: }
17237: };
17238:
17239: final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> ensureNodeType = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
17240: public TypicalTypes.raw_type<?> apply(
17241: final TypicalTypes.raw_type<?> t) {
17242: return new Match<TypicalTypes.raw_type<?>>() {
17243: public TypicalTypes.raw_type<?> apply() {
17244: final TypicalTypes.raw_type<?> arg$3316 = Analyzer
17245: .cast(t);
17246:
17247: if ((null == arg$3316)) {
17248: return null;
17249: }
17250: if ((null != arg$3316))
17251: switch (arg$3316.tag()) {
17252: case VariableT:
17253: if (TypicalSupport.match$117(arg$3316)) {
17254: final String str = Analyzer
17255: .cast(arg$3316.getTuple()
17256: .get1());
17257:
17258: return Analyzer
17259: .cast(new Let<TypicalTypes.raw_type<?>>() {
17260: final TypicalTypes.raw_type<?> t1;
17261:
17262: {
17263: t1 = Analyzer
17264: .cast(Analyzer
17265: .cast(Primitives.get
17266: .apply(
17267: str,
17268: hashTable)));
17269: }
17270:
17271: public TypicalTypes.raw_type<?> apply() {
17272: return Analyzer
17273: .cast(null == Primitives.isBottom
17274: .apply(t1) ? null
17275: : Primitives.isBottom
17276: .apply(t1) ? new Let<TypicalTypes.raw_type<?>>() {
17277: {
17278: Analyzer
17279: .cast(Primitives.put
17280: .apply(
17281: str,
17282: nodet,
17283: hashTable));
17284: }
17285:
17286: public TypicalTypes.raw_type<?> apply() {
17287: return Analyzer
17288: .cast(nodet);
17289: }
17290: }
17291: .apply()
17292: : ensureNodeType
17293: .apply(t1));
17294: }
17295: }.apply());
17296: }
17297: break;
17298: case ConstructedT:
17299: if (TypicalSupport.match$3314(arg$3316)) {
17300: return Analyzer.cast(nodet);
17301: }
17302: break;
17303: default:
17304: break;
17305: }
17306: ;
17307: if (true) {
17308: return Analyzer.cast(null == isNodeType
17309: .apply(t)
17310: || !isNodeType.apply(t) ? null : nodet);
17311: }
17312: return null;
17313: }
17314: }.apply();
17315: }
17316: };
17317:
17318: final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> ensureNodeList = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
17319: public TypicalTypes.raw_type<?> apply(
17320: final TypicalTypes.raw_type<?> t) {
17321: return new Match<TypicalTypes.raw_type<?>>() {
17322: public TypicalTypes.raw_type<?> apply() {
17323: final TypicalTypes.raw_type<?> arg$3320 = Analyzer
17324: .cast(t);
17325:
17326: if ((null == arg$3320)) {
17327: return null;
17328: }
17329: if ((null != arg$3320))
17330: switch (arg$3320.tag()) {
17331: case VariableT:
17332: if (TypicalSupport.match$117(arg$3320)) {
17333: final String str = Analyzer
17334: .cast(arg$3320.getTuple()
17335: .get1());
17336:
17337: return Analyzer
17338: .cast(new Let<TypicalTypes.raw_type<?>>() {
17339: final TypicalTypes.raw_type<?> t1;
17340:
17341: {
17342: t1 = Analyzer
17343: .cast(Analyzer
17344: .cast(Primitives.get
17345: .apply(
17346: str,
17347: hashTable)));
17348: }
17349:
17350: public TypicalTypes.raw_type<?> apply() {
17351: return Analyzer
17352: .cast(null == Primitives.isBottom
17353: .apply(t1) ? null
17354: : Primitives.isBottom
17355: .apply(t1) ? new Let<TypicalTypes.raw_type<?>>() {
17356: {
17357: Analyzer
17358: .cast(Primitives.put
17359: .apply(
17360: str,
17361: new TypicalTypes.ConstructedT(
17362: new Pair<TypicalTypes.raw_type<?>>(
17363: nodet),
17364: "list"),
17365: hashTable));
17366: }
17367:
17368: public TypicalTypes.raw_type<?> apply() {
17369: return Analyzer
17370: .cast(nodet);
17371: }
17372: }
17373: .apply()
17374: : ensureNodeList
17375: .apply(t1));
17376: }
17377: }.apply());
17378: }
17379: break;
17380: case ConstructedT:
17381: if (TypicalSupport.match$3322(arg$3320)) {
17382: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
17383: .cast(arg$3320.getTuple()
17384: .get1());
17385:
17386: return Analyzer.cast(ensureNodeType
17387: .apply(TypicalSupport.head$98
17388: .apply(tl)));
17389: }
17390: break;
17391: default:
17392: break;
17393: }
17394: ;
17395: if (true) {
17396: return Analyzer.cast(null);
17397: }
17398: return null;
17399: }
17400: }.apply();
17401: }
17402: };
17403:
17404: final Function.F1<TypicalTypes.raw_type<?>, Pair<TypicalTypes.raw_type<?>>> checkNodeList = new Function.F1<TypicalTypes.raw_type<?>, Pair<TypicalTypes.raw_type<?>>>() {
17405: public TypicalTypes.raw_type<?> apply(
17406: final Pair<TypicalTypes.raw_type<?>> tl) {
17407: return new Match<TypicalTypes.raw_type<?>>() {
17408: public TypicalTypes.raw_type<?> apply() {
17409: final Pair<TypicalTypes.raw_type<?>> arg$3324 = Analyzer
17410: .cast(tl);
17411:
17412: if ((null == arg$3324)) {
17413: return null;
17414: }
17415: if (TypicalSupport.match$122(arg$3324)) {
17416: return Analyzer.cast(nodet);
17417: }
17418: if (true) {
17419: final Pair<TypicalTypes.raw_type<?>> list$3326 = Analyzer
17420: .cast(Analyzer.cast(arg$3324));
17421: final TypicalTypes.raw_type<?> x = Analyzer
17422: .cast(Primitives.wrapHead(list$3326));
17423: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
17424: .cast(Primitives.wrapTail(list$3326));
17425:
17426: return Analyzer
17427: .cast(null == isNodeType.apply(x) ? null
17428: : isNodeType.apply(x) ? checkNodeList
17429: .apply(xs)
17430: : error(
17431: Primitives.concat
17432: .apply(
17433: "expected node, found ",
17434: getTypeName
17435: .apply(x)),
17436: null));
17437: }
17438: return null;
17439: }
17440: }.apply();
17441: }
17442: };
17443:
17444: final Function.F1<Boolean, TypicalTypes.raw_type<?>> isNodeList = new Function.F1<Boolean, TypicalTypes.raw_type<?>>() {
17445: public Boolean apply(final TypicalTypes.raw_type<?> t) {
17446: return new Match<Boolean>() {
17447: public Boolean apply() {
17448: final TypicalTypes.raw_type<?> arg$3328 = Analyzer
17449: .cast(t);
17450:
17451: if ((null == arg$3328)) {
17452: return null;
17453: }
17454: if ((null != arg$3328))
17455: switch (arg$3328.tag()) {
17456: case VariableT:
17457: if (TypicalSupport.match$117(arg$3328)) {
17458: final String str = Analyzer
17459: .cast(arg$3328.getTuple()
17460: .get1());
17461:
17462: return Analyzer
17463: .cast(new Let<Boolean>() {
17464: final TypicalTypes.raw_type<?> t1;
17465:
17466: {
17467: t1 = Analyzer
17468: .cast(Analyzer
17469: .cast(Primitives.get
17470: .apply(
17471: str,
17472: hashTable)));
17473: }
17474:
17475: public Boolean apply() {
17476: return Analyzer
17477: .cast(null == Primitives.isBottom
17478: .apply(t1) ? null
17479: : Primitives.isBottom
17480: .apply(t1) ? Boolean.FALSE
17481: : isNodeList
17482: .apply(t1));
17483: }
17484: }.apply());
17485: }
17486: break;
17487: case ConstructedT:
17488: if (TypicalSupport.match$3322(arg$3328)) {
17489: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
17490: .cast(arg$3328.getTuple()
17491: .get1());
17492:
17493: return Analyzer.cast(isNodeType
17494: .apply(TypicalSupport.head$98
17495: .apply(tl)));
17496: }
17497: break;
17498: default:
17499: break;
17500: }
17501: ;
17502: if (true) {
17503: return Analyzer.cast(Boolean.FALSE);
17504: }
17505: return null;
17506: }
17507: }.apply();
17508: }
17509: };
17510:
17511: final Function.F1<Boolean, TypicalTypes.raw_type<?>> isListType = new Function.F1<Boolean, TypicalTypes.raw_type<?>>() {
17512: public Boolean apply(final TypicalTypes.raw_type<?> t) {
17513: return new Let<Boolean>() {
17514: final TypicalTypes.raw_type<?> lt;
17515:
17516: {
17517: lt = Analyzer.cast(new TypicalTypes.ConstructedT(
17518: new Pair<TypicalTypes.raw_type<?>>(wildt),
17519: "list"));
17520: }
17521:
17522: public Boolean apply() {
17523: return Analyzer.cast(new Match<Boolean>() {
17524: public Boolean apply() {
17525: final TypicalTypes.raw_type<?> arg$3332 = Analyzer
17526: .cast(t);
17527:
17528: if ((null == arg$3332)) {
17529: return null;
17530: }
17531: if ((null != arg$3332))
17532: switch (arg$3332.tag()) {
17533: case VariableT:
17534: if (TypicalSupport
17535: .match$117(arg$3332)) {
17536: return Analyzer
17537: .cast(Boolean.TRUE);
17538: }
17539: break;
17540: case WildcardT:
17541: if (TypicalSupport
17542: .match$92(arg$3332)) {
17543: return Analyzer
17544: .cast(Boolean.TRUE);
17545: }
17546: break;
17547: case ConstructedT:
17548: if (TypicalSupport
17549: .match$3322(arg$3332)) {
17550: return Analyzer
17551: .cast(Boolean.TRUE);
17552: }
17553: break;
17554: case TypeName:
17555: if (TypicalSupport
17556: .match$95(arg$3332)) {
17557: return Analyzer
17558: .cast(Primitives.isNotBottom
17559: .apply(unify
17560: .apply(
17561: t,
17562: lt)));
17563: }
17564: break;
17565: case FieldT:
17566: if (TypicalSupport
17567: .match$96(arg$3332)) {
17568: final TypicalTypes.raw_type<?> ty = Analyzer
17569: .cast(arg$3332
17570: .getTuple()
17571: .get3());
17572:
17573: return Analyzer
17574: .cast(Primitives.isNotBottom
17575: .apply(unify
17576: .apply(
17577: ty,
17578: lt)));
17579: }
17580: break;
17581: default:
17582: break;
17583: }
17584: ;
17585: if (true) {
17586: return Analyzer.cast(Boolean.FALSE);
17587: }
17588: return null;
17589: }
17590: }.apply());
17591: }
17592: }.apply();
17593: }
17594: };
17595:
17596: final Function.F3<Boolean, Pair<Node>, BigInteger, BigInteger> checkBindings = new Function.F3<Boolean, Pair<Node>, BigInteger, BigInteger>() {
17597: public Boolean apply(final Pair<Node> nl,
17598: final BigInteger index, final BigInteger var) {
17599: return new Match<Boolean>() {
17600: public Boolean apply() {
17601: final Pair<Node> arg$3339 = Analyzer.cast(nl);
17602:
17603: if ((null == arg$3339)) {
17604: return null;
17605: }
17606: if (TypicalSupport.match$323(arg$3339)) {
17607: return Analyzer.cast(Primitives.lessEqualInt
17608: .apply(index, BigInteger.valueOf(1)));
17609: }
17610: if (true) {
17611: final Pair<Node> list$3341 = Analyzer
17612: .cast(Analyzer.cast(arg$3339));
17613: final Node x = GNode.cast(Primitives
17614: .wrapHead(list$3341));
17615: final Pair<Node> xs = Analyzer.cast(Primitives
17616: .wrapTail(list$3341));
17617:
17618: return Analyzer
17619: .cast(null == Primitives.hasAnnotation
17620: .apply(x, "has_bindings") ? null
17621: : Primitives.hasAnnotation
17622: .apply(x,
17623: "has_bindings") ? (null == Primitives.and
17624: .apply(
17625: Primitives.equal
17626: .apply(
17627: index,
17628: BigInteger
17629: .valueOf(0)),
17630: Primitives.equal
17631: .apply(
17632: var,
17633: BigInteger
17634: .valueOf(0))) ? null
17635: : Primitives.and
17636: .apply(
17637: Primitives.equal
17638: .apply(
17639: index,
17640: BigInteger
17641: .valueOf(0)),
17642: Primitives.equal
17643: .apply(
17644: var,
17645: BigInteger
17646: .valueOf(0))) ? checkBindings
17647: .apply(
17648: xs,
17649: BigInteger
17650: .valueOf(1),
17651: BigInteger
17652: .valueOf(0))
17653: : Boolean.FALSE)
17654: : null == Primitives.hasAnnotation
17655: .apply(x,
17656: "variables") ? null
17657: : Primitives.hasAnnotation
17658: .apply(
17659: x,
17660: "variables") ? (null == Primitives.equal
17661: .apply(
17662: index,
17663: BigInteger
17664: .valueOf(0)) ? null
17665: : Primitives.equal
17666: .apply(
17667: index,
17668: BigInteger
17669: .valueOf(0)) ? checkBindings
17670: .apply(
17671: xs,
17672: BigInteger
17673: .valueOf(0),
17674: Primitives.addInt
17675: .apply(
17676: var,
17677: BigInteger
17678: .valueOf(1)))
17679: : Boolean.FALSE)
17680: : checkBindings
17681: .apply(
17682: xs,
17683: index,
17684: var));
17685: }
17686: return null;
17687: }
17688: }.apply();
17689: }
17690: };
17691:
17692: final Function.F1<Pair<String>, Pair<Node>> combineVariables = new Function.F1<Pair<String>, Pair<Node>>() {
17693: public Pair<String> apply(final Pair<Node> nl) {
17694: return new Match<Pair<String>>() {
17695: public Pair<String> apply() {
17696: final Pair<Node> arg$3343 = Analyzer.cast(nl);
17697:
17698: if ((null == arg$3343)) {
17699: return null;
17700: }
17701: if (TypicalSupport.match$323(arg$3343)) {
17702: return Analyzer.cast(Pair.<String> empty());
17703: }
17704: if (true) {
17705: final Pair<Node> list$3345 = Analyzer
17706: .cast(Analyzer.cast(arg$3343));
17707: final Node x = GNode.cast(Primitives
17708: .wrapHead(list$3345));
17709: final Pair<Node> xs = Analyzer.cast(Primitives
17710: .wrapTail(list$3345));
17711:
17712: return Analyzer.cast(TypicalSupport.union$313
17713: .apply(retrieveVariables.apply(x),
17714: combineVariables.apply(xs)));
17715: }
17716: return null;
17717: }
17718: }.apply();
17719: }
17720: };
17721:
17722: final Function.F2<Boolean, Pair<String>, Pair<Node>> haveSameVariables = new Function.F2<Boolean, Pair<String>, Pair<Node>>() {
17723: public Boolean apply(final Pair<String> strList,
17724: final Pair<Node> nl) {
17725: return new Match<Boolean>() {
17726: public Boolean apply() {
17727: final Pair<Node> arg$3347 = Analyzer.cast(nl);
17728:
17729: if ((null == arg$3347)) {
17730: return null;
17731: }
17732: if (TypicalSupport.match$323(arg$3347)) {
17733: return Analyzer.cast(Boolean.TRUE);
17734: }
17735: if (true) {
17736: final Pair<Node> list$3349 = Analyzer
17737: .cast(Analyzer.cast(arg$3347));
17738: final Node x = GNode.cast(Primitives
17739: .wrapHead(list$3349));
17740: final Pair<Node> xs = Analyzer.cast(Primitives
17741: .wrapTail(list$3349));
17742:
17743: return Analyzer.cast(new Let<Boolean>() {
17744: final Pair<String> xList;
17745:
17746: {
17747: xList = Analyzer.cast(retrieveVariables
17748: .apply(x));
17749: }
17750:
17751: public Boolean apply() {
17752: return Analyzer
17753: .cast(null == Primitives.and
17754: .apply(
17755: listContains
17756: .apply(
17757: strList,
17758: xList),
17759: listContains
17760: .apply(
17761: xList,
17762: strList)) ? null
17763: : Primitives.and
17764: .apply(
17765: listContains
17766: .apply(
17767: strList,
17768: xList),
17769: listContains
17770: .apply(
17771: xList,
17772: strList)) ? haveSameVariables
17773: .apply(strList,
17774: xs)
17775: : Boolean.FALSE);
17776: }
17777: }.apply());
17778: }
17779: return null;
17780: }
17781: }.apply();
17782: }
17783: };
17784:
17785: final Function.F1<Pair<String>, Node> retrieveVariables = new Function.F1<Pair<String>, Node>() {
17786: public Pair<String> apply(final Node n) {
17787: return (null == Primitives.hasAnnotation.apply(n,
17788: "variables") ? null : Primitives.hasAnnotation
17789: .apply(n, "variables") ? new Let<Pair<String>>() {
17790: final TypicalTypes.raw_type<?> ty;
17791:
17792: {
17793: ty = Analyzer.cast(Primitives.getAnnotation.apply(
17794: n, "variables"));
17795: }
17796:
17797: public Pair<String> apply() {
17798: return Analyzer.cast(new Match<Pair<String>>() {
17799: public Pair<String> apply() {
17800: final TypicalTypes.raw_type<?> arg$3351 = Analyzer
17801: .cast(ty);
17802:
17803: if ((null == arg$3351)) {
17804: return null;
17805: }
17806: if ((null != arg$3351))
17807: switch (arg$3351.tag()) {
17808: case StringList:
17809: if (TypicalSupport
17810: .match$3352(arg$3351)) {
17811: final Pair<String> res = Analyzer
17812: .cast(arg$3351
17813: .getTuple()
17814: .get1());
17815:
17816: return Analyzer.cast(res);
17817: }
17818: break;
17819: default:
17820: break;
17821: }
17822: ;
17823: if (true) {
17824: return Analyzer.cast(null);
17825: }
17826: return null;
17827: }
17828: }.apply());
17829: }
17830: }.apply()
17831: : Pair.<String> empty());
17832: }
17833: };
17834:
17835: final Function.F2<Boolean, Pair<String>, Pair<String>> listContains = new Function.F2<Boolean, Pair<String>, Pair<String>>() {
17836: public Boolean apply(final Pair<String> l1,
17837: final Pair<String> l2) {
17838: return new Match<Boolean>() {
17839: public Boolean apply() {
17840: final Pair<String> arg$3354 = Analyzer.cast(l2);
17841:
17842: if ((null == arg$3354)) {
17843: return null;
17844: }
17845: if (TypicalSupport.match$3230(arg$3354)) {
17846: return Analyzer.cast(Boolean.TRUE);
17847: }
17848: if (true) {
17849: final Pair<String> list$3356 = Analyzer
17850: .cast(Analyzer.cast(arg$3354));
17851: final String x = Analyzer.cast(Primitives
17852: .wrapHead(list$3356));
17853: final Pair<String> xs = Analyzer
17854: .cast(Primitives.wrapTail(list$3356));
17855:
17856: return Analyzer.cast(Primitives.and.apply(
17857: Primitives.contains.apply(x, l1),
17858: listContains.apply(l1, xs)));
17859: }
17860: return null;
17861: }
17862: }.apply();
17863: }
17864: };
17865:
17866: final Function.F1<String, Node> getString = new Function.F1<String, Node>() {
17867: public String apply(final Node n) {
17868: return new Match<String>() {
17869: public String apply() {
17870: final Node arg$3358 = GNode.cast(n);
17871:
17872: if ((null == arg$3358)) {
17873: return null;
17874: }
17875: if (TypicalSupport.match$61(arg$3358)) {
17876: final String str = (arg$3358.size() > 0 ? arg$3358
17877: .getString(0)
17878: : null);
17879:
17880: matching_nodes.add(arg$3358);
17881: if ((null != arg$3358 && processScopeNodes
17882: .contains(arg$3358.getName()))) {
17883: processScope(arg$3358, getScope);
17884: }
17885: checkEnterScope(arg$3358);
17886:
17887: final Object retValue$3362 = Analyzer.cast(str);
17888:
17889: checkExitScope(arg$3358);
17890: matching_nodes
17891: .remove(matching_nodes.size() - 1);
17892: return Analyzer.cast(retValue$3362);
17893: }
17894: if (TypicalSupport.match$1(arg$3358)) {
17895: final String str = (arg$3358.size() > 0 ? arg$3358
17896: .getString(0)
17897: : null);
17898:
17899: matching_nodes.add(arg$3358);
17900: if ((null != arg$3358 && processScopeNodes
17901: .contains(arg$3358.getName()))) {
17902: processScope(arg$3358, getScope);
17903: }
17904: checkEnterScope(arg$3358);
17905:
17906: final Object retValue$3366 = Analyzer.cast(str);
17907:
17908: checkExitScope(arg$3358);
17909: matching_nodes
17910: .remove(matching_nodes.size() - 1);
17911: return Analyzer.cast(retValue$3366);
17912: }
17913: if (TypicalSupport.match$2856(arg$3358)) {
17914: final String str = (arg$3358.size() > 0 ? arg$3358
17915: .getString(0)
17916: : null);
17917:
17918: matching_nodes.add(arg$3358);
17919: if ((null != arg$3358 && processScopeNodes
17920: .contains(arg$3358.getName()))) {
17921: processScope(arg$3358, getScope);
17922: }
17923: checkEnterScope(arg$3358);
17924:
17925: final Object retValue$3370 = Analyzer.cast(str);
17926:
17927: checkExitScope(arg$3358);
17928: matching_nodes
17929: .remove(matching_nodes.size() - 1);
17930: return Analyzer.cast(retValue$3370);
17931: }
17932: if (TypicalSupport.match$65(arg$3358)) {
17933: final String str = (arg$3358.size() > 0 ? arg$3358
17934: .getString(0)
17935: : null);
17936:
17937: matching_nodes.add(arg$3358);
17938: if ((null != arg$3358 && processScopeNodes
17939: .contains(arg$3358.getName()))) {
17940: processScope(arg$3358, getScope);
17941: }
17942: checkEnterScope(arg$3358);
17943:
17944: final Object retValue$3374 = Analyzer.cast(str);
17945:
17946: checkExitScope(arg$3358);
17947: matching_nodes
17948: .remove(matching_nodes.size() - 1);
17949: return Analyzer.cast(retValue$3374);
17950: }
17951: if (TypicalSupport.match$69(arg$3358)) {
17952: final String str = (arg$3358.size() > 0 ? arg$3358
17953: .getString(0)
17954: : null);
17955:
17956: matching_nodes.add(arg$3358);
17957: if ((null != arg$3358 && processScopeNodes
17958: .contains(arg$3358.getName()))) {
17959: processScope(arg$3358, getScope);
17960: }
17961: checkEnterScope(arg$3358);
17962:
17963: final Object retValue$3378 = Analyzer.cast(str);
17964:
17965: checkExitScope(arg$3358);
17966: matching_nodes
17967: .remove(matching_nodes.size() - 1);
17968: return Analyzer.cast(retValue$3378);
17969: }
17970: if (true) {
17971: matching_nodes.add(arg$3358);
17972: if ((null != arg$3358 && processScopeNodes
17973: .contains(arg$3358.getName()))) {
17974: processScope(arg$3358, getScope);
17975: }
17976: checkEnterScope(arg$3358);
17977:
17978: final Object retValue$3381 = Analyzer
17979: .cast(null);
17980:
17981: checkExitScope(arg$3358);
17982: matching_nodes
17983: .remove(matching_nodes.size() - 1);
17984: return Analyzer.cast(retValue$3381);
17985: }
17986: return null;
17987: }
17988: }.apply();
17989: }
17990: };
17991:
17992: final Function.F1<Pair<String>, Node> getStringList = new Function.F1<Pair<String>, Node>() {
17993: public Pair<String> apply(final Node n) {
17994: return new Match<Pair<String>>() {
17995: public Pair<String> apply() {
17996: final Node arg$3383 = GNode.cast(n);
17997:
17998: if ((null == arg$3383)) {
17999: return null;
18000: }
18001: if (TypicalSupport.match$2838(arg$3383)) {
18002: final Pair<String> strL = Analyzer
18003: .cast(Primitives.getChildren(arg$3383,
18004: 0, arg$3383.size()));
18005:
18006: matching_nodes.add(arg$3383);
18007: if ((null != arg$3383 && processScopeNodes
18008: .contains(arg$3383.getName()))) {
18009: processScope(arg$3383, getScope);
18010: }
18011: checkEnterScope(arg$3383);
18012:
18013: final Object retValue$3387 = Analyzer
18014: .cast(strL);
18015:
18016: checkExitScope(arg$3383);
18017: matching_nodes
18018: .remove(matching_nodes.size() - 1);
18019: return Analyzer.cast(retValue$3387);
18020: }
18021: if (true) {
18022: matching_nodes.add(arg$3383);
18023: if ((null != arg$3383 && processScopeNodes
18024: .contains(arg$3383.getName()))) {
18025: processScope(arg$3383, getScope);
18026: }
18027: checkEnterScope(arg$3383);
18028:
18029: final Object retValue$3390 = Analyzer
18030: .cast(null);
18031:
18032: checkExitScope(arg$3383);
18033: matching_nodes
18034: .remove(matching_nodes.size() - 1);
18035: return Analyzer.cast(retValue$3390);
18036: }
18037: return null;
18038: }
18039: }.apply();
18040: }
18041: };
18042:
18043: final Function.F1<String, TypicalTypes.raw_type<?>> getParent = new Function.F1<String, TypicalTypes.raw_type<?>>() {
18044: public String apply(final TypicalTypes.raw_type<?> t) {
18045: return new Match<String>() {
18046: public String apply() {
18047: final TypicalTypes.raw_type<?> arg$3392 = Analyzer
18048: .cast(t);
18049:
18050: if ((null == arg$3392)) {
18051: return null;
18052: }
18053: if ((null != arg$3392))
18054: switch (arg$3392.tag()) {
18055: case ConstructorT:
18056: if (TypicalSupport.match$94(arg$3392)) {
18057: final String s = Analyzer.cast(arg$3392
18058: .getTuple().get1());
18059:
18060: return Analyzer.cast(s);
18061: }
18062: break;
18063: case FieldT:
18064: if (TypicalSupport.match$96(arg$3392)) {
18065: final String s = Analyzer.cast(arg$3392
18066: .getTuple().get1());
18067:
18068: return Analyzer.cast(s);
18069: }
18070: break;
18071: default:
18072: break;
18073: }
18074: ;
18075: if (true) {
18076: return Analyzer.cast(null);
18077: }
18078: return null;
18079: }
18080: }.apply();
18081: }
18082: };
18083:
18084: final Function.F1<Pair<Node>, Node> getNodeList = new Function.F1<Pair<Node>, Node>() {
18085: public Pair<Node> apply(final Node n) {
18086: return new Match<Pair<Node>>() {
18087: public Pair<Node> apply() {
18088: final Node arg$3396 = GNode.cast(n);
18089:
18090: if ((null == arg$3396)) {
18091: return null;
18092: }
18093: if (TypicalSupport.match$3397(arg$3396)) {
18094: final Pair<Node> nl = Analyzer.cast(Primitives
18095: .getChildren(arg$3396, 0, arg$3396
18096: .size()));
18097:
18098: matching_nodes.add(arg$3396);
18099: if ((null != arg$3396 && processScopeNodes
18100: .contains(arg$3396.getName()))) {
18101: processScope(arg$3396, getScope);
18102: }
18103: checkEnterScope(arg$3396);
18104:
18105: final Object retValue$3400 = Analyzer.cast(nl);
18106:
18107: checkExitScope(arg$3396);
18108: matching_nodes
18109: .remove(matching_nodes.size() - 1);
18110: return Analyzer.cast(retValue$3400);
18111: }
18112: if (TypicalSupport.match$3401(arg$3396)) {
18113: final Pair<Node> nl = Analyzer.cast(Primitives
18114: .getChildren(arg$3396, 0, arg$3396
18115: .size()));
18116:
18117: matching_nodes.add(arg$3396);
18118: if ((null != arg$3396 && processScopeNodes
18119: .contains(arg$3396.getName()))) {
18120: processScope(arg$3396, getScope);
18121: }
18122: checkEnterScope(arg$3396);
18123:
18124: final Object retValue$3404 = Analyzer.cast(nl);
18125:
18126: checkExitScope(arg$3396);
18127: matching_nodes
18128: .remove(matching_nodes.size() - 1);
18129: return Analyzer.cast(retValue$3404);
18130: }
18131: if (TypicalSupport.match$3405(arg$3396)) {
18132: final Pair<Node> nl = Analyzer.cast(Primitives
18133: .getChildren(arg$3396, 0, arg$3396
18134: .size()));
18135:
18136: matching_nodes.add(arg$3396);
18137: if ((null != arg$3396 && processScopeNodes
18138: .contains(arg$3396.getName()))) {
18139: processScope(arg$3396, getScope);
18140: }
18141: checkEnterScope(arg$3396);
18142:
18143: final Object retValue$3408 = Analyzer.cast(nl);
18144:
18145: checkExitScope(arg$3396);
18146: matching_nodes
18147: .remove(matching_nodes.size() - 1);
18148: return Analyzer.cast(retValue$3408);
18149: }
18150: if (TypicalSupport.match$245(arg$3396)) {
18151: final Pair<Node> nl = Analyzer.cast(Primitives
18152: .getChildren(arg$3396, 0, arg$3396
18153: .size()));
18154:
18155: matching_nodes.add(arg$3396);
18156: if ((null != arg$3396 && processScopeNodes
18157: .contains(arg$3396.getName()))) {
18158: processScope(arg$3396, getScope);
18159: }
18160: checkEnterScope(arg$3396);
18161:
18162: final Object retValue$3412 = Analyzer.cast(nl);
18163:
18164: checkExitScope(arg$3396);
18165: matching_nodes
18166: .remove(matching_nodes.size() - 1);
18167: return Analyzer.cast(retValue$3412);
18168: }
18169: if (TypicalSupport.match$3413(arg$3396)) {
18170: final Pair<Node> nl = Analyzer.cast(Primitives
18171: .getChildren(arg$3396, 0, arg$3396
18172: .size()));
18173:
18174: matching_nodes.add(arg$3396);
18175: if ((null != arg$3396 && processScopeNodes
18176: .contains(arg$3396.getName()))) {
18177: processScope(arg$3396, getScope);
18178: }
18179: checkEnterScope(arg$3396);
18180:
18181: final Object retValue$3416 = Analyzer.cast(nl);
18182:
18183: checkExitScope(arg$3396);
18184: matching_nodes
18185: .remove(matching_nodes.size() - 1);
18186: return Analyzer.cast(retValue$3416);
18187: }
18188: if (TypicalSupport.match$3417(arg$3396)) {
18189: final Pair<Node> nl = Analyzer.cast(Primitives
18190: .getChildren(arg$3396.getGeneric(0), 0,
18191: arg$3396.getGeneric(0).size()));
18192:
18193: matching_nodes.add(arg$3396);
18194: if ((null != arg$3396 && processScopeNodes
18195: .contains(arg$3396.getName()))) {
18196: processScope(arg$3396, getScope);
18197: }
18198: checkEnterScope(arg$3396);
18199:
18200: List<Node> listName$3419 = new ArrayList<Node>();
18201: Node nodeName$3418 = arg$3396;
18202:
18203: nodeName$3418 = nodeName$3418.getGeneric(0);
18204: if ((null != nodeName$3418 && processScopeNodes
18205: .contains(nodeName$3418.getName()))) {
18206: processScope(nodeName$3418, getScope);
18207: }
18208: checkEnterScope(nodeName$3418);
18209: listName$3419.add(0, nodeName$3418);
18210:
18211: final Object retValue$3420 = Analyzer.cast(nl);
18212:
18213: for (Node no : listName$3419) {
18214: checkExitScope(no);
18215: }
18216: checkExitScope(arg$3396);
18217: matching_nodes
18218: .remove(matching_nodes.size() - 1);
18219: return Analyzer.cast(retValue$3420);
18220: }
18221: if (true) {
18222: matching_nodes.add(arg$3396);
18223: if ((null != arg$3396 && processScopeNodes
18224: .contains(arg$3396.getName()))) {
18225: processScope(arg$3396, getScope);
18226: }
18227: checkEnterScope(arg$3396);
18228:
18229: final Object retValue$3423 = Analyzer
18230: .cast(null);
18231:
18232: checkExitScope(arg$3396);
18233: matching_nodes
18234: .remove(matching_nodes.size() - 1);
18235: return Analyzer.cast(retValue$3423);
18236: }
18237: return null;
18238: }
18239: }.apply();
18240: }
18241: };
18242:
18243: final Function.F2<Pair<String>, Pair<Node>, Pair<String>> getTypeVariables = new Function.F2<Pair<String>, Pair<Node>, Pair<String>>() {
18244: public Pair<String> apply(final Pair<Node> nl,
18245: final Pair<String> resList) {
18246: return new Match<Pair<String>>() {
18247: public Pair<String> apply() {
18248: final Pair<Node> arg$3425 = Analyzer.cast(nl);
18249:
18250: if ((null == arg$3425)) {
18251: return null;
18252: }
18253: if (TypicalSupport.match$323(arg$3425)) {
18254: return Analyzer.cast(resList);
18255: }
18256: if (true) {
18257: final Pair<Node> list$3427 = Analyzer
18258: .cast(Analyzer.cast(arg$3425));
18259: final Node x = GNode.cast(Primitives
18260: .wrapHead(list$3427));
18261: final Pair<Node> xs = Analyzer.cast(Primitives
18262: .wrapTail(list$3427));
18263:
18264: return Analyzer.cast(new Let<Pair<String>>() {
18265: final String s;
18266:
18267: {
18268: s = Analyzer.cast(getString.apply(x));
18269: }
18270:
18271: public Pair<String> apply() {
18272: return Analyzer
18273: .cast(null == Primitives.not
18274: .apply(Primitives.contains
18275: .apply(s,
18276: resList)) ? null
18277: : Primitives.not
18278: .apply(Primitives.contains
18279: .apply(
18280: s,
18281: resList)) ? getTypeVariables
18282: .apply(
18283: xs,
18284: TypicalSupport.append$297
18285: .apply(
18286: resList,
18287: new Pair<String>(
18288: s)))
18289: : error(
18290: Primitives.concat
18291: .apply(
18292: Primitives.concat
18293: .apply(
18294: "type variable ",
18295: s),
18296: " has been previously defined"),
18297: null));
18298: }
18299: }.apply());
18300: }
18301: return null;
18302: }
18303: }.apply();
18304: }
18305: };
18306:
18307: final Function.F2<Boolean, String, Pair<Node>> isUsedInList = new Function.F2<Boolean, String, Pair<Node>>() {
18308: public Boolean apply(final String s, final Pair<Node> nl) {
18309: return new Match<Boolean>() {
18310: public Boolean apply() {
18311: final Pair<Node> arg$3429 = Analyzer.cast(nl);
18312:
18313: if ((null == arg$3429)) {
18314: return null;
18315: }
18316: if (TypicalSupport.match$323(arg$3429)) {
18317: return Analyzer.cast(Boolean.FALSE);
18318: }
18319: if (true) {
18320: final Pair<Node> list$3431 = Analyzer
18321: .cast(Analyzer.cast(arg$3429));
18322: final Node x = GNode.cast(Primitives
18323: .wrapHead(list$3431));
18324: final Pair<Node> xs = Analyzer.cast(Primitives
18325: .wrapTail(list$3431));
18326:
18327: return Analyzer.cast(Primitives.or.apply(
18328: isUsedVariable.apply(s, x),
18329: isUsedInList.apply(s, xs)));
18330: }
18331: return null;
18332: }
18333: }.apply();
18334: }
18335: };
18336:
18337: final Function.F2<Boolean, String, Node> isUsedVariable = new Function.F2<Boolean, String, Node>() {
18338: public Boolean apply(final String s, final Node no) {
18339: return (null == Primitives.isBottom.apply(no) ? null
18340: : Primitives.isBottom.apply(no) ? Boolean.FALSE
18341: : new Match<Boolean>() {
18342: public Boolean apply() {
18343: final Node arg$3433 = GNode
18344: .cast(no);
18345:
18346: if ((null == arg$3433)) {
18347: return null;
18348: }
18349: if (TypicalSupport
18350: .match$479(arg$3433)) {
18351: final Pair<Node> nl = Analyzer
18352: .cast(Primitives
18353: .getChildren(
18354: arg$3433,
18355: 0,
18356: arg$3433
18357: .size()));
18358:
18359: matching_nodes.add(arg$3433);
18360: if ((null != arg$3433 && processScopeNodes
18361: .contains(arg$3433
18362: .getName()))) {
18363: processScope(arg$3433,
18364: getScope);
18365: }
18366: checkEnterScope(arg$3433);
18367:
18368: final Object retValue$3437 = Analyzer
18369: .cast(isUsedInList
18370: .apply(s, nl));
18371:
18372: checkExitScope(arg$3433);
18373: matching_nodes
18374: .remove(matching_nodes
18375: .size() - 1);
18376: return Analyzer
18377: .cast(retValue$3437);
18378: }
18379: if (TypicalSupport
18380: .match$679(arg$3433)) {
18381: final Pair<Node> nl = Analyzer
18382: .cast(Primitives
18383: .getChildren(
18384: arg$3433,
18385: 0,
18386: arg$3433
18387: .size()));
18388:
18389: matching_nodes.add(arg$3433);
18390: if ((null != arg$3433 && processScopeNodes
18391: .contains(arg$3433
18392: .getName()))) {
18393: processScope(arg$3433,
18394: getScope);
18395: }
18396: checkEnterScope(arg$3433);
18397:
18398: final Object retValue$3441 = Analyzer
18399: .cast(isUsedInList
18400: .apply(s, nl));
18401:
18402: checkExitScope(arg$3433);
18403: matching_nodes
18404: .remove(matching_nodes
18405: .size() - 1);
18406: return Analyzer
18407: .cast(retValue$3441);
18408: }
18409: if (TypicalSupport
18410: .match$3405(arg$3433)) {
18411: final Pair<Node> nl = Analyzer
18412: .cast(Primitives
18413: .getChildren(
18414: arg$3433,
18415: 0,
18416: arg$3433
18417: .size()));
18418:
18419: matching_nodes.add(arg$3433);
18420: if ((null != arg$3433 && processScopeNodes
18421: .contains(arg$3433
18422: .getName()))) {
18423: processScope(arg$3433,
18424: getScope);
18425: }
18426: checkEnterScope(arg$3433);
18427:
18428: final Object retValue$3445 = Analyzer
18429: .cast(isUsedInList
18430: .apply(s, nl));
18431:
18432: checkExitScope(arg$3433);
18433: matching_nodes
18434: .remove(matching_nodes
18435: .size() - 1);
18436: return Analyzer
18437: .cast(retValue$3445);
18438: }
18439: if (TypicalSupport
18440: .match$2400(arg$3433)) {
18441: final Pair<Node> nl = Analyzer
18442: .cast(Primitives
18443: .getChildren(
18444: arg$3433,
18445: 0,
18446: arg$3433
18447: .size()));
18448:
18449: matching_nodes.add(arg$3433);
18450: if ((null != arg$3433 && processScopeNodes
18451: .contains(arg$3433
18452: .getName()))) {
18453: processScope(arg$3433,
18454: getScope);
18455: }
18456: checkEnterScope(arg$3433);
18457:
18458: final Object retValue$3449 = Analyzer
18459: .cast(isUsedInList
18460: .apply(s, nl));
18461:
18462: checkExitScope(arg$3433);
18463: matching_nodes
18464: .remove(matching_nodes
18465: .size() - 1);
18466: return Analyzer
18467: .cast(retValue$3449);
18468: }
18469: if (TypicalSupport
18470: .match$9(arg$3433)) {
18471: final Pair<Node> nl = Analyzer
18472: .cast(Primitives
18473: .getChildren(
18474: arg$3433,
18475: 1,
18476: arg$3433
18477: .size()));
18478:
18479: matching_nodes.add(arg$3433);
18480: if ((null != arg$3433 && processScopeNodes
18481: .contains(arg$3433
18482: .getName()))) {
18483: processScope(arg$3433,
18484: getScope);
18485: }
18486: checkEnterScope(arg$3433);
18487:
18488: final Object retValue$3453 = Analyzer
18489: .cast(isUsedInList
18490: .apply(s, nl));
18491:
18492: checkExitScope(arg$3433);
18493: matching_nodes
18494: .remove(matching_nodes
18495: .size() - 1);
18496: return Analyzer
18497: .cast(retValue$3453);
18498: }
18499: if (TypicalSupport
18500: .match$2509(arg$3433)) {
18501: final Pair<Node> nl = Analyzer
18502: .cast(Primitives
18503: .getChildren(
18504: arg$3433,
18505: 0,
18506: arg$3433
18507: .size()));
18508:
18509: matching_nodes.add(arg$3433);
18510: if ((null != arg$3433 && processScopeNodes
18511: .contains(arg$3433
18512: .getName()))) {
18513: processScope(arg$3433,
18514: getScope);
18515: }
18516: checkEnterScope(arg$3433);
18517:
18518: final Object retValue$3457 = Analyzer
18519: .cast(isUsedInList
18520: .apply(s, nl));
18521:
18522: checkExitScope(arg$3433);
18523: matching_nodes
18524: .remove(matching_nodes
18525: .size() - 1);
18526: return Analyzer
18527: .cast(retValue$3457);
18528: }
18529: if (TypicalSupport
18530: .match$2809(arg$3433)) {
18531: final Pair<Node> nl = Analyzer
18532: .cast(Primitives
18533: .getChildren(
18534: arg$3433,
18535: 0,
18536: arg$3433
18537: .size()));
18538:
18539: matching_nodes.add(arg$3433);
18540: if ((null != arg$3433 && processScopeNodes
18541: .contains(arg$3433
18542: .getName()))) {
18543: processScope(arg$3433,
18544: getScope);
18545: }
18546: checkEnterScope(arg$3433);
18547:
18548: final Object retValue$3461 = Analyzer
18549: .cast(isUsedInList
18550: .apply(s, nl));
18551:
18552: checkExitScope(arg$3433);
18553: matching_nodes
18554: .remove(matching_nodes
18555: .size() - 1);
18556: return Analyzer
18557: .cast(retValue$3461);
18558: }
18559: if (TypicalSupport
18560: .match$269(arg$3433)) {
18561: final Pair<Node> nl = Analyzer
18562: .cast(Primitives
18563: .getChildren(
18564: arg$3433,
18565: 0,
18566: arg$3433
18567: .size()));
18568:
18569: matching_nodes.add(arg$3433);
18570: if ((null != arg$3433 && processScopeNodes
18571: .contains(arg$3433
18572: .getName()))) {
18573: processScope(arg$3433,
18574: getScope);
18575: }
18576: checkEnterScope(arg$3433);
18577:
18578: final Object retValue$3465 = Analyzer
18579: .cast(isUsedInList
18580: .apply(s, nl));
18581:
18582: checkExitScope(arg$3433);
18583: matching_nodes
18584: .remove(matching_nodes
18585: .size() - 1);
18586: return Analyzer
18587: .cast(retValue$3465);
18588: }
18589: if (TypicalSupport
18590: .match$277(arg$3433)) {
18591: final Pair<Node> nl = Analyzer
18592: .cast(Primitives
18593: .getChildren(
18594: arg$3433,
18595: 0,
18596: arg$3433
18597: .size()));
18598:
18599: matching_nodes.add(arg$3433);
18600: if ((null != arg$3433 && processScopeNodes
18601: .contains(arg$3433
18602: .getName()))) {
18603: processScope(arg$3433,
18604: getScope);
18605: }
18606: checkEnterScope(arg$3433);
18607:
18608: final Object retValue$3469 = Analyzer
18609: .cast(isUsedInList
18610: .apply(s, nl));
18611:
18612: checkExitScope(arg$3433);
18613: matching_nodes
18614: .remove(matching_nodes
18615: .size() - 1);
18616: return Analyzer
18617: .cast(retValue$3469);
18618: }
18619: if (TypicalSupport
18620: .match$283(arg$3433)) {
18621: final Pair<Node> nl = Analyzer
18622: .cast(Primitives
18623: .getChildren(
18624: arg$3433,
18625: 0,
18626: arg$3433
18627: .size()));
18628:
18629: matching_nodes.add(arg$3433);
18630: if ((null != arg$3433 && processScopeNodes
18631: .contains(arg$3433
18632: .getName()))) {
18633: processScope(arg$3433,
18634: getScope);
18635: }
18636: checkEnterScope(arg$3433);
18637:
18638: final Object retValue$3473 = Analyzer
18639: .cast(isUsedInList
18640: .apply(s, nl));
18641:
18642: checkExitScope(arg$3433);
18643: matching_nodes
18644: .remove(matching_nodes
18645: .size() - 1);
18646: return Analyzer
18647: .cast(retValue$3473);
18648: }
18649: if (TypicalSupport
18650: .match$3474(arg$3433)) {
18651: final Pair<Node> nl = Analyzer
18652: .cast(Primitives
18653: .getChildren(
18654: arg$3433,
18655: 0,
18656: arg$3433
18657: .size()));
18658:
18659: matching_nodes.add(arg$3433);
18660: if ((null != arg$3433 && processScopeNodes
18661: .contains(arg$3433
18662: .getName()))) {
18663: processScope(arg$3433,
18664: getScope);
18665: }
18666: checkEnterScope(arg$3433);
18667:
18668: final Object retValue$3477 = Analyzer
18669: .cast(isUsedInList
18670: .apply(s, nl));
18671:
18672: checkExitScope(arg$3433);
18673: matching_nodes
18674: .remove(matching_nodes
18675: .size() - 1);
18676: return Analyzer
18677: .cast(retValue$3477);
18678: }
18679: if (TypicalSupport
18680: .match$321(arg$3433)) {
18681: final Pair<Node> nl = Analyzer
18682: .cast(Primitives
18683: .getChildren(
18684: arg$3433,
18685: 0,
18686: arg$3433
18687: .size()));
18688:
18689: matching_nodes.add(arg$3433);
18690: if ((null != arg$3433 && processScopeNodes
18691: .contains(arg$3433
18692: .getName()))) {
18693: processScope(arg$3433,
18694: getScope);
18695: }
18696: checkEnterScope(arg$3433);
18697:
18698: final Object retValue$3481 = Analyzer
18699: .cast(isUsedInList
18700: .apply(s, nl));
18701:
18702: checkExitScope(arg$3433);
18703: matching_nodes
18704: .remove(matching_nodes
18705: .size() - 1);
18706: return Analyzer
18707: .cast(retValue$3481);
18708: }
18709: if (TypicalSupport
18710: .match$339(arg$3433)) {
18711: final Pair<Node> nl = Analyzer
18712: .cast(Primitives
18713: .getChildren(
18714: arg$3433,
18715: 0,
18716: arg$3433
18717: .size()));
18718:
18719: matching_nodes.add(arg$3433);
18720: if ((null != arg$3433 && processScopeNodes
18721: .contains(arg$3433
18722: .getName()))) {
18723: processScope(arg$3433,
18724: getScope);
18725: }
18726: checkEnterScope(arg$3433);
18727:
18728: final Object retValue$3485 = Analyzer
18729: .cast(isUsedInList
18730: .apply(s, nl));
18731:
18732: checkExitScope(arg$3433);
18733: matching_nodes
18734: .remove(matching_nodes
18735: .size() - 1);
18736: return Analyzer
18737: .cast(retValue$3485);
18738: }
18739: if (TypicalSupport
18740: .match$3413(arg$3433)) {
18741: final Pair<Node> nl = Analyzer
18742: .cast(Primitives
18743: .getChildren(
18744: arg$3433,
18745: 0,
18746: arg$3433
18747: .size()));
18748:
18749: matching_nodes.add(arg$3433);
18750: if ((null != arg$3433 && processScopeNodes
18751: .contains(arg$3433
18752: .getName()))) {
18753: processScope(arg$3433,
18754: getScope);
18755: }
18756: checkEnterScope(arg$3433);
18757:
18758: final Object retValue$3489 = Analyzer
18759: .cast(isUsedInList
18760: .apply(s, nl));
18761:
18762: checkExitScope(arg$3433);
18763: matching_nodes
18764: .remove(matching_nodes
18765: .size() - 1);
18766: return Analyzer
18767: .cast(retValue$3489);
18768: }
18769: if (TypicalSupport
18770: .match$5(arg$3433)) {
18771: final Pair<Node> nl = Analyzer
18772: .cast(Primitives
18773: .getChildren(
18774: arg$3433,
18775: 1,
18776: arg$3433
18777: .size()));
18778:
18779: matching_nodes.add(arg$3433);
18780: if ((null != arg$3433 && processScopeNodes
18781: .contains(arg$3433
18782: .getName()))) {
18783: processScope(arg$3433,
18784: getScope);
18785: }
18786: checkEnterScope(arg$3433);
18787:
18788: final Object retValue$3493 = Analyzer
18789: .cast(isUsedInList
18790: .apply(s, nl));
18791:
18792: checkExitScope(arg$3433);
18793: matching_nodes
18794: .remove(matching_nodes
18795: .size() - 1);
18796: return Analyzer
18797: .cast(retValue$3493);
18798: }
18799: if (TypicalSupport
18800: .match$192(arg$3433)) {
18801: final Pair<Node> nl = Analyzer
18802: .cast(Primitives
18803: .getChildren(
18804: arg$3433,
18805: 0,
18806: arg$3433
18807: .size()));
18808:
18809: matching_nodes.add(arg$3433);
18810: if ((null != arg$3433 && processScopeNodes
18811: .contains(arg$3433
18812: .getName()))) {
18813: processScope(arg$3433,
18814: getScope);
18815: }
18816: checkEnterScope(arg$3433);
18817:
18818: final Object retValue$3497 = Analyzer
18819: .cast(isUsedInList
18820: .apply(s, nl));
18821:
18822: checkExitScope(arg$3433);
18823: matching_nodes
18824: .remove(matching_nodes
18825: .size() - 1);
18826: return Analyzer
18827: .cast(retValue$3497);
18828: }
18829: if (TypicalSupport
18830: .match$183(arg$3433)) {
18831: final Pair<Node> nl = Analyzer
18832: .cast(Primitives
18833: .getChildren(
18834: arg$3433,
18835: 0,
18836: arg$3433
18837: .size()));
18838:
18839: matching_nodes.add(arg$3433);
18840: if ((null != arg$3433 && processScopeNodes
18841: .contains(arg$3433
18842: .getName()))) {
18843: processScope(arg$3433,
18844: getScope);
18845: }
18846: checkEnterScope(arg$3433);
18847:
18848: final Object retValue$3501 = Analyzer
18849: .cast(isUsedInList
18850: .apply(s, nl));
18851:
18852: checkExitScope(arg$3433);
18853: matching_nodes
18854: .remove(matching_nodes
18855: .size() - 1);
18856: return Analyzer
18857: .cast(retValue$3501);
18858: }
18859: if (TypicalSupport
18860: .match$2868(arg$3433)) {
18861: final Pair<Node> nl = Analyzer
18862: .cast(Primitives
18863: .getChildren(
18864: arg$3433,
18865: 0,
18866: arg$3433
18867: .size()));
18868:
18869: matching_nodes.add(arg$3433);
18870: if ((null != arg$3433 && processScopeNodes
18871: .contains(arg$3433
18872: .getName()))) {
18873: processScope(arg$3433,
18874: getScope);
18875: }
18876: checkEnterScope(arg$3433);
18877:
18878: final Object retValue$3505 = Analyzer
18879: .cast(isUsedInList
18880: .apply(s, nl));
18881:
18882: checkExitScope(arg$3433);
18883: matching_nodes
18884: .remove(matching_nodes
18885: .size() - 1);
18886: return Analyzer
18887: .cast(retValue$3505);
18888: }
18889: if (TypicalSupport
18890: .match$3401(arg$3433)) {
18891: final Pair<Node> nl = Analyzer
18892: .cast(Primitives
18893: .getChildren(
18894: arg$3433,
18895: 0,
18896: arg$3433
18897: .size()));
18898:
18899: matching_nodes.add(arg$3433);
18900: if ((null != arg$3433 && processScopeNodes
18901: .contains(arg$3433
18902: .getName()))) {
18903: processScope(arg$3433,
18904: getScope);
18905: }
18906: checkEnterScope(arg$3433);
18907:
18908: final Object retValue$3509 = Analyzer
18909: .cast(isUsedInList
18910: .apply(s, nl));
18911:
18912: checkExitScope(arg$3433);
18913: matching_nodes
18914: .remove(matching_nodes
18915: .size() - 1);
18916: return Analyzer
18917: .cast(retValue$3509);
18918: }
18919: if (TypicalSupport
18920: .match$2273(arg$3433)) {
18921: final Node n = (arg$3433.size() > 0 ? arg$3433
18922: .getGeneric(0)
18923: : null);
18924:
18925: matching_nodes.add(arg$3433);
18926: if ((null != arg$3433 && processScopeNodes
18927: .contains(arg$3433
18928: .getName()))) {
18929: processScope(arg$3433,
18930: getScope);
18931: }
18932: checkEnterScope(arg$3433);
18933:
18934: final Object retValue$3513 = Analyzer
18935: .cast(isUsedVariable
18936: .apply(s, n));
18937:
18938: checkExitScope(arg$3433);
18939: matching_nodes
18940: .remove(matching_nodes
18941: .size() - 1);
18942: return Analyzer
18943: .cast(retValue$3513);
18944: }
18945: if (TypicalSupport
18946: .match$49(arg$3433)) {
18947: final Node n = (arg$3433.size() > 0 ? arg$3433
18948: .getGeneric(0)
18949: : null);
18950:
18951: matching_nodes.add(arg$3433);
18952: if ((null != arg$3433 && processScopeNodes
18953: .contains(arg$3433
18954: .getName()))) {
18955: processScope(arg$3433,
18956: getScope);
18957: }
18958: checkEnterScope(arg$3433);
18959:
18960: final Object retValue$3517 = Analyzer
18961: .cast(isUsedVariable
18962: .apply(s, n));
18963:
18964: checkExitScope(arg$3433);
18965: matching_nodes
18966: .remove(matching_nodes
18967: .size() - 1);
18968: return Analyzer
18969: .cast(retValue$3517);
18970: }
18971: if (TypicalSupport
18972: .match$2379(arg$3433)) {
18973: final Node n = (arg$3433.size() > 0 ? arg$3433
18974: .getGeneric(0)
18975: : null);
18976:
18977: matching_nodes.add(arg$3433);
18978: if ((null != arg$3433 && processScopeNodes
18979: .contains(arg$3433
18980: .getName()))) {
18981: processScope(arg$3433,
18982: getScope);
18983: }
18984: checkEnterScope(arg$3433);
18985:
18986: final Object retValue$3521 = Analyzer
18987: .cast(isUsedVariable
18988: .apply(s, n));
18989:
18990: checkExitScope(arg$3433);
18991: matching_nodes
18992: .remove(matching_nodes
18993: .size() - 1);
18994: return Analyzer
18995: .cast(retValue$3521);
18996: }
18997: if (TypicalSupport
18998: .match$2390(arg$3433)) {
18999: final Node n = (arg$3433.size() > 0 ? arg$3433
19000: .getGeneric(0)
19001: : null);
19002:
19003: matching_nodes.add(arg$3433);
19004: if ((null != arg$3433 && processScopeNodes
19005: .contains(arg$3433
19006: .getName()))) {
19007: processScope(arg$3433,
19008: getScope);
19009: }
19010: checkEnterScope(arg$3433);
19011:
19012: final Object retValue$3525 = Analyzer
19013: .cast(isUsedVariable
19014: .apply(s, n));
19015:
19016: checkExitScope(arg$3433);
19017: matching_nodes
19018: .remove(matching_nodes
19019: .size() - 1);
19020: return Analyzer
19021: .cast(retValue$3525);
19022: }
19023: if (TypicalSupport
19024: .match$45(arg$3433)) {
19025: final Node n = (arg$3433.size() > 1 ? arg$3433
19026: .getGeneric(1)
19027: : null);
19028:
19029: matching_nodes.add(arg$3433);
19030: if ((null != arg$3433 && processScopeNodes
19031: .contains(arg$3433
19032: .getName()))) {
19033: processScope(arg$3433,
19034: getScope);
19035: }
19036: checkEnterScope(arg$3433);
19037:
19038: final Object retValue$3529 = Analyzer
19039: .cast(isUsedVariable
19040: .apply(s, n));
19041:
19042: checkExitScope(arg$3433);
19043: matching_nodes
19044: .remove(matching_nodes
19045: .size() - 1);
19046: return Analyzer
19047: .cast(retValue$3529);
19048: }
19049: if (TypicalSupport
19050: .match$3256(arg$3433)) {
19051: final Node n = (arg$3433.size() > 1 ? arg$3433
19052: .getGeneric(1)
19053: : null);
19054:
19055: matching_nodes.add(arg$3433);
19056: if ((null != arg$3433 && processScopeNodes
19057: .contains(arg$3433
19058: .getName()))) {
19059: processScope(arg$3433,
19060: getScope);
19061: }
19062: checkEnterScope(arg$3433);
19063:
19064: final Object retValue$3533 = Analyzer
19065: .cast(isUsedVariable
19066: .apply(s, n));
19067:
19068: checkExitScope(arg$3433);
19069: matching_nodes
19070: .remove(matching_nodes
19071: .size() - 1);
19072: return Analyzer
19073: .cast(retValue$3533);
19074: }
19075: if (TypicalSupport
19076: .match$13(arg$3433)) {
19077: final Node n = (arg$3433.size() > 1 ? arg$3433
19078: .getGeneric(1)
19079: : null);
19080:
19081: matching_nodes.add(arg$3433);
19082: if ((null != arg$3433 && processScopeNodes
19083: .contains(arg$3433
19084: .getName()))) {
19085: processScope(arg$3433,
19086: getScope);
19087: }
19088: checkEnterScope(arg$3433);
19089:
19090: final Object retValue$3537 = Analyzer
19091: .cast(isUsedVariable
19092: .apply(s, n));
19093:
19094: checkExitScope(arg$3433);
19095: matching_nodes
19096: .remove(matching_nodes
19097: .size() - 1);
19098: return Analyzer
19099: .cast(retValue$3537);
19100: }
19101: if (TypicalSupport
19102: .match$41(arg$3433)) {
19103: final Node n = (arg$3433.size() > 1 ? arg$3433
19104: .getGeneric(1)
19105: : null);
19106:
19107: matching_nodes.add(arg$3433);
19108: if ((null != arg$3433 && processScopeNodes
19109: .contains(arg$3433
19110: .getName()))) {
19111: processScope(arg$3433,
19112: getScope);
19113: }
19114: checkEnterScope(arg$3433);
19115:
19116: final Object retValue$3541 = Analyzer
19117: .cast(isUsedVariable
19118: .apply(s, n));
19119:
19120: checkExitScope(arg$3433);
19121: matching_nodes
19122: .remove(matching_nodes
19123: .size() - 1);
19124: return Analyzer
19125: .cast(retValue$3541);
19126: }
19127: if (TypicalSupport
19128: .match$2884(arg$3433)) {
19129: final Node n = (arg$3433.size() > 0 ? arg$3433
19130: .getGeneric(0)
19131: : null);
19132:
19133: matching_nodes.add(arg$3433);
19134: if ((null != arg$3433 && processScopeNodes
19135: .contains(arg$3433
19136: .getName()))) {
19137: processScope(arg$3433,
19138: getScope);
19139: }
19140: checkEnterScope(arg$3433);
19141:
19142: final Object retValue$3545 = Analyzer
19143: .cast(isUsedVariable
19144: .apply(s, n));
19145:
19146: checkExitScope(arg$3433);
19147: matching_nodes
19148: .remove(matching_nodes
19149: .size() - 1);
19150: return Analyzer
19151: .cast(retValue$3545);
19152: }
19153: if (TypicalSupport
19154: .match$25(arg$3433)) {
19155: final Node n = (arg$3433.size() > 0 ? arg$3433
19156: .getGeneric(0)
19157: : null);
19158:
19159: matching_nodes.add(arg$3433);
19160: if ((null != arg$3433 && processScopeNodes
19161: .contains(arg$3433
19162: .getName()))) {
19163: processScope(arg$3433,
19164: getScope);
19165: }
19166: checkEnterScope(arg$3433);
19167:
19168: final Object retValue$3549 = Analyzer
19169: .cast(isUsedVariable
19170: .apply(s, n));
19171:
19172: checkExitScope(arg$3433);
19173: matching_nodes
19174: .remove(matching_nodes
19175: .size() - 1);
19176: return Analyzer
19177: .cast(retValue$3549);
19178: }
19179: if (TypicalSupport
19180: .match$2910(arg$3433)) {
19181: final Node n = (arg$3433.size() > 0 ? arg$3433
19182: .getGeneric(0)
19183: : null);
19184:
19185: matching_nodes.add(arg$3433);
19186: if ((null != arg$3433 && processScopeNodes
19187: .contains(arg$3433
19188: .getName()))) {
19189: processScope(arg$3433,
19190: getScope);
19191: }
19192: checkEnterScope(arg$3433);
19193:
19194: final Object retValue$3553 = Analyzer
19195: .cast(isUsedVariable
19196: .apply(s, n));
19197:
19198: checkExitScope(arg$3433);
19199: matching_nodes
19200: .remove(matching_nodes
19201: .size() - 1);
19202: return Analyzer
19203: .cast(retValue$3553);
19204: }
19205: if (TypicalSupport
19206: .match$2860(arg$3433)) {
19207: final Node n = (arg$3433.size() > 0 ? arg$3433
19208: .getGeneric(0)
19209: : null);
19210:
19211: matching_nodes.add(arg$3433);
19212: if ((null != arg$3433 && processScopeNodes
19213: .contains(arg$3433
19214: .getName()))) {
19215: processScope(arg$3433,
19216: getScope);
19217: }
19218: checkEnterScope(arg$3433);
19219:
19220: final Object retValue$3557 = Analyzer
19221: .cast(isUsedVariable
19222: .apply(s, n));
19223:
19224: checkExitScope(arg$3433);
19225: matching_nodes
19226: .remove(matching_nodes
19227: .size() - 1);
19228: return Analyzer
19229: .cast(retValue$3557);
19230: }
19231: if (TypicalSupport
19232: .match$2537(arg$3433)) {
19233: final Node n = (arg$3433.size() > 0 ? arg$3433
19234: .getGeneric(0)
19235: : null);
19236:
19237: matching_nodes.add(arg$3433);
19238: if ((null != arg$3433 && processScopeNodes
19239: .contains(arg$3433
19240: .getName()))) {
19241: processScope(arg$3433,
19242: getScope);
19243: }
19244: checkEnterScope(arg$3433);
19245:
19246: final Object retValue$3561 = Analyzer
19247: .cast(isUsedVariable
19248: .apply(s, n));
19249:
19250: checkExitScope(arg$3433);
19251: matching_nodes
19252: .remove(matching_nodes
19253: .size() - 1);
19254: return Analyzer
19255: .cast(retValue$3561);
19256: }
19257: if (TypicalSupport
19258: .match$57(arg$3433)) {
19259: final Node n = (arg$3433.size() > 0 ? arg$3433
19260: .getGeneric(0)
19261: : null);
19262:
19263: matching_nodes.add(arg$3433);
19264: if ((null != arg$3433 && processScopeNodes
19265: .contains(arg$3433
19266: .getName()))) {
19267: processScope(arg$3433,
19268: getScope);
19269: }
19270: checkEnterScope(arg$3433);
19271:
19272: final Object retValue$3565 = Analyzer
19273: .cast(isUsedVariable
19274: .apply(s, n));
19275:
19276: checkExitScope(arg$3433);
19277: matching_nodes
19278: .remove(matching_nodes
19279: .size() - 1);
19280: return Analyzer
19281: .cast(retValue$3565);
19282: }
19283: if (TypicalSupport
19284: .match$84(arg$3433)) {
19285: final Node n = (arg$3433.size() > 1 ? arg$3433
19286: .getGeneric(1)
19287: : null);
19288:
19289: matching_nodes.add(arg$3433);
19290: if ((null != arg$3433 && processScopeNodes
19291: .contains(arg$3433
19292: .getName()))) {
19293: processScope(arg$3433,
19294: getScope);
19295: }
19296: checkEnterScope(arg$3433);
19297:
19298: final Object retValue$3569 = Analyzer
19299: .cast(new Let<Boolean>() {
19300: final Pair<String> strList;
19301:
19302: {
19303: strList = Analyzer
19304: .cast(retrieveVariables
19305: .apply(no));
19306: }
19307:
19308: public Boolean apply() {
19309: return Analyzer
19310: .cast(null == Primitives.contains
19311: .apply(
19312: s,
19313: strList) ? null
19314: : Primitives.contains
19315: .apply(
19316: s,
19317: strList) ? Boolean.FALSE
19318: : isUsedVariable
19319: .apply(
19320: s,
19321: n));
19322: }
19323: }.apply());
19324:
19325: checkExitScope(arg$3433);
19326: matching_nodes
19327: .remove(matching_nodes
19328: .size() - 1);
19329: return Analyzer
19330: .cast(retValue$3569);
19331: }
19332: if (TypicalSupport
19333: .match$83(arg$3433)) {
19334: final Node n1 = (arg$3433
19335: .size() > 0 ? arg$3433
19336: .getGeneric(0) : null);
19337: final Node n2 = (arg$3433
19338: .size() > 1 ? arg$3433
19339: .getGeneric(1) : null);
19340:
19341: matching_nodes.add(arg$3433);
19342: if ((null != arg$3433 && processScopeNodes
19343: .contains(arg$3433
19344: .getName()))) {
19345: processScope(arg$3433,
19346: getScope);
19347: }
19348: checkEnterScope(arg$3433);
19349:
19350: final Object retValue$3573 = Analyzer
19351: .cast(new Let<Boolean>() {
19352: final Pair<String> strList;
19353:
19354: {
19355: strList = Analyzer
19356: .cast(retrieveVariables
19357: .apply(no));
19358: }
19359:
19360: public Boolean apply() {
19361: return Analyzer
19362: .cast(null == Primitives.contains
19363: .apply(
19364: s,
19365: strList) ? null
19366: : Primitives.contains
19367: .apply(
19368: s,
19369: strList) ? Boolean.FALSE
19370: : Primitives.or
19371: .apply(
19372: isUsedVariable
19373: .apply(
19374: s,
19375: n1),
19376: isUsedVariable
19377: .apply(
19378: s,
19379: n2)));
19380: }
19381: }.apply());
19382:
19383: checkExitScope(arg$3433);
19384: matching_nodes
19385: .remove(matching_nodes
19386: .size() - 1);
19387: return Analyzer
19388: .cast(retValue$3573);
19389: }
19390: if (TypicalSupport
19391: .match$483(arg$3433)) {
19392: final Node n1 = (arg$3433
19393: .size() > 0 ? arg$3433
19394: .getGeneric(0) : null);
19395: final Node n2 = (arg$3433
19396: .size() > 1 ? arg$3433
19397: .getGeneric(1) : null);
19398:
19399: matching_nodes.add(arg$3433);
19400: if ((null != arg$3433 && processScopeNodes
19401: .contains(arg$3433
19402: .getName()))) {
19403: processScope(arg$3433,
19404: getScope);
19405: }
19406: checkEnterScope(arg$3433);
19407:
19408: final Object retValue$3577 = Analyzer
19409: .cast(Primitives.or
19410: .apply(
19411: isUsedVariable
19412: .apply(
19413: s,
19414: n1),
19415: isUsedVariable
19416: .apply(
19417: s,
19418: n2)));
19419:
19420: checkExitScope(arg$3433);
19421: matching_nodes
19422: .remove(matching_nodes
19423: .size() - 1);
19424: return Analyzer
19425: .cast(retValue$3577);
19426: }
19427: if (TypicalSupport
19428: .match$491(arg$3433)) {
19429: final Node n1 = (arg$3433
19430: .size() > 0 ? arg$3433
19431: .getGeneric(0) : null);
19432: final Node n2 = (arg$3433
19433: .size() > 1 ? arg$3433
19434: .getGeneric(1) : null);
19435:
19436: matching_nodes.add(arg$3433);
19437: if ((null != arg$3433 && processScopeNodes
19438: .contains(arg$3433
19439: .getName()))) {
19440: processScope(arg$3433,
19441: getScope);
19442: }
19443: checkEnterScope(arg$3433);
19444:
19445: final Object retValue$3581 = Analyzer
19446: .cast(Primitives.or
19447: .apply(
19448: isUsedVariable
19449: .apply(
19450: s,
19451: n1),
19452: isUsedVariable
19453: .apply(
19454: s,
19455: n2)));
19456:
19457: checkExitScope(arg$3433);
19458: matching_nodes
19459: .remove(matching_nodes
19460: .size() - 1);
19461: return Analyzer
19462: .cast(retValue$3581);
19463: }
19464: if (TypicalSupport
19465: .match$499(arg$3433)) {
19466: final Node n1 = (arg$3433
19467: .size() > 0 ? arg$3433
19468: .getGeneric(0) : null);
19469: final Node n2 = (arg$3433
19470: .size() > 2 ? arg$3433
19471: .getGeneric(2) : null);
19472:
19473: matching_nodes.add(arg$3433);
19474: if ((null != arg$3433 && processScopeNodes
19475: .contains(arg$3433
19476: .getName()))) {
19477: processScope(arg$3433,
19478: getScope);
19479: }
19480: checkEnterScope(arg$3433);
19481:
19482: final Object retValue$3585 = Analyzer
19483: .cast(Primitives.or
19484: .apply(
19485: isUsedVariable
19486: .apply(
19487: s,
19488: n1),
19489: isUsedVariable
19490: .apply(
19491: s,
19492: n2)));
19493:
19494: checkExitScope(arg$3433);
19495: matching_nodes
19496: .remove(matching_nodes
19497: .size() - 1);
19498: return Analyzer
19499: .cast(retValue$3585);
19500: }
19501: if (TypicalSupport
19502: .match$505(arg$3433)) {
19503: final Node n1 = (arg$3433
19504: .size() > 0 ? arg$3433
19505: .getGeneric(0) : null);
19506: final Node n2 = (arg$3433
19507: .size() > 2 ? arg$3433
19508: .getGeneric(2) : null);
19509:
19510: matching_nodes.add(arg$3433);
19511: if ((null != arg$3433 && processScopeNodes
19512: .contains(arg$3433
19513: .getName()))) {
19514: processScope(arg$3433,
19515: getScope);
19516: }
19517: checkEnterScope(arg$3433);
19518:
19519: final Object retValue$3589 = Analyzer
19520: .cast(Primitives.or
19521: .apply(
19522: isUsedVariable
19523: .apply(
19524: s,
19525: n1),
19526: isUsedVariable
19527: .apply(
19528: s,
19529: n2)));
19530:
19531: checkExitScope(arg$3433);
19532: matching_nodes
19533: .remove(matching_nodes
19534: .size() - 1);
19535: return Analyzer
19536: .cast(retValue$3589);
19537: }
19538: if (TypicalSupport
19539: .match$553(arg$3433)) {
19540: final Node n1 = (arg$3433
19541: .size() > 0 ? arg$3433
19542: .getGeneric(0) : null);
19543: final Node n2 = (arg$3433
19544: .size() > 2 ? arg$3433
19545: .getGeneric(2) : null);
19546:
19547: matching_nodes.add(arg$3433);
19548: if ((null != arg$3433 && processScopeNodes
19549: .contains(arg$3433
19550: .getName()))) {
19551: processScope(arg$3433,
19552: getScope);
19553: }
19554: checkEnterScope(arg$3433);
19555:
19556: final Object retValue$3593 = Analyzer
19557: .cast(Primitives.or
19558: .apply(
19559: isUsedVariable
19560: .apply(
19561: s,
19562: n1),
19563: isUsedVariable
19564: .apply(
19565: s,
19566: n2)));
19567:
19568: checkExitScope(arg$3433);
19569: matching_nodes
19570: .remove(matching_nodes
19571: .size() - 1);
19572: return Analyzer
19573: .cast(retValue$3593);
19574: }
19575: if (TypicalSupport
19576: .match$609(arg$3433)) {
19577: final Node n1 = (arg$3433
19578: .size() > 0 ? arg$3433
19579: .getGeneric(0) : null);
19580: final Node n2 = (arg$3433
19581: .size() > 2 ? arg$3433
19582: .getGeneric(2) : null);
19583:
19584: matching_nodes.add(arg$3433);
19585: if ((null != arg$3433 && processScopeNodes
19586: .contains(arg$3433
19587: .getName()))) {
19588: processScope(arg$3433,
19589: getScope);
19590: }
19591: checkEnterScope(arg$3433);
19592:
19593: final Object retValue$3597 = Analyzer
19594: .cast(Primitives.or
19595: .apply(
19596: isUsedVariable
19597: .apply(
19598: s,
19599: n1),
19600: isUsedVariable
19601: .apply(
19602: s,
19603: n2)));
19604:
19605: checkExitScope(arg$3433);
19606: matching_nodes
19607: .remove(matching_nodes
19608: .size() - 1);
19609: return Analyzer
19610: .cast(retValue$3597);
19611: }
19612: if (TypicalSupport
19613: .match$673(arg$3433)) {
19614: final Node n1 = (arg$3433
19615: .size() > 0 ? arg$3433
19616: .getGeneric(0) : null);
19617: final Node n2 = (arg$3433
19618: .size() > 1 ? arg$3433
19619: .getGeneric(1) : null);
19620:
19621: matching_nodes.add(arg$3433);
19622: if ((null != arg$3433 && processScopeNodes
19623: .contains(arg$3433
19624: .getName()))) {
19625: processScope(arg$3433,
19626: getScope);
19627: }
19628: checkEnterScope(arg$3433);
19629:
19630: final Object retValue$3601 = Analyzer
19631: .cast(Primitives.or
19632: .apply(
19633: isUsedVariable
19634: .apply(
19635: s,
19636: n1),
19637: isUsedVariable
19638: .apply(
19639: s,
19640: n2)));
19641:
19642: checkExitScope(arg$3433);
19643: matching_nodes
19644: .remove(matching_nodes
19645: .size() - 1);
19646: return Analyzer
19647: .cast(retValue$3601);
19648: }
19649: if (TypicalSupport
19650: .match$2267(arg$3433)) {
19651: final Node n1 = (arg$3433
19652: .size() > 0 ? arg$3433
19653: .getGeneric(0) : null);
19654: final Node n2 = (arg$3433
19655: .size() > 1 ? arg$3433
19656: .getGeneric(1) : null);
19657:
19658: matching_nodes.add(arg$3433);
19659: if ((null != arg$3433 && processScopeNodes
19660: .contains(arg$3433
19661: .getName()))) {
19662: processScope(arg$3433,
19663: getScope);
19664: }
19665: checkEnterScope(arg$3433);
19666:
19667: final Object retValue$3605 = Analyzer
19668: .cast(Primitives.or
19669: .apply(
19670: isUsedVariable
19671: .apply(
19672: s,
19673: n1),
19674: isUsedVariable
19675: .apply(
19676: s,
19677: n2)));
19678:
19679: checkExitScope(arg$3433);
19680: matching_nodes
19681: .remove(matching_nodes
19682: .size() - 1);
19683: return Analyzer
19684: .cast(retValue$3605);
19685: }
19686: if (TypicalSupport
19687: .match$255(arg$3433)) {
19688: final Node n1 = (arg$3433
19689: .size() > 0 ? arg$3433
19690: .getGeneric(0) : null);
19691: final Node n2 = (arg$3433
19692: .size() > 1 ? arg$3433
19693: .getGeneric(1) : null);
19694:
19695: matching_nodes.add(arg$3433);
19696: if ((null != arg$3433 && processScopeNodes
19697: .contains(arg$3433
19698: .getName()))) {
19699: processScope(arg$3433,
19700: getScope);
19701: }
19702: checkEnterScope(arg$3433);
19703:
19704: final Object retValue$3609 = Analyzer
19705: .cast(Primitives.or
19706: .apply(
19707: isUsedVariable
19708: .apply(
19709: s,
19710: n1),
19711: isUsedVariable
19712: .apply(
19713: s,
19714: n2)));
19715:
19716: checkExitScope(arg$3433);
19717: matching_nodes
19718: .remove(matching_nodes
19719: .size() - 1);
19720: return Analyzer
19721: .cast(retValue$3609);
19722: }
19723: if (TypicalSupport
19724: .match$665(arg$3433)) {
19725: final Node n1 = (arg$3433
19726: .size() > 0 ? arg$3433
19727: .getGeneric(0) : null);
19728: final Node n2 = (arg$3433
19729: .size() > 2 ? arg$3433
19730: .getGeneric(2) : null);
19731:
19732: matching_nodes.add(arg$3433);
19733: if ((null != arg$3433 && processScopeNodes
19734: .contains(arg$3433
19735: .getName()))) {
19736: processScope(arg$3433,
19737: getScope);
19738: }
19739: checkEnterScope(arg$3433);
19740:
19741: final Object retValue$3613 = Analyzer
19742: .cast(Primitives.or
19743: .apply(
19744: isUsedVariable
19745: .apply(
19746: s,
19747: n1),
19748: isUsedVariable
19749: .apply(
19750: s,
19751: n2)));
19752:
19753: checkExitScope(arg$3433);
19754: matching_nodes
19755: .remove(matching_nodes
19756: .size() - 1);
19757: return Analyzer
19758: .cast(retValue$3613);
19759: }
19760: if (TypicalSupport
19761: .match$2795(arg$3433)) {
19762: final Node n1 = (arg$3433
19763: .size() > 0 ? arg$3433
19764: .getGeneric(0) : null);
19765: final Node n2 = (arg$3433
19766: .size() > 1 ? arg$3433
19767: .getGeneric(1) : null);
19768:
19769: matching_nodes.add(arg$3433);
19770: if ((null != arg$3433 && processScopeNodes
19771: .contains(arg$3433
19772: .getName()))) {
19773: processScope(arg$3433,
19774: getScope);
19775: }
19776: checkEnterScope(arg$3433);
19777:
19778: final Object retValue$3617 = Analyzer
19779: .cast(Primitives.or
19780: .apply(
19781: isUsedVariable
19782: .apply(
19783: s,
19784: n1),
19785: isUsedVariable
19786: .apply(
19787: s,
19788: n2)));
19789:
19790: checkExitScope(arg$3433);
19791: matching_nodes
19792: .remove(matching_nodes
19793: .size() - 1);
19794: return Analyzer
19795: .cast(retValue$3617);
19796: }
19797: if (TypicalSupport
19798: .match$287(arg$3433)) {
19799: final Node n1 = (arg$3433
19800: .size() > 0 ? arg$3433
19801: .getGeneric(0) : null);
19802: final Node n2 = (arg$3433
19803: .size() > 1 ? arg$3433
19804: .getGeneric(1) : null);
19805:
19806: matching_nodes.add(arg$3433);
19807: if ((null != arg$3433 && processScopeNodes
19808: .contains(arg$3433
19809: .getName()))) {
19810: processScope(arg$3433,
19811: getScope);
19812: }
19813: checkEnterScope(arg$3433);
19814:
19815: final Object retValue$3621 = Analyzer
19816: .cast(Primitives.or
19817: .apply(
19818: isUsedVariable
19819: .apply(
19820: s,
19821: n1),
19822: isUsedVariable
19823: .apply(
19824: s,
19825: n2)));
19826:
19827: checkExitScope(arg$3433);
19828: matching_nodes
19829: .remove(matching_nodes
19830: .size() - 1);
19831: return Analyzer
19832: .cast(retValue$3621);
19833: }
19834: if (TypicalSupport
19835: .match$306(arg$3433)) {
19836: final Node n1 = (arg$3433
19837: .size() > 0 ? arg$3433
19838: .getGeneric(0) : null);
19839: final Node n2 = (arg$3433
19840: .size() > 1 ? arg$3433
19841: .getGeneric(1) : null);
19842:
19843: matching_nodes.add(arg$3433);
19844: if ((null != arg$3433 && processScopeNodes
19845: .contains(arg$3433
19846: .getName()))) {
19847: processScope(arg$3433,
19848: getScope);
19849: }
19850: checkEnterScope(arg$3433);
19851:
19852: final Object retValue$3625 = Analyzer
19853: .cast(Primitives.or
19854: .apply(
19855: isUsedVariable
19856: .apply(
19857: s,
19858: n1),
19859: isUsedVariable
19860: .apply(
19861: s,
19862: n2)));
19863:
19864: checkExitScope(arg$3433);
19865: matching_nodes
19866: .remove(matching_nodes
19867: .size() - 1);
19868: return Analyzer
19869: .cast(retValue$3625);
19870: }
19871: if (TypicalSupport
19872: .match$312(arg$3433)) {
19873: final Node n1 = (arg$3433
19874: .size() > 0 ? arg$3433
19875: .getGeneric(0) : null);
19876: final Node n2 = (arg$3433
19877: .size() > 1 ? arg$3433
19878: .getGeneric(1) : null);
19879:
19880: matching_nodes.add(arg$3433);
19881: if ((null != arg$3433 && processScopeNodes
19882: .contains(arg$3433
19883: .getName()))) {
19884: processScope(arg$3433,
19885: getScope);
19886: }
19887: checkEnterScope(arg$3433);
19888:
19889: final Object retValue$3629 = Analyzer
19890: .cast(Primitives.or
19891: .apply(
19892: isUsedVariable
19893: .apply(
19894: s,
19895: n1),
19896: isUsedVariable
19897: .apply(
19898: s,
19899: n2)));
19900:
19901: checkExitScope(arg$3433);
19902: matching_nodes
19903: .remove(matching_nodes
19904: .size() - 1);
19905: return Analyzer
19906: .cast(retValue$3629);
19907: }
19908: if (TypicalSupport
19909: .match$363(arg$3433)) {
19910: final Node n1 = (arg$3433
19911: .size() > 0 ? arg$3433
19912: .getGeneric(0) : null);
19913: final Node n2 = (arg$3433
19914: .size() > 1 ? arg$3433
19915: .getGeneric(1) : null);
19916:
19917: matching_nodes.add(arg$3433);
19918: if ((null != arg$3433 && processScopeNodes
19919: .contains(arg$3433
19920: .getName()))) {
19921: processScope(arg$3433,
19922: getScope);
19923: }
19924: checkEnterScope(arg$3433);
19925:
19926: final Object retValue$3633 = Analyzer
19927: .cast(Primitives.or
19928: .apply(
19929: isUsedVariable
19930: .apply(
19931: s,
19932: n1),
19933: isUsedVariable
19934: .apply(
19935: s,
19936: n2)));
19937:
19938: checkExitScope(arg$3433);
19939: matching_nodes
19940: .remove(matching_nodes
19941: .size() - 1);
19942: return Analyzer
19943: .cast(retValue$3633);
19944: }
19945: if (TypicalSupport
19946: .match$2415(arg$3433)) {
19947: final Node n1 = (arg$3433
19948: .size() > 0 ? arg$3433
19949: .getGeneric(0) : null);
19950: final Node n2 = (arg$3433
19951: .size() > 1 ? arg$3433
19952: .getGeneric(1) : null);
19953:
19954: matching_nodes.add(arg$3433);
19955: if ((null != arg$3433 && processScopeNodes
19956: .contains(arg$3433
19957: .getName()))) {
19958: processScope(arg$3433,
19959: getScope);
19960: }
19961: checkEnterScope(arg$3433);
19962:
19963: final Object retValue$3637 = Analyzer
19964: .cast(Primitives.or
19965: .apply(
19966: isUsedVariable
19967: .apply(
19968: s,
19969: n1),
19970: isUsedVariable
19971: .apply(
19972: s,
19973: n2)));
19974:
19975: checkExitScope(arg$3433);
19976: matching_nodes
19977: .remove(matching_nodes
19978: .size() - 1);
19979: return Analyzer
19980: .cast(retValue$3637);
19981: }
19982: if (TypicalSupport
19983: .match$2427(arg$3433)) {
19984: final Node n1 = (arg$3433
19985: .size() > 0 ? arg$3433
19986: .getGeneric(0) : null);
19987: final Node n2 = (arg$3433
19988: .size() > 1 ? arg$3433
19989: .getGeneric(1) : null);
19990:
19991: matching_nodes.add(arg$3433);
19992: if ((null != arg$3433 && processScopeNodes
19993: .contains(arg$3433
19994: .getName()))) {
19995: processScope(arg$3433,
19996: getScope);
19997: }
19998: checkEnterScope(arg$3433);
19999:
20000: final Object retValue$3641 = Analyzer
20001: .cast(Primitives.or
20002: .apply(
20003: isUsedVariable
20004: .apply(
20005: s,
20006: n1),
20007: isUsedVariable
20008: .apply(
20009: s,
20010: n2)));
20011:
20012: checkExitScope(arg$3433);
20013: matching_nodes
20014: .remove(matching_nodes
20015: .size() - 1);
20016: return Analyzer
20017: .cast(retValue$3641);
20018: }
20019: if (TypicalSupport
20020: .match$2888(arg$3433)) {
20021: final Node n1 = (arg$3433
20022: .size() > 0 ? arg$3433
20023: .getGeneric(0) : null);
20024: final Node n2 = (arg$3433
20025: .size() > 1 ? arg$3433
20026: .getGeneric(1) : null);
20027:
20028: matching_nodes.add(arg$3433);
20029: if ((null != arg$3433 && processScopeNodes
20030: .contains(arg$3433
20031: .getName()))) {
20032: processScope(arg$3433,
20033: getScope);
20034: }
20035: checkEnterScope(arg$3433);
20036:
20037: final Object retValue$3645 = Analyzer
20038: .cast(Primitives.or
20039: .apply(
20040: isUsedVariable
20041: .apply(
20042: s,
20043: n1),
20044: isUsedVariable
20045: .apply(
20046: s,
20047: n2)));
20048:
20049: checkExitScope(arg$3433);
20050: matching_nodes
20051: .remove(matching_nodes
20052: .size() - 1);
20053: return Analyzer
20054: .cast(retValue$3645);
20055: }
20056: if (TypicalSupport
20057: .match$65(arg$3433)) {
20058: final String str = (arg$3433
20059: .size() > 0 ? arg$3433
20060: .getString(0) : null);
20061:
20062: matching_nodes.add(arg$3433);
20063: if ((null != arg$3433 && processScopeNodes
20064: .contains(arg$3433
20065: .getName()))) {
20066: processScope(arg$3433,
20067: getScope);
20068: }
20069: checkEnterScope(arg$3433);
20070:
20071: final Object retValue$3649 = Analyzer
20072: .cast(Primitives.equal
20073: .apply(s, str));
20074:
20075: checkExitScope(arg$3433);
20076: matching_nodes
20077: .remove(matching_nodes
20078: .size() - 1);
20079: return Analyzer
20080: .cast(retValue$3649);
20081: }
20082: if (TypicalSupport
20083: .match$61(arg$3433)) {
20084: final String str = (arg$3433
20085: .size() > 0 ? arg$3433
20086: .getString(0) : null);
20087:
20088: matching_nodes.add(arg$3433);
20089: if ((null != arg$3433 && processScopeNodes
20090: .contains(arg$3433
20091: .getName()))) {
20092: processScope(arg$3433,
20093: getScope);
20094: }
20095: checkEnterScope(arg$3433);
20096:
20097: final Object retValue$3653 = Analyzer
20098: .cast(Primitives.equal
20099: .apply(s, str));
20100:
20101: checkExitScope(arg$3433);
20102: matching_nodes
20103: .remove(matching_nodes
20104: .size() - 1);
20105: return Analyzer
20106: .cast(retValue$3653);
20107: }
20108: if (TypicalSupport
20109: .match$2856(arg$3433)) {
20110: final String str = (arg$3433
20111: .size() > 0 ? arg$3433
20112: .getString(0) : null);
20113:
20114: matching_nodes.add(arg$3433);
20115: if ((null != arg$3433 && processScopeNodes
20116: .contains(arg$3433
20117: .getName()))) {
20118: processScope(arg$3433,
20119: getScope);
20120: }
20121: checkEnterScope(arg$3433);
20122:
20123: final Object retValue$3657 = Analyzer
20124: .cast(Primitives.equal
20125: .apply(s, str));
20126:
20127: checkExitScope(arg$3433);
20128: matching_nodes
20129: .remove(matching_nodes
20130: .size() - 1);
20131: return Analyzer
20132: .cast(retValue$3657);
20133: }
20134: if (TypicalSupport
20135: .match$692(arg$3433)) {
20136: final Node n1 = (arg$3433
20137: .size() > 0 ? arg$3433
20138: .getGeneric(0) : null);
20139: final Node n2 = (arg$3433
20140: .size() > 1 ? arg$3433
20141: .getGeneric(1) : null);
20142: final Node n3 = (arg$3433
20143: .size() > 2 ? arg$3433
20144: .getGeneric(2) : null);
20145:
20146: matching_nodes.add(arg$3433);
20147: if ((null != arg$3433 && processScopeNodes
20148: .contains(arg$3433
20149: .getName()))) {
20150: processScope(arg$3433,
20151: getScope);
20152: }
20153: checkEnterScope(arg$3433);
20154:
20155: final Object retValue$3661 = Analyzer
20156: .cast(Primitives.or
20157: .apply(
20158: Primitives.or
20159: .apply(
20160: isUsedVariable
20161: .apply(
20162: s,
20163: n1),
20164: isUsedVariable
20165: .apply(
20166: s,
20167: n2)),
20168: isUsedVariable
20169: .apply(
20170: s,
20171: n3)));
20172:
20173: checkExitScope(arg$3433);
20174: matching_nodes
20175: .remove(matching_nodes
20176: .size() - 1);
20177: return Analyzer
20178: .cast(retValue$3661);
20179: }
20180: if (TypicalSupport
20181: .match$2828(arg$3433)) {
20182: final Node n1 = (arg$3433
20183: .size() > 0 ? arg$3433
20184: .getGeneric(0) : null);
20185: final Node n2 = (arg$3433
20186: .size() > 1 ? arg$3433
20187: .getGeneric(1) : null);
20188: final Node n3 = (arg$3433
20189: .size() > 2 ? arg$3433
20190: .getGeneric(2) : null);
20191:
20192: matching_nodes.add(arg$3433);
20193: if ((null != arg$3433 && processScopeNodes
20194: .contains(arg$3433
20195: .getName()))) {
20196: processScope(arg$3433,
20197: getScope);
20198: }
20199: checkEnterScope(arg$3433);
20200:
20201: final Object retValue$3665 = Analyzer
20202: .cast(Primitives.or
20203: .apply(
20204: Primitives.or
20205: .apply(
20206: isUsedVariable
20207: .apply(
20208: s,
20209: n1),
20210: isUsedVariable
20211: .apply(
20212: s,
20213: n2)),
20214: isUsedVariable
20215: .apply(
20216: s,
20217: n3)));
20218:
20219: checkExitScope(arg$3433);
20220: matching_nodes
20221: .remove(matching_nodes
20222: .size() - 1);
20223: return Analyzer
20224: .cast(retValue$3665);
20225: }
20226: if (TypicalSupport
20227: .match$2801(arg$3433)) {
20228: final Node n1 = (arg$3433
20229: .size() > 0 ? arg$3433
20230: .getGeneric(0) : null);
20231: final Node n2 = (arg$3433
20232: .size() > 1 ? arg$3433
20233: .getGeneric(1) : null);
20234: final Node n3 = (arg$3433
20235: .size() > 2 ? arg$3433
20236: .getGeneric(2) : null);
20237:
20238: matching_nodes.add(arg$3433);
20239: if ((null != arg$3433 && processScopeNodes
20240: .contains(arg$3433
20241: .getName()))) {
20242: processScope(arg$3433,
20243: getScope);
20244: }
20245: checkEnterScope(arg$3433);
20246:
20247: final Object retValue$3669 = Analyzer
20248: .cast(Primitives.or
20249: .apply(
20250: Primitives.or
20251: .apply(
20252: isUsedVariable
20253: .apply(
20254: s,
20255: n1),
20256: isUsedVariable
20257: .apply(
20258: s,
20259: n2)),
20260: isUsedVariable
20261: .apply(
20262: s,
20263: n3)));
20264:
20265: checkExitScope(arg$3433);
20266: matching_nodes
20267: .remove(matching_nodes
20268: .size() - 1);
20269: return Analyzer
20270: .cast(retValue$3669);
20271: }
20272: if (TypicalSupport
20273: .match$2405(arg$3433)) {
20274: final Node n1 = (arg$3433
20275: .size() > 0 ? arg$3433
20276: .getGeneric(0) : null);
20277: final Node n2 = (arg$3433
20278: .size() > 1 ? arg$3433
20279: .getGeneric(1) : null);
20280: final Node n3 = (arg$3433
20281: .size() > 2 ? arg$3433
20282: .getGeneric(2) : null);
20283: final Node n4 = (arg$3433
20284: .size() > 3 ? arg$3433
20285: .getGeneric(3) : null);
20286:
20287: matching_nodes.add(arg$3433);
20288: if ((null != arg$3433 && processScopeNodes
20289: .contains(arg$3433
20290: .getName()))) {
20291: processScope(arg$3433,
20292: getScope);
20293: }
20294: checkEnterScope(arg$3433);
20295:
20296: final Object retValue$3673 = Analyzer
20297: .cast(Primitives.or
20298: .apply(
20299: Primitives.or
20300: .apply(
20301: Primitives.or
20302: .apply(
20303: isUsedVariable
20304: .apply(
20305: s,
20306: n1),
20307: isUsedVariable
20308: .apply(
20309: s,
20310: n2)),
20311: isUsedVariable
20312: .apply(
20313: s,
20314: n3)),
20315: isUsedVariable
20316: .apply(
20317: s,
20318: n4)));
20319:
20320: checkExitScope(arg$3433);
20321: matching_nodes
20322: .remove(matching_nodes
20323: .size() - 1);
20324: return Analyzer
20325: .cast(retValue$3673);
20326: }
20327: if (true) {
20328: matching_nodes.add(arg$3433);
20329: if ((null != arg$3433 && processScopeNodes
20330: .contains(arg$3433
20331: .getName()))) {
20332: processScope(arg$3433,
20333: getScope);
20334: }
20335: checkEnterScope(arg$3433);
20336:
20337: final Object retValue$3676 = Analyzer
20338: .cast(Boolean.FALSE);
20339:
20340: checkExitScope(arg$3433);
20341: matching_nodes
20342: .remove(matching_nodes
20343: .size() - 1);
20344: return Analyzer
20345: .cast(retValue$3676);
20346: }
20347: return null;
20348: }
20349: }.apply());
20350: }
20351: };
20352:
20353: final Function.F2<Object, Pair<String>, Node> checkUnusedVariables = new Function.F2<Object, Pair<String>, Node>() {
20354: public Object apply(final Pair<String> strList, final Node no) {
20355: return new Match<Object>() {
20356: public Object apply() {
20357: final Pair<String> arg$3678 = Analyzer
20358: .cast(strList);
20359:
20360: if ((null == arg$3678)) {
20361: return null;
20362: }
20363: if (TypicalSupport.match$3230(arg$3678)) {
20364: return Analyzer.cast(null);
20365: }
20366: if (true) {
20367: final Pair<String> list$3680 = Analyzer
20368: .cast(Analyzer.cast(arg$3678));
20369: final String x = Analyzer.cast(Primitives
20370: .wrapHead(list$3680));
20371: final Pair<String> xs = Analyzer
20372: .cast(Primitives.wrapTail(list$3680));
20373:
20374: return Analyzer
20375: .cast(null == Primitives.not
20376: .apply(isUsedVariable.apply(x,
20377: no)) ? null
20378: : Primitives.not
20379: .apply(isUsedVariable
20380: .apply(x, no)) ? new Let<Object>() {
20381: {
20382: warning(
20383: Primitives.concat
20384: .apply(
20385: x,
20386: " is an unused variable"),
20387: null);
20388: }
20389:
20390: public Object apply() {
20391: return Analyzer
20392: .cast(checkUnusedVariables
20393: .apply(
20394: xs,
20395: no));
20396: }
20397: }.apply()
20398: : checkUnusedVariables
20399: .apply(xs, no));
20400: }
20401: return null;
20402: }
20403: }.apply();
20404: }
20405: };
20406:
20407: final Function.F1<Pair<String>, Pair<TypicalTypes.entry>> getNames = new Function.F1<Pair<String>, Pair<TypicalTypes.entry>>() {
20408: public Pair<String> apply(final Pair<TypicalTypes.entry> enList) {
20409: return new Match<Pair<String>>() {
20410: public Pair<String> apply() {
20411: final Pair<TypicalTypes.entry> arg$3682 = Analyzer
20412: .cast(enList);
20413:
20414: if ((null == arg$3682)) {
20415: return null;
20416: }
20417: if (TypicalSupport.match$3252(arg$3682)) {
20418: return Analyzer.cast(Pair.<String> empty());
20419: }
20420: if (true) {
20421: final Pair<TypicalTypes.entry> list$3684 = Analyzer
20422: .cast(Analyzer.cast(arg$3682));
20423: final TypicalTypes.entry x = Analyzer
20424: .cast(Primitives.wrapHead(list$3684));
20425: final Pair<TypicalTypes.entry> xs = Analyzer
20426: .cast(Primitives.wrapTail(list$3684));
20427:
20428: return Analyzer.cast(TypicalSupport.append$297
20429: .apply(
20430: new Pair<String>(
20431: null == x ? null
20432: : x.entryName),
20433: getNames.apply(xs)));
20434: }
20435: return null;
20436: }
20437: }.apply();
20438: }
20439: };
20440:
20441: final Function.F2<BigInteger, String, Pair<Node>> countInList = new Function.F2<BigInteger, String, Pair<Node>>() {
20442: public BigInteger apply(final String s, final Pair<Node> nl) {
20443: return new Match<BigInteger>() {
20444: public BigInteger apply() {
20445: final Pair<Node> arg$3686 = Analyzer.cast(nl);
20446:
20447: if ((null == arg$3686)) {
20448: return null;
20449: }
20450: if (TypicalSupport.match$323(arg$3686)) {
20451: return Analyzer.cast(BigInteger.valueOf(0));
20452: }
20453: if (true) {
20454: final Pair<Node> list$3688 = Analyzer
20455: .cast(Analyzer.cast(arg$3686));
20456: final Node x = GNode.cast(Primitives
20457: .wrapHead(list$3688));
20458: final Pair<Node> xs = Analyzer.cast(Primitives
20459: .wrapTail(list$3688));
20460:
20461: return Analyzer.cast(Primitives.addInt.apply(
20462: countAppearance.apply(s, x),
20463: countInList.apply(s, xs)));
20464: }
20465: return null;
20466: }
20467: }.apply();
20468: }
20469: };
20470:
20471: final Function.F2<BigInteger, String, Node> countAppearance = new Function.F2<BigInteger, String, Node>() {
20472: public BigInteger apply(final String s, final Node no) {
20473: return (null == Primitives.isBottom.apply(no) ? null
20474: : Primitives.isBottom.apply(no) ? BigInteger
20475: .valueOf(0) : new Match<BigInteger>() {
20476: public BigInteger apply() {
20477: final Node arg$3690 = GNode.cast(no);
20478:
20479: if ((null == arg$3690)) {
20480: return null;
20481: }
20482: if (TypicalSupport.match$479(arg$3690)) {
20483: final Pair<Node> nl = Analyzer
20484: .cast(Primitives.getChildren(
20485: arg$3690, 0, arg$3690
20486: .size()));
20487:
20488: matching_nodes.add(arg$3690);
20489: if ((null != arg$3690 && processScopeNodes
20490: .contains(arg$3690.getName()))) {
20491: processScope(arg$3690, getScope);
20492: }
20493: checkEnterScope(arg$3690);
20494:
20495: final Object retValue$3694 = Analyzer
20496: .cast(countInList.apply(s, nl));
20497:
20498: checkExitScope(arg$3690);
20499: matching_nodes.remove(matching_nodes
20500: .size() - 1);
20501: return Analyzer.cast(retValue$3694);
20502: }
20503: if (TypicalSupport.match$679(arg$3690)) {
20504: final Pair<Node> nl = Analyzer
20505: .cast(Primitives.getChildren(
20506: arg$3690, 0, arg$3690
20507: .size()));
20508:
20509: matching_nodes.add(arg$3690);
20510: if ((null != arg$3690 && processScopeNodes
20511: .contains(arg$3690.getName()))) {
20512: processScope(arg$3690, getScope);
20513: }
20514: checkEnterScope(arg$3690);
20515:
20516: final Object retValue$3698 = Analyzer
20517: .cast(countInList.apply(s, nl));
20518:
20519: checkExitScope(arg$3690);
20520: matching_nodes.remove(matching_nodes
20521: .size() - 1);
20522: return Analyzer.cast(retValue$3698);
20523: }
20524: if (TypicalSupport.match$3405(arg$3690)) {
20525: final Pair<Node> nl = Analyzer
20526: .cast(Primitives.getChildren(
20527: arg$3690, 0, arg$3690
20528: .size()));
20529:
20530: matching_nodes.add(arg$3690);
20531: if ((null != arg$3690 && processScopeNodes
20532: .contains(arg$3690.getName()))) {
20533: processScope(arg$3690, getScope);
20534: }
20535: checkEnterScope(arg$3690);
20536:
20537: final Object retValue$3702 = Analyzer
20538: .cast(countInList.apply(s, nl));
20539:
20540: checkExitScope(arg$3690);
20541: matching_nodes.remove(matching_nodes
20542: .size() - 1);
20543: return Analyzer.cast(retValue$3702);
20544: }
20545: if (TypicalSupport.match$2400(arg$3690)) {
20546: final Pair<Node> nl = Analyzer
20547: .cast(Primitives.getChildren(
20548: arg$3690, 0, arg$3690
20549: .size()));
20550:
20551: matching_nodes.add(arg$3690);
20552: if ((null != arg$3690 && processScopeNodes
20553: .contains(arg$3690.getName()))) {
20554: processScope(arg$3690, getScope);
20555: }
20556: checkEnterScope(arg$3690);
20557:
20558: final Object retValue$3706 = Analyzer
20559: .cast(countInList.apply(s, nl));
20560:
20561: checkExitScope(arg$3690);
20562: matching_nodes.remove(matching_nodes
20563: .size() - 1);
20564: return Analyzer.cast(retValue$3706);
20565: }
20566: if (TypicalSupport.match$9(arg$3690)) {
20567: final Pair<Node> nl = Analyzer
20568: .cast(Primitives.getChildren(
20569: arg$3690, 1, arg$3690
20570: .size()));
20571:
20572: matching_nodes.add(arg$3690);
20573: if ((null != arg$3690 && processScopeNodes
20574: .contains(arg$3690.getName()))) {
20575: processScope(arg$3690, getScope);
20576: }
20577: checkEnterScope(arg$3690);
20578:
20579: final Object retValue$3710 = Analyzer
20580: .cast(countInList.apply(s, nl));
20581:
20582: checkExitScope(arg$3690);
20583: matching_nodes.remove(matching_nodes
20584: .size() - 1);
20585: return Analyzer.cast(retValue$3710);
20586: }
20587: if (TypicalSupport.match$2509(arg$3690)) {
20588: final Pair<Node> nl = Analyzer
20589: .cast(Primitives.getChildren(
20590: arg$3690, 0, arg$3690
20591: .size()));
20592:
20593: matching_nodes.add(arg$3690);
20594: if ((null != arg$3690 && processScopeNodes
20595: .contains(arg$3690.getName()))) {
20596: processScope(arg$3690, getScope);
20597: }
20598: checkEnterScope(arg$3690);
20599:
20600: final Object retValue$3714 = Analyzer
20601: .cast(countInList.apply(s, nl));
20602:
20603: checkExitScope(arg$3690);
20604: matching_nodes.remove(matching_nodes
20605: .size() - 1);
20606: return Analyzer.cast(retValue$3714);
20607: }
20608: if (TypicalSupport.match$2809(arg$3690)) {
20609: final Pair<Node> nl = Analyzer
20610: .cast(Primitives.getChildren(
20611: arg$3690, 0, arg$3690
20612: .size()));
20613:
20614: matching_nodes.add(arg$3690);
20615: if ((null != arg$3690 && processScopeNodes
20616: .contains(arg$3690.getName()))) {
20617: processScope(arg$3690, getScope);
20618: }
20619: checkEnterScope(arg$3690);
20620:
20621: final Object retValue$3718 = Analyzer
20622: .cast(countInList.apply(s, nl));
20623:
20624: checkExitScope(arg$3690);
20625: matching_nodes.remove(matching_nodes
20626: .size() - 1);
20627: return Analyzer.cast(retValue$3718);
20628: }
20629: if (TypicalSupport.match$269(arg$3690)) {
20630: final Pair<Node> nl = Analyzer
20631: .cast(Primitives.getChildren(
20632: arg$3690, 0, arg$3690
20633: .size()));
20634:
20635: matching_nodes.add(arg$3690);
20636: if ((null != arg$3690 && processScopeNodes
20637: .contains(arg$3690.getName()))) {
20638: processScope(arg$3690, getScope);
20639: }
20640: checkEnterScope(arg$3690);
20641:
20642: final Object retValue$3722 = Analyzer
20643: .cast(countInList.apply(s, nl));
20644:
20645: checkExitScope(arg$3690);
20646: matching_nodes.remove(matching_nodes
20647: .size() - 1);
20648: return Analyzer.cast(retValue$3722);
20649: }
20650: if (TypicalSupport.match$277(arg$3690)) {
20651: final Pair<Node> nl = Analyzer
20652: .cast(Primitives.getChildren(
20653: arg$3690, 0, arg$3690
20654: .size()));
20655:
20656: matching_nodes.add(arg$3690);
20657: if ((null != arg$3690 && processScopeNodes
20658: .contains(arg$3690.getName()))) {
20659: processScope(arg$3690, getScope);
20660: }
20661: checkEnterScope(arg$3690);
20662:
20663: final Object retValue$3726 = Analyzer
20664: .cast(countInList.apply(s, nl));
20665:
20666: checkExitScope(arg$3690);
20667: matching_nodes.remove(matching_nodes
20668: .size() - 1);
20669: return Analyzer.cast(retValue$3726);
20670: }
20671: if (TypicalSupport.match$283(arg$3690)) {
20672: final Pair<Node> nl = Analyzer
20673: .cast(Primitives.getChildren(
20674: arg$3690, 0, arg$3690
20675: .size()));
20676:
20677: matching_nodes.add(arg$3690);
20678: if ((null != arg$3690 && processScopeNodes
20679: .contains(arg$3690.getName()))) {
20680: processScope(arg$3690, getScope);
20681: }
20682: checkEnterScope(arg$3690);
20683:
20684: final Object retValue$3730 = Analyzer
20685: .cast(countInList.apply(s, nl));
20686:
20687: checkExitScope(arg$3690);
20688: matching_nodes.remove(matching_nodes
20689: .size() - 1);
20690: return Analyzer.cast(retValue$3730);
20691: }
20692: if (TypicalSupport.match$3474(arg$3690)) {
20693: final Pair<Node> nl = Analyzer
20694: .cast(Primitives.getChildren(
20695: arg$3690, 0, arg$3690
20696: .size()));
20697:
20698: matching_nodes.add(arg$3690);
20699: if ((null != arg$3690 && processScopeNodes
20700: .contains(arg$3690.getName()))) {
20701: processScope(arg$3690, getScope);
20702: }
20703: checkEnterScope(arg$3690);
20704:
20705: final Object retValue$3734 = Analyzer
20706: .cast(countInList.apply(s, nl));
20707:
20708: checkExitScope(arg$3690);
20709: matching_nodes.remove(matching_nodes
20710: .size() - 1);
20711: return Analyzer.cast(retValue$3734);
20712: }
20713: if (TypicalSupport.match$321(arg$3690)) {
20714: final Pair<Node> nl = Analyzer
20715: .cast(Primitives.getChildren(
20716: arg$3690, 0, arg$3690
20717: .size()));
20718:
20719: matching_nodes.add(arg$3690);
20720: if ((null != arg$3690 && processScopeNodes
20721: .contains(arg$3690.getName()))) {
20722: processScope(arg$3690, getScope);
20723: }
20724: checkEnterScope(arg$3690);
20725:
20726: final Object retValue$3738 = Analyzer
20727: .cast(countInList.apply(s, nl));
20728:
20729: checkExitScope(arg$3690);
20730: matching_nodes.remove(matching_nodes
20731: .size() - 1);
20732: return Analyzer.cast(retValue$3738);
20733: }
20734: if (TypicalSupport.match$339(arg$3690)) {
20735: final Pair<Node> nl = Analyzer
20736: .cast(Primitives.getChildren(
20737: arg$3690, 0, arg$3690
20738: .size()));
20739:
20740: matching_nodes.add(arg$3690);
20741: if ((null != arg$3690 && processScopeNodes
20742: .contains(arg$3690.getName()))) {
20743: processScope(arg$3690, getScope);
20744: }
20745: checkEnterScope(arg$3690);
20746:
20747: final Object retValue$3742 = Analyzer
20748: .cast(countInList.apply(s, nl));
20749:
20750: checkExitScope(arg$3690);
20751: matching_nodes.remove(matching_nodes
20752: .size() - 1);
20753: return Analyzer.cast(retValue$3742);
20754: }
20755: if (TypicalSupport.match$3413(arg$3690)) {
20756: final Pair<Node> nl = Analyzer
20757: .cast(Primitives.getChildren(
20758: arg$3690, 0, arg$3690
20759: .size()));
20760:
20761: matching_nodes.add(arg$3690);
20762: if ((null != arg$3690 && processScopeNodes
20763: .contains(arg$3690.getName()))) {
20764: processScope(arg$3690, getScope);
20765: }
20766: checkEnterScope(arg$3690);
20767:
20768: final Object retValue$3746 = Analyzer
20769: .cast(countInList.apply(s, nl));
20770:
20771: checkExitScope(arg$3690);
20772: matching_nodes.remove(matching_nodes
20773: .size() - 1);
20774: return Analyzer.cast(retValue$3746);
20775: }
20776: if (TypicalSupport.match$5(arg$3690)) {
20777: final Pair<Node> nl = Analyzer
20778: .cast(Primitives.getChildren(
20779: arg$3690, 1, arg$3690
20780: .size()));
20781:
20782: matching_nodes.add(arg$3690);
20783: if ((null != arg$3690 && processScopeNodes
20784: .contains(arg$3690.getName()))) {
20785: processScope(arg$3690, getScope);
20786: }
20787: checkEnterScope(arg$3690);
20788:
20789: final Object retValue$3750 = Analyzer
20790: .cast(countInList.apply(s, nl));
20791:
20792: checkExitScope(arg$3690);
20793: matching_nodes.remove(matching_nodes
20794: .size() - 1);
20795: return Analyzer.cast(retValue$3750);
20796: }
20797: if (TypicalSupport.match$2273(arg$3690)) {
20798: final Node n = (arg$3690.size() > 0 ? arg$3690
20799: .getGeneric(0)
20800: : null);
20801:
20802: matching_nodes.add(arg$3690);
20803: if ((null != arg$3690 && processScopeNodes
20804: .contains(arg$3690.getName()))) {
20805: processScope(arg$3690, getScope);
20806: }
20807: checkEnterScope(arg$3690);
20808:
20809: final Object retValue$3754 = Analyzer
20810: .cast(countAppearance.apply(s,
20811: n));
20812:
20813: checkExitScope(arg$3690);
20814: matching_nodes.remove(matching_nodes
20815: .size() - 1);
20816: return Analyzer.cast(retValue$3754);
20817: }
20818: if (TypicalSupport.match$49(arg$3690)) {
20819: final Node n = (arg$3690.size() > 0 ? arg$3690
20820: .getGeneric(0)
20821: : null);
20822:
20823: matching_nodes.add(arg$3690);
20824: if ((null != arg$3690 && processScopeNodes
20825: .contains(arg$3690.getName()))) {
20826: processScope(arg$3690, getScope);
20827: }
20828: checkEnterScope(arg$3690);
20829:
20830: final Object retValue$3758 = Analyzer
20831: .cast(countAppearance.apply(s,
20832: n));
20833:
20834: checkExitScope(arg$3690);
20835: matching_nodes.remove(matching_nodes
20836: .size() - 1);
20837: return Analyzer.cast(retValue$3758);
20838: }
20839: if (TypicalSupport.match$2379(arg$3690)) {
20840: final Node n = (arg$3690.size() > 0 ? arg$3690
20841: .getGeneric(0)
20842: : null);
20843:
20844: matching_nodes.add(arg$3690);
20845: if ((null != arg$3690 && processScopeNodes
20846: .contains(arg$3690.getName()))) {
20847: processScope(arg$3690, getScope);
20848: }
20849: checkEnterScope(arg$3690);
20850:
20851: final Object retValue$3762 = Analyzer
20852: .cast(countAppearance.apply(s,
20853: n));
20854:
20855: checkExitScope(arg$3690);
20856: matching_nodes.remove(matching_nodes
20857: .size() - 1);
20858: return Analyzer.cast(retValue$3762);
20859: }
20860: if (TypicalSupport.match$2390(arg$3690)) {
20861: final Node n = (arg$3690.size() > 0 ? arg$3690
20862: .getGeneric(0)
20863: : null);
20864:
20865: matching_nodes.add(arg$3690);
20866: if ((null != arg$3690 && processScopeNodes
20867: .contains(arg$3690.getName()))) {
20868: processScope(arg$3690, getScope);
20869: }
20870: checkEnterScope(arg$3690);
20871:
20872: final Object retValue$3766 = Analyzer
20873: .cast(countAppearance.apply(s,
20874: n));
20875:
20876: checkExitScope(arg$3690);
20877: matching_nodes.remove(matching_nodes
20878: .size() - 1);
20879: return Analyzer.cast(retValue$3766);
20880: }
20881: if (TypicalSupport.match$45(arg$3690)) {
20882: final Node n = (arg$3690.size() > 1 ? arg$3690
20883: .getGeneric(1)
20884: : null);
20885:
20886: matching_nodes.add(arg$3690);
20887: if ((null != arg$3690 && processScopeNodes
20888: .contains(arg$3690.getName()))) {
20889: processScope(arg$3690, getScope);
20890: }
20891: checkEnterScope(arg$3690);
20892:
20893: final Object retValue$3770 = Analyzer
20894: .cast(countAppearance.apply(s,
20895: n));
20896:
20897: checkExitScope(arg$3690);
20898: matching_nodes.remove(matching_nodes
20899: .size() - 1);
20900: return Analyzer.cast(retValue$3770);
20901: }
20902: if (TypicalSupport.match$3256(arg$3690)) {
20903: final Node n = (arg$3690.size() > 1 ? arg$3690
20904: .getGeneric(1)
20905: : null);
20906:
20907: matching_nodes.add(arg$3690);
20908: if ((null != arg$3690 && processScopeNodes
20909: .contains(arg$3690.getName()))) {
20910: processScope(arg$3690, getScope);
20911: }
20912: checkEnterScope(arg$3690);
20913:
20914: final Object retValue$3774 = Analyzer
20915: .cast(countAppearance.apply(s,
20916: n));
20917:
20918: checkExitScope(arg$3690);
20919: matching_nodes.remove(matching_nodes
20920: .size() - 1);
20921: return Analyzer.cast(retValue$3774);
20922: }
20923: if (TypicalSupport.match$57(arg$3690)) {
20924: final Node n = (arg$3690.size() > 0 ? arg$3690
20925: .getGeneric(0)
20926: : null);
20927:
20928: matching_nodes.add(arg$3690);
20929: if ((null != arg$3690 && processScopeNodes
20930: .contains(arg$3690.getName()))) {
20931: processScope(arg$3690, getScope);
20932: }
20933: checkEnterScope(arg$3690);
20934:
20935: final Object retValue$3778 = Analyzer
20936: .cast(countAppearance.apply(s,
20937: n));
20938:
20939: checkExitScope(arg$3690);
20940: matching_nodes.remove(matching_nodes
20941: .size() - 1);
20942: return Analyzer.cast(retValue$3778);
20943: }
20944: if (TypicalSupport.match$84(arg$3690)) {
20945: final Node n1 = (arg$3690.size() > 0 ? arg$3690
20946: .getGeneric(0)
20947: : null);
20948: final Node n2 = (arg$3690.size() > 1 ? arg$3690
20949: .getGeneric(1)
20950: : null);
20951:
20952: matching_nodes.add(arg$3690);
20953: if ((null != arg$3690 && processScopeNodes
20954: .contains(arg$3690.getName()))) {
20955: processScope(arg$3690, getScope);
20956: }
20957: checkEnterScope(arg$3690);
20958:
20959: final Object retValue$3782 = Analyzer
20960: .cast(new Let<BigInteger>() {
20961: final Pair<String> strList;
20962:
20963: {
20964: strList = Analyzer
20965: .cast(retrieveVariables
20966: .apply(no));
20967: }
20968:
20969: public BigInteger apply() {
20970: return Analyzer
20971: .cast(null == Primitives.contains
20972: .apply(
20973: s,
20974: strList) ? null
20975: : Primitives.contains
20976: .apply(
20977: s,
20978: strList) ? BigInteger
20979: .valueOf(0)
20980: : Primitives.addInt
20981: .apply(
20982: countAppearance
20983: .apply(
20984: s,
20985: n1),
20986: countAppearance
20987: .apply(
20988: s,
20989: n2)));
20990: }
20991: }.apply());
20992:
20993: checkExitScope(arg$3690);
20994: matching_nodes.remove(matching_nodes
20995: .size() - 1);
20996: return Analyzer.cast(retValue$3782);
20997: }
20998: if (TypicalSupport.match$83(arg$3690)) {
20999: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21000: .getGeneric(0)
21001: : null);
21002: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21003: .getGeneric(1)
21004: : null);
21005:
21006: matching_nodes.add(arg$3690);
21007: if ((null != arg$3690 && processScopeNodes
21008: .contains(arg$3690.getName()))) {
21009: processScope(arg$3690, getScope);
21010: }
21011: checkEnterScope(arg$3690);
21012:
21013: final Object retValue$3786 = Analyzer
21014: .cast(new Let<BigInteger>() {
21015: final Pair<String> strList;
21016:
21017: {
21018: strList = Analyzer
21019: .cast(retrieveVariables
21020: .apply(no));
21021: }
21022:
21023: public BigInteger apply() {
21024: return Analyzer
21025: .cast(null == Primitives.contains
21026: .apply(
21027: s,
21028: strList) ? null
21029: : Primitives.contains
21030: .apply(
21031: s,
21032: strList) ? BigInteger
21033: .valueOf(0)
21034: : Primitives.addInt
21035: .apply(
21036: countAppearance
21037: .apply(
21038: s,
21039: n1),
21040: countAppearance
21041: .apply(
21042: s,
21043: n2)));
21044: }
21045: }.apply());
21046:
21047: checkExitScope(arg$3690);
21048: matching_nodes.remove(matching_nodes
21049: .size() - 1);
21050: return Analyzer.cast(retValue$3786);
21051: }
21052: if (TypicalSupport.match$483(arg$3690)) {
21053: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21054: .getGeneric(0)
21055: : null);
21056: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21057: .getGeneric(1)
21058: : null);
21059:
21060: matching_nodes.add(arg$3690);
21061: if ((null != arg$3690 && processScopeNodes
21062: .contains(arg$3690.getName()))) {
21063: processScope(arg$3690, getScope);
21064: }
21065: checkEnterScope(arg$3690);
21066:
21067: final Object retValue$3790 = Analyzer
21068: .cast(Primitives.addInt.apply(
21069: countAppearance.apply(
21070: s, n1),
21071: countAppearance.apply(
21072: s, n2)));
21073:
21074: checkExitScope(arg$3690);
21075: matching_nodes.remove(matching_nodes
21076: .size() - 1);
21077: return Analyzer.cast(retValue$3790);
21078: }
21079: if (TypicalSupport.match$491(arg$3690)) {
21080: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21081: .getGeneric(0)
21082: : null);
21083: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21084: .getGeneric(1)
21085: : null);
21086:
21087: matching_nodes.add(arg$3690);
21088: if ((null != arg$3690 && processScopeNodes
21089: .contains(arg$3690.getName()))) {
21090: processScope(arg$3690, getScope);
21091: }
21092: checkEnterScope(arg$3690);
21093:
21094: final Object retValue$3794 = Analyzer
21095: .cast(Primitives.addInt.apply(
21096: countAppearance.apply(
21097: s, n1),
21098: countAppearance.apply(
21099: s, n2)));
21100:
21101: checkExitScope(arg$3690);
21102: matching_nodes.remove(matching_nodes
21103: .size() - 1);
21104: return Analyzer.cast(retValue$3794);
21105: }
21106: if (TypicalSupport.match$499(arg$3690)) {
21107: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21108: .getGeneric(0)
21109: : null);
21110: final Node n2 = (arg$3690.size() > 2 ? arg$3690
21111: .getGeneric(2)
21112: : null);
21113:
21114: matching_nodes.add(arg$3690);
21115: if ((null != arg$3690 && processScopeNodes
21116: .contains(arg$3690.getName()))) {
21117: processScope(arg$3690, getScope);
21118: }
21119: checkEnterScope(arg$3690);
21120:
21121: final Object retValue$3798 = Analyzer
21122: .cast(Primitives.addInt.apply(
21123: countAppearance.apply(
21124: s, n1),
21125: countAppearance.apply(
21126: s, n2)));
21127:
21128: checkExitScope(arg$3690);
21129: matching_nodes.remove(matching_nodes
21130: .size() - 1);
21131: return Analyzer.cast(retValue$3798);
21132: }
21133: if (TypicalSupport.match$505(arg$3690)) {
21134: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21135: .getGeneric(0)
21136: : null);
21137: final Node n2 = (arg$3690.size() > 2 ? arg$3690
21138: .getGeneric(2)
21139: : null);
21140:
21141: matching_nodes.add(arg$3690);
21142: if ((null != arg$3690 && processScopeNodes
21143: .contains(arg$3690.getName()))) {
21144: processScope(arg$3690, getScope);
21145: }
21146: checkEnterScope(arg$3690);
21147:
21148: final Object retValue$3802 = Analyzer
21149: .cast(Primitives.addInt.apply(
21150: countAppearance.apply(
21151: s, n1),
21152: countAppearance.apply(
21153: s, n2)));
21154:
21155: checkExitScope(arg$3690);
21156: matching_nodes.remove(matching_nodes
21157: .size() - 1);
21158: return Analyzer.cast(retValue$3802);
21159: }
21160: if (TypicalSupport.match$553(arg$3690)) {
21161: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21162: .getGeneric(0)
21163: : null);
21164: final Node n2 = (arg$3690.size() > 2 ? arg$3690
21165: .getGeneric(2)
21166: : null);
21167:
21168: matching_nodes.add(arg$3690);
21169: if ((null != arg$3690 && processScopeNodes
21170: .contains(arg$3690.getName()))) {
21171: processScope(arg$3690, getScope);
21172: }
21173: checkEnterScope(arg$3690);
21174:
21175: final Object retValue$3806 = Analyzer
21176: .cast(Primitives.addInt.apply(
21177: countAppearance.apply(
21178: s, n1),
21179: countAppearance.apply(
21180: s, n2)));
21181:
21182: checkExitScope(arg$3690);
21183: matching_nodes.remove(matching_nodes
21184: .size() - 1);
21185: return Analyzer.cast(retValue$3806);
21186: }
21187: if (TypicalSupport.match$609(arg$3690)) {
21188: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21189: .getGeneric(0)
21190: : null);
21191: final Node n2 = (arg$3690.size() > 2 ? arg$3690
21192: .getGeneric(2)
21193: : null);
21194:
21195: matching_nodes.add(arg$3690);
21196: if ((null != arg$3690 && processScopeNodes
21197: .contains(arg$3690.getName()))) {
21198: processScope(arg$3690, getScope);
21199: }
21200: checkEnterScope(arg$3690);
21201:
21202: final Object retValue$3810 = Analyzer
21203: .cast(Primitives.addInt.apply(
21204: countAppearance.apply(
21205: s, n1),
21206: countAppearance.apply(
21207: s, n2)));
21208:
21209: checkExitScope(arg$3690);
21210: matching_nodes.remove(matching_nodes
21211: .size() - 1);
21212: return Analyzer.cast(retValue$3810);
21213: }
21214: if (TypicalSupport.match$673(arg$3690)) {
21215: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21216: .getGeneric(0)
21217: : null);
21218: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21219: .getGeneric(1)
21220: : null);
21221:
21222: matching_nodes.add(arg$3690);
21223: if ((null != arg$3690 && processScopeNodes
21224: .contains(arg$3690.getName()))) {
21225: processScope(arg$3690, getScope);
21226: }
21227: checkEnterScope(arg$3690);
21228:
21229: final Object retValue$3814 = Analyzer
21230: .cast(Primitives.addInt.apply(
21231: countAppearance.apply(
21232: s, n1),
21233: countAppearance.apply(
21234: s, n2)));
21235:
21236: checkExitScope(arg$3690);
21237: matching_nodes.remove(matching_nodes
21238: .size() - 1);
21239: return Analyzer.cast(retValue$3814);
21240: }
21241: if (TypicalSupport.match$2267(arg$3690)) {
21242: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21243: .getGeneric(0)
21244: : null);
21245: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21246: .getGeneric(1)
21247: : null);
21248:
21249: matching_nodes.add(arg$3690);
21250: if ((null != arg$3690 && processScopeNodes
21251: .contains(arg$3690.getName()))) {
21252: processScope(arg$3690, getScope);
21253: }
21254: checkEnterScope(arg$3690);
21255:
21256: final Object retValue$3818 = Analyzer
21257: .cast(Primitives.addInt.apply(
21258: countAppearance.apply(
21259: s, n1),
21260: countAppearance.apply(
21261: s, n2)));
21262:
21263: checkExitScope(arg$3690);
21264: matching_nodes.remove(matching_nodes
21265: .size() - 1);
21266: return Analyzer.cast(retValue$3818);
21267: }
21268: if (TypicalSupport.match$255(arg$3690)) {
21269: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21270: .getGeneric(0)
21271: : null);
21272: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21273: .getGeneric(1)
21274: : null);
21275:
21276: matching_nodes.add(arg$3690);
21277: if ((null != arg$3690 && processScopeNodes
21278: .contains(arg$3690.getName()))) {
21279: processScope(arg$3690, getScope);
21280: }
21281: checkEnterScope(arg$3690);
21282:
21283: final Object retValue$3822 = Analyzer
21284: .cast(Primitives.addInt.apply(
21285: countAppearance.apply(
21286: s, n1),
21287: countAppearance.apply(
21288: s, n2)));
21289:
21290: checkExitScope(arg$3690);
21291: matching_nodes.remove(matching_nodes
21292: .size() - 1);
21293: return Analyzer.cast(retValue$3822);
21294: }
21295: if (TypicalSupport.match$665(arg$3690)) {
21296: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21297: .getGeneric(0)
21298: : null);
21299: final Node n2 = (arg$3690.size() > 2 ? arg$3690
21300: .getGeneric(2)
21301: : null);
21302:
21303: matching_nodes.add(arg$3690);
21304: if ((null != arg$3690 && processScopeNodes
21305: .contains(arg$3690.getName()))) {
21306: processScope(arg$3690, getScope);
21307: }
21308: checkEnterScope(arg$3690);
21309:
21310: final Object retValue$3826 = Analyzer
21311: .cast(Primitives.addInt.apply(
21312: countAppearance.apply(
21313: s, n1),
21314: countAppearance.apply(
21315: s, n2)));
21316:
21317: checkExitScope(arg$3690);
21318: matching_nodes.remove(matching_nodes
21319: .size() - 1);
21320: return Analyzer.cast(retValue$3826);
21321: }
21322: if (TypicalSupport.match$2795(arg$3690)) {
21323: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21324: .getGeneric(0)
21325: : null);
21326: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21327: .getGeneric(1)
21328: : null);
21329:
21330: matching_nodes.add(arg$3690);
21331: if ((null != arg$3690 && processScopeNodes
21332: .contains(arg$3690.getName()))) {
21333: processScope(arg$3690, getScope);
21334: }
21335: checkEnterScope(arg$3690);
21336:
21337: final Object retValue$3830 = Analyzer
21338: .cast(Primitives.addInt.apply(
21339: countAppearance.apply(
21340: s, n1),
21341: countAppearance.apply(
21342: s, n2)));
21343:
21344: checkExitScope(arg$3690);
21345: matching_nodes.remove(matching_nodes
21346: .size() - 1);
21347: return Analyzer.cast(retValue$3830);
21348: }
21349: if (TypicalSupport.match$287(arg$3690)) {
21350: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21351: .getGeneric(0)
21352: : null);
21353: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21354: .getGeneric(1)
21355: : null);
21356:
21357: matching_nodes.add(arg$3690);
21358: if ((null != arg$3690 && processScopeNodes
21359: .contains(arg$3690.getName()))) {
21360: processScope(arg$3690, getScope);
21361: }
21362: checkEnterScope(arg$3690);
21363:
21364: final Object retValue$3834 = Analyzer
21365: .cast(Primitives.addInt.apply(
21366: countAppearance.apply(
21367: s, n1),
21368: countAppearance.apply(
21369: s, n2)));
21370:
21371: checkExitScope(arg$3690);
21372: matching_nodes.remove(matching_nodes
21373: .size() - 1);
21374: return Analyzer.cast(retValue$3834);
21375: }
21376: if (TypicalSupport.match$306(arg$3690)) {
21377: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21378: .getGeneric(0)
21379: : null);
21380: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21381: .getGeneric(1)
21382: : null);
21383:
21384: matching_nodes.add(arg$3690);
21385: if ((null != arg$3690 && processScopeNodes
21386: .contains(arg$3690.getName()))) {
21387: processScope(arg$3690, getScope);
21388: }
21389: checkEnterScope(arg$3690);
21390:
21391: final Object retValue$3838 = Analyzer
21392: .cast(Primitives.addInt.apply(
21393: countAppearance.apply(
21394: s, n1),
21395: countAppearance.apply(
21396: s, n2)));
21397:
21398: checkExitScope(arg$3690);
21399: matching_nodes.remove(matching_nodes
21400: .size() - 1);
21401: return Analyzer.cast(retValue$3838);
21402: }
21403: if (TypicalSupport.match$312(arg$3690)) {
21404: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21405: .getGeneric(0)
21406: : null);
21407: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21408: .getGeneric(1)
21409: : null);
21410:
21411: matching_nodes.add(arg$3690);
21412: if ((null != arg$3690 && processScopeNodes
21413: .contains(arg$3690.getName()))) {
21414: processScope(arg$3690, getScope);
21415: }
21416: checkEnterScope(arg$3690);
21417:
21418: final Object retValue$3842 = Analyzer
21419: .cast(Primitives.addInt.apply(
21420: countAppearance.apply(
21421: s, n1),
21422: countAppearance.apply(
21423: s, n2)));
21424:
21425: checkExitScope(arg$3690);
21426: matching_nodes.remove(matching_nodes
21427: .size() - 1);
21428: return Analyzer.cast(retValue$3842);
21429: }
21430: if (TypicalSupport.match$363(arg$3690)) {
21431: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21432: .getGeneric(0)
21433: : null);
21434: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21435: .getGeneric(1)
21436: : null);
21437:
21438: matching_nodes.add(arg$3690);
21439: if ((null != arg$3690 && processScopeNodes
21440: .contains(arg$3690.getName()))) {
21441: processScope(arg$3690, getScope);
21442: }
21443: checkEnterScope(arg$3690);
21444:
21445: final Object retValue$3846 = Analyzer
21446: .cast(Primitives.addInt.apply(
21447: countAppearance.apply(
21448: s, n1),
21449: countAppearance.apply(
21450: s, n2)));
21451:
21452: checkExitScope(arg$3690);
21453: matching_nodes.remove(matching_nodes
21454: .size() - 1);
21455: return Analyzer.cast(retValue$3846);
21456: }
21457: if (TypicalSupport.match$2415(arg$3690)) {
21458: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21459: .getGeneric(0)
21460: : null);
21461: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21462: .getGeneric(1)
21463: : null);
21464:
21465: matching_nodes.add(arg$3690);
21466: if ((null != arg$3690 && processScopeNodes
21467: .contains(arg$3690.getName()))) {
21468: processScope(arg$3690, getScope);
21469: }
21470: checkEnterScope(arg$3690);
21471:
21472: final Object retValue$3850 = Analyzer
21473: .cast(Primitives.addInt.apply(
21474: countAppearance.apply(
21475: s, n1),
21476: countAppearance.apply(
21477: s, n2)));
21478:
21479: checkExitScope(arg$3690);
21480: matching_nodes.remove(matching_nodes
21481: .size() - 1);
21482: return Analyzer.cast(retValue$3850);
21483: }
21484: if (TypicalSupport.match$2427(arg$3690)) {
21485: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21486: .getGeneric(0)
21487: : null);
21488: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21489: .getGeneric(1)
21490: : null);
21491:
21492: matching_nodes.add(arg$3690);
21493: if ((null != arg$3690 && processScopeNodes
21494: .contains(arg$3690.getName()))) {
21495: processScope(arg$3690, getScope);
21496: }
21497: checkEnterScope(arg$3690);
21498:
21499: final Object retValue$3854 = Analyzer
21500: .cast(Primitives.addInt.apply(
21501: countAppearance.apply(
21502: s, n1),
21503: countAppearance.apply(
21504: s, n2)));
21505:
21506: checkExitScope(arg$3690);
21507: matching_nodes.remove(matching_nodes
21508: .size() - 1);
21509: return Analyzer.cast(retValue$3854);
21510: }
21511: if (TypicalSupport.match$65(arg$3690)) {
21512: final String str = (arg$3690.size() > 0 ? arg$3690
21513: .getString(0)
21514: : null);
21515:
21516: matching_nodes.add(arg$3690);
21517: if ((null != arg$3690 && processScopeNodes
21518: .contains(arg$3690.getName()))) {
21519: processScope(arg$3690, getScope);
21520: }
21521: checkEnterScope(arg$3690);
21522:
21523: final Object retValue$3858 = Analyzer
21524: .cast(null == Primitives.equal
21525: .apply(s, str) ? null
21526: : Primitives.equal
21527: .apply(s, str) ? BigInteger
21528: .valueOf(1)
21529: : BigInteger
21530: .valueOf(0));
21531:
21532: checkExitScope(arg$3690);
21533: matching_nodes.remove(matching_nodes
21534: .size() - 1);
21535: return Analyzer.cast(retValue$3858);
21536: }
21537: if (TypicalSupport.match$61(arg$3690)) {
21538: final String str = (arg$3690.size() > 0 ? arg$3690
21539: .getString(0)
21540: : null);
21541:
21542: matching_nodes.add(arg$3690);
21543: if ((null != arg$3690 && processScopeNodes
21544: .contains(arg$3690.getName()))) {
21545: processScope(arg$3690, getScope);
21546: }
21547: checkEnterScope(arg$3690);
21548:
21549: final Object retValue$3862 = Analyzer
21550: .cast(null == Primitives.equal
21551: .apply(s, str) ? null
21552: : Primitives.equal
21553: .apply(s, str) ? BigInteger
21554: .valueOf(1)
21555: : BigInteger
21556: .valueOf(0));
21557:
21558: checkExitScope(arg$3690);
21559: matching_nodes.remove(matching_nodes
21560: .size() - 1);
21561: return Analyzer.cast(retValue$3862);
21562: }
21563: if (TypicalSupport.match$692(arg$3690)) {
21564: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21565: .getGeneric(0)
21566: : null);
21567: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21568: .getGeneric(1)
21569: : null);
21570: final Node n3 = (arg$3690.size() > 2 ? arg$3690
21571: .getGeneric(2)
21572: : null);
21573:
21574: matching_nodes.add(arg$3690);
21575: if ((null != arg$3690 && processScopeNodes
21576: .contains(arg$3690.getName()))) {
21577: processScope(arg$3690, getScope);
21578: }
21579: checkEnterScope(arg$3690);
21580:
21581: final Object retValue$3866 = Analyzer
21582: .cast(Primitives.addInt
21583: .apply(
21584: Primitives.addInt
21585: .apply(
21586: countAppearance
21587: .apply(
21588: s,
21589: n1),
21590: countAppearance
21591: .apply(
21592: s,
21593: n2)),
21594: countAppearance
21595: .apply(
21596: s,
21597: n3)));
21598:
21599: checkExitScope(arg$3690);
21600: matching_nodes.remove(matching_nodes
21601: .size() - 1);
21602: return Analyzer.cast(retValue$3866);
21603: }
21604: if (TypicalSupport.match$2828(arg$3690)) {
21605: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21606: .getGeneric(0)
21607: : null);
21608: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21609: .getGeneric(1)
21610: : null);
21611: final Node n3 = (arg$3690.size() > 2 ? arg$3690
21612: .getGeneric(2)
21613: : null);
21614:
21615: matching_nodes.add(arg$3690);
21616: if ((null != arg$3690 && processScopeNodes
21617: .contains(arg$3690.getName()))) {
21618: processScope(arg$3690, getScope);
21619: }
21620: checkEnterScope(arg$3690);
21621:
21622: final Object retValue$3870 = Analyzer
21623: .cast(Primitives.addInt
21624: .apply(
21625: Primitives.addInt
21626: .apply(
21627: countAppearance
21628: .apply(
21629: s,
21630: n1),
21631: countAppearance
21632: .apply(
21633: s,
21634: n2)),
21635: countAppearance
21636: .apply(
21637: s,
21638: n3)));
21639:
21640: checkExitScope(arg$3690);
21641: matching_nodes.remove(matching_nodes
21642: .size() - 1);
21643: return Analyzer.cast(retValue$3870);
21644: }
21645: if (TypicalSupport.match$2801(arg$3690)) {
21646: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21647: .getGeneric(0)
21648: : null);
21649: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21650: .getGeneric(1)
21651: : null);
21652: final Node n3 = (arg$3690.size() > 2 ? arg$3690
21653: .getGeneric(2)
21654: : null);
21655:
21656: matching_nodes.add(arg$3690);
21657: if ((null != arg$3690 && processScopeNodes
21658: .contains(arg$3690.getName()))) {
21659: processScope(arg$3690, getScope);
21660: }
21661: checkEnterScope(arg$3690);
21662:
21663: final Object retValue$3874 = Analyzer
21664: .cast(Primitives.addInt
21665: .apply(
21666: Primitives.addInt
21667: .apply(
21668: countAppearance
21669: .apply(
21670: s,
21671: n1),
21672: countAppearance
21673: .apply(
21674: s,
21675: n2)),
21676: countAppearance
21677: .apply(
21678: s,
21679: n3)));
21680:
21681: checkExitScope(arg$3690);
21682: matching_nodes.remove(matching_nodes
21683: .size() - 1);
21684: return Analyzer.cast(retValue$3874);
21685: }
21686: if (TypicalSupport.match$2405(arg$3690)) {
21687: final Node n1 = (arg$3690.size() > 0 ? arg$3690
21688: .getGeneric(0)
21689: : null);
21690: final Node n2 = (arg$3690.size() > 1 ? arg$3690
21691: .getGeneric(1)
21692: : null);
21693: final Node n3 = (arg$3690.size() > 2 ? arg$3690
21694: .getGeneric(2)
21695: : null);
21696: final Node n4 = (arg$3690.size() > 3 ? arg$3690
21697: .getGeneric(3)
21698: : null);
21699:
21700: matching_nodes.add(arg$3690);
21701: if ((null != arg$3690 && processScopeNodes
21702: .contains(arg$3690.getName()))) {
21703: processScope(arg$3690, getScope);
21704: }
21705: checkEnterScope(arg$3690);
21706:
21707: final Object retValue$3878 = Analyzer
21708: .cast(Primitives.addInt
21709: .apply(
21710: Primitives.addInt
21711: .apply(
21712: Primitives.addInt
21713: .apply(
21714: countAppearance
21715: .apply(
21716: s,
21717: n1),
21718: countAppearance
21719: .apply(
21720: s,
21721: n2)),
21722: countAppearance
21723: .apply(
21724: s,
21725: n3)),
21726: countAppearance
21727: .apply(
21728: s,
21729: n4)));
21730:
21731: checkExitScope(arg$3690);
21732: matching_nodes.remove(matching_nodes
21733: .size() - 1);
21734: return Analyzer.cast(retValue$3878);
21735: }
21736: if (true) {
21737: matching_nodes.add(arg$3690);
21738: if ((null != arg$3690 && processScopeNodes
21739: .contains(arg$3690.getName()))) {
21740: processScope(arg$3690, getScope);
21741: }
21742: checkEnterScope(arg$3690);
21743:
21744: final Object retValue$3881 = Analyzer
21745: .cast(BigInteger.valueOf(0));
21746:
21747: checkExitScope(arg$3690);
21748: matching_nodes.remove(matching_nodes
21749: .size() - 1);
21750: return Analyzer.cast(retValue$3881);
21751: }
21752: return null;
21753: }
21754: }.apply());
21755: }
21756: };
21757:
21758: final Function.F2<Pair<String>, Pair<String>, Node> removeUsedVariables = new Function.F2<Pair<String>, Pair<String>, Node>() {
21759: public Pair<String> apply(final Pair<String> strList,
21760: final Node no) {
21761: return new Match<Pair<String>>() {
21762: public Pair<String> apply() {
21763: final Pair<String> arg$3883 = Analyzer
21764: .cast(strList);
21765:
21766: if ((null == arg$3883)) {
21767: return null;
21768: }
21769: if (TypicalSupport.match$3230(arg$3883)) {
21770: return Analyzer.cast(Pair.<String> empty());
21771: }
21772: if (true) {
21773: final Pair<String> list$3885 = Analyzer
21774: .cast(Analyzer.cast(arg$3883));
21775: final String x = Analyzer.cast(Primitives
21776: .wrapHead(list$3885));
21777: final Pair<String> xs = Analyzer
21778: .cast(Primitives.wrapTail(list$3885));
21779:
21780: return Analyzer
21781: .cast(null == Primitives.greaterInt
21782: .apply(countAppearance.apply(x,
21783: no), BigInteger
21784: .valueOf(1)) ? null
21785: : Primitives.greaterInt.apply(
21786: countAppearance.apply(
21787: x, no),
21788: BigInteger.valueOf(1)) ? removeUsedVariables
21789: .apply(xs, no)
21790: : TypicalSupport.append$297
21791: .apply(
21792: new Pair<String>(
21793: x),
21794: removeUsedVariables
21795: .apply(
21796: xs,
21797: no)));
21798: }
21799: return null;
21800: }
21801: }.apply();
21802: }
21803: };
21804:
21805: final Function.F1<Object, Pair<Node>> checkUnusedParameters = new Function.F1<Object, Pair<Node>>() {
21806: public Object apply(final Pair<Node> nl) {
21807: return new Match<Object>() {
21808: public Object apply() {
21809: final Pair<Node> arg$3887 = Analyzer.cast(nl);
21810:
21811: if ((null == arg$3887)) {
21812: return null;
21813: }
21814: if (TypicalSupport.match$323(arg$3887)) {
21815: return Analyzer.cast(null);
21816: }
21817: if (true) {
21818: final Pair<Node> list$3889 = Analyzer
21819: .cast(Analyzer.cast(arg$3887));
21820: final Node x = GNode.cast(Primitives
21821: .wrapHead(list$3889));
21822: final Pair<Node> xs = Analyzer.cast(Primitives
21823: .wrapTail(list$3889));
21824:
21825: return Analyzer.cast(new Match<Object>() {
21826: public Object apply() {
21827: final Node arg$3900 = GNode.cast(x);
21828:
21829: if ((null == arg$3900)) {
21830: return null;
21831: }
21832: if (TypicalSupport.match$73(arg$3900)) {
21833: final Node p = (arg$3900.size() > 1 ? arg$3900
21834: .getGeneric(1)
21835: : null);
21836: final Node v = (arg$3900.size() > 2 ? arg$3900
21837: .getGeneric(2)
21838: : null);
21839:
21840: matching_nodes.add(arg$3900);
21841: if ((null != arg$3900 && processScopeNodes
21842: .contains(arg$3900
21843: .getName()))) {
21844: processScope(arg$3900, getScope);
21845: }
21846: checkEnterScope(arg$3900);
21847:
21848: final Object retValue$3904 = Analyzer
21849: .cast(new Let<Object>() {
21850: final TypicalTypes.raw_type<?> t;
21851:
21852: {
21853: t = Analyzer
21854: .cast(Analyzer
21855: .cast(lookup2
21856: .apply(
21857: x,
21858: getNameSpace)));
21859: }
21860:
21861: public Object apply() {
21862: return Analyzer
21863: .cast(null == Primitives.isBottom
21864: .apply(t) ? null
21865: : Primitives.isBottom
21866: .apply(t) ? checkUnusedParameters
21867: .apply(xs)
21868: : null == Primitives.isNotBottom
21869: .apply(p)
21870: || !Primitives.isNotBottom
21871: .apply(p) ? null
21872: : new Let<Object>() {
21873: final Pair<Node> nl;
21874: final Pair<String> vars;
21875:
21876: {
21877: nl = Analyzer
21878: .cast(getNodeList
21879: .apply(p));
21880: vars = Analyzer
21881: .cast(TypicalSupport.map$3892
21882: .apply(
21883: getString,
21884: nl));
21885: checkUnusedVariables
21886: .apply(
21887: vars,
21888: v);
21889: }
21890:
21891: public Object apply() {
21892: return Analyzer
21893: .cast(checkUnusedParameters
21894: .apply(xs));
21895: }
21896: }
21897: .apply());
21898: }
21899: }.apply());
21900:
21901: checkExitScope(arg$3900);
21902: matching_nodes
21903: .remove(matching_nodes
21904: .size() - 1);
21905: return Analyzer.cast(retValue$3904);
21906: }
21907: if (true) {
21908: matching_nodes.add(arg$3900);
21909: if ((null != arg$3900 && processScopeNodes
21910: .contains(arg$3900
21911: .getName()))) {
21912: processScope(arg$3900, getScope);
21913: }
21914: checkEnterScope(arg$3900);
21915:
21916: final Object retValue$3907 = Analyzer
21917: .cast(checkUnusedParameters
21918: .apply(xs));
21919:
21920: checkExitScope(arg$3900);
21921: matching_nodes
21922: .remove(matching_nodes
21923: .size() - 1);
21924: return Analyzer.cast(retValue$3907);
21925: }
21926: return null;
21927: }
21928: }.apply());
21929: }
21930: return null;
21931: }
21932: }.apply();
21933: }
21934: };
21935:
21936: final Function.F2<String, Node, String> getAnnotatedString = new Function.F2<String, Node, String>() {
21937: public String apply(final Node n, final String s) {
21938: return new Let<String>() {
21939: final TypicalTypes.raw_type<?> t;
21940:
21941: {
21942: t = Analyzer.cast(Primitives.getAnnotation.apply(n,
21943: s));
21944: }
21945:
21946: public String apply() {
21947: return Analyzer.cast(new Match<String>() {
21948: public String apply() {
21949: final TypicalTypes.raw_type<?> arg$3910 = Analyzer
21950: .cast(t);
21951:
21952: if ((null == arg$3910)) {
21953: return null;
21954: }
21955: if ((null != arg$3910))
21956: switch (arg$3910.tag()) {
21957: case StringName:
21958: if (TypicalSupport
21959: .match$3911(arg$3910)) {
21960: final String res = Analyzer
21961: .cast(arg$3910
21962: .getTuple()
21963: .get1());
21964:
21965: return Analyzer.cast(res);
21966: }
21967: break;
21968: default:
21969: break;
21970: }
21971: ;
21972: if (true) {
21973: return Analyzer.cast(null);
21974: }
21975: return null;
21976: }
21977: }.apply());
21978: }
21979: }.apply();
21980: }
21981: };
21982:
21983: final Function.F2<Pair<String>, Node, String> getAnnotatedStringList = new Function.F2<Pair<String>, Node, String>() {
21984: public Pair<String> apply(final Node n, final String s) {
21985: return new Let<Pair<String>>() {
21986: final TypicalTypes.raw_type<?> t;
21987:
21988: {
21989: t = Analyzer.cast(Primitives.getAnnotation.apply(n,
21990: s));
21991: }
21992:
21993: public Pair<String> apply() {
21994: return Analyzer.cast(new Match<Pair<String>>() {
21995: public Pair<String> apply() {
21996: final TypicalTypes.raw_type<?> arg$3913 = Analyzer
21997: .cast(t);
21998:
21999: if ((null == arg$3913)) {
22000: return null;
22001: }
22002: if ((null != arg$3913))
22003: switch (arg$3913.tag()) {
22004: case StringList:
22005: if (TypicalSupport
22006: .match$3352(arg$3913)) {
22007: final Pair<String> res = Analyzer
22008: .cast(arg$3913
22009: .getTuple()
22010: .get1());
22011:
22012: return Analyzer.cast(res);
22013: }
22014: break;
22015: default:
22016: break;
22017: }
22018: ;
22019: if (true) {
22020: return Analyzer.cast(null);
22021: }
22022: return null;
22023: }
22024: }.apply());
22025: }
22026: }.apply();
22027: }
22028: };
22029:
22030: final Function.F1<Boolean, String> hasTypeVariables = new Function.F1<Boolean, String>() {
22031: public Boolean apply(final String s) {
22032: return (null == isDefined.apply(GNode.create(
22033: "NameSpaceStructure", s, null, null), getNameSpace) ? null
22034: : isDefined.apply(GNode.create(
22035: "NameSpaceStructure", s, null, null),
22036: getNameSpace) ? new Let<Boolean>() {
22037: final Node nod;
22038:
22039: {
22040: nod = Analyzer
22041: .cast(Analyzer
22042: .cast(lookup2
22043: .apply(
22044: GNode
22045: .create(
22046: "NameSpaceStructure",
22047: s,
22048: null,
22049: null),
22050: getNameSpace)));
22051: }
22052:
22053: public Boolean apply() {
22054: return Analyzer
22055: .cast(Primitives.hasAnnotation
22056: .apply(nod,
22057: "type_variables"));
22058: }
22059: }.apply()
22060: : Boolean.FALSE);
22061: }
22062: };
22063:
22064: protected class removeLast {
22065: public <T0> Pair<T0> apply(final Pair<T0> nl) {
22066: return new Match<Pair<T0>>() {
22067: public Pair<T0> apply() {
22068: final Pair<Object> arg$3916 = Analyzer.cast(nl);
22069:
22070: if ((null == arg$3916)) {
22071: return null;
22072: }
22073: if (TypicalSupport.match$3917(arg$3916)) {
22074: return Analyzer.cast(Pair.empty());
22075: }
22076: if (TypicalSupport.match$3918(arg$3916)) {
22077: return Analyzer.cast(Pair.empty());
22078: }
22079: if (true) {
22080: final Pair<Object> list$3919 = Analyzer
22081: .cast(Analyzer.cast(arg$3916));
22082: final Object x = Analyzer.cast(Primitives
22083: .wrapHead(list$3919));
22084: final Pair<Object> xs = Analyzer
22085: .cast(Primitives.wrapTail(list$3919));
22086:
22087: return Analyzer.cast(TypicalSupport.append$3920
22088: .apply(new Pair<Object>(x), removeLast
22089: .apply(xs)));
22090: }
22091: return null;
22092: }
22093: }.apply();
22094: }
22095: }
22096:
22097: final removeLast removeLast = new removeLast();
22098:
22099: final Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, Pair<Node>> processFunctionApplication = new Function.F2<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, Pair<Node>>() {
22100: public TypicalTypes.raw_type<?> apply(
22101: final TypicalTypes.raw_type<?> t, final Pair<Node> nl) {
22102: return new Match<TypicalTypes.raw_type<?>>() {
22103: public TypicalTypes.raw_type<?> apply() {
22104: final TypicalTypes.raw_type<?> arg$3922 = Analyzer
22105: .cast(t);
22106:
22107: if ((null == arg$3922)) {
22108: return null;
22109: }
22110: if ((null != arg$3922))
22111: switch (arg$3922.tag()) {
22112: case VariableT:
22113: if (TypicalSupport.match$117(arg$3922)) {
22114: final String str = Analyzer
22115: .cast(arg$3922.getTuple()
22116: .get1());
22117:
22118: return Analyzer
22119: .cast(new Let<TypicalTypes.raw_type<?>>() {
22120: final TypicalTypes.raw_type<?> ty;
22121:
22122: {
22123: ty = Analyzer
22124: .cast(Analyzer
22125: .cast(Primitives.get
22126: .apply(
22127: str,
22128: hashTable)));
22129: }
22130:
22131: public TypicalTypes.raw_type<?> apply() {
22132: return Analyzer
22133: .cast(null == Primitives.isNotBottom
22134: .apply(ty) ? null
22135: : Primitives.isNotBottom
22136: .apply(ty) ? processFunctionApplication
22137: .apply(
22138: ty,
22139: nl)
22140: : new Let<TypicalTypes.raw_type<?>>() {
22141: final Pair<TypicalTypes.raw_type<?>> tnl;
22142:
22143: {
22144: tnl = Analyzer
22145: .cast(TypicalSupport.map$129
22146: .apply(
22147: analyze,
22148: nl));
22149: }
22150:
22151: public TypicalTypes.raw_type<?> apply() {
22152: return Analyzer
22153: .cast(null == Primitives.not
22154: .apply(TypicalSupport.exists$184
22155: .apply(
22156: Primitives.isBottom,
22157: tnl))
22158: || !Primitives.not
22159: .apply(TypicalSupport.exists$184
22160: .apply(
22161: Primitives.isBottom,
22162: tnl)) ? null
22163: : new Let<TypicalTypes.raw_type<?>>() {
22164: final TypicalTypes.raw_type<?> ret;
22165:
22166: {
22167: ret = Analyzer
22168: .cast(new TypicalTypes.VariableT(
22169: freshName
22170: .apply("type"),
22171: Boolean.FALSE));
22172: Analyzer
22173: .cast(Primitives.put
22174: .apply(
22175: str,
22176: new TypicalTypes.FunctionT(
22177: tnl,
22178: ret),
22179: hashTable));
22180: }
22181:
22182: public TypicalTypes.raw_type<?> apply() {
22183: return Analyzer
22184: .cast(ret);
22185: }
22186: }
22187: .apply());
22188: }
22189: }
22190: .apply());
22191: }
22192: }.apply());
22193: }
22194: break;
22195: case FunctionT:
22196: if (TypicalSupport.match$97(arg$3922)) {
22197: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22198: .cast(arg$3922.getTuple()
22199: .get1());
22200: final TypicalTypes.raw_type<?> ret = Analyzer
22201: .cast(arg$3922.getTuple()
22202: .get2());
22203:
22204: return Analyzer
22205: .cast(null == Primitives.greaterInt
22206: .apply(
22207: Primitives.length
22208: .apply(nl),
22209: Primitives.length
22210: .apply(tl)) ? null
22211: : Primitives.greaterInt
22212: .apply(
22213: Primitives.length
22214: .apply(nl),
22215: Primitives.length
22216: .apply(tl)) ? error(
22217: "too many arguments in function application",
22218: null)
22219: : processArguments
22220: .apply(
22221: nl,
22222: tl,
22223: ret));
22224: }
22225: break;
22226: default:
22227: break;
22228: }
22229: ;
22230: if (true) {
22231: return Analyzer.cast(error(Primitives.concat
22232: .apply("expected function, found ",
22233: getTypeName.apply(t)), null));
22234: }
22235: return null;
22236: }
22237: }.apply();
22238: }
22239: };
22240:
22241: final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> copy = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
22242: public TypicalTypes.raw_type<?> apply(
22243: final TypicalTypes.raw_type<?> t) {
22244: return new Match<TypicalTypes.raw_type<?>>() {
22245: public TypicalTypes.raw_type<?> apply() {
22246: final TypicalTypes.raw_type<?> arg$3926 = Analyzer
22247: .cast(t);
22248:
22249: if ((null == arg$3926)) {
22250: return null;
22251: }
22252: if ((null != arg$3926))
22253: switch (arg$3926.tag()) {
22254: case FunctionT:
22255: if (TypicalSupport.match$97(arg$3926)) {
22256: return Analyzer
22257: .cast(new Let<TypicalTypes.raw_type<?>>() {
22258: final Pair<String> vars;
22259:
22260: {
22261: vars = Analyzer
22262: .cast(collectTypeVariables
22263: .apply(t));
22264: }
22265:
22266: public TypicalTypes.raw_type<?> apply() {
22267: return Analyzer
22268: .cast(replaceTypeVariables
22269: .apply(
22270: vars,
22271: t));
22272: }
22273: }.apply());
22274: }
22275: break;
22276: case VariantT:
22277: if (TypicalSupport.match$100(arg$3926)) {
22278: return Analyzer
22279: .cast(new Let<TypicalTypes.raw_type<?>>() {
22280: final Pair<String> vars;
22281:
22282: {
22283: vars = Analyzer
22284: .cast(collectTypeVariables
22285: .apply(t));
22286: }
22287:
22288: public TypicalTypes.raw_type<?> apply() {
22289: return Analyzer
22290: .cast(replaceTypeVariables
22291: .apply(
22292: vars,
22293: t));
22294: }
22295: }.apply());
22296: }
22297: break;
22298: case TypeName:
22299: if (TypicalSupport.match$95(arg$3926)) {
22300: final String s = Analyzer.cast(arg$3926
22301: .getTuple().get1());
22302:
22303: return Analyzer
22304: .cast(new Let<TypicalTypes.raw_type<?>>() {
22305: final TypicalTypes.raw_type<?> t;
22306:
22307: {
22308: t = Analyzer
22309: .cast(Analyzer
22310: .cast(lookup2
22311: .apply(
22312: GNode
22313: .create(
22314: "UserDefinedType",
22315: s),
22316: getNameSpace)));
22317: }
22318:
22319: public TypicalTypes.raw_type<?> apply() {
22320: return Analyzer
22321: .cast(copy
22322: .apply(t));
22323: }
22324: }.apply());
22325: }
22326: break;
22327: case ConstructorT:
22328: if (TypicalSupport.match$94(arg$3926)) {
22329: return Analyzer
22330: .cast(new Let<TypicalTypes.raw_type<?>>() {
22331: final Pair<String> vars;
22332:
22333: {
22334: vars = Analyzer
22335: .cast(collectTypeVariables
22336: .apply(t));
22337: }
22338:
22339: public TypicalTypes.raw_type<?> apply() {
22340: return Analyzer
22341: .cast(replaceTypeVariables
22342: .apply(
22343: vars,
22344: t));
22345: }
22346: }.apply());
22347: }
22348: break;
22349: case FieldT:
22350: if (TypicalSupport.match$96(arg$3926)) {
22351: return Analyzer
22352: .cast(new Let<TypicalTypes.raw_type<?>>() {
22353: final Pair<String> vars;
22354:
22355: {
22356: vars = Analyzer
22357: .cast(collectTypeVariables
22358: .apply(t));
22359: }
22360:
22361: public TypicalTypes.raw_type<?> apply() {
22362: return Analyzer
22363: .cast(replaceTypeVariables
22364: .apply(
22365: vars,
22366: t));
22367: }
22368: }.apply());
22369: }
22370: break;
22371: case RecordT:
22372: if (TypicalSupport.match$107(arg$3926)) {
22373: return Analyzer
22374: .cast(new Let<TypicalTypes.raw_type<?>>() {
22375: final Pair<String> vars;
22376:
22377: {
22378: vars = Analyzer
22379: .cast(collectTypeVariables
22380: .apply(t));
22381: }
22382:
22383: public TypicalTypes.raw_type<?> apply() {
22384: return Analyzer
22385: .cast(replaceTypeVariables
22386: .apply(
22387: vars,
22388: t));
22389: }
22390: }.apply());
22391: }
22392: break;
22393: default:
22394: break;
22395: }
22396: ;
22397: if (true) {
22398: return Analyzer.cast(t);
22399: }
22400: return null;
22401: }
22402: }.apply();
22403: }
22404: };
22405:
22406: final Function.F2<TypicalTypes.raw_type<?>, Pair<String>, TypicalTypes.raw_type<?>> replaceTypeVariables = new Function.F2<TypicalTypes.raw_type<?>, Pair<String>, TypicalTypes.raw_type<?>>() {
22407: public TypicalTypes.raw_type<?> apply(final Pair<String> vars,
22408: final TypicalTypes.raw_type<?> t) {
22409: return (null == Primitives.isBottom.apply(vars) ? null
22410: : Primitives.isBottom.apply(vars) ? t
22411: : new Match<TypicalTypes.raw_type<?>>() {
22412: public TypicalTypes.raw_type<?> apply() {
22413: final Pair<String> arg$3934 = Analyzer
22414: .cast(vars);
22415:
22416: if ((null == arg$3934)) {
22417: return null;
22418: }
22419: if (TypicalSupport
22420: .match$3230(arg$3934)) {
22421: return Analyzer.cast(t);
22422: }
22423: if (true) {
22424: final Pair<String> list$3936 = Analyzer
22425: .cast(Analyzer
22426: .cast(arg$3934));
22427: final String x = Analyzer
22428: .cast(Primitives
22429: .wrapHead(list$3936));
22430: final Pair<String> xs = Analyzer
22431: .cast(Primitives
22432: .wrapTail(list$3936));
22433:
22434: return Analyzer
22435: .cast(replaceTypeVariables
22436: .apply(
22437: xs,
22438: replace
22439: .apply(
22440: t,
22441: x,
22442: freshName
22443: .apply("type"))));
22444: }
22445: return null;
22446: }
22447: }.apply());
22448: }
22449: };
22450:
22451: final Function.F1<Pair<String>, TypicalTypes.raw_type<?>> collectTypeVariables = new Function.F1<Pair<String>, TypicalTypes.raw_type<?>>() {
22452: public Pair<String> apply(final TypicalTypes.raw_type<?> t) {
22453: return new Match<Pair<String>>() {
22454: public Pair<String> apply() {
22455: final TypicalTypes.raw_type<?> arg$3938 = Analyzer
22456: .cast(t);
22457:
22458: if ((null == arg$3938)) {
22459: return null;
22460: }
22461: if ((null != arg$3938))
22462: switch (arg$3938.tag()) {
22463: case PairOfType:
22464: if (TypicalSupport.match$116(arg$3938)) {
22465: final TypicalTypes.raw_type<?> t1 = Analyzer
22466: .cast(arg$3938.getTuple()
22467: .get1());
22468: final TypicalTypes.raw_type<?> t2 = Analyzer
22469: .cast(arg$3938.getTuple()
22470: .get2());
22471:
22472: return Analyzer
22473: .cast(new Let<Pair<String>>() {
22474: final Pair<String> vars1;
22475: final Pair<String> vars2;
22476:
22477: {
22478: vars1 = Analyzer
22479: .cast(collectTypeVariables
22480: .apply(t1));
22481: vars2 = Analyzer
22482: .cast(collectTypeVariables
22483: .apply(t2));
22484: }
22485:
22486: public Pair<String> apply() {
22487: return Analyzer
22488: .cast(TypicalSupport.union$313
22489: .apply(
22490: vars1,
22491: vars2));
22492: }
22493: }.apply());
22494: }
22495: break;
22496: case VariableT:
22497: if (TypicalSupport.match$3939(arg$3938)) {
22498: final String str = Analyzer
22499: .cast(arg$3938.getTuple()
22500: .get1());
22501:
22502: return Analyzer.cast(new Pair<String>(
22503: str));
22504: }
22505: break;
22506: case FunctionT:
22507: if (TypicalSupport.match$97(arg$3938)) {
22508: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22509: .cast(arg$3938.getTuple()
22510: .get1());
22511: final TypicalTypes.raw_type<?> ret = Analyzer
22512: .cast(arg$3938.getTuple()
22513: .get2());
22514:
22515: return Analyzer
22516: .cast(new Let<Pair<String>>() {
22517: final Pair<String> vars1;
22518: final Pair<String> vars2;
22519:
22520: {
22521: vars1 = Analyzer
22522: .cast(collectTypeVariables
22523: .apply(ret));
22524: vars2 = Analyzer
22525: .cast(makeUnion
22526: .apply(tl));
22527: }
22528:
22529: public Pair<String> apply() {
22530: return Analyzer
22531: .cast(TypicalSupport.union$313
22532: .apply(
22533: vars1,
22534: vars2));
22535: }
22536: }.apply());
22537: }
22538: break;
22539: case ConstructedT:
22540: if (TypicalSupport.match$115(arg$3938)) {
22541: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22542: .cast(arg$3938.getTuple()
22543: .get1());
22544:
22545: return Analyzer.cast(makeUnion
22546: .apply(tl));
22547: }
22548: break;
22549: case VariantT:
22550: if (TypicalSupport.match$100(arg$3938)) {
22551: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22552: .cast(arg$3938.getTuple()
22553: .get1());
22554:
22555: return Analyzer.cast(makeUnion
22556: .apply(tl));
22557: }
22558: break;
22559: case ConstructorT:
22560: if (TypicalSupport.match$94(arg$3938)) {
22561: final TypicalTypes.raw_type<?> ty = Analyzer
22562: .cast(arg$3938.getTuple()
22563: .get3());
22564:
22565: return Analyzer
22566: .cast(collectTypeVariables
22567: .apply(ty));
22568: }
22569: break;
22570: case FieldT:
22571: if (TypicalSupport.match$96(arg$3938)) {
22572: final TypicalTypes.raw_type<?> ty = Analyzer
22573: .cast(arg$3938.getTuple()
22574: .get3());
22575:
22576: return Analyzer
22577: .cast(collectTypeVariables
22578: .apply(ty));
22579: }
22580: break;
22581: case TupleT:
22582: if (TypicalSupport.match$114(arg$3938)) {
22583: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22584: .cast(arg$3938.getTuple()
22585: .get1());
22586:
22587: return Analyzer.cast(makeUnion
22588: .apply(tl));
22589: }
22590: break;
22591: case RecordT:
22592: if (TypicalSupport.match$107(arg$3938)) {
22593: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22594: .cast(arg$3938.getTuple()
22595: .get1());
22596:
22597: return Analyzer.cast(makeUnion
22598: .apply(tl));
22599: }
22600: break;
22601: default:
22602: break;
22603: }
22604: ;
22605: if (true) {
22606: return Analyzer.cast(Pair.<String> empty());
22607: }
22608: return null;
22609: }
22610: }.apply();
22611: }
22612: };
22613:
22614: final Function.F1<Pair<String>, Pair<TypicalTypes.raw_type<?>>> makeUnion = new Function.F1<Pair<String>, Pair<TypicalTypes.raw_type<?>>>() {
22615: public Pair<String> apply(
22616: final Pair<TypicalTypes.raw_type<?>> tl) {
22617: return new Match<Pair<String>>() {
22618: public Pair<String> apply() {
22619: final Pair<TypicalTypes.raw_type<?>> arg$3949 = Analyzer
22620: .cast(tl);
22621:
22622: if ((null == arg$3949)) {
22623: return null;
22624: }
22625: if (TypicalSupport.match$122(arg$3949)) {
22626: return Analyzer.cast(Pair.<String> empty());
22627: }
22628: if (true) {
22629: final Pair<TypicalTypes.raw_type<?>> list$3951 = Analyzer
22630: .cast(Analyzer.cast(arg$3949));
22631: final TypicalTypes.raw_type<?> x = Analyzer
22632: .cast(Primitives.wrapHead(list$3951));
22633: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
22634: .cast(Primitives.wrapTail(list$3951));
22635:
22636: return Analyzer.cast(TypicalSupport.union$313
22637: .apply(collectTypeVariables.apply(x),
22638: makeUnion.apply(xs)));
22639: }
22640: return null;
22641: }
22642: }.apply();
22643: }
22644: };
22645:
22646: final Function.F3<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, String, String> replace = new Function.F3<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>, String, String>() {
22647: public TypicalTypes.raw_type<?> apply(
22648: final TypicalTypes.raw_type<?> t, final String str,
22649: final String newVar) {
22650: return new Match<TypicalTypes.raw_type<?>>() {
22651: public TypicalTypes.raw_type<?> apply() {
22652: final TypicalTypes.raw_type<?> arg$3953 = Analyzer
22653: .cast(t);
22654:
22655: if ((null == arg$3953)) {
22656: return null;
22657: }
22658: if ((null != arg$3953))
22659: switch (arg$3953.tag()) {
22660: case PairOfType:
22661: if (TypicalSupport.match$116(arg$3953)) {
22662: final TypicalTypes.raw_type<?> t1 = Analyzer
22663: .cast(arg$3953.getTuple()
22664: .get1());
22665: final TypicalTypes.raw_type<?> t2 = Analyzer
22666: .cast(arg$3953.getTuple()
22667: .get2());
22668:
22669: return Analyzer
22670: .cast(new TypicalTypes.PairOfType(
22671: replace.apply(t1, str,
22672: newVar),
22673: replace.apply(t2, str,
22674: newVar)));
22675: }
22676: break;
22677: case VariableT:
22678: if (TypicalSupport.match$117(arg$3953)) {
22679: final String s = Analyzer.cast(arg$3953
22680: .getTuple().get1());
22681:
22682: return Analyzer
22683: .cast(null == Primitives.equal
22684: .apply(s, str) ? null
22685: : Primitives.equal
22686: .apply(s, str) ? new TypicalTypes.VariableT(
22687: newVar,
22688: Boolean.FALSE)
22689: : t);
22690: }
22691: break;
22692: case FunctionT:
22693: if (TypicalSupport.match$97(arg$3953)) {
22694: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22695: .cast(arg$3953.getTuple()
22696: .get1());
22697: final TypicalTypes.raw_type<?> ret = Analyzer
22698: .cast(arg$3953.getTuple()
22699: .get2());
22700:
22701: return Analyzer
22702: .cast(new TypicalTypes.FunctionT(
22703: replaceList.apply(tl,
22704: str, newVar),
22705: replace.apply(ret, str,
22706: newVar)));
22707: }
22708: break;
22709: case ConstructedT:
22710: if (TypicalSupport.match$115(arg$3953)) {
22711: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22712: .cast(arg$3953.getTuple()
22713: .get1());
22714: final String s = Analyzer.cast(arg$3953
22715: .getTuple().get2());
22716:
22717: return Analyzer
22718: .cast(new TypicalTypes.ConstructedT(
22719: replaceList.apply(tl,
22720: str, newVar), s));
22721: }
22722: break;
22723: case VariantT:
22724: if (TypicalSupport.match$100(arg$3953)) {
22725: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22726: .cast(arg$3953.getTuple()
22727: .get1());
22728:
22729: return Analyzer
22730: .cast(new Let<TypicalTypes.raw_type<?>>() {
22731: final TypicalTypes.raw_type<?> ty;
22732:
22733: {
22734: ty = Analyzer
22735: .cast(TypicalSupport.head$98
22736: .apply(tl));
22737: }
22738:
22739: public TypicalTypes.raw_type<?> apply() {
22740: return Analyzer
22741: .cast(new Match<TypicalTypes.raw_type<?>>() {
22742: public TypicalTypes.raw_type<?> apply() {
22743: final TypicalTypes.raw_type<?> arg$3962 = Analyzer
22744: .cast(ty);
22745:
22746: if ((null == arg$3962)) {
22747: return null;
22748: }
22749: if ((null != arg$3962))
22750: switch (arg$3962
22751: .tag()) {
22752: case ConstructorT:
22753: if (TypicalSupport
22754: .match$94(arg$3962)) {
22755: final String s = Analyzer
22756: .cast(arg$3962
22757: .getTuple()
22758: .get1());
22759:
22760: return Analyzer
22761: .cast(null == hasTypeVariables
22762: .apply(s) ? null
22763: : hasTypeVariables
22764: .apply(s) ? new TypicalTypes.VariantT(
22765: replaceList
22766: .apply(
22767: tl,
22768: str,
22769: newVar))
22770: : t);
22771: }
22772: break;
22773: default:
22774: break;
22775: }
22776: ;
22777: if (true) {
22778: return Analyzer
22779: .cast(null);
22780: }
22781: return null;
22782: }
22783: }.apply());
22784: }
22785: }.apply());
22786: }
22787: break;
22788: case ConstructorT:
22789: if (TypicalSupport.match$94(arg$3953)) {
22790: final String s1 = Analyzer
22791: .cast(arg$3953.getTuple()
22792: .get1());
22793: final String s2 = Analyzer
22794: .cast(arg$3953.getTuple()
22795: .get2());
22796: final TypicalTypes.raw_type<?> ty = Analyzer
22797: .cast(arg$3953.getTuple()
22798: .get3());
22799:
22800: return Analyzer
22801: .cast(new TypicalTypes.ConstructorT(
22802: s1, s2, replace
22803: .apply(ty, str,
22804: newVar)));
22805: }
22806: break;
22807: case FieldT:
22808: if (TypicalSupport.match$96(arg$3953)) {
22809: final String s1 = Analyzer
22810: .cast(arg$3953.getTuple()
22811: .get1());
22812: final String s2 = Analyzer
22813: .cast(arg$3953.getTuple()
22814: .get2());
22815: final TypicalTypes.raw_type<?> ty = Analyzer
22816: .cast(arg$3953.getTuple()
22817: .get3());
22818:
22819: return Analyzer
22820: .cast(new TypicalTypes.FieldT(
22821: s1, s2, replace
22822: .apply(ty, str,
22823: newVar)));
22824: }
22825: break;
22826: case TupleT:
22827: if (TypicalSupport.match$114(arg$3953)) {
22828: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22829: .cast(arg$3953.getTuple()
22830: .get1());
22831:
22832: return Analyzer
22833: .cast(new TypicalTypes.TupleT(
22834: replaceList.apply(tl,
22835: str, newVar)));
22836: }
22837: break;
22838: case RecordT:
22839: if (TypicalSupport.match$107(arg$3953)) {
22840: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
22841: .cast(arg$3953.getTuple()
22842: .get1());
22843:
22844: return Analyzer
22845: .cast(new Let<TypicalTypes.raw_type<?>>() {
22846: final TypicalTypes.raw_type<?> ty;
22847:
22848: {
22849: ty = Analyzer
22850: .cast(TypicalSupport.head$98
22851: .apply(tl));
22852: }
22853:
22854: public TypicalTypes.raw_type<?> apply() {
22855: return Analyzer
22856: .cast(new Match<TypicalTypes.raw_type<?>>() {
22857: public TypicalTypes.raw_type<?> apply() {
22858: final TypicalTypes.raw_type<?> arg$3969 = Analyzer
22859: .cast(ty);
22860:
22861: if ((null == arg$3969)) {
22862: return null;
22863: }
22864: if ((null != arg$3969))
22865: switch (arg$3969
22866: .tag()) {
22867: case FieldT:
22868: if (TypicalSupport
22869: .match$96(arg$3969)) {
22870: final String s = Analyzer
22871: .cast(arg$3969
22872: .getTuple()
22873: .get1());
22874:
22875: return Analyzer
22876: .cast(null == hasTypeVariables
22877: .apply(s) ? null
22878: : hasTypeVariables
22879: .apply(s) ? new TypicalTypes.RecordT(
22880: replaceList
22881: .apply(
22882: tl,
22883: str,
22884: newVar))
22885: : t);
22886: }
22887: break;
22888: default:
22889: break;
22890: }
22891: ;
22892: if (true) {
22893: return Analyzer
22894: .cast(null);
22895: }
22896: return null;
22897: }
22898: }.apply());
22899: }
22900: }.apply());
22901: }
22902: break;
22903: default:
22904: break;
22905: }
22906: ;
22907: if (true) {
22908: return Analyzer.cast(t);
22909: }
22910: return null;
22911: }
22912: }.apply();
22913: }
22914: };
22915:
22916: final Function.F3<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, String, String> replaceList = new Function.F3<Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.raw_type<?>>, String, String>() {
22917: public Pair<TypicalTypes.raw_type<?>> apply(
22918: final Pair<TypicalTypes.raw_type<?>> tl,
22919: final String str, final String newStr) {
22920: return new Match<Pair<TypicalTypes.raw_type<?>>>() {
22921: public Pair<TypicalTypes.raw_type<?>> apply() {
22922: final Pair<TypicalTypes.raw_type<?>> arg$3976 = Analyzer
22923: .cast(tl);
22924:
22925: if ((null == arg$3976)) {
22926: return null;
22927: }
22928: if (TypicalSupport.match$122(arg$3976)) {
22929: return Analyzer.cast(Pair
22930: .<TypicalTypes.raw_type<?>> empty());
22931: }
22932: if (true) {
22933: final Pair<TypicalTypes.raw_type<?>> list$3978 = Analyzer
22934: .cast(Analyzer.cast(arg$3976));
22935: final TypicalTypes.raw_type<?> x = Analyzer
22936: .cast(Primitives.wrapHead(list$3978));
22937: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
22938: .cast(Primitives.wrapTail(list$3978));
22939:
22940: return Analyzer.cast(Primitives.wrapCons(
22941: replace.apply(x, str, newStr),
22942: replaceList.apply(xs, str, newStr)));
22943: }
22944: return null;
22945: }
22946: }.apply();
22947: }
22948: };
22949:
22950: final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> resolveType = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
22951: public TypicalTypes.raw_type<?> apply(
22952: final TypicalTypes.raw_type<?> t) {
22953: return new Match<TypicalTypes.raw_type<?>>() {
22954: public TypicalTypes.raw_type<?> apply() {
22955: final TypicalTypes.raw_type<?> arg$3980 = Analyzer
22956: .cast(t);
22957:
22958: if ((null == arg$3980)) {
22959: return null;
22960: }
22961: if ((null != arg$3980))
22962: switch (arg$3980.tag()) {
22963: case PairOfType:
22964: if (TypicalSupport.match$116(arg$3980)) {
22965: final TypicalTypes.raw_type<?> t1 = Analyzer
22966: .cast(arg$3980.getTuple()
22967: .get1());
22968: final TypicalTypes.raw_type<?> t2 = Analyzer
22969: .cast(arg$3980.getTuple()
22970: .get2());
22971:
22972: return Analyzer
22973: .cast(new TypicalTypes.PairOfType(
22974: resolveType.apply(t1),
22975: resolveType.apply(t2)));
22976: }
22977: break;
22978: case VariableT:
22979: if (TypicalSupport.match$117(arg$3980)) {
22980: final String str = Analyzer
22981: .cast(arg$3980.getTuple()
22982: .get1());
22983:
22984: return Analyzer
22985: .cast(new Let<TypicalTypes.raw_type<?>>() {
22986: final TypicalTypes.raw_type<?> newT;
22987:
22988: {
22989: newT = Analyzer
22990: .cast(Analyzer
22991: .cast(Primitives.get
22992: .apply(
22993: str,
22994: hashTable)));
22995: }
22996:
22997: public TypicalTypes.raw_type<?> apply() {
22998: return Analyzer
22999: .cast(null == Primitives.isBottom
23000: .apply(newT) ? null
23001: : Primitives.isBottom
23002: .apply(newT) ? new TypicalTypes.VariableT(
23003: str,
23004: Boolean.TRUE)
23005: : resolveType
23006: .apply(newT));
23007: }
23008: }.apply());
23009: }
23010: break;
23011: case FunctionT:
23012: if (TypicalSupport.match$97(arg$3980)) {
23013: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
23014: .cast(arg$3980.getTuple()
23015: .get1());
23016: final TypicalTypes.raw_type<?> ret = Analyzer
23017: .cast(arg$3980.getTuple()
23018: .get2());
23019:
23020: return Analyzer
23021: .cast(new Let<TypicalTypes.raw_type<?>>() {
23022: final Pair<TypicalTypes.raw_type<?>> left;
23023:
23024: {
23025: left = Analyzer
23026: .cast(TypicalSupport.map$3983
23027: .apply(
23028: resolveType,
23029: tl));
23030: }
23031:
23032: public TypicalTypes.raw_type<?> apply() {
23033: return Analyzer
23034: .cast(new TypicalTypes.FunctionT(
23035: left,
23036: resolveType
23037: .apply(ret)));
23038: }
23039: }.apply());
23040: }
23041: break;
23042: case VariantT:
23043: if (TypicalSupport.match$100(arg$3980)) {
23044: final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer
23045: .cast(arg$3980.getTuple()
23046: .get1());
23047:
23048: return Analyzer
23049: .cast(new Let<TypicalTypes.raw_type<?>>() {
23050: final TypicalTypes.raw_type<?> con;
23051:
23052: {
23053: con = Analyzer
23054: .cast(TypicalSupport.head$98
23055: .apply(tyList));
23056: }
23057:
23058: public TypicalTypes.raw_type<?> apply() {
23059: return Analyzer
23060: .cast(new Match<TypicalTypes.raw_type<?>>() {
23061: public TypicalTypes.raw_type<?> apply() {
23062: final TypicalTypes.raw_type<?> arg$3990 = Analyzer
23063: .cast(con);
23064:
23065: if ((null == arg$3990)) {
23066: return null;
23067: }
23068: if ((null != arg$3990))
23069: switch (arg$3990
23070: .tag()) {
23071: case ConstructorT:
23072: if (TypicalSupport
23073: .match$94(arg$3990)) {
23074: final String s = Analyzer
23075: .cast(arg$3990
23076: .getTuple()
23077: .get1());
23078:
23079: return Analyzer
23080: .cast(null == Primitives.not
23081: .apply(hasTypeVariables
23082: .apply(s)) ? null
23083: : Primitives.not
23084: .apply(hasTypeVariables
23085: .apply(s)) ? t
23086: : new Let<TypicalTypes.raw_type<?>>() {
23087: final Pair<TypicalTypes.raw_type<?>> tl;
23088:
23089: {
23090: tl = Analyzer
23091: .cast(TypicalSupport.map$3983
23092: .apply(
23093: resolveType,
23094: tyList));
23095: }
23096:
23097: public TypicalTypes.raw_type<?> apply() {
23098: return Analyzer
23099: .cast(new TypicalTypes.VariantT(
23100: tl));
23101: }
23102: }
23103: .apply());
23104: }
23105: break;
23106: default:
23107: break;
23108: }
23109: ;
23110: if (true) {
23111: return Analyzer
23112: .cast(null);
23113: }
23114: return null;
23115: }
23116: }.apply());
23117: }
23118: }.apply());
23119: }
23120: break;
23121: case ConstructedT:
23122: if (TypicalSupport.match$115(arg$3980)) {
23123: final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer
23124: .cast(arg$3980.getTuple()
23125: .get1());
23126: final String s = Analyzer.cast(arg$3980
23127: .getTuple().get2());
23128:
23129: return Analyzer
23130: .cast(new Let<TypicalTypes.raw_type<?>>() {
23131: final Pair<TypicalTypes.raw_type<?>> tl;
23132:
23133: {
23134: tl = Analyzer
23135: .cast(TypicalSupport.map$3983
23136: .apply(
23137: resolveType,
23138: tyList));
23139: }
23140:
23141: public TypicalTypes.raw_type<?> apply() {
23142: return Analyzer
23143: .cast(new TypicalTypes.ConstructedT(
23144: tl, s));
23145: }
23146: }.apply());
23147: }
23148: break;
23149: case ConstructorT:
23150: if (TypicalSupport.match$94(arg$3980)) {
23151: final String s1 = Analyzer
23152: .cast(arg$3980.getTuple()
23153: .get1());
23154: final String s2 = Analyzer
23155: .cast(arg$3980.getTuple()
23156: .get2());
23157: final TypicalTypes.raw_type<?> ty = Analyzer
23158: .cast(arg$3980.getTuple()
23159: .get3());
23160:
23161: return Analyzer
23162: .cast(new TypicalTypes.ConstructorT(
23163: s1, s2, resolveType
23164: .apply(ty)));
23165: }
23166: break;
23167: case FieldT:
23168: if (TypicalSupport.match$96(arg$3980)) {
23169: final String s1 = Analyzer
23170: .cast(arg$3980.getTuple()
23171: .get1());
23172: final String s2 = Analyzer
23173: .cast(arg$3980.getTuple()
23174: .get2());
23175: final TypicalTypes.raw_type<?> ty = Analyzer
23176: .cast(arg$3980.getTuple()
23177: .get3());
23178:
23179: return Analyzer
23180: .cast(new TypicalTypes.FieldT(
23181: s1, s2, resolveType
23182: .apply(ty)));
23183: }
23184: break;
23185: case TupleT:
23186: if (TypicalSupport.match$114(arg$3980)) {
23187: final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer
23188: .cast(arg$3980.getTuple()
23189: .get1());
23190:
23191: return Analyzer
23192: .cast(new Let<TypicalTypes.raw_type<?>>() {
23193: final Pair<TypicalTypes.raw_type<?>> tl;
23194:
23195: {
23196: tl = Analyzer
23197: .cast(TypicalSupport.map$3983
23198: .apply(
23199: resolveType,
23200: tyList));
23201: }
23202:
23203: public TypicalTypes.raw_type<?> apply() {
23204: return Analyzer
23205: .cast(new TypicalTypes.TupleT(
23206: tl));
23207: }
23208: }.apply());
23209: }
23210: break;
23211: case RecordT:
23212: if (TypicalSupport.match$107(arg$3980)) {
23213: final Pair<TypicalTypes.raw_type<?>> tyList = Analyzer
23214: .cast(arg$3980.getTuple()
23215: .get1());
23216:
23217: return Analyzer
23218: .cast(new Let<TypicalTypes.raw_type<?>>() {
23219: final Pair<TypicalTypes.raw_type<?>> tl;
23220:
23221: {
23222: tl = Analyzer
23223: .cast(TypicalSupport.map$3983
23224: .apply(
23225: resolveType,
23226: tyList));
23227: }
23228:
23229: public TypicalTypes.raw_type<?> apply() {
23230: return Analyzer
23231: .cast(new TypicalTypes.RecordT(
23232: tl));
23233: }
23234: }.apply());
23235: }
23236: break;
23237: default:
23238: break;
23239: }
23240: ;
23241: if (true) {
23242: return Analyzer.cast(t);
23243: }
23244: return null;
23245: }
23246: }.apply();
23247: }
23248: };
23249:
23250: final Function.F3<TypicalTypes.raw_type<?>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>> processArguments = new Function.F3<TypicalTypes.raw_type<?>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>, TypicalTypes.raw_type<?>>() {
23251: public TypicalTypes.raw_type<?> apply(final Pair<Node> nl,
23252: final Pair<TypicalTypes.raw_type<?>> tl,
23253: final TypicalTypes.raw_type<?> retType) {
23254: return new Match<TypicalTypes.raw_type<?>>() {
23255: public TypicalTypes.raw_type<?> apply() {
23256: final Pair<Node> arg$3998 = Analyzer.cast(nl);
23257:
23258: if ((null == arg$3998)) {
23259: return null;
23260: }
23261: if (TypicalSupport.match$323(arg$3998)) {
23262: return Analyzer.cast(null == Primitives.isEmpty
23263: .apply(tl) ? null : Primitives.isEmpty
23264: .apply(tl) ? retType
23265: : new TypicalTypes.FunctionT(tl,
23266: retType));
23267: }
23268: if (true) {
23269: final Pair<Node> list$4000 = Analyzer
23270: .cast(Analyzer.cast(arg$3998));
23271: final Node x = GNode.cast(Primitives
23272: .wrapHead(list$4000));
23273: final Pair<Node> xs = Analyzer.cast(Primitives
23274: .wrapTail(list$4000));
23275:
23276: return Analyzer
23277: .cast(new Match<TypicalTypes.raw_type<?>>() {
23278: public TypicalTypes.raw_type<?> apply() {
23279: final Pair<TypicalTypes.raw_type<?>> arg$4006 = Analyzer
23280: .cast(tl);
23281:
23282: if ((null == arg$4006)) {
23283: return null;
23284: }
23285: if (true) {
23286: final Pair<TypicalTypes.raw_type<?>> list$4007 = Analyzer
23287: .cast(Analyzer
23288: .cast(arg$4006));
23289: final TypicalTypes.raw_type<?> y = Analyzer
23290: .cast(Primitives
23291: .wrapHead(list$4007));
23292: final Pair<TypicalTypes.raw_type<?>> ys = Analyzer
23293: .cast(Primitives
23294: .wrapTail(list$4007));
23295:
23296: return Analyzer
23297: .cast(new Let<TypicalTypes.raw_type<?>>() {
23298: final TypicalTypes.raw_type<?> tx;
23299: final Pair<String> muts;
23300: final String preStr;
23301:
23302: {
23303: tx = Analyzer
23304: .cast(analyze
23305: .apply(x));
23306: muts = Analyzer
23307: .cast(getAnnotatedStringList
23308: .apply(
23309: x,
23310: "mutual"));
23311: preStr = Analyzer
23312: .cast(null == Primitives.isNotBottom
23313: .apply(muts) ? null
23314: : Primitives.isNotBottom
23315: .apply(muts) ? Primitives.concat
23316: .apply(
23317: Primitives.concat
23318: .apply(
23319: "in mutual functions: ",
23320: joinStringList
23321: .apply(
23322: muts,
23323: "")),
23324: "; ")
23325: : "");
23326: new Guard<TypicalTypes.raw_type<?>>() {
23327: public TypicalTypes.raw_type<?> apply() {
23328: if ((null == unify)) {
23329: return null;
23330: }
23331: if ((null == tx)) {
23332: return null;
23333: }
23334: if ((null == y)) {
23335: return null;
23336: }
23337:
23338: final TypicalTypes.raw_type<?> result$4009 = unify
23339: .apply(
23340: tx,
23341: y);
23342:
23343: if ((null == result$4009)) {
23344: return Analyzer
23345: .cast(error(
23346: Primitives.concat
23347: .apply(
23348: Primitives.concat
23349: .apply(
23350: Primitives.concat
23351: .apply(
23352: Primitives.concat
23353: .apply(
23354: preStr,
23355: " expected "),
23356: getTypeName
23357: .apply(y)),
23358: ", found "),
23359: getTypeName
23360: .apply(tx)),
23361: x));
23362: }
23363: return result$4009;
23364: }
23365: }.apply();
23366: }
23367:
23368: public TypicalTypes.raw_type<?> apply() {
23369: return Analyzer
23370: .cast(processArguments
23371: .apply(
23372: xs,
23373: ys,
23374: retType));
23375: }
23376: }.apply());
23377: }
23378: if (true) {
23379: return Analyzer.cast(null);
23380: }
23381: return null;
23382: }
23383: }.apply());
23384: }
23385: if (true) {
23386: return Analyzer.cast(null);
23387: }
23388: return null;
23389: }
23390: }.apply();
23391: }
23392: };
23393:
23394: final Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>> resolveRecordType = new Function.F1<TypicalTypes.raw_type<?>, TypicalTypes.raw_type<?>>() {
23395: public TypicalTypes.raw_type<?> apply(
23396: final TypicalTypes.raw_type<?> t) {
23397: return new Match<TypicalTypes.raw_type<?>>() {
23398: public TypicalTypes.raw_type<?> apply() {
23399: final TypicalTypes.raw_type<?> arg$4012 = Analyzer
23400: .cast(t);
23401:
23402: if ((null == arg$4012)) {
23403: return null;
23404: }
23405: if ((null != arg$4012))
23406: switch (arg$4012.tag()) {
23407: case VariableT:
23408: if (TypicalSupport.match$117(arg$4012)) {
23409: final String str = Analyzer
23410: .cast(arg$4012.getTuple()
23411: .get1());
23412:
23413: return Analyzer
23414: .cast(null == isDefined
23415: .apply(
23416: GNode
23417: .create(
23418: "UserDefinedType",
23419: str),
23420: getNameSpace) ? null
23421: : isDefined
23422: .apply(
23423: GNode
23424: .create(
23425: "UserDefinedType",
23426: str),
23427: getNameSpace) ? new Let<TypicalTypes.raw_type<?>>() {
23428: final TypicalTypes.raw_type<?> ty;
23429:
23430: {
23431: ty = Analyzer
23432: .cast(Analyzer
23433: .cast(lookup2
23434: .apply(
23435: GNode
23436: .create(
23437: "UserDefinedType",
23438: str),
23439: getNameSpace)));
23440: }
23441:
23442: public TypicalTypes.raw_type<?> apply() {
23443: return Analyzer
23444: .cast(resolveRecordType
23445: .apply(ty));
23446: }
23447: }.apply()
23448: : t);
23449: }
23450: break;
23451: case TypeName:
23452: if (TypicalSupport.match$95(arg$4012)) {
23453: final String s = Analyzer.cast(arg$4012
23454: .getTuple().get1());
23455:
23456: return Analyzer
23457: .cast(new Let<TypicalTypes.raw_type<?>>() {
23458: final TypicalTypes.raw_type<?> ty;
23459:
23460: {
23461: ty = Analyzer
23462: .cast(Analyzer
23463: .cast(lookup2
23464: .apply(
23465: GNode
23466: .create(
23467: "UserDefinedType",
23468: s),
23469: getNameSpace)));
23470: }
23471:
23472: public TypicalTypes.raw_type<?> apply() {
23473: return Analyzer
23474: .cast(resolveRecordType
23475: .apply(ty));
23476: }
23477: }.apply());
23478: }
23479: break;
23480: case FieldT:
23481: if (TypicalSupport.match$96(arg$4012)) {
23482: final TypicalTypes.raw_type<?> ty = Analyzer
23483: .cast(arg$4012.getTuple()
23484: .get3());
23485:
23486: return Analyzer.cast(resolveRecordType
23487: .apply(ty));
23488: }
23489: break;
23490: default:
23491: break;
23492: }
23493: ;
23494: if (true) {
23495: return Analyzer.cast(t);
23496: }
23497: return null;
23498: }
23499: }.apply();
23500: }
23501: };
23502:
23503: final Function.F1<Pair<Object>, Pair<Node>> processFunctionCalls = new Function.F1<Pair<Object>, Pair<Node>>() {
23504: public Pair<Object> apply(final Pair<Node> nl) {
23505: return new Let<Pair<Object>>() {
23506: final TypicalTypes.graph tl;
23507: final Pair<TypicalTypes.call> edges;
23508: final Pair<Pair<String>> circles;
23509: final Pair<Pair<String>> g;
23510: final Pair<TypicalTypes.nodeRec> res;
23511:
23512: {
23513: tl = Analyzer.cast(buildGraph.apply(nl));
23514: edges = Analyzer.cast(removeWrongEdges.apply(
23515: null == tl ? null : tl.edges,
23516: null == tl ? null : tl.functionList));
23517: circles = Analyzer.cast(findCircles.apply(edges));
23518: g = Analyzer.cast(groupCircles.apply(circles,
23519: null == tl ? null : tl.functionList));
23520: res = Analyzer.cast(getResult.apply(
23521: null == tl ? null : tl.functionList, edges,
23522: g));
23523: }
23524:
23525: public Pair<Object> apply() {
23526: return Analyzer.cast(TypicalSupport.map$4017.apply(
23527: rememberOnNode, res));
23528: }
23529: }.apply();
23530: }
23531: };
23532:
23533: final Function.F1<Object, TypicalTypes.nodeRec> rememberOnNode = new Function.F1<Object, TypicalTypes.nodeRec>() {
23534: public Object apply(final TypicalTypes.nodeRec n) {
23535: return new Let<Object>() {
23536: final Node nod;
23537:
23538: {
23539: nod = Analyzer.cast(Analyzer.cast(lookup2.apply(
23540: GNode.create("NameSpaceStructure",
23541: null == n ? null : n.name, null,
23542: null), getNameSpace)));
23543: Primitives.annotate.apply(nod, "mutual",
23544: new TypicalTypes.StringList(
23545: null == n ? null : n.mutualList));
23546: Primitives.annotate.apply(nod, "depend",
23547: new TypicalTypes.StringList(
23548: null == n ? null : n.dependList));
23549: }
23550:
23551: public Object apply() {
23552: return Analyzer.cast(null);
23553: }
23554: }.apply();
23555: }
23556: };
23557:
23558: final Function.F1<TypicalTypes.graph, Pair<Node>> buildGraph = new Function.F1<TypicalTypes.graph, Pair<Node>>() {
23559: public TypicalTypes.graph apply(final Pair<Node> l) {
23560: return new Match<TypicalTypes.graph>() {
23561: public TypicalTypes.graph apply() {
23562: final Pair<Node> arg$4018 = Analyzer.cast(l);
23563:
23564: if ((null == arg$4018)) {
23565: return null;
23566: }
23567: if (TypicalSupport.match$323(arg$4018)) {
23568: return Analyzer.cast(new TypicalTypes.graph(
23569: Pair.<String> empty(), Pair
23570: .<TypicalTypes.call> empty()));
23571: }
23572: if (true) {
23573: final Pair<Node> list$4020 = Analyzer
23574: .cast(Analyzer.cast(arg$4018));
23575: final Node x = GNode.cast(Primitives
23576: .wrapHead(list$4020));
23577: final Pair<Node> xs = Analyzer.cast(Primitives
23578: .wrapTail(list$4020));
23579:
23580: return Analyzer
23581: .cast(new Match<TypicalTypes.graph>() {
23582: public TypicalTypes.graph apply() {
23583: final Node arg$4031 = GNode
23584: .cast(x);
23585:
23586: if ((null == arg$4031)) {
23587: return null;
23588: }
23589: if (TypicalSupport
23590: .match$73(arg$4031)) {
23591: final String s = (arg$4031
23592: .size() > 0 ? arg$4031
23593: .getString(0)
23594: : null);
23595: final Node n = (arg$4031
23596: .size() > 2 ? arg$4031
23597: .getGeneric(2)
23598: : null);
23599:
23600: matching_nodes
23601: .add(arg$4031);
23602: if ((null != arg$4031 && processScopeNodes
23603: .contains(arg$4031
23604: .getName()))) {
23605: processScope(arg$4031,
23606: getScope);
23607: }
23608: checkEnterScope(arg$4031);
23609:
23610: final Object retValue$4035 = Analyzer
23611: .cast(new Let<TypicalTypes.graph>() {
23612: final Pair<TypicalTypes.call> cal;
23613: final TypicalTypes.graph grap;
23614:
23615: {
23616: cal = Analyzer
23617: .cast(getCall
23618: .apply(
23619: n,
23620: s,
23621: Pair
23622: .<TypicalTypes.call> empty()));
23623: grap = Analyzer
23624: .cast(buildGraph
23625: .apply(xs));
23626: }
23627:
23628: public TypicalTypes.graph apply() {
23629: return Analyzer
23630: .cast(new TypicalTypes.graph(
23631: Primitives
23632: .wrapCons(
23633: s,
23634: null == grap ? null
23635: : grap.functionList),
23636: TypicalSupport.union$4023
23637: .apply(
23638: cal,
23639: null == grap ? null
23640: : grap.edges)));
23641: }
23642: }.apply());
23643:
23644: checkExitScope(arg$4031);
23645: matching_nodes
23646: .remove(matching_nodes
23647: .size() - 1);
23648: return Analyzer
23649: .cast(retValue$4035);
23650: }
23651: if (true) {
23652: matching_nodes
23653: .add(arg$4031);
23654: if ((null != arg$4031 && processScopeNodes
23655: .contains(arg$4031
23656: .getName()))) {
23657: processScope(arg$4031,
23658: getScope);
23659: }
23660: checkEnterScope(arg$4031);
23661:
23662: final Object retValue$4038 = Analyzer
23663: .cast(buildGraph
23664: .apply(xs));
23665:
23666: checkExitScope(arg$4031);
23667: matching_nodes
23668: .remove(matching_nodes
23669: .size() - 1);
23670: return Analyzer
23671: .cast(retValue$4038);
23672: }
23673: return null;
23674: }
23675: }.apply());
23676: }
23677: return null;
23678: }
23679: }.apply();
23680: }
23681: };
23682:
23683: final Function.F2<Pair<TypicalTypes.call>, Pair<TypicalTypes.call>, Pair<String>> removeWrongEdges = new Function.F2<Pair<TypicalTypes.call>, Pair<TypicalTypes.call>, Pair<String>>() {
23684: public Pair<TypicalTypes.call> apply(
23685: final Pair<TypicalTypes.call> edList,
23686: final Pair<String> strList) {
23687: return new Match<Pair<TypicalTypes.call>>() {
23688: public Pair<TypicalTypes.call> apply() {
23689: final Pair<TypicalTypes.call> arg$4041 = Analyzer
23690: .cast(edList);
23691:
23692: if ((null == arg$4041)) {
23693: return null;
23694: }
23695: if (TypicalSupport.match$3163(arg$4041)) {
23696: return Analyzer.cast(Pair
23697: .<TypicalTypes.call> empty());
23698: }
23699: if (true) {
23700: final Pair<TypicalTypes.call> list$4043 = Analyzer
23701: .cast(Analyzer.cast(arg$4041));
23702: final TypicalTypes.call x = Analyzer
23703: .cast(Primitives.wrapHead(list$4043));
23704: final Pair<TypicalTypes.call> xs = Analyzer
23705: .cast(Primitives.wrapTail(list$4043));
23706:
23707: return Analyzer
23708: .cast(null == Primitives.contains
23709: .apply(null == x ? null
23710: : x.callee, strList) ? null
23711: : Primitives.contains.apply(
23712: null == x ? null
23713: : x.callee,
23714: strList) ? Primitives
23715: .wrapCons(
23716: x,
23717: removeWrongEdges
23718: .apply(
23719: xs,
23720: strList))
23721: : removeWrongEdges
23722: .apply(xs,
23723: strList));
23724: }
23725: return null;
23726: }
23727: }.apply();
23728: }
23729: };
23730:
23731: final Function.F3<Pair<TypicalTypes.call>, Pair<Node>, String, Pair<TypicalTypes.call>> getCallList = new Function.F3<Pair<TypicalTypes.call>, Pair<Node>, String, Pair<TypicalTypes.call>>() {
23732: public Pair<TypicalTypes.call> apply(final Pair<Node> nl,
23733: final String s, final Pair<TypicalTypes.call> li) {
23734: return new Match<Pair<TypicalTypes.call>>() {
23735: public Pair<TypicalTypes.call> apply() {
23736: final Pair<Node> arg$4045 = Analyzer.cast(nl);
23737:
23738: if ((null == arg$4045)) {
23739: return null;
23740: }
23741: if (TypicalSupport.match$323(arg$4045)) {
23742: return Analyzer.cast(Pair
23743: .<TypicalTypes.call> empty());
23744: }
23745: if (true) {
23746: final Pair<Node> list$4047 = Analyzer
23747: .cast(Analyzer.cast(arg$4045));
23748: final Node x = GNode.cast(Primitives
23749: .wrapHead(list$4047));
23750: final Pair<Node> xs = Analyzer.cast(Primitives
23751: .wrapTail(list$4047));
23752:
23753: return Analyzer
23754: .cast(new Let<Pair<TypicalTypes.call>>() {
23755: final Pair<TypicalTypes.call> li1;
23756: final Pair<TypicalTypes.call> li2;
23757:
23758: {
23759: li1 = Analyzer.cast(getCall
23760: .apply(x, s, li));
23761: li2 = Analyzer.cast(getCallList
23762: .apply(xs, s, li));
23763: }
23764:
23765: public Pair<TypicalTypes.call> apply() {
23766: return Analyzer
23767: .cast(TypicalSupport.union$4023
23768: .apply(li1, li2));
23769: }
23770: }.apply());
23771: }
23772: return null;
23773: }
23774: }.apply();
23775: }
23776: };
23777:
23778: final Function.F3<Pair<TypicalTypes.call>, Node, String, Pair<TypicalTypes.call>> getCall = new Function.F3<Pair<TypicalTypes.call>, Node, String, Pair<TypicalTypes.call>>() {
23779: public Pair<TypicalTypes.call> apply(final Node no,
23780: final String s, final Pair<TypicalTypes.call> li) {
23781: return (null == Primitives.isBottom.apply(no) ? null
23782: : Primitives.isBottom.apply(no) ? li
23783: : new Match<Pair<TypicalTypes.call>>() {
23784: public Pair<TypicalTypes.call> apply() {
23785: final Node arg$4049 = GNode
23786: .cast(no);
23787:
23788: if ((null == arg$4049)) {
23789: return null;
23790: }
23791: if (TypicalSupport
23792: .match$479(arg$4049)) {
23793: final Pair<Node> nl = Analyzer
23794: .cast(Primitives
23795: .getChildren(
23796: arg$4049,
23797: 0,
23798: arg$4049
23799: .size()));
23800:
23801: matching_nodes.add(arg$4049);
23802: if ((null != arg$4049 && processScopeNodes
23803: .contains(arg$4049
23804: .getName()))) {
23805: processScope(arg$4049,
23806: getScope);
23807: }
23808: checkEnterScope(arg$4049);
23809:
23810: final Object retValue$4053 = Analyzer
23811: .cast(new Let<Pair<TypicalTypes.call>>() {
23812: final Pair<TypicalTypes.call> caList;
23813:
23814: {
23815: caList = Analyzer
23816: .cast(getCallList
23817: .apply(
23818: nl,
23819: s,
23820: li));
23821: }
23822:
23823: public Pair<TypicalTypes.call> apply() {
23824: return Analyzer
23825: .cast(TypicalSupport.union$4023
23826: .apply(
23827: li,
23828: caList));
23829: }
23830: }.apply());
23831:
23832: checkExitScope(arg$4049);
23833: matching_nodes
23834: .remove(matching_nodes
23835: .size() - 1);
23836: return Analyzer
23837: .cast(retValue$4053);
23838: }
23839: if (TypicalSupport
23840: .match$3413(arg$4049)) {
23841: final Pair<Node> nl = Analyzer
23842: .cast(Primitives
23843: .getChildren(
23844: arg$4049,
23845: 0,
23846: arg$4049
23847: .size()));
23848:
23849: matching_nodes.add(arg$4049);
23850: if ((null != arg$4049 && processScopeNodes
23851: .contains(arg$4049
23852: .getName()))) {
23853: processScope(arg$4049,
23854: getScope);
23855: }
23856: checkEnterScope(arg$4049);
23857:
23858: final Object retValue$4057 = Analyzer
23859: .cast(new Let<Pair<TypicalTypes.call>>() {
23860: final Pair<TypicalTypes.call> caList;
23861:
23862: {
23863: caList = Analyzer
23864: .cast(getCallList
23865: .apply(
23866: nl,
23867: s,
23868: li));
23869: }
23870:
23871: public Pair<TypicalTypes.call> apply() {
23872: return Analyzer
23873: .cast(TypicalSupport.union$4023
23874: .apply(
23875: li,
23876: caList));
23877: }
23878: }.apply());
23879:
23880: checkExitScope(arg$4049);
23881: matching_nodes
23882: .remove(matching_nodes
23883: .size() - 1);
23884: return Analyzer
23885: .cast(retValue$4057);
23886: }
23887: if (TypicalSupport
23888: .match$269(arg$4049)) {
23889: final Pair<Node> nl = Analyzer
23890: .cast(Primitives
23891: .getChildren(
23892: arg$4049,
23893: 0,
23894: arg$4049
23895: .size()));
23896:
23897: matching_nodes.add(arg$4049);
23898: if ((null != arg$4049 && processScopeNodes
23899: .contains(arg$4049
23900: .getName()))) {
23901: processScope(arg$4049,
23902: getScope);
23903: }
23904: checkEnterScope(arg$4049);
23905:
23906: final Object retValue$4061 = Analyzer
23907: .cast(new Let<Pair<TypicalTypes.call>>() {
23908: final Pair<TypicalTypes.call> caList;
23909:
23910: {
23911: caList = Analyzer
23912: .cast(getCallList
23913: .apply(
23914: nl,
23915: s,
23916: li));
23917: }
23918:
23919: public Pair<TypicalTypes.call> apply() {
23920: return Analyzer
23921: .cast(TypicalSupport.union$4023
23922: .apply(
23923: li,
23924: caList));
23925: }
23926: }.apply());
23927:
23928: checkExitScope(arg$4049);
23929: matching_nodes
23930: .remove(matching_nodes
23931: .size() - 1);
23932: return Analyzer
23933: .cast(retValue$4061);
23934: }
23935: if (TypicalSupport
23936: .match$2400(arg$4049)) {
23937: final Pair<Node> nl = Analyzer
23938: .cast(Primitives
23939: .getChildren(
23940: arg$4049,
23941: 0,
23942: arg$4049
23943: .size()));
23944:
23945: matching_nodes.add(arg$4049);
23946: if ((null != arg$4049 && processScopeNodes
23947: .contains(arg$4049
23948: .getName()))) {
23949: processScope(arg$4049,
23950: getScope);
23951: }
23952: checkEnterScope(arg$4049);
23953:
23954: final Object retValue$4065 = Analyzer
23955: .cast(new Let<Pair<TypicalTypes.call>>() {
23956: final Pair<TypicalTypes.call> caList;
23957:
23958: {
23959: caList = Analyzer
23960: .cast(getCallList
23961: .apply(
23962: nl,
23963: s,
23964: li));
23965: }
23966:
23967: public Pair<TypicalTypes.call> apply() {
23968: return Analyzer
23969: .cast(TypicalSupport.union$4023
23970: .apply(
23971: li,
23972: caList));
23973: }
23974: }.apply());
23975:
23976: checkExitScope(arg$4049);
23977: matching_nodes
23978: .remove(matching_nodes
23979: .size() - 1);
23980: return Analyzer
23981: .cast(retValue$4065);
23982: }
23983: if (TypicalSupport
23984: .match$9(arg$4049)) {
23985: final Pair<Node> nl = Analyzer
23986: .cast(Primitives
23987: .getChildren(
23988: arg$4049,
23989: 1,
23990: arg$4049
23991: .size()));
23992:
23993: matching_nodes.add(arg$4049);
23994: if ((null != arg$4049 && processScopeNodes
23995: .contains(arg$4049
23996: .getName()))) {
23997: processScope(arg$4049,
23998: getScope);
23999: }
24000: checkEnterScope(arg$4049);
24001:
24002: final Object retValue$4069 = Analyzer
24003: .cast(new Let<Pair<TypicalTypes.call>>() {
24004: final Pair<TypicalTypes.call> caList;
24005:
24006: {
24007: caList = Analyzer
24008: .cast(getCallList
24009: .apply(
24010: nl,
24011: s,
24012: li));
24013: }
24014:
24015: public Pair<TypicalTypes.call> apply() {
24016: return Analyzer
24017: .cast(TypicalSupport.union$4023
24018: .apply(
24019: li,
24020: caList));
24021: }
24022: }.apply());
24023:
24024: checkExitScope(arg$4049);
24025: matching_nodes
24026: .remove(matching_nodes
24027: .size() - 1);
24028: return Analyzer
24029: .cast(retValue$4069);
24030: }
24031: if (TypicalSupport
24032: .match$2509(arg$4049)) {
24033: final Pair<Node> nl = Analyzer
24034: .cast(Primitives
24035: .getChildren(
24036: arg$4049,
24037: 0,
24038: arg$4049
24039: .size()));
24040:
24041: matching_nodes.add(arg$4049);
24042: if ((null != arg$4049 && processScopeNodes
24043: .contains(arg$4049
24044: .getName()))) {
24045: processScope(arg$4049,
24046: getScope);
24047: }
24048: checkEnterScope(arg$4049);
24049:
24050: final Object retValue$4073 = Analyzer
24051: .cast(new Let<Pair<TypicalTypes.call>>() {
24052: final Pair<TypicalTypes.call> caList;
24053:
24054: {
24055: caList = Analyzer
24056: .cast(getCallList
24057: .apply(
24058: nl,
24059: s,
24060: li));
24061: }
24062:
24063: public Pair<TypicalTypes.call> apply() {
24064: return Analyzer
24065: .cast(TypicalSupport.union$4023
24066: .apply(
24067: li,
24068: caList));
24069: }
24070: }.apply());
24071:
24072: checkExitScope(arg$4049);
24073: matching_nodes
24074: .remove(matching_nodes
24075: .size() - 1);
24076: return Analyzer
24077: .cast(retValue$4073);
24078: }
24079: if (TypicalSupport
24080: .match$2809(arg$4049)) {
24081: final Pair<Node> nl = Analyzer
24082: .cast(Primitives
24083: .getChildren(
24084: arg$4049,
24085: 0,
24086: arg$4049
24087: .size()));
24088:
24089: matching_nodes.add(arg$4049);
24090: if ((null != arg$4049 && processScopeNodes
24091: .contains(arg$4049
24092: .getName()))) {
24093: processScope(arg$4049,
24094: getScope);
24095: }
24096: checkEnterScope(arg$4049);
24097:
24098: final Object retValue$4077 = Analyzer
24099: .cast(new Let<Pair<TypicalTypes.call>>() {
24100: final Pair<TypicalTypes.call> caList;
24101:
24102: {
24103: caList = Analyzer
24104: .cast(getCallList
24105: .apply(
24106: nl,
24107: s,
24108: li));
24109: }
24110:
24111: public Pair<TypicalTypes.call> apply() {
24112: return Analyzer
24113: .cast(TypicalSupport.union$4023
24114: .apply(
24115: li,
24116: caList));
24117: }
24118: }.apply());
24119:
24120: checkExitScope(arg$4049);
24121: matching_nodes
24122: .remove(matching_nodes
24123: .size() - 1);
24124: return Analyzer
24125: .cast(retValue$4077);
24126: }
24127: if (TypicalSupport
24128: .match$220(arg$4049)) {
24129: final Pair<Node> nl = Analyzer
24130: .cast(Primitives
24131: .getChildren(
24132: arg$4049,
24133: 0,
24134: arg$4049
24135: .size()));
24136:
24137: matching_nodes.add(arg$4049);
24138: if ((null != arg$4049 && processScopeNodes
24139: .contains(arg$4049
24140: .getName()))) {
24141: processScope(arg$4049,
24142: getScope);
24143: }
24144: checkEnterScope(arg$4049);
24145:
24146: final Object retValue$4081 = Analyzer
24147: .cast(new Let<Pair<TypicalTypes.call>>() {
24148: final Pair<TypicalTypes.call> caList;
24149:
24150: {
24151: caList = Analyzer
24152: .cast(getCallList
24153: .apply(
24154: nl,
24155: s,
24156: li));
24157: }
24158:
24159: public Pair<TypicalTypes.call> apply() {
24160: return Analyzer
24161: .cast(TypicalSupport.union$4023
24162: .apply(
24163: li,
24164: caList));
24165: }
24166: }.apply());
24167:
24168: checkExitScope(arg$4049);
24169: matching_nodes
24170: .remove(matching_nodes
24171: .size() - 1);
24172: return Analyzer
24173: .cast(retValue$4081);
24174: }
24175: if (TypicalSupport
24176: .match$483(arg$4049)) {
24177: final Node left = (arg$4049
24178: .size() > 0 ? arg$4049
24179: .getGeneric(0) : null);
24180: final Node right = (arg$4049
24181: .size() > 1 ? arg$4049
24182: .getGeneric(1) : null);
24183:
24184: matching_nodes.add(arg$4049);
24185: if ((null != arg$4049 && processScopeNodes
24186: .contains(arg$4049
24187: .getName()))) {
24188: processScope(arg$4049,
24189: getScope);
24190: }
24191: checkEnterScope(arg$4049);
24192:
24193: final Object retValue$4085 = Analyzer
24194: .cast(new Let<Pair<TypicalTypes.call>>() {
24195: final Pair<TypicalTypes.call> caLeft;
24196: final Pair<TypicalTypes.call> caRight;
24197: final Pair<TypicalTypes.call> res;
24198:
24199: {
24200: caLeft = Analyzer
24201: .cast(getCall
24202: .apply(
24203: left,
24204: s,
24205: li));
24206: caRight = Analyzer
24207: .cast(getCall
24208: .apply(
24209: right,
24210: s,
24211: li));
24212: res = Analyzer
24213: .cast(TypicalSupport.union$4023
24214: .apply(
24215: caLeft,
24216: caRight));
24217: }
24218:
24219: public Pair<TypicalTypes.call> apply() {
24220: return Analyzer
24221: .cast(TypicalSupport.union$4023
24222: .apply(
24223: li,
24224: res));
24225: }
24226: }.apply());
24227:
24228: checkExitScope(arg$4049);
24229: matching_nodes
24230: .remove(matching_nodes
24231: .size() - 1);
24232: return Analyzer
24233: .cast(retValue$4085);
24234: }
24235: if (TypicalSupport
24236: .match$491(arg$4049)) {
24237: final Node left = (arg$4049
24238: .size() > 0 ? arg$4049
24239: .getGeneric(0) : null);
24240: final Node right = (arg$4049
24241: .size() > 1 ? arg$4049
24242: .getGeneric(1) : null);
24243:
24244: matching_nodes.add(arg$4049);
24245: if ((null != arg$4049 && processScopeNodes
24246: .contains(arg$4049
24247: .getName()))) {
24248: processScope(arg$4049,
24249: getScope);
24250: }
24251: checkEnterScope(arg$4049);
24252:
24253: final Object retValue$4089 = Analyzer
24254: .cast(new Let<Pair<TypicalTypes.call>>() {
24255: final Pair<TypicalTypes.call> caLeft;
24256: final Pair<TypicalTypes.call> caRight;
24257: final Pair<TypicalTypes.call> res;
24258:
24259: {
24260: caLeft = Analyzer
24261: .cast(getCall
24262: .apply(
24263: left,
24264: s,
24265: li));
24266: caRight = Analyzer
24267: .cast(getCall
24268: .apply(
24269: right,
24270: s,
24271: li));
24272: res = Analyzer
24273: .cast(TypicalSupport.union$4023
24274: .apply(
24275: caLeft,
24276: caRight));
24277: }
24278:
24279: public Pair<TypicalTypes.call> apply() {
24280: return Analyzer
24281: .cast(TypicalSupport.union$4023
24282: .apply(
24283: li,
24284: res));
24285: }
24286: }.apply());
24287:
24288: checkExitScope(arg$4049);
24289: matching_nodes
24290: .remove(matching_nodes
24291: .size() - 1);
24292: return Analyzer
24293: .cast(retValue$4089);
24294: }
24295: if (TypicalSupport
24296: .match$499(arg$4049)) {
24297: final Node left = (arg$4049
24298: .size() > 0 ? arg$4049
24299: .getGeneric(0) : null);
24300: final Node right = (arg$4049
24301: .size() > 2 ? arg$4049
24302: .getGeneric(2) : null);
24303:
24304: matching_nodes.add(arg$4049);
24305: if ((null != arg$4049 && processScopeNodes
24306: .contains(arg$4049
24307: .getName()))) {
24308: processScope(arg$4049,
24309: getScope);
24310: }
24311: checkEnterScope(arg$4049);
24312:
24313: final Object retValue$4093 = Analyzer
24314: .cast(new Let<Pair<TypicalTypes.call>>() {
24315: final Pair<TypicalTypes.call> caLeft;
24316: final Pair<TypicalTypes.call> caRight;
24317: final Pair<TypicalTypes.call> res;
24318:
24319: {
24320: caLeft = Analyzer
24321: .cast(getCall
24322: .apply(
24323: left,
24324: s,
24325: li));
24326: caRight = Analyzer
24327: .cast(getCall
24328: .apply(
24329: right,
24330: s,
24331: li));
24332: res = Analyzer
24333: .cast(TypicalSupport.union$4023
24334: .apply(
24335: caLeft,
24336: caRight));
24337: }
24338:
24339: public Pair<TypicalTypes.call> apply() {
24340: return Analyzer
24341: .cast(TypicalSupport.union$4023
24342: .apply(
24343: li,
24344: res));
24345: }
24346: }.apply());
24347:
24348: checkExitScope(arg$4049);
24349: matching_nodes
24350: .remove(matching_nodes
24351: .size() - 1);
24352: return Analyzer
24353: .cast(retValue$4093);
24354: }
24355: if (TypicalSupport
24356: .match$505(arg$4049)) {
24357: final Node left = (arg$4049
24358: .size() > 0 ? arg$4049
24359: .getGeneric(0) : null);
24360: final Node right = (arg$4049
24361: .size() > 2 ? arg$4049
24362: .getGeneric(2) : null);
24363:
24364: matching_nodes.add(arg$4049);
24365: if ((null != arg$4049 && processScopeNodes
24366: .contains(arg$4049
24367: .getName()))) {
24368: processScope(arg$4049,
24369: getScope);
24370: }
24371: checkEnterScope(arg$4049);
24372:
24373: final Object retValue$4097 = Analyzer
24374: .cast(new Let<Pair<TypicalTypes.call>>() {
24375: final Pair<TypicalTypes.call> caLeft;
24376: final Pair<TypicalTypes.call> caRight;
24377: final Pair<TypicalTypes.call> res;
24378:
24379: {
24380: caLeft = Analyzer
24381: .cast(getCall
24382: .apply(
24383: left,
24384: s,
24385: li));
24386: caRight = Analyzer
24387: .cast(getCall
24388: .apply(
24389: right,
24390: s,
24391: li));
24392: res = Analyzer
24393: .cast(TypicalSupport.union$4023
24394: .apply(
24395: caLeft,
24396: caRight));
24397: }
24398:
24399: public Pair<TypicalTypes.call> apply() {
24400: return Analyzer
24401: .cast(TypicalSupport.union$4023
24402: .apply(
24403: li,
24404: res));
24405: }
24406: }.apply());
24407:
24408: checkExitScope(arg$4049);
24409: matching_nodes
24410: .remove(matching_nodes
24411: .size() - 1);
24412: return Analyzer
24413: .cast(retValue$4097);
24414: }
24415: if (TypicalSupport
24416: .match$553(arg$4049)) {
24417: final Node left = (arg$4049
24418: .size() > 0 ? arg$4049
24419: .getGeneric(0) : null);
24420: final Node right = (arg$4049
24421: .size() > 2 ? arg$4049
24422: .getGeneric(2) : null);
24423:
24424: matching_nodes.add(arg$4049);
24425: if ((null != arg$4049 && processScopeNodes
24426: .contains(arg$4049
24427: .getName()))) {
24428: processScope(arg$4049,
24429: getScope);
24430: }
24431: checkEnterScope(arg$4049);
24432:
24433: final Object retValue$4101 = Analyzer
24434: .cast(new Let<Pair<TypicalTypes.call>>() {
24435: final Pair<TypicalTypes.call> caLeft;
24436: final Pair<TypicalTypes.call> caRight;
24437: final Pair<TypicalTypes.call> res;
24438:
24439: {
24440: caLeft = Analyzer
24441: .cast(getCall
24442: .apply(
24443: left,
24444: s,
24445: li));
24446: caRight = Analyzer
24447: .cast(getCall
24448: .apply(
24449: right,
24450: s,
24451: li));
24452: res = Analyzer
24453: .cast(TypicalSupport.union$4023
24454: .apply(
24455: caLeft,
24456: caRight));
24457: }
24458:
24459: public Pair<TypicalTypes.call> apply() {
24460: return Analyzer
24461: .cast(TypicalSupport.union$4023
24462: .apply(
24463: li,
24464: res));
24465: }
24466: }.apply());
24467:
24468: checkExitScope(arg$4049);
24469: matching_nodes
24470: .remove(matching_nodes
24471: .size() - 1);
24472: return Analyzer
24473: .cast(retValue$4101);
24474: }
24475: if (TypicalSupport
24476: .match$609(arg$4049)) {
24477: final Node left = (arg$4049
24478: .size() > 0 ? arg$4049
24479: .getGeneric(0) : null);
24480: final Node right = (arg$4049
24481: .size() > 2 ? arg$4049
24482: .getGeneric(2) : null);
24483:
24484: matching_nodes.add(arg$4049);
24485: if ((null != arg$4049 && processScopeNodes
24486: .contains(arg$4049
24487: .getName()))) {
24488: processScope(arg$4049,
24489: getScope);
24490: }
24491: checkEnterScope(arg$4049);
24492:
24493: final Object retValue$4105 = Analyzer
24494: .cast(new Let<Pair<TypicalTypes.call>>() {
24495: final Pair<TypicalTypes.call> caLeft;
24496: final Pair<TypicalTypes.call> caRight;
24497: final Pair<TypicalTypes.call> res;
24498:
24499: {
24500: caLeft = Analyzer
24501: .cast(getCall
24502: .apply(
24503: left,
24504: s,
24505: li));
24506: caRight = Analyzer
24507: .cast(getCall
24508: .apply(
24509: right,
24510: s,
24511: li));
24512: res = Analyzer
24513: .cast(TypicalSupport.union$4023
24514: .apply(
24515: caLeft,
24516: caRight));
24517: }
24518:
24519: public Pair<TypicalTypes.call> apply() {
24520: return Analyzer
24521: .cast(TypicalSupport.union$4023
24522: .apply(
24523: li,
24524: res));
24525: }
24526: }.apply());
24527:
24528: checkExitScope(arg$4049);
24529: matching_nodes
24530: .remove(matching_nodes
24531: .size() - 1);
24532: return Analyzer
24533: .cast(retValue$4105);
24534: }
24535: if (TypicalSupport
24536: .match$673(arg$4049)) {
24537: final Node left = (arg$4049
24538: .size() > 0 ? arg$4049
24539: .getGeneric(0) : null);
24540: final Node right = (arg$4049
24541: .size() > 1 ? arg$4049
24542: .getGeneric(1) : null);
24543:
24544: matching_nodes.add(arg$4049);
24545: if ((null != arg$4049 && processScopeNodes
24546: .contains(arg$4049
24547: .getName()))) {
24548: processScope(arg$4049,
24549: getScope);
24550: }
24551: checkEnterScope(arg$4049);
24552:
24553: final Object retValue$4109 = Analyzer
24554: .cast(new Let<Pair<TypicalTypes.call>>() {
24555: final Pair<TypicalTypes.call> caLeft;
24556: final Pair<TypicalTypes.call> caRight;
24557: final Pair<TypicalTypes.call> res;
24558:
24559: {
24560: caLeft = Analyzer
24561: .cast(getCall
24562: .apply(
24563: left,
24564: s,
24565: li));
24566: caRight = Analyzer
24567: .cast(getCall
24568: .apply(
24569: right,
24570: s,
24571: li));
24572: res = Analyzer
24573: .cast(TypicalSupport.union$4023
24574: .apply(
24575: caLeft,
24576: caRight));
24577: }
24578:
24579: public Pair<TypicalTypes.call> apply() {
24580: return Analyzer
24581: .cast(TypicalSupport.union$4023
24582: .apply(
24583: li,
24584: res));
24585: }
24586: }.apply());
24587:
24588: checkExitScope(arg$4049);
24589: matching_nodes
24590: .remove(matching_nodes
24591: .size() - 1);
24592: return Analyzer
24593: .cast(retValue$4109);
24594: }
24595: if (TypicalSupport
24596: .match$83(arg$4049)) {
24597: final Node left = (arg$4049
24598: .size() > 0 ? arg$4049
24599: .getGeneric(0) : null);
24600: final Node right = (arg$4049
24601: .size() > 1 ? arg$4049
24602: .getGeneric(1) : null);
24603:
24604: matching_nodes.add(arg$4049);
24605: if ((null != arg$4049 && processScopeNodes
24606: .contains(arg$4049
24607: .getName()))) {
24608: processScope(arg$4049,
24609: getScope);
24610: }
24611: checkEnterScope(arg$4049);
24612:
24613: final Object retValue$4113 = Analyzer
24614: .cast(new Let<Pair<TypicalTypes.call>>() {
24615: final Pair<TypicalTypes.call> caLeft;
24616: final Pair<TypicalTypes.call> caRight;
24617: final Pair<TypicalTypes.call> res;
24618:
24619: {
24620: caLeft = Analyzer
24621: .cast(getCall
24622: .apply(
24623: left,
24624: s,
24625: li));
24626: caRight = Analyzer
24627: .cast(getCall
24628: .apply(
24629: right,
24630: s,
24631: li));
24632: res = Analyzer
24633: .cast(TypicalSupport.union$4023
24634: .apply(
24635: caLeft,
24636: caRight));
24637: }
24638:
24639: public Pair<TypicalTypes.call> apply() {
24640: return Analyzer
24641: .cast(TypicalSupport.union$4023
24642: .apply(
24643: li,
24644: res));
24645: }
24646: }.apply());
24647:
24648: checkExitScope(arg$4049);
24649: matching_nodes
24650: .remove(matching_nodes
24651: .size() - 1);
24652: return Analyzer
24653: .cast(retValue$4113);
24654: }
24655: if (TypicalSupport
24656: .match$255(arg$4049)) {
24657: final Node left = (arg$4049
24658: .size() > 0 ? arg$4049
24659: .getGeneric(0) : null);
24660: final Node right = (arg$4049
24661: .size() > 1 ? arg$4049
24662: .getGeneric(1) : null);
24663:
24664: matching_nodes.add(arg$4049);
24665: if ((null != arg$4049 && processScopeNodes
24666: .contains(arg$4049
24667: .getName()))) {
24668: processScope(arg$4049,
24669: getScope);
24670: }
24671: checkEnterScope(arg$4049);
24672:
24673: final Object retValue$4117 = Analyzer
24674: .cast(new Let<Pair<TypicalTypes.call>>() {
24675: final Pair<TypicalTypes.call> caLeft;
24676: final Pair<TypicalTypes.call> caRight;
24677: final Pair<TypicalTypes.call> res;
24678:
24679: {
24680: caLeft = Analyzer
24681: .cast(getCall
24682: .apply(
24683: left,
24684: s,
24685: li));
24686: caRight = Analyzer
24687: .cast(getCall
24688: .apply(
24689: right,
24690: s,
24691: li));
24692: res = Analyzer
24693: .cast(TypicalSupport.union$4023
24694: .apply(
24695: caLeft,
24696: caRight));
24697: }
24698:
24699: public Pair<TypicalTypes.call> apply() {
24700: return Analyzer
24701: .cast(TypicalSupport.union$4023
24702: .apply(
24703: li,
24704: res));
24705: }
24706: }.apply());
24707:
24708: checkExitScope(arg$4049);
24709: matching_nodes
24710: .remove(matching_nodes
24711: .size() - 1);
24712: return Analyzer
24713: .cast(retValue$4117);
24714: }
24715: if (TypicalSupport
24716: .match$2405(arg$4049)) {
24717: final Node left = (arg$4049
24718: .size() > 0 ? arg$4049
24719: .getGeneric(0) : null);
24720: final Node right = (arg$4049
24721: .size() > 2 ? arg$4049
24722: .getGeneric(2) : null);
24723:
24724: matching_nodes.add(arg$4049);
24725: if ((null != arg$4049 && processScopeNodes
24726: .contains(arg$4049
24727: .getName()))) {
24728: processScope(arg$4049,
24729: getScope);
24730: }
24731: checkEnterScope(arg$4049);
24732:
24733: final Object retValue$4121 = Analyzer
24734: .cast(new Let<Pair<TypicalTypes.call>>() {
24735: final Pair<TypicalTypes.call> caLeft;
24736: final Pair<TypicalTypes.call> caRight;
24737: final Pair<TypicalTypes.call> res;
24738:
24739: {
24740: caLeft = Analyzer
24741: .cast(getCall
24742: .apply(
24743: left,
24744: s,
24745: li));
24746: caRight = Analyzer
24747: .cast(getCall
24748: .apply(
24749: right,
24750: s,
24751: li));
24752: res = Analyzer
24753: .cast(TypicalSupport.union$4023
24754: .apply(
24755: caLeft,
24756: caRight));
24757: }
24758:
24759: public Pair<TypicalTypes.call> apply() {
24760: return Analyzer
24761: .cast(TypicalSupport.union$4023
24762: .apply(
24763: li,
24764: res));
24765: }
24766: }.apply());
24767:
24768: checkExitScope(arg$4049);
24769: matching_nodes
24770: .remove(matching_nodes
24771: .size() - 1);
24772: return Analyzer
24773: .cast(retValue$4121);
24774: }
24775: if (TypicalSupport
24776: .match$2795(arg$4049)) {
24777: final Node left = (arg$4049
24778: .size() > 0 ? arg$4049
24779: .getGeneric(0) : null);
24780: final Node right = (arg$4049
24781: .size() > 1 ? arg$4049
24782: .getGeneric(1) : null);
24783:
24784: matching_nodes.add(arg$4049);
24785: if ((null != arg$4049 && processScopeNodes
24786: .contains(arg$4049
24787: .getName()))) {
24788: processScope(arg$4049,
24789: getScope);
24790: }
24791: checkEnterScope(arg$4049);
24792:
24793: final Object retValue$4125 = Analyzer
24794: .cast(new Let<Pair<TypicalTypes.call>>() {
24795: final Pair<TypicalTypes.call> caLeft;
24796: final Pair<TypicalTypes.call> caRight;
24797: final Pair<TypicalTypes.call> res;
24798:
24799: {
24800: caLeft = Analyzer
24801: .cast(getCall
24802: .apply(
24803: left,
24804: s,
24805: li));
24806: caRight = Analyzer
24807: .cast(getCall
24808: .apply(
24809: right,
24810: s,
24811: li));
24812: res = Analyzer
24813: .cast(TypicalSupport.union$4023
24814: .apply(
24815: caLeft,
24816: caRight));
24817: }
24818:
24819: public Pair<TypicalTypes.call> apply() {
24820: return Analyzer
24821: .cast(TypicalSupport.union$4023
24822: .apply(
24823: li,
24824: res));
24825: }
24826: }.apply());
24827:
24828: checkExitScope(arg$4049);
24829: matching_nodes
24830: .remove(matching_nodes
24831: .size() - 1);
24832: return Analyzer
24833: .cast(retValue$4125);
24834: }
24835: if (TypicalSupport
24836: .match$2415(arg$4049)) {
24837: final Node left = (arg$4049
24838: .size() > 0 ? arg$4049
24839: .getGeneric(0) : null);
24840: final Node right = (arg$4049
24841: .size() > 1 ? arg$4049
24842: .getGeneric(1) : null);
24843:
24844: matching_nodes.add(arg$4049);
24845: if ((null != arg$4049 && processScopeNodes
24846: .contains(arg$4049
24847: .getName()))) {
24848: processScope(arg$4049,
24849: getScope);
24850: }
24851: checkEnterScope(arg$4049);
24852:
24853: final Object retValue$4129 = Analyzer
24854: .cast(new Let<Pair<TypicalTypes.call>>() {
24855: final Pair<TypicalTypes.call> caLeft;
24856: final Pair<TypicalTypes.call> caRight;
24857: final Pair<TypicalTypes.call> res;
24858:
24859: {
24860: caLeft = Analyzer
24861: .cast(getCall
24862: .apply(
24863: left,
24864: s,
24865: li));
24866: caRight = Analyzer
24867: .cast(getCall
24868: .apply(
24869: right,
24870: s,
24871: li));
24872: res = Analyzer
24873: .cast(TypicalSupport.union$4023
24874: .apply(
24875: caLeft,
24876: caRight));
24877: }
24878:
24879: public Pair<TypicalTypes.call> apply() {
24880: return Analyzer
24881: .cast(TypicalSupport.union$4023
24882: .apply(
24883: li,
24884: res));
24885: }
24886: }.apply());
24887:
24888: checkExitScope(arg$4049);
24889: matching_nodes
24890: .remove(matching_nodes
24891: .size() - 1);
24892: return Analyzer
24893: .cast(retValue$4129);
24894: }
24895: if (TypicalSupport
24896: .match$2427(arg$4049)) {
24897: final Node left = (arg$4049
24898: .size() > 0 ? arg$4049
24899: .getGeneric(0) : null);
24900: final Node right = (arg$4049
24901: .size() > 1 ? arg$4049
24902: .getGeneric(1) : null);
24903:
24904: matching_nodes.add(arg$4049);
24905: if ((null != arg$4049 && processScopeNodes
24906: .contains(arg$4049
24907: .getName()))) {
24908: processScope(arg$4049,
24909: getScope);
24910: }
24911: checkEnterScope(arg$4049);
24912:
24913: final Object retValue$4133 = Analyzer
24914: .cast(new Let<Pair<TypicalTypes.call>>() {
24915: final Pair<TypicalTypes.call> caLeft;
24916: final Pair<TypicalTypes.call> caRight;
24917: final Pair<TypicalTypes.call> res;
24918:
24919: {
24920: caLeft = Analyzer
24921: .cast(getCall
24922: .apply(
24923: left,
24924: s,
24925: li));
24926: caRight = Analyzer
24927: .cast(getCall
24928: .apply(
24929: right,
24930: s,
24931: li));
24932: res = Analyzer
24933: .cast(TypicalSupport.union$4023
24934: .apply(
24935: caLeft,
24936: caRight));
24937: }
24938:
24939: public Pair<TypicalTypes.call> apply() {
24940: return Analyzer
24941: .cast(TypicalSupport.union$4023
24942: .apply(
24943: li,
24944: res));
24945: }
24946: }.apply());
24947:
24948: checkExitScope(arg$4049);
24949: matching_nodes
24950: .remove(matching_nodes
24951: .size() - 1);
24952: return Analyzer
24953: .cast(retValue$4133);
24954: }
24955: if (TypicalSupport
24956: .match$665(arg$4049)) {
24957: final Node left = (arg$4049
24958: .size() > 0 ? arg$4049
24959: .getGeneric(0) : null);
24960: final Node right = (arg$4049
24961: .size() > 2 ? arg$4049
24962: .getGeneric(2) : null);
24963:
24964: matching_nodes.add(arg$4049);
24965: if ((null != arg$4049 && processScopeNodes
24966: .contains(arg$4049
24967: .getName()))) {
24968: processScope(arg$4049,
24969: getScope);
24970: }
24971: checkEnterScope(arg$4049);
24972:
24973: final Object retValue$4137 = Analyzer
24974: .cast(new Let<Pair<TypicalTypes.call>>() {
24975: final Pair<TypicalTypes.call> caLeft;
24976: final Pair<TypicalTypes.call> caRight;
24977: final Pair<TypicalTypes.call> res;
24978:
24979: {
24980: caLeft = Analyzer
24981: .cast(getCall
24982: .apply(
24983: left,
24984: s,
24985: li));
24986: caRight = Analyzer
24987: .cast(getCall
24988: .apply(
24989: right,
24990: s,
24991: li));
24992: res = Analyzer
24993: .cast(TypicalSupport.union$4023
24994: .apply(
24995: caLeft,
24996: caRight));
24997: }
24998:
24999: public Pair<TypicalTypes.call> apply() {
25000: return Analyzer
25001: .cast(TypicalSupport.union$4023
25002: .apply(
25003: li,
25004: res));
25005: }
25006: }.apply());
25007:
25008: checkExitScope(arg$4049);
25009: matching_nodes
25010: .remove(matching_nodes
25011: .size() - 1);
25012: return Analyzer
25013: .cast(retValue$4137);
25014: }
25015: if (TypicalSupport
25016: .match$2801(arg$4049)) {
25017: final Node e1 = (arg$4049
25018: .size() > 0 ? arg$4049
25019: .getGeneric(0) : null);
25020: final Node e2 = (arg$4049
25021: .size() > 1 ? arg$4049
25022: .getGeneric(1) : null);
25023: final Node e3 = (arg$4049
25024: .size() > 2 ? arg$4049
25025: .getGeneric(2) : null);
25026:
25027: matching_nodes.add(arg$4049);
25028: if ((null != arg$4049 && processScopeNodes
25029: .contains(arg$4049
25030: .getName()))) {
25031: processScope(arg$4049,
25032: getScope);
25033: }
25034: checkEnterScope(arg$4049);
25035:
25036: final Object retValue$4141 = Analyzer
25037: .cast(new Let<Pair<TypicalTypes.call>>() {
25038: final Pair<TypicalTypes.call> ca1;
25039: final Pair<TypicalTypes.call> ca2;
25040: final Pair<TypicalTypes.call> ca3;
25041: final Pair<TypicalTypes.call> ca4;
25042:
25043: {
25044: ca1 = Analyzer
25045: .cast(getCall
25046: .apply(
25047: e1,
25048: s,
25049: li));
25050: ca2 = Analyzer
25051: .cast(getCall
25052: .apply(
25053: e2,
25054: s,
25055: li));
25056: ca3 = Analyzer
25057: .cast(getCall
25058: .apply(
25059: e3,
25060: s,
25061: li));
25062: ca4 = Analyzer
25063: .cast(TypicalSupport.union$4023
25064: .apply(
25065: TypicalSupport.union$4023
25066: .apply(
25067: ca1,
25068: ca2),
25069: ca3));
25070: }
25071:
25072: public Pair<TypicalTypes.call> apply() {
25073: return Analyzer
25074: .cast(TypicalSupport.union$4023
25075: .apply(
25076: li,
25077: ca4));
25078: }
25079: }.apply());
25080:
25081: checkExitScope(arg$4049);
25082: matching_nodes
25083: .remove(matching_nodes
25084: .size() - 1);
25085: return Analyzer
25086: .cast(retValue$4141);
25087: }
25088: if (TypicalSupport
25089: .match$679(arg$4049)) {
25090: final Pair<Node> nl = Analyzer
25091: .cast(Primitives
25092: .getChildren(
25093: arg$4049,
25094: 0,
25095: arg$4049
25096: .size()));
25097:
25098: matching_nodes.add(arg$4049);
25099: if ((null != arg$4049 && processScopeNodes
25100: .contains(arg$4049
25101: .getName()))) {
25102: processScope(arg$4049,
25103: getScope);
25104: }
25105: checkEnterScope(arg$4049);
25106:
25107: final Object retValue$4153 = Analyzer
25108: .cast(new Match<Pair<TypicalTypes.call>>() {
25109: public Pair<TypicalTypes.call> apply() {
25110: final Pair<Node> arg$4147 = Analyzer
25111: .cast(nl);
25112:
25113: if ((null == arg$4147)) {
25114: return null;
25115: }
25116: if (TypicalSupport
25117: .match$4144(arg$4147)) {
25118: final Node name = Analyzer
25119: .cast(arg$4147
25120: .get(0));
25121: final Node args = Analyzer
25122: .cast(arg$4147
25123: .get(1));
25124:
25125: return Analyzer
25126: .cast(new Let<Pair<TypicalTypes.call>>() {
25127: final Pair<Node> el;
25128: final String str;
25129: final Pair<TypicalTypes.call> caList;
25130: final TypicalTypes.call ca;
25131:
25132: {
25133: el = Analyzer
25134: .cast(getNodeList
25135: .apply(args));
25136: str = Analyzer
25137: .cast(getString
25138: .apply(name));
25139: caList = Analyzer
25140: .cast(getCallList
25141: .apply(
25142: el,
25143: s,
25144: li));
25145: ca = Analyzer
25146: .cast(new TypicalTypes.call(
25147: s,
25148: str));
25149: }
25150:
25151: public Pair<TypicalTypes.call> apply() {
25152: return Analyzer
25153: .cast(TypicalSupport.union$4023
25154: .apply(
25155: li,
25156: Primitives
25157: .wrapCons(
25158: ca,
25159: caList)));
25160: }
25161: }
25162: .apply());
25163: }
25164: if (TypicalSupport
25165: .match$4145(arg$4147)) {
25166: final Pair<Node> el = Analyzer
25167: .cast(Primitives
25168: .getChildren(
25169: arg$4147
25170: .get(2),
25171: 0,
25172: arg$4147
25173: .get(
25174: 2)
25175: .size()));
25176:
25177: return Analyzer
25178: .cast(TypicalSupport.union$4023
25179: .apply(
25180: li,
25181: getCallList
25182: .apply(
25183: el,
25184: s,
25185: li)));
25186: }
25187: if (true) {
25188: return Analyzer
25189: .cast(null);
25190: }
25191: return null;
25192: }
25193: }.apply());
25194:
25195: checkExitScope(arg$4049);
25196: matching_nodes
25197: .remove(matching_nodes
25198: .size() - 1);
25199: return Analyzer
25200: .cast(retValue$4153);
25201: }
25202: if (TypicalSupport
25203: .match$61(arg$4049)) {
25204: final String str = (arg$4049
25205: .size() > 0 ? arg$4049
25206: .getString(0) : null);
25207:
25208: matching_nodes.add(arg$4049);
25209: if ((null != arg$4049 && processScopeNodes
25210: .contains(arg$4049
25211: .getName()))) {
25212: processScope(arg$4049,
25213: getScope);
25214: }
25215: checkEnterScope(arg$4049);
25216:
25217: final Object retValue$4157 = Analyzer
25218: .cast(new Let<Pair<TypicalTypes.call>>() {
25219: final TypicalTypes.call ca;
25220:
25221: {
25222: ca = Analyzer
25223: .cast(new TypicalTypes.call(
25224: s,
25225: str));
25226: }
25227:
25228: public Pair<TypicalTypes.call> apply() {
25229: return Analyzer
25230: .cast(TypicalSupport.union$4023
25231: .apply(
25232: li,
25233: new Pair<TypicalTypes.call>(
25234: ca)));
25235: }
25236: }.apply());
25237:
25238: checkExitScope(arg$4049);
25239: matching_nodes
25240: .remove(matching_nodes
25241: .size() - 1);
25242: return Analyzer
25243: .cast(retValue$4157);
25244: }
25245: if (TypicalSupport
25246: .match$2267(arg$4049)) {
25247: final Node e = (arg$4049.size() > 1 ? arg$4049
25248: .getGeneric(1)
25249: : null);
25250:
25251: matching_nodes.add(arg$4049);
25252: if ((null != arg$4049 && processScopeNodes
25253: .contains(arg$4049
25254: .getName()))) {
25255: processScope(arg$4049,
25256: getScope);
25257: }
25258: checkEnterScope(arg$4049);
25259:
25260: final Object retValue$4161 = Analyzer
25261: .cast(TypicalSupport.union$4023
25262: .apply(
25263: li,
25264: getCall
25265: .apply(
25266: e,
25267: s,
25268: li)));
25269:
25270: checkExitScope(arg$4049);
25271: matching_nodes
25272: .remove(matching_nodes
25273: .size() - 1);
25274: return Analyzer
25275: .cast(retValue$4161);
25276: }
25277: if (TypicalSupport
25278: .match$49(arg$4049)) {
25279: final Node e = (arg$4049.size() > 0 ? arg$4049
25280: .getGeneric(0)
25281: : null);
25282:
25283: matching_nodes.add(arg$4049);
25284: if ((null != arg$4049 && processScopeNodes
25285: .contains(arg$4049
25286: .getName()))) {
25287: processScope(arg$4049,
25288: getScope);
25289: }
25290: checkEnterScope(arg$4049);
25291:
25292: final Object retValue$4165 = Analyzer
25293: .cast(TypicalSupport.union$4023
25294: .apply(
25295: li,
25296: getCall
25297: .apply(
25298: e,
25299: s,
25300: li)));
25301:
25302: checkExitScope(arg$4049);
25303: matching_nodes
25304: .remove(matching_nodes
25305: .size() - 1);
25306: return Analyzer
25307: .cast(retValue$4165);
25308: }
25309: if (TypicalSupport
25310: .match$2379(arg$4049)) {
25311: final Node e = (arg$4049.size() > 0 ? arg$4049
25312: .getGeneric(0)
25313: : null);
25314:
25315: matching_nodes.add(arg$4049);
25316: if ((null != arg$4049 && processScopeNodes
25317: .contains(arg$4049
25318: .getName()))) {
25319: processScope(arg$4049,
25320: getScope);
25321: }
25322: checkEnterScope(arg$4049);
25323:
25324: final Object retValue$4169 = Analyzer
25325: .cast(TypicalSupport.union$4023
25326: .apply(
25327: li,
25328: getCall
25329: .apply(
25330: e,
25331: s,
25332: li)));
25333:
25334: checkExitScope(arg$4049);
25335: matching_nodes
25336: .remove(matching_nodes
25337: .size() - 1);
25338: return Analyzer
25339: .cast(retValue$4169);
25340: }
25341: if (TypicalSupport
25342: .match$3256(arg$4049)) {
25343: final Node e = (arg$4049.size() > 1 ? arg$4049
25344: .getGeneric(1)
25345: : null);
25346:
25347: matching_nodes.add(arg$4049);
25348: if ((null != arg$4049 && processScopeNodes
25349: .contains(arg$4049
25350: .getName()))) {
25351: processScope(arg$4049,
25352: getScope);
25353: }
25354: checkEnterScope(arg$4049);
25355:
25356: final Object retValue$4173 = Analyzer
25357: .cast(TypicalSupport.union$4023
25358: .apply(
25359: li,
25360: getCall
25361: .apply(
25362: e,
25363: s,
25364: li)));
25365:
25366: checkExitScope(arg$4049);
25367: matching_nodes
25368: .remove(matching_nodes
25369: .size() - 1);
25370: return Analyzer
25371: .cast(retValue$4173);
25372: }
25373: if (TypicalSupport
25374: .match$2390(arg$4049)) {
25375: final Node e = (arg$4049.size() > 0 ? arg$4049
25376: .getGeneric(0)
25377: : null);
25378:
25379: matching_nodes.add(arg$4049);
25380: if ((null != arg$4049 && processScopeNodes
25381: .contains(arg$4049
25382: .getName()))) {
25383: processScope(arg$4049,
25384: getScope);
25385: }
25386: checkEnterScope(arg$4049);
25387:
25388: final Object retValue$4177 = Analyzer
25389: .cast(TypicalSupport.union$4023
25390: .apply(
25391: li,
25392: getCall
25393: .apply(
25394: e,
25395: s,
25396: li)));
25397:
25398: checkExitScope(arg$4049);
25399: matching_nodes
25400: .remove(matching_nodes
25401: .size() - 1);
25402: return Analyzer
25403: .cast(retValue$4177);
25404: }
25405: if (TypicalSupport
25406: .match$84(arg$4049)) {
25407: final Node e = (arg$4049.size() > 1 ? arg$4049
25408: .getGeneric(1)
25409: : null);
25410:
25411: matching_nodes.add(arg$4049);
25412: if ((null != arg$4049 && processScopeNodes
25413: .contains(arg$4049
25414: .getName()))) {
25415: processScope(arg$4049,
25416: getScope);
25417: }
25418: checkEnterScope(arg$4049);
25419:
25420: final Object retValue$4181 = Analyzer
25421: .cast(TypicalSupport.union$4023
25422: .apply(
25423: li,
25424: getCall
25425: .apply(
25426: e,
25427: s,
25428: li)));
25429:
25430: checkExitScope(arg$4049);
25431: matching_nodes
25432: .remove(matching_nodes
25433: .size() - 1);
25434: return Analyzer
25435: .cast(retValue$4181);
25436: }
25437: if (TypicalSupport
25438: .match$45(arg$4049)) {
25439: final Node e = (arg$4049.size() > 1 ? arg$4049
25440: .getGeneric(1)
25441: : null);
25442:
25443: matching_nodes.add(arg$4049);
25444: if ((null != arg$4049 && processScopeNodes
25445: .contains(arg$4049
25446: .getName()))) {
25447: processScope(arg$4049,
25448: getScope);
25449: }
25450: checkEnterScope(arg$4049);
25451:
25452: final Object retValue$4185 = Analyzer
25453: .cast(TypicalSupport.union$4023
25454: .apply(
25455: li,
25456: getCall
25457: .apply(
25458: e,
25459: s,
25460: li)));
25461:
25462: checkExitScope(arg$4049);
25463: matching_nodes
25464: .remove(matching_nodes
25465: .size() - 1);
25466: return Analyzer
25467: .cast(retValue$4185);
25468: }
25469: if (TypicalSupport
25470: .match$216(arg$4049)) {
25471: final Node e = (arg$4049.size() > 0 ? arg$4049
25472: .getGeneric(0)
25473: : null);
25474:
25475: matching_nodes.add(arg$4049);
25476: if ((null != arg$4049 && processScopeNodes
25477: .contains(arg$4049
25478: .getName()))) {
25479: processScope(arg$4049,
25480: getScope);
25481: }
25482: checkEnterScope(arg$4049);
25483:
25484: final Object retValue$4189 = Analyzer
25485: .cast(TypicalSupport.union$4023
25486: .apply(
25487: li,
25488: getCall
25489: .apply(
25490: e,
25491: s,
25492: li)));
25493:
25494: checkExitScope(arg$4049);
25495: matching_nodes
25496: .remove(matching_nodes
25497: .size() - 1);
25498: return Analyzer
25499: .cast(retValue$4189);
25500: }
25501: if (TypicalSupport
25502: .match$77(arg$4049)) {
25503: final Node e = (arg$4049.size() > 2 ? arg$4049
25504: .getGeneric(2)
25505: : null);
25506:
25507: matching_nodes.add(arg$4049);
25508: if ((null != arg$4049 && processScopeNodes
25509: .contains(arg$4049
25510: .getName()))) {
25511: processScope(arg$4049,
25512: getScope);
25513: }
25514: checkEnterScope(arg$4049);
25515:
25516: final Object retValue$4193 = Analyzer
25517: .cast(TypicalSupport.union$4023
25518: .apply(
25519: li,
25520: getCall
25521: .apply(
25522: e,
25523: s,
25524: li)));
25525:
25526: checkExitScope(arg$4049);
25527: matching_nodes
25528: .remove(matching_nodes
25529: .size() - 1);
25530: return Analyzer
25531: .cast(retValue$4193);
25532: }
25533: if (TypicalSupport
25534: .match$2828(arg$4049)) {
25535: final Node e = (arg$4049.size() > 2 ? arg$4049
25536: .getGeneric(2)
25537: : null);
25538:
25539: matching_nodes.add(arg$4049);
25540: if ((null != arg$4049 && processScopeNodes
25541: .contains(arg$4049
25542: .getName()))) {
25543: processScope(arg$4049,
25544: getScope);
25545: }
25546: checkEnterScope(arg$4049);
25547:
25548: final Object retValue$4197 = Analyzer
25549: .cast(TypicalSupport.union$4023
25550: .apply(
25551: li,
25552: getCall
25553: .apply(
25554: e,
25555: s,
25556: li)));
25557:
25558: checkExitScope(arg$4049);
25559: matching_nodes
25560: .remove(matching_nodes
25561: .size() - 1);
25562: return Analyzer
25563: .cast(retValue$4197);
25564: }
25565: if (TypicalSupport
25566: .match$692(arg$4049)) {
25567: final Node e = (arg$4049.size() > 1 ? arg$4049
25568: .getGeneric(1)
25569: : null);
25570:
25571: matching_nodes.add(arg$4049);
25572: if ((null != arg$4049 && processScopeNodes
25573: .contains(arg$4049
25574: .getName()))) {
25575: processScope(arg$4049,
25576: getScope);
25577: }
25578: checkEnterScope(arg$4049);
25579:
25580: final Object retValue$4201 = Analyzer
25581: .cast(TypicalSupport.union$4023
25582: .apply(
25583: li,
25584: getCall
25585: .apply(
25586: e,
25587: s,
25588: li)));
25589:
25590: checkExitScope(arg$4049);
25591: matching_nodes
25592: .remove(matching_nodes
25593: .size() - 1);
25594: return Analyzer
25595: .cast(retValue$4201);
25596: }
25597: if (true) {
25598: matching_nodes.add(arg$4049);
25599: if ((null != arg$4049 && processScopeNodes
25600: .contains(arg$4049
25601: .getName()))) {
25602: processScope(arg$4049,
25603: getScope);
25604: }
25605: checkEnterScope(arg$4049);
25606:
25607: final Object retValue$4204 = Analyzer
25608: .cast(li);
25609:
25610: checkExitScope(arg$4049);
25611: matching_nodes
25612: .remove(matching_nodes
25613: .size() - 1);
25614: return Analyzer
25615: .cast(retValue$4204);
25616: }
25617: return null;
25618: }
25619: }.apply());
25620: }
25621: };
25622:
25623: final Function.F6<Pair<Pair<String>>, Pair<String>, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>> findPathsList = new Function.F6<Pair<Pair<String>>, Pair<String>, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>>() {
25624: public Pair<Pair<String>> apply(final Pair<String> fromList,
25625: final String des, final Pair<String> curPath,
25626: final Pair<String> visitedNodes,
25627: final Pair<Pair<String>> paths,
25628: final Pair<TypicalTypes.call> edges) {
25629: return new Match<Pair<Pair<String>>>() {
25630: public Pair<Pair<String>> apply() {
25631: final Pair<String> arg$4206 = Analyzer
25632: .cast(fromList);
25633:
25634: if ((null == arg$4206)) {
25635: return null;
25636: }
25637: if (TypicalSupport.match$3230(arg$4206)) {
25638: return Analyzer.cast(paths);
25639: }
25640: if (true) {
25641: final Pair<String> list$4208 = Analyzer
25642: .cast(Analyzer.cast(arg$4206));
25643: final String x = Analyzer.cast(Primitives
25644: .wrapHead(list$4208));
25645: final Pair<String> xs = Analyzer
25646: .cast(Primitives.wrapTail(list$4208));
25647:
25648: return Analyzer
25649: .cast(new Let<Pair<Pair<String>>>() {
25650: final Pair<Pair<String>> paths1;
25651:
25652: {
25653: paths1 = Analyzer
25654: .cast(findPaths.apply(
25655: x, des,
25656: curPath,
25657: visitedNodes,
25658: paths, edges));
25659: }
25660:
25661: public Pair<Pair<String>> apply() {
25662: return Analyzer
25663: .cast(findPathsList
25664: .apply(
25665: xs,
25666: des,
25667: curPath,
25668: visitedNodes,
25669: paths1,
25670: edges));
25671: }
25672: }.apply());
25673: }
25674: return null;
25675: }
25676: }.apply();
25677: }
25678: };
25679:
25680: final Function.F6<Pair<Pair<String>>, String, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>> findPaths = new Function.F6<Pair<Pair<String>>, String, String, Pair<String>, Pair<String>, Pair<Pair<String>>, Pair<TypicalTypes.call>>() {
25681: public Pair<Pair<String>> apply(final String from,
25682: final String des, final Pair<String> curPath,
25683: final Pair<String> visitedNodes,
25684: final Pair<Pair<String>> paths,
25685: final Pair<TypicalTypes.call> edges) {
25686: return (null == Primitives.not.apply(Primitives.contains
25687: .apply(from, visitedNodes)) ? null
25688: : Primitives.not.apply(Primitives.contains.apply(
25689: from, visitedNodes)) ? (null == Primitives.not
25690: .apply(Primitives.equal.apply(from, des)) ? null
25691: : Primitives.not.apply(Primitives.equal
25692: .apply(from, des)) ? new Let<Pair<Pair<String>>>() {
25693: final Pair<String> newVisited;
25694: final Pair<String> newCur;
25695: final Pair<String> children;
25696:
25697: {
25698: newVisited = Analyzer
25699: .cast(Primitives.wrapCons(
25700: from, visitedNodes));
25701: newCur = Analyzer.cast(Primitives
25702: .wrapCons(from, curPath));
25703: children = Analyzer
25704: .cast(getChildren.apply(
25705: from, edges));
25706: }
25707:
25708: public Pair<Pair<String>> apply() {
25709: return Analyzer.cast(findPathsList
25710: .apply(children, des,
25711: newCur, newVisited,
25712: paths, edges));
25713: }
25714: }.apply()
25715: : new Let<Pair<Pair<String>>>() {
25716: final Pair<String> res;
25717:
25718: {
25719: res = Analyzer
25720: .cast(Primitives
25721: .wrapCons(
25722: from,
25723: curPath));
25724: }
25725:
25726: public Pair<Pair<String>> apply() {
25727: return Analyzer
25728: .cast(Primitives
25729: .wrapCons(
25730: res,
25731: paths));
25732: }
25733: }.apply())
25734: : paths);
25735: }
25736: };
25737:
25738: final Function.F2<Pair<String>, String, Pair<TypicalTypes.call>> getChildren = new Function.F2<Pair<String>, String, Pair<TypicalTypes.call>>() {
25739: public Pair<String> apply(final String parent,
25740: final Pair<TypicalTypes.call> edges) {
25741: return new Match<Pair<String>>() {
25742: public Pair<String> apply() {
25743: final Pair<TypicalTypes.call> arg$4210 = Analyzer
25744: .cast(edges);
25745:
25746: if ((null == arg$4210)) {
25747: return null;
25748: }
25749: if (TypicalSupport.match$3163(arg$4210)) {
25750: return Analyzer.cast(Pair.<String> empty());
25751: }
25752: if (true) {
25753: final Pair<TypicalTypes.call> list$4212 = Analyzer
25754: .cast(Analyzer.cast(arg$4210));
25755: final TypicalTypes.call x = Analyzer
25756: .cast(Primitives.wrapHead(list$4212));
25757: final Pair<TypicalTypes.call> xs = Analyzer
25758: .cast(Primitives.wrapTail(list$4212));
25759:
25760: return Analyzer
25761: .cast(null == Primitives.equal.apply(
25762: null == x ? null : x.caller,
25763: parent) ? null
25764: : Primitives.equal.apply(
25765: null == x ? null
25766: : x.caller,
25767: parent) ? Primitives
25768: .wrapCons(
25769: null == x ? null
25770: : x.callee,
25771: getChildren
25772: .apply(
25773: parent,
25774: xs))
25775: : getChildren.apply(
25776: parent, xs));
25777: }
25778: return null;
25779: }
25780: }.apply();
25781: }
25782: };
25783:
25784: final Function.F1<Pair<Pair<String>>, Pair<TypicalTypes.call>> findCircles = new Function.F1<Pair<Pair<String>>, Pair<TypicalTypes.call>>() {
25785: public Pair<Pair<String>> apply(
25786: final Pair<TypicalTypes.call> edges) {
25787: return new Match<Pair<Pair<String>>>() {
25788: public Pair<Pair<String>> apply() {
25789: final Pair<TypicalTypes.call> arg$4214 = Analyzer
25790: .cast(edges);
25791:
25792: if ((null == arg$4214)) {
25793: return null;
25794: }
25795: if (TypicalSupport.match$3163(arg$4214)) {
25796: return Analyzer.cast(Pair
25797: .<Pair<String>> empty());
25798: }
25799: if (true) {
25800: final Pair<TypicalTypes.call> list$4216 = Analyzer
25801: .cast(Analyzer.cast(arg$4214));
25802: final TypicalTypes.call x = Analyzer
25803: .cast(Primitives.wrapHead(list$4216));
25804: final Pair<TypicalTypes.call> xs = Analyzer
25805: .cast(Primitives.wrapTail(list$4216));
25806:
25807: return Analyzer
25808: .cast(new Let<Pair<Pair<String>>>() {
25809: final Pair<Pair<String>> paths1;
25810: final Pair<Pair<String>> paths2;
25811:
25812: {
25813: paths1 = Analyzer
25814: .cast(findPaths
25815: .apply(
25816: null == x ? null
25817: : x.callee,
25818: null == x ? null
25819: : x.caller,
25820: Pair
25821: .<String> empty(),
25822: Pair
25823: .<String> empty(),
25824: Pair
25825: .<Pair<String>> empty(),
25826: xs));
25827: paths2 = Analyzer
25828: .cast(findCircles
25829: .apply(xs));
25830: }
25831:
25832: public Pair<Pair<String>> apply() {
25833: return Analyzer
25834: .cast(TypicalSupport.union$4217
25835: .apply(paths1,
25836: paths2));
25837: }
25838: }.apply());
25839: }
25840: return null;
25841: }
25842: }.apply();
25843: }
25844: };
25845:
25846: final Function.F2<Pair<Pair<String>>, Pair<Pair<String>>, Pair<String>> groupCircles = new Function.F2<Pair<Pair<String>>, Pair<Pair<String>>, Pair<String>>() {
25847: public Pair<Pair<String>> apply(
25848: final Pair<Pair<String>> circles,
25849: final Pair<String> vertices) {
25850: return new Match<Pair<Pair<String>>>() {
25851: public Pair<Pair<String>> apply() {
25852: final Pair<String> arg$4219 = Analyzer
25853: .cast(vertices);
25854:
25855: if ((null == arg$4219)) {
25856: return null;
25857: }
25858: if (TypicalSupport.match$3230(arg$4219)) {
25859: return Analyzer.cast(circles);
25860: }
25861: if (true) {
25862: final Pair<String> list$4221 = Analyzer
25863: .cast(Analyzer.cast(arg$4219));
25864: final String x = Analyzer.cast(Primitives
25865: .wrapHead(list$4221));
25866: final Pair<String> xs = Analyzer
25867: .cast(Primitives.wrapTail(list$4221));
25868:
25869: return Analyzer
25870: .cast(new Let<Pair<Pair<String>>>() {
25871: final TypicalTypes.group g;
25872: final Pair<Pair<String>> newCir;
25873:
25874: {
25875: g = Analyzer
25876: .cast(groupBy
25877: .apply(
25878: x,
25879: circles,
25880: Pair
25881: .<String> empty(),
25882: Pair
25883: .<Pair<String>> empty()));
25884: newCir = Analyzer
25885: .cast(TypicalSupport.append$4222
25886: .apply(
25887: new Pair<Pair<String>>(
25888: null == g ? null
25889: : g.group),
25890: null == g ? null
25891: : g.circles));
25892: }
25893:
25894: public Pair<Pair<String>> apply() {
25895: return Analyzer
25896: .cast(groupCircles
25897: .apply(newCir,
25898: xs));
25899: }
25900: }.apply());
25901: }
25902: return null;
25903: }
25904: }.apply();
25905: }
25906: };
25907:
25908: final Function.F4<TypicalTypes.group, String, Pair<Pair<String>>, Pair<String>, Pair<Pair<String>>> groupBy = new Function.F4<TypicalTypes.group, String, Pair<Pair<String>>, Pair<String>, Pair<Pair<String>>>() {
25909: public TypicalTypes.group apply(final String str,
25910: final Pair<Pair<String>> circles,
25911: final Pair<String> res, final Pair<Pair<String>> ret) {
25912: return new Match<TypicalTypes.group>() {
25913: public TypicalTypes.group apply() {
25914: final Pair<Pair<String>> arg$4224 = Analyzer
25915: .cast(circles);
25916:
25917: if ((null == arg$4224)) {
25918: return null;
25919: }
25920: if (TypicalSupport.match$4225(arg$4224)) {
25921: return Analyzer.cast(new TypicalTypes.group(
25922: res, ret));
25923: }
25924: if (true) {
25925: final Pair<Pair<String>> list$4226 = Analyzer
25926: .cast(Analyzer.cast(arg$4224));
25927: final Pair<String> x = Analyzer.cast(Primitives
25928: .wrapHead(list$4226));
25929: final Pair<Pair<String>> xs = Analyzer
25930: .cast(Primitives.wrapTail(list$4226));
25931:
25932: return Analyzer
25933: .cast(null == Primitives.contains
25934: .apply(str, x) ? null
25935: : Primitives.contains.apply(
25936: str, x) ? new Let<TypicalTypes.group>() {
25937: final Pair<String> newRes;
25938:
25939: {
25940: newRes = Analyzer
25941: .cast(TypicalSupport.union$313
25942: .apply(
25943: x,
25944: res));
25945: }
25946:
25947: public TypicalTypes.group apply() {
25948: return Analyzer
25949: .cast(groupBy
25950: .apply(
25951: str,
25952: xs,
25953: newRes,
25954: ret));
25955: }
25956: }.apply()
25957: : new Let<TypicalTypes.group>() {
25958: final Pair<Pair<String>> newRet;
25959:
25960: {
25961: newRet = Analyzer
25962: .cast(Primitives
25963: .wrapCons(
25964: x,
25965: ret));
25966: }
25967:
25968: public TypicalTypes.group apply() {
25969: return Analyzer
25970: .cast(groupBy
25971: .apply(
25972: str,
25973: xs,
25974: res,
25975: newRet));
25976: }
25977: }.apply());
25978: }
25979: return null;
25980: }
25981: }.apply();
25982: }
25983: };
25984:
25985: final Function.F3<Pair<TypicalTypes.nodeRec>, Pair<String>, Pair<TypicalTypes.call>, Pair<Pair<String>>> getResult = new Function.F3<Pair<TypicalTypes.nodeRec>, Pair<String>, Pair<TypicalTypes.call>, Pair<Pair<String>>>() {
25986: public Pair<TypicalTypes.nodeRec> apply(
25987: final Pair<String> vertices,
25988: final Pair<TypicalTypes.call> edges,
25989: final Pair<Pair<String>> groups) {
25990: return new Match<Pair<TypicalTypes.nodeRec>>() {
25991: public Pair<TypicalTypes.nodeRec> apply() {
25992: final Pair<String> arg$4228 = Analyzer
25993: .cast(vertices);
25994:
25995: if ((null == arg$4228)) {
25996: return null;
25997: }
25998: if (TypicalSupport.match$3230(arg$4228)) {
25999: return Analyzer.cast(Pair
26000: .<TypicalTypes.nodeRec> empty());
26001: }
26002: if (true) {
26003: final Pair<String> list$4230 = Analyzer
26004: .cast(Analyzer.cast(arg$4228));
26005: final String x = Analyzer.cast(Primitives
26006: .wrapHead(list$4230));
26007: final Pair<String> xs = Analyzer
26008: .cast(Primitives.wrapTail(list$4230));
26009:
26010: return Analyzer
26011: .cast(new Let<Pair<TypicalTypes.nodeRec>>() {
26012: final TypicalTypes.nodeRec rec;
26013:
26014: {
26015: rec = Analyzer
26016: .cast(getResultNode
26017: .apply(x,
26018: edges,
26019: groups));
26020: }
26021:
26022: public Pair<TypicalTypes.nodeRec> apply() {
26023: return Analyzer
26024: .cast(Primitives
26025: .wrapCons(
26026: rec,
26027: getResult
26028: .apply(
26029: xs,
26030: edges,
26031: groups)));
26032: }
26033: }.apply());
26034: }
26035: return null;
26036: }
26037: }.apply();
26038: }
26039: };
26040:
26041: final Function.F3<TypicalTypes.nodeRec, String, Pair<TypicalTypes.call>, Pair<Pair<String>>> getResultNode = new Function.F3<TypicalTypes.nodeRec, String, Pair<TypicalTypes.call>, Pair<Pair<String>>>() {
26042: public TypicalTypes.nodeRec apply(final String str,
26043: final Pair<TypicalTypes.call> edges,
26044: final Pair<Pair<String>> groups) {
26045: return new Let<TypicalTypes.nodeRec>() {
26046: final Pair<String> mutual;
26047: final Pair<String> depend;
26048:
26049: {
26050: mutual = Analyzer
26051: .cast(getMutual.apply(str, groups));
26052: depend = Analyzer.cast(getDepend.apply(str, edges,
26053: mutual));
26054: }
26055:
26056: public TypicalTypes.nodeRec apply() {
26057: return Analyzer.cast(new TypicalTypes.nodeRec(str,
26058: mutual, depend));
26059: }
26060: }.apply();
26061: }
26062: };
26063:
26064: final Function.F2<Pair<String>, String, Pair<Pair<String>>> getMutual = new Function.F2<Pair<String>, String, Pair<Pair<String>>>() {
26065: public Pair<String> apply(final String str,
26066: final Pair<Pair<String>> groups) {
26067: return new Match<Pair<String>>() {
26068: public Pair<String> apply() {
26069: final Pair<Pair<String>> arg$4232 = Analyzer
26070: .cast(groups);
26071:
26072: if ((null == arg$4232)) {
26073: return null;
26074: }
26075: if (TypicalSupport.match$4225(arg$4232)) {
26076: return Analyzer.cast(Pair.<String> empty());
26077: }
26078: if (true) {
26079: final Pair<Pair<String>> list$4234 = Analyzer
26080: .cast(Analyzer.cast(arg$4232));
26081: final Pair<String> x = Analyzer.cast(Primitives
26082: .wrapHead(list$4234));
26083: final Pair<Pair<String>> xs = Analyzer
26084: .cast(Primitives.wrapTail(list$4234));
26085:
26086: return Analyzer
26087: .cast(null == Primitives.contains
26088: .apply(str, x) ? null
26089: : Primitives.contains.apply(
26090: str, x) ? remove.apply(
26091: str, x) : getMutual
26092: .apply(str, xs));
26093: }
26094: return null;
26095: }
26096: }.apply();
26097: }
26098: };
26099:
26100: final Function.F3<Pair<String>, String, Pair<TypicalTypes.call>, Pair<String>> getDepend = new Function.F3<Pair<String>, String, Pair<TypicalTypes.call>, Pair<String>>() {
26101: public Pair<String> apply(final String str,
26102: final Pair<TypicalTypes.call> edges,
26103: final Pair<String> mutual) {
26104: return new Let<Pair<String>>() {
26105: final Pair<String> children;
26106:
26107: {
26108: children = Analyzer.cast(getChildren.apply(str,
26109: edges));
26110: }
26111:
26112: public Pair<String> apply() {
26113: return Analyzer.cast(removeMutual.apply(children,
26114: mutual));
26115: }
26116: }.apply();
26117: }
26118: };
26119:
26120: final Function.F2<Pair<String>, Pair<String>, Pair<String>> removeMutual = new Function.F2<Pair<String>, Pair<String>, Pair<String>>() {
26121: public Pair<String> apply(final Pair<String> children,
26122: final Pair<String> mutual) {
26123: return new Match<Pair<String>>() {
26124: public Pair<String> apply() {
26125: final Pair<String> arg$4236 = Analyzer
26126: .cast(children);
26127:
26128: if ((null == arg$4236)) {
26129: return null;
26130: }
26131: if (TypicalSupport.match$3230(arg$4236)) {
26132: return Analyzer.cast(Pair.<String> empty());
26133: }
26134: if (true) {
26135: final Pair<String> list$4238 = Analyzer
26136: .cast(Analyzer.cast(arg$4236));
26137: final String x = Analyzer.cast(Primitives
26138: .wrapHead(list$4238));
26139: final Pair<String> xs = Analyzer
26140: .cast(Primitives.wrapTail(list$4238));
26141:
26142: return Analyzer
26143: .cast(null == Primitives.contains
26144: .apply(x, mutual) ? null
26145: : Primitives.contains.apply(x,
26146: mutual) ? removeMutual
26147: .apply(xs, mutual)
26148: : Primitives
26149: .wrapCons(
26150: x,
26151: removeMutual
26152: .apply(
26153: xs,
26154: mutual)));
26155: }
26156: return null;
26157: }
26158: }.apply();
26159: }
26160: };
26161:
26162: final Function.F2<Pair<String>, String, Pair<String>> remove = new Function.F2<Pair<String>, String, Pair<String>>() {
26163: public Pair<String> apply(final String s, final Pair<String> li) {
26164: return new Match<Pair<String>>() {
26165: public Pair<String> apply() {
26166: final Pair<String> arg$4240 = Analyzer.cast(li);
26167:
26168: if ((null == arg$4240)) {
26169: return null;
26170: }
26171: if (TypicalSupport.match$3230(arg$4240)) {
26172: return Analyzer.cast(Pair.<String> empty());
26173: }
26174: if (true) {
26175: final Pair<String> list$4242 = Analyzer
26176: .cast(Analyzer.cast(arg$4240));
26177: final String x = Analyzer.cast(Primitives
26178: .wrapHead(list$4242));
26179: final Pair<String> xs = Analyzer
26180: .cast(Primitives.wrapTail(list$4242));
26181:
26182: return Analyzer.cast(null == Primitives.equal
26183: .apply(s, x) ? null : Primitives.equal
26184: .apply(s, x) ? xs : Primitives
26185: .wrapCons(x, remove.apply(s, xs)));
26186: }
26187: return null;
26188: }
26189: }.apply();
26190: }
26191: };
26192:
26193: final Function.F1<Pair<TypicalTypes.raw_type<?>>, Node> visitDepend = new Function.F1<Pair<TypicalTypes.raw_type<?>>, Node>() {
26194: public Pair<TypicalTypes.raw_type<?>> apply(final Node no) {
26195: return new Let<Pair<TypicalTypes.raw_type<?>>>() {
26196: final Pair<String> deps;
26197:
26198: {
26199: deps = Analyzer.cast(getAnnotatedStringList.apply(
26200: no, "depend"));
26201: }
26202:
26203: public Pair<TypicalTypes.raw_type<?>> apply() {
26204: return Analyzer.cast(TypicalSupport.map$4244.apply(
26205: visitDependNode, deps));
26206: }
26207: }.apply();
26208: }
26209: };
26210:
26211: final Function.F1<TypicalTypes.raw_type<?>, String> visitDependNode = new Function.F1<TypicalTypes.raw_type<?>, String>() {
26212: public TypicalTypes.raw_type<?> apply(final String s) {
26213: return new Let<TypicalTypes.raw_type<?>>() {
26214: final Node no;
26215:
26216: {
26217: no = Analyzer.cast(Analyzer.cast(lookup2.apply(
26218: GNode.create("NameSpaceStructure", s, null,
26219: null), getNameSpace)));
26220: }
26221:
26222: public TypicalTypes.raw_type<?> apply() {
26223: return Analyzer.cast(analyze.apply(no));
26224: }
26225: }.apply();
26226: }
26227: };
26228:
26229: final Function.F1<Object, Node> processMutual = new Function.F1<Object, Node>() {
26230: public Object apply(final Node no) {
26231: return new Let<Object>() {
26232: final Pair<String> muts;
26233: final Pair<Node> nl;
26234: final Pair<TypicalTypes.raw_type<?>> recList;
26235:
26236: {
26237: muts = Analyzer.cast(getAnnotatedStringList.apply(
26238: no, "mutual"));
26239: nl = Analyzer.cast(getNodes.apply(muts));
26240: Primitives.annotateList.apply(nl, "secondary",
26241: wildt);
26242: TypicalSupport.map$129.apply(analyze, nl);
26243: recList = Analyzer.cast(TypicalSupport.map$129
26244: .apply(createFunctionType, nl));
26245: processBodies.apply(nl, recList);
26246: }
26247:
26248: public Object apply() {
26249: return Analyzer.cast(null);
26250: }
26251: }.apply();
26252: }
26253: };
26254:
26255: final Function.F1<TypicalTypes.raw_type<?>, Node> createFunctionType = new Function.F1<TypicalTypes.raw_type<?>, Node>() {
26256: public TypicalTypes.raw_type<?> apply(final Node n) {
26257: return new Match<TypicalTypes.raw_type<?>>() {
26258: public TypicalTypes.raw_type<?> apply() {
26259: final Node arg$4245 = GNode.cast(n);
26260:
26261: if ((null == arg$4245)) {
26262: return null;
26263: }
26264: if (TypicalSupport.match$73(arg$4245)) {
26265: final Node p = (arg$4245.size() > 1 ? arg$4245
26266: .getGeneric(1) : null);
26267:
26268: matching_nodes.add(arg$4245);
26269: if ((null != arg$4245 && processScopeNodes
26270: .contains(arg$4245.getName()))) {
26271: processScope(arg$4245, getScope);
26272: }
26273: checkEnterScope(arg$4245);
26274:
26275: final Object retValue$4257 = Analyzer
26276: .cast(new Let<TypicalTypes.raw_type<?>>() {
26277: final TypicalTypes.raw_type<?> varT;
26278: final TypicalTypes.raw_type<?> tp;
26279:
26280: {
26281: varT = Analyzer
26282: .cast(new TypicalTypes.VariableT(
26283: freshName
26284: .apply("type"),
26285: Boolean.FALSE));
26286: tp = Analyzer.cast(analyze
26287: .apply(p));
26288: }
26289:
26290: public TypicalTypes.raw_type<?> apply() {
26291: return Analyzer
26292: .cast(new Match<TypicalTypes.raw_type<?>>() {
26293: public TypicalTypes.raw_type<?> apply() {
26294: final TypicalTypes.raw_type<?> arg$4251 = Analyzer
26295: .cast(tp);
26296:
26297: if ((null == arg$4251)) {
26298: return null;
26299: }
26300: if ((null != arg$4251))
26301: switch (arg$4251
26302: .tag()) {
26303: case TupleT:
26304: if (TypicalSupport
26305: .match$235(arg$4251)) {
26306: return Analyzer
26307: .cast(new Let<TypicalTypes.raw_type<?>>() {
26308: {
26309: redefine
26310: .apply(
26311: n,
26312: varT,
26313: getNameSpace);
26314: }
26315:
26316: public TypicalTypes.raw_type<?> apply() {
26317: return Analyzer
26318: .cast(varT);
26319: }
26320: }
26321: .apply());
26322: }
26323: if (TypicalSupport
26324: .match$114(arg$4251)) {
26325: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
26326: .cast(arg$4251
26327: .getTuple()
26328: .get1());
26329:
26330: return Analyzer
26331: .cast(new Let<TypicalTypes.raw_type<?>>() {
26332: {
26333: redefine
26334: .apply(
26335: n,
26336: new TypicalTypes.FunctionT(
26337: tl,
26338: varT),
26339: getNameSpace);
26340: }
26341:
26342: public TypicalTypes.raw_type<?> apply() {
26343: return Analyzer
26344: .cast(varT);
26345: }
26346: }
26347: .apply());
26348: }
26349: break;
26350: default:
26351: break;
26352: }
26353: ;
26354: if (true) {
26355: return Analyzer
26356: .cast(null);
26357: }
26358: return null;
26359: }
26360: }.apply());
26361: }
26362: }.apply());
26363:
26364: checkExitScope(arg$4245);
26365: matching_nodes
26366: .remove(matching_nodes.size() - 1);
26367: return Analyzer.cast(retValue$4257);
26368: }
26369: if (true) {
26370: matching_nodes.add(arg$4245);
26371: if ((null != arg$4245 && processScopeNodes
26372: .contains(arg$4245.getName()))) {
26373: processScope(arg$4245, getScope);
26374: }
26375: checkEnterScope(arg$4245);
26376:
26377: final Object retValue$4260 = Analyzer
26378: .cast(null);
26379:
26380: checkExitScope(arg$4245);
26381: matching_nodes
26382: .remove(matching_nodes.size() - 1);
26383: return Analyzer.cast(retValue$4260);
26384: }
26385: return null;
26386: }
26387: }.apply();
26388: }
26389: };
26390:
26391: final Function.F2<Pair<Object>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>> processBodies = new Function.F2<Pair<Object>, Pair<Node>, Pair<TypicalTypes.raw_type<?>>>() {
26392: public Pair<Object> apply(final Pair<Node> nl,
26393: final Pair<TypicalTypes.raw_type<?>> recList) {
26394: return new Match<Pair<Object>>() {
26395: public Pair<Object> apply() {
26396: final Pair<Node> arg$4262 = Analyzer.cast(nl);
26397:
26398: if ((null == arg$4262)) {
26399: return null;
26400: }
26401: if (TypicalSupport.match$323(arg$4262)) {
26402: return Analyzer.cast(Pair.empty());
26403: }
26404: if (true) {
26405: final Pair<Node> list$4264 = Analyzer
26406: .cast(Analyzer.cast(arg$4262));
26407: final Node x = GNode.cast(Primitives
26408: .wrapHead(list$4264));
26409: final Pair<Node> xs = Analyzer.cast(Primitives
26410: .wrapTail(list$4264));
26411:
26412: return Analyzer.cast(new Match<Pair<Object>>() {
26413: public Pair<Object> apply() {
26414: final Node arg$4282 = GNode.cast(x);
26415:
26416: if ((null == arg$4282)) {
26417: return null;
26418: }
26419: if (TypicalSupport.match$73(arg$4282)) {
26420: final Node e = (arg$4282.size() > 2 ? arg$4282
26421: .getGeneric(2)
26422: : null);
26423:
26424: matching_nodes.add(arg$4282);
26425: if ((null != arg$4282 && processScopeNodes
26426: .contains(arg$4282
26427: .getName()))) {
26428: processScope(arg$4282, getScope);
26429: }
26430: checkEnterScope(arg$4282);
26431:
26432: final Object retValue$4294 = Analyzer
26433: .cast(new Match<Pair<Object>>() {
26434: public Pair<Object> apply() {
26435: final Pair<TypicalTypes.raw_type<?>> arg$4288 = Analyzer
26436: .cast(recList);
26437:
26438: if ((null == arg$4288)) {
26439: return null;
26440: }
26441: if (TypicalSupport
26442: .match$122(arg$4288)) {
26443: return Analyzer
26444: .cast(null);
26445: }
26446: if (true) {
26447: final Pair<TypicalTypes.raw_type<?>> list$4290 = Analyzer
26448: .cast(Analyzer
26449: .cast(arg$4288));
26450: final TypicalTypes.raw_type<?> y = Analyzer
26451: .cast(Primitives
26452: .wrapHead(list$4290));
26453: final Pair<TypicalTypes.raw_type<?>> ys = Analyzer
26454: .cast(Primitives
26455: .wrapTail(list$4290));
26456:
26457: return Analyzer
26458: .cast(new Let<Pair<Object>>() {
26459: final TypicalTypes.raw_type<?> te;
26460:
26461: {
26462: te = Analyzer
26463: .cast(analyze
26464: .apply(e));
26465: unify
26466: .apply(
26467: y,
26468: te);
26469: }
26470:
26471: public Pair<Object> apply() {
26472: return Analyzer
26473: .cast(processBodies
26474: .apply(
26475: xs,
26476: ys));
26477: }
26478: }
26479: .apply());
26480: }
26481: return null;
26482: }
26483: }.apply());
26484:
26485: checkExitScope(arg$4282);
26486: matching_nodes
26487: .remove(matching_nodes
26488: .size() - 1);
26489: return Analyzer.cast(retValue$4294);
26490: }
26491: if (true) {
26492: matching_nodes.add(arg$4282);
26493: if ((null != arg$4282 && processScopeNodes
26494: .contains(arg$4282
26495: .getName()))) {
26496: processScope(arg$4282, getScope);
26497: }
26498: checkEnterScope(arg$4282);
26499:
26500: final Object retValue$4297 = Analyzer
26501: .cast(null);
26502:
26503: checkExitScope(arg$4282);
26504: matching_nodes
26505: .remove(matching_nodes
26506: .size() - 1);
26507: return Analyzer.cast(retValue$4297);
26508: }
26509: return null;
26510: }
26511: }.apply());
26512: }
26513: return null;
26514: }
26515: }.apply();
26516: }
26517: };
26518:
26519: final Function.F1<Pair<Node>, Pair<String>> getNodes = new Function.F1<Pair<Node>, Pair<String>>() {
26520: public Pair<Node> apply(final Pair<String> names) {
26521: return new Match<Pair<Node>>() {
26522: public Pair<Node> apply() {
26523: final Pair<String> arg$4300 = Analyzer.cast(names);
26524:
26525: if ((null == arg$4300)) {
26526: return null;
26527: }
26528: if (TypicalSupport.match$3230(arg$4300)) {
26529: return Analyzer.cast(Pair.<Node> empty());
26530: }
26531: if (true) {
26532: final Pair<String> list$4302 = Analyzer
26533: .cast(Analyzer.cast(arg$4300));
26534: final String x = Analyzer.cast(Primitives
26535: .wrapHead(list$4302));
26536: final Pair<String> xs = Analyzer
26537: .cast(Primitives.wrapTail(list$4302));
26538:
26539: return Analyzer.cast(new Let<Pair<Node>>() {
26540: final Node no;
26541:
26542: {
26543: no = Analyzer
26544: .cast(Analyzer
26545: .cast(lookup2
26546: .apply(
26547: GNode
26548: .create(
26549: "NameSpaceStructure",
26550: x,
26551: null,
26552: null),
26553: getNameSpace)));
26554: }
26555:
26556: public Pair<Node> apply() {
26557: return Analyzer
26558: .cast(TypicalSupport.union$4303
26559: .apply(new Pair<Node>(
26560: no), getNodes
26561: .apply(xs)));
26562: }
26563: }.apply());
26564: }
26565: return null;
26566: }
26567: }.apply();
26568: }
26569: };
26570:
26571: final Function.F1<Pair<Object>, Node> resolveMutual = new Function.F1<Pair<Object>, Node>() {
26572: public Pair<Object> apply(final Node no) {
26573: return new Match<Pair<Object>>() {
26574: public Pair<Object> apply() {
26575: final Node arg$4305 = GNode.cast(no);
26576:
26577: if ((null == arg$4305)) {
26578: return null;
26579: }
26580: if (TypicalSupport.match$73(arg$4305)) {
26581: final String s = (arg$4305.size() > 0 ? arg$4305
26582: .getString(0)
26583: : null);
26584:
26585: matching_nodes.add(arg$4305);
26586: if ((null != arg$4305 && processScopeNodes
26587: .contains(arg$4305.getName()))) {
26588: processScope(arg$4305, getScope);
26589: }
26590: checkEnterScope(arg$4305);
26591:
26592: final Object retValue$4310 = Analyzer
26593: .cast(new Let<Pair<Object>>() {
26594: final Pair<String> muts;
26595:
26596: {
26597: muts = Analyzer
26598: .cast(getAnnotatedStringList
26599: .apply(no,
26600: "mutual"));
26601: }
26602:
26603: public Pair<Object> apply() {
26604: return Analyzer
26605: .cast(TypicalSupport.map$4307
26606: .apply(
26607: resolveMutualName,
26608: Primitives
26609: .wrapCons(
26610: s,
26611: muts)));
26612: }
26613: }.apply());
26614:
26615: checkExitScope(arg$4305);
26616: matching_nodes
26617: .remove(matching_nodes.size() - 1);
26618: return Analyzer.cast(retValue$4310);
26619: }
26620: if (true) {
26621: matching_nodes.add(arg$4305);
26622: if ((null != arg$4305 && processScopeNodes
26623: .contains(arg$4305.getName()))) {
26624: processScope(arg$4305, getScope);
26625: }
26626: checkEnterScope(arg$4305);
26627:
26628: final Object retValue$4313 = Analyzer
26629: .cast(null);
26630:
26631: checkExitScope(arg$4305);
26632: matching_nodes
26633: .remove(matching_nodes.size() - 1);
26634: return Analyzer.cast(retValue$4313);
26635: }
26636: return null;
26637: }
26638: }.apply();
26639: }
26640: };
26641:
26642: final Function.F1<Object, String> resolveMutualName = new Function.F1<Object, String>() {
26643: public Object apply(final String str) {
26644: return new Let<Object>() {
26645: final Node nod;
26646: final TypicalTypes.raw_type<?> tx;
26647: final TypicalTypes.raw_type<?> res;
26648:
26649: {
26650: nod = Analyzer.cast(Analyzer.cast(lookup2.apply(
26651: GNode.create("NameSpaceStructure", str,
26652: null, null), getNameSpace)));
26653: tx = Analyzer.cast(Analyzer.cast(lookup2.apply(nod,
26654: getNameSpace)));
26655: res = Analyzer.cast(resolveType.apply(tx));
26656: redefine.apply(nod, res, getNameSpace);
26657: Primitives.annotate.apply(nod, "visited", wildt);
26658: }
26659:
26660: public Object apply() {
26661: return Analyzer.cast(null);
26662: }
26663: }.apply();
26664: }
26665: };
26666:
26667: final Function.F1<Object, Pair<TypicalTypes.raw_type<?>>> createTypeRecord = new Function.F1<Object, Pair<TypicalTypes.raw_type<?>>>() {
26668: public Object apply(final Pair<TypicalTypes.raw_type<?>> tl) {
26669: return new Let<Object>() {
26670: final TypicalTypes.raw_type<?> ty;
26671:
26672: {
26673: ty = Analyzer.cast(Analyzer.cast(lookup4
26674: .apply(GNode.create("UserDefinedType",
26675: "raw_type"), "error",
26676: "raw_type must be defined",
26677: getNameSpace)));
26678: }
26679:
26680: public Object apply() {
26681: return Analyzer.cast(null == Primitives.isNotBottom
26682: .apply(ty)
26683: || !Primitives.isNotBottom.apply(ty) ? null
26684: : new Let<Object>() {
26685: final TypicalTypes.raw_type<?> t;
26686:
26687: {
26688: t = Analyzer
26689: .cast(new TypicalTypes.FieldT(
26690: "type",
26691: "type",
26692: new TypicalTypes.TypeName(
26693: "raw_type")));
26694: redefine.apply(GNode.create(
26695: "FieldType", "type", null),
26696: t, getNameSpace);
26697: redefine
26698: .apply(
26699: GNode
26700: .create(
26701: "UserDefinedType",
26702: "type"),
26703: new TypicalTypes.RecordT(
26704: Primitives
26705: .wrapCons(
26706: t,
26707: tl)),
26708: getNameSpace);
26709: }
26710:
26711: public Object apply() {
26712: return Analyzer.cast(null);
26713: }
26714: }.apply());
26715: }
26716: }.apply();
26717: }
26718: };
26719:
26720: final Function.F2<String, Pair<String>, String> joinStringList = new Function.F2<String, Pair<String>, String>() {
26721: public String apply(final Pair<String> sl, final String res) {
26722: return new Match<String>() {
26723: public String apply() {
26724: final Pair<String> arg$4315 = Analyzer.cast(sl);
26725:
26726: if ((null == arg$4315)) {
26727: return null;
26728: }
26729: if (TypicalSupport.match$3230(arg$4315)) {
26730: return Analyzer.cast(res);
26731: }
26732: if (TypicalSupport.match$4317(arg$4315)) {
26733: final String x = Analyzer.cast(arg$4315.get(0));
26734:
26735: return Analyzer.cast(Primitives.concat.apply(
26736: Primitives.concat.apply(
26737: Primitives.concat.apply(res,
26738: "'"), x), "'"));
26739: }
26740: if (true) {
26741: final Pair<String> list$4318 = Analyzer
26742: .cast(Analyzer.cast(arg$4315));
26743: final String x = Analyzer.cast(Primitives
26744: .wrapHead(list$4318));
26745: final Pair<String> xs = Analyzer
26746: .cast(Primitives.wrapTail(list$4318));
26747:
26748: return Analyzer
26749: .cast(joinStringList
26750: .apply(
26751: xs,
26752: Primitives.concat
26753: .apply(
26754: Primitives.concat
26755: .apply(
26756: Primitives.concat
26757: .apply(
26758: Primitives.concat
26759: .apply(
26760: res,
26761: "'"),
26762: x),
26763: "'"),
26764: ", ")));
26765: }
26766: return null;
26767: }
26768: }.apply();
26769: }
26770: };
26771:
26772: protected class preload {
26773: public <T0> Pair<T0> apply(final T0 n) {
26774: return new Let<Pair<T0>>() {
26775: final TypicalTypes.raw_type<?> strL;
26776: final TypicalTypes.raw_type<?> t1;
26777: final TypicalTypes.raw_type<?> t2;
26778: final TypicalTypes.raw_type<?> t3;
26779: final TypicalTypes.raw_type<?> t6;
26780: final TypicalTypes.raw_type<?> t7;
26781: final TypicalTypes.raw_type<?> t9;
26782: final TypicalTypes.raw_type<?> l1;
26783: final TypicalTypes.raw_type<?> l2;
26784: final TypicalTypes.raw_type<?> l4;
26785: final TypicalTypes.raw_type<?> t14;
26786: final TypicalTypes.raw_type<?> tup;
26787: final TypicalTypes.raw_type<?> t4;
26788: final TypicalTypes.raw_type<?> t5;
26789: final TypicalTypes.raw_type<?> t11;
26790: final TypicalTypes.raw_type<?> l3;
26791: final TypicalTypes.raw_type<?> l5;
26792: final TypicalTypes.raw_type<?> l6;
26793: final TypicalTypes.raw_type<?> l7;
26794: final TypicalTypes.raw_type<?> l8;
26795: final TypicalTypes.raw_type<?> t8;
26796: final TypicalTypes.raw_type<?> t12;
26797: final TypicalTypes.raw_type<?> t13;
26798:
26799: {
26800: strL = Analyzer.cast(new TypicalTypes.ConstructedT(
26801: new Pair<TypicalTypes.raw_type<?>>(strt),
26802: "list"));
26803: t1 = Analyzer.cast(new TypicalTypes.ConstructorT(
26804: "name", "SimpleName", strt));
26805: t2 = Analyzer
26806: .cast(new TypicalTypes.TypeName("name"));
26807: t3 = Analyzer.cast(new TypicalTypes.ConstructorT(
26808: "name", "QualifiedName",
26809: new TypicalTypes.ConstructedT(
26810: new Pair<TypicalTypes.raw_type<?>>(
26811: strt), "list")));
26812: t6 = Analyzer.cast(new TypicalTypes.ConstructorT(
26813: "scope_kind", "Anonymous", strt));
26814: t7 = Analyzer.cast(new TypicalTypes.ConstructorT(
26815: "scope_kind", "Temporary", strt));
26816: t9 = Analyzer.cast(new TypicalTypes.TypeName(
26817: "scope_kind"));
26818: l1 = Analyzer.cast(new TypicalTypes.ConstructedT(
26819: new Pair<TypicalTypes.raw_type<?>>(wildt),
26820: "list"));
26821: l2 = Analyzer.cast(new TypicalTypes.VariableT(
26822: freshName.apply("type"), Boolean.TRUE));
26823: l4 = Analyzer.cast(new TypicalTypes.VariableT(
26824: freshName.apply("type"), Boolean.TRUE));
26825: t14 = Analyzer.cast(new TypicalTypes.VariableT(
26826: freshName.apply("type"), Boolean.TRUE));
26827: tup = Analyzer
26828: .cast(new TypicalTypes.TupleT(
26829: new Pair<TypicalTypes.raw_type<?>>(
26830: new TypicalTypes.TypeName(
26831: "name"))
26832: .append(
26833: new Pair<TypicalTypes.raw_type<?>>(
26834: strt))
26835: .append(
26836: new Pair<TypicalTypes.raw_type<?>>(
26837: strt))));
26838: load.apply("SimpleName", "constructor", t1);
26839: load.apply("QualifiedName", "constructor", t3);
26840: t4 = Analyzer
26841: .cast(new TypicalTypes.VariantT(
26842: new Pair<TypicalTypes.raw_type<?>>(
26843: t1)
26844: .append(new Pair<TypicalTypes.raw_type<?>>(
26845: t3))));
26846: t5 = Analyzer.cast(new TypicalTypes.ConstructorT(
26847: "scope_kind", "Named", t2));
26848: t11 = Analyzer.cast(new TypicalTypes.ConstructedT(
26849: new Pair<TypicalTypes.raw_type<?>>(nodet),
26850: "list"));
26851: l3 = Analyzer.cast(new TypicalTypes.ConstructedT(
26852: new Pair<TypicalTypes.raw_type<?>>(l2),
26853: "list"));
26854: l5 = Analyzer.cast(new TypicalTypes.ConstructedT(
26855: new Pair<TypicalTypes.raw_type<?>>(l4),
26856: "list"));
26857: l6 = Analyzer
26858: .cast(new TypicalTypes.FunctionT(
26859: new Pair<TypicalTypes.raw_type<?>>(
26860: l2), l4));
26861: l7 = Analyzer.cast(new TypicalTypes.FunctionT(
26862: new Pair<TypicalTypes.raw_type<?>>(l2),
26863: boolt));
26864: l8 = Analyzer
26865: .cast(new TypicalTypes.FunctionT(
26866: new Pair<TypicalTypes.raw_type<?>>(
26867: l4)
26868: .append(new Pair<TypicalTypes.raw_type<?>>(
26869: l2)), l2));
26870: load.apply("name", "type", t4);
26871: load.apply("Named", "constructor", t5);
26872: load.apply("Anonymous", "constructor", t6);
26873: load.apply("Temporary", "constructor", t7);
26874: t8 = Analyzer
26875: .cast(new TypicalTypes.VariantT(
26876: new Pair<TypicalTypes.raw_type<?>>(
26877: t5)
26878: .append(
26879: new Pair<TypicalTypes.raw_type<?>>(
26880: t6))
26881: .append(
26882: new Pair<TypicalTypes.raw_type<?>>(
26883: t7))));
26884: t12 = Analyzer
26885: .cast(new TypicalTypes.TupleT(
26886: new Pair<TypicalTypes.raw_type<?>>(
26887: t9)
26888: .append(new Pair<TypicalTypes.raw_type<?>>(
26889: t11))));
26890: load.apply("scope_kind", "type", t8);
26891: t13 = Analyzer.cast(new TypicalTypes.ConstructorT(
26892: "scopeT", "Scope", t12));
26893: load.apply("Scope", "constructor", t13);
26894: load.apply("scopeT", "type",
26895: new TypicalTypes.VariantT(
26896: new Pair<TypicalTypes.raw_type<?>>(
26897: t13)));
26898: redefine.apply(GNode.create("UserDefinedType",
26899: "scopeT"), new TypicalTypes.VariantT(
26900: new Pair<TypicalTypes.raw_type<?>>(t13)),
26901: getNameSpace);
26902: load.apply("node_type", "value", strt);
26903: load
26904: .apply(
26905: "String.stoi",
26906: "value",
26907: new TypicalTypes.FunctionT(
26908: new Pair<TypicalTypes.raw_type<?>>(
26909: strt)
26910: .append(new Pair<TypicalTypes.raw_type<?>>(
26911: intt)),
26912: intt));
26913: load.apply("String.stof", "value",
26914: new TypicalTypes.FunctionT(
26915: new Pair<TypicalTypes.raw_type<?>>(
26916: strt), floatt));
26917: load.apply("String.itos", "value",
26918: new TypicalTypes.FunctionT(
26919: new Pair<TypicalTypes.raw_type<?>>(
26920: intt), strt));
26921: load.apply("String.ftos", "value",
26922: new TypicalTypes.FunctionT(
26923: new Pair<TypicalTypes.raw_type<?>>(
26924: floatt), strt));
26925: load
26926: .apply(
26927: "String.concat",
26928: "value",
26929: new TypicalTypes.FunctionT(
26930: new Pair<TypicalTypes.raw_type<?>>(
26931: strt)
26932: .append(new Pair<TypicalTypes.raw_type<?>>(
26933: strt)),
26934: strt));
26935: load
26936: .apply(
26937: "String.ends_with",
26938: "value",
26939: new TypicalTypes.FunctionT(
26940: new Pair<TypicalTypes.raw_type<?>>(
26941: strt)
26942: .append(new Pair<TypicalTypes.raw_type<?>>(
26943: strt)),
26944: boolt));
26945: load
26946: .apply(
26947: "String.ends_withi",
26948: "value",
26949: new TypicalTypes.FunctionT(
26950: new Pair<TypicalTypes.raw_type<?>>(
26951: strt)
26952: .append(new Pair<TypicalTypes.raw_type<?>>(
26953: strt)),
26954: boolt));
26955: load.apply("String.join_strings", "value",
26956: new TypicalTypes.FunctionT(
26957: new Pair<TypicalTypes.raw_type<?>>(
26958: strL), strt));
26959: load.apply("String.ssize", "value",
26960: new TypicalTypes.FunctionT(
26961: new Pair<TypicalTypes.raw_type<?>>(
26962: strt), intt));
26963: load
26964: .apply(
26965: "String.starts_with",
26966: "value",
26967: new TypicalTypes.FunctionT(
26968: new Pair<TypicalTypes.raw_type<?>>(
26969: strt)
26970: .append(new Pair<TypicalTypes.raw_type<?>>(
26971: strt)),
26972: boolt));
26973: load
26974: .apply(
26975: "String.starts_withi",
26976: "value",
26977: new TypicalTypes.FunctionT(
26978: new Pair<TypicalTypes.raw_type<?>>(
26979: strt)
26980: .append(new Pair<TypicalTypes.raw_type<?>>(
26981: strt)),
26982: boolt));
26983: load
26984: .apply(
26985: "String.substring",
26986: "value",
26987: new TypicalTypes.FunctionT(
26988: new Pair<TypicalTypes.raw_type<?>>(
26989: strt)
26990: .append(new Pair<TypicalTypes.raw_type<?>>(
26991: intt)),
26992: strt));
26993: load
26994: .apply(
26995: "String.substring2",
26996: "value",
26997: new TypicalTypes.FunctionT(
26998: new Pair<TypicalTypes.raw_type<?>>(
26999: strt)
27000: .append(
27001: new Pair<TypicalTypes.raw_type<?>>(
27002: intt))
27003: .append(
27004: new Pair<TypicalTypes.raw_type<?>>(
27005: intt)),
27006: strt));
27007: load.apply("abs_float", "value",
27008: new TypicalTypes.FunctionT(
27009: new Pair<TypicalTypes.raw_type<?>>(
27010: floatt), floatt));
27011: load.apply("abs_int", "value",
27012: new TypicalTypes.FunctionT(
27013: new Pair<TypicalTypes.raw_type<?>>(
27014: intt), intt));
27015: load.apply("ftoi", "value",
27016: new TypicalTypes.FunctionT(
27017: new Pair<TypicalTypes.raw_type<?>>(
27018: floatt), intt));
27019: load
27020: .apply(
27021: "shift_left",
27022: "value",
27023: new TypicalTypes.FunctionT(
27024: new Pair<TypicalTypes.raw_type<?>>(
27025: intt)
27026: .append(new Pair<TypicalTypes.raw_type<?>>(
27027: intt)),
27028: intt));
27029: load
27030: .apply(
27031: "shift_right",
27032: "value",
27033: new TypicalTypes.FunctionT(
27034: new Pair<TypicalTypes.raw_type<?>>(
27035: intt)
27036: .append(new Pair<TypicalTypes.raw_type<?>>(
27037: intt)),
27038: intt));
27039: load
27040: .apply(
27041: "and_bits",
27042: "value",
27043: new TypicalTypes.FunctionT(
27044: new Pair<TypicalTypes.raw_type<?>>(
27045: intt)
27046: .append(new Pair<TypicalTypes.raw_type<?>>(
27047: intt)),
27048: intt));
27049: load
27050: .apply(
27051: "or_bits",
27052: "value",
27053: new TypicalTypes.FunctionT(
27054: new Pair<TypicalTypes.raw_type<?>>(
27055: intt)
27056: .append(new Pair<TypicalTypes.raw_type<?>>(
27057: intt)),
27058: intt));
27059: load
27060: .apply(
27061: "xor_bits",
27062: "value",
27063: new TypicalTypes.FunctionT(
27064: new Pair<TypicalTypes.raw_type<?>>(
27065: intt)
27066: .append(new Pair<TypicalTypes.raw_type<?>>(
27067: intt)),
27068: intt));
27069: load.apply("negate_bits", "value",
27070: new TypicalTypes.FunctionT(
27071: new Pair<TypicalTypes.raw_type<?>>(
27072: intt), intt));
27073: load.apply("negate_float", "value",
27074: new TypicalTypes.FunctionT(
27075: new Pair<TypicalTypes.raw_type<?>>(
27076: floatt), floatt));
27077: load.apply("negate_int", "value",
27078: new TypicalTypes.FunctionT(
27079: new Pair<TypicalTypes.raw_type<?>>(
27080: intt), intt));
27081: load.apply("List.is_empty", "value",
27082: new TypicalTypes.FunctionT(
27083: new Pair<TypicalTypes.raw_type<?>>(
27084: l1), boolt));
27085: load.apply("List.length", "value",
27086: new TypicalTypes.FunctionT(
27087: new Pair<TypicalTypes.raw_type<?>>(
27088: l1), intt));
27089: load
27090: .apply(
27091: "List.mem",
27092: "value",
27093: new TypicalTypes.FunctionT(
27094: new Pair<TypicalTypes.raw_type<?>>(
27095: l2)
27096: .append(new Pair<TypicalTypes.raw_type<?>>(
27097: l3)), boolt));
27098: load
27099: .apply(
27100: "List.append",
27101: "value",
27102: new TypicalTypes.FunctionT(
27103: new Pair<TypicalTypes.raw_type<?>>(
27104: l3)
27105: .append(new Pair<TypicalTypes.raw_type<?>>(
27106: l3)), l3));
27107: load.apply("List.head", "value",
27108: new TypicalTypes.FunctionT(
27109: new Pair<TypicalTypes.raw_type<?>>(
27110: l3), l2));
27111: load.apply("List.tail", "value",
27112: new TypicalTypes.FunctionT(
27113: new Pair<TypicalTypes.raw_type<?>>(
27114: l3), l3));
27115: load
27116: .apply(
27117: "List.nth",
27118: "value",
27119: new TypicalTypes.FunctionT(
27120: new Pair<TypicalTypes.raw_type<?>>(
27121: l3)
27122: .append(new Pair<TypicalTypes.raw_type<?>>(
27123: intt)), l2));
27124: load
27125: .apply(
27126: "List.union",
27127: "value",
27128: new TypicalTypes.FunctionT(
27129: new Pair<TypicalTypes.raw_type<?>>(
27130: l3)
27131: .append(new Pair<TypicalTypes.raw_type<?>>(
27132: l3)), l3));
27133: load
27134: .apply(
27135: "List.subtraction",
27136: "value",
27137: new TypicalTypes.FunctionT(
27138: new Pair<TypicalTypes.raw_type<?>>(
27139: l3)
27140: .append(new Pair<TypicalTypes.raw_type<?>>(
27141: l3)), l3));
27142: load
27143: .apply(
27144: "List.intersection",
27145: "value",
27146: new TypicalTypes.FunctionT(
27147: new Pair<TypicalTypes.raw_type<?>>(
27148: l3)
27149: .append(new Pair<TypicalTypes.raw_type<?>>(
27150: l3)), l3));
27151: load
27152: .apply(
27153: "List.map",
27154: "value",
27155: new TypicalTypes.FunctionT(
27156: new Pair<TypicalTypes.raw_type<?>>(
27157: l6)
27158: .append(new Pair<TypicalTypes.raw_type<?>>(
27159: l3)), l5));
27160: load
27161: .apply(
27162: "List.iter",
27163: "value",
27164: new TypicalTypes.FunctionT(
27165: new Pair<TypicalTypes.raw_type<?>>(
27166: l6)
27167: .append(new Pair<TypicalTypes.raw_type<?>>(
27168: l3)), l4));
27169: load
27170: .apply(
27171: "List.exists",
27172: "value",
27173: new TypicalTypes.FunctionT(
27174: new Pair<TypicalTypes.raw_type<?>>(
27175: l7)
27176: .append(new Pair<TypicalTypes.raw_type<?>>(
27177: l5)), boolt));
27178: load
27179: .apply(
27180: "List.foldl",
27181: "value",
27182: new TypicalTypes.FunctionT(
27183: new Pair<TypicalTypes.raw_type<?>>(
27184: l8)
27185: .append(
27186: new Pair<TypicalTypes.raw_type<?>>(
27187: l5))
27188: .append(
27189: new Pair<TypicalTypes.raw_type<?>>(
27190: l2)),
27191: l2));
27192: load.apply("List.cons", "value",
27193: new TypicalTypes.FunctionT(
27194: new Pair<TypicalTypes.raw_type<?>>(
27195: l2), l3));
27196: load.apply("trace", "value",
27197: new TypicalTypes.FunctionT(
27198: new Pair<TypicalTypes.raw_type<?>>(
27199: t14), t14));
27200: load
27201: .apply(
27202: "trace2",
27203: "value",
27204: new TypicalTypes.FunctionT(
27205: new Pair<TypicalTypes.raw_type<?>>(
27206: strt)
27207: .append(new Pair<TypicalTypes.raw_type<?>>(
27208: t14)), t14));
27209: load.apply("show_symbols", "value",
27210: new TypicalTypes.FunctionT(
27211: new Pair<TypicalTypes.raw_type<?>>(
27212: strt), boolt));
27213: load.apply("is_defined", "value",
27214: new TypicalTypes.FunctionT(
27215: new Pair<TypicalTypes.raw_type<?>>(
27216: nodet), boolt));
27217: load.apply("is_defined_locally", "value",
27218: new TypicalTypes.FunctionT(
27219: new Pair<TypicalTypes.raw_type<?>>(
27220: nodet), boolt));
27221: load
27222: .apply(
27223: "annotate",
27224: "value",
27225: new TypicalTypes.FunctionT(
27226: new Pair<TypicalTypes.raw_type<?>>(
27227: nodet)
27228: .append(
27229: new Pair<TypicalTypes.raw_type<?>>(
27230: strt))
27231: .append(
27232: new Pair<TypicalTypes.raw_type<?>>(
27233: l2)),
27234: l2));
27235: load
27236: .apply(
27237: "has_annotation",
27238: "value",
27239: new TypicalTypes.FunctionT(
27240: new Pair<TypicalTypes.raw_type<?>>(
27241: nodet)
27242: .append(new Pair<TypicalTypes.raw_type<?>>(
27243: strt)),
27244: boolt));
27245: load
27246: .apply(
27247: "get_annotation",
27248: "value",
27249: new TypicalTypes.FunctionT(
27250: new Pair<TypicalTypes.raw_type<?>>(
27251: nodet)
27252: .append(new Pair<TypicalTypes.raw_type<?>>(
27253: strt)),
27254: wildt));
27255: load
27256: .apply(
27257: "annotate_list",
27258: "value",
27259: new TypicalTypes.FunctionT(
27260: new Pair<TypicalTypes.raw_type<?>>(
27261: t11)
27262: .append(
27263: new Pair<TypicalTypes.raw_type<?>>(
27264: strt))
27265: .append(
27266: new Pair<TypicalTypes.raw_type<?>>(
27267: l2)),
27268: l2));
27269: load.apply("Map.get", "value",
27270: new TypicalTypes.FunctionT(
27271: new Pair<TypicalTypes.raw_type<?>>(
27272: strt), typet));
27273: load
27274: .apply(
27275: "Map.put",
27276: "value",
27277: new TypicalTypes.FunctionT(
27278: new Pair<TypicalTypes.raw_type<?>>(
27279: strt)
27280: .append(new Pair<TypicalTypes.raw_type<?>>(
27281: typet)),
27282: wildt));
27283: load.apply("fresh_name", "value",
27284: new TypicalTypes.FunctionT(
27285: new Pair<TypicalTypes.raw_type<?>>(
27286: strt), strt));
27287: load.apply("not_bottom", "value",
27288: new TypicalTypes.FunctionT(
27289: new Pair<TypicalTypes.raw_type<?>>(
27290: wildt), boolt));
27291: load.apply("is_bottom", "value",
27292: new TypicalTypes.FunctionT(
27293: new Pair<TypicalTypes.raw_type<?>>(
27294: wildt), boolt));
27295: load.apply("is_not_bottom", "value",
27296: new TypicalTypes.FunctionT(
27297: new Pair<TypicalTypes.raw_type<?>>(
27298: wildt), boolt));
27299: load.apply("node_name", "value",
27300: new TypicalTypes.FunctionT(
27301: new Pair<TypicalTypes.raw_type<?>>(
27302: nodet), strt));
27303: load
27304: .apply(
27305: "load",
27306: "value",
27307: new TypicalTypes.FunctionT(
27308: new Pair<TypicalTypes.raw_type<?>>(
27309: strt)
27310: .append(
27311: new Pair<TypicalTypes.raw_type<?>>(
27312: strt))
27313: .append(
27314: new Pair<TypicalTypes.raw_type<?>>(
27315: wildt)),
27316: wildt));
27317: load.apply("ancestor", "value",
27318: new TypicalTypes.FunctionT(
27319: new Pair<TypicalTypes.raw_type<?>>(
27320: wildt), nodet));
27321: load.apply("parent", "value",
27322: new TypicalTypes.FunctionT(
27323: new Pair<TypicalTypes.raw_type<?>>(
27324: wildt), nodet));
27325: load.apply("getNameSpace", "value",
27326: new TypicalTypes.FunctionT(
27327: new Pair<TypicalTypes.raw_type<?>>(
27328: nodet), tup));
27329: load
27330: .apply(
27331: "getScope",
27332: "value",
27333: new TypicalTypes.FunctionT(
27334: new Pair<TypicalTypes.raw_type<?>>(
27335: nodet),
27336: new TypicalTypes.TypeName(
27337: "scopeT")));
27338: load.apply("Limits.int_size", "value", intt);
27339: load.apply("Limits.short_size", "value", intt);
27340: load.apply("Limits.long_size", "value", intt);
27341: load.apply("Limits.long_long_size", "value", intt);
27342: load.apply("Limits.float_size", "value", intt);
27343: load.apply("Limits.double_size", "value", intt);
27344: load.apply("Limits.pointer_size", "value", intt);
27345: load
27346: .apply("Limits.long_double_size", "value",
27347: intt);
27348: load.apply("Limits.array_max", "value", intt);
27349: load.apply("nonce", "value", intt);
27350: }
27351:
27352: public Pair<T0> apply() {
27353: return Analyzer.cast(new Pair<Object>(n));
27354: }
27355: }.apply();
27356: }
27357: }
27358:
27359: final preload preload = new preload();
27360:
27361: final Function.F1<Object, Node> resolveNode = new Function.F1<Object, Node>() {
27362: public Object apply(final Node no) {
27363: return new Match<Object>() {
27364: public Object apply() {
27365: final Node arg$4320 = GNode.cast(no);
27366:
27367: if ((null == arg$4320)) {
27368: return null;
27369: }
27370: if (TypicalSupport.match$147(arg$4320)) {
27371: final Pair<Node> nl = Analyzer.cast(Primitives
27372: .getChildren(arg$4320, 1, arg$4320
27373: .size()));
27374:
27375: matching_nodes.add(arg$4320);
27376: if ((null != arg$4320 && processScopeNodes
27377: .contains(arg$4320.getName()))) {
27378: processScope(arg$4320, getScope);
27379: }
27380: checkEnterScope(arg$4320);
27381:
27382: final Object retValue$4324 = Analyzer
27383: .cast(new Let<Object>() {
27384: {
27385: TypicalSupport.map$128.apply(
27386: resolveNode, nl);
27387: }
27388:
27389: public Object apply() {
27390: return Analyzer
27391: .cast(null == Primitives.hasAnnotation
27392: .apply(no,
27393: "__type")
27394: || !Primitives.hasAnnotation
27395: .apply(
27396: no,
27397: "__type") ? null
27398: : new Let<Object>() {
27399: final TypicalTypes.raw_type<?> t;
27400: final TypicalTypes.raw_type<?> ty;
27401:
27402: {
27403: t = Analyzer
27404: .cast(Primitives.getAnnotation
27405: .apply(
27406: no,
27407: "__type"));
27408: ty = Analyzer
27409: .cast(resolveType
27410: .apply(t));
27411: Primitives.annotate
27412: .apply(
27413: no,
27414: "__type",
27415: ty);
27416: }
27417:
27418: public Object apply() {
27419: return Analyzer
27420: .cast(null);
27421: }
27422: }.apply());
27423: }
27424: }.apply());
27425:
27426: checkExitScope(arg$4320);
27427: matching_nodes
27428: .remove(matching_nodes.size() - 1);
27429: return Analyzer.cast(retValue$4324);
27430: }
27431: if (TypicalSupport.match$220(arg$4320)) {
27432: final Pair<Node> nl = Analyzer.cast(Primitives
27433: .getChildren(arg$4320, 0, arg$4320
27434: .size()));
27435:
27436: matching_nodes.add(arg$4320);
27437: if ((null != arg$4320 && processScopeNodes
27438: .contains(arg$4320.getName()))) {
27439: processScope(arg$4320, getScope);
27440: }
27441: checkEnterScope(arg$4320);
27442:
27443: final Object retValue$4328 = Analyzer
27444: .cast(new Let<Object>() {
27445: {
27446: TypicalSupport.map$128.apply(
27447: resolveNode, nl);
27448: }
27449:
27450: public Object apply() {
27451: return Analyzer
27452: .cast(null == Primitives.hasAnnotation
27453: .apply(no,
27454: "__type")
27455: || !Primitives.hasAnnotation
27456: .apply(
27457: no,
27458: "__type") ? null
27459: : new Let<Object>() {
27460: final TypicalTypes.raw_type<?> t;
27461: final TypicalTypes.raw_type<?> ty;
27462:
27463: {
27464: t = Analyzer
27465: .cast(Primitives.getAnnotation
27466: .apply(
27467: no,
27468: "__type"));
27469: ty = Analyzer
27470: .cast(resolveType
27471: .apply(t));
27472: Primitives.annotate
27473: .apply(
27474: no,
27475: "__type",
27476: ty);
27477: }
27478:
27479: public Object apply() {
27480: return Analyzer
27481: .cast(null);
27482: }
27483: }.apply());
27484: }
27485: }.apply());
27486:
27487: checkExitScope(arg$4320);
27488: matching_nodes
27489: .remove(matching_nodes.size() - 1);
27490: return Analyzer.cast(retValue$4328);
27491: }
27492: if (TypicalSupport.match$245(arg$4320)) {
27493: final Pair<Node> nl = Analyzer.cast(Primitives
27494: .getChildren(arg$4320, 0, arg$4320
27495: .size()));
27496:
27497: matching_nodes.add(arg$4320);
27498: if ((null != arg$4320 && processScopeNodes
27499: .contains(arg$4320.getName()))) {
27500: processScope(arg$4320, getScope);
27501: }
27502: checkEnterScope(arg$4320);
27503:
27504: final Object retValue$4332 = Analyzer
27505: .cast(new Let<Object>() {
27506: {
27507: TypicalSupport.map$128.apply(
27508: resolveNode, nl);
27509: }
27510:
27511: public Object apply() {
27512: return Analyzer
27513: .cast(null == Primitives.hasAnnotation
27514: .apply(no,
27515: "__type")
27516: || !Primitives.hasAnnotation
27517: .apply(
27518: no,
27519: "__type") ? null
27520: : new Let<Object>() {
27521: final TypicalTypes.raw_type<?> t;
27522: final TypicalTypes.raw_type<?> ty;
27523:
27524: {
27525: t = Analyzer
27526: .cast(Primitives.getAnnotation
27527: .apply(
27528: no,
27529: "__type"));
27530: ty = Analyzer
27531: .cast(resolveType
27532: .apply(t));
27533: Primitives.annotate
27534: .apply(
27535: no,
27536: "__type",
27537: ty);
27538: }
27539:
27540: public Object apply() {
27541: return Analyzer
27542: .cast(null);
27543: }
27544: }.apply());
27545: }
27546: }.apply());
27547:
27548: checkExitScope(arg$4320);
27549: matching_nodes
27550: .remove(matching_nodes.size() - 1);
27551: return Analyzer.cast(retValue$4332);
27552: }
27553: if (TypicalSupport.match$277(arg$4320)) {
27554: final Pair<Node> nl = Analyzer.cast(Primitives
27555: .getChildren(arg$4320, 0, arg$4320
27556: .size()));
27557:
27558: matching_nodes.add(arg$4320);
27559: if ((null != arg$4320 && processScopeNodes
27560: .contains(arg$4320.getName()))) {
27561: processScope(arg$4320, getScope);
27562: }
27563: checkEnterScope(arg$4320);
27564:
27565: final Object retValue$4336 = Analyzer
27566: .cast(new Let<Object>() {
27567: {
27568: TypicalSupport.map$128.apply(
27569: resolveNode, nl);
27570: }
27571:
27572: public Object apply() {
27573: return Analyzer
27574: .cast(null == Primitives.hasAnnotation
27575: .apply(no,
27576: "__type")
27577: || !Primitives.hasAnnotation
27578: .apply(
27579: no,
27580: "__type") ? null
27581: : new Let<Object>() {
27582: final TypicalTypes.raw_type<?> t;
27583: final TypicalTypes.raw_type<?> ty;
27584:
27585: {
27586: t = Analyzer
27587: .cast(Primitives.getAnnotation
27588: .apply(
27589: no,
27590: "__type"));
27591: ty = Analyzer
27592: .cast(resolveType
27593: .apply(t));
27594: Primitives.annotate
27595: .apply(
27596: no,
27597: "__type",
27598: ty);
27599: }
27600:
27601: public Object apply() {
27602: return Analyzer
27603: .cast(null);
27604: }
27605: }.apply());
27606: }
27607: }.apply());
27608:
27609: checkExitScope(arg$4320);
27610: matching_nodes
27611: .remove(matching_nodes.size() - 1);
27612: return Analyzer.cast(retValue$4336);
27613: }
27614: if (TypicalSupport.match$283(arg$4320)) {
27615: final Pair<Node> nl = Analyzer.cast(Primitives
27616: .getChildren(arg$4320, 0, arg$4320
27617: .size()));
27618:
27619: matching_nodes.add(arg$4320);
27620: if ((null != arg$4320 && processScopeNodes
27621: .contains(arg$4320.getName()))) {
27622: processScope(arg$4320, getScope);
27623: }
27624: checkEnterScope(arg$4320);
27625:
27626: final Object retValue$4340 = Analyzer
27627: .cast(new Let<Object>() {
27628: {
27629: TypicalSupport.map$128.apply(
27630: resolveNode, nl);
27631: }
27632:
27633: public Object apply() {
27634: return Analyzer
27635: .cast(null == Primitives.hasAnnotation
27636: .apply(no,
27637: "__type")
27638: || !Primitives.hasAnnotation
27639: .apply(
27640: no,
27641: "__type") ? null
27642: : new Let<Object>() {
27643: final TypicalTypes.raw_type<?> t;
27644: final TypicalTypes.raw_type<?> ty;
27645:
27646: {
27647: t = Analyzer
27648: .cast(Primitives.getAnnotation
27649: .apply(
27650: no,
27651: "__type"));
27652: ty = Analyzer
27653: .cast(resolveType
27654: .apply(t));
27655: Primitives.annotate
27656: .apply(
27657: no,
27658: "__type",
27659: ty);
27660: }
27661:
27662: public Object apply() {
27663: return Analyzer
27664: .cast(null);
27665: }
27666: }.apply());
27667: }
27668: }.apply());
27669:
27670: checkExitScope(arg$4320);
27671: matching_nodes
27672: .remove(matching_nodes.size() - 1);
27673: return Analyzer.cast(retValue$4340);
27674: }
27675: if (TypicalSupport.match$3474(arg$4320)) {
27676: final Pair<Node> nl = Analyzer.cast(Primitives
27677: .getChildren(arg$4320, 0, arg$4320
27678: .size()));
27679:
27680: matching_nodes.add(arg$4320);
27681: if ((null != arg$4320 && processScopeNodes
27682: .contains(arg$4320.getName()))) {
27683: processScope(arg$4320, getScope);
27684: }
27685: checkEnterScope(arg$4320);
27686:
27687: final Object retValue$4344 = Analyzer
27688: .cast(new Let<Object>() {
27689: {
27690: TypicalSupport.map$128.apply(
27691: resolveNode, nl);
27692: }
27693:
27694: public Object apply() {
27695: return Analyzer
27696: .cast(null == Primitives.hasAnnotation
27697: .apply(no,
27698: "__type")
27699: || !Primitives.hasAnnotation
27700: .apply(
27701: no,
27702: "__type") ? null
27703: : new Let<Object>() {
27704: final TypicalTypes.raw_type<?> t;
27705: final TypicalTypes.raw_type<?> ty;
27706:
27707: {
27708: t = Analyzer
27709: .cast(Primitives.getAnnotation
27710: .apply(
27711: no,
27712: "__type"));
27713: ty = Analyzer
27714: .cast(resolveType
27715: .apply(t));
27716: Primitives.annotate
27717: .apply(
27718: no,
27719: "__type",
27720: ty);
27721: }
27722:
27723: public Object apply() {
27724: return Analyzer
27725: .cast(null);
27726: }
27727: }.apply());
27728: }
27729: }.apply());
27730:
27731: checkExitScope(arg$4320);
27732: matching_nodes
27733: .remove(matching_nodes.size() - 1);
27734: return Analyzer.cast(retValue$4344);
27735: }
27736: if (TypicalSupport.match$321(arg$4320)) {
27737: final Pair<Node> nl = Analyzer.cast(Primitives
27738: .getChildren(arg$4320, 0, arg$4320
27739: .size()));
27740:
27741: matching_nodes.add(arg$4320);
27742: if ((null != arg$4320 && processScopeNodes
27743: .contains(arg$4320.getName()))) {
27744: processScope(arg$4320, getScope);
27745: }
27746: checkEnterScope(arg$4320);
27747:
27748: final Object retValue$4348 = Analyzer
27749: .cast(new Let<Object>() {
27750: {
27751: TypicalSupport.map$128.apply(
27752: resolveNode, nl);
27753: }
27754:
27755: public Object apply() {
27756: return Analyzer
27757: .cast(null == Primitives.hasAnnotation
27758: .apply(no,
27759: "__type")
27760: || !Primitives.hasAnnotation
27761: .apply(
27762: no,
27763: "__type") ? null
27764: : new Let<Object>() {
27765: final TypicalTypes.raw_type<?> t;
27766: final TypicalTypes.raw_type<?> ty;
27767:
27768: {
27769: t = Analyzer
27770: .cast(Primitives.getAnnotation
27771: .apply(
27772: no,
27773: "__type"));
27774: ty = Analyzer
27775: .cast(resolveType
27776: .apply(t));
27777: Primitives.annotate
27778: .apply(
27779: no,
27780: "__type",
27781: ty);
27782: }
27783:
27784: public Object apply() {
27785: return Analyzer
27786: .cast(null);
27787: }
27788: }.apply());
27789: }
27790: }.apply());
27791:
27792: checkExitScope(arg$4320);
27793: matching_nodes
27794: .remove(matching_nodes.size() - 1);
27795: return Analyzer.cast(retValue$4348);
27796: }
27797: if (TypicalSupport.match$339(arg$4320)) {
27798: final Pair<Node> nl = Analyzer.cast(Primitives
27799: .getChildren(arg$4320, 0, arg$4320
27800: .size()));
27801:
27802: matching_nodes.add(arg$4320);
27803: if ((null != arg$4320 && processScopeNodes
27804: .contains(arg$4320.getName()))) {
27805: processScope(arg$4320, getScope);
27806: }
27807: checkEnterScope(arg$4320);
27808:
27809: final Object retValue$4352 = Analyzer
27810: .cast(new Let<Object>() {
27811: {
27812: TypicalSupport.map$128.apply(
27813: resolveNode, nl);
27814: }
27815:
27816: public Object apply() {
27817: return Analyzer
27818: .cast(null == Primitives.hasAnnotation
27819: .apply(no,
27820: "__type")
27821: || !Primitives.hasAnnotation
27822: .apply(
27823: no,
27824: "__type") ? null
27825: : new Let<Object>() {
27826: final TypicalTypes.raw_type<?> t;
27827: final TypicalTypes.raw_type<?> ty;
27828:
27829: {
27830: t = Analyzer
27831: .cast(Primitives.getAnnotation
27832: .apply(
27833: no,
27834: "__type"));
27835: ty = Analyzer
27836: .cast(resolveType
27837: .apply(t));
27838: Primitives.annotate
27839: .apply(
27840: no,
27841: "__type",
27842: ty);
27843: }
27844:
27845: public Object apply() {
27846: return Analyzer
27847: .cast(null);
27848: }
27849: }.apply());
27850: }
27851: }.apply());
27852:
27853: checkExitScope(arg$4320);
27854: matching_nodes
27855: .remove(matching_nodes.size() - 1);
27856: return Analyzer.cast(retValue$4352);
27857: }
27858: if (TypicalSupport.match$479(arg$4320)) {
27859: final Pair<Node> nl = Analyzer.cast(Primitives
27860: .getChildren(arg$4320, 0, arg$4320
27861: .size()));
27862:
27863: matching_nodes.add(arg$4320);
27864: if ((null != arg$4320 && processScopeNodes
27865: .contains(arg$4320.getName()))) {
27866: processScope(arg$4320, getScope);
27867: }
27868: checkEnterScope(arg$4320);
27869:
27870: final Object retValue$4356 = Analyzer
27871: .cast(new Let<Object>() {
27872: {
27873: TypicalSupport.map$128.apply(
27874: resolveNode, nl);
27875: }
27876:
27877: public Object apply() {
27878: return Analyzer
27879: .cast(null == Primitives.hasAnnotation
27880: .apply(no,
27881: "__type")
27882: || !Primitives.hasAnnotation
27883: .apply(
27884: no,
27885: "__type") ? null
27886: : new Let<Object>() {
27887: final TypicalTypes.raw_type<?> t;
27888: final TypicalTypes.raw_type<?> ty;
27889:
27890: {
27891: t = Analyzer
27892: .cast(Primitives.getAnnotation
27893: .apply(
27894: no,
27895: "__type"));
27896: ty = Analyzer
27897: .cast(resolveType
27898: .apply(t));
27899: Primitives.annotate
27900: .apply(
27901: no,
27902: "__type",
27903: ty);
27904: }
27905:
27906: public Object apply() {
27907: return Analyzer
27908: .cast(null);
27909: }
27910: }.apply());
27911: }
27912: }.apply());
27913:
27914: checkExitScope(arg$4320);
27915: matching_nodes
27916: .remove(matching_nodes.size() - 1);
27917: return Analyzer.cast(retValue$4356);
27918: }
27919: if (TypicalSupport.match$679(arg$4320)) {
27920: final Pair<Node> nl = Analyzer.cast(Primitives
27921: .getChildren(arg$4320, 0, arg$4320
27922: .size()));
27923:
27924: matching_nodes.add(arg$4320);
27925: if ((null != arg$4320 && processScopeNodes
27926: .contains(arg$4320.getName()))) {
27927: processScope(arg$4320, getScope);
27928: }
27929: checkEnterScope(arg$4320);
27930:
27931: final Object retValue$4360 = Analyzer
27932: .cast(new Let<Object>() {
27933: {
27934: TypicalSupport.map$128.apply(
27935: resolveNode, nl);
27936: }
27937:
27938: public Object apply() {
27939: return Analyzer
27940: .cast(null == Primitives.hasAnnotation
27941: .apply(no,
27942: "__type")
27943: || !Primitives.hasAnnotation
27944: .apply(
27945: no,
27946: "__type") ? null
27947: : new Let<Object>() {
27948: final TypicalTypes.raw_type<?> t;
27949: final TypicalTypes.raw_type<?> ty;
27950:
27951: {
27952: t = Analyzer
27953: .cast(Primitives.getAnnotation
27954: .apply(
27955: no,
27956: "__type"));
27957: ty = Analyzer
27958: .cast(resolveType
27959: .apply(t));
27960: Primitives.annotate
27961: .apply(
27962: no,
27963: "__type",
27964: ty);
27965: }
27966:
27967: public Object apply() {
27968: return Analyzer
27969: .cast(null);
27970: }
27971: }.apply());
27972: }
27973: }.apply());
27974:
27975: checkExitScope(arg$4320);
27976: matching_nodes
27977: .remove(matching_nodes.size() - 1);
27978: return Analyzer.cast(retValue$4360);
27979: }
27980: if (TypicalSupport.match$3405(arg$4320)) {
27981: final Pair<Node> nl = Analyzer.cast(Primitives
27982: .getChildren(arg$4320, 0, arg$4320
27983: .size()));
27984:
27985: matching_nodes.add(arg$4320);
27986: if ((null != arg$4320 && processScopeNodes
27987: .contains(arg$4320.getName()))) {
27988: processScope(arg$4320, getScope);
27989: }
27990: checkEnterScope(arg$4320);
27991:
27992: final Object retValue$4364 = Analyzer
27993: .cast(new Let<Object>() {
27994: {
27995: TypicalSupport.map$128.apply(
27996: resolveNode, nl);
27997: }
27998:
27999: public Object apply() {
28000: return Analyzer
28001: .cast(null == Primitives.hasAnnotation
28002: .apply(no,
28003: "__type")
28004: || !Primitives.hasAnnotation
28005: .apply(
28006: no,
28007: "__type") ? null
28008: : new Let<Object>() {
28009: final TypicalTypes.raw_type<?> t;
28010: final TypicalTypes.raw_type<?> ty;
28011:
28012: {
28013: t = Analyzer
28014: .cast(Primitives.getAnnotation
28015: .apply(
28016: no,
28017: "__type"));
28018: ty = Analyzer
28019: .cast(resolveType
28020: .apply(t));
28021: Primitives.annotate
28022: .apply(
28023: no,
28024: "__type",
28025: ty);
28026: }
28027:
28028: public Object apply() {
28029: return Analyzer
28030: .cast(null);
28031: }
28032: }.apply());
28033: }
28034: }.apply());
28035:
28036: checkExitScope(arg$4320);
28037: matching_nodes
28038: .remove(matching_nodes.size() - 1);
28039: return Analyzer.cast(retValue$4364);
28040: }
28041: if (TypicalSupport.match$3413(arg$4320)) {
28042: final Pair<Node> nl = Analyzer.cast(Primitives
28043: .getChildren(arg$4320, 0, arg$4320
28044: .size()));
28045:
28046: matching_nodes.add(arg$4320);
28047: if ((null != arg$4320 && processScopeNodes
28048: .contains(arg$4320.getName()))) {
28049: processScope(arg$4320, getScope);
28050: }
28051: checkEnterScope(arg$4320);
28052:
28053: final Object retValue$4368 = Analyzer
28054: .cast(new Let<Object>() {
28055: {
28056: TypicalSupport.map$128.apply(
28057: resolveNode, nl);
28058: }
28059:
28060: public Object apply() {
28061: return Analyzer
28062: .cast(null == Primitives.hasAnnotation
28063: .apply(no,
28064: "__type")
28065: || !Primitives.hasAnnotation
28066: .apply(
28067: no,
28068: "__type") ? null
28069: : new Let<Object>() {
28070: final TypicalTypes.raw_type<?> t;
28071: final TypicalTypes.raw_type<?> ty;
28072:
28073: {
28074: t = Analyzer
28075: .cast(Primitives.getAnnotation
28076: .apply(
28077: no,
28078: "__type"));
28079: ty = Analyzer
28080: .cast(resolveType
28081: .apply(t));
28082: Primitives.annotate
28083: .apply(
28084: no,
28085: "__type",
28086: ty);
28087: }
28088:
28089: public Object apply() {
28090: return Analyzer
28091: .cast(null);
28092: }
28093: }.apply());
28094: }
28095: }.apply());
28096:
28097: checkExitScope(arg$4320);
28098: matching_nodes
28099: .remove(matching_nodes.size() - 1);
28100: return Analyzer.cast(retValue$4368);
28101: }
28102: if (TypicalSupport.match$2400(arg$4320)) {
28103: final Pair<Node> nl = Analyzer.cast(Primitives
28104: .getChildren(arg$4320, 0, arg$4320
28105: .size()));
28106:
28107: matching_nodes.add(arg$4320);
28108: if ((null != arg$4320 && processScopeNodes
28109: .contains(arg$4320.getName()))) {
28110: processScope(arg$4320, getScope);
28111: }
28112: checkEnterScope(arg$4320);
28113:
28114: final Object retValue$4372 = Analyzer
28115: .cast(new Let<Object>() {
28116: {
28117: TypicalSupport.map$128.apply(
28118: resolveNode, nl);
28119: }
28120:
28121: public Object apply() {
28122: return Analyzer
28123: .cast(null == Primitives.hasAnnotation
28124: .apply(no,
28125: "__type")
28126: || !Primitives.hasAnnotation
28127: .apply(
28128: no,
28129: "__type") ? null
28130: : new Let<Object>() {
28131: final TypicalTypes.raw_type<?> t;
28132: final TypicalTypes.raw_type<?> ty;
28133:
28134: {
28135: t = Analyzer
28136: .cast(Primitives.getAnnotation
28137: .apply(
28138: no,
28139: "__type"));
28140: ty = Analyzer
28141: .cast(resolveType
28142: .apply(t));
28143: Primitives.annotate
28144: .apply(
28145: no,
28146: "__type",
28147: ty);
28148: }
28149:
28150: public Object apply() {
28151: return Analyzer
28152: .cast(null);
28153: }
28154: }.apply());
28155: }
28156: }.apply());
28157:
28158: checkExitScope(arg$4320);
28159: matching_nodes
28160: .remove(matching_nodes.size() - 1);
28161: return Analyzer.cast(retValue$4372);
28162: }
28163: if (TypicalSupport.match$9(arg$4320)) {
28164: final Pair<Node> nl = Analyzer.cast(Primitives
28165: .getChildren(arg$4320, 1, arg$4320
28166: .size()));
28167:
28168: matching_nodes.add(arg$4320);
28169: if ((null != arg$4320 && processScopeNodes
28170: .contains(arg$4320.getName()))) {
28171: processScope(arg$4320, getScope);
28172: }
28173: checkEnterScope(arg$4320);
28174:
28175: final Object retValue$4376 = Analyzer
28176: .cast(new Let<Object>() {
28177: {
28178: TypicalSupport.map$128.apply(
28179: resolveNode, nl);
28180: }
28181:
28182: public Object apply() {
28183: return Analyzer
28184: .cast(null == Primitives.hasAnnotation
28185: .apply(no,
28186: "__type")
28187: || !Primitives.hasAnnotation
28188: .apply(
28189: no,
28190: "__type") ? null
28191: : new Let<Object>() {
28192: final TypicalTypes.raw_type<?> t;
28193: final TypicalTypes.raw_type<?> ty;
28194:
28195: {
28196: t = Analyzer
28197: .cast(Primitives.getAnnotation
28198: .apply(
28199: no,
28200: "__type"));
28201: ty = Analyzer
28202: .cast(resolveType
28203: .apply(t));
28204: Primitives.annotate
28205: .apply(
28206: no,
28207: "__type",
28208: ty);
28209: }
28210:
28211: public Object apply() {
28212: return Analyzer
28213: .cast(null);
28214: }
28215: }.apply());
28216: }
28217: }.apply());
28218:
28219: checkExitScope(arg$4320);
28220: matching_nodes
28221: .remove(matching_nodes.size() - 1);
28222: return Analyzer.cast(retValue$4376);
28223: }
28224: if (TypicalSupport.match$2509(arg$4320)) {
28225: final Pair<Node> nl = Analyzer.cast(Primitives
28226: .getChildren(arg$4320, 0, arg$4320
28227: .size()));
28228:
28229: matching_nodes.add(arg$4320);
28230: if ((null != arg$4320 && processScopeNodes
28231: .contains(arg$4320.getName()))) {
28232: processScope(arg$4320, getScope);
28233: }
28234: checkEnterScope(arg$4320);
28235:
28236: final Object retValue$4380 = Analyzer
28237: .cast(new Let<Object>() {
28238: {
28239: TypicalSupport.map$128.apply(
28240: resolveNode, nl);
28241: }
28242:
28243: public Object apply() {
28244: return Analyzer
28245: .cast(null == Primitives.hasAnnotation
28246: .apply(no,
28247: "__type")
28248: || !Primitives.hasAnnotation
28249: .apply(
28250: no,
28251: "__type") ? null
28252: : new Let<Object>() {
28253: final TypicalTypes.raw_type<?> t;
28254: final TypicalTypes.raw_type<?> ty;
28255:
28256: {
28257: t = Analyzer
28258: .cast(Primitives.getAnnotation
28259: .apply(
28260: no,
28261: "__type"));
28262: ty = Analyzer
28263: .cast(resolveType
28264: .apply(t));
28265: Primitives.annotate
28266: .apply(
28267: no,
28268: "__type",
28269: ty);
28270: }
28271:
28272: public Object apply() {
28273: return Analyzer
28274: .cast(null);
28275: }
28276: }.apply());
28277: }
28278: }.apply());
28279:
28280: checkExitScope(arg$4320);
28281: matching_nodes
28282: .remove(matching_nodes.size() - 1);
28283: return Analyzer.cast(retValue$4380);
28284: }
28285: if (TypicalSupport.match$2809(arg$4320)) {
28286: final Pair<Node> nl = Analyzer.cast(Primitives
28287: .getChildren(arg$4320, 0, arg$4320
28288: .size()));
28289:
28290: matching_nodes.add(arg$4320);
28291: if ((null != arg$4320 && processScopeNodes
28292: .contains(arg$4320.getName()))) {
28293: processScope(arg$4320, getScope);
28294: }
28295: checkEnterScope(arg$4320);
28296:
28297: final Object retValue$4384 = Analyzer
28298: .cast(new Let<Object>() {
28299: {
28300: TypicalSupport.map$128.apply(
28301: resolveNode, nl);
28302: }
28303:
28304: public Object apply() {
28305: return Analyzer
28306: .cast(null == Primitives.hasAnnotation
28307: .apply(no,
28308: "__type")
28309: || !Primitives.hasAnnotation
28310: .apply(
28311: no,
28312: "__type") ? null
28313: : new Let<Object>() {
28314: final TypicalTypes.raw_type<?> t;
28315: final TypicalTypes.raw_type<?> ty;
28316:
28317: {
28318: t = Analyzer
28319: .cast(Primitives.getAnnotation
28320: .apply(
28321: no,
28322: "__type"));
28323: ty = Analyzer
28324: .cast(resolveType
28325: .apply(t));
28326: Primitives.annotate
28327: .apply(
28328: no,
28329: "__type",
28330: ty);
28331: }
28332:
28333: public Object apply() {
28334: return Analyzer
28335: .cast(null);
28336: }
28337: }.apply());
28338: }
28339: }.apply());
28340:
28341: checkExitScope(arg$4320);
28342: matching_nodes
28343: .remove(matching_nodes.size() - 1);
28344: return Analyzer.cast(retValue$4384);
28345: }
28346: if (TypicalSupport.match$2868(arg$4320)) {
28347: final Pair<Node> nl = Analyzer.cast(Primitives
28348: .getChildren(arg$4320, 0, arg$4320
28349: .size()));
28350:
28351: matching_nodes.add(arg$4320);
28352: if ((null != arg$4320 && processScopeNodes
28353: .contains(arg$4320.getName()))) {
28354: processScope(arg$4320, getScope);
28355: }
28356: checkEnterScope(arg$4320);
28357:
28358: final Object retValue$4388 = Analyzer
28359: .cast(new Let<Object>() {
28360: {
28361: TypicalSupport.map$128.apply(
28362: resolveNode, nl);
28363: }
28364:
28365: public Object apply() {
28366: return Analyzer
28367: .cast(null == Primitives.hasAnnotation
28368: .apply(no,
28369: "__type")
28370: || !Primitives.hasAnnotation
28371: .apply(
28372: no,
28373: "__type") ? null
28374: : new Let<Object>() {
28375: final TypicalTypes.raw_type<?> t;
28376: final TypicalTypes.raw_type<?> ty;
28377:
28378: {
28379: t = Analyzer
28380: .cast(Primitives.getAnnotation
28381: .apply(
28382: no,
28383: "__type"));
28384: ty = Analyzer
28385: .cast(resolveType
28386: .apply(t));
28387: Primitives.annotate
28388: .apply(
28389: no,
28390: "__type",
28391: ty);
28392: }
28393:
28394: public Object apply() {
28395: return Analyzer
28396: .cast(null);
28397: }
28398: }.apply());
28399: }
28400: }.apply());
28401:
28402: checkExitScope(arg$4320);
28403: matching_nodes
28404: .remove(matching_nodes.size() - 1);
28405: return Analyzer.cast(retValue$4388);
28406: }
28407: if (TypicalSupport.match$3397(arg$4320)) {
28408: final Pair<Node> nl = Analyzer.cast(Primitives
28409: .getChildren(arg$4320, 0, arg$4320
28410: .size()));
28411:
28412: matching_nodes.add(arg$4320);
28413: if ((null != arg$4320 && processScopeNodes
28414: .contains(arg$4320.getName()))) {
28415: processScope(arg$4320, getScope);
28416: }
28417: checkEnterScope(arg$4320);
28418:
28419: final Object retValue$4392 = Analyzer
28420: .cast(new Let<Object>() {
28421: {
28422: TypicalSupport.map$128.apply(
28423: resolveNode, nl);
28424: }
28425:
28426: public Object apply() {
28427: return Analyzer
28428: .cast(null == Primitives.hasAnnotation
28429: .apply(no,
28430: "__type")
28431: || !Primitives.hasAnnotation
28432: .apply(
28433: no,
28434: "__type") ? null
28435: : new Let<Object>() {
28436: final TypicalTypes.raw_type<?> t;
28437: final TypicalTypes.raw_type<?> ty;
28438:
28439: {
28440: t = Analyzer
28441: .cast(Primitives.getAnnotation
28442: .apply(
28443: no,
28444: "__type"));
28445: ty = Analyzer
28446: .cast(resolveType
28447: .apply(t));
28448: Primitives.annotate
28449: .apply(
28450: no,
28451: "__type",
28452: ty);
28453: }
28454:
28455: public Object apply() {
28456: return Analyzer
28457: .cast(null);
28458: }
28459: }.apply());
28460: }
28461: }.apply());
28462:
28463: checkExitScope(arg$4320);
28464: matching_nodes
28465: .remove(matching_nodes.size() - 1);
28466: return Analyzer.cast(retValue$4392);
28467: }
28468: if (TypicalSupport.match$192(arg$4320)) {
28469: final Pair<Node> nl = Analyzer.cast(Primitives
28470: .getChildren(arg$4320, 0, arg$4320
28471: .size()));
28472:
28473: matching_nodes.add(arg$4320);
28474: if ((null != arg$4320 && processScopeNodes
28475: .contains(arg$4320.getName()))) {
28476: processScope(arg$4320, getScope);
28477: }
28478: checkEnterScope(arg$4320);
28479:
28480: final Object retValue$4396 = Analyzer
28481: .cast(new Let<Object>() {
28482: {
28483: TypicalSupport.map$128.apply(
28484: resolveNode, nl);
28485: }
28486:
28487: public Object apply() {
28488: return Analyzer
28489: .cast(null == Primitives.hasAnnotation
28490: .apply(no,
28491: "__type")
28492: || !Primitives.hasAnnotation
28493: .apply(
28494: no,
28495: "__type") ? null
28496: : new Let<Object>() {
28497: final TypicalTypes.raw_type<?> t;
28498: final TypicalTypes.raw_type<?> ty;
28499:
28500: {
28501: t = Analyzer
28502: .cast(Primitives.getAnnotation
28503: .apply(
28504: no,
28505: "__type"));
28506: ty = Analyzer
28507: .cast(resolveType
28508: .apply(t));
28509: Primitives.annotate
28510: .apply(
28511: no,
28512: "__type",
28513: ty);
28514: }
28515:
28516: public Object apply() {
28517: return Analyzer
28518: .cast(null);
28519: }
28520: }.apply());
28521: }
28522: }.apply());
28523:
28524: checkExitScope(arg$4320);
28525: matching_nodes
28526: .remove(matching_nodes.size() - 1);
28527: return Analyzer.cast(retValue$4396);
28528: }
28529: if (TypicalSupport.match$183(arg$4320)) {
28530: final Pair<Node> nl = Analyzer.cast(Primitives
28531: .getChildren(arg$4320, 0, arg$4320
28532: .size()));
28533:
28534: matching_nodes.add(arg$4320);
28535: if ((null != arg$4320 && processScopeNodes
28536: .contains(arg$4320.getName()))) {
28537: processScope(arg$4320, getScope);
28538: }
28539: checkEnterScope(arg$4320);
28540:
28541: final Object retValue$4400 = Analyzer
28542: .cast(new Let<Object>() {
28543: {
28544: TypicalSupport.map$128.apply(
28545: resolveNode, nl);
28546: }
28547:
28548: public Object apply() {
28549: return Analyzer
28550: .cast(null == Primitives.hasAnnotation
28551: .apply(no,
28552: "__type")
28553: || !Primitives.hasAnnotation
28554: .apply(
28555: no,
28556: "__type") ? null
28557: : new Let<Object>() {
28558: final TypicalTypes.raw_type<?> t;
28559: final TypicalTypes.raw_type<?> ty;
28560:
28561: {
28562: t = Analyzer
28563: .cast(Primitives.getAnnotation
28564: .apply(
28565: no,
28566: "__type"));
28567: ty = Analyzer
28568: .cast(resolveType
28569: .apply(t));
28570: Primitives.annotate
28571: .apply(
28572: no,
28573: "__type",
28574: ty);
28575: }
28576:
28577: public Object apply() {
28578: return Analyzer
28579: .cast(null);
28580: }
28581: }.apply());
28582: }
28583: }.apply());
28584:
28585: checkExitScope(arg$4320);
28586: matching_nodes
28587: .remove(matching_nodes.size() - 1);
28588: return Analyzer.cast(retValue$4400);
28589: }
28590: if (TypicalSupport.match$269(arg$4320)) {
28591: final Pair<Node> nl = Analyzer.cast(Primitives
28592: .getChildren(arg$4320, 0, arg$4320
28593: .size()));
28594:
28595: matching_nodes.add(arg$4320);
28596: if ((null != arg$4320 && processScopeNodes
28597: .contains(arg$4320.getName()))) {
28598: processScope(arg$4320, getScope);
28599: }
28600: checkEnterScope(arg$4320);
28601:
28602: final Object retValue$4404 = Analyzer
28603: .cast(new Let<Object>() {
28604: {
28605: TypicalSupport.map$128.apply(
28606: resolveNode, nl);
28607: }
28608:
28609: public Object apply() {
28610: return Analyzer
28611: .cast(null == Primitives.hasAnnotation
28612: .apply(no,
28613: "__type")
28614: || !Primitives.hasAnnotation
28615: .apply(
28616: no,
28617: "__type") ? null
28618: : new Let<Object>() {
28619: final TypicalTypes.raw_type<?> t;
28620: final TypicalTypes.raw_type<?> ty;
28621:
28622: {
28623: t = Analyzer
28624: .cast(Primitives.getAnnotation
28625: .apply(
28626: no,
28627: "__type"));
28628: ty = Analyzer
28629: .cast(resolveType
28630: .apply(t));
28631: Primitives.annotate
28632: .apply(
28633: no,
28634: "__type",
28635: ty);
28636: }
28637:
28638: public Object apply() {
28639: return Analyzer
28640: .cast(null);
28641: }
28642: }.apply());
28643: }
28644: }.apply());
28645:
28646: checkExitScope(arg$4320);
28647: matching_nodes
28648: .remove(matching_nodes.size() - 1);
28649: return Analyzer.cast(retValue$4404);
28650: }
28651: if (TypicalSupport.match$3401(arg$4320)) {
28652: final Pair<Node> nl = Analyzer.cast(Primitives
28653: .getChildren(arg$4320, 0, arg$4320
28654: .size()));
28655:
28656: matching_nodes.add(arg$4320);
28657: if ((null != arg$4320 && processScopeNodes
28658: .contains(arg$4320.getName()))) {
28659: processScope(arg$4320, getScope);
28660: }
28661: checkEnterScope(arg$4320);
28662:
28663: final Object retValue$4408 = Analyzer
28664: .cast(new Let<Object>() {
28665: {
28666: TypicalSupport.map$128.apply(
28667: resolveNode, nl);
28668: }
28669:
28670: public Object apply() {
28671: return Analyzer
28672: .cast(null == Primitives.hasAnnotation
28673: .apply(no,
28674: "__type")
28675: || !Primitives.hasAnnotation
28676: .apply(
28677: no,
28678: "__type") ? null
28679: : new Let<Object>() {
28680: final TypicalTypes.raw_type<?> t;
28681: final TypicalTypes.raw_type<?> ty;
28682:
28683: {
28684: t = Analyzer
28685: .cast(Primitives.getAnnotation
28686: .apply(
28687: no,
28688: "__type"));
28689: ty = Analyzer
28690: .cast(resolveType
28691: .apply(t));
28692: Primitives.annotate
28693: .apply(
28694: no,
28695: "__type",
28696: ty);
28697: }
28698:
28699: public Object apply() {
28700: return Analyzer
28701: .cast(null);
28702: }
28703: }.apply());
28704: }
28705: }.apply());
28706:
28707: checkExitScope(arg$4320);
28708: matching_nodes
28709: .remove(matching_nodes.size() - 1);
28710: return Analyzer.cast(retValue$4408);
28711: }
28712: if (TypicalSupport.match$5(arg$4320)) {
28713: final Pair<Node> nl = Analyzer.cast(Primitives
28714: .getChildren(arg$4320, 1, arg$4320
28715: .size()));
28716:
28717: matching_nodes.add(arg$4320);
28718: if ((null != arg$4320 && processScopeNodes
28719: .contains(arg$4320.getName()))) {
28720: processScope(arg$4320, getScope);
28721: }
28722: checkEnterScope(arg$4320);
28723:
28724: final Object retValue$4412 = Analyzer
28725: .cast(new Let<Object>() {
28726: {
28727: TypicalSupport.map$128.apply(
28728: resolveNode, nl);
28729: }
28730:
28731: public Object apply() {
28732: return Analyzer
28733: .cast(null == Primitives.hasAnnotation
28734: .apply(no,
28735: "__type")
28736: || !Primitives.hasAnnotation
28737: .apply(
28738: no,
28739: "__type") ? null
28740: : new Let<Object>() {
28741: final TypicalTypes.raw_type<?> t;
28742: final TypicalTypes.raw_type<?> ty;
28743:
28744: {
28745: t = Analyzer
28746: .cast(Primitives.getAnnotation
28747: .apply(
28748: no,
28749: "__type"));
28750: ty = Analyzer
28751: .cast(resolveType
28752: .apply(t));
28753: Primitives.annotate
28754: .apply(
28755: no,
28756: "__type",
28757: ty);
28758: }
28759:
28760: public Object apply() {
28761: return Analyzer
28762: .cast(null);
28763: }
28764: }.apply());
28765: }
28766: }.apply());
28767:
28768: checkExitScope(arg$4320);
28769: matching_nodes
28770: .remove(matching_nodes.size() - 1);
28771: return Analyzer.cast(retValue$4412);
28772: }
28773: if (TypicalSupport.match$216(arg$4320)) {
28774: final Node n = (arg$4320.size() > 0 ? arg$4320
28775: .getGeneric(0) : null);
28776:
28777: matching_nodes.add(arg$4320);
28778: if ((null != arg$4320 && processScopeNodes
28779: .contains(arg$4320.getName()))) {
28780: processScope(arg$4320, getScope);
28781: }
28782: checkEnterScope(arg$4320);
28783:
28784: final Object retValue$4416 = Analyzer
28785: .cast(new Let<Object>() {
28786: {
28787: resolveNode.apply(n);
28788: }
28789:
28790: public Object apply() {
28791: return Analyzer
28792: .cast(null == Primitives.hasAnnotation
28793: .apply(no,
28794: "__type")
28795: || !Primitives.hasAnnotation
28796: .apply(
28797: no,
28798: "__type") ? null
28799: : new Let<Object>() {
28800: final TypicalTypes.raw_type<?> t;
28801: final TypicalTypes.raw_type<?> ty;
28802:
28803: {
28804: t = Analyzer
28805: .cast(Primitives.getAnnotation
28806: .apply(
28807: no,
28808: "__type"));
28809: ty = Analyzer
28810: .cast(resolveType
28811: .apply(t));
28812: Primitives.annotate
28813: .apply(
28814: no,
28815: "__type",
28816: ty);
28817: }
28818:
28819: public Object apply() {
28820: return Analyzer
28821: .cast(null);
28822: }
28823: }.apply());
28824: }
28825: }.apply());
28826:
28827: checkExitScope(arg$4320);
28828: matching_nodes
28829: .remove(matching_nodes.size() - 1);
28830: return Analyzer.cast(retValue$4416);
28831: }
28832: if (TypicalSupport.match$33(arg$4320)) {
28833: final Node n = (arg$4320.size() > 1 ? arg$4320
28834: .getGeneric(1) : null);
28835:
28836: matching_nodes.add(arg$4320);
28837: if ((null != arg$4320 && processScopeNodes
28838: .contains(arg$4320.getName()))) {
28839: processScope(arg$4320, getScope);
28840: }
28841: checkEnterScope(arg$4320);
28842:
28843: final Object retValue$4420 = Analyzer
28844: .cast(new Let<Object>() {
28845: {
28846: resolveNode.apply(n);
28847: }
28848:
28849: public Object apply() {
28850: return Analyzer
28851: .cast(null == Primitives.hasAnnotation
28852: .apply(no,
28853: "__type")
28854: || !Primitives.hasAnnotation
28855: .apply(
28856: no,
28857: "__type") ? null
28858: : new Let<Object>() {
28859: final TypicalTypes.raw_type<?> t;
28860: final TypicalTypes.raw_type<?> ty;
28861:
28862: {
28863: t = Analyzer
28864: .cast(Primitives.getAnnotation
28865: .apply(
28866: no,
28867: "__type"));
28868: ty = Analyzer
28869: .cast(resolveType
28870: .apply(t));
28871: Primitives.annotate
28872: .apply(
28873: no,
28874: "__type",
28875: ty);
28876: }
28877:
28878: public Object apply() {
28879: return Analyzer
28880: .cast(null);
28881: }
28882: }.apply());
28883: }
28884: }.apply());
28885:
28886: checkExitScope(arg$4320);
28887: matching_nodes
28888: .remove(matching_nodes.size() - 1);
28889: return Analyzer.cast(retValue$4420);
28890: }
28891: if (TypicalSupport.match$2910(arg$4320)) {
28892: final Node n = (arg$4320.size() > 0 ? arg$4320
28893: .getGeneric(0) : null);
28894:
28895: matching_nodes.add(arg$4320);
28896: if ((null != arg$4320 && processScopeNodes
28897: .contains(arg$4320.getName()))) {
28898: processScope(arg$4320, getScope);
28899: }
28900: checkEnterScope(arg$4320);
28901:
28902: final Object retValue$4424 = Analyzer
28903: .cast(new Let<Object>() {
28904: {
28905: resolveNode.apply(n);
28906: }
28907:
28908: public Object apply() {
28909: return Analyzer
28910: .cast(null == Primitives.hasAnnotation
28911: .apply(no,
28912: "__type")
28913: || !Primitives.hasAnnotation
28914: .apply(
28915: no,
28916: "__type") ? null
28917: : new Let<Object>() {
28918: final TypicalTypes.raw_type<?> t;
28919: final TypicalTypes.raw_type<?> ty;
28920:
28921: {
28922: t = Analyzer
28923: .cast(Primitives.getAnnotation
28924: .apply(
28925: no,
28926: "__type"));
28927: ty = Analyzer
28928: .cast(resolveType
28929: .apply(t));
28930: Primitives.annotate
28931: .apply(
28932: no,
28933: "__type",
28934: ty);
28935: }
28936:
28937: public Object apply() {
28938: return Analyzer
28939: .cast(null);
28940: }
28941: }.apply());
28942: }
28943: }.apply());
28944:
28945: checkExitScope(arg$4320);
28946: matching_nodes
28947: .remove(matching_nodes.size() - 1);
28948: return Analyzer.cast(retValue$4424);
28949: }
28950: if (TypicalSupport.match$37(arg$4320)) {
28951: final Node n = (arg$4320.size() > 1 ? arg$4320
28952: .getGeneric(1) : null);
28953:
28954: matching_nodes.add(arg$4320);
28955: if ((null != arg$4320 && processScopeNodes
28956: .contains(arg$4320.getName()))) {
28957: processScope(arg$4320, getScope);
28958: }
28959: checkEnterScope(arg$4320);
28960:
28961: final Object retValue$4428 = Analyzer
28962: .cast(new Let<Object>() {
28963: {
28964: resolveNode.apply(n);
28965: }
28966:
28967: public Object apply() {
28968: return Analyzer
28969: .cast(null == Primitives.hasAnnotation
28970: .apply(no,
28971: "__type")
28972: || !Primitives.hasAnnotation
28973: .apply(
28974: no,
28975: "__type") ? null
28976: : new Let<Object>() {
28977: final TypicalTypes.raw_type<?> t;
28978: final TypicalTypes.raw_type<?> ty;
28979:
28980: {
28981: t = Analyzer
28982: .cast(Primitives.getAnnotation
28983: .apply(
28984: no,
28985: "__type"));
28986: ty = Analyzer
28987: .cast(resolveType
28988: .apply(t));
28989: Primitives.annotate
28990: .apply(
28991: no,
28992: "__type",
28993: ty);
28994: }
28995:
28996: public Object apply() {
28997: return Analyzer
28998: .cast(null);
28999: }
29000: }.apply());
29001: }
29002: }.apply());
29003:
29004: checkExitScope(arg$4320);
29005: matching_nodes
29006: .remove(matching_nodes.size() - 1);
29007: return Analyzer.cast(retValue$4428);
29008: }
29009: if (TypicalSupport.match$77(arg$4320)) {
29010: final Node n = (arg$4320.size() > 2 ? arg$4320
29011: .getGeneric(2) : null);
29012:
29013: matching_nodes.add(arg$4320);
29014: if ((null != arg$4320 && processScopeNodes
29015: .contains(arg$4320.getName()))) {
29016: processScope(arg$4320, getScope);
29017: }
29018: checkEnterScope(arg$4320);
29019:
29020: final Object retValue$4432 = Analyzer
29021: .cast(new Let<Object>() {
29022: {
29023: resolveNode.apply(n);
29024: }
29025:
29026: public Object apply() {
29027: return Analyzer
29028: .cast(null == Primitives.hasAnnotation
29029: .apply(no,
29030: "__type")
29031: || !Primitives.hasAnnotation
29032: .apply(
29033: no,
29034: "__type") ? null
29035: : new Let<Object>() {
29036: final TypicalTypes.raw_type<?> t;
29037: final TypicalTypes.raw_type<?> ty;
29038:
29039: {
29040: t = Analyzer
29041: .cast(Primitives.getAnnotation
29042: .apply(
29043: no,
29044: "__type"));
29045: ty = Analyzer
29046: .cast(resolveType
29047: .apply(t));
29048: Primitives.annotate
29049: .apply(
29050: no,
29051: "__type",
29052: ty);
29053: }
29054:
29055: public Object apply() {
29056: return Analyzer
29057: .cast(null);
29058: }
29059: }.apply());
29060: }
29061: }.apply());
29062:
29063: checkExitScope(arg$4320);
29064: matching_nodes
29065: .remove(matching_nodes.size() - 1);
29066: return Analyzer.cast(retValue$4432);
29067: }
29068: if (TypicalSupport.match$69(arg$4320)) {
29069: final Node n = (arg$4320.size() > 1 ? arg$4320
29070: .getGeneric(1) : null);
29071:
29072: matching_nodes.add(arg$4320);
29073: if ((null != arg$4320 && processScopeNodes
29074: .contains(arg$4320.getName()))) {
29075: processScope(arg$4320, getScope);
29076: }
29077: checkEnterScope(arg$4320);
29078:
29079: final Object retValue$4436 = Analyzer
29080: .cast(new Let<Object>() {
29081: {
29082: resolveNode.apply(n);
29083: }
29084:
29085: public Object apply() {
29086: return Analyzer
29087: .cast(null == Primitives.hasAnnotation
29088: .apply(no,
29089: "__type")
29090: || !Primitives.hasAnnotation
29091: .apply(
29092: no,
29093: "__type") ? null
29094: : new Let<Object>() {
29095: final TypicalTypes.raw_type<?> t;
29096: final TypicalTypes.raw_type<?> ty;
29097:
29098: {
29099: t = Analyzer
29100: .cast(Primitives.getAnnotation
29101: .apply(
29102: no,
29103: "__type"));
29104: ty = Analyzer
29105: .cast(resolveType
29106: .apply(t));
29107: Primitives.annotate
29108: .apply(
29109: no,
29110: "__type",
29111: ty);
29112: }
29113:
29114: public Object apply() {
29115: return Analyzer
29116: .cast(null);
29117: }
29118: }.apply());
29119: }
29120: }.apply());
29121:
29122: checkExitScope(arg$4320);
29123: matching_nodes
29124: .remove(matching_nodes.size() - 1);
29125: return Analyzer.cast(retValue$4436);
29126: }
29127: if (TypicalSupport.match$57(arg$4320)) {
29128: final Node n = (arg$4320.size() > 0 ? arg$4320
29129: .getGeneric(0) : null);
29130:
29131: matching_nodes.add(arg$4320);
29132: if ((null != arg$4320 && processScopeNodes
29133: .contains(arg$4320.getName()))) {
29134: processScope(arg$4320, getScope);
29135: }
29136: checkEnterScope(arg$4320);
29137:
29138: final Object retValue$4440 = Analyzer
29139: .cast(new Let<Object>() {
29140: {
29141: resolveNode.apply(n);
29142: }
29143:
29144: public Object apply() {
29145: return Analyzer
29146: .cast(null == Primitives.hasAnnotation
29147: .apply(no,
29148: "__type")
29149: || !Primitives.hasAnnotation
29150: .apply(
29151: no,
29152: "__type") ? null
29153: : new Let<Object>() {
29154: final TypicalTypes.raw_type<?> t;
29155: final TypicalTypes.raw_type<?> ty;
29156:
29157: {
29158: t = Analyzer
29159: .cast(Primitives.getAnnotation
29160: .apply(
29161: no,
29162: "__type"));
29163: ty = Analyzer
29164: .cast(resolveType
29165: .apply(t));
29166: Primitives.annotate
29167: .apply(
29168: no,
29169: "__type",
29170: ty);
29171: }
29172:
29173: public Object apply() {
29174: return Analyzer
29175: .cast(null);
29176: }
29177: }.apply());
29178: }
29179: }.apply());
29180:
29181: checkExitScope(arg$4320);
29182: matching_nodes
29183: .remove(matching_nodes.size() - 1);
29184: return Analyzer.cast(retValue$4440);
29185: }
29186: if (TypicalSupport.match$2273(arg$4320)) {
29187: final Node n = (arg$4320.size() > 0 ? arg$4320
29188: .getGeneric(0) : null);
29189:
29190: matching_nodes.add(arg$4320);
29191: if ((null != arg$4320 && processScopeNodes
29192: .contains(arg$4320.getName()))) {
29193: processScope(arg$4320, getScope);
29194: }
29195: checkEnterScope(arg$4320);
29196:
29197: final Object retValue$4444 = Analyzer
29198: .cast(new Let<Object>() {
29199: {
29200: resolveNode.apply(n);
29201: }
29202:
29203: public Object apply() {
29204: return Analyzer
29205: .cast(null == Primitives.hasAnnotation
29206: .apply(no,
29207: "__type")
29208: || !Primitives.hasAnnotation
29209: .apply(
29210: no,
29211: "__type") ? null
29212: : new Let<Object>() {
29213: final TypicalTypes.raw_type<?> t;
29214: final TypicalTypes.raw_type<?> ty;
29215:
29216: {
29217: t = Analyzer
29218: .cast(Primitives.getAnnotation
29219: .apply(
29220: no,
29221: "__type"));
29222: ty = Analyzer
29223: .cast(resolveType
29224: .apply(t));
29225: Primitives.annotate
29226: .apply(
29227: no,
29228: "__type",
29229: ty);
29230: }
29231:
29232: public Object apply() {
29233: return Analyzer
29234: .cast(null);
29235: }
29236: }.apply());
29237: }
29238: }.apply());
29239:
29240: checkExitScope(arg$4320);
29241: matching_nodes
29242: .remove(matching_nodes.size() - 1);
29243: return Analyzer.cast(retValue$4444);
29244: }
29245: if (TypicalSupport.match$49(arg$4320)) {
29246: final Node n = (arg$4320.size() > 0 ? arg$4320
29247: .getGeneric(0) : null);
29248:
29249: matching_nodes.add(arg$4320);
29250: if ((null != arg$4320 && processScopeNodes
29251: .contains(arg$4320.getName()))) {
29252: processScope(arg$4320, getScope);
29253: }
29254: checkEnterScope(arg$4320);
29255:
29256: final Object retValue$4448 = Analyzer
29257: .cast(new Let<Object>() {
29258: {
29259: resolveNode.apply(n);
29260: }
29261:
29262: public Object apply() {
29263: return Analyzer
29264: .cast(null == Primitives.hasAnnotation
29265: .apply(no,
29266: "__type")
29267: || !Primitives.hasAnnotation
29268: .apply(
29269: no,
29270: "__type") ? null
29271: : new Let<Object>() {
29272: final TypicalTypes.raw_type<?> t;
29273: final TypicalTypes.raw_type<?> ty;
29274:
29275: {
29276: t = Analyzer
29277: .cast(Primitives.getAnnotation
29278: .apply(
29279: no,
29280: "__type"));
29281: ty = Analyzer
29282: .cast(resolveType
29283: .apply(t));
29284: Primitives.annotate
29285: .apply(
29286: no,
29287: "__type",
29288: ty);
29289: }
29290:
29291: public Object apply() {
29292: return Analyzer
29293: .cast(null);
29294: }
29295: }.apply());
29296: }
29297: }.apply());
29298:
29299: checkExitScope(arg$4320);
29300: matching_nodes
29301: .remove(matching_nodes.size() - 1);
29302: return Analyzer.cast(retValue$4448);
29303: }
29304: if (TypicalSupport.match$2379(arg$4320)) {
29305: final Node n = (arg$4320.size() > 0 ? arg$4320
29306: .getGeneric(0) : null);
29307:
29308: matching_nodes.add(arg$4320);
29309: if ((null != arg$4320 && processScopeNodes
29310: .contains(arg$4320.getName()))) {
29311: processScope(arg$4320, getScope);
29312: }
29313: checkEnterScope(arg$4320);
29314:
29315: final Object retValue$4452 = Analyzer
29316: .cast(new Let<Object>() {
29317: {
29318: resolveNode.apply(n);
29319: }
29320:
29321: public Object apply() {
29322: return Analyzer
29323: .cast(null == Primitives.hasAnnotation
29324: .apply(no,
29325: "__type")
29326: || !Primitives.hasAnnotation
29327: .apply(
29328: no,
29329: "__type") ? null
29330: : new Let<Object>() {
29331: final TypicalTypes.raw_type<?> t;
29332: final TypicalTypes.raw_type<?> ty;
29333:
29334: {
29335: t = Analyzer
29336: .cast(Primitives.getAnnotation
29337: .apply(
29338: no,
29339: "__type"));
29340: ty = Analyzer
29341: .cast(resolveType
29342: .apply(t));
29343: Primitives.annotate
29344: .apply(
29345: no,
29346: "__type",
29347: ty);
29348: }
29349:
29350: public Object apply() {
29351: return Analyzer
29352: .cast(null);
29353: }
29354: }.apply());
29355: }
29356: }.apply());
29357:
29358: checkExitScope(arg$4320);
29359: matching_nodes
29360: .remove(matching_nodes.size() - 1);
29361: return Analyzer.cast(retValue$4452);
29362: }
29363: if (TypicalSupport.match$2390(arg$4320)) {
29364: final Node n = (arg$4320.size() > 0 ? arg$4320
29365: .getGeneric(0) : null);
29366:
29367: matching_nodes.add(arg$4320);
29368: if ((null != arg$4320 && processScopeNodes
29369: .contains(arg$4320.getName()))) {
29370: processScope(arg$4320, getScope);
29371: }
29372: checkEnterScope(arg$4320);
29373:
29374: final Object retValue$4456 = Analyzer
29375: .cast(new Let<Object>() {
29376: {
29377: resolveNode.apply(n);
29378: }
29379:
29380: public Object apply() {
29381: return Analyzer
29382: .cast(null == Primitives.hasAnnotation
29383: .apply(no,
29384: "__type")
29385: || !Primitives.hasAnnotation
29386: .apply(
29387: no,
29388: "__type") ? null
29389: : new Let<Object>() {
29390: final TypicalTypes.raw_type<?> t;
29391: final TypicalTypes.raw_type<?> ty;
29392:
29393: {
29394: t = Analyzer
29395: .cast(Primitives.getAnnotation
29396: .apply(
29397: no,
29398: "__type"));
29399: ty = Analyzer
29400: .cast(resolveType
29401: .apply(t));
29402: Primitives.annotate
29403: .apply(
29404: no,
29405: "__type",
29406: ty);
29407: }
29408:
29409: public Object apply() {
29410: return Analyzer
29411: .cast(null);
29412: }
29413: }.apply());
29414: }
29415: }.apply());
29416:
29417: checkExitScope(arg$4320);
29418: matching_nodes
29419: .remove(matching_nodes.size() - 1);
29420: return Analyzer.cast(retValue$4456);
29421: }
29422: if (TypicalSupport.match$45(arg$4320)) {
29423: final Node n = (arg$4320.size() > 1 ? arg$4320
29424: .getGeneric(1) : null);
29425:
29426: matching_nodes.add(arg$4320);
29427: if ((null != arg$4320 && processScopeNodes
29428: .contains(arg$4320.getName()))) {
29429: processScope(arg$4320, getScope);
29430: }
29431: checkEnterScope(arg$4320);
29432:
29433: final Object retValue$4460 = Analyzer
29434: .cast(new Let<Object>() {
29435: {
29436: resolveNode.apply(n);
29437: }
29438:
29439: public Object apply() {
29440: return Analyzer
29441: .cast(null == Primitives.hasAnnotation
29442: .apply(no,
29443: "__type")
29444: || !Primitives.hasAnnotation
29445: .apply(
29446: no,
29447: "__type") ? null
29448: : new Let<Object>() {
29449: final TypicalTypes.raw_type<?> t;
29450: final TypicalTypes.raw_type<?> ty;
29451:
29452: {
29453: t = Analyzer
29454: .cast(Primitives.getAnnotation
29455: .apply(
29456: no,
29457: "__type"));
29458: ty = Analyzer
29459: .cast(resolveType
29460: .apply(t));
29461: Primitives.annotate
29462: .apply(
29463: no,
29464: "__type",
29465: ty);
29466: }
29467:
29468: public Object apply() {
29469: return Analyzer
29470: .cast(null);
29471: }
29472: }.apply());
29473: }
29474: }.apply());
29475:
29476: checkExitScope(arg$4320);
29477: matching_nodes
29478: .remove(matching_nodes.size() - 1);
29479: return Analyzer.cast(retValue$4460);
29480: }
29481: if (TypicalSupport.match$25(arg$4320)) {
29482: final Node n = (arg$4320.size() > 0 ? arg$4320
29483: .getGeneric(0) : null);
29484:
29485: matching_nodes.add(arg$4320);
29486: if ((null != arg$4320 && processScopeNodes
29487: .contains(arg$4320.getName()))) {
29488: processScope(arg$4320, getScope);
29489: }
29490: checkEnterScope(arg$4320);
29491:
29492: final Object retValue$4464 = Analyzer
29493: .cast(new Let<Object>() {
29494: {
29495: resolveNode.apply(n);
29496: }
29497:
29498: public Object apply() {
29499: return Analyzer
29500: .cast(null == Primitives.hasAnnotation
29501: .apply(no,
29502: "__type")
29503: || !Primitives.hasAnnotation
29504: .apply(
29505: no,
29506: "__type") ? null
29507: : new Let<Object>() {
29508: final TypicalTypes.raw_type<?> t;
29509: final TypicalTypes.raw_type<?> ty;
29510:
29511: {
29512: t = Analyzer
29513: .cast(Primitives.getAnnotation
29514: .apply(
29515: no,
29516: "__type"));
29517: ty = Analyzer
29518: .cast(resolveType
29519: .apply(t));
29520: Primitives.annotate
29521: .apply(
29522: no,
29523: "__type",
29524: ty);
29525: }
29526:
29527: public Object apply() {
29528: return Analyzer
29529: .cast(null);
29530: }
29531: }.apply());
29532: }
29533: }.apply());
29534:
29535: checkExitScope(arg$4320);
29536: matching_nodes
29537: .remove(matching_nodes.size() - 1);
29538: return Analyzer.cast(retValue$4464);
29539: }
29540: if (TypicalSupport.match$13(arg$4320)) {
29541: final Node n = (arg$4320.size() > 1 ? arg$4320
29542: .getGeneric(1) : null);
29543:
29544: matching_nodes.add(arg$4320);
29545: if ((null != arg$4320 && processScopeNodes
29546: .contains(arg$4320.getName()))) {
29547: processScope(arg$4320, getScope);
29548: }
29549: checkEnterScope(arg$4320);
29550:
29551: final Object retValue$4468 = Analyzer
29552: .cast(new Let<Object>() {
29553: {
29554: resolveNode.apply(n);
29555: }
29556:
29557: public Object apply() {
29558: return Analyzer
29559: .cast(null == Primitives.hasAnnotation
29560: .apply(no,
29561: "__type")
29562: || !Primitives.hasAnnotation
29563: .apply(
29564: no,
29565: "__type") ? null
29566: : new Let<Object>() {
29567: final TypicalTypes.raw_type<?> t;
29568: final TypicalTypes.raw_type<?> ty;
29569:
29570: {
29571: t = Analyzer
29572: .cast(Primitives.getAnnotation
29573: .apply(
29574: no,
29575: "__type"));
29576: ty = Analyzer
29577: .cast(resolveType
29578: .apply(t));
29579: Primitives.annotate
29580: .apply(
29581: no,
29582: "__type",
29583: ty);
29584: }
29585:
29586: public Object apply() {
29587: return Analyzer
29588: .cast(null);
29589: }
29590: }.apply());
29591: }
29592: }.apply());
29593:
29594: checkExitScope(arg$4320);
29595: matching_nodes
29596: .remove(matching_nodes.size() - 1);
29597: return Analyzer.cast(retValue$4468);
29598: }
29599: if (TypicalSupport.match$41(arg$4320)) {
29600: final Node n = (arg$4320.size() > 1 ? arg$4320
29601: .getGeneric(1) : null);
29602:
29603: matching_nodes.add(arg$4320);
29604: if ((null != arg$4320 && processScopeNodes
29605: .contains(arg$4320.getName()))) {
29606: processScope(arg$4320, getScope);
29607: }
29608: checkEnterScope(arg$4320);
29609:
29610: final Object retValue$4472 = Analyzer
29611: .cast(new Let<Object>() {
29612: {
29613: resolveNode.apply(n);
29614: }
29615:
29616: public Object apply() {
29617: return Analyzer
29618: .cast(null == Primitives.hasAnnotation
29619: .apply(no,
29620: "__type")
29621: || !Primitives.hasAnnotation
29622: .apply(
29623: no,
29624: "__type") ? null
29625: : new Let<Object>() {
29626: final TypicalTypes.raw_type<?> t;
29627: final TypicalTypes.raw_type<?> ty;
29628:
29629: {
29630: t = Analyzer
29631: .cast(Primitives.getAnnotation
29632: .apply(
29633: no,
29634: "__type"));
29635: ty = Analyzer
29636: .cast(resolveType
29637: .apply(t));
29638: Primitives.annotate
29639: .apply(
29640: no,
29641: "__type",
29642: ty);
29643: }
29644:
29645: public Object apply() {
29646: return Analyzer
29647: .cast(null);
29648: }
29649: }.apply());
29650: }
29651: }.apply());
29652:
29653: checkExitScope(arg$4320);
29654: matching_nodes
29655: .remove(matching_nodes.size() - 1);
29656: return Analyzer.cast(retValue$4472);
29657: }
29658: if (TypicalSupport.match$2860(arg$4320)) {
29659: final Node n = (arg$4320.size() > 0 ? arg$4320
29660: .getGeneric(0) : null);
29661:
29662: matching_nodes.add(arg$4320);
29663: if ((null != arg$4320 && processScopeNodes
29664: .contains(arg$4320.getName()))) {
29665: processScope(arg$4320, getScope);
29666: }
29667: checkEnterScope(arg$4320);
29668:
29669: final Object retValue$4476 = Analyzer
29670: .cast(new Let<Object>() {
29671: {
29672: resolveNode.apply(n);
29673: }
29674:
29675: public Object apply() {
29676: return Analyzer
29677: .cast(null == Primitives.hasAnnotation
29678: .apply(no,
29679: "__type")
29680: || !Primitives.hasAnnotation
29681: .apply(
29682: no,
29683: "__type") ? null
29684: : new Let<Object>() {
29685: final TypicalTypes.raw_type<?> t;
29686: final TypicalTypes.raw_type<?> ty;
29687:
29688: {
29689: t = Analyzer
29690: .cast(Primitives.getAnnotation
29691: .apply(
29692: no,
29693: "__type"));
29694: ty = Analyzer
29695: .cast(resolveType
29696: .apply(t));
29697: Primitives.annotate
29698: .apply(
29699: no,
29700: "__type",
29701: ty);
29702: }
29703:
29704: public Object apply() {
29705: return Analyzer
29706: .cast(null);
29707: }
29708: }.apply());
29709: }
29710: }.apply());
29711:
29712: checkExitScope(arg$4320);
29713: matching_nodes
29714: .remove(matching_nodes.size() - 1);
29715: return Analyzer.cast(retValue$4476);
29716: }
29717: if (TypicalSupport.match$21(arg$4320)) {
29718: final Node n1 = (arg$4320.size() > 0 ? arg$4320
29719: .getGeneric(0) : null);
29720: final Node n2 = (arg$4320.size() > 2 ? arg$4320
29721: .getGeneric(2) : null);
29722:
29723: matching_nodes.add(arg$4320);
29724: if ((null != arg$4320 && processScopeNodes
29725: .contains(arg$4320.getName()))) {
29726: processScope(arg$4320, getScope);
29727: }
29728: checkEnterScope(arg$4320);
29729:
29730: final Object retValue$4480 = Analyzer
29731: .cast(new Let<Object>() {
29732: {
29733: resolveNode.apply(n1);
29734: resolveNode.apply(n2);
29735: }
29736:
29737: public Object apply() {
29738: return Analyzer
29739: .cast(null == Primitives.hasAnnotation
29740: .apply(no,
29741: "__type")
29742: || !Primitives.hasAnnotation
29743: .apply(
29744: no,
29745: "__type") ? null
29746: : new Let<Object>() {
29747: final TypicalTypes.raw_type<?> t;
29748: final TypicalTypes.raw_type<?> ty;
29749:
29750: {
29751: t = Analyzer
29752: .cast(Primitives.getAnnotation
29753: .apply(
29754: no,
29755: "__type"));
29756: ty = Analyzer
29757: .cast(resolveType
29758: .apply(t));
29759: Primitives.annotate
29760: .apply(
29761: no,
29762: "__type",
29763: ty);
29764: }
29765:
29766: public Object apply() {
29767: return Analyzer
29768: .cast(null);
29769: }
29770: }.apply());
29771: }
29772: }.apply());
29773:
29774: checkExitScope(arg$4320);
29775: matching_nodes
29776: .remove(matching_nodes.size() - 1);
29777: return Analyzer.cast(retValue$4480);
29778: }
29779: if (TypicalSupport.match$73(arg$4320)) {
29780: final Node n1 = (arg$4320.size() > 1 ? arg$4320
29781: .getGeneric(1) : null);
29782: final Node n2 = (arg$4320.size() > 2 ? arg$4320
29783: .getGeneric(2) : null);
29784:
29785: matching_nodes.add(arg$4320);
29786: if ((null != arg$4320 && processScopeNodes
29787: .contains(arg$4320.getName()))) {
29788: processScope(arg$4320, getScope);
29789: }
29790: checkEnterScope(arg$4320);
29791:
29792: final Object retValue$4484 = Analyzer
29793: .cast(new Let<Object>() {
29794: {
29795: resolveNode.apply(n1);
29796: resolveNode.apply(n2);
29797: }
29798:
29799: public Object apply() {
29800: return Analyzer
29801: .cast(null == Primitives.hasAnnotation
29802: .apply(no,
29803: "__type")
29804: || !Primitives.hasAnnotation
29805: .apply(
29806: no,
29807: "__type") ? null
29808: : new Let<Object>() {
29809: final TypicalTypes.raw_type<?> t;
29810: final TypicalTypes.raw_type<?> ty;
29811:
29812: {
29813: t = Analyzer
29814: .cast(Primitives.getAnnotation
29815: .apply(
29816: no,
29817: "__type"));
29818: ty = Analyzer
29819: .cast(resolveType
29820: .apply(t));
29821: Primitives.annotate
29822: .apply(
29823: no,
29824: "__type",
29825: ty);
29826: }
29827:
29828: public Object apply() {
29829: return Analyzer
29830: .cast(null);
29831: }
29832: }.apply());
29833: }
29834: }.apply());
29835:
29836: checkExitScope(arg$4320);
29837: matching_nodes
29838: .remove(matching_nodes.size() - 1);
29839: return Analyzer.cast(retValue$4484);
29840: }
29841: if (TypicalSupport.match$84(arg$4320)) {
29842: final Node n1 = (arg$4320.size() > 0 ? arg$4320
29843: .getGeneric(0) : null);
29844: final Node n2 = (arg$4320.size() > 1 ? arg$4320
29845: .getGeneric(1) : null);
29846:
29847: matching_nodes.add(arg$4320);
29848: if ((null != arg$4320 && processScopeNodes
29849: .contains(arg$4320.getName()))) {
29850: processScope(arg$4320, getScope);
29851: }
29852: checkEnterScope(arg$4320);
29853:
29854: final Object retValue$4488 = Analyzer
29855: .cast(new Let<Object>() {
29856: {
29857: resolveNode.apply(n1);
29858: resolveNode.apply(n2);
29859: }
29860:
29861: public Object apply() {
29862: return Analyzer
29863: .cast(null == Primitives.hasAnnotation
29864: .apply(no,
29865: "__type")
29866: || !Primitives.hasAnnotation
29867: .apply(
29868: no,
29869: "__type") ? null
29870: : new Let<Object>() {
29871: final TypicalTypes.raw_type<?> t;
29872: final TypicalTypes.raw_type<?> ty;
29873:
29874: {
29875: t = Analyzer
29876: .cast(Primitives.getAnnotation
29877: .apply(
29878: no,
29879: "__type"));
29880: ty = Analyzer
29881: .cast(resolveType
29882: .apply(t));
29883: Primitives.annotate
29884: .apply(
29885: no,
29886: "__type",
29887: ty);
29888: }
29889:
29890: public Object apply() {
29891: return Analyzer
29892: .cast(null);
29893: }
29894: }.apply());
29895: }
29896: }.apply());
29897:
29898: checkExitScope(arg$4320);
29899: matching_nodes
29900: .remove(matching_nodes.size() - 1);
29901: return Analyzer.cast(retValue$4488);
29902: }
29903: if (TypicalSupport.match$287(arg$4320)) {
29904: final Node n1 = (arg$4320.size() > 0 ? arg$4320
29905: .getGeneric(0) : null);
29906: final Node n2 = (arg$4320.size() > 1 ? arg$4320
29907: .getGeneric(1) : null);
29908:
29909: matching_nodes.add(arg$4320);
29910: if ((null != arg$4320 && processScopeNodes
29911: .contains(arg$4320.getName()))) {
29912: processScope(arg$4320, getScope);
29913: }
29914: checkEnterScope(arg$4320);
29915:
29916: final Object retValue$4492 = Analyzer
29917: .cast(new Let<Object>() {
29918: {
29919: resolveNode.apply(n1);
29920: resolveNode.apply(n2);
29921: }
29922:
29923: public Object apply() {
29924: return Analyzer
29925: .cast(null == Primitives.hasAnnotation
29926: .apply(no,
29927: "__type")
29928: || !Primitives.hasAnnotation
29929: .apply(
29930: no,
29931: "__type") ? null
29932: : new Let<Object>() {
29933: final TypicalTypes.raw_type<?> t;
29934: final TypicalTypes.raw_type<?> ty;
29935:
29936: {
29937: t = Analyzer
29938: .cast(Primitives.getAnnotation
29939: .apply(
29940: no,
29941: "__type"));
29942: ty = Analyzer
29943: .cast(resolveType
29944: .apply(t));
29945: Primitives.annotate
29946: .apply(
29947: no,
29948: "__type",
29949: ty);
29950: }
29951:
29952: public Object apply() {
29953: return Analyzer
29954: .cast(null);
29955: }
29956: }.apply());
29957: }
29958: }.apply());
29959:
29960: checkExitScope(arg$4320);
29961: matching_nodes
29962: .remove(matching_nodes.size() - 1);
29963: return Analyzer.cast(retValue$4492);
29964: }
29965: if (TypicalSupport.match$306(arg$4320)) {
29966: final Node n1 = (arg$4320.size() > 0 ? arg$4320
29967: .getGeneric(0) : null);
29968: final Node n2 = (arg$4320.size() > 1 ? arg$4320
29969: .getGeneric(1) : null);
29970:
29971: matching_nodes.add(arg$4320);
29972: if ((null != arg$4320 && processScopeNodes
29973: .contains(arg$4320.getName()))) {
29974: processScope(arg$4320, getScope);
29975: }
29976: checkEnterScope(arg$4320);
29977:
29978: final Object retValue$4496 = Analyzer
29979: .cast(new Let<Object>() {
29980: {
29981: resolveNode.apply(n1);
29982: resolveNode.apply(n2);
29983: }
29984:
29985: public Object apply() {
29986: return Analyzer
29987: .cast(null == Primitives.hasAnnotation
29988: .apply(no,
29989: "__type")
29990: || !Primitives.hasAnnotation
29991: .apply(
29992: no,
29993: "__type") ? null
29994: : new Let<Object>() {
29995: final TypicalTypes.raw_type<?> t;
29996: final TypicalTypes.raw_type<?> ty;
29997:
29998: {
29999: t = Analyzer
30000: .cast(Primitives.getAnnotation
30001: .apply(
30002: no,
30003: "__type"));
30004: ty = Analyzer
30005: .cast(resolveType
30006: .apply(t));
30007: Primitives.annotate
30008: .apply(
30009: no,
30010: "__type",
30011: ty);
30012: }
30013:
30014: public Object apply() {
30015: return Analyzer
30016: .cast(null);
30017: }
30018: }.apply());
30019: }
30020: }.apply());
30021:
30022: checkExitScope(arg$4320);
30023: matching_nodes
30024: .remove(matching_nodes.size() - 1);
30025: return Analyzer.cast(retValue$4496);
30026: }
30027: if (TypicalSupport.match$312(arg$4320)) {
30028: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30029: .getGeneric(0) : null);
30030: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30031: .getGeneric(1) : null);
30032:
30033: matching_nodes.add(arg$4320);
30034: if ((null != arg$4320 && processScopeNodes
30035: .contains(arg$4320.getName()))) {
30036: processScope(arg$4320, getScope);
30037: }
30038: checkEnterScope(arg$4320);
30039:
30040: final Object retValue$4500 = Analyzer
30041: .cast(new Let<Object>() {
30042: {
30043: resolveNode.apply(n1);
30044: resolveNode.apply(n2);
30045: }
30046:
30047: public Object apply() {
30048: return Analyzer
30049: .cast(null == Primitives.hasAnnotation
30050: .apply(no,
30051: "__type")
30052: || !Primitives.hasAnnotation
30053: .apply(
30054: no,
30055: "__type") ? null
30056: : new Let<Object>() {
30057: final TypicalTypes.raw_type<?> t;
30058: final TypicalTypes.raw_type<?> ty;
30059:
30060: {
30061: t = Analyzer
30062: .cast(Primitives.getAnnotation
30063: .apply(
30064: no,
30065: "__type"));
30066: ty = Analyzer
30067: .cast(resolveType
30068: .apply(t));
30069: Primitives.annotate
30070: .apply(
30071: no,
30072: "__type",
30073: ty);
30074: }
30075:
30076: public Object apply() {
30077: return Analyzer
30078: .cast(null);
30079: }
30080: }.apply());
30081: }
30082: }.apply());
30083:
30084: checkExitScope(arg$4320);
30085: matching_nodes
30086: .remove(matching_nodes.size() - 1);
30087: return Analyzer.cast(retValue$4500);
30088: }
30089: if (TypicalSupport.match$363(arg$4320)) {
30090: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30091: .getGeneric(0) : null);
30092: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30093: .getGeneric(1) : null);
30094:
30095: matching_nodes.add(arg$4320);
30096: if ((null != arg$4320 && processScopeNodes
30097: .contains(arg$4320.getName()))) {
30098: processScope(arg$4320, getScope);
30099: }
30100: checkEnterScope(arg$4320);
30101:
30102: final Object retValue$4504 = Analyzer
30103: .cast(new Let<Object>() {
30104: {
30105: resolveNode.apply(n1);
30106: resolveNode.apply(n2);
30107: }
30108:
30109: public Object apply() {
30110: return Analyzer
30111: .cast(null == Primitives.hasAnnotation
30112: .apply(no,
30113: "__type")
30114: || !Primitives.hasAnnotation
30115: .apply(
30116: no,
30117: "__type") ? null
30118: : new Let<Object>() {
30119: final TypicalTypes.raw_type<?> t;
30120: final TypicalTypes.raw_type<?> ty;
30121:
30122: {
30123: t = Analyzer
30124: .cast(Primitives.getAnnotation
30125: .apply(
30126: no,
30127: "__type"));
30128: ty = Analyzer
30129: .cast(resolveType
30130: .apply(t));
30131: Primitives.annotate
30132: .apply(
30133: no,
30134: "__type",
30135: ty);
30136: }
30137:
30138: public Object apply() {
30139: return Analyzer
30140: .cast(null);
30141: }
30142: }.apply());
30143: }
30144: }.apply());
30145:
30146: checkExitScope(arg$4320);
30147: matching_nodes
30148: .remove(matching_nodes.size() - 1);
30149: return Analyzer.cast(retValue$4504);
30150: }
30151: if (TypicalSupport.match$483(arg$4320)) {
30152: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30153: .getGeneric(0) : null);
30154: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30155: .getGeneric(1) : null);
30156:
30157: matching_nodes.add(arg$4320);
30158: if ((null != arg$4320 && processScopeNodes
30159: .contains(arg$4320.getName()))) {
30160: processScope(arg$4320, getScope);
30161: }
30162: checkEnterScope(arg$4320);
30163:
30164: final Object retValue$4508 = Analyzer
30165: .cast(new Let<Object>() {
30166: {
30167: resolveNode.apply(n1);
30168: resolveNode.apply(n2);
30169: }
30170:
30171: public Object apply() {
30172: return Analyzer
30173: .cast(null == Primitives.hasAnnotation
30174: .apply(no,
30175: "__type")
30176: || !Primitives.hasAnnotation
30177: .apply(
30178: no,
30179: "__type") ? null
30180: : new Let<Object>() {
30181: final TypicalTypes.raw_type<?> t;
30182: final TypicalTypes.raw_type<?> ty;
30183:
30184: {
30185: t = Analyzer
30186: .cast(Primitives.getAnnotation
30187: .apply(
30188: no,
30189: "__type"));
30190: ty = Analyzer
30191: .cast(resolveType
30192: .apply(t));
30193: Primitives.annotate
30194: .apply(
30195: no,
30196: "__type",
30197: ty);
30198: }
30199:
30200: public Object apply() {
30201: return Analyzer
30202: .cast(null);
30203: }
30204: }.apply());
30205: }
30206: }.apply());
30207:
30208: checkExitScope(arg$4320);
30209: matching_nodes
30210: .remove(matching_nodes.size() - 1);
30211: return Analyzer.cast(retValue$4508);
30212: }
30213: if (TypicalSupport.match$491(arg$4320)) {
30214: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30215: .getGeneric(0) : null);
30216: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30217: .getGeneric(1) : null);
30218:
30219: matching_nodes.add(arg$4320);
30220: if ((null != arg$4320 && processScopeNodes
30221: .contains(arg$4320.getName()))) {
30222: processScope(arg$4320, getScope);
30223: }
30224: checkEnterScope(arg$4320);
30225:
30226: final Object retValue$4512 = Analyzer
30227: .cast(new Let<Object>() {
30228: {
30229: resolveNode.apply(n1);
30230: resolveNode.apply(n2);
30231: }
30232:
30233: public Object apply() {
30234: return Analyzer
30235: .cast(null == Primitives.hasAnnotation
30236: .apply(no,
30237: "__type")
30238: || !Primitives.hasAnnotation
30239: .apply(
30240: no,
30241: "__type") ? null
30242: : new Let<Object>() {
30243: final TypicalTypes.raw_type<?> t;
30244: final TypicalTypes.raw_type<?> ty;
30245:
30246: {
30247: t = Analyzer
30248: .cast(Primitives.getAnnotation
30249: .apply(
30250: no,
30251: "__type"));
30252: ty = Analyzer
30253: .cast(resolveType
30254: .apply(t));
30255: Primitives.annotate
30256: .apply(
30257: no,
30258: "__type",
30259: ty);
30260: }
30261:
30262: public Object apply() {
30263: return Analyzer
30264: .cast(null);
30265: }
30266: }.apply());
30267: }
30268: }.apply());
30269:
30270: checkExitScope(arg$4320);
30271: matching_nodes
30272: .remove(matching_nodes.size() - 1);
30273: return Analyzer.cast(retValue$4512);
30274: }
30275: if (TypicalSupport.match$499(arg$4320)) {
30276: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30277: .getGeneric(0) : null);
30278: final Node n2 = (arg$4320.size() > 2 ? arg$4320
30279: .getGeneric(2) : null);
30280:
30281: matching_nodes.add(arg$4320);
30282: if ((null != arg$4320 && processScopeNodes
30283: .contains(arg$4320.getName()))) {
30284: processScope(arg$4320, getScope);
30285: }
30286: checkEnterScope(arg$4320);
30287:
30288: final Object retValue$4516 = Analyzer
30289: .cast(new Let<Object>() {
30290: {
30291: resolveNode.apply(n1);
30292: resolveNode.apply(n2);
30293: }
30294:
30295: public Object apply() {
30296: return Analyzer
30297: .cast(null == Primitives.hasAnnotation
30298: .apply(no,
30299: "__type")
30300: || !Primitives.hasAnnotation
30301: .apply(
30302: no,
30303: "__type") ? null
30304: : new Let<Object>() {
30305: final TypicalTypes.raw_type<?> t;
30306: final TypicalTypes.raw_type<?> ty;
30307:
30308: {
30309: t = Analyzer
30310: .cast(Primitives.getAnnotation
30311: .apply(
30312: no,
30313: "__type"));
30314: ty = Analyzer
30315: .cast(resolveType
30316: .apply(t));
30317: Primitives.annotate
30318: .apply(
30319: no,
30320: "__type",
30321: ty);
30322: }
30323:
30324: public Object apply() {
30325: return Analyzer
30326: .cast(null);
30327: }
30328: }.apply());
30329: }
30330: }.apply());
30331:
30332: checkExitScope(arg$4320);
30333: matching_nodes
30334: .remove(matching_nodes.size() - 1);
30335: return Analyzer.cast(retValue$4516);
30336: }
30337: if (TypicalSupport.match$505(arg$4320)) {
30338: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30339: .getGeneric(0) : null);
30340: final Node n2 = (arg$4320.size() > 2 ? arg$4320
30341: .getGeneric(2) : null);
30342:
30343: matching_nodes.add(arg$4320);
30344: if ((null != arg$4320 && processScopeNodes
30345: .contains(arg$4320.getName()))) {
30346: processScope(arg$4320, getScope);
30347: }
30348: checkEnterScope(arg$4320);
30349:
30350: final Object retValue$4520 = Analyzer
30351: .cast(new Let<Object>() {
30352: {
30353: resolveNode.apply(n1);
30354: resolveNode.apply(n2);
30355: }
30356:
30357: public Object apply() {
30358: return Analyzer
30359: .cast(null == Primitives.hasAnnotation
30360: .apply(no,
30361: "__type")
30362: || !Primitives.hasAnnotation
30363: .apply(
30364: no,
30365: "__type") ? null
30366: : new Let<Object>() {
30367: final TypicalTypes.raw_type<?> t;
30368: final TypicalTypes.raw_type<?> ty;
30369:
30370: {
30371: t = Analyzer
30372: .cast(Primitives.getAnnotation
30373: .apply(
30374: no,
30375: "__type"));
30376: ty = Analyzer
30377: .cast(resolveType
30378: .apply(t));
30379: Primitives.annotate
30380: .apply(
30381: no,
30382: "__type",
30383: ty);
30384: }
30385:
30386: public Object apply() {
30387: return Analyzer
30388: .cast(null);
30389: }
30390: }.apply());
30391: }
30392: }.apply());
30393:
30394: checkExitScope(arg$4320);
30395: matching_nodes
30396: .remove(matching_nodes.size() - 1);
30397: return Analyzer.cast(retValue$4520);
30398: }
30399: if (TypicalSupport.match$553(arg$4320)) {
30400: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30401: .getGeneric(0) : null);
30402: final Node n2 = (arg$4320.size() > 2 ? arg$4320
30403: .getGeneric(2) : null);
30404:
30405: matching_nodes.add(arg$4320);
30406: if ((null != arg$4320 && processScopeNodes
30407: .contains(arg$4320.getName()))) {
30408: processScope(arg$4320, getScope);
30409: }
30410: checkEnterScope(arg$4320);
30411:
30412: final Object retValue$4524 = Analyzer
30413: .cast(new Let<Object>() {
30414: {
30415: resolveNode.apply(n1);
30416: resolveNode.apply(n2);
30417: }
30418:
30419: public Object apply() {
30420: return Analyzer
30421: .cast(null == Primitives.hasAnnotation
30422: .apply(no,
30423: "__type")
30424: || !Primitives.hasAnnotation
30425: .apply(
30426: no,
30427: "__type") ? null
30428: : new Let<Object>() {
30429: final TypicalTypes.raw_type<?> t;
30430: final TypicalTypes.raw_type<?> ty;
30431:
30432: {
30433: t = Analyzer
30434: .cast(Primitives.getAnnotation
30435: .apply(
30436: no,
30437: "__type"));
30438: ty = Analyzer
30439: .cast(resolveType
30440: .apply(t));
30441: Primitives.annotate
30442: .apply(
30443: no,
30444: "__type",
30445: ty);
30446: }
30447:
30448: public Object apply() {
30449: return Analyzer
30450: .cast(null);
30451: }
30452: }.apply());
30453: }
30454: }.apply());
30455:
30456: checkExitScope(arg$4320);
30457: matching_nodes
30458: .remove(matching_nodes.size() - 1);
30459: return Analyzer.cast(retValue$4524);
30460: }
30461: if (TypicalSupport.match$609(arg$4320)) {
30462: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30463: .getGeneric(0) : null);
30464: final Node n2 = (arg$4320.size() > 2 ? arg$4320
30465: .getGeneric(2) : null);
30466:
30467: matching_nodes.add(arg$4320);
30468: if ((null != arg$4320 && processScopeNodes
30469: .contains(arg$4320.getName()))) {
30470: processScope(arg$4320, getScope);
30471: }
30472: checkEnterScope(arg$4320);
30473:
30474: final Object retValue$4528 = Analyzer
30475: .cast(new Let<Object>() {
30476: {
30477: resolveNode.apply(n1);
30478: resolveNode.apply(n2);
30479: }
30480:
30481: public Object apply() {
30482: return Analyzer
30483: .cast(null == Primitives.hasAnnotation
30484: .apply(no,
30485: "__type")
30486: || !Primitives.hasAnnotation
30487: .apply(
30488: no,
30489: "__type") ? null
30490: : new Let<Object>() {
30491: final TypicalTypes.raw_type<?> t;
30492: final TypicalTypes.raw_type<?> ty;
30493:
30494: {
30495: t = Analyzer
30496: .cast(Primitives.getAnnotation
30497: .apply(
30498: no,
30499: "__type"));
30500: ty = Analyzer
30501: .cast(resolveType
30502: .apply(t));
30503: Primitives.annotate
30504: .apply(
30505: no,
30506: "__type",
30507: ty);
30508: }
30509:
30510: public Object apply() {
30511: return Analyzer
30512: .cast(null);
30513: }
30514: }.apply());
30515: }
30516: }.apply());
30517:
30518: checkExitScope(arg$4320);
30519: matching_nodes
30520: .remove(matching_nodes.size() - 1);
30521: return Analyzer.cast(retValue$4528);
30522: }
30523: if (TypicalSupport.match$673(arg$4320)) {
30524: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30525: .getGeneric(0) : null);
30526: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30527: .getGeneric(1) : null);
30528:
30529: matching_nodes.add(arg$4320);
30530: if ((null != arg$4320 && processScopeNodes
30531: .contains(arg$4320.getName()))) {
30532: processScope(arg$4320, getScope);
30533: }
30534: checkEnterScope(arg$4320);
30535:
30536: final Object retValue$4532 = Analyzer
30537: .cast(new Let<Object>() {
30538: {
30539: resolveNode.apply(n1);
30540: resolveNode.apply(n2);
30541: }
30542:
30543: public Object apply() {
30544: return Analyzer
30545: .cast(null == Primitives.hasAnnotation
30546: .apply(no,
30547: "__type")
30548: || !Primitives.hasAnnotation
30549: .apply(
30550: no,
30551: "__type") ? null
30552: : new Let<Object>() {
30553: final TypicalTypes.raw_type<?> t;
30554: final TypicalTypes.raw_type<?> ty;
30555:
30556: {
30557: t = Analyzer
30558: .cast(Primitives.getAnnotation
30559: .apply(
30560: no,
30561: "__type"));
30562: ty = Analyzer
30563: .cast(resolveType
30564: .apply(t));
30565: Primitives.annotate
30566: .apply(
30567: no,
30568: "__type",
30569: ty);
30570: }
30571:
30572: public Object apply() {
30573: return Analyzer
30574: .cast(null);
30575: }
30576: }.apply());
30577: }
30578: }.apply());
30579:
30580: checkExitScope(arg$4320);
30581: matching_nodes
30582: .remove(matching_nodes.size() - 1);
30583: return Analyzer.cast(retValue$4532);
30584: }
30585: if (TypicalSupport.match$2267(arg$4320)) {
30586: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30587: .getGeneric(0) : null);
30588: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30589: .getGeneric(1) : null);
30590:
30591: matching_nodes.add(arg$4320);
30592: if ((null != arg$4320 && processScopeNodes
30593: .contains(arg$4320.getName()))) {
30594: processScope(arg$4320, getScope);
30595: }
30596: checkEnterScope(arg$4320);
30597:
30598: final Object retValue$4536 = Analyzer
30599: .cast(new Let<Object>() {
30600: {
30601: resolveNode.apply(n1);
30602: resolveNode.apply(n2);
30603: }
30604:
30605: public Object apply() {
30606: return Analyzer
30607: .cast(null == Primitives.hasAnnotation
30608: .apply(no,
30609: "__type")
30610: || !Primitives.hasAnnotation
30611: .apply(
30612: no,
30613: "__type") ? null
30614: : new Let<Object>() {
30615: final TypicalTypes.raw_type<?> t;
30616: final TypicalTypes.raw_type<?> ty;
30617:
30618: {
30619: t = Analyzer
30620: .cast(Primitives.getAnnotation
30621: .apply(
30622: no,
30623: "__type"));
30624: ty = Analyzer
30625: .cast(resolveType
30626: .apply(t));
30627: Primitives.annotate
30628: .apply(
30629: no,
30630: "__type",
30631: ty);
30632: }
30633:
30634: public Object apply() {
30635: return Analyzer
30636: .cast(null);
30637: }
30638: }.apply());
30639: }
30640: }.apply());
30641:
30642: checkExitScope(arg$4320);
30643: matching_nodes
30644: .remove(matching_nodes.size() - 1);
30645: return Analyzer.cast(retValue$4536);
30646: }
30647: if (TypicalSupport.match$83(arg$4320)) {
30648: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30649: .getGeneric(0) : null);
30650: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30651: .getGeneric(1) : null);
30652:
30653: matching_nodes.add(arg$4320);
30654: if ((null != arg$4320 && processScopeNodes
30655: .contains(arg$4320.getName()))) {
30656: processScope(arg$4320, getScope);
30657: }
30658: checkEnterScope(arg$4320);
30659:
30660: final Object retValue$4540 = Analyzer
30661: .cast(new Let<Object>() {
30662: {
30663: resolveNode.apply(n1);
30664: resolveNode.apply(n2);
30665: }
30666:
30667: public Object apply() {
30668: return Analyzer
30669: .cast(null == Primitives.hasAnnotation
30670: .apply(no,
30671: "__type")
30672: || !Primitives.hasAnnotation
30673: .apply(
30674: no,
30675: "__type") ? null
30676: : new Let<Object>() {
30677: final TypicalTypes.raw_type<?> t;
30678: final TypicalTypes.raw_type<?> ty;
30679:
30680: {
30681: t = Analyzer
30682: .cast(Primitives.getAnnotation
30683: .apply(
30684: no,
30685: "__type"));
30686: ty = Analyzer
30687: .cast(resolveType
30688: .apply(t));
30689: Primitives.annotate
30690: .apply(
30691: no,
30692: "__type",
30693: ty);
30694: }
30695:
30696: public Object apply() {
30697: return Analyzer
30698: .cast(null);
30699: }
30700: }.apply());
30701: }
30702: }.apply());
30703:
30704: checkExitScope(arg$4320);
30705: matching_nodes
30706: .remove(matching_nodes.size() - 1);
30707: return Analyzer.cast(retValue$4540);
30708: }
30709: if (TypicalSupport.match$3256(arg$4320)) {
30710: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30711: .getGeneric(0) : null);
30712: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30713: .getGeneric(1) : null);
30714:
30715: matching_nodes.add(arg$4320);
30716: if ((null != arg$4320 && processScopeNodes
30717: .contains(arg$4320.getName()))) {
30718: processScope(arg$4320, getScope);
30719: }
30720: checkEnterScope(arg$4320);
30721:
30722: final Object retValue$4544 = Analyzer
30723: .cast(new Let<Object>() {
30724: {
30725: resolveNode.apply(n1);
30726: resolveNode.apply(n2);
30727: }
30728:
30729: public Object apply() {
30730: return Analyzer
30731: .cast(null == Primitives.hasAnnotation
30732: .apply(no,
30733: "__type")
30734: || !Primitives.hasAnnotation
30735: .apply(
30736: no,
30737: "__type") ? null
30738: : new Let<Object>() {
30739: final TypicalTypes.raw_type<?> t;
30740: final TypicalTypes.raw_type<?> ty;
30741:
30742: {
30743: t = Analyzer
30744: .cast(Primitives.getAnnotation
30745: .apply(
30746: no,
30747: "__type"));
30748: ty = Analyzer
30749: .cast(resolveType
30750: .apply(t));
30751: Primitives.annotate
30752: .apply(
30753: no,
30754: "__type",
30755: ty);
30756: }
30757:
30758: public Object apply() {
30759: return Analyzer
30760: .cast(null);
30761: }
30762: }.apply());
30763: }
30764: }.apply());
30765:
30766: checkExitScope(arg$4320);
30767: matching_nodes
30768: .remove(matching_nodes.size() - 1);
30769: return Analyzer.cast(retValue$4544);
30770: }
30771: if (TypicalSupport.match$255(arg$4320)) {
30772: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30773: .getGeneric(0) : null);
30774: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30775: .getGeneric(1) : null);
30776:
30777: matching_nodes.add(arg$4320);
30778: if ((null != arg$4320 && processScopeNodes
30779: .contains(arg$4320.getName()))) {
30780: processScope(arg$4320, getScope);
30781: }
30782: checkEnterScope(arg$4320);
30783:
30784: final Object retValue$4548 = Analyzer
30785: .cast(new Let<Object>() {
30786: {
30787: resolveNode.apply(n1);
30788: resolveNode.apply(n2);
30789: }
30790:
30791: public Object apply() {
30792: return Analyzer
30793: .cast(null == Primitives.hasAnnotation
30794: .apply(no,
30795: "__type")
30796: || !Primitives.hasAnnotation
30797: .apply(
30798: no,
30799: "__type") ? null
30800: : new Let<Object>() {
30801: final TypicalTypes.raw_type<?> t;
30802: final TypicalTypes.raw_type<?> ty;
30803:
30804: {
30805: t = Analyzer
30806: .cast(Primitives.getAnnotation
30807: .apply(
30808: no,
30809: "__type"));
30810: ty = Analyzer
30811: .cast(resolveType
30812: .apply(t));
30813: Primitives.annotate
30814: .apply(
30815: no,
30816: "__type",
30817: ty);
30818: }
30819:
30820: public Object apply() {
30821: return Analyzer
30822: .cast(null);
30823: }
30824: }.apply());
30825: }
30826: }.apply());
30827:
30828: checkExitScope(arg$4320);
30829: matching_nodes
30830: .remove(matching_nodes.size() - 1);
30831: return Analyzer.cast(retValue$4548);
30832: }
30833: if (TypicalSupport.match$2884(arg$4320)) {
30834: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30835: .getGeneric(0) : null);
30836: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30837: .getGeneric(1) : null);
30838:
30839: matching_nodes.add(arg$4320);
30840: if ((null != arg$4320 && processScopeNodes
30841: .contains(arg$4320.getName()))) {
30842: processScope(arg$4320, getScope);
30843: }
30844: checkEnterScope(arg$4320);
30845:
30846: final Object retValue$4552 = Analyzer
30847: .cast(new Let<Object>() {
30848: {
30849: resolveNode.apply(n1);
30850: resolveNode.apply(n2);
30851: }
30852:
30853: public Object apply() {
30854: return Analyzer
30855: .cast(null == Primitives.hasAnnotation
30856: .apply(no,
30857: "__type")
30858: || !Primitives.hasAnnotation
30859: .apply(
30860: no,
30861: "__type") ? null
30862: : new Let<Object>() {
30863: final TypicalTypes.raw_type<?> t;
30864: final TypicalTypes.raw_type<?> ty;
30865:
30866: {
30867: t = Analyzer
30868: .cast(Primitives.getAnnotation
30869: .apply(
30870: no,
30871: "__type"));
30872: ty = Analyzer
30873: .cast(resolveType
30874: .apply(t));
30875: Primitives.annotate
30876: .apply(
30877: no,
30878: "__type",
30879: ty);
30880: }
30881:
30882: public Object apply() {
30883: return Analyzer
30884: .cast(null);
30885: }
30886: }.apply());
30887: }
30888: }.apply());
30889:
30890: checkExitScope(arg$4320);
30891: matching_nodes
30892: .remove(matching_nodes.size() - 1);
30893: return Analyzer.cast(retValue$4552);
30894: }
30895: if (TypicalSupport.match$2888(arg$4320)) {
30896: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30897: .getGeneric(0) : null);
30898: final Node n2 = (arg$4320.size() > 1 ? arg$4320
30899: .getGeneric(1) : null);
30900:
30901: matching_nodes.add(arg$4320);
30902: if ((null != arg$4320 && processScopeNodes
30903: .contains(arg$4320.getName()))) {
30904: processScope(arg$4320, getScope);
30905: }
30906: checkEnterScope(arg$4320);
30907:
30908: final Object retValue$4556 = Analyzer
30909: .cast(new Let<Object>() {
30910: {
30911: resolveNode.apply(n1);
30912: resolveNode.apply(n2);
30913: }
30914:
30915: public Object apply() {
30916: return Analyzer
30917: .cast(null == Primitives.hasAnnotation
30918: .apply(no,
30919: "__type")
30920: || !Primitives.hasAnnotation
30921: .apply(
30922: no,
30923: "__type") ? null
30924: : new Let<Object>() {
30925: final TypicalTypes.raw_type<?> t;
30926: final TypicalTypes.raw_type<?> ty;
30927:
30928: {
30929: t = Analyzer
30930: .cast(Primitives.getAnnotation
30931: .apply(
30932: no,
30933: "__type"));
30934: ty = Analyzer
30935: .cast(resolveType
30936: .apply(t));
30937: Primitives.annotate
30938: .apply(
30939: no,
30940: "__type",
30941: ty);
30942: }
30943:
30944: public Object apply() {
30945: return Analyzer
30946: .cast(null);
30947: }
30948: }.apply());
30949: }
30950: }.apply());
30951:
30952: checkExitScope(arg$4320);
30953: matching_nodes
30954: .remove(matching_nodes.size() - 1);
30955: return Analyzer.cast(retValue$4556);
30956: }
30957: if (TypicalSupport.match$665(arg$4320)) {
30958: final Node n1 = (arg$4320.size() > 0 ? arg$4320
30959: .getGeneric(0) : null);
30960: final Node n2 = (arg$4320.size() > 2 ? arg$4320
30961: .getGeneric(2) : null);
30962:
30963: matching_nodes.add(arg$4320);
30964: if ((null != arg$4320 && processScopeNodes
30965: .contains(arg$4320.getName()))) {
30966: processScope(arg$4320, getScope);
30967: }
30968: checkEnterScope(arg$4320);
30969:
30970: final Object retValue$4560 = Analyzer
30971: .cast(new Let<Object>() {
30972: {
30973: resolveNode.apply(n1);
30974: resolveNode.apply(n2);
30975: }
30976:
30977: public Object apply() {
30978: return Analyzer
30979: .cast(null == Primitives.hasAnnotation
30980: .apply(no,
30981: "__type")
30982: || !Primitives.hasAnnotation
30983: .apply(
30984: no,
30985: "__type") ? null
30986: : new Let<Object>() {
30987: final TypicalTypes.raw_type<?> t;
30988: final TypicalTypes.raw_type<?> ty;
30989:
30990: {
30991: t = Analyzer
30992: .cast(Primitives.getAnnotation
30993: .apply(
30994: no,
30995: "__type"));
30996: ty = Analyzer
30997: .cast(resolveType
30998: .apply(t));
30999: Primitives.annotate
31000: .apply(
31001: no,
31002: "__type",
31003: ty);
31004: }
31005:
31006: public Object apply() {
31007: return Analyzer
31008: .cast(null);
31009: }
31010: }.apply());
31011: }
31012: }.apply());
31013:
31014: checkExitScope(arg$4320);
31015: matching_nodes
31016: .remove(matching_nodes.size() - 1);
31017: return Analyzer.cast(retValue$4560);
31018: }
31019: if (TypicalSupport.match$2795(arg$4320)) {
31020: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31021: .getGeneric(0) : null);
31022: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31023: .getGeneric(1) : null);
31024:
31025: matching_nodes.add(arg$4320);
31026: if ((null != arg$4320 && processScopeNodes
31027: .contains(arg$4320.getName()))) {
31028: processScope(arg$4320, getScope);
31029: }
31030: checkEnterScope(arg$4320);
31031:
31032: final Object retValue$4564 = Analyzer
31033: .cast(new Let<Object>() {
31034: {
31035: resolveNode.apply(n1);
31036: resolveNode.apply(n2);
31037: }
31038:
31039: public Object apply() {
31040: return Analyzer
31041: .cast(null == Primitives.hasAnnotation
31042: .apply(no,
31043: "__type")
31044: || !Primitives.hasAnnotation
31045: .apply(
31046: no,
31047: "__type") ? null
31048: : new Let<Object>() {
31049: final TypicalTypes.raw_type<?> t;
31050: final TypicalTypes.raw_type<?> ty;
31051:
31052: {
31053: t = Analyzer
31054: .cast(Primitives.getAnnotation
31055: .apply(
31056: no,
31057: "__type"));
31058: ty = Analyzer
31059: .cast(resolveType
31060: .apply(t));
31061: Primitives.annotate
31062: .apply(
31063: no,
31064: "__type",
31065: ty);
31066: }
31067:
31068: public Object apply() {
31069: return Analyzer
31070: .cast(null);
31071: }
31072: }.apply());
31073: }
31074: }.apply());
31075:
31076: checkExitScope(arg$4320);
31077: matching_nodes
31078: .remove(matching_nodes.size() - 1);
31079: return Analyzer.cast(retValue$4564);
31080: }
31081: if (TypicalSupport.match$2415(arg$4320)) {
31082: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31083: .getGeneric(0) : null);
31084: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31085: .getGeneric(1) : null);
31086:
31087: matching_nodes.add(arg$4320);
31088: if ((null != arg$4320 && processScopeNodes
31089: .contains(arg$4320.getName()))) {
31090: processScope(arg$4320, getScope);
31091: }
31092: checkEnterScope(arg$4320);
31093:
31094: final Object retValue$4568 = Analyzer
31095: .cast(new Let<Object>() {
31096: {
31097: resolveNode.apply(n1);
31098: resolveNode.apply(n2);
31099: }
31100:
31101: public Object apply() {
31102: return Analyzer
31103: .cast(null == Primitives.hasAnnotation
31104: .apply(no,
31105: "__type")
31106: || !Primitives.hasAnnotation
31107: .apply(
31108: no,
31109: "__type") ? null
31110: : new Let<Object>() {
31111: final TypicalTypes.raw_type<?> t;
31112: final TypicalTypes.raw_type<?> ty;
31113:
31114: {
31115: t = Analyzer
31116: .cast(Primitives.getAnnotation
31117: .apply(
31118: no,
31119: "__type"));
31120: ty = Analyzer
31121: .cast(resolveType
31122: .apply(t));
31123: Primitives.annotate
31124: .apply(
31125: no,
31126: "__type",
31127: ty);
31128: }
31129:
31130: public Object apply() {
31131: return Analyzer
31132: .cast(null);
31133: }
31134: }.apply());
31135: }
31136: }.apply());
31137:
31138: checkExitScope(arg$4320);
31139: matching_nodes
31140: .remove(matching_nodes.size() - 1);
31141: return Analyzer.cast(retValue$4568);
31142: }
31143: if (TypicalSupport.match$2427(arg$4320)) {
31144: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31145: .getGeneric(0) : null);
31146: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31147: .getGeneric(1) : null);
31148:
31149: matching_nodes.add(arg$4320);
31150: if ((null != arg$4320 && processScopeNodes
31151: .contains(arg$4320.getName()))) {
31152: processScope(arg$4320, getScope);
31153: }
31154: checkEnterScope(arg$4320);
31155:
31156: final Object retValue$4572 = Analyzer
31157: .cast(new Let<Object>() {
31158: {
31159: resolveNode.apply(n1);
31160: resolveNode.apply(n2);
31161: }
31162:
31163: public Object apply() {
31164: return Analyzer
31165: .cast(null == Primitives.hasAnnotation
31166: .apply(no,
31167: "__type")
31168: || !Primitives.hasAnnotation
31169: .apply(
31170: no,
31171: "__type") ? null
31172: : new Let<Object>() {
31173: final TypicalTypes.raw_type<?> t;
31174: final TypicalTypes.raw_type<?> ty;
31175:
31176: {
31177: t = Analyzer
31178: .cast(Primitives.getAnnotation
31179: .apply(
31180: no,
31181: "__type"));
31182: ty = Analyzer
31183: .cast(resolveType
31184: .apply(t));
31185: Primitives.annotate
31186: .apply(
31187: no,
31188: "__type",
31189: ty);
31190: }
31191:
31192: public Object apply() {
31193: return Analyzer
31194: .cast(null);
31195: }
31196: }.apply());
31197: }
31198: }.apply());
31199:
31200: checkExitScope(arg$4320);
31201: matching_nodes
31202: .remove(matching_nodes.size() - 1);
31203: return Analyzer.cast(retValue$4572);
31204: }
31205: if (TypicalSupport.match$153(arg$4320)) {
31206: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31207: .getGeneric(0) : null);
31208: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31209: .getGeneric(1) : null);
31210: final Pair<Node> nl = Analyzer.cast(Primitives
31211: .getChildren(arg$4320, 2, arg$4320
31212: .size()));
31213:
31214: matching_nodes.add(arg$4320);
31215: if ((null != arg$4320 && processScopeNodes
31216: .contains(arg$4320.getName()))) {
31217: processScope(arg$4320, getScope);
31218: }
31219: checkEnterScope(arg$4320);
31220:
31221: final Object retValue$4576 = Analyzer
31222: .cast(new Let<Object>() {
31223: {
31224: resolveNode.apply(n1);
31225: resolveNode.apply(n2);
31226: TypicalSupport.map$128.apply(
31227: resolveNode, nl);
31228: }
31229:
31230: public Object apply() {
31231: return Analyzer
31232: .cast(null == Primitives.hasAnnotation
31233: .apply(no,
31234: "__type")
31235: || !Primitives.hasAnnotation
31236: .apply(
31237: no,
31238: "__type") ? null
31239: : new Let<Object>() {
31240: final TypicalTypes.raw_type<?> t;
31241: final TypicalTypes.raw_type<?> ty;
31242:
31243: {
31244: t = Analyzer
31245: .cast(Primitives.getAnnotation
31246: .apply(
31247: no,
31248: "__type"));
31249: ty = Analyzer
31250: .cast(resolveType
31251: .apply(t));
31252: Primitives.annotate
31253: .apply(
31254: no,
31255: "__type",
31256: ty);
31257: }
31258:
31259: public Object apply() {
31260: return Analyzer
31261: .cast(null);
31262: }
31263: }.apply());
31264: }
31265: }.apply());
31266:
31267: checkExitScope(arg$4320);
31268: matching_nodes
31269: .remove(matching_nodes.size() - 1);
31270: return Analyzer.cast(retValue$4576);
31271: }
31272: if (TypicalSupport.match$4577(arg$4320)) {
31273: matching_nodes.add(arg$4320);
31274: if ((null != arg$4320 && processScopeNodes
31275: .contains(arg$4320.getName()))) {
31276: processScope(arg$4320, getScope);
31277: }
31278: checkEnterScope(arg$4320);
31279:
31280: final Object retValue$4580 = Analyzer
31281: .cast(null == Primitives.hasAnnotation
31282: .apply(no, "__type")
31283: || !Primitives.hasAnnotation
31284: .apply(no, "__type") ? null
31285: : new Let<Object>() {
31286: final TypicalTypes.raw_type<?> t;
31287: final TypicalTypes.raw_type<?> ty;
31288:
31289: {
31290: t = Analyzer
31291: .cast(Primitives.getAnnotation
31292: .apply(
31293: no,
31294: "__type"));
31295: ty = Analyzer
31296: .cast(resolveType
31297: .apply(t));
31298: Primitives.annotate
31299: .apply(
31300: no,
31301: "__type",
31302: ty);
31303: }
31304:
31305: public Object apply() {
31306: return Analyzer
31307: .cast(null);
31308: }
31309: }.apply());
31310:
31311: checkExitScope(arg$4320);
31312: matching_nodes
31313: .remove(matching_nodes.size() - 1);
31314: return Analyzer.cast(retValue$4580);
31315: }
31316: if (TypicalSupport.match$4581(arg$4320)) {
31317: matching_nodes.add(arg$4320);
31318: if ((null != arg$4320 && processScopeNodes
31319: .contains(arg$4320.getName()))) {
31320: processScope(arg$4320, getScope);
31321: }
31322: checkEnterScope(arg$4320);
31323:
31324: final Object retValue$4584 = Analyzer
31325: .cast(null == Primitives.hasAnnotation
31326: .apply(no, "__type")
31327: || !Primitives.hasAnnotation
31328: .apply(no, "__type") ? null
31329: : new Let<Object>() {
31330: final TypicalTypes.raw_type<?> t;
31331: final TypicalTypes.raw_type<?> ty;
31332:
31333: {
31334: t = Analyzer
31335: .cast(Primitives.getAnnotation
31336: .apply(
31337: no,
31338: "__type"));
31339: ty = Analyzer
31340: .cast(resolveType
31341: .apply(t));
31342: Primitives.annotate
31343: .apply(
31344: no,
31345: "__type",
31346: ty);
31347: }
31348:
31349: public Object apply() {
31350: return Analyzer
31351: .cast(null);
31352: }
31353: }.apply());
31354:
31355: checkExitScope(arg$4320);
31356: matching_nodes
31357: .remove(matching_nodes.size() - 1);
31358: return Analyzer.cast(retValue$4584);
31359: }
31360: if (TypicalSupport.match$4585(arg$4320)) {
31361: matching_nodes.add(arg$4320);
31362: if ((null != arg$4320 && processScopeNodes
31363: .contains(arg$4320.getName()))) {
31364: processScope(arg$4320, getScope);
31365: }
31366: checkEnterScope(arg$4320);
31367:
31368: final Object retValue$4588 = Analyzer
31369: .cast(null == Primitives.hasAnnotation
31370: .apply(no, "__type")
31371: || !Primitives.hasAnnotation
31372: .apply(no, "__type") ? null
31373: : new Let<Object>() {
31374: final TypicalTypes.raw_type<?> t;
31375: final TypicalTypes.raw_type<?> ty;
31376:
31377: {
31378: t = Analyzer
31379: .cast(Primitives.getAnnotation
31380: .apply(
31381: no,
31382: "__type"));
31383: ty = Analyzer
31384: .cast(resolveType
31385: .apply(t));
31386: Primitives.annotate
31387: .apply(
31388: no,
31389: "__type",
31390: ty);
31391: }
31392:
31393: public Object apply() {
31394: return Analyzer
31395: .cast(null);
31396: }
31397: }.apply());
31398:
31399: checkExitScope(arg$4320);
31400: matching_nodes
31401: .remove(matching_nodes.size() - 1);
31402: return Analyzer.cast(retValue$4588);
31403: }
31404: if (TypicalSupport.match$4589(arg$4320)) {
31405: matching_nodes.add(arg$4320);
31406: if ((null != arg$4320 && processScopeNodes
31407: .contains(arg$4320.getName()))) {
31408: processScope(arg$4320, getScope);
31409: }
31410: checkEnterScope(arg$4320);
31411:
31412: final Object retValue$4592 = Analyzer
31413: .cast(null == Primitives.hasAnnotation
31414: .apply(no, "__type")
31415: || !Primitives.hasAnnotation
31416: .apply(no, "__type") ? null
31417: : new Let<Object>() {
31418: final TypicalTypes.raw_type<?> t;
31419: final TypicalTypes.raw_type<?> ty;
31420:
31421: {
31422: t = Analyzer
31423: .cast(Primitives.getAnnotation
31424: .apply(
31425: no,
31426: "__type"));
31427: ty = Analyzer
31428: .cast(resolveType
31429: .apply(t));
31430: Primitives.annotate
31431: .apply(
31432: no,
31433: "__type",
31434: ty);
31435: }
31436:
31437: public Object apply() {
31438: return Analyzer
31439: .cast(null);
31440: }
31441: }.apply());
31442:
31443: checkExitScope(arg$4320);
31444: matching_nodes
31445: .remove(matching_nodes.size() - 1);
31446: return Analyzer.cast(retValue$4592);
31447: }
31448: if (TypicalSupport.match$4593(arg$4320)) {
31449: matching_nodes.add(arg$4320);
31450: if ((null != arg$4320 && processScopeNodes
31451: .contains(arg$4320.getName()))) {
31452: processScope(arg$4320, getScope);
31453: }
31454: checkEnterScope(arg$4320);
31455:
31456: final Object retValue$4596 = Analyzer
31457: .cast(null == Primitives.hasAnnotation
31458: .apply(no, "__type")
31459: || !Primitives.hasAnnotation
31460: .apply(no, "__type") ? null
31461: : new Let<Object>() {
31462: final TypicalTypes.raw_type<?> t;
31463: final TypicalTypes.raw_type<?> ty;
31464:
31465: {
31466: t = Analyzer
31467: .cast(Primitives.getAnnotation
31468: .apply(
31469: no,
31470: "__type"));
31471: ty = Analyzer
31472: .cast(resolveType
31473: .apply(t));
31474: Primitives.annotate
31475: .apply(
31476: no,
31477: "__type",
31478: ty);
31479: }
31480:
31481: public Object apply() {
31482: return Analyzer
31483: .cast(null);
31484: }
31485: }.apply());
31486:
31487: checkExitScope(arg$4320);
31488: matching_nodes
31489: .remove(matching_nodes.size() - 1);
31490: return Analyzer.cast(retValue$4596);
31491: }
31492: if (TypicalSupport.match$4597(arg$4320)) {
31493: matching_nodes.add(arg$4320);
31494: if ((null != arg$4320 && processScopeNodes
31495: .contains(arg$4320.getName()))) {
31496: processScope(arg$4320, getScope);
31497: }
31498: checkEnterScope(arg$4320);
31499:
31500: final Object retValue$4600 = Analyzer
31501: .cast(null == Primitives.hasAnnotation
31502: .apply(no, "__type")
31503: || !Primitives.hasAnnotation
31504: .apply(no, "__type") ? null
31505: : new Let<Object>() {
31506: final TypicalTypes.raw_type<?> t;
31507: final TypicalTypes.raw_type<?> ty;
31508:
31509: {
31510: t = Analyzer
31511: .cast(Primitives.getAnnotation
31512: .apply(
31513: no,
31514: "__type"));
31515: ty = Analyzer
31516: .cast(resolveType
31517: .apply(t));
31518: Primitives.annotate
31519: .apply(
31520: no,
31521: "__type",
31522: ty);
31523: }
31524:
31525: public Object apply() {
31526: return Analyzer
31527: .cast(null);
31528: }
31529: }.apply());
31530:
31531: checkExitScope(arg$4320);
31532: matching_nodes
31533: .remove(matching_nodes.size() - 1);
31534: return Analyzer.cast(retValue$4600);
31535: }
31536: if (TypicalSupport.match$4601(arg$4320)) {
31537: matching_nodes.add(arg$4320);
31538: if ((null != arg$4320 && processScopeNodes
31539: .contains(arg$4320.getName()))) {
31540: processScope(arg$4320, getScope);
31541: }
31542: checkEnterScope(arg$4320);
31543:
31544: final Object retValue$4604 = Analyzer
31545: .cast(null == Primitives.hasAnnotation
31546: .apply(no, "__type")
31547: || !Primitives.hasAnnotation
31548: .apply(no, "__type") ? null
31549: : new Let<Object>() {
31550: final TypicalTypes.raw_type<?> t;
31551: final TypicalTypes.raw_type<?> ty;
31552:
31553: {
31554: t = Analyzer
31555: .cast(Primitives.getAnnotation
31556: .apply(
31557: no,
31558: "__type"));
31559: ty = Analyzer
31560: .cast(resolveType
31561: .apply(t));
31562: Primitives.annotate
31563: .apply(
31564: no,
31565: "__type",
31566: ty);
31567: }
31568:
31569: public Object apply() {
31570: return Analyzer
31571: .cast(null);
31572: }
31573: }.apply());
31574:
31575: checkExitScope(arg$4320);
31576: matching_nodes
31577: .remove(matching_nodes.size() - 1);
31578: return Analyzer.cast(retValue$4604);
31579: }
31580: if (TypicalSupport.match$692(arg$4320)) {
31581: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31582: .getGeneric(0) : null);
31583: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31584: .getGeneric(1) : null);
31585: final Node n3 = (arg$4320.size() > 2 ? arg$4320
31586: .getGeneric(2) : null);
31587:
31588: matching_nodes.add(arg$4320);
31589: if ((null != arg$4320 && processScopeNodes
31590: .contains(arg$4320.getName()))) {
31591: processScope(arg$4320, getScope);
31592: }
31593: checkEnterScope(arg$4320);
31594:
31595: final Object retValue$4608 = Analyzer
31596: .cast(new Let<Object>() {
31597: {
31598: resolveNode.apply(n1);
31599: resolveNode.apply(n2);
31600: resolveNode.apply(n3);
31601: }
31602:
31603: public Object apply() {
31604: return Analyzer
31605: .cast(null == Primitives.hasAnnotation
31606: .apply(no,
31607: "__type")
31608: || !Primitives.hasAnnotation
31609: .apply(
31610: no,
31611: "__type") ? null
31612: : new Let<Object>() {
31613: final TypicalTypes.raw_type<?> t;
31614: final TypicalTypes.raw_type<?> ty;
31615:
31616: {
31617: t = Analyzer
31618: .cast(Primitives.getAnnotation
31619: .apply(
31620: no,
31621: "__type"));
31622: ty = Analyzer
31623: .cast(resolveType
31624: .apply(t));
31625: Primitives.annotate
31626: .apply(
31627: no,
31628: "__type",
31629: ty);
31630: }
31631:
31632: public Object apply() {
31633: return Analyzer
31634: .cast(null);
31635: }
31636: }.apply());
31637: }
31638: }.apply());
31639:
31640: checkExitScope(arg$4320);
31641: matching_nodes
31642: .remove(matching_nodes.size() - 1);
31643: return Analyzer.cast(retValue$4608);
31644: }
31645: if (TypicalSupport.match$2828(arg$4320)) {
31646: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31647: .getGeneric(0) : null);
31648: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31649: .getGeneric(1) : null);
31650: final Node n3 = (arg$4320.size() > 2 ? arg$4320
31651: .getGeneric(2) : null);
31652:
31653: matching_nodes.add(arg$4320);
31654: if ((null != arg$4320 && processScopeNodes
31655: .contains(arg$4320.getName()))) {
31656: processScope(arg$4320, getScope);
31657: }
31658: checkEnterScope(arg$4320);
31659:
31660: final Object retValue$4612 = Analyzer
31661: .cast(new Let<Object>() {
31662: {
31663: resolveNode.apply(n1);
31664: resolveNode.apply(n2);
31665: resolveNode.apply(n3);
31666: }
31667:
31668: public Object apply() {
31669: return Analyzer
31670: .cast(null == Primitives.hasAnnotation
31671: .apply(no,
31672: "__type")
31673: || !Primitives.hasAnnotation
31674: .apply(
31675: no,
31676: "__type") ? null
31677: : new Let<Object>() {
31678: final TypicalTypes.raw_type<?> t;
31679: final TypicalTypes.raw_type<?> ty;
31680:
31681: {
31682: t = Analyzer
31683: .cast(Primitives.getAnnotation
31684: .apply(
31685: no,
31686: "__type"));
31687: ty = Analyzer
31688: .cast(resolveType
31689: .apply(t));
31690: Primitives.annotate
31691: .apply(
31692: no,
31693: "__type",
31694: ty);
31695: }
31696:
31697: public Object apply() {
31698: return Analyzer
31699: .cast(null);
31700: }
31701: }.apply());
31702: }
31703: }.apply());
31704:
31705: checkExitScope(arg$4320);
31706: matching_nodes
31707: .remove(matching_nodes.size() - 1);
31708: return Analyzer.cast(retValue$4612);
31709: }
31710: if (TypicalSupport.match$2801(arg$4320)) {
31711: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31712: .getGeneric(0) : null);
31713: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31714: .getGeneric(1) : null);
31715: final Node n3 = (arg$4320.size() > 2 ? arg$4320
31716: .getGeneric(2) : null);
31717:
31718: matching_nodes.add(arg$4320);
31719: if ((null != arg$4320 && processScopeNodes
31720: .contains(arg$4320.getName()))) {
31721: processScope(arg$4320, getScope);
31722: }
31723: checkEnterScope(arg$4320);
31724:
31725: final Object retValue$4616 = Analyzer
31726: .cast(new Let<Object>() {
31727: {
31728: resolveNode.apply(n1);
31729: resolveNode.apply(n2);
31730: resolveNode.apply(n3);
31731: }
31732:
31733: public Object apply() {
31734: return Analyzer
31735: .cast(null == Primitives.hasAnnotation
31736: .apply(no,
31737: "__type")
31738: || !Primitives.hasAnnotation
31739: .apply(
31740: no,
31741: "__type") ? null
31742: : new Let<Object>() {
31743: final TypicalTypes.raw_type<?> t;
31744: final TypicalTypes.raw_type<?> ty;
31745:
31746: {
31747: t = Analyzer
31748: .cast(Primitives.getAnnotation
31749: .apply(
31750: no,
31751: "__type"));
31752: ty = Analyzer
31753: .cast(resolveType
31754: .apply(t));
31755: Primitives.annotate
31756: .apply(
31757: no,
31758: "__type",
31759: ty);
31760: }
31761:
31762: public Object apply() {
31763: return Analyzer
31764: .cast(null);
31765: }
31766: }.apply());
31767: }
31768: }.apply());
31769:
31770: checkExitScope(arg$4320);
31771: matching_nodes
31772: .remove(matching_nodes.size() - 1);
31773: return Analyzer.cast(retValue$4616);
31774: }
31775: if (TypicalSupport.match$2405(arg$4320)) {
31776: final Node n1 = (arg$4320.size() > 0 ? arg$4320
31777: .getGeneric(0) : null);
31778: final Node n2 = (arg$4320.size() > 1 ? arg$4320
31779: .getGeneric(1) : null);
31780: final Node n3 = (arg$4320.size() > 2 ? arg$4320
31781: .getGeneric(2) : null);
31782: final Node n4 = (arg$4320.size() > 3 ? arg$4320
31783: .getGeneric(3) : null);
31784:
31785: matching_nodes.add(arg$4320);
31786: if ((null != arg$4320 && processScopeNodes
31787: .contains(arg$4320.getName()))) {
31788: processScope(arg$4320, getScope);
31789: }
31790: checkEnterScope(arg$4320);
31791:
31792: final Object retValue$4620 = Analyzer
31793: .cast(new Let<Object>() {
31794: {
31795: resolveNode.apply(n1);
31796: resolveNode.apply(n2);
31797: resolveNode.apply(n3);
31798: resolveNode.apply(n4);
31799: }
31800:
31801: public Object apply() {
31802: return Analyzer
31803: .cast(null == Primitives.hasAnnotation
31804: .apply(no,
31805: "__type")
31806: || !Primitives.hasAnnotation
31807: .apply(
31808: no,
31809: "__type") ? null
31810: : new Let<Object>() {
31811: final TypicalTypes.raw_type<?> t;
31812: final TypicalTypes.raw_type<?> ty;
31813:
31814: {
31815: t = Analyzer
31816: .cast(Primitives.getAnnotation
31817: .apply(
31818: no,
31819: "__type"));
31820: ty = Analyzer
31821: .cast(resolveType
31822: .apply(t));
31823: Primitives.annotate
31824: .apply(
31825: no,
31826: "__type",
31827: ty);
31828: }
31829:
31830: public Object apply() {
31831: return Analyzer
31832: .cast(null);
31833: }
31834: }.apply());
31835: }
31836: }.apply());
31837:
31838: checkExitScope(arg$4320);
31839: matching_nodes
31840: .remove(matching_nodes.size() - 1);
31841: return Analyzer.cast(retValue$4620);
31842: }
31843: if (true) {
31844: matching_nodes.add(arg$4320);
31845: if ((null != arg$4320 && processScopeNodes
31846: .contains(arg$4320.getName()))) {
31847: processScope(arg$4320, getScope);
31848: }
31849: checkEnterScope(arg$4320);
31850:
31851: final Object retValue$4623 = Analyzer
31852: .cast(null);
31853:
31854: checkExitScope(arg$4320);
31855: matching_nodes
31856: .remove(matching_nodes.size() - 1);
31857: return Analyzer.cast(retValue$4623);
31858: }
31859: return null;
31860: }
31861: }.apply();
31862: }
31863: };
31864:
31865: final Function.F1<Pair<Node>, Pair<Node>> getPatternNodes = new Function.F1<Pair<Node>, Pair<Node>>() {
31866: public Pair<Node> apply(final Pair<Node> nl) {
31867: return new Match<Pair<Node>>() {
31868: public Pair<Node> apply() {
31869: final Pair<Node> arg$4625 = Analyzer.cast(nl);
31870:
31871: if ((null == arg$4625)) {
31872: return null;
31873: }
31874: if (TypicalSupport.match$323(arg$4625)) {
31875: return Analyzer.cast(Pair.<Node> empty());
31876: }
31877: if (true) {
31878: final Pair<Node> list$4627 = Analyzer
31879: .cast(Analyzer.cast(arg$4625));
31880: final Node x = GNode.cast(Primitives
31881: .wrapHead(list$4627));
31882: final Pair<Node> xs = Analyzer.cast(Primitives
31883: .wrapTail(list$4627));
31884:
31885: return Analyzer.cast(new Let<Pair<Node>>() {
31886: final Pair<Node> pl;
31887:
31888: {
31889: pl = Analyzer
31890: .cast(getNodeList.apply(x));
31891: }
31892:
31893: public Pair<Node> apply() {
31894: return Analyzer
31895: .cast(TypicalSupport.append$127
31896: .apply(
31897: pl,
31898: getPatternNodes
31899: .apply(xs)));
31900: }
31901: }.apply());
31902: }
31903: return null;
31904: }
31905: }.apply();
31906: }
31907: };
31908:
31909: final Function.F1<Pair<TypicalTypes.patternRecord>, Pair<Node>> getPatternRecords = new Function.F1<Pair<TypicalTypes.patternRecord>, Pair<Node>>() {
31910: public Pair<TypicalTypes.patternRecord> apply(
31911: final Pair<Node> nl) {
31912: return new Match<Pair<TypicalTypes.patternRecord>>() {
31913: public Pair<TypicalTypes.patternRecord> apply() {
31914: final Pair<Node> arg$4629 = Analyzer.cast(nl);
31915:
31916: if ((null == arg$4629)) {
31917: return null;
31918: }
31919: if (TypicalSupport.match$323(arg$4629)) {
31920: return Analyzer.cast(Pair
31921: .<TypicalTypes.patternRecord> empty());
31922: }
31923: if (true) {
31924: final Pair<Node> list$4631 = Analyzer
31925: .cast(Analyzer.cast(arg$4629));
31926: final Node x = GNode.cast(Primitives
31927: .wrapHead(list$4631));
31928: final Pair<Node> xs = Analyzer.cast(Primitives
31929: .wrapTail(list$4631));
31930:
31931: return Analyzer.cast(Primitives.wrapCons(
31932: getPatternRecord.apply(x),
31933: getPatternRecords.apply(xs)));
31934: }
31935: return null;
31936: }
31937: }.apply();
31938: }
31939: };
31940:
31941: final Function.F1<TypicalTypes.patternRecord, Node> getPatternRecord = new Function.F1<TypicalTypes.patternRecord, Node>() {
31942: public TypicalTypes.patternRecord apply(final Node n) {
31943: return new Match<TypicalTypes.patternRecord>() {
31944: public TypicalTypes.patternRecord apply() {
31945: final Node arg$4633 = GNode.cast(n);
31946:
31947: if ((null == arg$4633)) {
31948: return null;
31949: }
31950: if (TypicalSupport.match$283(arg$4633)) {
31951: final Pair<Node> pl = Analyzer.cast(Primitives
31952: .getChildren(arg$4633, 0, arg$4633
31953: .size()));
31954:
31955: matching_nodes.add(arg$4633);
31956: if ((null != arg$4633 && processScopeNodes
31957: .contains(arg$4633.getName()))) {
31958: processScope(arg$4633, getScope);
31959: }
31960: checkEnterScope(arg$4633);
31961:
31962: final Object retValue$4637 = Analyzer
31963: .cast(new TypicalTypes.patternRecord(
31964: new TypicalTypes.TupPattern(
31965: getPatternRecords
31966: .apply(pl)), n,
31967: Boolean.FALSE));
31968:
31969: checkExitScope(arg$4633);
31970: matching_nodes
31971: .remove(matching_nodes.size() - 1);
31972: return Analyzer.cast(retValue$4637);
31973: }
31974: if (TypicalSupport.match$287(arg$4633)) {
31975: final Node p = (arg$4633.size() > 0 ? arg$4633
31976: .getGeneric(0) : null);
31977:
31978: matching_nodes.add(arg$4633);
31979: if ((null != arg$4633 && processScopeNodes
31980: .contains(arg$4633.getName()))) {
31981: processScope(arg$4633, getScope);
31982: }
31983: checkEnterScope(arg$4633);
31984:
31985: final Object retValue$4641 = Analyzer
31986: .cast(new Let<TypicalTypes.patternRecord>() {
31987: final TypicalTypes.patternRecord pa;
31988:
31989: {
31990: pa = Analyzer
31991: .cast(getPatternRecord
31992: .apply(p));
31993: }
31994:
31995: public TypicalTypes.patternRecord apply() {
31996: return Analyzer
31997: .cast(new TypicalTypes.patternRecord(
31998: null == pa ? null
31999: : pa.pat,
32000: n, Boolean.TRUE));
32001: }
32002: }.apply());
32003:
32004: checkExitScope(arg$4633);
32005: matching_nodes
32006: .remove(matching_nodes.size() - 1);
32007: return Analyzer.cast(retValue$4641);
32008: }
32009: if (TypicalSupport.match$57(arg$4633)) {
32010: final Node p = (arg$4633.size() > 0 ? arg$4633
32011: .getGeneric(0) : null);
32012:
32013: matching_nodes.add(arg$4633);
32014: if ((null != arg$4633 && processScopeNodes
32015: .contains(arg$4633.getName()))) {
32016: processScope(arg$4633, getScope);
32017: }
32018: checkEnterScope(arg$4633);
32019:
32020: final Object retValue$4645 = Analyzer
32021: .cast(getPatternRecord.apply(p));
32022:
32023: checkExitScope(arg$4633);
32024: matching_nodes
32025: .remove(matching_nodes.size() - 1);
32026: return Analyzer.cast(retValue$4645);
32027: }
32028: if (TypicalSupport.match$306(arg$4633)) {
32029: final Node p = (arg$4633.size() > 0 ? arg$4633
32030: .getGeneric(0) : null);
32031:
32032: matching_nodes.add(arg$4633);
32033: if ((null != arg$4633 && processScopeNodes
32034: .contains(arg$4633.getName()))) {
32035: processScope(arg$4633, getScope);
32036: }
32037: checkEnterScope(arg$4633);
32038:
32039: final Object retValue$4649 = Analyzer
32040: .cast(getPatternRecord.apply(p));
32041:
32042: checkExitScope(arg$4633);
32043: matching_nodes
32044: .remove(matching_nodes.size() - 1);
32045: return Analyzer.cast(retValue$4649);
32046: }
32047: if (TypicalSupport.match$312(arg$4633)) {
32048: final Node p1 = (arg$4633.size() > 0 ? arg$4633
32049: .getGeneric(0) : null);
32050: final Node p2 = (arg$4633.size() > 1 ? arg$4633
32051: .getGeneric(1) : null);
32052:
32053: matching_nodes.add(arg$4633);
32054: if ((null != arg$4633 && processScopeNodes
32055: .contains(arg$4633.getName()))) {
32056: processScope(arg$4633, getScope);
32057: }
32058: checkEnterScope(arg$4633);
32059:
32060: final Object retValue$4653 = Analyzer
32061: .cast(new TypicalTypes.patternRecord(
32062: new TypicalTypes.PairPattern(
32063: getPatternRecord
32064: .apply(p1),
32065: getPatternRecord
32066: .apply(p2)), n,
32067: Boolean.FALSE));
32068:
32069: checkExitScope(arg$4633);
32070: matching_nodes
32071: .remove(matching_nodes.size() - 1);
32072: return Analyzer.cast(retValue$4653);
32073: }
32074: if (TypicalSupport.match$65(arg$4633)) {
32075: final String s = (arg$4633.size() > 0 ? arg$4633
32076: .getString(0)
32077: : null);
32078:
32079: matching_nodes.add(arg$4633);
32080: if ((null != arg$4633 && processScopeNodes
32081: .contains(arg$4633.getName()))) {
32082: processScope(arg$4633, getScope);
32083: }
32084: checkEnterScope(arg$4633);
32085:
32086: final Object retValue$4657 = Analyzer
32087: .cast(new TypicalTypes.patternRecord(
32088: new TypicalTypes.VariablePattern(
32089: s), n, Boolean.FALSE));
32090:
32091: checkExitScope(arg$4633);
32092: matching_nodes
32093: .remove(matching_nodes.size() - 1);
32094: return Analyzer.cast(retValue$4657);
32095: }
32096: if (TypicalSupport.match$5(arg$4633)) {
32097: final String s = (arg$4633.size() > 0 ? arg$4633
32098: .getString(0)
32099: : null);
32100: final Pair<Node> nodList = Analyzer
32101: .cast(Primitives.getChildren(arg$4633,
32102: 1, arg$4633.size()));
32103:
32104: matching_nodes.add(arg$4633);
32105: if ((null != arg$4633 && processScopeNodes
32106: .contains(arg$4633.getName()))) {
32107: processScope(arg$4633, getScope);
32108: }
32109: checkEnterScope(arg$4633);
32110:
32111: final Object retValue$4669 = Analyzer
32112: .cast(new Match<TypicalTypes.patternRecord>() {
32113: public TypicalTypes.patternRecord apply() {
32114: final Pair<Node> arg$4663 = Analyzer
32115: .cast(nodList);
32116:
32117: if ((null == arg$4663)) {
32118: return null;
32119: }
32120: if (TypicalSupport
32121: .match$387(arg$4663)) {
32122: final Pair<Node> nl = Analyzer
32123: .cast(Primitives
32124: .getChildren(
32125: arg$4663
32126: .get(0),
32127: 0,
32128: arg$4663
32129: .get(
32130: 0)
32131: .size()));
32132:
32133: return Analyzer
32134: .cast(new Let<TypicalTypes.patternRecord>() {
32135: final Pair<TypicalTypes.patternRecord> pl;
32136:
32137: {
32138: pl = Analyzer
32139: .cast(getPatternRecords
32140: .apply(nl));
32141: }
32142:
32143: public TypicalTypes.patternRecord apply() {
32144: return Analyzer
32145: .cast(new TypicalTypes.patternRecord(
32146: new TypicalTypes.ConstructorPattern(
32147: s,
32148: pl),
32149: n,
32150: Boolean.FALSE));
32151: }
32152: }.apply());
32153: }
32154: if (TypicalSupport
32155: .match$422(arg$4663)) {
32156: return Analyzer
32157: .cast(new TypicalTypes.patternRecord(
32158: new TypicalTypes.ConstructorPattern(
32159: s,
32160: null),
32161: n,
32162: Boolean.FALSE));
32163: }
32164: if (true) {
32165: return Analyzer
32166: .cast(new TypicalTypes.patternRecord(
32167: new TypicalTypes.ConstructorPattern(
32168: s,
32169: Pair
32170: .<TypicalTypes.patternRecord> empty()),
32171: n,
32172: Boolean.FALSE));
32173: }
32174: return null;
32175: }
32176: }.apply());
32177:
32178: checkExitScope(arg$4633);
32179: matching_nodes
32180: .remove(matching_nodes.size() - 1);
32181: return Analyzer.cast(retValue$4669);
32182: }
32183: if (TypicalSupport.match$2918(arg$4633)) {
32184: matching_nodes.add(arg$4633);
32185: if ((null != arg$4633 && processScopeNodes
32186: .contains(arg$4633.getName()))) {
32187: processScope(arg$4633, getScope);
32188: }
32189: checkEnterScope(arg$4633);
32190:
32191: final Object retValue$4673 = Analyzer
32192: .cast(new TypicalTypes.patternRecord(
32193: new TypicalTypes.BotPattern(),
32194: n, Boolean.FALSE));
32195:
32196: checkExitScope(arg$4633);
32197: matching_nodes
32198: .remove(matching_nodes.size() - 1);
32199: return Analyzer.cast(retValue$4673);
32200: }
32201: if (TypicalSupport.match$321(arg$4633)) {
32202: final Pair<Node> nl = Analyzer.cast(Primitives
32203: .getChildren(arg$4633, 0, arg$4633
32204: .size()));
32205:
32206: matching_nodes.add(arg$4633);
32207: if ((null != arg$4633 && processScopeNodes
32208: .contains(arg$4633.getName()))) {
32209: processScope(arg$4633, getScope);
32210: }
32211: checkEnterScope(arg$4633);
32212:
32213: final Object retValue$4677 = Analyzer
32214: .cast(new Let<TypicalTypes.patternRecord>() {
32215: final Pair<TypicalTypes.patternRecord> pl;
32216: final TypicalTypes.patternRecord res;
32217:
32218: {
32219: pl = Analyzer
32220: .cast(getPatternRecords
32221: .apply(nl));
32222: res = Analyzer
32223: .cast(getPairFromList
32224: .apply(pl));
32225: }
32226:
32227: public TypicalTypes.patternRecord apply() {
32228: return Analyzer
32229: .cast(new TypicalTypes.patternRecord(
32230: null == res ? null
32231: : res.pat,
32232: n,
32233: Boolean.FALSE));
32234: }
32235: }.apply());
32236:
32237: checkExitScope(arg$4633);
32238: matching_nodes
32239: .remove(matching_nodes.size() - 1);
32240: return Analyzer.cast(retValue$4677);
32241: }
32242: if (TypicalSupport.match$339(arg$4633)) {
32243: final Pair<Node> nl = Analyzer.cast(Primitives
32244: .getChildren(arg$4633, 0, arg$4633
32245: .size()));
32246:
32247: matching_nodes.add(arg$4633);
32248: if ((null != arg$4633 && processScopeNodes
32249: .contains(arg$4633.getName()))) {
32250: processScope(arg$4633, getScope);
32251: }
32252: checkEnterScope(arg$4633);
32253:
32254: final Object retValue$4681 = Analyzer
32255: .cast(new TypicalTypes.patternRecord(
32256: new TypicalTypes.RecPattern(
32257: getPatternRecords
32258: .apply(nl)), n,
32259: Boolean.FALSE));
32260:
32261: checkExitScope(arg$4633);
32262: matching_nodes
32263: .remove(matching_nodes.size() - 1);
32264: return Analyzer.cast(retValue$4681);
32265: }
32266: if (TypicalSupport.match$363(arg$4633)) {
32267: final Node lowID = (arg$4633.size() > 0 ? arg$4633
32268: .getGeneric(0)
32269: : null);
32270: final Node p = (arg$4633.size() > 1 ? arg$4633
32271: .getGeneric(1) : null);
32272:
32273: matching_nodes.add(arg$4633);
32274: if ((null != arg$4633 && processScopeNodes
32275: .contains(arg$4633.getName()))) {
32276: processScope(arg$4633, getScope);
32277: }
32278: checkEnterScope(arg$4633);
32279:
32280: final Object retValue$4685 = Analyzer
32281: .cast(new Let<TypicalTypes.patternRecord>() {
32282: final String s;
32283:
32284: {
32285: s = Analyzer.cast(getString
32286: .apply(lowID));
32287: }
32288:
32289: public TypicalTypes.patternRecord apply() {
32290: return Analyzer
32291: .cast(new TypicalTypes.patternRecord(
32292: new TypicalTypes.RecFieldPattern(
32293: s,
32294: getPatternRecord
32295: .apply(p)),
32296: n,
32297: Boolean.FALSE));
32298: }
32299: }.apply());
32300:
32301: checkExitScope(arg$4633);
32302: matching_nodes
32303: .remove(matching_nodes.size() - 1);
32304: return Analyzer.cast(retValue$4685);
32305: }
32306: if (TypicalSupport.match$4686(arg$4633)) {
32307: final String s = (arg$4633.size() > 0 ? arg$4633
32308: .getString(0)
32309: : null);
32310:
32311: matching_nodes.add(arg$4633);
32312: if ((null != arg$4633 && processScopeNodes
32313: .contains(arg$4633.getName()))) {
32314: processScope(arg$4633, getScope);
32315: }
32316: checkEnterScope(arg$4633);
32317:
32318: final Object retValue$4689 = Analyzer
32319: .cast(new TypicalTypes.patternRecord(
32320: new TypicalTypes.ConstantPattern(
32321: new TypicalTypes.StringValue(
32322: s)), n,
32323: Boolean.FALSE));
32324:
32325: checkExitScope(arg$4633);
32326: matching_nodes
32327: .remove(matching_nodes.size() - 1);
32328: return Analyzer.cast(retValue$4689);
32329: }
32330: if (TypicalSupport.match$4690(arg$4633)) {
32331: final String s = (arg$4633.size() > 0 ? arg$4633
32332: .getString(0)
32333: : null);
32334:
32335: matching_nodes.add(arg$4633);
32336: if ((null != arg$4633 && processScopeNodes
32337: .contains(arg$4633.getName()))) {
32338: processScope(arg$4633, getScope);
32339: }
32340: checkEnterScope(arg$4633);
32341:
32342: final Object retValue$4693 = Analyzer
32343: .cast(new TypicalTypes.patternRecord(
32344: new TypicalTypes.ConstantPattern(
32345: new TypicalTypes.IntValue(
32346: Primitives.stoi
32347: .apply(
32348: s,
32349: BigInteger
32350: .valueOf(10)))),
32351: n, Boolean.FALSE));
32352:
32353: checkExitScope(arg$4633);
32354: matching_nodes
32355: .remove(matching_nodes.size() - 1);
32356: return Analyzer.cast(retValue$4693);
32357: }
32358: if (TypicalSupport.match$4694(arg$4633)) {
32359: final String s = (arg$4633.size() > 0 ? arg$4633
32360: .getString(0)
32361: : null);
32362:
32363: matching_nodes.add(arg$4633);
32364: if ((null != arg$4633 && processScopeNodes
32365: .contains(arg$4633.getName()))) {
32366: processScope(arg$4633, getScope);
32367: }
32368: checkEnterScope(arg$4633);
32369:
32370: final Object retValue$4697 = Analyzer
32371: .cast(new TypicalTypes.patternRecord(
32372: new TypicalTypes.ConstantPattern(
32373: new TypicalTypes.FloatValue(
32374: Primitives.stof
32375: .apply(s))),
32376: n, Boolean.FALSE));
32377:
32378: checkExitScope(arg$4633);
32379: matching_nodes
32380: .remove(matching_nodes.size() - 1);
32381: return Analyzer.cast(retValue$4697);
32382: }
32383: if (TypicalSupport.match$4698(arg$4633)) {
32384: final String s = (arg$4633.size() > 0 ? arg$4633
32385: .getString(0)
32386: : null);
32387:
32388: matching_nodes.add(arg$4633);
32389: if ((null != arg$4633 && processScopeNodes
32390: .contains(arg$4633.getName()))) {
32391: processScope(arg$4633, getScope);
32392: }
32393: checkEnterScope(arg$4633);
32394:
32395: final Object retValue$4701 = Analyzer
32396: .cast(new Let<TypicalTypes.patternRecord>() {
32397: final Boolean res;
32398:
32399: {
32400: res = Analyzer
32401: .cast(null == Primitives.equal
32402: .apply("true",
32403: s) ? null
32404: : Primitives.equal
32405: .apply(
32406: "true",
32407: s) ? Boolean.TRUE
32408: : Boolean.FALSE);
32409: }
32410:
32411: public TypicalTypes.patternRecord apply() {
32412: return Analyzer
32413: .cast(new TypicalTypes.patternRecord(
32414: new TypicalTypes.ConstantPattern(
32415: new TypicalTypes.BoolValue(
32416: res)),
32417: n,
32418: Boolean.FALSE));
32419: }
32420: }.apply());
32421:
32422: checkExitScope(arg$4633);
32423: matching_nodes
32424: .remove(matching_nodes.size() - 1);
32425: return Analyzer.cast(retValue$4701);
32426: }
32427: if (TypicalSupport.match$2922(arg$4633)) {
32428: matching_nodes.add(arg$4633);
32429: if ((null != arg$4633 && processScopeNodes
32430: .contains(arg$4633.getName()))) {
32431: processScope(arg$4633, getScope);
32432: }
32433: checkEnterScope(arg$4633);
32434:
32435: final Object retValue$4705 = Analyzer
32436: .cast(new TypicalTypes.patternRecord(
32437: new TypicalTypes.WildCardPattern(),
32438: n, Boolean.FALSE));
32439:
32440: checkExitScope(arg$4633);
32441: matching_nodes
32442: .remove(matching_nodes.size() - 1);
32443: return Analyzer.cast(retValue$4705);
32444: }
32445: if (true) {
32446: matching_nodes.add(arg$4633);
32447: if ((null != arg$4633 && processScopeNodes
32448: .contains(arg$4633.getName()))) {
32449: processScope(arg$4633, getScope);
32450: }
32451: checkEnterScope(arg$4633);
32452:
32453: final Object retValue$4708 = Analyzer
32454: .cast(null);
32455:
32456: checkExitScope(arg$4633);
32457: matching_nodes
32458: .remove(matching_nodes.size() - 1);
32459: return Analyzer.cast(retValue$4708);
32460: }
32461: return null;
32462: }
32463: }.apply();
32464: }
32465: };
32466:
32467: final Function.F1<TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>> getPairFromList = new Function.F1<TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>>() {
32468: public TypicalTypes.patternRecord apply(
32469: final Pair<TypicalTypes.patternRecord> pl) {
32470: return new Match<TypicalTypes.patternRecord>() {
32471: public TypicalTypes.patternRecord apply() {
32472: final Pair<TypicalTypes.patternRecord> arg$4710 = Analyzer
32473: .cast(pl);
32474:
32475: if ((null == arg$4710)) {
32476: return null;
32477: }
32478: if (TypicalSupport.match$4711(arg$4710)) {
32479: return Analyzer
32480: .cast(new TypicalTypes.patternRecord(
32481: new TypicalTypes.EmptyPattern(),
32482: GNode.create("ListPattern",
32483: Pair.<Node> empty()),
32484: Boolean.FALSE));
32485: }
32486: if (true) {
32487: final Pair<TypicalTypes.patternRecord> list$4712 = Analyzer
32488: .cast(Analyzer.cast(arg$4710));
32489: final TypicalTypes.patternRecord x = Analyzer
32490: .cast(Primitives.wrapHead(list$4712));
32491: final Pair<TypicalTypes.patternRecord> xs = Analyzer
32492: .cast(Primitives.wrapTail(list$4712));
32493:
32494: return Analyzer
32495: .cast(new Let<TypicalTypes.patternRecord>() {
32496: final TypicalTypes.patternRecord pt;
32497:
32498: {
32499: pt = Analyzer
32500: .cast(getPairFromList
32501: .apply(xs));
32502: }
32503:
32504: public TypicalTypes.patternRecord apply() {
32505: return Analyzer
32506: .cast(new Match<TypicalTypes.patternRecord>() {
32507: public TypicalTypes.patternRecord apply() {
32508: final Node arg$4722 = GNode
32509: .cast(null == pt ? null
32510: : pt.nod);
32511:
32512: if ((null == arg$4722)) {
32513: return null;
32514: }
32515: if (TypicalSupport
32516: .match$321(arg$4722)) {
32517: final Pair<Node> nl = Analyzer
32518: .cast(Primitives
32519: .getChildren(
32520: arg$4722,
32521: 0,
32522: arg$4722
32523: .size()));
32524:
32525: matching_nodes
32526: .add(arg$4722);
32527: if ((null != arg$4722 && processScopeNodes
32528: .contains(arg$4722
32529: .getName()))) {
32530: processScope(
32531: arg$4722,
32532: getScope);
32533: }
32534: checkEnterScope(arg$4722);
32535:
32536: final Object retValue$4726 = Analyzer
32537: .cast(new TypicalTypes.patternRecord(
32538: new TypicalTypes.PairPattern(
32539: x,
32540: pt),
32541: GNode
32542: .create(
32543: "ListPattern",
32544: TypicalSupport.append$127
32545: .apply(
32546: new Pair<Node>(
32547: null == x ? null
32548: : x.nod),
32549: nl)),
32550: Boolean.FALSE));
32551:
32552: checkExitScope(arg$4722);
32553: matching_nodes
32554: .remove(matching_nodes
32555: .size() - 1);
32556: return Analyzer
32557: .cast(retValue$4726);
32558: }
32559: if (true) {
32560: matching_nodes
32561: .add(arg$4722);
32562: if ((null != arg$4722 && processScopeNodes
32563: .contains(arg$4722
32564: .getName()))) {
32565: processScope(
32566: arg$4722,
32567: getScope);
32568: }
32569: checkEnterScope(arg$4722);
32570:
32571: final Object retValue$4729 = Analyzer
32572: .cast(null);
32573:
32574: checkExitScope(arg$4722);
32575: matching_nodes
32576: .remove(matching_nodes
32577: .size() - 1);
32578: return Analyzer
32579: .cast(retValue$4729);
32580: }
32581: return null;
32582: }
32583: }.apply());
32584: }
32585: }.apply());
32586: }
32587: return null;
32588: }
32589: }.apply();
32590: }
32591: };
32592:
32593: final Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkPatterns = new Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
32594: public Object apply(
32595: final Pair<TypicalTypes.patternRecord> preList,
32596: final Pair<TypicalTypes.patternRecord> posList) {
32597: return new Match<Object>() {
32598: public Object apply() {
32599: final Pair<TypicalTypes.patternRecord> arg$4732 = Analyzer
32600: .cast(posList);
32601:
32602: if ((null == arg$4732)) {
32603: return null;
32604: }
32605: if (TypicalSupport.match$4711(arg$4732)) {
32606: return Analyzer.cast(null);
32607: }
32608: if (true) {
32609: final Pair<TypicalTypes.patternRecord> list$4734 = Analyzer
32610: .cast(Analyzer.cast(arg$4732));
32611: final TypicalTypes.patternRecord x = Analyzer
32612: .cast(Primitives.wrapHead(list$4734));
32613: final Pair<TypicalTypes.patternRecord> xs = Analyzer
32614: .cast(Primitives.wrapTail(list$4734));
32615:
32616: return Analyzer.cast(new Let<Object>() {
32617: {
32618: checkUnused.apply(preList, x);
32619: }
32620:
32621: public Object apply() {
32622: return Analyzer
32623: .cast(checkPatterns
32624: .apply(
32625: TypicalSupport.append$4735
32626: .apply(
32627: preList,
32628: new Pair<TypicalTypes.patternRecord>(
32629: x)),
32630: xs));
32631: }
32632: }.apply());
32633: }
32634: return null;
32635: }
32636: }.apply();
32637: }
32638: };
32639:
32640: final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkUnused = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
32641: public Boolean apply(
32642: final Pair<TypicalTypes.patternRecord> preList,
32643: final TypicalTypes.patternRecord pat) {
32644: return new Match<Boolean>() {
32645: public Boolean apply() {
32646: final Pair<TypicalTypes.patternRecord> arg$4737 = Analyzer
32647: .cast(preList);
32648:
32649: if ((null == arg$4737)) {
32650: return null;
32651: }
32652: if (TypicalSupport.match$4711(arg$4737)) {
32653: return Analyzer.cast(Boolean.FALSE);
32654: }
32655: if (true) {
32656: final Pair<TypicalTypes.patternRecord> list$4739 = Analyzer
32657: .cast(Analyzer.cast(arg$4737));
32658: final TypicalTypes.patternRecord x = Analyzer
32659: .cast(Primitives.wrapHead(list$4739));
32660: final Pair<TypicalTypes.patternRecord> xs = Analyzer
32661: .cast(Primitives.wrapTail(list$4739));
32662:
32663: return Analyzer.cast(null == isMoreGeneral
32664: .apply(x, pat) ? null : isMoreGeneral
32665: .apply(x, pat) ? new Let<Boolean>() {
32666: final Node nod;
32667:
32668: {
32669: nod = Analyzer.cast(null == pat ? null
32670: : pat.nod);
32671: error("unused pattern", nod);
32672: }
32673:
32674: public Boolean apply() {
32675: return Analyzer.cast(Boolean.TRUE);
32676: }
32677: }.apply() : checkUnused.apply(xs, pat));
32678: }
32679: return null;
32680: }
32681: }.apply();
32682: }
32683: };
32684:
32685: final Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord> isMoreGeneral = new Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord>() {
32686: public Boolean apply(final TypicalTypes.patternRecord p,
32687: final TypicalTypes.patternRecord q) {
32688: return new Match<Boolean>() {
32689: public Boolean apply() {
32690: final TypicalTypes.pattern arg$4741 = Analyzer
32691: .cast(null == p ? null : p.pat);
32692:
32693: if ((null == arg$4741)) {
32694: return null;
32695: }
32696: if ((null != arg$4741))
32697: switch (arg$4741.tag()) {
32698: case WildCardPattern:
32699: if (TypicalSupport.match$4742(arg$4741)) {
32700: return Analyzer.cast(Boolean.TRUE);
32701: }
32702: break;
32703: default:
32704: break;
32705: }
32706: ;
32707: if (true) {
32708: return Analyzer
32709: .cast(null == (null == p ? null
32710: : p.guarded) ? null
32711: : (null == p ? null : p.guarded) ? Boolean.FALSE
32712: : null == Primitives.and
32713: .apply(
32714: null == q ? null
32715: : q.guarded,
32716: equalPattern
32717: .apply(
32718: p,
32719: q)) ? null
32720: : Primitives.and
32721: .apply(
32722: null == q ? null
32723: : q.guarded,
32724: equalPattern
32725: .apply(
32726: p,
32727: q)) ? Boolean.TRUE
32728: : new Match<Boolean>() {
32729: public Boolean apply() {
32730: final TypicalTypes.pattern arg$4826 = Analyzer
32731: .cast(null == p ? null
32732: : p.pat);
32733:
32734: if ((null == arg$4826)) {
32735: return null;
32736: }
32737: if ((null != arg$4826))
32738: switch (arg$4826
32739: .tag()) {
32740: case PairPattern:
32741: if (TypicalSupport
32742: .match$4804(arg$4826)) {
32743: final TypicalTypes.patternRecord hd1 = Analyzer
32744: .cast(arg$4826
32745: .getTuple()
32746: .get1());
32747: final TypicalTypes.patternRecord tl1 = Analyzer
32748: .cast(arg$4826
32749: .getTuple()
32750: .get2());
32751:
32752: return Analyzer
32753: .cast(new Match<Boolean>() {
32754: public Boolean apply() {
32755: final TypicalTypes.pattern arg$4891 = Analyzer
32756: .cast(null == q ? null
32757: : q.pat);
32758:
32759: if ((null == arg$4891)) {
32760: return null;
32761: }
32762: if ((null != arg$4891))
32763: switch (arg$4891
32764: .tag()) {
32765: case PairPattern:
32766: if (TypicalSupport
32767: .match$4804(arg$4891)) {
32768: final TypicalTypes.patternRecord hd2 = Analyzer
32769: .cast(arg$4891
32770: .getTuple()
32771: .get1());
32772: final TypicalTypes.patternRecord tl2 = Analyzer
32773: .cast(arg$4891
32774: .getTuple()
32775: .get2());
32776:
32777: return Analyzer
32778: .cast(Primitives.and
32779: .apply(
32780: isMoreGeneral
32781: .apply(
32782: hd1,
32783: hd2),
32784: isMoreGeneral
32785: .apply(
32786: tl1,
32787: tl2)));
32788: }
32789: break;
32790: default:
32791: break;
32792: }
32793: ;
32794: if (true) {
32795: return Analyzer
32796: .cast(Boolean.FALSE);
32797: }
32798: return null;
32799: }
32800: }
32801: .apply());
32802: }
32803: break;
32804: case ConstructorPattern:
32805: if (TypicalSupport
32806: .match$4790(arg$4826)) {
32807: final String s1 = Analyzer
32808: .cast(arg$4826
32809: .getTuple()
32810: .get1());
32811: final Pair<TypicalTypes.patternRecord> pl = Analyzer
32812: .cast(arg$4826
32813: .getTuple()
32814: .get2());
32815:
32816: return Analyzer
32817: .cast(new Match<Boolean>() {
32818: public Boolean apply() {
32819: final TypicalTypes.pattern arg$4877 = Analyzer
32820: .cast(null == q ? null
32821: : q.pat);
32822:
32823: if ((null == arg$4877)) {
32824: return null;
32825: }
32826: if ((null != arg$4877))
32827: switch (arg$4877
32828: .tag()) {
32829: case ConstructorPattern:
32830: if (TypicalSupport
32831: .match$4790(arg$4877)) {
32832: final String s2 = Analyzer
32833: .cast(arg$4877
32834: .getTuple()
32835: .get1());
32836: final Pair<TypicalTypes.patternRecord> ql = Analyzer
32837: .cast(arg$4877
32838: .getTuple()
32839: .get2());
32840:
32841: return Analyzer
32842: .cast(null == Primitives.not
32843: .apply(Primitives.equal
32844: .apply(
32845: s1,
32846: s2)) ? null
32847: : Primitives.not
32848: .apply(Primitives.equal
32849: .apply(
32850: s1,
32851: s2)) ? Boolean.FALSE
32852: : null == Primitives.isBottom
32853: .apply(pl) ? null
32854: : Primitives.isBottom
32855: .apply(pl) ? Boolean.TRUE
32856: : null == Primitives.isBottom
32857: .apply(ql) ? null
32858: : Primitives.isBottom
32859: .apply(ql) ? Boolean.FALSE
32860: : lessPatternList
32861: .apply(
32862: pl,
32863: ql));
32864: }
32865: break;
32866: default:
32867: break;
32868: }
32869: ;
32870: if (true) {
32871: return Analyzer
32872: .cast(Boolean.FALSE);
32873: }
32874: return null;
32875: }
32876: }
32877: .apply());
32878: }
32879: break;
32880: case RecFieldPattern:
32881: if (TypicalSupport
32882: .match$4818(arg$4826)) {
32883: final String str1 = Analyzer
32884: .cast(arg$4826
32885: .getTuple()
32886: .get1());
32887: final TypicalTypes.patternRecord p1 = Analyzer
32888: .cast(arg$4826
32889: .getTuple()
32890: .get2());
32891:
32892: return Analyzer
32893: .cast(new Match<Boolean>() {
32894: public Boolean apply() {
32895: final TypicalTypes.pattern arg$4905 = Analyzer
32896: .cast(null == q ? null
32897: : q.pat);
32898:
32899: if ((null == arg$4905)) {
32900: return null;
32901: }
32902: if ((null != arg$4905))
32903: switch (arg$4905
32904: .tag()) {
32905: case RecFieldPattern:
32906: if (TypicalSupport
32907: .match$4818(arg$4905)) {
32908: final String str2 = Analyzer
32909: .cast(arg$4905
32910: .getTuple()
32911: .get1());
32912: final TypicalTypes.patternRecord p2 = Analyzer
32913: .cast(arg$4905
32914: .getTuple()
32915: .get2());
32916:
32917: return Analyzer
32918: .cast(Primitives.and
32919: .apply(
32920: Primitives.equal
32921: .apply(
32922: str1,
32923: str2),
32924: isMoreGeneral
32925: .apply(
32926: p1,
32927: p2)));
32928: }
32929: break;
32930: default:
32931: break;
32932: }
32933: ;
32934: if (true) {
32935: return Analyzer
32936: .cast(Boolean.FALSE);
32937: }
32938: return null;
32939: }
32940: }
32941: .apply());
32942: }
32943: break;
32944: case VariablePattern:
32945: if (TypicalSupport
32946: .match$4744(arg$4826)) {
32947: return Analyzer
32948: .cast(Boolean.TRUE);
32949: }
32950: break;
32951: case TupPattern:
32952: if (TypicalSupport
32953: .match$4783(arg$4826)) {
32954: final Pair<TypicalTypes.patternRecord> pl = Analyzer
32955: .cast(arg$4826
32956: .getTuple()
32957: .get1());
32958:
32959: return Analyzer
32960: .cast(new Match<Boolean>() {
32961: public Boolean apply() {
32962: final TypicalTypes.pattern arg$4870 = Analyzer
32963: .cast(null == q ? null
32964: : q.pat);
32965:
32966: if ((null == arg$4870)) {
32967: return null;
32968: }
32969: if ((null != arg$4870))
32970: switch (arg$4870
32971: .tag()) {
32972: case TupPattern:
32973: if (TypicalSupport
32974: .match$4783(arg$4870)) {
32975: final Pair<TypicalTypes.patternRecord> ql = Analyzer
32976: .cast(arg$4870
32977: .getTuple()
32978: .get1());
32979:
32980: return Analyzer
32981: .cast(lessPatternList
32982: .apply(
32983: pl,
32984: ql));
32985: }
32986: break;
32987: default:
32988: break;
32989: }
32990: ;
32991: if (true) {
32992: return Analyzer
32993: .cast(Boolean.FALSE);
32994: }
32995: return null;
32996: }
32997: }
32998: .apply());
32999: }
33000: break;
33001: case BotPattern:
33002: if (TypicalSupport
33003: .match$4745(arg$4826)) {
33004: return Analyzer
33005: .cast(new Match<Boolean>() {
33006: public Boolean apply() {
33007: final TypicalTypes.pattern arg$4832 = Analyzer
33008: .cast(null == q ? null
33009: : q.pat);
33010:
33011: if ((null == arg$4832)) {
33012: return null;
33013: }
33014: if ((null != arg$4832))
33015: switch (arg$4832
33016: .tag()) {
33017: case BotPattern:
33018: if (TypicalSupport
33019: .match$4745(arg$4832)) {
33020: return Analyzer
33021: .cast(Boolean.TRUE);
33022: }
33023: break;
33024: default:
33025: break;
33026: }
33027: ;
33028: if (true) {
33029: return Analyzer
33030: .cast(Boolean.FALSE);
33031: }
33032: return null;
33033: }
33034: }
33035: .apply());
33036: }
33037: break;
33038: case RecPattern:
33039: if (TypicalSupport
33040: .match$4811(arg$4826)) {
33041: final Pair<TypicalTypes.patternRecord> pl = Analyzer
33042: .cast(arg$4826
33043: .getTuple()
33044: .get1());
33045:
33046: return Analyzer
33047: .cast(new Match<Boolean>() {
33048: public Boolean apply() {
33049: final TypicalTypes.pattern arg$4898 = Analyzer
33050: .cast(null == q ? null
33051: : q.pat);
33052:
33053: if ((null == arg$4898)) {
33054: return null;
33055: }
33056: if ((null != arg$4898))
33057: switch (arg$4898
33058: .tag()) {
33059: case RecPattern:
33060: if (TypicalSupport
33061: .match$4811(arg$4898)) {
33062: final Pair<TypicalTypes.patternRecord> ql = Analyzer
33063: .cast(arg$4898
33064: .getTuple()
33065: .get1());
33066:
33067: return Analyzer
33068: .cast(checkListInList
33069: .apply(
33070: ql,
33071: pl));
33072: }
33073: break;
33074: default:
33075: break;
33076: }
33077: ;
33078: if (true) {
33079: return Analyzer
33080: .cast(Boolean.FALSE);
33081: }
33082: return null;
33083: }
33084: }
33085: .apply());
33086: }
33087: break;
33088: case EmptyPattern:
33089: if (TypicalSupport
33090: .match$4797(arg$4826)) {
33091: return Analyzer
33092: .cast(new Match<Boolean>() {
33093: public Boolean apply() {
33094: final TypicalTypes.pattern arg$4884 = Analyzer
33095: .cast(null == q ? null
33096: : q.pat);
33097:
33098: if ((null == arg$4884)) {
33099: return null;
33100: }
33101: if ((null != arg$4884))
33102: switch (arg$4884
33103: .tag()) {
33104: case EmptyPattern:
33105: if (TypicalSupport
33106: .match$4797(arg$4884)) {
33107: return Analyzer
33108: .cast(Boolean.TRUE);
33109: }
33110: break;
33111: default:
33112: break;
33113: }
33114: ;
33115: if (true) {
33116: return Analyzer
33117: .cast(Boolean.FALSE);
33118: }
33119: return null;
33120: }
33121: }
33122: .apply());
33123: }
33124: break;
33125: case ConstantPattern:
33126: if (TypicalSupport
33127: .match$4752(arg$4826)) {
33128: final TypicalTypes.value val = Analyzer
33129: .cast(arg$4826
33130: .getTuple()
33131: .get1());
33132:
33133: return Analyzer
33134: .cast(new Match<Boolean>() {
33135: public Boolean apply() {
33136: final TypicalTypes.pattern arg$4851 = Analyzer
33137: .cast(null == q ? null
33138: : q.pat);
33139:
33140: if ((null == arg$4851)) {
33141: return null;
33142: }
33143: if ((null != arg$4851))
33144: switch (arg$4851
33145: .tag()) {
33146: case ConstantPattern:
33147: if (TypicalSupport
33148: .match$4752(arg$4851)) {
33149: final TypicalTypes.value va = Analyzer
33150: .cast(arg$4851
33151: .getTuple()
33152: .get1());
33153:
33154: return Analyzer
33155: .cast(new Match<Boolean>() {
33156: public Boolean apply() {
33157: final Tuple.T2<TypicalTypes.value, TypicalTypes.value> arg$4859 = Analyzer
33158: .cast(new Tuple.T2<TypicalTypes.value, TypicalTypes.value>(
33159: val,
33160: va));
33161:
33162: if ((null == arg$4859)) {
33163: return null;
33164: }
33165: if (TypicalSupport
33166: .match$4756(arg$4859)) {
33167: final String s1 = Analyzer
33168: .cast(arg$4859
33169: .get1()
33170: .getTuple()
33171: .get1());
33172: final String s2 = Analyzer
33173: .cast(arg$4859
33174: .get2()
33175: .getTuple()
33176: .get1());
33177:
33178: return Analyzer
33179: .cast(Primitives.equal
33180: .apply(
33181: s1,
33182: s2));
33183: }
33184: if (TypicalSupport
33185: .match$4757(arg$4859)) {
33186: final Double f1 = Analyzer
33187: .cast(arg$4859
33188: .get1()
33189: .getTuple()
33190: .get1());
33191: final Double f2 = Analyzer
33192: .cast(arg$4859
33193: .get2()
33194: .getTuple()
33195: .get1());
33196:
33197: return Analyzer
33198: .cast(Primitives.equal
33199: .apply(
33200: f1,
33201: f2));
33202: }
33203: if (TypicalSupport
33204: .match$4758(arg$4859)) {
33205: final BigInteger in1 = Analyzer
33206: .cast(arg$4859
33207: .get1()
33208: .getTuple()
33209: .get1());
33210: final BigInteger in2 = Analyzer
33211: .cast(arg$4859
33212: .get2()
33213: .getTuple()
33214: .get1());
33215:
33216: return Analyzer
33217: .cast(Primitives.equal
33218: .apply(
33219: in1,
33220: in2));
33221: }
33222: if (TypicalSupport
33223: .match$4759(arg$4859)) {
33224: final Boolean b1 = Analyzer
33225: .cast(arg$4859
33226: .get1()
33227: .getTuple()
33228: .get1());
33229: final Boolean b2 = Analyzer
33230: .cast(arg$4859
33231: .get2()
33232: .getTuple()
33233: .get1());
33234:
33235: return Analyzer
33236: .cast(Primitives.equal
33237: .apply(
33238: b1,
33239: b2));
33240: }
33241: if (true) {
33242: return Analyzer
33243: .cast(Boolean.FALSE);
33244: }
33245: return null;
33246: }
33247: }
33248: .apply());
33249: }
33250: break;
33251: default:
33252: break;
33253: }
33254: ;
33255: if (true) {
33256: return Analyzer
33257: .cast(Boolean.FALSE);
33258: }
33259: return null;
33260: }
33261: }
33262: .apply());
33263: }
33264: break;
33265: default:
33266: break;
33267: }
33268: ;
33269: if (true) {
33270: return Analyzer
33271: .cast(Boolean.FALSE);
33272: }
33273: return null;
33274: }
33275: }
33276: .apply());
33277: }
33278: return null;
33279: }
33280: }.apply();
33281: }
33282: };
33283:
33284: final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> lessPatternList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
33285: public Boolean apply(final Pair<TypicalTypes.patternRecord> pl,
33286: final Pair<TypicalTypes.patternRecord> ql) {
33287: return new Match<Boolean>() {
33288: public Boolean apply() {
33289: final Pair<TypicalTypes.patternRecord> arg$4910 = Analyzer
33290: .cast(pl);
33291:
33292: if ((null == arg$4910)) {
33293: return null;
33294: }
33295: if (TypicalSupport.match$4711(arg$4910)) {
33296: return Analyzer.cast(Boolean.TRUE);
33297: }
33298: if (true) {
33299: final Pair<TypicalTypes.patternRecord> list$4912 = Analyzer
33300: .cast(Analyzer.cast(arg$4910));
33301: final TypicalTypes.patternRecord x = Analyzer
33302: .cast(Primitives.wrapHead(list$4912));
33303: final Pair<TypicalTypes.patternRecord> xs = Analyzer
33304: .cast(Primitives.wrapTail(list$4912));
33305:
33306: return Analyzer
33307: .cast(null == isMoreGeneral.apply(x,
33308: TypicalSupport.head$4913
33309: .apply(ql)) ? null
33310: : isMoreGeneral
33311: .apply(
33312: x,
33313: TypicalSupport.head$4913
33314: .apply(ql)) ? lessPatternList
33315: .apply(
33316: xs,
33317: TypicalSupport.tail$4914
33318: .apply(ql))
33319: : Boolean.FALSE);
33320: }
33321: return null;
33322: }
33323: }.apply();
33324: }
33325: };
33326:
33327: final Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord> equalPattern = new Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord>() {
33328: public Boolean apply(final TypicalTypes.patternRecord p,
33329: final TypicalTypes.patternRecord q) {
33330: return new Match<Boolean>() {
33331: public Boolean apply() {
33332: final Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern> arg$4916 = Analyzer
33333: .cast(new Tuple.T2<TypicalTypes.pattern, TypicalTypes.pattern>(
33334: null == p ? null : p.pat,
33335: null == q ? null : q.pat));
33336:
33337: if ((null == arg$4916)) {
33338: return null;
33339: }
33340: if (TypicalSupport.match$4917(arg$4916)) {
33341: return Analyzer.cast(Boolean.TRUE);
33342: }
33343: if (TypicalSupport.match$4918(arg$4916)) {
33344: return Analyzer.cast(Boolean.TRUE);
33345: }
33346: if (TypicalSupport.match$4919(arg$4916)) {
33347: final TypicalTypes.value val1 = Analyzer
33348: .cast(arg$4916.get1().getTuple().get1());
33349: final TypicalTypes.value val2 = Analyzer
33350: .cast(arg$4916.get2().getTuple().get1());
33351:
33352: return Analyzer.cast(new Match<Boolean>() {
33353: public Boolean apply() {
33354: final Tuple.T2<TypicalTypes.value, TypicalTypes.value> arg$4926 = Analyzer
33355: .cast(new Tuple.T2<TypicalTypes.value, TypicalTypes.value>(
33356: val1, val2));
33357:
33358: if ((null == arg$4926)) {
33359: return null;
33360: }
33361: if (TypicalSupport.match$4756(arg$4926)) {
33362: final String str1 = Analyzer
33363: .cast(arg$4926.get1()
33364: .getTuple().get1());
33365: final String str2 = Analyzer
33366: .cast(arg$4926.get2()
33367: .getTuple().get1());
33368:
33369: return Analyzer
33370: .cast(Primitives.equal
33371: .apply(str1, str2));
33372: }
33373: if (TypicalSupport.match$4757(arg$4926)) {
33374: final Double f1 = Analyzer
33375: .cast(arg$4926.get1()
33376: .getTuple().get1());
33377: final Double f2 = Analyzer
33378: .cast(arg$4926.get2()
33379: .getTuple().get1());
33380:
33381: return Analyzer
33382: .cast(Primitives.equal
33383: .apply(f1, f2));
33384: }
33385: if (TypicalSupport.match$4758(arg$4926)) {
33386: final BigInteger in1 = Analyzer
33387: .cast(arg$4926.get1()
33388: .getTuple().get1());
33389: final BigInteger in2 = Analyzer
33390: .cast(arg$4926.get2()
33391: .getTuple().get1());
33392:
33393: return Analyzer
33394: .cast(Primitives.equal
33395: .apply(in1, in2));
33396: }
33397: if (TypicalSupport.match$4759(arg$4926)) {
33398: final Boolean b1 = Analyzer
33399: .cast(arg$4926.get1()
33400: .getTuple().get1());
33401: final Boolean b2 = Analyzer
33402: .cast(arg$4926.get2()
33403: .getTuple().get1());
33404:
33405: return Analyzer
33406: .cast(Primitives.equal
33407: .apply(b1, b2));
33408: }
33409: if (true) {
33410: return Analyzer.cast(Boolean.FALSE);
33411: }
33412: return null;
33413: }
33414: }.apply());
33415: }
33416: if (TypicalSupport.match$4932(arg$4916)) {
33417: final Pair<TypicalTypes.patternRecord> pl = Analyzer
33418: .cast(arg$4916.get1().getTuple().get1());
33419: final Pair<TypicalTypes.patternRecord> ql = Analyzer
33420: .cast(arg$4916.get2().getTuple().get1());
33421:
33422: return Analyzer.cast(equalPatternList.apply(pl,
33423: ql));
33424: }
33425: if (TypicalSupport.match$4933(arg$4916)) {
33426: final String s1 = Analyzer.cast(arg$4916.get1()
33427: .getTuple().get1());
33428: final Pair<TypicalTypes.patternRecord> pl = Analyzer
33429: .cast(arg$4916.get1().getTuple().get2());
33430: final String s2 = Analyzer.cast(arg$4916.get2()
33431: .getTuple().get1());
33432: final Pair<TypicalTypes.patternRecord> ql = Analyzer
33433: .cast(arg$4916.get2().getTuple().get2());
33434:
33435: return Analyzer
33436: .cast(null == Primitives.not
33437: .apply(Primitives.equal.apply(
33438: s1, s2)) ? null
33439: : Primitives.not
33440: .apply(Primitives.equal
33441: .apply(s1, s2)) ? Boolean.FALSE
33442: : null == Primitives.and
33443: .apply(
33444: Primitives.isBottom
33445: .apply(pl),
33446: Primitives.isBottom
33447: .apply(ql)) ? null
33448: : Primitives.and
33449: .apply(
33450: Primitives.isBottom
33451: .apply(pl),
33452: Primitives.isBottom
33453: .apply(ql)) ? Boolean.TRUE
33454: : null == Primitives.or
33455: .apply(
33456: Primitives.isBottom
33457: .apply(pl),
33458: Primitives.isBottom
33459: .apply(ql)) ? null
33460: : Primitives.or
33461: .apply(
33462: Primitives.isBottom
33463: .apply(pl),
33464: Primitives.isBottom
33465: .apply(ql)) ? Boolean.FALSE
33466: : equalPatternList
33467: .apply(
33468: pl,
33469: ql));
33470: }
33471: if (true) {
33472: return Analyzer.cast(Boolean.FALSE);
33473: }
33474: return null;
33475: }
33476: }.apply();
33477: }
33478: };
33479:
33480: final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> equalPatternList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
33481: public Boolean apply(final Pair<TypicalTypes.patternRecord> pl,
33482: final Pair<TypicalTypes.patternRecord> ql) {
33483: return new Match<Boolean>() {
33484: public Boolean apply() {
33485: final Pair<TypicalTypes.patternRecord> arg$4935 = Analyzer
33486: .cast(pl);
33487:
33488: if ((null == arg$4935)) {
33489: return null;
33490: }
33491: if (TypicalSupport.match$4711(arg$4935)) {
33492: return Analyzer.cast(Boolean.TRUE);
33493: }
33494: if (true) {
33495: final Pair<TypicalTypes.patternRecord> list$4937 = Analyzer
33496: .cast(Analyzer.cast(arg$4935));
33497: final TypicalTypes.patternRecord x = Analyzer
33498: .cast(Primitives.wrapHead(list$4937));
33499: final Pair<TypicalTypes.patternRecord> xs = Analyzer
33500: .cast(Primitives.wrapTail(list$4937));
33501:
33502: return Analyzer
33503: .cast(null == equalPattern.apply(x,
33504: TypicalSupport.head$4913
33505: .apply(ql)) ? null
33506: : equalPattern
33507: .apply(
33508: x,
33509: TypicalSupport.head$4913
33510: .apply(ql)) ? equalPatternList
33511: .apply(
33512: xs,
33513: TypicalSupport.tail$4914
33514: .apply(ql))
33515: : Boolean.FALSE);
33516: }
33517: return null;
33518: }
33519: }.apply();
33520: }
33521: };
33522:
33523: final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkListInList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
33524: public Boolean apply(final Pair<TypicalTypes.patternRecord> pl,
33525: final Pair<TypicalTypes.patternRecord> ql) {
33526: return new Match<Boolean>() {
33527: public Boolean apply() {
33528: final Pair<TypicalTypes.patternRecord> arg$4939 = Analyzer
33529: .cast(ql);
33530:
33531: if ((null == arg$4939)) {
33532: return null;
33533: }
33534: if (TypicalSupport.match$4711(arg$4939)) {
33535: return Analyzer.cast(Boolean.TRUE);
33536: }
33537: if (true) {
33538: final Pair<TypicalTypes.patternRecord> list$4941 = Analyzer
33539: .cast(Analyzer.cast(arg$4939));
33540: final TypicalTypes.patternRecord x = Analyzer
33541: .cast(Primitives.wrapHead(list$4941));
33542: final Pair<TypicalTypes.patternRecord> xs = Analyzer
33543: .cast(Primitives.wrapTail(list$4941));
33544:
33545: return Analyzer.cast(null == checkInList.apply(
33546: pl, x) ? null : checkInList
33547: .apply(pl, x) ? checkListInList.apply(
33548: pl, xs) : Boolean.FALSE);
33549: }
33550: return null;
33551: }
33552: }.apply();
33553: }
33554: };
33555:
33556: final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkInList = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
33557: public Boolean apply(final Pair<TypicalTypes.patternRecord> pl,
33558: final TypicalTypes.patternRecord q) {
33559: return new Match<Boolean>() {
33560: public Boolean apply() {
33561: final Pair<TypicalTypes.patternRecord> arg$4943 = Analyzer
33562: .cast(pl);
33563:
33564: if ((null == arg$4943)) {
33565: return null;
33566: }
33567: if (TypicalSupport.match$4711(arg$4943)) {
33568: return Analyzer.cast(Boolean.FALSE);
33569: }
33570: if (true) {
33571: final Pair<TypicalTypes.patternRecord> list$4945 = Analyzer
33572: .cast(Analyzer.cast(arg$4943));
33573: final TypicalTypes.patternRecord x = Analyzer
33574: .cast(Primitives.wrapHead(list$4945));
33575: final Pair<TypicalTypes.patternRecord> xs = Analyzer
33576: .cast(Primitives.wrapTail(list$4945));
33577:
33578: return Analyzer.cast(null == isMoreGeneral
33579: .apply(q, x) ? null : isMoreGeneral
33580: .apply(q, x) ? Boolean.TRUE
33581: : checkInList.apply(xs, q));
33582: }
33583: return null;
33584: }
33585: }.apply();
33586: }
33587: };
33588:
33589: final Function.F1<Object, Pair<Node>> checkIrredundant = new Function.F1<Object, Pair<Node>>() {
33590: public Object apply(final Pair<Node> nl) {
33591: return new Let<Object>() {
33592: final Pair<Node> pl;
33593:
33594: {
33595: pl = Analyzer.cast(getPatternNodes.apply(nl));
33596: }
33597:
33598: public Object apply() {
33599: return Analyzer.cast(null == Primitives.greaterInt
33600: .apply(Primitives.length.apply(pl),
33601: BigInteger.valueOf(1))
33602: || !Primitives.greaterInt.apply(
33603: Primitives.length.apply(pl),
33604: BigInteger.valueOf(1)) ? null
33605: : new Let<Object>() {
33606: final Pair<TypicalTypes.patternRecord> patList;
33607:
33608: {
33609: patList = Analyzer
33610: .cast(getPatternRecords
33611: .apply(pl));
33612: }
33613:
33614: public Object apply() {
33615: return Analyzer
33616: .cast(checkPatterns
33617: .apply(
33618: new Pair<TypicalTypes.patternRecord>(
33619: TypicalSupport.head$4913
33620: .apply(patList)),
33621: TypicalSupport.tail$4914
33622: .apply(patList)));
33623: }
33624: }.apply());
33625: }
33626: }.apply();
33627: }
33628: };
33629:
33630: final Function.F1<Object, Pair<Node>> checkReduceMatching = new Function.F1<Object, Pair<Node>>() {
33631: public Object apply(final Pair<Node> nl) {
33632: return new Let<Object>() {
33633: final Pair<Node> pl;
33634:
33635: {
33636: pl = Analyzer.cast(getPatternNodes.apply(nl));
33637: }
33638:
33639: public Object apply() {
33640: return Analyzer.cast(null == Primitives.greaterInt
33641: .apply(Primitives.length.apply(pl),
33642: BigInteger.valueOf(1))
33643: || !Primitives.greaterInt.apply(
33644: Primitives.length.apply(pl),
33645: BigInteger.valueOf(1)) ? null
33646: : new Let<Object>() {
33647: final Pair<TypicalTypes.patternRecord> patList;
33648:
33649: {
33650: patList = Analyzer
33651: .cast(getPatternRecords
33652: .apply(pl));
33653: }
33654:
33655: public Object apply() {
33656: return Analyzer
33657: .cast(checkReducePatterns
33658: .apply(
33659: new Pair<TypicalTypes.patternRecord>(
33660: TypicalSupport.head$4913
33661: .apply(patList)),
33662: TypicalSupport.tail$4914
33663: .apply(patList)));
33664: }
33665: }.apply());
33666: }
33667: }.apply();
33668: }
33669: };
33670:
33671: final Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkReducePatterns = new Function.F2<Object, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
33672: public Object apply(
33673: final Pair<TypicalTypes.patternRecord> preList,
33674: final Pair<TypicalTypes.patternRecord> posList) {
33675: return new Match<Object>() {
33676: public Object apply() {
33677: final Pair<TypicalTypes.patternRecord> arg$4947 = Analyzer
33678: .cast(posList);
33679:
33680: if ((null == arg$4947)) {
33681: return null;
33682: }
33683: if (TypicalSupport.match$4711(arg$4947)) {
33684: return Analyzer.cast(null);
33685: }
33686: if (true) {
33687: final Pair<TypicalTypes.patternRecord> list$4949 = Analyzer
33688: .cast(Analyzer.cast(arg$4947));
33689: final TypicalTypes.patternRecord x = Analyzer
33690: .cast(Primitives.wrapHead(list$4949));
33691: final Pair<TypicalTypes.patternRecord> xs = Analyzer
33692: .cast(Primitives.wrapTail(list$4949));
33693:
33694: return Analyzer.cast(new Let<Object>() {
33695: {
33696: checkReduceUnused.apply(preList, x);
33697: }
33698:
33699: public Object apply() {
33700: return Analyzer
33701: .cast(checkReducePatterns
33702: .apply(
33703: TypicalSupport.append$4735
33704: .apply(
33705: preList,
33706: new Pair<TypicalTypes.patternRecord>(
33707: x)),
33708: xs));
33709: }
33710: }.apply());
33711: }
33712: return null;
33713: }
33714: }.apply();
33715: }
33716: };
33717:
33718: final Function.F2<Object, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkReduceUnused = new Function.F2<Object, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
33719: public Object apply(
33720: final Pair<TypicalTypes.patternRecord> preList,
33721: final TypicalTypes.patternRecord pat) {
33722: return new Match<Object>() {
33723: public Object apply() {
33724: final Pair<TypicalTypes.patternRecord> arg$4951 = Analyzer
33725: .cast(preList);
33726:
33727: if ((null == arg$4951)) {
33728: return null;
33729: }
33730: if (TypicalSupport.match$4711(arg$4951)) {
33731: return Analyzer.cast(null);
33732: }
33733: if (true) {
33734: final Pair<TypicalTypes.patternRecord> list$4953 = Analyzer
33735: .cast(Analyzer.cast(arg$4951));
33736: final TypicalTypes.patternRecord x = Analyzer
33737: .cast(Primitives.wrapHead(list$4953));
33738: final Pair<TypicalTypes.patternRecord> xs = Analyzer
33739: .cast(Primitives.wrapTail(list$4953));
33740:
33741: return Analyzer.cast(null == containPattern
33742: .apply(x, pat) ? null : containPattern
33743: .apply(x, pat) ? new Let<Object>() {
33744: final Node nod;
33745:
33746: {
33747: nod = Analyzer.cast(null == pat ? null
33748: : pat.nod);
33749: }
33750:
33751: public Object apply() {
33752: return Analyzer.cast(error(
33753: "unused pattern", nod));
33754: }
33755: }.apply() : checkReduceUnused.apply(xs, pat));
33756: }
33757: return null;
33758: }
33759: }.apply();
33760: }
33761: };
33762:
33763: final Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord> containPattern = new Function.F2<Boolean, TypicalTypes.patternRecord, TypicalTypes.patternRecord>() {
33764: public Boolean apply(final TypicalTypes.patternRecord p,
33765: final TypicalTypes.patternRecord q) {
33766: return new Match<Boolean>() {
33767: public Boolean apply() {
33768: final TypicalTypes.pattern arg$4955 = Analyzer
33769: .cast(null == p ? null : p.pat);
33770:
33771: if ((null == arg$4955)) {
33772: return null;
33773: }
33774: if ((null != arg$4955))
33775: switch (arg$4955.tag()) {
33776: case PairPattern:
33777: if (TypicalSupport.match$4804(arg$4955)) {
33778: return Analyzer
33779: .cast(new Let<Boolean>() {
33780: final Pair<TypicalTypes.patternRecord> pl;
33781:
33782: {
33783: pl = Analyzer
33784: .cast(getListFromPair
33785: .apply(p));
33786: }
33787:
33788: public Boolean apply() {
33789: return Analyzer
33790: .cast(new Match<Boolean>() {
33791: public Boolean apply() {
33792: final TypicalTypes.pattern arg$4971 = Analyzer
33793: .cast(null == q ? null
33794: : q.pat);
33795:
33796: if ((null == arg$4971)) {
33797: return null;
33798: }
33799: if ((null != arg$4971))
33800: switch (arg$4971
33801: .tag()) {
33802: case PairPattern:
33803: if (TypicalSupport
33804: .match$4804(arg$4971)) {
33805: return Analyzer
33806: .cast(new Let<Boolean>() {
33807: final Pair<TypicalTypes.patternRecord> ql;
33808:
33809: {
33810: ql = Analyzer
33811: .cast(getListFromPair
33812: .apply(q));
33813: }
33814:
33815: public Boolean apply() {
33816: return Analyzer
33817: .cast(null == Primitives.greaterInt
33818: .apply(
33819: Primitives.length
33820: .apply(pl),
33821: Primitives.length
33822: .apply(ql)) ? null
33823: : Primitives.greaterInt
33824: .apply(
33825: Primitives.length
33826: .apply(pl),
33827: Primitives.length
33828: .apply(ql)) ? Boolean.FALSE
33829: : checkContain
33830: .apply(
33831: ql,
33832: pl));
33833: }
33834: }
33835: .apply());
33836: }
33837: break;
33838: case EmptyPattern:
33839: if (TypicalSupport
33840: .match$4797(arg$4971)) {
33841: return Analyzer
33842: .cast(new Let<Boolean>() {
33843: final Pair<TypicalTypes.patternRecord> ql;
33844:
33845: {
33846: ql = Analyzer
33847: .cast(getListFromPair
33848: .apply(q));
33849: }
33850:
33851: public Boolean apply() {
33852: return Analyzer
33853: .cast(null == Primitives.greaterInt
33854: .apply(
33855: Primitives.length
33856: .apply(pl),
33857: Primitives.length
33858: .apply(ql)) ? null
33859: : Primitives.greaterInt
33860: .apply(
33861: Primitives.length
33862: .apply(pl),
33863: Primitives.length
33864: .apply(ql)) ? Boolean.FALSE
33865: : checkContain
33866: .apply(
33867: ql,
33868: pl));
33869: }
33870: }
33871: .apply());
33872: }
33873: break;
33874: default:
33875: break;
33876: }
33877: ;
33878: if (true) {
33879: return Analyzer
33880: .cast(Boolean.FALSE);
33881: }
33882: return null;
33883: }
33884: }.apply());
33885: }
33886: }.apply());
33887: }
33888: break;
33889: case EmptyPattern:
33890: if (TypicalSupport.match$4797(arg$4955)) {
33891: return Analyzer
33892: .cast(new Let<Boolean>() {
33893: final Pair<TypicalTypes.patternRecord> pl;
33894:
33895: {
33896: pl = Analyzer
33897: .cast(getListFromPair
33898: .apply(p));
33899: }
33900:
33901: public Boolean apply() {
33902: return Analyzer
33903: .cast(new Match<Boolean>() {
33904: public Boolean apply() {
33905: final TypicalTypes.pattern arg$4962 = Analyzer
33906: .cast(null == q ? null
33907: : q.pat);
33908:
33909: if ((null == arg$4962)) {
33910: return null;
33911: }
33912: if ((null != arg$4962))
33913: switch (arg$4962
33914: .tag()) {
33915: case PairPattern:
33916: if (TypicalSupport
33917: .match$4804(arg$4962)) {
33918: return Analyzer
33919: .cast(new Let<Boolean>() {
33920: final Pair<TypicalTypes.patternRecord> ql;
33921:
33922: {
33923: ql = Analyzer
33924: .cast(getListFromPair
33925: .apply(q));
33926: }
33927:
33928: public Boolean apply() {
33929: return Analyzer
33930: .cast(null == Primitives.greaterInt
33931: .apply(
33932: Primitives.length
33933: .apply(pl),
33934: Primitives.length
33935: .apply(ql)) ? null
33936: : Primitives.greaterInt
33937: .apply(
33938: Primitives.length
33939: .apply(pl),
33940: Primitives.length
33941: .apply(ql)) ? Boolean.FALSE
33942: : checkContain
33943: .apply(
33944: ql,
33945: pl));
33946: }
33947: }
33948: .apply());
33949: }
33950: break;
33951: case EmptyPattern:
33952: if (TypicalSupport
33953: .match$4797(arg$4962)) {
33954: return Analyzer
33955: .cast(new Let<Boolean>() {
33956: final Pair<TypicalTypes.patternRecord> ql;
33957:
33958: {
33959: ql = Analyzer
33960: .cast(getListFromPair
33961: .apply(q));
33962: }
33963:
33964: public Boolean apply() {
33965: return Analyzer
33966: .cast(null == Primitives.greaterInt
33967: .apply(
33968: Primitives.length
33969: .apply(pl),
33970: Primitives.length
33971: .apply(ql)) ? null
33972: : Primitives.greaterInt
33973: .apply(
33974: Primitives.length
33975: .apply(pl),
33976: Primitives.length
33977: .apply(ql)) ? Boolean.FALSE
33978: : checkContain
33979: .apply(
33980: ql,
33981: pl));
33982: }
33983: }
33984: .apply());
33985: }
33986: break;
33987: default:
33988: break;
33989: }
33990: ;
33991: if (true) {
33992: return Analyzer
33993: .cast(Boolean.FALSE);
33994: }
33995: return null;
33996: }
33997: }.apply());
33998: }
33999: }.apply());
34000: }
34001: break;
34002: case WildCardPattern:
34003: if (TypicalSupport.match$4742(arg$4955)) {
34004: return Analyzer.cast(Boolean.TRUE);
34005: }
34006: break;
34007: default:
34008: break;
34009: }
34010: ;
34011: if (true) {
34012: return Analyzer.cast(Boolean.FALSE);
34013: }
34014: return null;
34015: }
34016: }.apply();
34017: }
34018: };
34019:
34020: final Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> getListFromPair = new Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
34021: public Pair<TypicalTypes.patternRecord> apply(
34022: final TypicalTypes.patternRecord p) {
34023: return new Match<Pair<TypicalTypes.patternRecord>>() {
34024: public Pair<TypicalTypes.patternRecord> apply() {
34025: final TypicalTypes.pattern arg$4976 = Analyzer
34026: .cast(null == p ? null : p.pat);
34027:
34028: if ((null == arg$4976)) {
34029: return null;
34030: }
34031: if ((null != arg$4976))
34032: switch (arg$4976.tag()) {
34033: case PairPattern:
34034: if (TypicalSupport.match$4804(arg$4976)) {
34035: final TypicalTypes.patternRecord hd = Analyzer
34036: .cast(arg$4976.getTuple()
34037: .get1());
34038: final TypicalTypes.patternRecord tl = Analyzer
34039: .cast(arg$4976.getTuple()
34040: .get2());
34041:
34042: return Analyzer
34043: .cast(TypicalSupport.append$4735
34044: .apply(
34045: new Pair<TypicalTypes.patternRecord>(
34046: hd),
34047: getListFromPair
34048: .apply(tl)));
34049: }
34050: break;
34051: case EmptyPattern:
34052: if (TypicalSupport.match$4797(arg$4976)) {
34053: return Analyzer
34054: .cast(Pair
34055: .<TypicalTypes.patternRecord> empty());
34056: }
34057: break;
34058: default:
34059: break;
34060: }
34061: ;
34062: if (true) {
34063: return Analyzer.cast(null);
34064: }
34065: return null;
34066: }
34067: }.apply();
34068: }
34069: };
34070:
34071: final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> checkContain = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
34072: public Boolean apply(final Pair<TypicalTypes.patternRecord> ql,
34073: final Pair<TypicalTypes.patternRecord> pl) {
34074: return new Match<Boolean>() {
34075: public Boolean apply() {
34076: final Pair<TypicalTypes.patternRecord> arg$4980 = Analyzer
34077: .cast(pl);
34078:
34079: if ((null == arg$4980)) {
34080: return null;
34081: }
34082: if (TypicalSupport.match$4711(arg$4980)) {
34083: return Analyzer.cast(Boolean.TRUE);
34084: }
34085: if (true) {
34086: final Pair<TypicalTypes.patternRecord> list$4982 = Analyzer
34087: .cast(Analyzer.cast(arg$4980));
34088: final TypicalTypes.patternRecord x = Analyzer
34089: .cast(Primitives.wrapHead(list$4982));
34090: final Pair<TypicalTypes.patternRecord> xs = Analyzer
34091: .cast(Primitives.wrapTail(list$4982));
34092:
34093: return Analyzer.cast(new Let<Boolean>() {
34094: final Pair<TypicalTypes.patternRecord> rem;
34095:
34096: {
34097: rem = Analyzer
34098: .cast(checkRemovePattern
34099: .apply(
34100: ql,
34101: x,
34102: Pair
34103: .<TypicalTypes.patternRecord> empty()));
34104: }
34105:
34106: public Boolean apply() {
34107: return Analyzer
34108: .cast(null == Primitives.isBottom
34109: .apply(rem) ? null
34110: : Primitives.isBottom
34111: .apply(rem) ? Boolean.FALSE
34112: : checkContain
34113: .apply(
34114: rem,
34115: xs));
34116: }
34117: }.apply());
34118: }
34119: return null;
34120: }
34121: }.apply();
34122: }
34123: };
34124:
34125: final Function.F3<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>> checkRemovePattern = new Function.F3<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, Pair<TypicalTypes.patternRecord>>() {
34126: public Pair<TypicalTypes.patternRecord> apply(
34127: final Pair<TypicalTypes.patternRecord> ql,
34128: final TypicalTypes.patternRecord pat,
34129: final Pair<TypicalTypes.patternRecord> rem) {
34130: return new Match<Pair<TypicalTypes.patternRecord>>() {
34131: public Pair<TypicalTypes.patternRecord> apply() {
34132: final Pair<TypicalTypes.patternRecord> arg$4984 = Analyzer
34133: .cast(ql);
34134:
34135: if ((null == arg$4984)) {
34136: return null;
34137: }
34138: if (TypicalSupport.match$4711(arg$4984)) {
34139: return Analyzer.cast(null);
34140: }
34141: if (true) {
34142: final Pair<TypicalTypes.patternRecord> list$4986 = Analyzer
34143: .cast(Analyzer.cast(arg$4984));
34144: final TypicalTypes.patternRecord x = Analyzer
34145: .cast(Primitives.wrapHead(list$4986));
34146: final Pair<TypicalTypes.patternRecord> xs = Analyzer
34147: .cast(Primitives.wrapTail(list$4986));
34148:
34149: return Analyzer
34150: .cast(null == isMoreGeneral.apply(x,
34151: pat) ? null
34152: : isMoreGeneral.apply(x, pat) ? TypicalSupport.append$4735
34153: .apply(rem, xs)
34154: : checkRemovePattern
34155: .apply(
34156: xs,
34157: pat,
34158: TypicalSupport.append$4735
34159: .apply(
34160: rem,
34161: new Pair<TypicalTypes.patternRecord>(
34162: x))));
34163: }
34164: return null;
34165: }
34166: }.apply();
34167: }
34168: };
34169:
34170: final Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> checkUsed = new Function.F2<Boolean, Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
34171: public Boolean apply(
34172: final Pair<TypicalTypes.patternRecord> preList,
34173: final TypicalTypes.patternRecord pat) {
34174: return new Match<Boolean>() {
34175: public Boolean apply() {
34176: final Pair<TypicalTypes.patternRecord> arg$4988 = Analyzer
34177: .cast(preList);
34178:
34179: if ((null == arg$4988)) {
34180: return null;
34181: }
34182: if (TypicalSupport.match$4711(arg$4988)) {
34183: return Analyzer.cast(Boolean.TRUE);
34184: }
34185: if (true) {
34186: final Pair<TypicalTypes.patternRecord> list$4990 = Analyzer
34187: .cast(Analyzer.cast(arg$4988));
34188: final TypicalTypes.patternRecord x = Analyzer
34189: .cast(Primitives.wrapHead(list$4990));
34190: final Pair<TypicalTypes.patternRecord> xs = Analyzer
34191: .cast(Primitives.wrapTail(list$4990));
34192:
34193: return Analyzer.cast(null == isMoreGeneral
34194: .apply(x, pat) ? null : isMoreGeneral
34195: .apply(x, pat) ? Boolean.FALSE
34196: : checkUsed.apply(xs, pat));
34197: }
34198: return null;
34199: }
34200: }.apply();
34201: }
34202: };
34203:
34204: final Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>> buildMatrix = new Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.patternRecord>>() {
34205: public Pair<Pair<TypicalTypes.patternRecord>> apply(
34206: final Pair<Pair<TypicalTypes.patternRecord>> matrix,
34207: final Pair<TypicalTypes.patternRecord> preList,
34208: final Pair<TypicalTypes.patternRecord> postList) {
34209: return new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
34210: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
34211: final Pair<TypicalTypes.patternRecord> arg$4992 = Analyzer
34212: .cast(postList);
34213:
34214: if ((null == arg$4992)) {
34215: return null;
34216: }
34217: if (TypicalSupport.match$4711(arg$4992)) {
34218: return Analyzer.cast(matrix);
34219: }
34220: if (true) {
34221: final Pair<TypicalTypes.patternRecord> list$4994 = Analyzer
34222: .cast(Analyzer.cast(arg$4992));
34223: final TypicalTypes.patternRecord x = Analyzer
34224: .cast(Primitives.wrapHead(list$4994));
34225: final Pair<TypicalTypes.patternRecord> xs = Analyzer
34226: .cast(Primitives.wrapTail(list$4994));
34227:
34228: return Analyzer
34229: .cast(null == (null == x ? null
34230: : x.guarded) ? null
34231: : (null == x ? null : x.guarded) ? buildMatrix
34232: .apply(
34233: matrix,
34234: TypicalSupport.append$4735
34235: .apply(
34236: preList,
34237: new Pair<TypicalTypes.patternRecord>(
34238: x)),
34239: xs)
34240: : null == Primitives.not
34241: .apply(checkUsed
34242: .apply(
34243: preList,
34244: x)) ? null
34245: : Primitives.not
34246: .apply(checkUsed
34247: .apply(
34248: preList,
34249: x)) ? buildMatrix
34250: .apply(
34251: matrix,
34252: preList,
34253: xs)
34254: : new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
34255: final Pair<TypicalTypes.patternRecord> row;
34256:
34257: {
34258: row = Analyzer
34259: .cast(new Pair<TypicalTypes.patternRecord>(
34260: x));
34261: }
34262:
34263: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
34264: return Analyzer
34265: .cast(buildMatrix
34266: .apply(
34267: TypicalSupport.append$4995
34268: .apply(
34269: matrix,
34270: new Pair<Pair<TypicalTypes.patternRecord>>(
34271: row)),
34272: TypicalSupport.append$4735
34273: .apply(
34274: preList,
34275: new Pair<TypicalTypes.patternRecord>(
34276: x)),
34277: xs));
34278: }
34279: }
34280: .apply());
34281: }
34282: return null;
34283: }
34284: }.apply();
34285: }
34286: };
34287:
34288: final Function.F2<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>, Pair<Pair<TypicalTypes.patternRecord>>> getSigma = new Function.F2<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>, Pair<Pair<TypicalTypes.patternRecord>>>() {
34289: public Pair<TypicalTypes.constr> apply(
34290: final Pair<TypicalTypes.constr> sigma,
34291: final Pair<Pair<TypicalTypes.patternRecord>> matrix) {
34292: return new Match<Pair<TypicalTypes.constr>>() {
34293: public Pair<TypicalTypes.constr> apply() {
34294: final Pair<Pair<TypicalTypes.patternRecord>> arg$4997 = Analyzer
34295: .cast(matrix);
34296:
34297: if ((null == arg$4997)) {
34298: return null;
34299: }
34300: if (TypicalSupport.match$4998(arg$4997)) {
34301: return Analyzer.cast(sigma);
34302: }
34303: if (true) {
34304: final Pair<Pair<TypicalTypes.patternRecord>> list$4999 = Analyzer
34305: .cast(Analyzer.cast(arg$4997));
34306: final Pair<TypicalTypes.patternRecord> x = Analyzer
34307: .cast(Primitives.wrapHead(list$4999));
34308: final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer
34309: .cast(Primitives.wrapTail(list$4999));
34310:
34311: return Analyzer
34312: .cast(new Let<Pair<TypicalTypes.constr>>() {
34313: final TypicalTypes.patternRecord patRec;
34314: final TypicalTypes.constr constructor;
34315:
34316: {
34317: patRec = Analyzer
34318: .cast(TypicalSupport.head$4913
34319: .apply(x));
34320: constructor = Analyzer
34321: .cast(getConstructor
34322: .apply(patRec));
34323: }
34324:
34325: public Pair<TypicalTypes.constr> apply() {
34326: return Analyzer
34327: .cast(getSigma
34328: .apply(
34329: TypicalSupport.append$5000
34330: .apply(
34331: sigma,
34332: new Pair<TypicalTypes.constr>(
34333: constructor)),
34334: xs));
34335: }
34336: }.apply());
34337: }
34338: return null;
34339: }
34340: }.apply();
34341: }
34342: };
34343:
34344: final Function.F1<TypicalTypes.constr, TypicalTypes.patternRecord> getConstructor = new Function.F1<TypicalTypes.constr, TypicalTypes.patternRecord>() {
34345: public TypicalTypes.constr apply(
34346: final TypicalTypes.patternRecord patRec) {
34347: return new Match<TypicalTypes.constr>() {
34348: public TypicalTypes.constr apply() {
34349: final TypicalTypes.pattern arg$5002 = Analyzer
34350: .cast(null == patRec ? null : patRec.pat);
34351:
34352: if ((null == arg$5002)) {
34353: return null;
34354: }
34355: if ((null != arg$5002))
34356: switch (arg$5002.tag()) {
34357: case PairPattern:
34358: if (TypicalSupport.match$4804(arg$5002)) {
34359: return Analyzer
34360: .cast(new TypicalTypes.PairConstr());
34361: }
34362: break;
34363: case ConstructorPattern:
34364: if (TypicalSupport.match$4790(arg$5002)) {
34365: final String s = Analyzer.cast(arg$5002
34366: .getTuple().get1());
34367: final Pair<TypicalTypes.patternRecord> pl = Analyzer
34368: .cast(arg$5002.getTuple()
34369: .get2());
34370:
34371: return Analyzer
34372: .cast(null == Primitives.isBottom
34373: .apply(pl) ? null
34374: : Primitives.isBottom
34375: .apply(pl) ? new TypicalTypes.CConstr(
34376: s,
34377: getConstructorSize
34378: .apply(s))
34379: : new TypicalTypes.CConstr(
34380: s,
34381: Primitives.length
34382: .apply(pl)));
34383: }
34384: break;
34385: case RecFieldPattern:
34386: if (TypicalSupport.match$4818(arg$5002)) {
34387: final TypicalTypes.patternRecord p = Analyzer
34388: .cast(arg$5002.getTuple()
34389: .get2());
34390:
34391: return Analyzer.cast(getConstructor
34392: .apply(p));
34393: }
34394: break;
34395: case VariablePattern:
34396: if (TypicalSupport.match$4744(arg$5002)) {
34397: return Analyzer
34398: .cast(new TypicalTypes.WildConstr());
34399: }
34400: break;
34401: case TupPattern:
34402: if (TypicalSupport.match$4783(arg$5002)) {
34403: final Pair<TypicalTypes.patternRecord> pl = Analyzer
34404: .cast(arg$5002.getTuple()
34405: .get1());
34406:
34407: return Analyzer
34408: .cast(new TypicalTypes.TupleConstr(
34409: Primitives.length
34410: .apply(pl)));
34411: }
34412: break;
34413: case BotPattern:
34414: if (TypicalSupport.match$4745(arg$5002)) {
34415: return Analyzer
34416: .cast(new TypicalTypes.BotConstr());
34417: }
34418: break;
34419: case RecPattern:
34420: if (TypicalSupport.match$4811(arg$5002)) {
34421: return Analyzer
34422: .cast(new Let<TypicalTypes.constr>() {
34423: final TypicalTypes.raw_type<?> ty;
34424:
34425: {
34426: ty = Analyzer
34427: .cast(Primitives.getAnnotation
34428: .apply(
34429: null == patRec ? null
34430: : patRec.nod,
34431: "__type"));
34432: }
34433:
34434: public TypicalTypes.constr apply() {
34435: return Analyzer
34436: .cast(new Match<TypicalTypes.constr>() {
34437: public TypicalTypes.constr apply() {
34438: final TypicalTypes.raw_type<?> arg$5012 = Analyzer
34439: .cast(ty);
34440:
34441: if ((null == arg$5012)) {
34442: return null;
34443: }
34444: if ((null != arg$5012))
34445: switch (arg$5012
34446: .tag()) {
34447: case RecordT:
34448: if (TypicalSupport
34449: .match$107(arg$5012)) {
34450: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
34451: .cast(arg$5012
34452: .getTuple()
34453: .get1());
34454:
34455: return Analyzer
34456: .cast(new TypicalTypes.RecordConstr(
34457: Primitives.length
34458: .apply(tl)));
34459: }
34460: break;
34461: default:
34462: break;
34463: }
34464: ;
34465: if (true) {
34466: return Analyzer
34467: .cast(null);
34468: }
34469: return null;
34470: }
34471: }.apply());
34472: }
34473: }.apply());
34474: }
34475: break;
34476: case EmptyPattern:
34477: if (TypicalSupport.match$4797(arg$5002)) {
34478: return Analyzer
34479: .cast(new TypicalTypes.EmptyConstr());
34480: }
34481: break;
34482: case ConstantPattern:
34483: if (TypicalSupport.match$4752(arg$5002)) {
34484: final TypicalTypes.value val = Analyzer
34485: .cast(arg$5002.getTuple()
34486: .get1());
34487:
34488: return Analyzer
34489: .cast(new TypicalTypes.Const(
34490: val));
34491: }
34492: break;
34493: case WildCardPattern:
34494: if (TypicalSupport.match$4742(arg$5002)) {
34495: return Analyzer
34496: .cast(new TypicalTypes.WildConstr());
34497: }
34498: break;
34499: default:
34500: break;
34501: }
34502: ;
34503: return null;
34504: }
34505: }.apply();
34506: }
34507: };
34508:
34509: final Function.F1<Boolean, Pair<Node>> checkExhaustive = new Function.F1<Boolean, Pair<Node>>() {
34510: public Boolean apply(final Pair<Node> nl) {
34511: return new Let<Boolean>() {
34512: final Node nod;
34513: final Pair<Node> pl;
34514: final Pair<TypicalTypes.patternRecord> patList;
34515: final Pair<Pair<TypicalTypes.patternRecord>> matrix;
34516:
34517: {
34518: nod = Analyzer.cast(TypicalSupport.head$279
34519: .apply(nl));
34520: pl = Analyzer.cast(getPatternNodes.apply(nl));
34521: patList = Analyzer
34522: .cast(getPatternRecords.apply(pl));
34523: matrix = Analyzer
34524: .cast(buildMatrix
34525: .apply(
34526: Pair
34527: .<Pair<TypicalTypes.patternRecord>> empty(),
34528: Pair
34529: .<TypicalTypes.patternRecord> empty(),
34530: patList));
34531: }
34532:
34533: public Boolean apply() {
34534: return Analyzer
34535: .cast(null == Primitives.equal.apply(
34536: Primitives.length.apply(matrix),
34537: BigInteger.valueOf(0)) ? null
34538: : Primitives.equal.apply(
34539: Primitives.length
34540: .apply(matrix),
34541: BigInteger.valueOf(0)) ? new Let<Boolean>() {
34542: {
34543: warning(
34544: "all patterns are guarded",
34545: nod);
34546: }
34547:
34548: public Boolean apply() {
34549: return Analyzer
34550: .cast(Boolean.TRUE);
34551: }
34552: }.apply()
34553: : null == quickPartialCheck
34554: .apply(matrix) ? null
34555: : quickPartialCheck
34556: .apply(matrix) ? Boolean.TRUE
34557: : new Let<Boolean>() {
34558: final TypicalTypes.result res;
34559:
34560: {
34561: res = Analyzer
34562: .cast(checkPartial
34563: .apply(
34564: matrix,
34565: BigInteger
34566: .valueOf(1)));
34567: }
34568:
34569: public Boolean apply() {
34570: return Analyzer
34571: .cast(new Match<Boolean>() {
34572: public Boolean apply() {
34573: final TypicalTypes.result arg$5020 = Analyzer
34574: .cast(res);
34575:
34576: if ((null == arg$5020)) {
34577: return null;
34578: }
34579: if ((null != arg$5020))
34580: switch (arg$5020
34581: .tag()) {
34582: case None:
34583: if (TypicalSupport
34584: .match$5021(arg$5020)) {
34585: return Analyzer
34586: .cast(Boolean.TRUE);
34587: }
34588: break;
34589: case Some:
34590: if (TypicalSupport
34591: .match$5022(arg$5020)) {
34592: final Pair<TypicalTypes.pattern> p = Analyzer
34593: .cast(arg$5020
34594: .getTuple()
34595: .get1());
34596:
34597: return Analyzer
34598: .cast(new Let<Boolean>() {
34599: final String mes;
34600:
34601: {
34602: mes = Analyzer
34603: .cast(showPatterns
34604: .apply(p));
34605: error(
34606: Primitives.concat
34607: .apply(
34608: Primitives.concat
34609: .apply(
34610: "non-exhaustive match, ",
34611: "an example of an unmatched value is: "),
34612: mes),
34613: nod);
34614: }
34615:
34616: public Boolean apply() {
34617: return Analyzer
34618: .cast(Boolean.FALSE);
34619: }
34620: }
34621: .apply());
34622: }
34623: break;
34624: default:
34625: break;
34626: }
34627: ;
34628: return null;
34629: }
34630: }
34631: .apply());
34632: }
34633: }.apply());
34634: }
34635: }.apply();
34636: }
34637: };
34638:
34639: final Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, BigInteger> checkPartial = new Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, BigInteger>() {
34640: public TypicalTypes.result apply(
34641: final Pair<Pair<TypicalTypes.patternRecord>> matrix,
34642: final BigInteger n) {
34643: return (null == Primitives.equal.apply(BigInteger
34644: .valueOf(0), n) ? null
34645: : Primitives.equal.apply(BigInteger.valueOf(0), n) ? (null == Primitives.greaterInt
34646: .apply(Primitives.length.apply(matrix),
34647: BigInteger.valueOf(0)) ? null
34648: : Primitives.greaterInt.apply(
34649: Primitives.length.apply(matrix),
34650: BigInteger.valueOf(0)) ? new TypicalTypes.None()
34651: : new TypicalTypes.Some(
34652: Pair
34653: .<TypicalTypes.pattern> empty()))
34654: : new Let<TypicalTypes.result>() {
34655: final Pair<TypicalTypes.constr> sigma;
34656:
34657: {
34658: sigma = Analyzer
34659: .cast(getSigma
34660: .apply(
34661: Pair
34662: .<TypicalTypes.constr> empty(),
34663: matrix));
34664: }
34665:
34666: public TypicalTypes.result apply() {
34667: return Analyzer
34668: .cast(null == completeSigma
34669: .apply(sigma) ? null
34670: : completeSigma
34671: .apply(sigma) ? checkSubPartials
34672: .apply(
34673: matrix,
34674: sigma)
34675: : new Let<TypicalTypes.result>() {
34676: final Pair<Pair<TypicalTypes.patternRecord>> dMatrix;
34677: final TypicalTypes.result res;
34678:
34679: {
34680: dMatrix = Analyzer
34681: .cast(buildDMatrix
34682: .apply(matrix));
34683: res = Analyzer
34684: .cast(checkPartial
34685: .apply(
34686: dMatrix,
34687: Primitives.subtractInt
34688: .apply(
34689: n,
34690: BigInteger
34691: .valueOf(1))));
34692: }
34693:
34694: public TypicalTypes.result apply() {
34695: return Analyzer
34696: .cast(new Match<TypicalTypes.result>() {
34697: public TypicalTypes.result apply() {
34698: final TypicalTypes.result arg$5024 = Analyzer
34699: .cast(res);
34700:
34701: if ((null == arg$5024)) {
34702: return null;
34703: }
34704: if ((null != arg$5024))
34705: switch (arg$5024
34706: .tag()) {
34707: case None:
34708: if (TypicalSupport
34709: .match$5021(arg$5024)) {
34710: return Analyzer
34711: .cast(new TypicalTypes.None());
34712: }
34713: break;
34714: case Some:
34715: if (TypicalSupport
34716: .match$5022(arg$5024)) {
34717: final Pair<TypicalTypes.pattern> pl = Analyzer
34718: .cast(arg$5024
34719: .getTuple()
34720: .get1());
34721:
34722: return Analyzer
34723: .cast(null == emptySigma
34724: .apply(sigma) ? null
34725: : emptySigma
34726: .apply(sigma) ? new TypicalTypes.Some(
34727: TypicalSupport.append$5027
34728: .apply(
34729: new Pair<TypicalTypes.pattern>(
34730: new TypicalTypes.WildCardPattern()),
34731: pl))
34732: : new Let<TypicalTypes.result>() {
34733: final TypicalTypes.pattern p;
34734:
34735: {
34736: p = Analyzer
34737: .cast(findUnmatchedPattern
34738: .apply(sigma));
34739: }
34740:
34741: public TypicalTypes.result apply() {
34742: return Analyzer
34743: .cast(new TypicalTypes.Some(
34744: TypicalSupport.append$5027
34745: .apply(
34746: new Pair<TypicalTypes.pattern>(
34747: p),
34748: pl)));
34749: }
34750: }
34751: .apply());
34752: }
34753: break;
34754: default:
34755: break;
34756: }
34757: ;
34758: return null;
34759: }
34760: }
34761: .apply());
34762: }
34763: }.apply());
34764: }
34765: }.apply());
34766: }
34767: };
34768:
34769: final Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.constr>> checkSubPartials = new Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, Pair<TypicalTypes.constr>>() {
34770: public TypicalTypes.result apply(
34771: final Pair<Pair<TypicalTypes.patternRecord>> matrix,
34772: final Pair<TypicalTypes.constr> sigma) {
34773: return new Match<TypicalTypes.result>() {
34774: public TypicalTypes.result apply() {
34775: final Pair<TypicalTypes.constr> arg$5029 = Analyzer
34776: .cast(sigma);
34777:
34778: if ((null == arg$5029)) {
34779: return null;
34780: }
34781: if (TypicalSupport.match$5030(arg$5029)) {
34782: return Analyzer.cast(new TypicalTypes.None());
34783: }
34784: if (true) {
34785: final Pair<TypicalTypes.constr> list$5031 = Analyzer
34786: .cast(Analyzer.cast(arg$5029));
34787: final TypicalTypes.constr x = Analyzer
34788: .cast(Primitives.wrapHead(list$5031));
34789: final Pair<TypicalTypes.constr> xs = Analyzer
34790: .cast(Primitives.wrapTail(list$5031));
34791:
34792: return Analyzer
34793: .cast(new Match<TypicalTypes.result>() {
34794: public TypicalTypes.result apply() {
34795: final TypicalTypes.constr arg$5041 = Analyzer
34796: .cast(x);
34797:
34798: if ((null == arg$5041)) {
34799: return null;
34800: }
34801: if ((null != arg$5041))
34802: switch (arg$5041.tag()) {
34803: case WildConstr:
34804: if (TypicalSupport
34805: .match$5033(arg$5041)) {
34806: return Analyzer
34807: .cast(checkSubPartials
34808: .apply(
34809: matrix,
34810: xs));
34811: }
34812: break;
34813: default:
34814: break;
34815: }
34816: ;
34817: if (true) {
34818: return Analyzer
34819: .cast(new Let<TypicalTypes.result>() {
34820: final TypicalTypes.result res;
34821:
34822: {
34823: res = Analyzer
34824: .cast(checkSubPartial
34825: .apply(
34826: matrix,
34827: x));
34828: }
34829:
34830: public TypicalTypes.result apply() {
34831: return Analyzer
34832: .cast(new Match<TypicalTypes.result>() {
34833: public TypicalTypes.result apply() {
34834: final TypicalTypes.result arg$5046 = Analyzer
34835: .cast(res);
34836:
34837: if ((null == arg$5046)) {
34838: return null;
34839: }
34840: if ((null != arg$5046))
34841: switch (arg$5046
34842: .tag()) {
34843: case Some:
34844: if (TypicalSupport
34845: .match$5022(arg$5046)) {
34846: return Analyzer
34847: .cast(res);
34848: }
34849: break;
34850: default:
34851: break;
34852: }
34853: ;
34854: if (true) {
34855: return Analyzer
34856: .cast(checkSubPartials
34857: .apply(
34858: matrix,
34859: xs));
34860: }
34861: return null;
34862: }
34863: }
34864: .apply());
34865: }
34866: }.apply());
34867: }
34868: return null;
34869: }
34870: }.apply());
34871: }
34872: return null;
34873: }
34874: }.apply();
34875: }
34876: };
34877:
34878: final Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr> checkSubPartial = new Function.F2<TypicalTypes.result, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr>() {
34879: public TypicalTypes.result apply(
34880: final Pair<Pair<TypicalTypes.patternRecord>> matrix,
34881: final TypicalTypes.constr ck) {
34882: return new Let<TypicalTypes.result>() {
34883: final Pair<Pair<TypicalTypes.patternRecord>> sMatrix;
34884: final BigInteger len;
34885: final TypicalTypes.result res;
34886:
34887: {
34888: sMatrix = Analyzer
34889: .cast(buildSMatrix
34890: .apply(
34891: matrix,
34892: ck,
34893: Pair
34894: .<Pair<TypicalTypes.patternRecord>> empty()));
34895: len = Analyzer.cast(Primitives.length
34896: .apply(TypicalSupport.head$5055
34897: .apply(sMatrix)));
34898: res = Analyzer.cast(checkPartial
34899: .apply(sMatrix, len));
34900: }
34901:
34902: public TypicalTypes.result apply() {
34903: return Analyzer
34904: .cast(new Match<TypicalTypes.result>() {
34905: public TypicalTypes.result apply() {
34906: final TypicalTypes.result arg$5051 = Analyzer
34907: .cast(res);
34908:
34909: if ((null == arg$5051)) {
34910: return null;
34911: }
34912: if ((null != arg$5051))
34913: switch (arg$5051.tag()) {
34914: case None:
34915: if (TypicalSupport
34916: .match$5021(arg$5051)) {
34917: return Analyzer
34918: .cast(new TypicalTypes.None());
34919: }
34920: break;
34921: case Some:
34922: if (TypicalSupport
34923: .match$5022(arg$5051)) {
34924: final Pair<TypicalTypes.pattern> pl = Analyzer
34925: .cast(arg$5051
34926: .getTuple()
34927: .get1());
34928:
34929: return Analyzer
34930: .cast(new TypicalTypes.Some(
34931: buildResultPattern
34932: .apply(
34933: pl,
34934: ck)));
34935: }
34936: break;
34937: default:
34938: break;
34939: }
34940: ;
34941: return null;
34942: }
34943: }.apply());
34944: }
34945: }.apply();
34946: }
34947: };
34948:
34949: final Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr, Pair<Pair<TypicalTypes.patternRecord>>> buildSMatrix = new Function.F3<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>, TypicalTypes.constr, Pair<Pair<TypicalTypes.patternRecord>>>() {
34950: public Pair<Pair<TypicalTypes.patternRecord>> apply(
34951: final Pair<Pair<TypicalTypes.patternRecord>> matrix,
34952: final TypicalTypes.constr ck,
34953: final Pair<Pair<TypicalTypes.patternRecord>> res) {
34954: return new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
34955: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
34956: final Pair<Pair<TypicalTypes.patternRecord>> arg$5056 = Analyzer
34957: .cast(matrix);
34958:
34959: if ((null == arg$5056)) {
34960: return null;
34961: }
34962: if (TypicalSupport.match$4998(arg$5056)) {
34963: return Analyzer.cast(res);
34964: }
34965: if (true) {
34966: final Pair<Pair<TypicalTypes.patternRecord>> list$5058 = Analyzer
34967: .cast(Analyzer.cast(arg$5056));
34968: final Pair<TypicalTypes.patternRecord> x = Analyzer
34969: .cast(Primitives.wrapHead(list$5058));
34970: final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer
34971: .cast(Primitives.wrapTail(list$5058));
34972:
34973: return Analyzer
34974: .cast(new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
34975: final TypicalTypes.constr co;
34976:
34977: {
34978: co = Analyzer
34979: .cast(getConstructor
34980: .apply(TypicalSupport.head$4913
34981: .apply(x)));
34982: }
34983:
34984: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
34985: return Analyzer
34986: .cast(null == Primitives.equal
34987: .apply(co, ck) ? null
34988: : Primitives.equal
34989: .apply(
34990: co,
34991: ck) ? new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
34992: final Pair<TypicalTypes.patternRecord> subList;
34993: final Pair<TypicalTypes.patternRecord> newRow;
34994:
34995: {
34996: subList = Analyzer
34997: .cast(expandPattern
34998: .apply(
34999: TypicalSupport.head$4913
35000: .apply(x),
35001: ck));
35002: newRow = Analyzer
35003: .cast(TypicalSupport.append$4735
35004: .apply(
35005: subList,
35006: TypicalSupport.tail$4914
35007: .apply(x)));
35008: }
35009:
35010: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
35011: return Analyzer
35012: .cast(buildSMatrix
35013: .apply(
35014: xs,
35015: ck,
35016: TypicalSupport.append$4995
35017: .apply(
35018: res,
35019: new Pair<Pair<TypicalTypes.patternRecord>>(
35020: newRow))));
35021: }
35022: }.apply()
35023: : buildSMatrix
35024: .apply(
35025: xs,
35026: ck,
35027: res));
35028: }
35029: }.apply());
35030: }
35031: return null;
35032: }
35033: }.apply();
35034: }
35035: };
35036:
35037: final Function.F2<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, TypicalTypes.constr> expandPattern = new Function.F2<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord, TypicalTypes.constr>() {
35038: public Pair<TypicalTypes.patternRecord> apply(
35039: final TypicalTypes.patternRecord p,
35040: final TypicalTypes.constr ck) {
35041: return new Match<Pair<TypicalTypes.patternRecord>>() {
35042: public Pair<TypicalTypes.patternRecord> apply() {
35043: final TypicalTypes.constr arg$5060 = Analyzer
35044: .cast(ck);
35045:
35046: if ((null == arg$5060)) {
35047: return null;
35048: }
35049: if ((null != arg$5060))
35050: switch (arg$5060.tag()) {
35051: case RecordConstr:
35052: if (TypicalSupport.match$5065(arg$5060)) {
35053: return Analyzer.cast(expandRecPattern
35054: .apply(p));
35055: }
35056: break;
35057: case Const:
35058: if (TypicalSupport.match$5063(arg$5060)) {
35059: return Analyzer
35060: .cast(Pair
35061: .<TypicalTypes.patternRecord> empty());
35062: }
35063: break;
35064: case TupleConstr:
35065: if (TypicalSupport.match$5066(arg$5060)) {
35066: return Analyzer
35067: .cast(new Match<Pair<TypicalTypes.patternRecord>>() {
35068: public Pair<TypicalTypes.patternRecord> apply() {
35069: final TypicalTypes.pattern arg$5070 = Analyzer
35070: .cast(null == p ? null
35071: : p.pat);
35072:
35073: if ((null == arg$5070)) {
35074: return null;
35075: }
35076: if ((null != arg$5070))
35077: switch (arg$5070
35078: .tag()) {
35079: case TupPattern:
35080: if (TypicalSupport
35081: .match$4783(arg$5070)) {
35082: final Pair<TypicalTypes.patternRecord> pl = Analyzer
35083: .cast(arg$5070
35084: .getTuple()
35085: .get1());
35086:
35087: return Analyzer
35088: .cast(pl);
35089: }
35090: break;
35091: default:
35092: break;
35093: }
35094: ;
35095: if (true) {
35096: return Analyzer
35097: .cast(null);
35098: }
35099: return null;
35100: }
35101: }.apply());
35102: }
35103: break;
35104: case WildConstr:
35105: if (TypicalSupport.match$5033(arg$5060)) {
35106: return Analyzer
35107: .cast(Pair
35108: .<TypicalTypes.patternRecord> empty());
35109: }
35110: break;
35111: case CConstr:
35112: if (TypicalSupport.match$5080(arg$5060)) {
35113: return Analyzer
35114: .cast(new Match<Pair<TypicalTypes.patternRecord>>() {
35115: public Pair<TypicalTypes.patternRecord> apply() {
35116: final TypicalTypes.pattern arg$5084 = Analyzer
35117: .cast(null == p ? null
35118: : p.pat);
35119:
35120: if ((null == arg$5084)) {
35121: return null;
35122: }
35123: if ((null != arg$5084))
35124: switch (arg$5084
35125: .tag()) {
35126: case ConstructorPattern:
35127: if (TypicalSupport
35128: .match$4790(arg$5084)) {
35129: final String s = Analyzer
35130: .cast(arg$5084
35131: .getTuple()
35132: .get1());
35133: final Pair<TypicalTypes.patternRecord> pl = Analyzer
35134: .cast(arg$5084
35135: .getTuple()
35136: .get2());
35137:
35138: return Analyzer
35139: .cast(null == Primitives.isBottom
35140: .apply(pl) ? null
35141: : Primitives.isBottom
35142: .apply(pl) ? new Let<Pair<TypicalTypes.patternRecord>>() {
35143: final BigInteger si;
35144:
35145: {
35146: si = Analyzer
35147: .cast(getConstructorSize
35148: .apply(s));
35149: }
35150:
35151: public Pair<TypicalTypes.patternRecord> apply() {
35152: return Analyzer
35153: .cast(makeWildCards
35154: .apply(si));
35155: }
35156: }
35157: .apply()
35158: : pl);
35159: }
35160: break;
35161: default:
35162: break;
35163: }
35164: ;
35165: if (true) {
35166: return Analyzer
35167: .cast(null);
35168: }
35169: return null;
35170: }
35171: }.apply());
35172: }
35173: break;
35174: case BotConstr:
35175: if (TypicalSupport.match$5061(arg$5060)) {
35176: return Analyzer
35177: .cast(Pair
35178: .<TypicalTypes.patternRecord> empty());
35179: }
35180: break;
35181: case EmptyConstr:
35182: if (TypicalSupport.match$5064(arg$5060)) {
35183: return Analyzer
35184: .cast(Pair
35185: .<TypicalTypes.patternRecord> empty());
35186: }
35187: break;
35188: case PairConstr:
35189: if (TypicalSupport.match$5073(arg$5060)) {
35190: return Analyzer
35191: .cast(new Match<Pair<TypicalTypes.patternRecord>>() {
35192: public Pair<TypicalTypes.patternRecord> apply() {
35193: final TypicalTypes.pattern arg$5077 = Analyzer
35194: .cast(null == p ? null
35195: : p.pat);
35196:
35197: if ((null == arg$5077)) {
35198: return null;
35199: }
35200: if ((null != arg$5077))
35201: switch (arg$5077
35202: .tag()) {
35203: case PairPattern:
35204: if (TypicalSupport
35205: .match$4804(arg$5077)) {
35206: final TypicalTypes.patternRecord hd = Analyzer
35207: .cast(arg$5077
35208: .getTuple()
35209: .get1());
35210: final TypicalTypes.patternRecord tl = Analyzer
35211: .cast(arg$5077
35212: .getTuple()
35213: .get2());
35214:
35215: return Analyzer
35216: .cast(new Pair<TypicalTypes.patternRecord>(
35217: hd)
35218: .append(new Pair<TypicalTypes.patternRecord>(
35219: tl)));
35220: }
35221: break;
35222: default:
35223: break;
35224: }
35225: ;
35226: if (true) {
35227: return Analyzer
35228: .cast(null);
35229: }
35230: return null;
35231: }
35232: }.apply());
35233: }
35234: break;
35235: default:
35236: break;
35237: }
35238: ;
35239: return null;
35240: }
35241: }.apply();
35242: }
35243: };
35244:
35245: final Function.F1<BigInteger, String> getConstructorSize = new Function.F1<BigInteger, String>() {
35246: public BigInteger apply(final String s) {
35247: return new Let<BigInteger>() {
35248: final TypicalTypes.raw_type<?> t;
35249:
35250: {
35251: t = Analyzer.cast(Analyzer.cast(lookup2.apply(GNode
35252: .create("TypeConstructor", s, null),
35253: getNameSpace)));
35254: }
35255:
35256: public BigInteger apply() {
35257: return Analyzer.cast(new Match<BigInteger>() {
35258: public BigInteger apply() {
35259: final TypicalTypes.raw_type<?> arg$5088 = Analyzer
35260: .cast(t);
35261:
35262: if ((null == arg$5088)) {
35263: return null;
35264: }
35265: if ((null != arg$5088))
35266: switch (arg$5088.tag()) {
35267: case ConstructorT:
35268: if (TypicalSupport
35269: .match$94(arg$5088)) {
35270: final TypicalTypes.raw_type<?> ty = Analyzer
35271: .cast(arg$5088
35272: .getTuple()
35273: .get3());
35274:
35275: return Analyzer
35276: .cast(null == Primitives.isBottom
35277: .apply(ty) ? null
35278: : Primitives.isBottom
35279: .apply(ty) ? BigInteger
35280: .valueOf(0)
35281: : new Match<BigInteger>() {
35282: public BigInteger apply() {
35283: final TypicalTypes.raw_type<?> arg$5093 = Analyzer
35284: .cast(ty);
35285:
35286: if ((null == arg$5093)) {
35287: return null;
35288: }
35289: if ((null != arg$5093))
35290: switch (arg$5093
35291: .tag()) {
35292: case TupleT:
35293: if (TypicalSupport
35294: .match$114(arg$5093)) {
35295: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
35296: .cast(arg$5093
35297: .getTuple()
35298: .get1());
35299:
35300: return Analyzer
35301: .cast(Primitives.length
35302: .apply(tl));
35303: }
35304: break;
35305: default:
35306: break;
35307: }
35308: ;
35309: if (true) {
35310: return Analyzer
35311: .cast(BigInteger
35312: .valueOf(1));
35313: }
35314: return null;
35315: }
35316: }
35317: .apply());
35318: }
35319: break;
35320: default:
35321: break;
35322: }
35323: ;
35324: if (true) {
35325: return Analyzer.cast(null);
35326: }
35327: return null;
35328: }
35329: }.apply());
35330: }
35331: }.apply();
35332: }
35333: };
35334:
35335: final Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord> expandRecPattern = new Function.F1<Pair<TypicalTypes.patternRecord>, TypicalTypes.patternRecord>() {
35336: public Pair<TypicalTypes.patternRecord> apply(
35337: final TypicalTypes.patternRecord p) {
35338: return new Let<Pair<TypicalTypes.patternRecord>>() {
35339: final Node no;
35340: final TypicalTypes.raw_type<?> ty;
35341:
35342: {
35343: no = Analyzer.cast(null == p ? null : p.nod);
35344: ty = Analyzer.cast(Primitives.getAnnotation.apply(
35345: no, "__type"));
35346: }
35347:
35348: public Pair<TypicalTypes.patternRecord> apply() {
35349: return Analyzer
35350: .cast(new Match<Pair<TypicalTypes.patternRecord>>() {
35351: public Pair<TypicalTypes.patternRecord> apply() {
35352: final TypicalTypes.raw_type<?> arg$5097 = Analyzer
35353: .cast(ty);
35354:
35355: if ((null == arg$5097)) {
35356: return null;
35357: }
35358: if ((null != arg$5097))
35359: switch (arg$5097.tag()) {
35360: case RecordT:
35361: if (TypicalSupport
35362: .match$107(arg$5097)) {
35363: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
35364: .cast(arg$5097
35365: .getTuple()
35366: .get1());
35367:
35368: return Analyzer
35369: .cast(new Match<Pair<TypicalTypes.patternRecord>>() {
35370: public Pair<TypicalTypes.patternRecord> apply() {
35371: final TypicalTypes.pattern arg$5102 = Analyzer
35372: .cast(null == p ? null
35373: : p.pat);
35374:
35375: if ((null == arg$5102)) {
35376: return null;
35377: }
35378: if ((null != arg$5102))
35379: switch (arg$5102
35380: .tag()) {
35381: case RecPattern:
35382: if (TypicalSupport
35383: .match$4811(arg$5102)) {
35384: final Pair<TypicalTypes.patternRecord> pl = Analyzer
35385: .cast(arg$5102
35386: .getTuple()
35387: .get1());
35388:
35389: return Analyzer
35390: .cast(makeFieldPatterns
35391: .apply(
35392: tl,
35393: pl));
35394: }
35395: break;
35396: default:
35397: break;
35398: }
35399: ;
35400: if (true) {
35401: return Analyzer
35402: .cast(null);
35403: }
35404: return null;
35405: }
35406: }.apply());
35407: }
35408: break;
35409: default:
35410: break;
35411: }
35412: ;
35413: if (true) {
35414: return Analyzer.cast(null);
35415: }
35416: return null;
35417: }
35418: }.apply());
35419: }
35420: }.apply();
35421: }
35422: };
35423:
35424: final Function.F2<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.patternRecord>> makeFieldPatterns = new Function.F2<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.patternRecord>>() {
35425: public Pair<TypicalTypes.patternRecord> apply(
35426: final Pair<TypicalTypes.raw_type<?>> tl,
35427: final Pair<TypicalTypes.patternRecord> pl) {
35428: return new Match<Pair<TypicalTypes.patternRecord>>() {
35429: public Pair<TypicalTypes.patternRecord> apply() {
35430: final Pair<TypicalTypes.raw_type<?>> arg$5106 = Analyzer
35431: .cast(tl);
35432:
35433: if ((null == arg$5106)) {
35434: return null;
35435: }
35436: if (TypicalSupport.match$122(arg$5106)) {
35437: return Analyzer.cast(Pair
35438: .<TypicalTypes.patternRecord> empty());
35439: }
35440: if (true) {
35441: final Pair<TypicalTypes.raw_type<?>> list$5108 = Analyzer
35442: .cast(Analyzer.cast(arg$5106));
35443: final TypicalTypes.raw_type<?> x = Analyzer
35444: .cast(Primitives.wrapHead(list$5108));
35445: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
35446: .cast(Primitives.wrapTail(list$5108));
35447:
35448: return Analyzer
35449: .cast(new Let<Pair<TypicalTypes.patternRecord>>() {
35450: final String s;
35451: final TypicalTypes.patternRecord p;
35452:
35453: {
35454: s = Analyzer
35455: .cast(new Match<String>() {
35456: public String apply() {
35457: final TypicalTypes.raw_type<?> arg$5112 = Analyzer
35458: .cast(x);
35459:
35460: if ((null == arg$5112)) {
35461: return null;
35462: }
35463: if ((null != arg$5112))
35464: switch (arg$5112
35465: .tag()) {
35466: case FieldT:
35467: if (TypicalSupport
35468: .match$96(arg$5112)) {
35469: final String str = Analyzer
35470: .cast(arg$5112
35471: .getTuple()
35472: .get2());
35473:
35474: return Analyzer
35475: .cast(str);
35476: }
35477: break;
35478: default:
35479: break;
35480: }
35481: ;
35482: if (true) {
35483: return Analyzer
35484: .cast(null);
35485: }
35486: return null;
35487: }
35488: }.apply());
35489: p = Analyzer
35490: .cast(makeFieldPattern
35491: .apply(s, pl));
35492: }
35493:
35494: public Pair<TypicalTypes.patternRecord> apply() {
35495: return Analyzer
35496: .cast(TypicalSupport.append$4735
35497: .apply(
35498: new Pair<TypicalTypes.patternRecord>(
35499: p),
35500: makeFieldPatterns
35501: .apply(
35502: xs,
35503: pl)));
35504: }
35505: }.apply());
35506: }
35507: return null;
35508: }
35509: }.apply();
35510: }
35511: };
35512:
35513: final Function.F2<TypicalTypes.patternRecord, String, Pair<TypicalTypes.patternRecord>> makeFieldPattern = new Function.F2<TypicalTypes.patternRecord, String, Pair<TypicalTypes.patternRecord>>() {
35514: public TypicalTypes.patternRecord apply(final String s,
35515: final Pair<TypicalTypes.patternRecord> pl) {
35516: return new Match<TypicalTypes.patternRecord>() {
35517: public TypicalTypes.patternRecord apply() {
35518: final Pair<TypicalTypes.patternRecord> arg$5116 = Analyzer
35519: .cast(pl);
35520:
35521: if ((null == arg$5116)) {
35522: return null;
35523: }
35524: if (TypicalSupport.match$4711(arg$5116)) {
35525: return Analyzer
35526: .cast(new Let<TypicalTypes.patternRecord>() {
35527: final TypicalTypes.patternRecord wild;
35528:
35529: {
35530: wild = Analyzer
35531: .cast(new TypicalTypes.patternRecord(
35532: new TypicalTypes.WildCardPattern(),
35533: null,
35534: Boolean.FALSE));
35535: }
35536:
35537: public TypicalTypes.patternRecord apply() {
35538: return Analyzer
35539: .cast(new TypicalTypes.patternRecord(
35540: new TypicalTypes.RecFieldPattern(
35541: s, wild),
35542: null,
35543: Boolean.FALSE));
35544: }
35545: }.apply());
35546: }
35547: if (true) {
35548: final Pair<TypicalTypes.patternRecord> list$5118 = Analyzer
35549: .cast(Analyzer.cast(arg$5116));
35550: final TypicalTypes.patternRecord x = Analyzer
35551: .cast(Primitives.wrapHead(list$5118));
35552: final Pair<TypicalTypes.patternRecord> xs = Analyzer
35553: .cast(Primitives.wrapTail(list$5118));
35554:
35555: return Analyzer
35556: .cast(new Match<TypicalTypes.patternRecord>() {
35557: public TypicalTypes.patternRecord apply() {
35558: final TypicalTypes.pattern arg$5122 = Analyzer
35559: .cast(null == x ? null
35560: : x.pat);
35561:
35562: if ((null == arg$5122)) {
35563: return null;
35564: }
35565: if ((null != arg$5122))
35566: switch (arg$5122.tag()) {
35567: case RecFieldPattern:
35568: if (TypicalSupport
35569: .match$4818(arg$5122)) {
35570: final String str = Analyzer
35571: .cast(arg$5122
35572: .getTuple()
35573: .get1());
35574:
35575: return Analyzer
35576: .cast(null == Primitives.equal
35577: .apply(
35578: str,
35579: s) ? null
35580: : Primitives.equal
35581: .apply(
35582: str,
35583: s) ? x
35584: : makeFieldPattern
35585: .apply(
35586: s,
35587: xs));
35588: }
35589: break;
35590: default:
35591: break;
35592: }
35593: ;
35594: if (true) {
35595: return Analyzer.cast(null);
35596: }
35597: return null;
35598: }
35599: }.apply());
35600: }
35601: return null;
35602: }
35603: }.apply();
35604: }
35605: };
35606:
35607: final Function.F1<Pair<TypicalTypes.patternRecord>, BigInteger> makeWildCards = new Function.F1<Pair<TypicalTypes.patternRecord>, BigInteger>() {
35608: public Pair<TypicalTypes.patternRecord> apply(final BigInteger n) {
35609: return new Match<Pair<TypicalTypes.patternRecord>>() {
35610: public Pair<TypicalTypes.patternRecord> apply() {
35611: final BigInteger arg$5126 = Analyzer.cast(n);
35612:
35613: if ((null == arg$5126)) {
35614: return null;
35615: }
35616: if ((null != BigInteger.valueOf(0) && BigInteger
35617: .valueOf(0).equals(arg$5126))) {
35618: return Analyzer.cast(Pair
35619: .<TypicalTypes.patternRecord> empty());
35620: }
35621: if (true) {
35622: return Analyzer
35623: .cast(new Let<Pair<TypicalTypes.patternRecord>>() {
35624: final TypicalTypes.patternRecord wild;
35625:
35626: {
35627: wild = Analyzer
35628: .cast(new TypicalTypes.patternRecord(
35629: new TypicalTypes.WildCardPattern(),
35630: null,
35631: Boolean.FALSE));
35632: }
35633:
35634: public Pair<TypicalTypes.patternRecord> apply() {
35635: return Analyzer
35636: .cast(TypicalSupport.append$4735
35637: .apply(
35638: new Pair<TypicalTypes.patternRecord>(
35639: wild),
35640: makeWildCards
35641: .apply(Primitives.subtractInt
35642: .apply(
35643: n,
35644: BigInteger
35645: .valueOf(1)))));
35646: }
35647: }.apply());
35648: }
35649: return null;
35650: }
35651: }.apply();
35652: }
35653: };
35654:
35655: final Function.F2<Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>, TypicalTypes.constr> buildResultPattern = new Function.F2<Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>, TypicalTypes.constr>() {
35656: public Pair<TypicalTypes.pattern> apply(
35657: final Pair<TypicalTypes.pattern> pl,
35658: final TypicalTypes.constr ck) {
35659: return new Match<Pair<TypicalTypes.pattern>>() {
35660: public Pair<TypicalTypes.pattern> apply() {
35661: final TypicalTypes.constr arg$5128 = Analyzer
35662: .cast(ck);
35663:
35664: if ((null == arg$5128)) {
35665: return null;
35666: }
35667: if ((null != arg$5128))
35668: switch (arg$5128.tag()) {
35669: case RecordConstr:
35670: if (TypicalSupport.match$5065(arg$5128)) {
35671: final BigInteger size = Analyzer
35672: .cast(arg$5128.getTuple()
35673: .get1());
35674:
35675: return Analyzer
35676: .cast(reduceRecordPattern
35677: .apply(
35678: size,
35679: pl,
35680: Pair
35681: .<TypicalTypes.pattern> empty()));
35682: }
35683: break;
35684: case Const:
35685: if (TypicalSupport.match$5063(arg$5128)) {
35686: final TypicalTypes.value val = Analyzer
35687: .cast(arg$5128.getTuple()
35688: .get1());
35689:
35690: return Analyzer
35691: .cast(Primitives
35692: .wrapCons(
35693: new TypicalTypes.ConstantPattern(
35694: val),
35695: pl));
35696: }
35697: break;
35698: case TupleConstr:
35699: if (TypicalSupport.match$5066(arg$5128)) {
35700: final BigInteger size = Analyzer
35701: .cast(arg$5128.getTuple()
35702: .get1());
35703:
35704: return Analyzer
35705: .cast(reduceTuplePattern
35706: .apply(
35707: size,
35708: pl,
35709: Pair
35710: .<TypicalTypes.pattern> empty()));
35711: }
35712: break;
35713: case WildConstr:
35714: if (TypicalSupport.match$5033(arg$5128)) {
35715: return Analyzer
35716: .cast(Primitives
35717: .wrapCons(
35718: new TypicalTypes.WildCardPattern(),
35719: pl));
35720: }
35721: break;
35722: case CConstr:
35723: if (TypicalSupport.match$5080(arg$5128)) {
35724: final String s = Analyzer.cast(arg$5128
35725: .getTuple().get1());
35726: final BigInteger size = Analyzer
35727: .cast(arg$5128.getTuple()
35728: .get2());
35729:
35730: return Analyzer
35731: .cast(reduceTypeConstructorPattern
35732: .apply(
35733: s,
35734: size,
35735: pl,
35736: Pair
35737: .<TypicalTypes.pattern> empty()));
35738: }
35739: break;
35740: case BotConstr:
35741: if (TypicalSupport.match$5061(arg$5128)) {
35742: return Analyzer
35743: .cast(Primitives
35744: .wrapCons(
35745: new TypicalTypes.BotPattern(),
35746: pl));
35747: }
35748: break;
35749: case EmptyConstr:
35750: if (TypicalSupport.match$5064(arg$5128)) {
35751: return Analyzer
35752: .cast(Primitives
35753: .wrapCons(
35754: new TypicalTypes.EmptyPattern(),
35755: pl));
35756: }
35757: break;
35758: case PairConstr:
35759: if (TypicalSupport.match$5073(arg$5128)) {
35760: return Analyzer
35761: .cast(new Let<Pair<TypicalTypes.pattern>>() {
35762: final TypicalTypes.pattern h1;
35763: final TypicalTypes.patternRecord p1;
35764: final Pair<TypicalTypes.pattern> ta;
35765: final TypicalTypes.pattern h2;
35766: final TypicalTypes.patternRecord p2;
35767: final Pair<TypicalTypes.pattern> tai;
35768:
35769: {
35770: h1 = Analyzer
35771: .cast(TypicalSupport.head$5134
35772: .apply(pl));
35773: p1 = Analyzer
35774: .cast(new TypicalTypes.patternRecord(
35775: h1,
35776: null,
35777: Boolean.FALSE));
35778: ta = Analyzer
35779: .cast(TypicalSupport.tail$5135
35780: .apply(pl));
35781: h2 = Analyzer
35782: .cast(TypicalSupport.head$5134
35783: .apply(ta));
35784: p2 = Analyzer
35785: .cast(new TypicalTypes.patternRecord(
35786: h2,
35787: null,
35788: Boolean.FALSE));
35789: tai = Analyzer
35790: .cast(TypicalSupport.tail$5135
35791: .apply(ta));
35792: }
35793:
35794: public Pair<TypicalTypes.pattern> apply() {
35795: return Analyzer
35796: .cast(Primitives
35797: .wrapCons(
35798: new TypicalTypes.PairPattern(
35799: p1,
35800: p2),
35801: tai));
35802: }
35803: }.apply());
35804: }
35805: break;
35806: default:
35807: break;
35808: }
35809: ;
35810: return null;
35811: }
35812: }.apply();
35813: }
35814: };
35815:
35816: final Function.F4<Pair<TypicalTypes.pattern>, String, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>> reduceTypeConstructorPattern = new Function.F4<Pair<TypicalTypes.pattern>, String, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>>() {
35817: public Pair<TypicalTypes.pattern> apply(final String s,
35818: final BigInteger size,
35819: final Pair<TypicalTypes.pattern> pl,
35820: final Pair<TypicalTypes.pattern> children) {
35821: return (null == Primitives.equal.apply(size, BigInteger
35822: .valueOf(0)) ? null
35823: : Primitives.equal.apply(size, BigInteger
35824: .valueOf(0)) ? new Let<Pair<TypicalTypes.pattern>>() {
35825: final Pair<TypicalTypes.patternRecord> recList;
35826:
35827: {
35828: recList = Analyzer.cast(makePatternRecords
35829: .apply(children));
35830: }
35831:
35832: public Pair<TypicalTypes.pattern> apply() {
35833: return Analyzer
35834: .cast(Primitives
35835: .wrapCons(
35836: new TypicalTypes.ConstructorPattern(
35837: s, recList),
35838: pl));
35839: }
35840: }.apply()
35841: : reduceTypeConstructorPattern
35842: .apply(
35843: s,
35844: Primitives.subtractInt
35845: .apply(
35846: size,
35847: BigInteger
35848: .valueOf(1)),
35849: TypicalSupport.tail$5135
35850: .apply(pl),
35851: TypicalSupport.append$5027
35852: .apply(
35853: children,
35854: new Pair<TypicalTypes.pattern>(
35855: TypicalSupport.head$5134
35856: .apply(pl)))));
35857: }
35858: };
35859:
35860: final Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>> reduceRecordPattern = new Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>>() {
35861: public Pair<TypicalTypes.pattern> apply(final BigInteger size,
35862: final Pair<TypicalTypes.pattern> pl,
35863: final Pair<TypicalTypes.pattern> children) {
35864: return (null == Primitives.equal.apply(size, BigInteger
35865: .valueOf(0)) ? null
35866: : Primitives.equal.apply(size, BigInteger
35867: .valueOf(0)) ? new Let<Pair<TypicalTypes.pattern>>() {
35868: final Pair<TypicalTypes.patternRecord> recList;
35869:
35870: {
35871: recList = Analyzer.cast(makePatternRecords
35872: .apply(children));
35873: }
35874:
35875: public Pair<TypicalTypes.pattern> apply() {
35876: return Analyzer
35877: .cast(Primitives
35878: .wrapCons(
35879: new TypicalTypes.RecPattern(
35880: recList),
35881: pl));
35882: }
35883: }.apply()
35884: : reduceRecordPattern
35885: .apply(
35886: Primitives.subtractInt
35887: .apply(
35888: size,
35889: BigInteger
35890: .valueOf(1)),
35891: TypicalSupport.tail$5135
35892: .apply(pl),
35893: TypicalSupport.append$5027
35894: .apply(
35895: children,
35896: new Pair<TypicalTypes.pattern>(
35897: TypicalSupport.head$5134
35898: .apply(pl)))));
35899: }
35900: };
35901:
35902: final Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>> reduceTuplePattern = new Function.F3<Pair<TypicalTypes.pattern>, BigInteger, Pair<TypicalTypes.pattern>, Pair<TypicalTypes.pattern>>() {
35903: public Pair<TypicalTypes.pattern> apply(final BigInteger size,
35904: final Pair<TypicalTypes.pattern> pl,
35905: final Pair<TypicalTypes.pattern> children) {
35906: return (null == Primitives.equal.apply(size, BigInteger
35907: .valueOf(0)) ? null
35908: : Primitives.equal.apply(size, BigInteger
35909: .valueOf(0)) ? new Let<Pair<TypicalTypes.pattern>>() {
35910: final Pair<TypicalTypes.patternRecord> recList;
35911:
35912: {
35913: recList = Analyzer.cast(makePatternRecords
35914: .apply(children));
35915: }
35916:
35917: public Pair<TypicalTypes.pattern> apply() {
35918: return Analyzer
35919: .cast(Primitives
35920: .wrapCons(
35921: new TypicalTypes.TupPattern(
35922: recList),
35923: pl));
35924: }
35925: }.apply()
35926: : reduceTuplePattern
35927: .apply(
35928: Primitives.subtractInt
35929: .apply(
35930: size,
35931: BigInteger
35932: .valueOf(1)),
35933: TypicalSupport.tail$5135
35934: .apply(pl),
35935: TypicalSupport.append$5027
35936: .apply(
35937: children,
35938: new Pair<TypicalTypes.pattern>(
35939: TypicalSupport.head$5134
35940: .apply(pl)))));
35941: }
35942: };
35943:
35944: final Function.F1<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.pattern>> makePatternRecords = new Function.F1<Pair<TypicalTypes.patternRecord>, Pair<TypicalTypes.pattern>>() {
35945: public Pair<TypicalTypes.patternRecord> apply(
35946: final Pair<TypicalTypes.pattern> pl) {
35947: return new Match<Pair<TypicalTypes.patternRecord>>() {
35948: public Pair<TypicalTypes.patternRecord> apply() {
35949: final Pair<TypicalTypes.pattern> arg$5140 = Analyzer
35950: .cast(pl);
35951:
35952: if ((null == arg$5140)) {
35953: return null;
35954: }
35955: if (TypicalSupport.match$5141(arg$5140)) {
35956: return Analyzer.cast(Pair
35957: .<TypicalTypes.patternRecord> empty());
35958: }
35959: if (true) {
35960: final Pair<TypicalTypes.pattern> list$5142 = Analyzer
35961: .cast(Analyzer.cast(arg$5140));
35962: final TypicalTypes.pattern x = Analyzer
35963: .cast(Primitives.wrapHead(list$5142));
35964: final Pair<TypicalTypes.pattern> xs = Analyzer
35965: .cast(Primitives.wrapTail(list$5142));
35966:
35967: return Analyzer
35968: .cast(new Let<Pair<TypicalTypes.patternRecord>>() {
35969: final TypicalTypes.patternRecord pr;
35970:
35971: {
35972: pr = Analyzer
35973: .cast(new TypicalTypes.patternRecord(
35974: x, null,
35975: Boolean.FALSE));
35976: }
35977:
35978: public Pair<TypicalTypes.patternRecord> apply() {
35979: return Analyzer
35980: .cast(Primitives
35981: .wrapCons(
35982: pr,
35983: makePatternRecords
35984: .apply(xs)));
35985: }
35986: }.apply());
35987: }
35988: return null;
35989: }
35990: }.apply();
35991: }
35992: };
35993:
35994: final Function.F1<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>> buildDMatrix = new Function.F1<Pair<Pair<TypicalTypes.patternRecord>>, Pair<Pair<TypicalTypes.patternRecord>>>() {
35995: public Pair<Pair<TypicalTypes.patternRecord>> apply(
35996: final Pair<Pair<TypicalTypes.patternRecord>> matrix) {
35997: return new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
35998: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
35999: final Pair<Pair<TypicalTypes.patternRecord>> arg$5144 = Analyzer
36000: .cast(matrix);
36001:
36002: if ((null == arg$5144)) {
36003: return null;
36004: }
36005: if (TypicalSupport.match$4998(arg$5144)) {
36006: return Analyzer
36007: .cast(Pair
36008: .<Pair<TypicalTypes.patternRecord>> empty());
36009: }
36010: if (true) {
36011: final Pair<Pair<TypicalTypes.patternRecord>> list$5146 = Analyzer
36012: .cast(Analyzer.cast(arg$5144));
36013: final Pair<TypicalTypes.patternRecord> x = Analyzer
36014: .cast(Primitives.wrapHead(list$5146));
36015: final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer
36016: .cast(Primitives.wrapTail(list$5146));
36017:
36018: return Analyzer
36019: .cast(new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
36020: final TypicalTypes.patternRecord p;
36021:
36022: {
36023: p = Analyzer
36024: .cast(TypicalSupport.head$4913
36025: .apply(x));
36026: }
36027:
36028: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
36029: return Analyzer
36030: .cast(new Match<Pair<Pair<TypicalTypes.patternRecord>>>() {
36031: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
36032: final TypicalTypes.pattern arg$5152 = Analyzer
36033: .cast(null == p ? null
36034: : p.pat);
36035:
36036: if ((null == arg$5152)) {
36037: return null;
36038: }
36039: if ((null != arg$5152))
36040: switch (arg$5152
36041: .tag()) {
36042: case RecFieldPattern:
36043: if (TypicalSupport
36044: .match$4818(arg$5152)) {
36045: final TypicalTypes.patternRecord pt = Analyzer
36046: .cast(arg$5152
36047: .getTuple()
36048: .get2());
36049:
36050: return Analyzer
36051: .cast(new Let<Pair<Pair<TypicalTypes.patternRecord>>>() {
36052: final TypicalTypes.constr co;
36053:
36054: {
36055: co = Analyzer
36056: .cast(getConstructor
36057: .apply(pt));
36058: }
36059:
36060: public Pair<Pair<TypicalTypes.patternRecord>> apply() {
36061: return Analyzer
36062: .cast(null == Primitives.equal
36063: .apply(
36064: co,
36065: new TypicalTypes.WildConstr()) ? null
36066: : Primitives.equal
36067: .apply(
36068: co,
36069: new TypicalTypes.WildConstr()) ? Primitives
36070: .wrapCons(
36071: TypicalSupport.tail$4914
36072: .apply(x),
36073: buildDMatrix
36074: .apply(xs))
36075: : buildDMatrix
36076: .apply(xs));
36077: }
36078: }
36079: .apply());
36080: }
36081: break;
36082: case VariablePattern:
36083: if (TypicalSupport
36084: .match$4744(arg$5152)) {
36085: return Analyzer
36086: .cast(Primitives
36087: .wrapCons(
36088: TypicalSupport.tail$4914
36089: .apply(x),
36090: buildDMatrix
36091: .apply(xs)));
36092: }
36093: break;
36094: case WildCardPattern:
36095: if (TypicalSupport
36096: .match$4742(arg$5152)) {
36097: return Analyzer
36098: .cast(Primitives
36099: .wrapCons(
36100: TypicalSupport.tail$4914
36101: .apply(x),
36102: buildDMatrix
36103: .apply(xs)));
36104: }
36105: break;
36106: default:
36107: break;
36108: }
36109: ;
36110: if (true) {
36111: return Analyzer
36112: .cast(buildDMatrix
36113: .apply(xs));
36114: }
36115: return null;
36116: }
36117: }.apply());
36118: }
36119: }.apply());
36120: }
36121: return null;
36122: }
36123: }.apply();
36124: }
36125: };
36126:
36127: final Function.F1<Boolean, Pair<TypicalTypes.constr>> emptySigma = new Function.F1<Boolean, Pair<TypicalTypes.constr>>() {
36128: public Boolean apply(final Pair<TypicalTypes.constr> sigma) {
36129: return new Match<Boolean>() {
36130: public Boolean apply() {
36131: final Pair<TypicalTypes.constr> arg$5158 = Analyzer
36132: .cast(sigma);
36133:
36134: if ((null == arg$5158)) {
36135: return null;
36136: }
36137: if (TypicalSupport.match$5030(arg$5158)) {
36138: return Analyzer.cast(Boolean.TRUE);
36139: }
36140: if (true) {
36141: final Pair<TypicalTypes.constr> list$5160 = Analyzer
36142: .cast(Analyzer.cast(arg$5158));
36143: final TypicalTypes.constr x = Analyzer
36144: .cast(Primitives.wrapHead(list$5160));
36145: final Pair<TypicalTypes.constr> xs = Analyzer
36146: .cast(Primitives.wrapTail(list$5160));
36147:
36148: return Analyzer.cast(new Match<Boolean>() {
36149: public Boolean apply() {
36150: final TypicalTypes.constr arg$5164 = Analyzer
36151: .cast(x);
36152:
36153: if ((null == arg$5164)) {
36154: return null;
36155: }
36156: if ((null != arg$5164))
36157: switch (arg$5164.tag()) {
36158: case WildConstr:
36159: if (TypicalSupport
36160: .match$5033(arg$5164)) {
36161: return Analyzer
36162: .cast(emptySigma
36163: .apply(xs));
36164: }
36165: break;
36166: default:
36167: break;
36168: }
36169: ;
36170: if (true) {
36171: return Analyzer.cast(Boolean.FALSE);
36172: }
36173: return null;
36174: }
36175: }.apply());
36176: }
36177: return null;
36178: }
36179: }.apply();
36180: }
36181: };
36182:
36183: final Function.F1<Boolean, Pair<TypicalTypes.constr>> completeSigma = new Function.F1<Boolean, Pair<TypicalTypes.constr>>() {
36184: public Boolean apply(final Pair<TypicalTypes.constr> sigma) {
36185: return new Let<Boolean>() {
36186: final Pair<TypicalTypes.constr> si;
36187:
36188: {
36189: si = Analyzer.cast(removeWildConstr.apply(sigma));
36190: }
36191:
36192: public Boolean apply() {
36193: return Analyzer
36194: .cast(null == Primitives.equal.apply(
36195: Primitives.length.apply(si),
36196: BigInteger.valueOf(0)) ? null
36197: : Primitives.equal
36198: .apply(Primitives.length
36199: .apply(si),
36200: BigInteger
36201: .valueOf(0)) ? Boolean.FALSE
36202: : new Let<Boolean>() {
36203: final TypicalTypes.constr h;
36204:
36205: {
36206: h = Analyzer
36207: .cast(TypicalSupport.head$5200
36208: .apply(si));
36209: }
36210:
36211: public Boolean apply() {
36212: return Analyzer
36213: .cast(new Match<Boolean>() {
36214: public Boolean apply() {
36215: final TypicalTypes.constr arg$5168 = Analyzer
36216: .cast(h);
36217:
36218: if ((null == arg$5168)) {
36219: return null;
36220: }
36221: if ((null != arg$5168))
36222: switch (arg$5168
36223: .tag()) {
36224: case RecordConstr:
36225: if (TypicalSupport
36226: .match$5065(arg$5168)) {
36227: return Analyzer
36228: .cast(Boolean.TRUE);
36229: }
36230: break;
36231: case Const:
36232: if (TypicalSupport
36233: .match$5063(arg$5168)) {
36234: final TypicalTypes.value val = Analyzer
36235: .cast(arg$5168
36236: .getTuple()
36237: .get1());
36238:
36239: return Analyzer
36240: .cast(new Match<Boolean>() {
36241: public Boolean apply() {
36242: final TypicalTypes.value arg$5173 = Analyzer
36243: .cast(val);
36244:
36245: if ((null == arg$5173)) {
36246: return null;
36247: }
36248: if ((null != arg$5173))
36249: switch (arg$5173
36250: .tag()) {
36251: case BoolValue:
36252: if (TypicalSupport
36253: .match$5171(arg$5173)) {
36254: return Analyzer
36255: .cast(Primitives.and
36256: .apply(
36257: Primitives.contains
36258: .apply(
36259: new TypicalTypes.Const(
36260: new TypicalTypes.BoolValue(
36261: Boolean.TRUE)),
36262: sigma),
36263: Primitives.contains
36264: .apply(
36265: new TypicalTypes.Const(
36266: new TypicalTypes.BoolValue(
36267: Boolean.FALSE)),
36268: sigma)));
36269: }
36270: break;
36271: default:
36272: break;
36273: }
36274: ;
36275: if (true) {
36276: return Analyzer
36277: .cast(Boolean.FALSE);
36278: }
36279: return null;
36280: }
36281: }
36282: .apply());
36283: }
36284: break;
36285: case TupleConstr:
36286: if (TypicalSupport
36287: .match$5066(arg$5168)) {
36288: return Analyzer
36289: .cast(Boolean.TRUE);
36290: }
36291: break;
36292: case CConstr:
36293: if (TypicalSupport
36294: .match$5080(arg$5168)) {
36295: final String s = Analyzer
36296: .cast(arg$5168
36297: .getTuple()
36298: .get1());
36299:
36300: return Analyzer
36301: .cast(new Let<Boolean>() {
36302: final TypicalTypes.raw_type<?> ty;
36303:
36304: {
36305: ty = Analyzer
36306: .cast(Analyzer
36307: .cast(lookup2
36308: .apply(
36309: GNode
36310: .create(
36311: "TypeConstructor",
36312: s,
36313: null),
36314: getNameSpace)));
36315: }
36316:
36317: public Boolean apply() {
36318: return Analyzer
36319: .cast(new Match<Boolean>() {
36320: public Boolean apply() {
36321: final TypicalTypes.raw_type<?> arg$5190 = Analyzer
36322: .cast(ty);
36323:
36324: if ((null == arg$5190)) {
36325: return null;
36326: }
36327: if ((null != arg$5190))
36328: switch (arg$5190
36329: .tag()) {
36330: case ConstructorT:
36331: if (TypicalSupport
36332: .match$94(arg$5190)) {
36333: final String str = Analyzer
36334: .cast(arg$5190
36335: .getTuple()
36336: .get1());
36337:
36338: return Analyzer
36339: .cast(new Let<Boolean>() {
36340: final TypicalTypes.raw_type<?> t;
36341:
36342: {
36343: t = Analyzer
36344: .cast(Analyzer
36345: .cast(lookup2
36346: .apply(
36347: GNode
36348: .create(
36349: "UserDefinedType",
36350: str),
36351: getNameSpace)));
36352: }
36353:
36354: public Boolean apply() {
36355: return Analyzer
36356: .cast(new Match<Boolean>() {
36357: public Boolean apply() {
36358: final TypicalTypes.raw_type<?> arg$5195 = Analyzer
36359: .cast(t);
36360:
36361: if ((null == arg$5195)) {
36362: return null;
36363: }
36364: if ((null != arg$5195))
36365: switch (arg$5195
36366: .tag()) {
36367: case VariantT:
36368: if (TypicalSupport
36369: .match$100(arg$5195)) {
36370: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
36371: .cast(arg$5195
36372: .getTuple()
36373: .get1());
36374:
36375: return Analyzer
36376: .cast(checkComplete
36377: .apply(
36378: tl,
36379: si));
36380: }
36381: break;
36382: default:
36383: break;
36384: }
36385: ;
36386: if (true) {
36387: return Analyzer
36388: .cast(null);
36389: }
36390: return null;
36391: }
36392: }
36393: .apply());
36394: }
36395: }
36396: .apply());
36397: }
36398: break;
36399: default:
36400: break;
36401: }
36402: ;
36403: if (true) {
36404: return Analyzer
36405: .cast(null);
36406: }
36407: return null;
36408: }
36409: }
36410: .apply());
36411: }
36412: }
36413: .apply());
36414: }
36415: break;
36416: case EmptyConstr:
36417: if (TypicalSupport
36418: .match$5064(arg$5168)) {
36419: return Analyzer
36420: .cast(Primitives.and
36421: .apply(
36422: Primitives.contains
36423: .apply(
36424: new TypicalTypes.EmptyConstr(),
36425: si),
36426: Primitives.contains
36427: .apply(
36428: new TypicalTypes.PairConstr(),
36429: si)));
36430: }
36431: break;
36432: case PairConstr:
36433: if (TypicalSupport
36434: .match$5073(arg$5168)) {
36435: return Analyzer
36436: .cast(Primitives.and
36437: .apply(
36438: Primitives.contains
36439: .apply(
36440: new TypicalTypes.EmptyConstr(),
36441: si),
36442: Primitives.contains
36443: .apply(
36444: new TypicalTypes.PairConstr(),
36445: si)));
36446: }
36447: break;
36448: default:
36449: break;
36450: }
36451: ;
36452: if (true) {
36453: return Analyzer
36454: .cast(null);
36455: }
36456: return null;
36457: }
36458: }.apply());
36459: }
36460: }.apply());
36461: }
36462: }.apply();
36463: }
36464: };
36465:
36466: final Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>> checkComplete = new Function.F2<Boolean, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>>() {
36467: public Boolean apply(final Pair<TypicalTypes.raw_type<?>> tl,
36468: final Pair<TypicalTypes.constr> sigma) {
36469: return new Match<Boolean>() {
36470: public Boolean apply() {
36471: final Pair<TypicalTypes.raw_type<?>> arg$5201 = Analyzer
36472: .cast(tl);
36473:
36474: if ((null == arg$5201)) {
36475: return null;
36476: }
36477: if (TypicalSupport.match$122(arg$5201)) {
36478: return Analyzer.cast(Boolean.TRUE);
36479: }
36480: if (true) {
36481: final Pair<TypicalTypes.raw_type<?>> list$5203 = Analyzer
36482: .cast(Analyzer.cast(arg$5201));
36483: final TypicalTypes.raw_type<?> x = Analyzer
36484: .cast(Primitives.wrapHead(list$5203));
36485: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
36486: .cast(Primitives.wrapTail(list$5203));
36487:
36488: return Analyzer.cast(new Match<Boolean>() {
36489: public Boolean apply() {
36490: final TypicalTypes.raw_type<?> arg$5207 = Analyzer
36491: .cast(x);
36492:
36493: if ((null == arg$5207)) {
36494: return null;
36495: }
36496: if ((null != arg$5207))
36497: switch (arg$5207.tag()) {
36498: case ConstructorT:
36499: if (TypicalSupport
36500: .match$94(arg$5207)) {
36501: final String str = Analyzer
36502: .cast(arg$5207
36503: .getTuple()
36504: .get2());
36505:
36506: return Analyzer
36507: .cast(null == sigmaContains
36508: .apply(
36509: sigma,
36510: str) ? null
36511: : sigmaContains
36512: .apply(
36513: sigma,
36514: str) ? checkComplete
36515: .apply(
36516: xs,
36517: sigma)
36518: : Boolean.FALSE);
36519: }
36520: break;
36521: default:
36522: break;
36523: }
36524: ;
36525: if (true) {
36526: return Analyzer.cast(null);
36527: }
36528: return null;
36529: }
36530: }.apply());
36531: }
36532: return null;
36533: }
36534: }.apply();
36535: }
36536: };
36537:
36538: final Function.F2<Boolean, Pair<TypicalTypes.constr>, String> sigmaContains = new Function.F2<Boolean, Pair<TypicalTypes.constr>, String>() {
36539: public Boolean apply(final Pair<TypicalTypes.constr> sigma,
36540: final String s) {
36541: return new Match<Boolean>() {
36542: public Boolean apply() {
36543: final Pair<TypicalTypes.constr> arg$5211 = Analyzer
36544: .cast(sigma);
36545:
36546: if ((null == arg$5211)) {
36547: return null;
36548: }
36549: if (TypicalSupport.match$5030(arg$5211)) {
36550: return Analyzer.cast(Boolean.FALSE);
36551: }
36552: if (true) {
36553: final Pair<TypicalTypes.constr> list$5213 = Analyzer
36554: .cast(Analyzer.cast(arg$5211));
36555: final TypicalTypes.constr x = Analyzer
36556: .cast(Primitives.wrapHead(list$5213));
36557: final Pair<TypicalTypes.constr> xs = Analyzer
36558: .cast(Primitives.wrapTail(list$5213));
36559:
36560: return Analyzer.cast(new Match<Boolean>() {
36561: public Boolean apply() {
36562: final TypicalTypes.constr arg$5217 = Analyzer
36563: .cast(x);
36564:
36565: if ((null == arg$5217)) {
36566: return null;
36567: }
36568: if ((null != arg$5217))
36569: switch (arg$5217.tag()) {
36570: case CConstr:
36571: if (TypicalSupport
36572: .match$5080(arg$5217)) {
36573: final String str = Analyzer
36574: .cast(arg$5217
36575: .getTuple()
36576: .get1());
36577:
36578: return Analyzer
36579: .cast(null == Primitives.equal
36580: .apply(s,
36581: str) ? null
36582: : Primitives.equal
36583: .apply(
36584: s,
36585: str) ? Boolean.TRUE
36586: : sigmaContains
36587: .apply(
36588: xs,
36589: s));
36590: }
36591: break;
36592: default:
36593: break;
36594: }
36595: ;
36596: if (true) {
36597: return Analyzer.cast(null);
36598: }
36599: return null;
36600: }
36601: }.apply());
36602: }
36603: return null;
36604: }
36605: }.apply();
36606: }
36607: };
36608:
36609: final Function.F1<TypicalTypes.pattern, Pair<TypicalTypes.constr>> findUnmatchedPattern = new Function.F1<TypicalTypes.pattern, Pair<TypicalTypes.constr>>() {
36610: public TypicalTypes.pattern apply(
36611: final Pair<TypicalTypes.constr> sigma) {
36612: return new Let<TypicalTypes.pattern>() {
36613: final Pair<TypicalTypes.constr> si;
36614: final TypicalTypes.constr h;
36615:
36616: {
36617: si = Analyzer.cast(removeWildConstr.apply(sigma));
36618: h = Analyzer.cast(TypicalSupport.head$5200
36619: .apply(si));
36620: }
36621:
36622: public TypicalTypes.pattern apply() {
36623: return Analyzer
36624: .cast(new Match<TypicalTypes.pattern>() {
36625: public TypicalTypes.pattern apply() {
36626: final TypicalTypes.constr arg$5221 = Analyzer
36627: .cast(h);
36628:
36629: if ((null == arg$5221)) {
36630: return null;
36631: }
36632: if ((null != arg$5221))
36633: switch (arg$5221.tag()) {
36634: case Const:
36635: if (TypicalSupport
36636: .match$5063(arg$5221)) {
36637: final TypicalTypes.value val = Analyzer
36638: .cast(arg$5221
36639: .getTuple()
36640: .get1());
36641:
36642: return Analyzer
36643: .cast(new Match<TypicalTypes.pattern>() {
36644: public TypicalTypes.pattern apply() {
36645: final TypicalTypes.value arg$5229 = Analyzer
36646: .cast(val);
36647:
36648: if ((null == arg$5229)) {
36649: return null;
36650: }
36651: if ((null != arg$5229))
36652: switch (arg$5229
36653: .tag()) {
36654: case BoolValue:
36655: if (TypicalSupport
36656: .match$5171(arg$5229)) {
36657: return Analyzer
36658: .cast(null == Primitives.not
36659: .apply(Primitives.contains
36660: .apply(
36661: new TypicalTypes.Const(
36662: new TypicalTypes.BoolValue(
36663: Boolean.TRUE)),
36664: sigma)) ? null
36665: : Primitives.not
36666: .apply(Primitives.contains
36667: .apply(
36668: new TypicalTypes.Const(
36669: new TypicalTypes.BoolValue(
36670: Boolean.TRUE)),
36671: sigma)) ? new TypicalTypes.ConstantPattern(
36672: new TypicalTypes.BoolValue(
36673: Boolean.TRUE))
36674: : new TypicalTypes.ConstantPattern(
36675: new TypicalTypes.BoolValue(
36676: Boolean.FALSE)));
36677: }
36678: break;
36679: case IntValue:
36680: if (TypicalSupport
36681: .match$5225(arg$5229)) {
36682: final BigInteger i = Analyzer
36683: .cast(arg$5229
36684: .getTuple()
36685: .get1());
36686:
36687: return Analyzer
36688: .cast(findIntPattern
36689: .apply(
36690: i,
36691: sigma));
36692: }
36693: break;
36694: case FloatValue:
36695: if (TypicalSupport
36696: .match$5226(arg$5229)) {
36697: final Double f = Analyzer
36698: .cast(arg$5229
36699: .getTuple()
36700: .get1());
36701:
36702: return Analyzer
36703: .cast(findFloatPattern
36704: .apply(
36705: f,
36706: sigma));
36707: }
36708: break;
36709: case StringValue:
36710: if (TypicalSupport
36711: .match$5227(arg$5229)) {
36712: final String s = Analyzer
36713: .cast(arg$5229
36714: .getTuple()
36715: .get1());
36716:
36717: return Analyzer
36718: .cast(findStringPattern
36719: .apply(
36720: s,
36721: sigma));
36722: }
36723: break;
36724: default:
36725: break;
36726: }
36727: ;
36728: return null;
36729: }
36730: }.apply());
36731: }
36732: break;
36733: case CConstr:
36734: if (TypicalSupport
36735: .match$5080(arg$5221)) {
36736: final String s = Analyzer
36737: .cast(arg$5221
36738: .getTuple()
36739: .get1());
36740:
36741: return Analyzer
36742: .cast(new Let<TypicalTypes.pattern>() {
36743: final TypicalTypes.raw_type<?> ty;
36744:
36745: {
36746: ty = Analyzer
36747: .cast(Analyzer
36748: .cast(lookup2
36749: .apply(
36750: GNode
36751: .create(
36752: "TypeConstructor",
36753: s,
36754: null),
36755: getNameSpace)));
36756: }
36757:
36758: public TypicalTypes.pattern apply() {
36759: return Analyzer
36760: .cast(new Match<TypicalTypes.pattern>() {
36761: public TypicalTypes.pattern apply() {
36762: final TypicalTypes.raw_type<?> arg$5247 = Analyzer
36763: .cast(ty);
36764:
36765: if ((null == arg$5247)) {
36766: return null;
36767: }
36768: if ((null != arg$5247))
36769: switch (arg$5247
36770: .tag()) {
36771: case ConstructorT:
36772: if (TypicalSupport
36773: .match$94(arg$5247)) {
36774: final String str = Analyzer
36775: .cast(arg$5247
36776: .getTuple()
36777: .get1());
36778:
36779: return Analyzer
36780: .cast(new Let<TypicalTypes.pattern>() {
36781: final TypicalTypes.raw_type<?> t;
36782:
36783: {
36784: t = Analyzer
36785: .cast(Analyzer
36786: .cast(lookup2
36787: .apply(
36788: GNode
36789: .create(
36790: "UserDefinedType",
36791: str),
36792: getNameSpace)));
36793: }
36794:
36795: public TypicalTypes.pattern apply() {
36796: return Analyzer
36797: .cast(new Match<TypicalTypes.pattern>() {
36798: public TypicalTypes.pattern apply() {
36799: final TypicalTypes.raw_type<?> arg$5252 = Analyzer
36800: .cast(t);
36801:
36802: if ((null == arg$5252)) {
36803: return null;
36804: }
36805: if ((null != arg$5252))
36806: switch (arg$5252
36807: .tag()) {
36808: case VariantT:
36809: if (TypicalSupport
36810: .match$100(arg$5252)) {
36811: final Pair<TypicalTypes.raw_type<?>> tl = Analyzer
36812: .cast(arg$5252
36813: .getTuple()
36814: .get1());
36815:
36816: return Analyzer
36817: .cast(findUnmatchedConstructor
36818: .apply(
36819: tl,
36820: si));
36821: }
36822: break;
36823: default:
36824: break;
36825: }
36826: ;
36827: if (true) {
36828: return Analyzer
36829: .cast(null);
36830: }
36831: return null;
36832: }
36833: }
36834: .apply());
36835: }
36836: }
36837: .apply());
36838: }
36839: break;
36840: default:
36841: break;
36842: }
36843: ;
36844: if (true) {
36845: return Analyzer
36846: .cast(null);
36847: }
36848: return null;
36849: }
36850: }
36851: .apply());
36852: }
36853: }.apply());
36854: }
36855: break;
36856: case EmptyConstr:
36857: if (TypicalSupport
36858: .match$5064(arg$5221)) {
36859: return Analyzer
36860: .cast(null == Primitives.contains
36861: .apply(
36862: new TypicalTypes.EmptyConstr(),
36863: sigma) ? null
36864: : Primitives.contains
36865: .apply(
36866: new TypicalTypes.EmptyConstr(),
36867: sigma) ? new Let<TypicalTypes.pattern>() {
36868: final TypicalTypes.patternRecord wild;
36869:
36870: {
36871: wild = Analyzer
36872: .cast(new TypicalTypes.patternRecord(
36873: new TypicalTypes.WildCardPattern(),
36874: null,
36875: Boolean.FALSE));
36876: }
36877:
36878: public TypicalTypes.pattern apply() {
36879: return Analyzer
36880: .cast(new TypicalTypes.PairPattern(
36881: wild,
36882: wild));
36883: }
36884: }
36885: .apply()
36886: : new TypicalTypes.EmptyPattern());
36887: }
36888: break;
36889: case PairConstr:
36890: if (TypicalSupport
36891: .match$5073(arg$5221)) {
36892: return Analyzer
36893: .cast(null == Primitives.contains
36894: .apply(
36895: new TypicalTypes.EmptyConstr(),
36896: sigma) ? null
36897: : Primitives.contains
36898: .apply(
36899: new TypicalTypes.EmptyConstr(),
36900: sigma) ? new Let<TypicalTypes.pattern>() {
36901: final TypicalTypes.patternRecord wild;
36902:
36903: {
36904: wild = Analyzer
36905: .cast(new TypicalTypes.patternRecord(
36906: new TypicalTypes.WildCardPattern(),
36907: null,
36908: Boolean.FALSE));
36909: }
36910:
36911: public TypicalTypes.pattern apply() {
36912: return Analyzer
36913: .cast(new TypicalTypes.PairPattern(
36914: wild,
36915: wild));
36916: }
36917: }
36918: .apply()
36919: : new TypicalTypes.EmptyPattern());
36920: }
36921: break;
36922: default:
36923: break;
36924: }
36925: ;
36926: if (true) {
36927: return Analyzer.cast(null);
36928: }
36929: return null;
36930: }
36931: }.apply());
36932: }
36933: }.apply();
36934: }
36935: };
36936:
36937: final Function.F2<TypicalTypes.pattern, BigInteger, Pair<TypicalTypes.constr>> findIntPattern = new Function.F2<TypicalTypes.pattern, BigInteger, Pair<TypicalTypes.constr>>() {
36938: public TypicalTypes.pattern apply(final BigInteger i,
36939: final Pair<TypicalTypes.constr> sigma) {
36940: return (null == Primitives.not.apply(Primitives.contains
36941: .apply(new TypicalTypes.Const(
36942: new TypicalTypes.IntValue(Primitives.addInt
36943: .apply(i, BigInteger.valueOf(1)))),
36944: sigma)) ? null
36945: : Primitives.not
36946: .apply(Primitives.contains
36947: .apply(
36948: new TypicalTypes.Const(
36949: new TypicalTypes.IntValue(
36950: Primitives.addInt
36951: .apply(
36952: i,
36953: BigInteger
36954: .valueOf(1)))),
36955: sigma)) ? new TypicalTypes.ConstantPattern(
36956: new TypicalTypes.IntValue(Primitives.addInt
36957: .apply(i, BigInteger.valueOf(1))))
36958: : findIntPattern.apply(Primitives.addInt
36959: .apply(i, BigInteger.valueOf(1)),
36960: sigma));
36961: }
36962: };
36963:
36964: final Function.F2<TypicalTypes.pattern, Double, Pair<TypicalTypes.constr>> findFloatPattern = new Function.F2<TypicalTypes.pattern, Double, Pair<TypicalTypes.constr>>() {
36965: public TypicalTypes.pattern apply(final Double f,
36966: final Pair<TypicalTypes.constr> sigma) {
36967: return (null == Primitives.not.apply(Primitives.contains
36968: .apply(new TypicalTypes.Const(
36969: new TypicalTypes.FloatValue(
36970: Primitives.addFloat64.apply(f,
36971: new Double(1.0)))), sigma)) ? null
36972: : Primitives.not
36973: .apply(Primitives.contains
36974: .apply(
36975: new TypicalTypes.Const(
36976: new TypicalTypes.FloatValue(
36977: Primitives.addFloat64
36978: .apply(
36979: f,
36980: new Double(
36981: 1.0)))),
36982: sigma)) ? new TypicalTypes.ConstantPattern(
36983: new TypicalTypes.FloatValue(
36984: Primitives.addFloat64.apply(f,
36985: new Double(1.0))))
36986: : findFloatPattern.apply(
36987: Primitives.addFloat64.apply(f,
36988: new Double(1.0)), sigma));
36989: }
36990: };
36991:
36992: final Function.F2<TypicalTypes.pattern, String, Pair<TypicalTypes.constr>> findStringPattern = new Function.F2<TypicalTypes.pattern, String, Pair<TypicalTypes.constr>>() {
36993: public TypicalTypes.pattern apply(final String s,
36994: final Pair<TypicalTypes.constr> sigma) {
36995: return (null == Primitives.not.apply(Primitives.contains
36996: .apply(new TypicalTypes.Const(
36997: new TypicalTypes.StringValue(
36998: Primitives.concat.apply("z", s))),
36999: sigma)) ? null
37000: : Primitives.not.apply(Primitives.contains.apply(
37001: new TypicalTypes.Const(
37002: new TypicalTypes.StringValue(
37003: Primitives.concat.apply(
37004: "z", s))), sigma)) ? new TypicalTypes.ConstantPattern(
37005: new TypicalTypes.StringValue(
37006: Primitives.concat.apply("z", s)))
37007: : findStringPattern.apply(Primitives.concat
37008: .apply("z", s), sigma));
37009: }
37010: };
37011:
37012: final Function.F2<TypicalTypes.pattern, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>> findUnmatchedConstructor = new Function.F2<TypicalTypes.pattern, Pair<TypicalTypes.raw_type<?>>, Pair<TypicalTypes.constr>>() {
37013: public TypicalTypes.pattern apply(
37014: final Pair<TypicalTypes.raw_type<?>> tl,
37015: final Pair<TypicalTypes.constr> sigma) {
37016: return new Match<TypicalTypes.pattern>() {
37017: public TypicalTypes.pattern apply() {
37018: final Pair<TypicalTypes.raw_type<?>> arg$5257 = Analyzer
37019: .cast(tl);
37020:
37021: if ((null == arg$5257)) {
37022: return null;
37023: }
37024: if (TypicalSupport.match$122(arg$5257)) {
37025: return Analyzer.cast(null);
37026: }
37027: if (true) {
37028: final Pair<TypicalTypes.raw_type<?>> list$5259 = Analyzer
37029: .cast(Analyzer.cast(arg$5257));
37030: final TypicalTypes.raw_type<?> x = Analyzer
37031: .cast(Primitives.wrapHead(list$5259));
37032: final Pair<TypicalTypes.raw_type<?>> xs = Analyzer
37033: .cast(Primitives.wrapTail(list$5259));
37034:
37035: return Analyzer
37036: .cast(new Match<TypicalTypes.pattern>() {
37037: public TypicalTypes.pattern apply() {
37038: final TypicalTypes.raw_type<?> arg$5263 = Analyzer
37039: .cast(x);
37040:
37041: if ((null == arg$5263)) {
37042: return null;
37043: }
37044: if ((null != arg$5263))
37045: switch (arg$5263.tag()) {
37046: case ConstructorT:
37047: if (TypicalSupport
37048: .match$94(arg$5263)) {
37049: final String str = Analyzer
37050: .cast(arg$5263
37051: .getTuple()
37052: .get2());
37053:
37054: return Analyzer
37055: .cast(null == sigmaContains
37056: .apply(
37057: sigma,
37058: str) ? null
37059: : sigmaContains
37060: .apply(
37061: sigma,
37062: str) ? findUnmatchedConstructor
37063: .apply(
37064: xs,
37065: sigma)
37066: : new Let<TypicalTypes.pattern>() {
37067: final BigInteger size;
37068: final Pair<TypicalTypes.patternRecord> li;
37069:
37070: {
37071: size = Analyzer
37072: .cast(getConstructorSize
37073: .apply(str));
37074: li = Analyzer
37075: .cast(makeWildCards
37076: .apply(size));
37077: }
37078:
37079: public TypicalTypes.pattern apply() {
37080: return Analyzer
37081: .cast(new TypicalTypes.ConstructorPattern(
37082: str,
37083: li));
37084: }
37085: }
37086: .apply());
37087: }
37088: break;
37089: default:
37090: break;
37091: }
37092: ;
37093: if (true) {
37094: return Analyzer.cast(null);
37095: }
37096: return null;
37097: }
37098: }.apply());
37099: }
37100: return null;
37101: }
37102: }.apply();
37103: }
37104: };
37105:
37106: final Function.F1<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>> removeWildConstr = new Function.F1<Pair<TypicalTypes.constr>, Pair<TypicalTypes.constr>>() {
37107: public Pair<TypicalTypes.constr> apply(
37108: final Pair<TypicalTypes.constr> sigma) {
37109: return new Match<Pair<TypicalTypes.constr>>() {
37110: public Pair<TypicalTypes.constr> apply() {
37111: final Pair<TypicalTypes.constr> arg$5267 = Analyzer
37112: .cast(sigma);
37113:
37114: if ((null == arg$5267)) {
37115: return null;
37116: }
37117: if (TypicalSupport.match$5030(arg$5267)) {
37118: return Analyzer.cast(Pair
37119: .<TypicalTypes.constr> empty());
37120: }
37121: if (true) {
37122: final Pair<TypicalTypes.constr> list$5269 = Analyzer
37123: .cast(Analyzer.cast(arg$5267));
37124: final TypicalTypes.constr x = Analyzer
37125: .cast(Primitives.wrapHead(list$5269));
37126: final Pair<TypicalTypes.constr> xs = Analyzer
37127: .cast(Primitives.wrapTail(list$5269));
37128:
37129: return Analyzer
37130: .cast(null == Primitives.equal.apply(x,
37131: new TypicalTypes.WildConstr()) ? null
37132: : Primitives.equal
37133: .apply(
37134: x,
37135: new TypicalTypes.WildConstr()) ? removeWildConstr
37136: .apply(xs)
37137: : Primitives
37138: .wrapCons(
37139: x,
37140: removeWildConstr
37141: .apply(xs)));
37142: }
37143: return null;
37144: }
37145: }.apply();
37146: }
37147: };
37148:
37149: final Function.F1<Boolean, Pair<Pair<TypicalTypes.patternRecord>>> quickPartialCheck = new Function.F1<Boolean, Pair<Pair<TypicalTypes.patternRecord>>>() {
37150: public Boolean apply(
37151: final Pair<Pair<TypicalTypes.patternRecord>> matrix) {
37152: return new Match<Boolean>() {
37153: public Boolean apply() {
37154: final Pair<Pair<TypicalTypes.patternRecord>> arg$5271 = Analyzer
37155: .cast(matrix);
37156:
37157: if ((null == arg$5271)) {
37158: return null;
37159: }
37160: if (TypicalSupport.match$4998(arg$5271)) {
37161: return Analyzer.cast(Boolean.FALSE);
37162: }
37163: if (true) {
37164: final Pair<Pair<TypicalTypes.patternRecord>> list$5273 = Analyzer
37165: .cast(Analyzer.cast(arg$5271));
37166: final Pair<TypicalTypes.patternRecord> x = Analyzer
37167: .cast(Primitives.wrapHead(list$5273));
37168: final Pair<Pair<TypicalTypes.patternRecord>> xs = Analyzer
37169: .cast(Primitives.wrapTail(list$5273));
37170:
37171: return Analyzer.cast(null == allWildCard
37172: .apply(x) ? null
37173: : allWildCard.apply(x) ? Boolean.TRUE
37174: : quickPartialCheck.apply(xs));
37175: }
37176: return null;
37177: }
37178: }.apply();
37179: }
37180: };
37181:
37182: final Function.F1<Boolean, Pair<TypicalTypes.patternRecord>> allWildCard = new Function.F1<Boolean, Pair<TypicalTypes.patternRecord>>() {
37183: public Boolean apply(final Pair<TypicalTypes.patternRecord> row) {
37184: return new Match<Boolean>() {
37185: public Boolean apply() {
37186: final Pair<TypicalTypes.patternRecord> arg$5275 = Analyzer
37187: .cast(row);
37188:
37189: if ((null == arg$5275)) {
37190: return null;
37191: }
37192: if (TypicalSupport.match$4711(arg$5275)) {
37193: return Analyzer.cast(Boolean.TRUE);
37194: }
37195: if (true) {
37196: final Pair<TypicalTypes.patternRecord> list$5277 = Analyzer
37197: .cast(Analyzer.cast(arg$5275));
37198: final TypicalTypes.patternRecord x = Analyzer
37199: .cast(Primitives.wrapHead(list$5277));
37200: final Pair<TypicalTypes.patternRecord> xs = Analyzer
37201: .cast(Primitives.wrapTail(list$5277));
37202:
37203: return Analyzer.cast(new Match<Boolean>() {
37204: public Boolean apply() {
37205: final TypicalTypes.pattern arg$5282 = Analyzer
37206: .cast(null == x ? null : x.pat);
37207:
37208: if ((null == arg$5282)) {
37209: return null;
37210: }
37211: if ((null != arg$5282))
37212: switch (arg$5282.tag()) {
37213: case VariablePattern:
37214: if (TypicalSupport
37215: .match$4744(arg$5282)) {
37216: return Analyzer
37217: .cast(allWildCard
37218: .apply(xs));
37219: }
37220: break;
37221: case WildCardPattern:
37222: if (TypicalSupport
37223: .match$4742(arg$5282)) {
37224: return Analyzer
37225: .cast(allWildCard
37226: .apply(xs));
37227: }
37228: break;
37229: default:
37230: break;
37231: }
37232: ;
37233: if (true) {
37234: return Analyzer.cast(Boolean.FALSE);
37235: }
37236: return null;
37237: }
37238: }.apply());
37239: }
37240: return null;
37241: }
37242: }.apply();
37243: }
37244: };
37245:
37246: final Function.F1<String, TypicalTypes.pattern> showPattern = new Function.F1<String, TypicalTypes.pattern>() {
37247: public String apply(final TypicalTypes.pattern p) {
37248: return new Match<String>() {
37249: public String apply() {
37250: final TypicalTypes.pattern arg$5287 = Analyzer
37251: .cast(p);
37252:
37253: if ((null == arg$5287)) {
37254: return null;
37255: }
37256: if ((null != arg$5287))
37257: switch (arg$5287.tag()) {
37258: case PairPattern:
37259: if (TypicalSupport.match$4804(arg$5287)) {
37260: final TypicalTypes.patternRecord hd = Analyzer
37261: .cast(arg$5287.getTuple()
37262: .get1());
37263: final TypicalTypes.patternRecord tl = Analyzer
37264: .cast(arg$5287.getTuple()
37265: .get2());
37266:
37267: return Analyzer.cast(new Let<String>() {
37268: final String mes1;
37269: final String mes2;
37270:
37271: {
37272: mes1 = Analyzer
37273: .cast(showPattern
37274: .apply(null == hd ? null
37275: : hd.pat));
37276: mes2 = Analyzer
37277: .cast(showPattern
37278: .apply(null == tl ? null
37279: : tl.pat));
37280: }
37281:
37282: public String apply() {
37283: return Analyzer
37284: .cast(Primitives.concat
37285: .apply(
37286: Primitives.concat
37287: .apply(
37288: Primitives.concat
37289: .apply(
37290: mes1,
37291: "::("),
37292: mes2),
37293: ")"));
37294: }
37295: }.apply());
37296: }
37297: break;
37298: case ConstructorPattern:
37299: if (TypicalSupport.match$4790(arg$5287)) {
37300: final String s = Analyzer.cast(arg$5287
37301: .getTuple().get1());
37302: final Pair<TypicalTypes.patternRecord> pl = Analyzer
37303: .cast(arg$5287.getTuple()
37304: .get2());
37305:
37306: return Analyzer.cast(new Let<String>() {
37307: final String mes;
37308:
37309: {
37310: mes = Analyzer
37311: .cast(showPatternRecords
37312: .apply(pl));
37313: }
37314:
37315: public String apply() {
37316: return Analyzer
37317: .cast(Primitives.concat
37318: .apply(
37319: Primitives.concat
37320: .apply(
37321: Primitives.concat
37322: .apply(
37323: s,
37324: "("),
37325: mes),
37326: ")"));
37327: }
37328: }.apply());
37329: }
37330: break;
37331: case RecFieldPattern:
37332: if (TypicalSupport.match$4818(arg$5287)) {
37333: final String s = Analyzer.cast(arg$5287
37334: .getTuple().get1());
37335: final TypicalTypes.patternRecord pt = Analyzer
37336: .cast(arg$5287.getTuple()
37337: .get2());
37338:
37339: return Analyzer.cast(new Let<String>() {
37340: final String mes;
37341:
37342: {
37343: mes = Analyzer
37344: .cast(showPattern
37345: .apply(null == pt ? null
37346: : pt.pat));
37347: }
37348:
37349: public String apply() {
37350: return Analyzer
37351: .cast(Primitives.concat
37352: .apply(
37353: Primitives.concat
37354: .apply(
37355: s,
37356: "="),
37357: mes));
37358: }
37359: }.apply());
37360: }
37361: break;
37362: case VariablePattern:
37363: if (TypicalSupport.match$4744(arg$5287)) {
37364: return Analyzer.cast("_");
37365: }
37366: break;
37367: case TupPattern:
37368: if (TypicalSupport.match$4783(arg$5287)) {
37369: final Pair<TypicalTypes.patternRecord> pl = Analyzer
37370: .cast(arg$5287.getTuple()
37371: .get1());
37372:
37373: return Analyzer.cast(new Let<String>() {
37374: final String mes;
37375:
37376: {
37377: mes = Analyzer
37378: .cast(showPatternRecords
37379: .apply(pl));
37380: }
37381:
37382: public String apply() {
37383: return Analyzer
37384: .cast(Primitives.concat
37385: .apply(
37386: Primitives.concat
37387: .apply(
37388: "(",
37389: mes),
37390: ")"));
37391: }
37392: }.apply());
37393: }
37394: break;
37395: case BotPattern:
37396: if (TypicalSupport.match$4745(arg$5287)) {
37397: return Analyzer.cast("_|_");
37398: }
37399: break;
37400: case RecPattern:
37401: if (TypicalSupport.match$4811(arg$5287)) {
37402: final Pair<TypicalTypes.patternRecord> pl = Analyzer
37403: .cast(arg$5287.getTuple()
37404: .get1());
37405:
37406: return Analyzer.cast(new Let<String>() {
37407: final String mes;
37408:
37409: {
37410: mes = Analyzer
37411: .cast(showPatternRecords
37412: .apply(pl));
37413: }
37414:
37415: public String apply() {
37416: return Analyzer
37417: .cast(Primitives.concat
37418: .apply(
37419: Primitives.concat
37420: .apply(
37421: "{",
37422: mes),
37423: "}"));
37424: }
37425: }.apply());
37426: }
37427: break;
37428: case EmptyPattern:
37429: if (TypicalSupport.match$4797(arg$5287)) {
37430: return Analyzer.cast("[]");
37431: }
37432: break;
37433: case ConstantPattern:
37434: if (TypicalSupport.match$4752(arg$5287)) {
37435: final TypicalTypes.value val = Analyzer
37436: .cast(arg$5287.getTuple()
37437: .get1());
37438:
37439: return Analyzer
37440: .cast(new Match<String>() {
37441: public String apply() {
37442: final TypicalTypes.value arg$5298 = Analyzer
37443: .cast(val);
37444:
37445: if ((null == arg$5298)) {
37446: return null;
37447: }
37448: if ((null != arg$5298))
37449: switch (arg$5298
37450: .tag()) {
37451: case BoolValue:
37452: if (TypicalSupport
37453: .match$5171(arg$5298)) {
37454: final Boolean b = Analyzer
37455: .cast(arg$5298
37456: .getTuple()
37457: .get1());
37458:
37459: return Analyzer
37460: .cast(null == b ? null
37461: : b ? "true"
37462: : "false");
37463: }
37464: break;
37465: case IntValue:
37466: if (TypicalSupport
37467: .match$5225(arg$5298)) {
37468: final BigInteger i = Analyzer
37469: .cast(arg$5298
37470: .getTuple()
37471: .get1());
37472:
37473: return Analyzer
37474: .cast(Primitives.itos
37475: .apply(i));
37476: }
37477: break;
37478: case FloatValue:
37479: if (TypicalSupport
37480: .match$5226(arg$5298)) {
37481: final Double f = Analyzer
37482: .cast(arg$5298
37483: .getTuple()
37484: .get1());
37485:
37486: return Analyzer
37487: .cast(Primitives.ftos
37488: .apply(f));
37489: }
37490: break;
37491: case StringValue:
37492: if (TypicalSupport
37493: .match$5227(arg$5298)) {
37494: final String s = Analyzer
37495: .cast(arg$5298
37496: .getTuple()
37497: .get1());
37498:
37499: return Analyzer
37500: .cast(s);
37501: }
37502: break;
37503: default:
37504: break;
37505: }
37506: ;
37507: return null;
37508: }
37509: }.apply());
37510: }
37511: break;
37512: case WildCardPattern:
37513: if (TypicalSupport.match$4742(arg$5287)) {
37514: return Analyzer.cast("_");
37515: }
37516: break;
37517: default:
37518: break;
37519: }
37520: ;
37521: if (true) {
37522: return Analyzer.cast(null);
37523: }
37524: return null;
37525: }
37526: }.apply();
37527: }
37528: };
37529:
37530: final Function.F1<String, Pair<TypicalTypes.pattern>> showPatterns = new Function.F1<String, Pair<TypicalTypes.pattern>>() {
37531: public String apply(final Pair<TypicalTypes.pattern> pl) {
37532: return new Match<String>() {
37533: public String apply() {
37534: final Pair<TypicalTypes.pattern> arg$5311 = Analyzer
37535: .cast(pl);
37536:
37537: if ((null == arg$5311)) {
37538: return null;
37539: }
37540: if (TypicalSupport.match$5141(arg$5311)) {
37541: return Analyzer.cast("");
37542: }
37543: if (TypicalSupport.match$5313(arg$5311)) {
37544: final TypicalTypes.pattern x = Analyzer
37545: .cast(arg$5311.get(0));
37546:
37547: return Analyzer.cast(showPattern.apply(x));
37548: }
37549: if (true) {
37550: final Pair<TypicalTypes.pattern> list$5314 = Analyzer
37551: .cast(Analyzer.cast(arg$5311));
37552: final TypicalTypes.pattern x = Analyzer
37553: .cast(Primitives.wrapHead(list$5314));
37554: final Pair<TypicalTypes.pattern> xs = Analyzer
37555: .cast(Primitives.wrapTail(list$5314));
37556:
37557: return Analyzer.cast(new Let<String>() {
37558: final String me;
37559: final String mes;
37560:
37561: {
37562: me = Analyzer
37563: .cast(showPattern.apply(x));
37564: mes = Analyzer.cast(showPatterns
37565: .apply(xs));
37566: }
37567:
37568: public String apply() {
37569: return Analyzer.cast(Primitives.concat
37570: .apply(me, mes));
37571: }
37572: }.apply());
37573: }
37574: return null;
37575: }
37576: }.apply();
37577: }
37578: };
37579:
37580: final Function.F1<String, Pair<TypicalTypes.patternRecord>> showPatternRecords = new Function.F1<String, Pair<TypicalTypes.patternRecord>>() {
37581: public String apply(final Pair<TypicalTypes.patternRecord> pl) {
37582: return new Match<String>() {
37583: public String apply() {
37584: final Pair<TypicalTypes.patternRecord> arg$5316 = Analyzer
37585: .cast(pl);
37586:
37587: if ((null == arg$5316)) {
37588: return null;
37589: }
37590: if (TypicalSupport.match$4711(arg$5316)) {
37591: return Analyzer.cast("");
37592: }
37593: if (TypicalSupport.match$5318(arg$5316)) {
37594: final TypicalTypes.patternRecord x = Analyzer
37595: .cast(arg$5316.get(0));
37596:
37597: return Analyzer.cast(showPattern
37598: .apply(null == x ? null : x.pat));
37599: }
37600: if (true) {
37601: final Pair<TypicalTypes.patternRecord> list$5319 = Analyzer
37602: .cast(Analyzer.cast(arg$5316));
37603: final TypicalTypes.patternRecord x = Analyzer
37604: .cast(Primitives.wrapHead(list$5319));
37605: final Pair<TypicalTypes.patternRecord> xs = Analyzer
37606: .cast(Primitives.wrapTail(list$5319));
37607:
37608: return Analyzer.cast(new Let<String>() {
37609: final String me;
37610: final String mes;
37611:
37612: {
37613: me = Analyzer
37614: .cast(showPattern
37615: .apply(null == x ? null
37616: : x.pat));
37617: mes = Analyzer.cast(showPatternRecords
37618: .apply(xs));
37619: }
37620:
37621: public String apply() {
37622: return Analyzer.cast(Primitives.concat
37623: .apply(Primitives.concat.apply(
37624: me, ","), mes));
37625: }
37626: }.apply());
37627: }
37628: return null;
37629: }
37630: }.apply();
37631: }
37632: };
37633: }
|