xrel.analyzer
Class SemanticChecks

java.lang.Object
  |
  +--xrel.analyzer.SemanticChecks

public class SemanticChecks
extends java.lang.Object

Contains the semantic error checking. Specifically it contains:

Exhaustivity check
check that clauses of the typeswitch construct are exhaustive
Irredundancy check
check that there are not redundant clauses in the typeswitch construct
Ambiguity check
check that import pattern is not ambiguous and that there are not ambiguous patterns in clauses of the typeswitch construct. A pattern is ambiguous when it exists a value that can have multiple matches
Output type check
check that real output types are subtypes of the declared output type

For additional information see the methods of the class.

N.B.:

Author:
Fabrizio Bisi

Constructor Summary
SemanticChecks()
           
 
Method Summary
static boolean checkTypeSwitch(SymTable st, boolean doIrredundancyChk, boolean doExhaustivityChk, boolean doTypeInference, boolean doAmbiguityChk, java.io.PrintStream out, boolean debug)
           
static boolean isAmbiguousImport(SymTable st, java.io.PrintStream out, boolean debug)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SemanticChecks

public SemanticChecks()
Method Detail

checkTypeSwitch

public static boolean checkTypeSwitch(SymTable st,
                                      boolean doIrredundancyChk,
                                      boolean doExhaustivityChk,
                                      boolean doTypeInference,
                                      boolean doAmbiguityChk,
                                      java.io.PrintStream out,
                                      boolean debug)

isAmbiguousImport

public static boolean isAmbiguousImport(SymTable st,
                                        java.io.PrintStream out,
                                        boolean debug)