Skip to main content

module analysis::typepal::TModel

rascal-0.40.16
typepal-0.14.8

Usage

import analysis::typepal::TModel;

Source code

http://github.com/usethesource/typepal/src/analysis/typepal/TModel.rsc

Dependencies

import String;
import Message;
import Node;
import IO;
import analysis::typepal::Version;

data IdRole

data IdRole  
= variableId()
;

function prettyRole

str prettyRole(IdRole idRole)

data ScopeRole

data ScopeRole  
= anonymousScope()
;

data Use

data Use  
= use(str id, str orgId, loc occ, loc scope, set[IdRole] idRoles)
| useq(list[str] ids, str orgId, loc occ, loc scope, set[IdRole] idRoles, set[IdRole] qualifierRoles)
;

alias Uses

list[Use]

function getOrgId

str getOrgId(Use u)

str getOrgId(Define d)

data ReferPath

data ReferPath  
= referToDef(Use use, PathRole pathRole)
| referToType(loc occ, loc scope, PathRole pathRole)
;

alias ReferPaths

set[ReferPath]

data DefInfo

data DefInfo  
= noDefInfo()
;

alias Define

tuple[loc scope, str id, str orgId, IdRole idRole, loc defined, DefInfo defInfo]

alias Defines

set[Define]

alias Scopes

map[loc inner, loc outer]

alias Paths

rel[loc from, PathRole pathRole, loc to]

data TypePalConfig

data TypePalConfig  
= tconfig()
;

data TModel

data TModel (
str version = getCurrentTplVersion(),
Defines defines = {},
Scopes scopes = (),
Paths paths = {},
ReferPaths referPaths = {},
Uses uses = [],
map[loc, map[str, rel[IdRole idRole, loc defined]]] definesMap = (),
str modelName = "",
map[str,loc] moduleLocs = (),
set[Calculator] calculators = {},
map[loc,AType] facts = (),
map[loc,AType] specializedFacts = (),
set[Requirement] requirements = {},
rel[loc, loc] useDef = {},
list[Message] messages = [],
map[str,value] store = (),
map[loc, Define] definitions = (),
map[loc,loc] logical2physical = (),
bool usesPhysicalLocs = false, // Are locations in physical format?
TypePalConfig config = tconfig()
)
= tmodel()
;

function printTModel

void printTModel(TModel tm)