@eagleoutice/flowr-dev
Version:
Static Dataflow Analyzer and Program Slicer for the R Programming Language
757 lines (756 loc) • 48.6 kB
TypeScript
export declare const flowrCapabilities: {
readonly name: "Capabilities of flowR";
readonly description: "This is an evolving representation of what started with #636 to formulate capabilities in a structured format.";
readonly version: "0.0.2";
readonly capabilities: readonly [{
readonly name: "Names and Identifiers";
readonly id: "names-and-identifiers";
readonly description: "The recognition of syntactical and non-syntactical names, including their resolutions to corresponding definitions.";
readonly example: (parser: import("../parser").KnownParser) => Promise<string>;
readonly capabilities: readonly [{
readonly name: "Form";
readonly id: "form";
readonly capabilities: readonly [{
readonly name: "Normal";
readonly id: "name-normal";
readonly supported: "fully";
readonly description: "_Recognize symbol uses like `a`, `plot`, ..._ (i.e., \"normal variables or function calls\").";
readonly url: [{
readonly name: string;
readonly href: "https://adv-r.hadley.nz/names-values.html#binding-basics";
}, {
readonly name: string;
readonly href: "https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Identifiers-1";
}];
}, {
readonly name: "Quoted";
readonly id: "name-quoted";
readonly supported: "fully";
readonly description: "_Recognize `\"a\"`, `'plot'`, ..._ In general, R allows to envelop names in quotations to allow for special characters such as spaces in variable names. However, this only works in the context of definitions. To access these names as variables, one has to either use function such as `get` or escape the name with backticks.";
readonly url: [{
readonly name: string;
readonly href: "https://adv-r.hadley.nz/names-values.html#non-syntactic";
}];
}, {
readonly name: "Escaped";
readonly id: "name-escaped";
readonly supported: "fully";
readonly description: "_Recognize `` `a` ``, `` `plot` ``, ..._";
readonly url: [{
readonly name: string;
readonly href: "https://adv-r.hadley.nz/names-values.html#non-syntactic";
}];
}, {
readonly name: "Created";
readonly id: "name-created";
readonly supported: "partially";
readonly description: "_Recognize functions which resolve strings as identifiers, such as `get`, ..._";
readonly url: [{
readonly name: "flowr#633";
readonly href: string;
}];
}];
}, {
readonly name: "Resolution";
readonly id: "resolution";
readonly capabilities: readonly [{
readonly name: "Global Scope";
readonly id: "global-scope";
readonly supported: "fully";
readonly description: "_For example, tracking a big table of current identifier bindings_";
}, {
readonly name: "Lexicographic Scope";
readonly id: "lexicographic-scope";
readonly supported: "fully";
readonly description: "_For example, support function definition scopes_";
}, {
readonly name: "Closures";
readonly id: "closures";
readonly supported: "partially";
readonly description: "_Handling [function factories](https://adv-r.hadley.nz/function-factories.html) and friends._ Currently, we do not have enough tests to be sure.";
}, {
readonly name: "Dynamic Environment Resolution";
readonly id: "dynamic-environment-resolution";
readonly supported: "partially";
readonly description: "_For example, using `new.env` and friends. Supports `new.env`/`new.environment`/`rlang::new_environment`, `assign`/`get`/`local` with `envir=`, dollar-sign access (`e$x`), `attach`, `with`/`within`, and env-variable aliasing (`alias <- e`). Static parent-argument resolution (`parent = e`, `parent = emptyenv()`) is supported._";
readonly capabilities: readonly [{
readonly name: "Environment in Conditionals";
readonly id: "environment-in-conditionals";
readonly supported: "partially";
readonly description: "_Tracking environment assignments and reads across if-then-else branches. flowR propagates envState through branch merging, but cross-branch name resolution inside the env is not guaranteed._";
}, {
readonly name: "Environment in Loops";
readonly id: "environment-in-loops";
readonly supported: "partially";
readonly description: "_Tracking environment assignments inside loop constructs (for, while, repeat). The env variable is correctly attributed in each iteration body, but dynamic key generation (e.g., `paste0`) prevents static name resolution._";
}, {
readonly name: "Environment Parent";
readonly id: "environment-parent";
readonly supported: "partially";
readonly description: "_Specifying a parent for a newly-created environment (`new.env(parent = e)`, `new.env(parent = emptyenv())`). Tracked-env-variable parents and `emptyenv()`/`NULL` are resolved statically; dynamic or unknown parents fall back to the default (`parent.frame()`)._";
}, {
readonly name: "Environment Alias";
readonly id: "environment-alias";
readonly supported: "partially";
readonly description: "_Aliasing a tracked environment variable (`alias <- e`). The `envState` snapshot at assignment time is propagated, so assigns made BEFORE the alias are visible through it. Assigns made AFTER the alias to the original variable are not reflected._";
}, {
readonly name: "With / Within";
readonly id: "environment-with";
readonly supported: "partially";
readonly description: "_Evaluating an expression inside a named environment with `with(data, expr)` or `within(data, expr)`. When `data` is a tracked env variable, reads of names defined in that env resolve correctly. Writes inside `expr` are ephemeral (not persisted back to the env)._";
}, {
readonly name: "Dynamic Variable Removal";
readonly id: "dynamic-variable-removal";
readonly supported: "partially";
readonly description: "_Support for `rm(list=..., envir=sys.frame(N))` removing variables from a specific call frame. Currently handles negative and zero offsets from within depth-1 functions._";
}];
}, {
readonly name: "Environment Sharing";
readonly id: "environment-sharing";
readonly supported: "not";
readonly description: "_Handling side-effects by environments which are not copied when modified_";
}, {
readonly name: "Search Type";
readonly id: "search-type";
readonly supported: "fully";
readonly description: "_Separating the resolution for functions and symbols._";
}, {
readonly name: "Search Path";
readonly id: "search-path";
readonly supported: "partially";
readonly description: "_Handling [R's search path](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Search-path) as explained in [Advanced R](https://adv-r.hadley.nz/environments.html#search-path)._ Attached packages and `attach`ed environments are placed below `.GlobalEnv` (so global bindings shadow package exports, matching R), attaching inside/through function calls propagates to the caller, and re-attaching is a no-op. Not yet handled: dynamic `search`/`fn_env` manipulation.";
}, {
readonly name: "Namespaces";
readonly id: "namespaces";
readonly supported: "partially";
readonly description: "_Handling R's namespaces as explained in [Advanced R](https://adv-r.hadley.nz/environments.html#namespaces)_";
}, {
readonly name: "Accessing Exported Names";
readonly id: "accessing-exported-names";
readonly supported: "partially";
readonly description: "_Resolving calls with `::` to their origin._ Accessing external files is allowed, although the name of packages etc. is not resolved correctly.";
}, {
readonly name: "Accessing Internal Names";
readonly id: "accessing-internal-names";
readonly supported: "partially";
readonly description: "_Similar to `::` but for internal names._";
}, {
readonly name: "Library Loading";
readonly id: "library-loading";
readonly supported: "partially";
readonly description: "_Resolve libraries identified with `library`, `require`, `attachNamespace`, ... and attach them to the search path_";
}, {
readonly name: "Dynamic Scope Changes";
readonly id: "dynamic-scope-changes";
readonly supported: "partially";
readonly description: "_Manually changing scopes like [`local`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/eval)_";
}, {
readonly name: "Anonymous Bindings";
readonly id: "anonymous-bindings";
readonly supported: "fully";
readonly description: "_Support for [`Recall`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/Recall)_";
}];
}];
}, {
readonly name: "Expressions";
readonly id: "expressions";
readonly capabilities: readonly [{
readonly name: "Function Calls";
readonly id: "function-calls";
readonly capabilities: readonly [{
readonly name: "Grouping";
readonly id: "grouping";
readonly supported: "fully";
readonly description: "_Recognize groups done with `(`, `{`, ... (more precisely, their default mapping to the primitive implementations)._";
}, {
readonly name: "Normal Call";
readonly id: "call-normal";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `f(x)`, `foo::bar(x, y)`, ..._";
readonly capabilities: readonly [{
readonly name: "Unnamed Arguments";
readonly id: "unnamed-arguments";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `f(3)`, `foo::bar(3, c(1,2))`, ..._";
}, {
readonly name: "Empty Arguments";
readonly id: "empty-arguments";
readonly supported: "fully";
readonly description: "_Essentially a special form of an unnamed argument as in `foo::bar(3, ,42)`, ..._";
}, {
readonly name: "Named Arguments";
readonly id: "named-arguments";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `f(x = 3)`, `foo::bar(x = 3, y = 4)`, ..._";
}, {
readonly name: "String Arguments";
readonly id: "string-arguments";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `f('x' = 3)`, `foo::bar('x' = 3, \"y\" = 4)`, ..._";
}, {
readonly name: "Resolve Arguments";
readonly id: "resolve-arguments";
readonly supported: "fully";
readonly description: "_Correctly bind arguments (including [`pmatch`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/pmatch))._ Currently, we do not have a correct implementation for `pmatch`. Furthermore, more tests would be nice.";
}, {
readonly name: "Side-Effects in Argument";
readonly id: "side-effects-in-argument";
readonly supported: "partially";
readonly description: "_Handle side-effects of arguments (e.g., `f(x <- 3)`, `f(x = y <- 3)`, ...)._ We have not enough tests to be sure";
}, {
readonly name: "Side-Effects in Function Call";
readonly id: "side-effects-in-function-call";
readonly supported: "partially";
readonly description: "_Handle side-effects of function calls (e.g., `setXTo(3)`, ...) for example achieved with the super assignment._ We need more tests and handlings. Furthermore, we do not detect side effects with external files, network, logging, etc.";
}];
}, {
readonly name: "Recursion";
readonly id: "recursion";
readonly supported: "fully";
readonly description: "_Recognize and resolve recursive calls like `f(3)` inside the definition of `f`, ..._";
}, {
readonly name: "Anonymous Calls";
readonly id: "call-anonymous";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `(function(x) x)(3)`, `factory(0)()`, ..._";
}, {
readonly name: "Infix Calls";
readonly id: "infix-calls";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `x + y`, `x %>% f(y)`, ..._";
}, {
readonly name: "Redefinition of Built-In Functions/primitives";
readonly id: "redefinition-of-built-in-functions-primitives";
readonly supported: "partially";
readonly description: "_Handle cases like `print <- function(x) x`, `` `for` <- function(a,b,c) a``, ..._ Currently, we can not handle all of them there are no tests. Still wip as part of desugaring";
}, {
readonly name: "Functions with global side effects";
readonly id: "functions-with-global-side-effects";
readonly supported: "partially";
readonly description: "_Support functions like `setwd` which have an impact on the subsequent program._";
}, {
readonly name: "Working Directory";
readonly id: "working-directory";
readonly supported: "partially";
readonly description: "_Track the effective working directory across `setwd` (control-flow- and location-sensitive) to resolve relative file paths. Interprocedural, sourced, and loop cases are treated as unbounded rather than guessed._";
}, {
readonly name: "Index Access";
readonly id: "index-access";
readonly capabilities: readonly [{
readonly name: "Single Bracket Access";
readonly id: "single-bracket-access";
readonly supported: "fully";
readonly description: "_Detect calls like `x[i]`, `x[i, ,b]`, `x[3][y]`, ... This does not include the real separation of cells, which is handled extra._";
}, {
readonly name: "Double Bracket Access";
readonly id: "double-bracket-access";
readonly supported: "fully";
readonly description: "_Detect calls like `x[[i]]`, `x[[i, b]]`, ... Similar to single bracket._";
}, {
readonly name: "Dollar Access";
readonly id: "dollar-access";
readonly supported: "fully";
readonly description: "_Detect calls like `x$y`, `x$\"y\"`, `x$y$z`, ..._";
}, {
readonly name: "Slot Access";
readonly id: "slot-access";
readonly supported: "fully";
readonly description: "_Detect calls like `x@y`, `x@y@z`, ..._";
}, {
readonly name: "Access with Argument-Names";
readonly id: "access-with-argument-names";
readonly supported: "fully";
readonly description: "_Detect calls like `x[i = 3]`, `x[[i=]]`, ..._";
}, {
readonly name: "Access with Empty";
readonly id: "access-with-empty";
readonly supported: "fully";
readonly description: "_Detect calls like `x[]`, `x[2,,42]`, ..._";
}, {
readonly name: "Subsetting (Multiple Indices)";
readonly id: "subsetting-multiple";
readonly supported: "fully";
readonly description: "_Detect calls like `x[i > 3]`, `x[c(1,3)]`, ..._";
}];
}, {
readonly name: "Operators";
readonly id: "operators";
readonly capabilities: readonly [{
readonly name: "Unary Operator";
readonly id: "unary-operator";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `+3`, `-3`, ..._";
}, {
readonly name: "Binary Operator";
readonly id: "binary-operator";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `3 + 4`, `3 * 4`, ..._";
readonly capabilities: readonly [{
readonly name: "Special Operator";
readonly id: "special-operator";
readonly supported: "fully";
readonly description: "_Recognize and resolve calls like `3 %in% 4`, `3 %*% 4`, ..._";
}, {
readonly name: "Model Formula";
readonly id: "model-formula";
readonly supported: "partially";
readonly description: "_Recognize and resolve calls like `y ~ x`, `y ~ x + z`, ... including their implicit redefinitions of some functions._ Currently, we do not handle their redefinition and only treat model formulas as normal binary operators";
}, {
readonly name: "Assignments and Bindings";
readonly id: "assignments-and-bindings";
readonly capabilities: readonly [{
readonly name: "Local Left Assignment";
readonly id: "local-left-assignment";
readonly supported: "fully";
readonly description: "_Handle `x <- 3`, `x$y <- 3`, ..._";
}, {
readonly name: "Local Right Assignment";
readonly id: "local-right-assignment";
readonly supported: "fully";
readonly description: "_Handle `3 -> x`, `3 -> x$y`, ..._";
}, {
readonly name: "Local Equal Assignment";
readonly id: "local-equal-assignment";
readonly supported: "fully";
readonly description: "_Handle `x = 3`, `x$y := 3`, ..._";
}, {
readonly name: "Local Table Assignment";
readonly id: "local-table-assignment";
readonly supported: "fully";
readonly description: "_Handle `x[,a:=3,]`, ..._";
}, {
readonly name: "Super Left Assignment";
readonly id: "super-left-assignment";
readonly supported: "fully";
readonly description: "_Handle `x <<- 42`, `x$y <<- 42`, ..._";
}, {
readonly name: "Super Right Assignment";
readonly id: "super-right-assignment";
readonly supported: "fully";
readonly description: "_Handle `42 ->> x`, `42 ->> x$y`, ..._";
}, {
readonly name: "Return Value of Assignments";
readonly id: "return-value-of-assignments";
readonly supported: "fully";
readonly description: "_Handle `x <- 3` returning `3`, e.g., in `x <- y <- 3`_";
}, {
readonly name: "Assignment Functions";
readonly id: "assignment-functions";
readonly supported: "partially";
readonly description: "_Handle `assign(x, 3)`, `delayedAssign(x, 3)`, ..._ Currently we can not handle all of them and tests are rare.";
}, {
readonly name: "Range Assignment";
readonly id: "range-assignment";
readonly supported: "fully";
readonly description: "_Handle `x[1:3] <- 3`, `x$y[1:3] <- 3`, ..._";
}, {
readonly name: "Replacement Functions";
readonly id: "replacement-functions";
readonly supported: "partially";
readonly description: "_Handle `x[i] <- 3`, `x$y <- 3`, ... as `` `[<-`(x, 3) ``, ..._ Currently work in progress as part of the desugaring but still untested.";
}, {
readonly name: "Locked Bindings";
readonly id: "locked-bindings";
readonly supported: "not";
readonly description: "_Handle `lockBinding(x, 3)`, ..._";
}];
}];
}];
}, {
readonly name: "Control-Flow";
readonly id: "control-flow";
readonly capabilities: readonly [{
readonly name: "if";
readonly id: "if";
readonly supported: "fully";
readonly description: "_Handle `if (x) y else z`, `if (x) y`, ..._";
}, {
readonly name: "for loop";
readonly id: "for-loop";
readonly supported: "fully";
readonly description: "_Handle `for (i in 1:3) print(i)`, ..._";
}, {
readonly name: "while loop";
readonly id: "while-loop";
readonly supported: "fully";
readonly description: "_Handle `while (x) b`, ..._";
}, {
readonly name: "repeat loop";
readonly id: "repeat-loop";
readonly supported: "fully";
readonly description: "_Handle `repeat {b; if (x) break}`, ..._";
}, {
readonly name: "break";
readonly id: "break";
readonly supported: "fully";
readonly description: "_Handle `break` (including `break()`) ..._";
}, {
readonly name: "next";
readonly id: "next";
readonly supported: "fully";
readonly description: "_Handle `next` (including `next()`) ..._";
}, {
readonly name: "switch";
readonly id: "switch";
readonly supported: "fully";
readonly description: "_Handle `switch(3, \"a\", \"b\", \"c\")`, ..._";
}, {
readonly name: "return";
readonly id: "return";
readonly supported: "fully";
readonly description: "_Handle `return(3)`, ... in function definitions_";
}, {
readonly name: "Exceptions and Errors";
readonly id: "exceptions-and-errors";
readonly supported: "partially";
readonly description: "_Handle `try`, `stop`, ..._";
}];
}, {
readonly name: "Function Definitions";
readonly id: "function-definitions";
readonly capabilities: readonly [{
readonly name: "Normal";
readonly id: "normal-definition";
readonly supported: "fully";
readonly description: "_Handle `function() 3`, ..._";
}, {
readonly name: "Formals";
readonly id: "formals";
readonly capabilities: readonly [{
readonly name: "Named";
readonly id: "formals-named";
readonly supported: "fully";
readonly description: "_Handle `function(x) x`, ..._";
}, {
readonly name: "Default";
readonly id: "formals-default";
readonly supported: "fully";
readonly description: "_Handle `function(x = 3) x`, ..._";
}, {
readonly name: "Dot-Dot-Dot";
readonly id: "formals-dot-dot-dot";
readonly supported: "fully";
readonly description: "_Handle `function(...) 3`, ..._";
}, {
readonly name: "Promises";
readonly id: "formals-promises";
readonly supported: "partially";
readonly description: "_Handle `function(x = y) { y <- 3; x }`, `function(x = { x <- 3; x}) { x * x }`, ..._ A default argument resolves in the function's own environment and an argument passed in resolves in the caller's, both as R does it. We do not model _when_ a promise is forced: a `delayedAssign`ed expression is linked to every binding it may be forced against, which never misses the one that feeds it but may name others as well. What forcing _does_ is not modelled either, so the writes a promise performs when it is forced (`delayedAssign(\"x\", { x <- 99; 2 })`, where reading `x` yields `2` and leaves `x` at `99`) do not reach the reads that follow.";
}];
}, {
readonly name: "Implicit Return";
readonly id: "implicit-return";
readonly supported: "fully";
readonly description: "_Handle the return of `function() 3`, ..._";
}, {
readonly name: "Lambda Syntax";
readonly id: "lambda-syntax";
readonly supported: "fully";
readonly description: "_Support `\\(x) x`, ..._";
}];
}, {
readonly name: "Important Built-Ins";
readonly id: "important-built-ins";
readonly capabilities: readonly [{
readonly name: "Non-Strict Logical Operators";
readonly id: "non-strict-logical-operators";
readonly supported: "fully";
readonly description: "_Handle `&&`, `||`, ..._";
}, {
readonly name: "Pipe and Pipe-Bind";
readonly id: "pipe-and-pipe-bind";
readonly supported: "partially";
readonly description: "_Handle the [new (4.1) pipe and pipe-bind syntax](https://www.r-bloggers.com/2021/05/the-new-r-pipe/): `|>`, and `=>`._; Similarly support the other pipe binds";
}, {
readonly name: "Sequencing";
readonly id: "built-in-sequencing";
readonly supported: "not";
readonly description: "_Handle `:`, `seq`, ... by gathering value information using abstract interpretation._";
}, {
readonly name: "Internal and Primitive Functions";
readonly id: "built-in-internal-and-primitive-functions";
readonly supported: "partially";
readonly description: "_Handle `.Internal`, `.Primitive`, ..._ In general we can not handle them as they refer to non-R code. We currently do not support them when used with the function.";
}, {
readonly name: "Options";
readonly id: "built-in-options";
readonly supported: "not";
readonly description: "_Handle `options`, `getOption`, ..._ Currently, we do not support the function at all.";
}, {
readonly name: "Help";
readonly id: "built-in-help";
readonly supported: "partially";
readonly description: "_Handle `help`, `?`, ..._ We do not support the function in a sensible way but just ignore it (although this does not happen resolved).";
}, {
readonly name: "Reflection / \"Computing on the Language\"";
readonly id: "reflection-\"computing-on-the-language\"";
readonly capabilities: readonly [{
readonly name: "Get Function Structure";
readonly id: "get-function-structure";
readonly supported: "not";
readonly description: "_Handle `body`, `formals`, `environment` to access the respective parts of a function._ We do not support the functions at all.";
}, {
readonly name: "Modify Function Structure";
readonly id: "modify-function-structure";
readonly supported: "not";
readonly description: "_Handle `body<-`, `formals<-`, `environment<-` to modify the respective parts of a function._ We do not support the functions at all.";
}, {
readonly name: "Quoting";
readonly id: "built-in-quoting";
readonly supported: "partially";
readonly description: "_Handle `quote`, `substitute`, `bquote`, ..._ A quoted argument is marked as [non-standard evaluation](https://github.com/flowr-analysis/flowr/wiki/Dataflow-Graph#non-standard-evaluation) as a whole, so nothing within it counts as read. We model the escapes back to standard evaluation that a quoting function offers: rlang's `!!`/`!!!` (in `expr`, `quo`, `enquo`, ... and in data-masking arguments) and `bquote`'s `.()`. Base `quote`/`substitute` have no such escape, and `substitute` does not reach the caller's expression when used on a function argument.";
}, {
readonly name: "Evaluation";
readonly id: "built-in-evaluation";
readonly supported: "partially";
readonly description: "_Handle `eval`, `evalq`, `eval.parent`, ..._ `eval` of a string we can resolve is analyzed as if it were written in its place. A language object reaches the `eval` that forces it even across assignments, branches, loop iterations, and function calls, and its names resolve in the scope evaluating it, as R does. `eval(expr, envir)` runs elsewhere, so we mark the call as an unknown side effect instead of guessing. `evalq` quotes its first argument and we do not follow it into the given environment.";
}, {
readonly name: "String Templates";
readonly id: "string-templates";
readonly supported: "partially";
readonly description: "_Handle `glue::glue(\"{x}\")`, `cli::cli_alert_info(\"{.val {x}}\")`, `stringr::str_glue`/`str_interp`, ..._ The `{...}` of a template carries R code that runs where the call is, so we analyze it as if it were written there: it reads, it writes, and its side effects land in the calling scope. Doubled delimiters escape, `.open`/`.close` are honored when they are literal, and cli markup (`{.cls ...}`) contributes only the interpolations nested in it. A template aimed at another scope (`.envir`, `.con`, `glue_data`) is marked as an unknown side effect instead.";
}, {
readonly name: "Parsing";
readonly id: "built-in-parsing";
readonly supported: "not";
readonly description: "_Handle `parse`, `deparse`, ..._ We handle them as unknown function calls, but not specifically besides that.";
}];
}];
}];
}, {
readonly name: "Literal Values";
readonly id: "literal-values";
readonly capabilities: readonly [{
readonly name: "Numbers";
readonly id: "numbers";
readonly supported: "fully";
readonly description: "_Recognize numbers like `3`, `3.14`, `NA`, float-hex, ..._";
}, {
readonly name: "Strings";
readonly id: "strings";
readonly supported: "fully";
readonly description: "_Recognize strings like `\"a\"`, `'b'`, ..._";
readonly capabilities: readonly [{
readonly name: "Raw Strings";
readonly id: "raw-strings";
readonly supported: "fully";
readonly description: "_Recognize raw strings like `r\"(a)\"`, ..._";
}];
}, {
readonly name: "Logical";
readonly id: "logical";
readonly supported: "fully";
readonly description: "_Recognize the logicals `TRUE` and `FALSE`, ..._";
}, {
readonly name: "NULL";
readonly id: "null";
readonly supported: "fully";
readonly description: "_Recognize `NULL`_";
}, {
readonly name: "Inf and NaN";
readonly id: "inf-and-nan";
readonly supported: "fully";
readonly description: "_Recognize `Inf` and `NaN`_";
}];
}];
}, {
readonly name: "Non-Standard Evaluations/Semantics";
readonly id: "non-standard-evaluations-semantics";
readonly capabilities: readonly [{
readonly name: "Data Masking";
readonly id: "data-masking";
readonly supported: "partially";
readonly description: "_Handle `subset(d, col > 1)`, dplyr verbs, `ggplot2::aes`, data.table `:=`, ..._ In a masked argument, a name the caller binds is read as that variable and any other name is taken to come from the data. Which names a data frame actually offers is unknown to us, so a column shadowing a variable of the same name still resolves to the variable. rlang's `!!`/`!!!` and its `:=` name-value pair are recognised; `[` on a `data.table` does not mask its `j`/`by` yet.";
}, {
readonly name: "Recycling";
readonly id: "recycling";
readonly supported: "not";
readonly description: "_Handle recycling of vectors as explained in [Advanced R](https://adv-r.hadley.nz/vectors-chap.html)._ We do not support recycling.";
}, {
readonly name: "Vectorized Operator or Functions";
readonly id: "vectorized-operator-or-functions";
readonly supported: "not";
readonly description: "_Handle vectorized operations as explained in [Advanced R](https://adv-r.hadley.nz/perf-improve.html?q=vectorised#vectorise)._ We do not support vectorized operations.";
}, {
readonly name: "Hooks";
readonly id: "hooks";
readonly supported: "partially";
readonly description: "_Handle hooks like [`userhooks`](https://stat.ethz.ch/R-manual/R-devel/library/base/html/userhooks.html) and [`on.exit`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/on.exit)._ We support `on.exit` and rlang's [`on_load`/`run_on_load`/`on_package_load`](https://rlang.r-lib.org/reference/on_load.html), whose expressions we analyze where they are registered. `setHook` and the other user hooks are not modelled.";
}, {
readonly name: "Precedence";
readonly id: "precedence";
readonly supported: "fully";
readonly description: "_Handle the precedence of operators as explained in the [Documentation](https://rdrr.io/r/base/Syntax.html)._ We handle the precedence of operators (implicitly with the parser).";
}, {
readonly name: "Attributes";
readonly id: "attributes";
readonly capabilities: readonly [{
readonly name: "User-Defined";
readonly id: "user-defined";
readonly supported: "not";
readonly description: "_Handle [attributes](https://cran.r-project.org/doc/manuals/r-release/R-lang.html#Attributes) like `attr`, `attributes`, ..._ We do not support attributes.";
}, {
readonly name: "Built-In";
readonly id: "built-in";
readonly supported: "not";
readonly description: "_Handle built-in attributes like `dim`, ..._ We do not support them.";
}];
}];
}, {
readonly name: "Types";
readonly id: "types";
readonly capabilities: readonly [{
readonly name: "Primitive";
readonly id: "types-primitive";
readonly supported: "not";
readonly description: "_Recognize and resolve primitive types like `numeric`, `character`, ..._ We do not support typing currently.";
}, {
readonly name: "Non-Primitive";
readonly id: "types-non-primitive";
readonly supported: "not";
readonly description: "_Recognize and resolve non-primitive/composite types._ We do not support typing currently.";
}, {
readonly name: "Inference";
readonly id: "types-inference";
readonly supported: "not";
readonly description: "_Infer types from the code._ We do not support typing currently.";
}, {
readonly name: "Coercion";
readonly id: "types-coercion";
readonly supported: "not";
readonly description: "_Handle coercion of types._ We do not support typing currently.";
}, {
readonly name: "Object-Oriented Programming";
readonly id: "object-oriented-programming";
readonly capabilities: readonly [{
readonly name: "S3";
readonly id: "oop-s3";
readonly url: [{
readonly name: string;
readonly href: "https://adv-r.hadley.nz/s3.html";
}];
readonly supported: "partially";
readonly description: "_Handle S3 classes and methods as one unit (with attributes etc.). Including Dispatch and Inheritance._ We do not support typing currently and do not handle objects of these classes \"as units.\"";
}, {
readonly name: "S4";
readonly id: "oop-s4";
readonly url: [{
readonly name: string;
readonly href: "https://adv-r.hadley.nz/s4.html";
}];
readonly supported: "partially";
readonly description: "_Handle S4 classes and methods as one unit. Including Dispatch and Inheritance_ We do not support typing currently and do not handle objects of these classes \"as units.\"";
}, {
readonly name: "R6";
readonly id: "oop-r6";
readonly url: [{
readonly name: string;
readonly href: "https://adv-r.hadley.nz/r6.html";
}];
readonly supported: "partially";
readonly description: "_Handle R6 classes and methods as one unit. We do not support typing, inheritance, private/active bindings, or handling objects fully \"as units.\"";
}, {
readonly name: "R7/S7";
readonly id: "oop-r7-s7";
readonly url: [{
readonly name: "R7";
readonly href: "https://www.r-bloggers.com/2022/12/what-is-r7-a-new-oop-system-for-r/";
}, {
readonly name: "S7";
readonly href: "https://cran.r-project.org/web/packages/S7/index.html";
}];
readonly supported: "partially";
readonly description: "_Handle R7 classes and methods as one unit. Including Dispatch and Inheritance, as well as its Reference Semantics, Validators, ..._ We do not support typing currently and do not handle objects of these classes \"as units.\"";
}, {
readonly name: "Class-Based Dependency Attribution";
readonly id: "oop-class-dependency-attribution";
readonly supported: "partially";
readonly description: "_Attribute the use of a class to the package that owns it (registers a method for it and exports a same-named constructor), so a class use implies a dependency for library detection and version guessing (backed by the signature database's class-ownership map)._";
readonly capabilities: readonly [{
readonly name: "S3 class ownership";
readonly id: "class-owner-s3";
readonly supported: "partially";
readonly description: "_The signature database records which package owns each S3 class. A class use is attributed to the owning package -- both from a project's NAMESPACE `S3method(generic, class)` registrations (e.g. `S3method(\"as.irts\",\"zoo\")` marks `zoo` used) and from class-name string literals in plain code (`inherits(x, \"zoo\")`, `methods::is`, `new`, `structure(..., class=)`), marking the owner used and bounding its version below by the same-named constructor's export history. Class names that come from a variable or a `c(...)` vector, and method-definition names like `print.zoo`, are not yet resolved._";
}, {
readonly name: "S4 class ownership";
readonly id: "class-owner-s4";
readonly supported: "partially";
readonly description: "_A project's `importClassesFrom`/`importMethodsFrom` NAMESPACE directives are tracked, so the source package is attached and marked used like a plain `importFrom`. S4 class ownership itself (`exportClasses`, `setClass`) is not yet recorded in the signature database, so a bare S4 class use is not attributed to its owning package._";
}];
}];
}];
}, {
readonly name: "Structure";
readonly id: "structure";
readonly capabilities: readonly [{
readonly name: "Comments";
readonly id: "comments";
readonly supported: "fully";
readonly description: "_Recognize comments like `# this is a comment`, ... and line-directives_";
}, {
readonly name: "Semicolons";
readonly id: "semicolons";
readonly supported: "fully";
readonly description: "_Recognize and resolve semicolons like `a; b; c`, ..._";
}, {
readonly name: "Newlines";
readonly id: "newlines";
readonly supported: "fully";
readonly description: "_Recognize and resolve newlines like `a\nb\nc`, ..._";
}];
}, {
readonly name: "System, I/O, FFI, and Other Files";
readonly id: "system-i-o-ffi-and-other-files";
readonly capabilities: readonly [{
readonly name: "Sourcing External Files";
readonly id: "sourcing-external-files";
readonly supported: "partially";
readonly description: "_Handle `source`, `sys.source`, ..._ We are currently working on supporting the inclusion of external files. Currently we can handle `source`.";
}, {
readonly name: "Handling Binary Riles";
readonly id: "handling-binary-riles";
readonly supported: "not";
readonly description: "_Handle files dumped with, e.g., [`save`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/save), ... due to their frequent usage._ We do not support binary files.";
}, {
readonly name: "I/O";
readonly id: "i-o";
readonly supported: "not";
readonly description: "_Handle `read.csv`, `write.csv`, ..._ We do not support I/O for the time being but treat them as unknown function calls.";
}, {
readonly name: "Foreign Function Interface";
readonly id: "foreign-function-interface";
readonly supported: "not";
readonly description: "_Handle `.Fortran`, `C`,..._ We do not support FFI but treat them as unknown function calls.";
}, {
readonly name: "System Calls";
readonly id: "system-calls";
readonly supported: "not";
readonly description: "_Handle [`system`](https://www.rdocumentation.org/packages/base/versions/3.6.2/topics/system), `system.*`, ..._ We do not support system calls but treat them as unknown function calls.";
}, {
readonly name: "R-Markdown files";
readonly id: "file:rmd";
readonly supported: "fully";
readonly description: "Support R-Markdown files as R sources.";
}, {
readonly name: "Jupyter Notebook";
readonly id: "file:ipynb";
readonly supported: "partially";
readonly description: "Support Jupyter Notebooks as R sources.";
}, {
readonly name: "Quarto";
readonly id: "file:qmd";
readonly supported: "partially";
readonly description: "Support Quarto files as R sources.";
}, {
readonly name: "Sweave";
readonly id: "file:rnw";
readonly supported: "partially";
readonly description: "Support for Sweave files as R sources.";
}];
}, {
readonly name: "Pre-Processors/external Tooling";
readonly id: "pre-processors-external-tooling";
readonly supported: "fully";
readonly description: "_Handle pre-processors like `knitr`, `rmarkdown`, `roxygen2` ..._ We do not support pre-processors for the time being (being unable to handle things like `@importFrom`)";
}];
};