public TypeCheckInfo newScope(List<PDefinition> definitions, NameScope newScope) { Environment newEnv = new FlatCheckedEnvironment(assistantFactory, definitions, env, newScope); TypeCheckInfo info = new TypeCheckInfo(assistantFactory, newEnv, newScope); return info; } }
public FlatCheckedEnvironment(ITypeCheckerAssistantFactory af, PDefinition one, Environment env, NameScope scope) { super(af, one, env); dupHideCheck(definitions, scope); setStatic(env.isStatic()); }
@Override public Environment getGlobalEnvironment() { return new ModuleEnvironment(assistantFactory, defaultModule); }
public TypeCheckInfo newScope(NameScope newScope) { TypeCheckInfo info = new TypeCheckInfo(assistantFactory, env, newScope, qualifiers, constraint, returnType); return info; }
@Override public Environment getGlobalEnvironment() { return new PublicClassEnvironment(assistantFactory, classes, null); }
/** * Test whether one type is a subtype of another. * * @param sub * @param sup * @return True if sub is a subtype of sup. */ public synchronized boolean isSubType(PType sub, PType sup) { return isSubType(sub, sup, false); }
@Override public boolean isSystem() { return outer == null ? false : outer.isSystem(); }
protected AStateDefinition findStateDefinition(Environment question, INode node) { return question.findStateDefinition(); }
/** * Return the narrowest of two types/type lists. */ public synchronized List<PType> narrowest(List<PType> t1, List<PType> t2) { return allSubTypes(t1, t2, false) == Result.Yes ? t1 : t2; }
@Override public SClassDefinition findClassDefinition() { return outer == null ? null : outer.findClassDefinition(); }
public static void report(int number, String msg, ILexLocation location, Object node) { TypeChecker.report(number, msg, location); }
public PDefinition getEnclosingDefinition() { if (enclosingDefinition != null) { return enclosingDefinition; } return outer == null ? null : outer.getEnclosingDefinition(); }
@Override public boolean isVDMPP() { return outer == null ? false : outer.isVDMPP(); }
public static void detail2(boolean serious, String tag1, Object obj1, String tag2, Object obj2) { if (serious) { TypeChecker.detail2(tag1, obj1, tag2, obj2); } }
public FlatCheckedEnvironment(ITypeCheckerAssistantFactory af, List<PDefinition> definitions, NameScope scope) { super(af, definitions); dupHideCheck(definitions, scope); }
@Override public TypeComparator getTypeComparator() { if (typeComp == null) { typeComp = new TypeComparator(this); } return typeComp; }
@Override public boolean isStatic() { return outer == null ? false : outer.isStatic(); }
public FlatCheckedEnvironment(ITypeCheckerAssistantFactory af, List<PDefinition> definitions, Environment env, NameScope scope) { super(af, definitions, env); dupHideCheck(definitions, scope); setStatic(env.isStatic()); }
public static void detail(boolean serious, String tag, Object obj) { if (serious) { TypeChecker.detail(tag, obj); } }