-
Notifications
You must be signed in to change notification settings - Fork 2
Capabilities
github-actions[bot] edited this page Aug 20, 2024
·
66 revisions
This document was generated automatically from '/home/runner/work/flowr/flowr/src/r-bridge/data/print.ts' on 2024-08-20, 11:34:29 UTC summarizig flowR's current capabilities
The code-font behind each capability name is a link to the capability's id. This id can be used to reference the capability in a labeled test within flowR. Besides, we use colored bullets like this:
π© | flowR is capable of handling this feature fully |
πΆ | flowR is capable of handling this feature partially |
π΄ | flowR is not capable of handling this feature |
βοΈ This could be a feature diagram... βοΈ
-
Names and Identifiers (
names-and-identifiers
)-
Form (
form
)-
Normal (
name-normal
)
π© Recognize constructs likea
,plot
, ... -
Quoted (
name-quoted
)
π© Recognize"a"
,'plot'
, ... -
Escaped (
name-escaped
)
π© Recognize`a`
,`plot`
, ...
-
Normal (
-
Resolution (
resolution
)-
Global Scope (
global-scope
)
π© For example, tracking a big table of current identifier bindings -
Lexicographic Scope (
lexicographic-scope
)
π© For example, support function definition scopes -
Closures (
closures
)
πΆ Handling function factories and friends. Currently, we do not have enough tests to be sure. -
Dynamic Environment Resolution (
dynamic-environment-resolution
)
π΄ For example, usingnew.env
and friends -
Environment Sharing (
environment-sharing
)
π΄ Handling side-effects by environments which are not copied when modified -
Search Path (
search-path
)
π΄ Handling R's search path as explained in Advanced R. Currently, flowR does not support dynamic modifications withattach
,search
, orfn_env
and tests are definitely missing. Yet, theoretically, the tooling is all there. -
Namespaces (
namespaces
)
π΄ Handling R's namespaces as explained in Advanced R -
Accessing Exported Names (
accessing-exported-names
)
πΆ Resolving calls with::
to their origin. Accessing external files is allowed, although the name of packages etc. is not resolved correctly. -
Accessing Internal Names (
accessing-internal-names
)
π΄ Similar to::
but for internal names. -
Library Loading (
library-loading
)
π΄ Resolve libraries identified withlibrary
,require
,attachNamespace
, ... and attach them to the search path
-
Global Scope (
-
Form (
-
Expressions (
expressions
)-
Function Calls (
function-calls
)-
Grouping (
grouping
)
π© Recognize groups done with(
,{
, ... (more precisely, their default mapping to the primitive implementations). -
Normal Call (
call-normal
)
π© Recognize and resolve calls likef(x)
,foo::bar(x, y)
, ...-
Unnamed Arguments (
unnamed-arguments
)
π© Recognize and resolve calls likef(3)
,foo::bar(3, c(1,2))
, ... -
Empty Arguments (
empty-arguments
)
π© Essentially a special form of an unnamed argument as infoo::bar(3, ,42)
, ... -
Named Arguments (
named-arguments
)
π© Recognize and resolve calls likef(x = 3)
,foo::bar(x = 3, y = 4)
, ... -
String Arguments (
string-arguments
)
π© Recognize and resolve calls likef('x' = 3)
,foo::bar('x' = 3, "y" = 4)
, ... -
Resolve Arguments (
resolve-arguments
)
πΆ Correctly bind arguments (includingpmatch
). Currently, we do not have a correct implementation forpmatch
. Furthermore, more tests would be nice. -
Side-Effects in Argument (
side-effects-in-argument
)
πΆ Handle side-effects of arguments (e.g.,f(x <- 3)
,f(x = y <- 3)
, ...). We have not enough tests to be sure -
Side-Effects in Function Call (
side-effects-in-function-call
)
πΆ 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.
-
Unnamed Arguments (
-
Anonymous Calls (
call-anonymous
)
π© Recognize and resolve calls like(function(x) x)(3)
,factory(0)()
, ... -
Infix Calls (
infix-calls
)
π© Recognize and resolve calls likex + y
,x %>% f(y)
, ... -
Redefinition of Built-In Functions/primitives (
redefinition-of-built-in-functions-primitives
)
πΆ Handle cases likeprint <- 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 -
Index Access (
index-access
)-
Single Bracket Access (
single-bracket-access
)
π© Detect calls likex[i]
,x[i, ,b]
,x[3][y]
, ... This does not include the real separation of cells, which is handled extra. -
Double Bracket Access (
double-bracket-access
)
π© Detect calls likex[[i]]
,x[[i, b]]
, ... Similar to single bracket. -
Dollar Access (
dollar-access
)
π© Detect calls likex$y
,x$"y"
,x$y$z
, ... -
Slot Access (
slot-access
)
π© Detect calls likex@y
,x@y@z
, ... -
Access with Argument-Names (
access-with-argument-names
)
π© Detect calls likex[i = 3]
,x[[i=]]
, ... -
Access with Empty (
access-with-empty
)
π© Detect calls likex[]
,x[2,,42]
, ... -
Subsetting (
subsetting
)
π© Detect calls likex[i > 3]
,x[c(1,3)]
, ...
-
Single Bracket Access (
-
Operators (
operators
)-
Unary Operator (
unary-operator
)
π© Recognize and resolve calls like+3
,-3
, ... -
Binary Operator (
binary-operator
)
π© Recognize and resolve calls like3 + 4
,3 * 4
, ...-
Special Operator (
special-operator
)
π© Recognize and resolve calls like3 %in% 4
,3 %*% 4
, ... -
Model Formula (
model-formula
)
πΆ Recognize and resolve calls likey ~ 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 -
Assignments and Bindings (
assignments-and-bindings
)-
Local Left Assignment (
local-left-assignment
)
π© Handlex <- 3
,x$y <- 3
, ... -
Local Right Assignment (
local-right-assignment
)
π© Handle3 -> x
,3 -> x$y
, ... -
Local Equal Assignment (
local-equal-assignment
)
π© Handlex = 3
,x$y := 3
, ... -
Super Left Assignment (
super-left-assignment
)
π© Handlex <<- 42
,x$y <<- 42
, ... -
Super Right Assignment (
super-right-assignment
)
π© Handle42 ->> x
,42 ->> x$y
, ... -
Return Value of Assignments (
return-value-of-assignments
)
π© Handlex <- 3
returning3
, e.g., inx <- y <- 3
-
Assignment Functions (
assignment-functions
)
πΆ Handleassign(x, 3)
,delayedAssign(x, 3)
, ... Currently we can not handle all of them and tests are rare. -
Range Assignment (
range-assignment
)
π© Handlex[1:3] <- 3
,x$y[1:3] <- 3
, ... -
Replacement Functions (
replacement-functions
)
πΆ Handlex[i] <- 3
,x$y <- 3
, ... as`[<-`(x, 3)
, ... Currently work in progress as part of the desugaring but still untested. -
Locked Bindings (
locked-bindings
)
π΄ HandlelockBinding(x, 3)
, ...
-
Local Left Assignment (
-
Special Operator (
-
Unary Operator (
-
Control-Flow (
control-flow
)-
if (
if
)
π© Handleif (x) y else z
,if (x) y
, ... -
for loop (
for-loop
)
π© Handlefor (i in 1:3) print(i)
, ... -
while loop (
while-loop
)
π© Handlewhile (x) b
, ... -
repeat loop (
repeat-loop
)
π© Handlerepeat {b; if (x) break}
, ... -
break (
break
)
π© Handlebreak
(includingbreak()
) ... -
next (
next
)
π© Handlenext
(includingnext()
) ... -
switch (
switch
)
π© Handleswitch(3, "a", "b", "c")
, ... -
return (
return
)
π© Handlereturn(3)
, ... in function definitions -
exceptions (
exceptions
)
π΄ Handletry
,stop
, ...
-
if (
-
Function Definitions (
function-definitions
)-
Normal (
normal-definition
)
π© Handlefunction() 3
, ... -
Formals (
formals
)-
Named (
formals-named
)
π© Handlefunction(x) x
, ... -
Default (
formals-default
)
π© Handlefunction(x = 3) x
, ... -
Dot-Dot-Dot (
formals-dot-dot-dot
)
π© Handlefunction(...) 3
, ... -
Promises (
formals-promises
)
πΆ Handlefunction(x = y) { y <- 3; x }
,function(x = { x <- 3; x}) { x * x }
, ... We try to identify promises correctly but this is really rudimentary.
-
Named (
-
Implicit Return (
implicit-return
)
π© Handle the return offunction() 3
, ... -
Lambda Syntax (
lambda-syntax
)
π© Support\(x) x
, ...
-
Normal (
-
Important Built-Ins (
important-built-ins
)-
Non-Strict Logical Operators (
non-strict-logical-operators
)
π© Handle&&
,||
, ... -
Pipe and Pipe-Bind (
built-in-pipe-and-pipe-bind
)
πΆ Handle the new (4.1) pipe and pipe-bind syntax:|>
, and=>
. We have not enough tests and do not support pipe-bind. -
Sequencing (
built-in-sequencing
)
π΄ Handle:
,seq
, ... by gathering value information using abstract interpretation. -
Internal and Primitive Functions (
built-in-internal-and-primitive-functions
)
π΄ 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. -
Options (
built-in-options
)
π΄ Handleoptions
,getOption
, ... Currently, we do not support the function at all. -
Help (
built-in-help
)
πΆ Handlehelp
,?
, ... We do not support the function in a sensible way but just ignore it (although this does not happen resolved). -
Reflection / "Computing on the Language" (
reflection-"computing-on-the-language"
)-
Get Function Structure (
get-function-structure
)
π΄ Handlebody
,formals
,environment
to access the respective parts of a function. We do not support the functions at all. -
Modify Function Structure (
modify-function-structure
)
π΄ Handlebody<-
,formals<-
,environment<-
to modify the respective parts of a function. We do not support the functions at all. -
Quoting (
built-in-quoting
)
πΆ Handlequote
,substitute
,bquote
, ... We partially ignore some of them but most likely not all. -
Evaluation (
built-in-evaluation
)
π΄ Handleeval
,evalq
,eval.parent
, ... We do not handle them at all. -
Parsing (
built-in-parsing
)
π΄ Handleparse
,deparse
, ... We handle them as unknown function calls, but not specifically besides that.
-
Get Function Structure (
-
Non-Strict Logical Operators (
-
Grouping (
-
Literal Values (
literal-values
)-
Numbers (
numbers
)
π© Recognize numbers like3
,3.14
,NA
, float-hex, ... -
Strings (
strings
)
π© Recognize strings like"a"
,'b'
, ...-
Raw Strings (
raw-strings
)
π© Recognize raw strings liker"(a)"
, ...
-
Raw Strings (
-
Logical (
logical
)
π© Recognize the logicalsTRUE
andFALSE
, ... -
NULL (
null
)
π© RecognizeNULL
-
Inf and NaN (
inf-and-nan
)
π© RecognizeInf
andNaN
-
Numbers (
-
Function Calls (
-
Non-Standard Evaluations/Semantics (
non-standard-evaluations-semantics
)-
Recycling (
recycling
)
π΄ Handle recycling of vectors as explained in Advanced R. We do not support recycling. -
Vectorized Operator or Functions (
vectorized-operator-or-functions
)
π΄ Handle vectorized operations as explained in Advanced R. We do not support vectorized operations. -
Hooks (
hooks
)
π΄ Handle hooks likeuserhooks
andon.exit
. We do not support hooks. -
Precedence (
precedence
)
π© Handle the precedence of operators as explained in the Documentation. We handle the precedence of operators (implicitly with the parser). -
Attributes (
attributes
)-
User-Defined (
user-defined
)
π΄ Handle attributes likeattr
,attributes
, ... We do not support attributes. -
Built-In (
built-in
)
π΄ Handle built-in attributes likedim
, ... We do not support them.
-
User-Defined (
-
Recycling (
-
Types (
types
)-
Primitive (
types-primitive
)
π΄ Recognize and resolve primitive types likenumeric
,character
, ... We do not support typing currently. -
Non-Primitive (
types-non-primitive
)
π΄ Recognize and resolve non-primitive/composite types. We do not support typing currently. -
Inference (
types-inference
)
π΄ Infer types from the code. We do not support typing currently. -
Coercion (
types-coercion
)
π΄ Handle coercion of types. We do not support typing currently. -
Object-Oriented Programming (
object-oriented-programming
)-
S3 (
oop-s3
)
π΄ 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."
https://adv-r.hadley.nz/s3.html -
S4 (
oop-s4
)
π΄ 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."
https://adv-r.hadley.nz/s4.html -
R6 (
oop-r6
)
π΄ Handle R6 classes and methods as one unit. Including Dispatch and Inheritance, as well as its Reference Semantics, Access Control, Finalizers, and Introspection. We do not support typing currently and do not handle objects of these classes "as units."
https://adv-r.hadley.nz/r6.html -
R7/S7 (
r7-s7
)
π΄ 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."
https://www.r-bloggers.com/2022/12/what-is-r7-a-new-oop-system-for-r/, https://cran.r-project.org/web/packages/S7/index.html
-
S3 (
-
Primitive (
-
Structure (
structure
)-
Comments (
comments
)
π© Recognize comments like# this is a comment
, ... and line-directives -
Semicolons (
semicolons
)
π© Recognize and resolve semicolons likea; b; c
, ... -
Newlines (
newlines
)
π© Recognize and resolve newlines likea b c
, ...
-
Comments (
-
System, I/O, FFI, and Other Files (
system-i-o-ffi-and-other-files
)-
Sourcing External Files (
sourcing-external-files
)
πΆ Handlesource
,sys.source
, ... We are currently working on supporting the inclusion of external files. Currently we can handlesource
. -
Handling Binary Riles (
handling-binary-riles
)
π΄ Handle files dumped with, e.g.,save
, ... due to their frequent usage. We do not support binary files. -
I/O (
i-o
)
π΄ Handleread.csv
,write.csv
, ... We do not support I/O for the time being but treat them as unknown function calls. -
Foreign Function Interface (
foreign-function-interface
)
π΄ Handle.Fortran
,C
,... We do not support FFI but treat them as unknown function calls. -
System Calls (
system-calls
)
π΄ Handlesystem
,system.*
, ... We do not support system calls but treat them as unknown function calls.
-
Sourcing External Files (
-
Pre-Processors/external Tooling (
pre-processors-external-tooling
)
π΄ Handle pre-processors likeknitr
,rmarkdown
,roxygen2
... We do not support pre-processors for the time being (being unable to handle things like@importFrom
)