module analysis::typepal::Collector
rascal-0.40.16
typepal-0.14.8
Usage
import analysis::typepal::Collector;
Source code
http://github.com/usethesource/typepal/src/analysis/typepal/Collector.rsc
Dependencies
import Node;
import Map;
import ParseTree;
import Set;
import Relation;
import IO;
import Type;
import Location;
import String;
import analysis::typepal::Version;
extend analysis::typepal::ConfigurableScopeGraph;
extend analysis::typepal::ICollector;
function dependenciesAslocList
list[loc] dependenciesAslocList(list[value] dependencies)
function isTypeVarFree
bool isTypeVarFree(AType t)
function dependenciesAslocs
list[loc] dependenciesAslocs(list[Tree] dependencies)
data DefInfo
data DefInfo
= defType(loc src)
| defType(Tree tree)
| defType(AType atype)
| defTypeCall(list[loc] dependsOn, AType(Solver s) getAType)
| defTypeLub(list[loc] dependsOn, list[loc] defines, list[AType(Solver s)] getATypes)
;
function defType
DefInfo defType(list[Tree] dependsOn, AType(Solver s) getAType)
function getDependencies
list[loc] getDependencies(defType(loc src))
list[loc] getDependencies(defType(Tree tree))
list[loc] getDependencies(defType(AType atype))
default list[loc] getDependencies(DefInfo di)
function defLub
DefInfo defLub(list[Tree] dependsOn, AType(Solver s) getAType)
function printDeps
void printDeps(list[loc] dependsOn, str indent, map[loc,AType] facts)
data Requirement
data Requirement (bool eager = false)
= req(str rname, loc src, list[loc] dependsOn, void(Solver s) preds)
| reqEqual(str rname, value l, value r, list[loc] dependsOn, FailMessage fm)
| reqComparable(str rname, value l, value r, list[loc] dependsOn, FailMessage fm)
| reqSubtype(str rname, value l, value r, list[loc] dependsOn, FailMessage fm)
| reqUnify(str rname, value l, value r, list[loc] dependsOn, FailMessage fm)
| reqError (loc src, list[loc] dependsOn, FailMessage fm)
| reqErrors(loc src, list[loc] dependsOn, list[FailMessage] fms)
;
function getReqSrc
loc getReqSrc(Requirement req)
function print
void print(req(str rname, loc src, list[loc] dependsOn, void(Solver s) preds), str indent, map[loc,AType] facts, bool full=true)
void print(req(str rname, loc src, list[loc] dependsOn, void(Solver s) preds), str indent, map[loc,AType] facts, bool full=true)
void print(reqEqual(str rname, value l, value r, list[loc] dependsOn, FailMessage fm), str indent, map[loc,AType] facts, bool full=true)
void print(reqComparable(str rname, value l, value r, list[loc] dependsOn, FailMessage fm), str indent, map[loc,AType] facts, bool full=true)
void print(reqSubtype(str rname, value l, value r, list[loc] dependsOn, FailMessage fm), str indent, map[loc,AType] facts, bool full=true)
void print(reqUnify(str rname, value l, value r, list[loc] dependsOn, FailMessage fm), str indent, map[loc,AType] facts, bool full=true)
void print(reqError (loc src, list[loc] dependsOn, FailMessage fm), str indent, map[loc,AType] facts, bool full=true)
void print(reqErrors(loc src, list[loc] dependsOn, list[FailMessage] fms), str indent, map[loc,AType] facts, bool full=true)
data Calculator
data Calculator
= calcType(loc src, AType atype)
| calcLoc(loc src, list[loc] dependsOn)
| calc(str cname, loc src, list[loc] dependsOn, AType(Solver s) getAType, bool eager=false)
| calcLub(str cname, list[loc] srcs, list[loc] dependsOn, list[AType(Solver s)] getATypes, bool eager=false)
;
function dependsOn
list[loc] dependsOn(Calculator calc)
function srcs
list[loc] srcs(Calculator calc)
function print
void print(calcType(loc src, AType atype), str indent, map[loc,AType] facts, bool full=true)
void print(calcLoc(loc src, list[loc] dependsOn), str indent, map[loc,AType] facts, bool full=true)
void print(calc(str cname, loc src, list[loc] dependsOn, AType(Solver s) calculator), str indent, map[loc,AType] facts, bool full=true)
void print(calcLub(str cname, list[loc] srcs, list[loc] dependsOn, list[AType(Solver s)] getATypes), str indent, map[loc,AType] facts, bool full=true)
void print(tuple[loc scope, str id, IdRole idRole, loc defined, DefInfo defInfo] def, str indent, map[loc, AType] facts, bool full=true)
function defaultCollector
Collector defaultCollector(Tree t)
function newCollector
Collector newCollector(str modelName, Tree pt, TypePalConfig config)
function convertLocs
TModel convertLocs(TModel tm, map[loc,loc] locMap)
function convertLoc
loc convertLoc(loc l, map[loc,loc] locMap)
function convertTModel2PhysicalLocs
TModel convertTModel2PhysicalLocs(TModel tm)
function convertTModel2LogicalLocs
TModel convertTModel2LogicalLocs(TModel tm, map[str,TModel] tmodels)
function newCollector
Collector newCollector(str modelName, map[str,Tree] namedTrees, TypePalConfig config)
function collect
void collect(Tree t1, Tree t2, Collector c)
void collect(Tree t1, Tree t2, Tree t3, Collector c)
void collect(Tree t1, Tree t2, Tree t3, Tree t4, Collector c)
void collect(Tree t1, Tree t2, Tree t3, Tree t4, Tree t5, Collector c)
void collect(Tree t1, Tree t2, Tree t3, Tree t4, Tree t5, Tree t6, Collector c)
void collect(Tree t1, Tree t2, Tree t3, Tree t4, Tree t5, Tree t6, Tree t7, Collector c)
void collect(Tree t1, Tree t2, Tree t3, Tree t4, Tree t5, Tree t6, Tree t7, Tree t8, Collector c)
void collect(Tree t1, Tree t2, Tree t3, Tree t4, Tree t5, Tree t6, Tree t7, Tree t8, Tree t9, Collector c)
void collect(list[Tree] currentTrees, Collector c)
function collectArgs1
void collectArgs1(list[Tree] args, Collector c)
function collectArgs2
void collectArgs2(list[Tree] args, Collector c)
function collectArgsN
void collectArgsN(list[Tree] args, int delta, Collector c)
function allSymbolsIgnored
bool allSymbolsIgnored(list[Symbol] symbols)
function treeAsMessage
str treeAsMessage(Tree t, int charLimit=120)
function collect
default void collect(Tree currentTree, Collector c)