iRODS Rule Language Cheat Sheet iRODS Version 4.0.3 Author: Samuel Lampa, BILS

Numeric Literals

Arithmetic functions

1 # integer 1.0 # double

exp() list(, , ...) Logical if: log() ... creates a new list. Example: if then { } else { abs() list("This","is","a","list") } floor() # always returns integer Example: ceiling() # always returns integer elem(, ) if (*A==1) then { true; } else { false; } average(, , ...) ... retrieves elements from a list (0­ max(, , ...) indexed). Ex: Functional if (returning value of any type): min(, , ...) elem(list("This","is","a","list"),0)if then else

Strings Concatenation: 'A \'string\', ' ++ "another \"string\"

Some valid escape characters: \n, \r, \t, \\, \', \", \$, \*

Example:

String functions

setelem(, , )

writeLine("stdout", "Hi!");

... updates an item in a list. Ex:

if true then 1 else 0 if *A==1 then true else false

setelem(list("A","list"),0,"My") ... evaluates to list("My","list").

The following abbreviation are allowed (the red striked part can be abbreviated) in functional ifs:

... equals to "This is a string."

size()

if (...) then { ... } else { ... } if (...) then { ... } else { if (...) then {...} else {...} }

"This is a string." like "This is*" ... equals to true

size(list("This","is","a","list"))

Boolean constants true # True false # False

"This "++"is"++" a string."

! # Not "This is." like regex "Th.*is[.]" && # And ... equals to true || # Or %% # Or used in the "##" syntaxsubstr("This is a string.", 0, 4)

Arithmetic operators - # Negation ^ # Power * # Multiplication / # Division % # Modulors - # Subtraction + # Addition

... Output: This strlen("This is a string.")

... Output: 17 split("This is a string.", " ") ... equals to: [This,is,a,string.] writeLine("stdout", triml("This is a string.", " "));

... equals to: is a string.

Arithmetic comparison > # Greater than < # Less than >= # Greater than or equal <= # Less than or equal

If statements

... returns "This"

... prints out "Hi!."

Boolean comparison

List functions

trimr("This is a string.", " ")

... equals to: This is a

... gives the size of a list. Ex: ... evaluates to 4. hd()

... gives the head of a list, Ex: hd(list("This","is","a","list"))

Multiple abbreviations can be combined for example: if (*X==1) { *A = "Mon"; } else if (*X==2) {*A = "Tue"; } else if (*X==3) {*A = "Wed"; }

... evaluates to "This" tl()

... gives the tail of a list. Ex: tl(list("This","is","a","list"))

... evaluates to list("is","a","list") cons(, )

... adds elements to a list. Ex:

Foreach loops Without iterator: foreach(*C) { writeLine("stdout", *C); }

cons("My",list("list"))

... evaluates to list("My","list").

Tuples Tuples are created like so: ( , ..., )

With the iterator variable (*E in this case): foreach(*E in *C) { writeLine("stdout", *E); }

Numeric Literals Strings Boolean constants Boolean ... - GitHub

iRODS Rule Language Cheat Sheet. iRODS Version 4.0.3. Author: Samuel Lampa, BILS. Numeric Literals. 1 # integer. 1.0 # double. Strings. Concatenation:.

100KB Sizes 0 Downloads 209 Views

Recommend Documents

Conditions and Boolean Expressions
switch (n). { case 1: printf("You picked a low number.\n"); break; case 2: printf("You picked a medium number.\n"); break; case 3: printf("You picked a high number.\n"); break; default: printf("Invalid.\n"); break;. } } Page 9. Ternary Operator. #inc

The Quest for Efficient Boolean Satisfiability Solvers
A DPLL-based SAT solver is a relatively small piece of software. Many of the ...... Efficient SAT Solver," presented at 39th Design Automation Conference, 2001.

A Space-Efficient Indexing Algorithm for Boolean Query Processing
index are 16.4% on DBLP, 26.8% on TREC, and 39.2% on ENRON. We evaluated the query processing time with varying numbers of tokens in a query.

Around bent and semi-bent quadratic Boolean functions
May 1, 2005 - Keywords: Boolean function, m-sequence, quadratic mapping, semi- ... tain power functions which are known as almost bent mappings [4].

free Colorability and the Boolean Prime Ideal Theorem
Jun 22, 2003 - Queens College, CUNY. Flushing ..... [7] Cowen, R., Some connections between set theory and computer science, in: Gottlob, G.,. Leitsch, A.

Self-organized Boolean game on networks - Semantic Scholar
Tao Zhou,1,2 Bing-Hong Wang,1,* Pei-Ling Zhou,2 Chun-Xia Yang,2 and Jun Liu2. 1Department of Modern Physics, University of Science and Technology of China, ... years. It is not unexpected that the systems with globally shared information can be ... d

prime ideal theorem for double boolean algebras
A filter (resp. an ideal) of a ... For Boolean algebras, it is well known that prime filters can be defined as filters F .... Boolean algebra is called pure if it satisfies.

What bloat? Cartesian Genetic Programming on Boolean problems
Much work has focused on the intron view of bloat. Introns ..... 360. 370. 0. 10000. 20000. 30000. 40000. 50000 generation average fitness of best scenario 2: all.