Basic Knowledge: Built-in Actions

This page provides an overview of built-in actions in LightJason/AgentSpeak(L++).

Contents [Hide]

All actions are organised within the action.builtin package. Each packages defines a semantic structure of the actions. For an example on how to make use of actions have a look at our testing agent or the tutorials, which uses many built-in actions provided by AgentSpeak(L++).

The action list below shows all existing built-in actions. Clicking on the brief description opens a drop-down box containing detailed information and code examples.

agent

agent/addplan
adds a plan to the plan-base.
Description
The actions adds all arguments which are plans to the plan-base of the current agent, the action never fails
agent/addplan(Plan1,Plan2,[Plan3,[Plan4]]);
See
Source Code
agent/belieflist
returns a list of all belief literals.
Description
The action creates a list of literals, the arguments are optional, the first argument is a boolean for the negation definition, the second argument is the belief functor, if no arguments are give, the full belieflist is returned
L=agent/belieflist(true,"path/subpath/literalfunctor");
See
Source Code
agent/clearbeliefbase
clears all elements from the beliefbase.
Description
The action clear th beliefbase, the arguments are optional and can be string paths to beliefbases
agent/clearbeliefbase("env","foo");
See
Source Code
agent/cycletime
action to get cycle time.
Description
The action returns the time between the last cycle and the current time in nanoseconds and fails never
T=agent/cycletime();
See
Source Code
agent/getplan
action to get plan objects.
Description
The actions returns a list of plans of a trigger, the arguments are tuples of a string with the trigger sequence (+!, +, -, -!) and a string or literal, the plan name, for each tuple the plan object will returned within a list, the action fails on non-existing plan
[L1|L2]=agent/getplan("+!","myplan(X)","-!",Literal);
See
Source Code
agent/planlist
action to get plan-information as list.
Description
The action returns a list of tuples with the a string (trigger definition) and the plan literal, the action never fails
L=agent/planlist();
See
Source Code
agent/planstatistic
action to get plan statistic.
Description
The actions returns for each plan the statistic information, for each plan argument, succesfull, fail and sum rate is returned, the action fails if the plan does not exist within the plan-base
[Successful1|Fail1|Sum1|Successful2|Fail2|Sum2]=agent/planstatistic(Plan1,Plan2);
See
Source Code
agent/removeplan
removes a plan by the plan trigger.
Description
The action moves all plan based on the input trigger arguments, the action fails on wrong input
agent/removeplan("+!","myplan(X)","-!",Literal);
See
Source Code
agent/sleep
sets the agent to the sleep state.
Description
The action applys the sleep state of the current agent. The first optional argument can be a sleeping time (in agent cycles)
agent/sleep(3);
See
Source Code

bool

bool/allmatch
checks all elements are equal to the first argument.
Description
The actions checks the first argument to all other if this matchs for equality, the action never fails On number arguments not the value must equal, also the type (double / integral) must be equal, so keep in mind, that you use the correct number type on the argument input
AllEqual=bool/allmatch("thisisthetest",123,"thisisthetest",["hello",234]);
See
Source Code
bool/and
combines all arguments to a single result with the and-operator.
Description
This action uses the logical conjunction to combine all logical arguments in a single result, the action never fails
R=bool/and(Logical1,[Logical2,Logical3],Logical4);
See
https://en.wikipedia.org/wiki/Logical_conjunction
Source Code
bool/anymatch
checks any elements are equal to the first argument.
Description
The actions checks the first argument to all other if any matchs for equality, the action never fails. On number arguments not the value must equal, also the type (double / integral) must be equal, so keep in mind, that you use the correct number type on the argument input
AnyEqual=bool/anymatch("thisisthetest",123,"thisisthetest",["hello",234]);
See
Source Code
bool/countfalse
count the number of false values.
Description
This action counts the number of false values, the action never fails
R=generic/bool/countfalse(Logical1,[Logical2,Logical3],Logical4);
See
Source Code
bool/counttrue
counts the number of true values.
Description
This actioncounts the number of true values and fails never
C=generic/bool/counttrue(Logical1,[Logical2,Logical3],Logical4);
See
Source Code
bool/equal
checks elements of equality.
Description
The actions checks the first argument to all others arguments of equality, list structures won't be unflaten, but elementwise compared, the action never fails. On number arguments not the value must equal, also the type (double / integral) must be equal, so keep in mind, that you use the correct number type on the argument input
[E1|E2]=bool/equal("thisisequal","thisisequal",[123,"test"]);
See
Source Code
bool/not
inverts all argument.
Description
This action uses the logical negation and inverts all logical boolean arguments and returns all elements, the action never fails
[R1|R2|R3|R4]=bool/not(Logical1,[Logical2,Logical3],Logical4);
See
https://en.wikipedia.org/wiki/Negation
Source Code
bool/notequal
checks elements of inequality.
Description
The actions checks the first argument to all others arguments of unequality, list structures won't be unflaten, but elementwise compared, the action never fails. On number arguments not the value must equal, also the type (double / integral) must be equal, so keep in mind, that you use the correct number type on the argument input
[NE1|NE2]=bool/notequal("thisisequal","thisisequal",[123,"test"]);
See
Source Code
bool/or
combines all arguments to a single result with the or-operator.
Description
This action uses the logical disjunction to combine all logical arguments in a single result, the action never fails
R=bool/or(Logical1,[Logical2,Logical3],Logical4);
See
https://en.wikipedia.org/wiki/Logical_disjunction
Source Code
bool/xor
combines all arguments to a single result with the xor-operator.
Description
This action uses the logical exclusive-or to combine all logical arguments in a single result, the action never fails
R=bool/xor(Logical1,Logical2,[Logical3,Logical4]);
See
https://en.wikipedia.org/wiki/Exclusive_or
Source Code

collection

collection/clear
clears all elements of the collection.
Description
The action removes all elements of each collection arguments, the action fails on a non-collection argument
collection/clear(Map,MultiMap,Set,List);
See
Source Code
collection/isempty
checks a collection is empty.
Description
All arguments are collection elements and for each argument a boolean flag for empty is returned, on all non-collection types empty is always false, the action never fails
[A|B|C]=collection/list/isempty(List,Map,MultiMap);
See
Source Code
collection/size
returns the size of the collection.
Description
All arguments must be collections and the action returns the size of each collection, the action never fails. On non-collection type the action returns a zero value
[A|B|C|D]=collection/size(Collection,Map,MultiMap,Tupel);
See
Source Code

collection/list

collection/list/add
action to add elements to a list.
Description
The action adds the first argument to all other list arguments, the action never fails
collection/list/add(Value,L1,L2,L3);
See
Source Code
collection/list/complement
creates the complement between lists.
Description
The action uses two input arguments $ \mathbb{A} $ and $ \mathbb{B} $ and returns a list of all elements which contains $ \mathbb{A} \setminus \mathbb{B} $, the action fails on empty lists
L=collection/list/complement([1,2,3],[3,4,5]);
See
https://en.wikipedia.org/wiki/Complement_(set_theory)
Source Code
collection/list/create
creates a list.
Description
Creates a list of the arguments, so each argument of the action is put to the list, is the argument empty an empty-list object will be returned, the action fails never
L1=collection/list/create("a",1,["b",2]);
L2=collection/list/create();
See
Source Code
collection/list/flat
unflats any list structure.
Description
All action arguments are list values which will be unflatten and all elements will be returned in single instances, the action never fails never
[A|B|C]=collections/list/flat(1,[2,[3,4]]);
See
Source Code
collection/list/flatconcat
returns a flat concated list of any term data.
Description
The arguments of this action are nested lists and the action transfer all nested structures to a straight list, the action fails never
L=collection/list/flatconcat([1,2,[3,4]],[[1,2],[7,8]]);
See
Source Code
collection/list/get
returns an element of the list by the index.
Description
The first argument is a list object and all other arguments are index values, so the action returns the elements, the action fails never
[V1|V2]=collection/list/get(L,2,7);
See
Source Code
collection/list/intersect
creates the intersection between lists.
Description
All arguments are lists and the action returns the intersection $ \cap M_i \forall i \in \mathbb{N} $, the action fails never
I=collection/list/intersect([1,2,[3,4]],[3,4,[8,9]],[1,2,3,5]);
See
Source Code
collection/list/range
creates a list with a integer ranged list.
Description
The action creates a list of integer values within the range $ [\text{argument 1}, \text{argument 2}) $, the action need a even number of arguments, for each tuple a ranged list will be returned, the action fails on a wrong number of arguments
[L1|L2]=collection/list/create(0,10,[2,9]);
See
Source Code
collection/list/remove
removes an element of the list by the index.
Description
Removes an element by the list index, the first argument is the list object, all other element indices which should removed, the action returns the removed arguments and never fails
[A|B|C]=collection/list/remove(L,3,[4,[5]]);
See
Source Code
collection/list/reverse
reverses a list.
Description
All arguments of the action are lists and the action will remove nested structures and reverse all elements in a single list, the action fails never
R=collection/list/reverse(L,[1,2],[3,4,[7,8]]);
See
Source Code
collection/list/set
adds an element to the list.
Description
Sets an element in each list, the first argument is the index in the liste, the second is the value, all other are list objects, the action fails never
collection/list/set(2,"astringvalue",L1,L2,L3);
See
Source Code
collection/list/sublist
returns a sublist within the index range.
Description
Creates a sublist of an existing list by an index range, first argument is the list object, all other arguments are tuples of ranges $ [ \text{lower-bound}, \text{upper-bound} ) $, the action fails on an wrong number of arguments
[L1|L2]=collection/list/get(L,2,5,[4,6]);
See
Source Code
collection/list/symmetricdifference
creates the symmetric difference between lists (difference of union and intersection).
Description
Creates the symmetric difference of all arguments, so all arguments are collections and the action will return a list with the symmetric difference $ (\mathbb{X} \setminus \mathbb{Y}) \cup (\mathbb{B} \setminus \mathbb{A}) $, the action fails never
D=collection/list/symmetricdifference([1,2,[3,4]],[7,8,9,4],[[1,2],[3]]);
See
https://en.wikipedia.org/wiki/Symmetric_difference
Source Code
collection/list/union
creates the union between lists.
Description
Creates the union of all arguemnts with removing nested structures $ \cup X_i \forall i \in \mathbb{N} $, the action fails never
U=collection/list/union(L,[1,2],[3,4,[5,6]];
See
Source Code
collection/list/unique
returns an unique list of the list.
Description
All arguments are collections and the action removes nested structures and returns a list with unique elements, the action fails never
U=collection/list/unique(L);
See
Source Code
collection/list/zip
creates a list of tuples with elements of two lists.
Description
Creates list of tupels of the first half arguments and the second half arguments with $ \mathbb{X} $ and $ \mathbb{Y} $ and result $ \langle x_i, y_i \rangle $, the action fails on an odd number of arguments
T=collection/list/zip([1,3,5,7],[2,4,6,8]);
See
Source Code

collection/map

collection/map/create
creates a hashmap.
Description
Returns an empty hashmap (key-value pair) and optional arguments must be even and it will create a key-value structure, the action fails on an odd number of arguments except zero only
M=collection/map/create();
See
Source Code
collection/map/getmultiple
returns a multiple element of a single map.
Description
The first argument is a map reference and all other arguments are key values, the action returns the value of each key and never fails
[V1|V2]=collection/map/getmultiple(Map,"key1","key2");
See
Source Code
collection/map/getsingle
returns a single element of all map elements.
Description
The first argument will be used as key and all arguments are map references, the key will be returned from each map, the action fails never,
[A|B|C]=collection/map/getsingle("key",Map1,Map2,Map3);
See
Source Code
collection/map/keys
returns all key values of the map.
Description
Returns a unique list with all key values of the argument maps and fails never, all arguments must be maps
L=collection/map/keys(Map1,Map2,Map3);
See
Source Code
collection/map/putmultiple
adds all elements to a single map argument.
Description
First argument is a map and all other arguments are key-value pairs, the action fails on wrong input number
collection/map/putmultiple(Map,Key1,Value1,[Key2,Value2]);
See
Source Code
collection/map/putmultipleifabsent
adds multiple element to a single map iif not exists.
Description
First argument is a map and all other arguments are key-value pairs, all pars are added to the map, the action fails on wrong input number
collection/map/putmultipleifabsent(Map,Key1,Value1,[Key2,Value2]);
See
Source Code
collection/map/putsingle
adds an single element to multiple map arguments.
Description
First argument is a key, second the value, all other values are map references, the key-value pair is added to all maps and the action never fails
collection/map/putsingle("key","value",Map1,Map2);
See
Source Code
collection/map/putsingleifabsent
adds an single element pair to all map iif not exists.
Description
First and second argument is a key-value pair, all other values are map references, the key-value pair is added to all maps iif not exists and the action never fails
collection/map/putsingleifabsent("key","value",Map1,Map2);
See
Source Code
collection/map/remove
removes elements from the map.
Description
Removes of possible all arguments from the map, first argument is the map reference all other arguments are key values returns the arguments (or null if not exists) and never fails
[A|B|C]=collection/map/remove(Map,"a",12,"c");
See
Source Code
collection/map/values
returns all values of the map.
Description
Returns a list with all values of the argument maps and fails never
L=collection/map/values(Map1,Map2,Map3);
See
Source Code

collection/multimap

collection/multimap/asmap
returns the multimap as map.
Description
Actions translates multimap objects into map objects, action never fails
X=collection/multimap/asmap(MultiMap);
[A|B]=collection/multimap/asmap(MultiMap1,MultiMap2);
See
Source Code
collection/multimap/create
creates a multi-hashmap.
Description
The action creates a multi-hashmap object and returns the object, optional arguments must be even and it will create a key-value structure, the action fails on an odd number of arguments except zero only
M1=collection/multimap/create();
M2=collection/multimap/create("key1",123,["Key2","Value2"]);
See
Source Code
collection/multimap/getmultiple
returns a multiple element of a single multimap.
Description
The first argument is a multimap reference and all other arguments are key values, the action returns the value of each key and never fails
[V1|V2]=collection/multimap/getmultiple(MultiMap,"key1","key2");
See
Source Code
collection/multimap/getsingle
returns a single element of all multimap elements.
Description
The first argument will be used as key and all arguments are multimap references, the key will be returned from each multimap, the action fails never,
[A|B|C]=collection/multimap/getsingle("key",MultiMap1,MultiMap2,MultiMap3);
See
Source Code
collection/multimap/keys
returns all key values of the multimap.
Description
Returns a unique list with all key values of the argument maps and fails never, all arguments must be multimaps
L=collection/multimap/keys(MultiMap1,MultiMap2,MultiMap3);
See
Source Code
collection/multimap/putmultiple
adds all elements to a single multimap argument.
Description
First argument is a multimap and all other arguments are key-value pairs, the action fails on wrong input number
collection/multimap/putmultiple(MultiMap,Key1,Value1,[Key2,Value2]);
See
Source Code
collection/multimap/putsingle
adds an single element to multiple multimap arguments.
Description
First argument is a key, second the value, all other values are multimap references, the key-value pair is added to all multimaps and the action never fails
collection/multimap/putsingle("key","value",MultiMap1,MultiMap2);
See
Source Code
collection/multimap/values
returns all values of the multimap.
Description
Returns a list with all values of the argument multimaps and fails never
L=collection/multimap/values(MultiMap1,MultiMap2,MultiMap3);
See
Source Code

collection/set

collection/set/add
adds an element to the set.
Description
The action adds all arguments to the set (overwrites existing), the action never fails
collection/set/add(Set,"X","Y",[1,2,3,"A","b"]);
See
Source Code
collection/set/contains
checks elements are containing in set.
Description
The action checks the first argument, which is a set, that all other arguments are contained, the action never fails
[E1|E2|E3]=collection/set/contains(Set,"1",[1,2]);
See
Source Code
collection/set/create
action to create a set.
Description
The action creates a set and put all given arguments inside the set, the action never fails
S=collection/set/create("1",[1,2,3]);
S=collection/set/create();
See
Source Code
collection/set/remove
removes any argument from the set and returns it.
Description
The action removes from the first set argument, all other arguments and returns boolean values of the object could be removed, the action never fails
[V1|V2]=collection/set/remove(Set,[1,"foo"]);
See
Source Code
collection/set/tolist
converts a set to a list.
Description
The action converts each set argument to a list, the action never fails
[L1|L2]=collection/set/tolist(Set1,Set2);
See
Source Code

collection/tuple

collection/tuple/create
creates a tuple of two elements.
Description
The action creates tuples of all unflatten input arguments and fail sif the number if less than two unflatten arguments
[A|B]=collection/tuple/create("A","1",["B","2"]);
See
Source Code
collection/tuple/flat
unflats the tuples into variables.
Description
All arguments are tupels and each tuple will be extract into two variables, the action never fails
[A|B|C|D]=collection/tupel/flat(Tupel1,Tupel2);
See
Source Code
collection/tuple/set
sets a value within a tuple.
Description
The action sets the value within the first argument in each tuple argument, the action never fails
collection/tuple/set("value",T1,T2,T3);
See
Source Code

crypto

crypto/createkey
creates an encrypting / decrypting key pair.
Description
The argument is a string with the cryptographic algorithm AES, DES or RSA and the action return a key pair, the action fails if the key cannot generated. The private key is set on RSA algorithm only
[PublicKey,PrivateKey]=cypto/createkey("AES|DES|RSA");
See
https://en.wikipedia.org/wiki/Advanced_Encryption_Standard
https://en.wikipedia.org/wiki/Data_Encryption_Standard
https://en.wikipedia.org/wiki/RSA_(cryptosystem)
Source Code
crypto/decrypt
dencrypting algorithm for decrypting data.
Description
The actions decrypts data by the key, that is set on the first argument, all other arguments are datasets for encrypting, the actions returns all drcrypted datasets back and fails if a dataset cannot be decrypted
[DecyptData1|DecyptData2|DecyptData3]=crypto/decrypt(Key,Dataset1,Dataset2,Dataset3);
See
Source Code
crypto/encrypt
encrypting algorithm.
Description
Encrypts a set of datasets, which can be complex objects, the first argument of the action is the encrypting key and all other arguments are datasets, the action returns all encypted datasets and fails if one encryption fails or on a wrong algorithm
[Encypt1|Encrypt2|Encypt3]=crypto/encrypt(Key,Dataset1,Dataset2,Dataset3);
See
Source Code
crypto/hash
hash algorithm.
Description
The actions creates a hash values of datasets, the first argument is the name of the hasing algorithm (Adler-32, CRC-32, CRC-32C, Murmur3-32, Murmur3-128, Siphash-2-4, MD2, MD5, SHA-1, SHA-224, SHA-256, SHA-384, SHA-512), for all other unflatten arguments a hash value is calculated and the action returns the hash values back and never fails
[Hash1|Hash2|Hash3]=crypto/hash("Adler-32|CRC-32|CRC-32C|...",Dataset1,Dataset2,Dataset3);
See
https://en.wikipedia.org/wiki/Secure_Hash_Algorithm
https://en.wikipedia.org/wiki/MD2_(cryptography)
https://en.wikipedia.org/wiki/MD5
https://en.wikipedia.org/wiki/Adler-32
https://en.wikipedia.org/wiki/Cyclic_redundancy_check
https://en.wikipedia.org/wiki/MurmurHash
https://en.wikipedia.org/wiki/SipHash
http://docs.oracle.com/javase/8/docs/technotes/guides/security/StandardNames.html#MessageDigest
https://github.com/google/guava/wiki/HashingExplained
Source Code

datetime

datetime/applydays
subtract or adds a number of days.
Description
The action adds / subtracts a number of days to the date-time objects, the first argument is a string with minus or plus, the second argument the number and all other arguments are date-time objects, the action returns the modified date-time objects, the action never fails
[O1|O2]=datetime/applydays("minus|plus"3,DateTime1,DateTime2);
See
Source Code
datetime/applyhours
subtract or adds a number of hours.
Description
The action adds / subtracts a number of hours to the date-time objects, the first argument is a string with minus or plus, the second argument the number and all other arguments are date-time objects, the action returns the modified date-time objects, the action never fails
[O1|O2]=datetime/applyhours("minus|plus"6,DateTime1,DateTime2);
See
Source Code
datetime/applyminutes
subtract or adds a number of minutes.
Description
The action adds / subtracts a number of minutes to the date-time objects, the first argument is a string with minus or plus, the second argument the number and all other arguments are date-time objects, the action returns the modified date-time objects, the action never fails
[O1|O2]=datetime/applyminutes("minus|plus"6,DateTime1,DateTime2);
See
Source Code
datetime/applymonths
subtract or adds a number of months.
Description
The action adds / subtracts a number of months to the date-time objects, the first argument is a string with minus or plus, the second argument the number and all other arguments are date-time objects, the action returns the modified date-time objects, the action never fails
[O1|O2]=datetime/applymonths("minus|plus"6,DateTime1,DateTime2);
See
Source Code
datetime/applynanoseconds
subtract or adds a number of nano-seconds.
Description
The action adds / subtracts a number of nano-seconds to the date-time objects, the first argument is a string with minus or plus, the second argument the number and all other arguments are date-time objects, the action returns the modified date-time objects, the action never fails
[O1|O2]=datetime/applynanoseconds("minus|plus"6,DateTime1,DateTime2);
See
Source Code
datetime/applyseconds
subtract or adds a number of seconds.
Description
The action adds / subtracts a number of seconds to the date-time objects, the first argument is a string with minus or plus, the second argument the number and all other arguments are date-time objects, the action returns the modified date-time objects, the action never fails
[O1|O2]=datetime/applyseconds("minus|plus"6,DateTime1,DateTime2);
See
Source Code
datetime/applyyears
subtract or adds a number of years.
Description
The action adds / subtracts a number of years to the date-time objects, the first argument is a string with minus or plus, the second argument the number and all other arguments are date-time objects, the action returns the modified date-time objects, the action never fails
[O1|O2]=datetime/applyyears("minus|plus"3,DateTime1,DateTime2);
See
Source Code
datetime/build
builds a date-time object from elements.
Description
The actions creates form an eight-tuple a date-time object and never fails, the seventh argument within the tuple is the time-zone, which can be set to empty or "current", so the system-default zone is used
O1=datetime/build(Year,Month,Day,Hour,Minutes,Second,NanoSeconds,"current");
See
Source Code
datetime/create
returns a date-time object.
Description
The action returns a date-time object based on the string input arguments, the action parses the string if the string is empty or "now" the current date-time will returned, the action never fails
[O1|O2]=datetime/create("now","2007-12-03T10:15:30+01:00[Europe/Paris]");
See
Source Code
datetime/date
action for getting the current date.
Description
The action returns the date elements of a parsed string or date-time object, if the string is empty or "now" the current date-time is used, the action fails on wrong input
[Year|Month|Day|DayOfWeek|DayOfYear]=datetime/date("now");
See
Source Code
datetime/daysbetween
returns the days between two dates.
Description
The actions returns the number of days between two date-time objects, the action never fails. A positive value will be returned iif the first date-time item is before the second one, a negative value will be returned iif the first date-time item is after the second date-time item
[D1|D2]=datetime/daysbetween(DateTime1,DateTime2,DateTime3,DateTime4);
See
Source Code
datetime/hoursbetween
returns the hours between two dates.
Description
The actions returns the number of hours between two date-time objects, the action never fails. A positive value will be returned iif the first date-time item is before the second one, a negative value will be returned iif the first date-time item is after the second date-time item
[H1|H2]=datetime/hoursbetween(DateTime1,DateTime2,DateTime3,DateTime4);
See
Source Code
datetime/minutesbetween
returns the minutes between two dates.
Description
The actions returns the number of minutes between two date-time objects, the action never fails. A positive value will be returned iif the first date-time item is before the second one, a negative value will be returned iif the first date-time item is after the second date-time item
[M1|M2]=datetime/minutesbetween(DateTime1,DateTime2,DateTime3,DateTime4);
See
Source Code
datetime/monthsbetween
returns the months between two dates.
Description
The actions returns the number of months between two date-time objects, the action never fails. A positive value will be returned iif the first date-time item is before the second one, a negative value will be returned iif the first date-time item is after the second date-time item
[M1|M2]=datetime/monthsbetween(DateTime1,DateTime2,DateTime3,DateTime4);
See
Source Code
datetime/secondsbetween
returns the seconds between two dates.
Description
The actions returns the number of seconds between two date-time objects, the action never fails. A positive value will be returned iif the first date-time item is before the second one, a negative value will be returned iif the first date-time item is after the second date-time item
[S1|S2]=datetime/secondsbetween(DateTime1,DateTime2,DateTime3,DateTime4);
See
Source Code
datetime/time
action for getting the current time.
Description
The action returns the time elements of a parsed string or date-time object, if the string is empty or "now" the current date-time is used, the action fails on wrong input
[Hour|Minute|Second|Nano]=datetime/time("now");
See
Source Code
datetime/yearsbetween
returns the years between two dates.
Description
The actions returns the number of years between two date-time objects, the action never fails. A positive value will be returned iif the first date-time item is before the second one, a negative value will be returned iif the first date-time item is after the second date-time item
[Y1|Y2]=datetime/yearsbetween(DateTime1,DateTime2,DateTime3,DateTime4);
See
Source Code
datetime/zoneid
returns the zone-id.
Description
The action returns the zone-id of a parsed string or date-time object, if the string is empty or "now" the current date-time is used, the action fails on wrong input
ZoneID=datetime/zoneid("now");
See
Source Code

generic

generic/print
action for sum of elements.
Description
Prints a set of messages to the commandline / output-stream, the command can be used with a variable set of arguments and fails never
generic/print("stringA=",A,"--B=",B,"--C=",C,"--D=",D,"--X=",X,"--Y=",Y);
See
Source Code
generic/throw
action for throwing a runtime execption.
Description
The action fails never but throws a Java runtime exception on a boolean condition, the first argument is a boolean value on true the exception is thrown, second argument can be a string with a message. The exception must be catched outside the agent call method
generic/throw(true,"amessage");
See
Source Code
generic/uuid
create an uuid.
Description
The action creates a random uuid value and never fails
U1=generic/uuid();
See
https://en.wikipedia.org/wiki/Universally_unique_identifier
Source Code

generic/type

generic/type/createliteral
creates a literal by the input data.
Description
The action create a literal, so the first argument is a string with the literal functor all other arguments will be used for the literal values
L=generic/type/createliteral("literal/functor/with/path",123,"value");
See
Source Code
generic/type/fuzzyreturn
returns the given arguments as results of the action.
Description
The action gets as arguments a tuple of arguments, a boolean and numeric (normalized in [0,1]) value and returns this values as result of the action, the action fails on wrong input
generic/type/fuzzyreturn(true,0.4);
See
Source Code
generic/type/is
action to check if a type is a class.
Description
The first argument defines a full-qualified Java class name, and all other arguments are checked if that are instances of this class, the action fails if one of the arguments are not an instance of this class or the class does not exist
generic/type("java.lang.String",X,Y,Z);
See
Source Code
generic/type/isnull
action to check if a value is a null value.
Description
All arguments are checked if all are null values, the action fails if one of the arguments is not null
generic/type(X,Y);
See
Source Code
generic/type/isnumeric
action to check if a type is a number.
Description
All arguments are checked if all are numeric values, the action fails if one of the arguments is not a numeric value
generic/type/isnumeric(X,3.5);
See
Source Code
generic/type/isstring
action to check if a type is a string.
Description
All arguments are checked if all are string values, the action fails if one of the arguments is not a string
generic/type/isstring("foo","bar",123);
See
Source Code
generic/type/parseliteral
action for parsing a integer from string.
Description
Parses each argument to a integer point value and returns the value, the action fails on parsing errors
[X|Y|Z]=generic/type/parseliteral("foo(5)",["bar(foo('abcd')","xxx()[source(3)]"]);
See
Source Code
generic/type/parsenumber
action for parsing a number from string.
Description
Parses each argument to a number value and returns the value, the action fails on parsing errors
[X|Y|Z]=generic/type/parsenumber("1.45",["8.88","9"]);
See
Source Code
generic/type/tonumber
action to cast a value to a number value.
Description
Cast any argument into a number, the action fails on casting errors
[N1|N2]=generic/type/tofloat(X,Y);
See
Source Code
generic/type/tostring
converts a value into the string represenation.
Description
The action converts any argument into the string represenation, the action never fails
[A|B]=generic/type/tostring(1,"foo");
See
Source Code
generic/type/type
returns for each argument the underlying type.
Description
The actions returns for each argument the data type as a string name, the action never fails
[T1|T2]=generic/type/type(A,B);
See
Source Code

graph

graph/addedgemultiple
add multiple edges to a single graph instance.
Description
Adds multiple edges to a single graph instance, the first argument is the graph reference, and all other triples are the edges, the first argument of the triple is the edge identifier, the second the start vertex, and the third the end vertex, the action never fails
graph/addedgemultiple(Graph,["edgeid1",StartVertex1,EndVertex1],"edgeid2",StartVertex2,EndVertex2);
See
Source Code
graph/addedgesingle
adds a single edge to the multiple graph.
Description
The action adds to each graph the first triple (edge identifier, start vertex, end vertex) to all other arguments are graphs, the action never fails
graph/addedge(Edge,StartVertex,EndVertex,Graph1,Graph2,Graph3);
See
Source Code
graph/addvertexmultiple
adds multiple vertices to a single graph.
Description
The first argument is a graph instance, and all other arguments are vertices, the action never fails
graph/addvertexmultiple(Graph,Vertex1,Vertex2,[Vertex3,Vertex4]);
See
Source Code
graph/addvertexsingle
adds a vertex to the graph.
Description
The action adds a vertex to the graph, so the first argument is the vertex and all other arguments are graphs, the action never fails
graph/addvertex(Vertex,Graph1,[Graph2,[Graph3]]);
See
Source Code
graph/adjacencymatrix
creates from a graph the adjacency matrix.
Description
The action converts graphs into a matrix, if a string is put on the argument list it must be "dense|sparse" to define the resulting matrix, a map defines the costs of an edge, a number defines the default costs, the ordering of the arguments is completly independed, for each graph two arguments will be returned, the adjacency matrix and the node names and the action never fails. The cost-map does not need an entry for each edge non-existing edges have got on default zero costs with 1
[M1|N1|M2|N2]=graph/adjacencymatrix(Graph1,"dense|sparse",Graph2);
[M1|N1|M2|N2]=graph/adjacencymatrix(CostMap,Graph1,Graph2);
[M1|N1|M2|N2]=graph/adjacencymatrix(Graph1,1,Graph2);
[M1|N1|M2|N2]=graph/adjacencymatrix(CostMap,Graph1,Graph2,"dense|sparse",);
See
https://en.wikipedia.org/wiki/Adjacency_matrix
Source Code
graph/containsedge
check if a graph contains an edge.
Description
The action checks for the first argument, if each other graph argument contains the first item as an edge, the action fails on wrong input
[B1|B2]=graph/containsedge(Element,Graph1,Graph2);
See
Source Code
graph/containsvertex
check if a graph contains a vertex.
Description
The action checks for the first argument, if each other graph argument contains the first item as an vertex, the action fails on wrong input
[B1|B2]=graph/containsvertex(Element,Graph1,Graph2);
See
Source Code
graph/create
creates a graph data structure.
Description
The action create a graph data structure with nodes and edges, arguments are strings with the name of the graph type ( SPARSE | SPARSEMULTI | DIRECTEDSPARSE | DIRECTEDSPARSEMULTI | UNDIRECTEDSPARSE | UNDIRECTEDSPARSEMULTI ) on a wrong name, a sparse graph is created, the action never fails
[G1|G2]=graph/create("sparse","directedsparse");
See
https://en.wikipedia.org/wiki/Graph_(discrete_mathematics)
Source Code
graph/degreemultiple
returns multiple vertex degrees of a single graph.
Description
The action returns for each vertex the degree of the graph reference within the first argument, the action never fails
[D1|D2]=graph/degree(Graph,Vertex1,Vertex2);
See
Source Code
graph/degreesingle
returns the vertex degree of multiple graphs.
Description
The action returns for a vertex as first argument the degree on each graph argument, the action never fails
[D1|D2]=graph/degree(Vertex,Graph1,Graph2);
See
Source Code
graph/distancepath
calculates the distance of two vertices within each graph instance.
Description
The ordering of the arguments can be arbitrary, for any graph instance the distance path is calculated, the first map instance will be used as weight-map, a tuple of the string "defaultweight" and a numeric value defines the default weight value of the weight-map (the default value is zero), a tuple which will not fit this definition defines the start- and end-vertex, the action fails on wrong input. The weight-map does not need an entry for each edge non-existing edges have got on default zero weight
[D1|D2]=graph/distancepath(StartVertex,EndVertex,Graph1,Graph2);
[D3|D4]=graph/distancepath("defaultweight",3,CostMap,StartVertex,EndVertex,Graph1,Graph2);
See
Source Code
graph/edgecount
returns the number of edges.
Description
The action returns the number of edges within a graph and never fails
[E1|E2]=graph/edgecount(Graph1,Graph2);
See
Source Code
graph/edgelistmultiple
returns all edges of all vertex tuples for a single graph instance.
Description
The first argument is a graph instance and all other arguments are tuples of vertices, for each tuple a list of all edges between the vertices is returned, the action never fails
[L1|L2]=graph/edgelist(Graph,Vertex1,Vertex2,[Vertex3,Vertex4]);
See
Source Code
graph/edgelistsingle
returns all edges of two vertices of each graph instance.
Description
The action returns a list of edges between two vertices from each graph instance, the first two arguments are vertices, all other arguments are graphs and return values are lists, the action never fails
[L1|L2]=graph/edgelist(Vertex1,Vertex2,Graph1,Graph2);
See
Source Code
graph/edges
returns for a graph all edges.
Description
The action returns for all graph arguments a list of edges, the action never fails. The return argument is an unmodifyable list
[E1|E2]=graph/edges(Graph1,Graph2);
See
Source Code
graph/endpointmultiple
returns of any edge the vertices from a single graph instance.
Description
The actions returns for any edges the connected vertices of a single graph instance, the action never fails
[V1|V2|V3|V4]=graph/endpointmultiple(Graph,Edge1,Edge2);
See
Source Code
graph/endpointsingle
returns of an edge the vertices from each graph instance.
Description
The actions returns for a single edge the connected vertices of each graph instance, the action never fails
[V1|V2|V3|V4]=graph/endpointsingle(Edge,Graph1,Graph2);
See
Source Code
graph/findedgemultiple
returns all edges between vertices for a graph instance.
Description
The action returns for each tuple of vertices the edge of a single graph instance, the action never fails
[E1|E2|E3]=graph/findedgesingle(Graph,Vertex1,Vertex2,[Vertex3,Vertex4,[Vertex5,Vertex6]]);
See
Source Code
graph/findedgesingle
returns an edge between vertices for each graph instance.
Description
The action returns an edge between two vertices, the first two arguments are vertices, all other arguments are graphs, returning values are edges of each graph instance, the action never fails
[E1|E2|E3]=graph/findedgesingle(Vertex1,Vertex2,Graph1,Graph2,Graph3);
See
Source Code
graph/incidentcountmultiple
returns the number of vertices that are incident to each edge of a single graph instance.
Description
The action returns the number of verticies that are incident to each edge for a single graph object, the action never fails
[C1|C2]=graph/incidentcountmultiple(Graph,Edge1,Edge2);
See
Source Code
graph/incidentcountsingle
returns the number of vertices that are incident to edge of each graph instance.
Description
The action returns the number of verticies that are incident to a single edge for each graph object, the action never fails
[C1|C2]=graph/incidentcountsingle(Edge,Graph1,Graph2);
See
Source Code
graph/incidentverticesmultiple
returns a list of incident vertices of each edge of a single graph instance.
Description
The action returns for a single graph instance incident vertices of each edge argument, the action never fails
[L1|L2]=graph/incidentvertices(Graph,Edge1,Edge2);
See
Source Code
graph/incidentverticessingle
returns a list of incident vertices of an edge of each graph instance.
Description
The action returns for the first edge argument the incident vertices of each graph argument, the action never fails
[L1|L2]=graph/incidentvertices(Edge,Graph1,Graph2);
See
Source Code
graph/indegreemultiple
returns the in-degree of multiple vertices of a single graph instance.
Description
The action returns for a graph as first argument the in-degree of each vertex argument, the action fails on wrong input
[D1|D2]=graph/indegreemultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/indegreesingle
returns the in-degree of a vertex of multiple graph instances.
Description
The action returns for a vertex as first argument the in-degree on each graph argument, the action fails on wrong input
[D1|D2]=graph/indegreesingle(Vertex,Graph1,Graph2);
See
Source Code
graph/inedgesmultiple
returns incomming edges of all vertices of a single graph instance.
Description
The actions returns a list incoming edges of each vertex for a single graph instance, the first argument is the graph instance, all other arguments are vertices, the action never fails
[OE1|OE2]=graph/inedgesmultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/inedgessingle
returns incomming edges of a vertex of each graph instance.
Description
The actions returns a list incoming edges of a vertex for each graph instance, the first argument is the vertex, all other graphs, the action never fails
[OE1|OE2]=graph/inedgessingle(Vertex,Graph1,Graph2);
See
Source Code
graph/isincidentmultiple
checks if a vertex and edge tuple is incident for a single graph instance.
Description
The first argument is a graph instance and each tuple of vertex and edge will be checked for incident, the action never fails
[B1|B2]=graph/isincidentmultiple(Graph,Vertex1,Edge1,[Vertex2,Edge2]);
See
Source Code
graph/isincidentsingle
checks if a vertex and an edge incident for each graph instance.
Description
The actions checks for the first vertex argument and the second egde argument if both are incident on each graph instance, the action never fails
[B1|B2]=graph/isincidentsingle(Vertex,Edge,Graph1,Graph2);
See
Source Code
graph/isneighbormultiple
checks all vertex tuple, if the first part is a neighbor of the second one of a single graph instance.
Description
The action checks for the graph instance, that the first part of each vertex tuple is the neighbor of the second part of the tuple, the action never fails
[B1|B2|B3]=graph/isneighbormultiple(Graph,Vertex1,Vertex2,[Vertex3,Vertex4,[Vertex5,vertex6]]);
See
Source Code
graph/isneighborsingle
checks if a vertex is neighbor of another vertex of each graph instance.
Description
The action checks for the first vertex argument that the second vertex argument is a neighbor of all graph instances, the action never fails
[B1|B2|B3]=graph/isneighborsingle(Vertex1,Vertex2,Graph1,Graph2,Graph3);
See
Source Code
graph/ispredecessormultiple
checks all vertex tuples if the first part the predecessor of the second on a single graph instance.
Description
The action checks for the first graph argument if the first part of all vertex tuples a predecessor of the second part, the action never fails
[B1|B2|B3]=graph/ispredecessormultiple(Graph,Vertex1,Vertex2,[Vertex3,Vertex4,[Vertex5,Vertex6]]);
See
Source Code
graph/ispredecessorsingle
checks if a vertex is predecessor of another vertex of each graph instance.
Description
The action checks for the first vertex argument that the second vertex argument is predecessor within the given graph instances, the action never fails
[B1|B2|B3]=graph/ispredecessorsingle(Vertex1,Vertex2,Graph1,Graph2,Graph3);
See
Source Code
graph/issuccessormultiple
checks all vertex tuples if the first part the successor of the second on a single graph instance.
Description
The action checks for the first graph argument if the first part of all vertex tuples a successor of the second part, the action never fails
[B1|B2|B3]=graph/issuccessormultiple(Graph,Vertex1,Vertex2,[Vertex3,Vertex4,[Vertex5,Vertex6]]);
See
Source Code
graph/issuccessorsingle
checks if a vertex is successor of another vertex of each graph instance.
Description
The action checks for the first vertex argument that the second vertex argument is successor within the given graph instances, the action never fails
[B1|B2|B3]=graph/issuccessorsingle(Vertex1,Vertex2,Graph1,Graph2,Graph3);
See
Source Code
graph/neighborscountmultiple
returns the number neighbors of each vertices of a single graph instance.
Description
The actions returns the number of neighbors of each vertices for a single graph, the first argument is the graph, all other arguments are vertices, the action never fails
[C1|C2]=graph/neighborscountmultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/neighborscountsingle
returns the number neighbors of a vertex of each graph instance.
Description
The actions returns the number of neighbors of a vertex for each graph argument, the first argument is the vertex, all other graphs, the action never fails
[C1|C2]=graph/neighborscountsingle(Vertex,Graph1,Graph2);
See
Source Code
graph/neighborsmultiple
returns the neighbors of each vertex of single graph instance.
Description
The actions returns a list of neighbors of each vertex for a single graph argument, the first argument is the graph, all other vertices, the action never fails
[N1|N2]=graph/neighborsmultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/neighborssingle
returns the neighbors of a vertex of each graph instance.
Description
The actions returns a list of neighbors of a vertex for each graph argument, the first argument is the vertex, all other graphs, the action never fails
[N1|N2]=graph/neighborssingle(Vertex,Graph1,Graph2);
See
Source Code
graph/oppositemultiple
returns the opposit of each vertex and edge tuple of a single graph instance.
Description
The action returns for the first graph argument and each following tuple of vertex and edge the opposite, the action never fails
[V1|V2]=graph/oppositemultiple(Graph,Vertex1,Edge1,[Vertex2,Edge2]);
See
Source Code
graph/oppositesingle
returns the opposit of a vertex and edge of any graph instance.
Description
The action returns the opposite vertex, the first argument is the vertex, second the edge and any other the graphs, the action never fails
[V1|V2]=graph/oppositesingle(Vertex,Edge,Graph1,Graph2);
See
Source Code
graph/outdegreemultiple
returns the out-degree of each vertex of a single graph instance.
Description
The action returns for a graph instance as first argument the out-degree of each vertex, the action never fails
[D1|D2]=graph/outdegreemultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/outdegreesingle
returns the out-degree of a vertex of each graph instance.
Description
The action returns for a vertex as first argument the out-degree on each graph instance, the action never fails
[D1|D2]=graph/outdegreesingle(Vertex,Graph1,Graph2);
See
Source Code
graph/outedgesmultiple
returns outgoing edges of any vertex of a single graph.
Description
The action return for a single graph instance all outgoing edges of each vertex, the action never fails
[OE1|OE2]=graph/outedgesmultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/outedgessingle
returns outgoing edges of a vertex of each graph.
Description
The actions returns a list outgoing edges of a vertex for each graph argument, the first argument is the vertex, all other graphs, the action never fails
[OE1|OE2]=graph/outedgessingle(Vertex,Graph1,Graph2);
See
Source Code
graph/predecessorcountmultiple
returns the number of predecessors of any vertex in a single graph instance.
Description
The action returns for any vertex argument the number of predecessors on a single graph instance, the action never fails
[C1|C2]=graph/predecessorcountmultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/predecessorcountsingle
returns the number of predecessors of a vertex in multiple graph instances.
Description
The action returns for the first vertex argument the number of predecessors on all graph arguments, the action never fails
[C1|C2]=graph/predecessorcountsingle(Vertex,Graph1,Graph2);
See
Source Code
graph/removeedgemultiple
removes edges from any graph instance.
Description
The action removes any edge from a single graph instace, the first argument is the graph all other arguments are edges, the action never fails
graph/removeedgemultiple(Graph,Edge1,Edge2);
See
Source Code
graph/removeedgesingle
remove an edge from any graph instance.
Description
The action removes an edge aas first argument from all graph arguments, the action never fails
graph/removeedgesingle(Edge,Graph1,Graph2);
See
Source Code
graph/removevertexmultiple
removes any vertices from a single graph instance.
Description
The action removes from the first graph argument all vertices, the action never fails
graph/removevertexmultiple(Graph,Vertex1,Vertex2);
See
Source Code
graph/removevertexsingle
removes a vertex from each graph instance.
Description
The action removes of all graph instances the given vertex, the action never fails
graph/removevertexsingle(Vertex,Graph1,Graph2);
See
Source Code
graph/shortestpath
calculates the edge list of the shortest path of two vertices within each graph instance.
Description
The ordering of the arguments can be arbitrary, for any graph instance the edge list of the shortest path is calculated, the first map instance will be used as weight-map, a tuple of the string "defaultweight" and a numeric value defines the default weight value of the weight-map (the default value is zero), a tuple which will not fit this definition defines the start- and end-vertex, the action fails on wrong input. The weight-map does not need an entry for each edge non-existing edges have got on default zero weight
[D1|D2]=graph/shortestpath(StartVertex,EndVertex,Graph1,Graph2);
[D3|D4]=graph/shortestpath("defaultweight",3,CostMap,StartVertex,EndVertex,Graph1,Graph2);
See
Source Code
graph/spanningtree
creates a minimal spanning tree of any graph instance.
Description
The action creates from each graph argument a spanning tree, the first map instance will be used as weight-map, a tuple of the string "defaultweight" and a numeric value defines the default weight value of the weight-map (the default value is zero), the action never fails
[SP1|SP2]=graph/spanningtree(Graph1,Graph2);
[SP3|SP4]=graph/spanningtree("defaultweight",3,WeightMap,Graph3,Graph4);
See
Source Code
graph/successorcountmultiple
returns the number of successors of each vertex of a single graph instance.
See
Source Code
graph/successorcountsingle
returns the number of successors of a vertex within each graph instance.
Description
The action returns for the first vertex argument the number of successors of all graph instances, the action never fails
[C1|C2]=graph/successorcountsingle(Vertex,Graph1,Graph2);
See
Source Code
graph/vertexcount
returns the number of vertices.
Description
The action returns the number of vertices within a graph and never fails
[V1|V2]=graph/vertexcount(Graph1,Graph2);
See
Source Code
graph/vertices
returns all vertices of a graph.
Description
The action returns a list of all vertices for each graph argument, the action never fails
[V1|V2]=graph/vertices(Graph1,Graph2);
See
Source Code

math

math/abs
action for absolute value.
Description
The action calculates $ \lvert x_i \rvert $ for all arguments
[A|B|C]=math/abs(-1,-5,3);
See
https://en.wikipedia.org/wiki/Absolute_value
Source Code
math/acos
action for arc cosinus value.
Description
The action calculates $ acos( x_i ) $ for all arguments, the return value is in $ [0, \pi) $, the arguments must be in radians.
[A|B|C]=math/acos(-1,-5,3);
See
https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
Source Code
math/asin
action for arc sinus value.
Description
The action calculates $ asin( x_i ) $ for all arguments, the return value is in $ [0, \pi) $, the arguments must be in radians.
[A|B|C]=math/asin(-1,-5,3);
See
https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
Source Code
math/atan
action for tangens value.
Description
The action calculates $ atan( x_i ) $ for all arguments, the return value is in $ [0, \pi) $, the arguments must be in radians.
[A|B|C]=math/atan(-1,-5,3);
See
https://en.wikipedia.org/wiki/Inverse_trigonometric_functions
Source Code
math/average
action for average.
Description
The action calculates $ \frac{1}{i} \sum_{i} x_i $ over all arguments, action fails never, but can throw a runtime exception
A=math/average(1,3,9,[10,[11,12]]);
See
https://en.wikipedia.org/wiki/Average
Source Code
math/binomial
action for calculating binomial coefficient.
Description
Calcluates $ \binom{n}{k} $, where n is the first argument and k the second of each given input tupel, the action fails never
[B1|B2]=math/binomial(49,6,30,5);
See
https://en.wikipedia.org/wiki/Binomial_coefficient
Source Code
math/ceil
action for ceil value.
Description
Ceils any argument values with $ \lceil x_i \rceil $ and returns all values, the action never fails
[A|B|C]=math/ceil(1.3,2.8,9.7);
See
https://en.wikipedia.org/wiki/Floor_and_ceiling_functions
Source Code
math/cos
action for cosinus value.
Description
The action calculates $ cos( x_i ) $ for each argument in radians and returns the values
[A|B]=math/cos(3,4);
See
Source Code
math/cosh
action for cosinus hyperbolic value.
Description
The action calculates for all arguments $ cosh( x_i ) $ and fails never, the arguments must be in radians.
[A|B]=math/cosh(3,4);
See
https://en.wikipedia.org/wiki/Hyperbolic_function
Source Code
math/degrees
action for converting angle value to degree value.
Description
Converts all radian arguments into degree values $ \frac{x_i \cdot 180}{\pi} $
A=math/degrees(pi);
See
https://en.wikipedia.org/wiki/Radian
Source Code
math/exp
action for exponential value.
Description
Calculate the exponential function $ e^{x_i} $ for each argument, the action never fails
[X|Y]=math/exp(1,8);
See
https://en.wikipedia.org/wiki/Exponential_function
Source Code
math/factorial
action for calculating factorial.
Description
Creates the factorial $ ! x_i $ for all unflattern arguments and the action fails never
[A|B|C|D|E]=math/factorial(5,[[1,2],3,4]);
See
https://en.wikipedia.org/wiki/Factorial
Source Code
math/floor
action for floor value.
Description
Floors any argument values with $ \lfloor x_i \rfloor $ and returns all values, the action never fails
[A|B|C]=math/floor(1.3,2.8,9.7);
See
https://en.wikipedia.org/wiki/Floor_and_ceiling_functions
Source Code
math/geometricmean
action for geometric mean.
Description
The action calculates $ \sqrt[i]{\prod_{i} x_i} $ over all unflatten arguments, action fails never
G=math/geometricmean(1,3,9,[10,[11,12]]);
See
https://en.wikipedia.org/wiki/Average
Source Code
math/harmonicmean
action for harmonic mean.
Description
The action calculates $ \frac{i}{\sum_{i} \frac{1}{x_i}} $ over all unflatten arguments, action fails never
G=math/harmonicmean(1,3,9,[10,[11,12]]);
See
https://en.wikipedia.org/wiki/Average
Source Code
math/hypot
action for calculating the euclidian length.
Description
Calculates for each pair of arguments $ \sqrt{ x_{i}^{2} + y_{i}^{2} } $ and fail iif the number of arguments are odd, it unflats all list elements
[A|B|C]=math/hypot(1,[2,[3]],[4,5]);
See
Source Code
math/isprime
action for checking for a prime number.
Description
Checks for all unflatten arguments if the number is a prime number and returns a boolean of this check, the actions never fails
[P1|P2]=math/isprime(3,4);
See
https://en.wikipedia.org/wiki/Prime_number
https://en.wikipedia.org/wiki/Primality_test
Source Code
math/log
action for logarithm value.
Description
Calculates the natural logarithm $ log( x_i ) $ for each unflatten argument
[A|B|C]=math/log([1,2],3);
See
https://en.wikipedia.org/wiki/Natural_logarithm
https://en.wikipedia.org/wiki/Logarithm
Source Code
math/log10
action for logarithm (base 10) value.
Description
Calculates the logarithm of the base 10 $ log_{10} x_i $ for all unflatten arguments
[A|B|C]=math/log10([1,2],3);
See
https://en.wikipedia.org/wiki/Logarithm
Source Code
math/max
action for maximum.
Description
The action calculates for all unflatten arguments the maxmimum with $ max( x_0, x_1, \ldots, x_i ) $, the action fails on wrong input
Max=math/max(2,5,7,[3,2]);
See
Source Code
math/maxindex
action for index of maximum.
Description
The action takes of the given unflatten input the maximum and returns the index within the unflatten argument list, the action never fails
MaxIndex=math/maxindex(5,6,[7,8,[1,2,3]]);
See
Source Code
math/min
action for minimum.
Description
The action calculates for all unflatten arguments the minimum with $ min( x_0, x_1, \ldots, x_i ) $, the action fails on wrong input
Max=math/min(2,5,7,[3,2]);
See
Source Code
math/minindex
action for index of minimum.
Description
The action takes of the given unflatten input the minimum and returns the index within the unflatten argument list, the action never fails
MinIndex=math/minindex(5,6,[7,8,[1,2,3]]);
See
Source Code
math/nextprime
action for create the next prime number.
Description
The action calculates the next prime number relative to the given argument value, the action never fails
[A|B|C]=math/nextprime([12,[144,1096]]);
See
https://en.wikipedia.org/wiki/Prime_number
https://en.wikipedia.org/wiki/Primality_test
Source Code
math/pow
action for pow.
Description
Calculates the pow for each unflatten argument $ x_i^t $, the first argument is the exponent t and all other arguments will be used for $ x_i $, the action fails never
[A|B|C]=math/pow(2,-2,2,9);
See
Source Code
math/primefactors
action for creating prime factors list.
Description
For each argument the action returns a list of prime factors and fails never.
[L1|L2]=math/primfactors(8,[120]);
See
https://en.wikipedia.org/wiki/Prime_number
https://en.wikipedia.org/wiki/Primality_test
Source Code
math/radians
action for converting degree value into radian.
Description
Converts all degree arguments into radian values $ \frac{x_i \cdot \pi}{180} $
A=math/radians(180);
See
https://en.wikipedia.org/wiki/Radian
Source Code
math/round
action for rounded value.
Description
This action calculates for each unflatten input argument the rounded value and the action fails never
[I1|I2|I3]=math/round(5.5,[1.2,[2.7]]);
See
https://en.wikipedia.org/wiki/Rounding
Source Code
math/sigmoid
action for calculating a parameterized sigmoid function.
Description
Action calculates the sigmoid function for each value, the definition of the function is $ \frac{\alpha}{ \beta + e^{ - \gamma \cdot t }} $$ \alpha $ is the first, $ \beta $ the second and $ \gamma $ the third argument, all values beginning at the fourth position will be used for t, so the action returns all values but and is never failing.
[A|B|C]=math/sigmoid(1,1,1,10,20,30);
See
https://en.wikipedia.org/wiki/Sigmoid_function
Source Code
math/signum
action for signum value.
Description
Calculates for each argument the signum value $ sgn(x) = \begin{cases} -1 & \text{if } x < 0 \\ 0 & \text{if } x = 0 \\ 1 & \text{if } x > 0 \end{cases} $
[A|B|C]=math/signum(-3,0,8);
See
https://en.wikipedia.org/wiki/Sign_function
Source Code
math/sin
action for sinus value.
Description
The action calculates $ sin( x_i ) $ for each argument in radians and returns the values
[A|B]=math/sin(3,4);
See
Source Code
math/sinh
action for sinus hyperbolic value.
Description
For each unflatten input argument the $ sinh( x_i ) $ is calculated and the action never fails
[X|Y|Z]=math/sinh(3.2,[5,8,[1.2]]);
See
https://en.wikipedia.org/wiki/Hyperbolic_function
Source Code
math/sqrt
action for sqrt value.
Description
Calculates the square-root for each unflatten argument $ \sqrt{ x_i } $
[S1|S2]=math/sqrt(2,3);
See
Source Code
math/stirling
action for calculating stirling number.
Description
The action calculates the stirling number with $ S(n,k)=\left\{\begin{matrix} n \\ k \end{matrix}\right\}= S_n^{(k)} $ of each tuple of the unflatten argument list, n is the first value of the tupel and k is the second value of the tupel, the action fails never
[S1|S2]=math/stirling(2,3,[4,5]);
See
https://en.wikipedia.org/wiki/Stirling_number
Source Code
math/sum
action for sum of elements.
Description
Sums all unflatten arguments $ \sum_{i} x_i $, the action never fails
S=math/sum(3,4,[1,-5,[3,4]],10,12);
See
Source Code
math/tan
action for tangens value.
Description
The action calculates for each unflatten input value in radians the $ tan( x_i ) $ value, the action never fails
[X|Y|Z]=math/tan(pi,1.3*pi,0.43*pi);
See
https://en.wikipedia.org/wiki/Trigonometric_functions
Source Code
math/tanh
action for tangens hyperbolic value.
Description
Calculates for each unflatten argument $ tanh( x_i ) $ and fails never
[A|B|C]=math/tanh([1,2],3);
See
https://en.wikipedia.org/wiki/Hyperbolic_function
Source Code

math/bit/matrix

math/bit/matrix/and
performs the logical and operation to all bit matrices.
Description
The action runs the logical and operator, the first argument is the bit matrix, that is combined with all other bit matrices, so $ m_i = m_i \text{ && } m_1 $ is performed, the action never fails
math/bit/matrix/and(Matrix,Matrix1,Matrix2);
See
Source Code
math/bit/matrix/boolvalue
returns for the index tuple a boolean value.
Description
The action returns for the first argument, which is a bit matrix, all boolean values for all given index tuples (row / column), the action fail on incorrect input
[B1|B2]=math/bit/matrix/boolvalue(BitMatrix,1,2,[3,5]);
See
Source Code
math/bit/matrix/column
returns a single column of a bit matrix.
Description
The action returns a column of a bit matrix as vector, the first argument is the index of the column, all other a matrix objects, the action never fails
[V1|V2]=math/bit/matrix/column(3,Matrix1,[Matrix2]);
See
Source Code
math/bit/matrix/columns
returns the column number of a bit matrix.
Description
Reads the column number of each input matrix and returns the value, the action never fails.
[C1|C2]=math/bit/matrix/columns(M1,M2);
See
Source Code
math/bit/matrix/copy
returns a copy of the matrix.
Description
All input matrix objects will be copied and returned, the action never fails
[A|B]=math/bit/matrix/copy(Matrix1,Matrix2);
See
Source Code
math/bit/matrix/create
creates a bit matrix.
Description
All tuple arguments are defined the size of bit matrix, so for each input tuple argument a bit matrix will be created and returned, the action never fails
[A|B]=math/bit/matrix/create(3,2,[1,12]);
See
Source Code
math/bit/matrix/dimension
returns the dimension (rows / columns) of a bit matrix.
Description
Reads the dimension of each input matrix and returns the rows and columns, the action never fails.
[Row1|Column1|Row2|Column2]=math/bit/matrix/dimension(M1,M2);
See
Source Code
math/bit/matrix/falsecount
returns the number of false values.
Description
The actions returnf for each input matrix the number of true values, the action never fails
[A|B]=math/bit/matrix/falsecount(BitMatrix1,BitMatrix2);
See
Source Code
math/bit/matrix/hammingdistance
calculates the hamming distance.
Description
The action calculates between bit matrices, the distance will be calculated between the first and all other arguments, the action never fails
[A|B]=math/bit/matrix/hammingdistance(Matrix1,Matrix2,Matrix3);
See
https://en.wikipedia.org/wiki/Hamming_distance
Source Code
math/bit/matrix/nand
performs the logical not-and operation to all bit matrices.
Description
The action runs the logical not-and operator, the first argument is the bit matrix, that is combined with all other bit matrices, so $ m_i = m_i \text{ && not } m_1 $ is performed, the action never fails
math/bit/matrix/nand(Matrix,Matrix1,Matrix2);
See
Source Code
math/bit/matrix/not
performs the logical not operation to all bit matrices.
Description
Each input argument defines a bit matrix and the action apply the logical not operator, the action never fails
math/bit/matrix/not(Matrix1,Matrix2);
See
Source Code
math/bit/matrix/numericvalue
returns for the index tuple a numeric value.
Description
The action returns for the first argument, which is a bit matrix, all numeric values for all given index tuples (0 = false, 1 = true), the action fails on wrong input
[B1|B2]=math/bit/matrix/numericvalue(BitMatrix,1,2,[Row,Column]);
See
Source Code
math/bit/matrix/or
performs the logical or operation to all bit matrices.
Description
The action runs the logical or operator, the first argument is the bit matrix, that is combined with all other bit matrices, so $ m_i = m_i \text{ || } m_1 $ is performed, the action never fails
math/bit/matrix/or(Matrix,Matrix1,Matrix2);
See
Source Code
math/bit/matrix/row
returns a single row of a bit matrix.
Description
The action returns a row of a matrix as vector, the first argument is the index of the row, all other arguments are matrix object, the action never fails
[R1|R2]=math/bit/matrix/row(2,Matrix1,[Matrix2]);
See
Source Code
math/bit/matrix/rows
returns the row number of a matrix.
Description
Reads the row number of each input matrix and returns the value, the action never fails.
[C1|C2]=math/blas/matrix/rows(M1,M2);
See
Source Code
math/bit/matrix/size
returns the size (rows * columns) of the matrix.
Description
All input matrix objects will return their size (number of bits for the rows * columns), the action never fails
[A|B]=math/bit/matrix/size(Matrix1,Matrix2);
See
Source Code
math/bit/matrix/toblas
converts the bit matrix to a blas matrix.
Description
The action converts the bit matrix to a blas matrix, the last argument can be "dense" or "sparse", all other arguments are bit matrices and the actions never fails
[A|B]=math/bit/matrix/toblas(BitMatrix1,BitMatrix2,"dense|sparse");
See
Source Code
math/bit/matrix/tovector
converts the bit matrix into a bit vector.
Description
The action converts each bit matrix argument into a bit vector with the size of the matrix, the bit within the vector are row-wise copied from the matrix and the action never fails
[V1|V2]=math/bit/matrix/tovector(Matrix1,Matrix2);
See
Source Code
math/bit/matrix/truecount
returns the number of true values.
Description
The actions returnf for each input matrix the number of true values, the action never fails
[A|B]=math/bit/matrix/truecount(BitMatrix1,BitMatrix2);
See
Source Code
math/bit/matrix/xor
performs the logical xor operation to all bit matrices.
Description
The action runs the logical xor operator, the first argument is the bit matrix, that is combined with all other bit matrices, so $ m_i = m_i \text{ ^ } m_1 $ is performed, the action never fails
math/bit/matrix/xor(Matrix,Matrix1,Matrix2);
See
Source Code

math/bit/vector

math/bit/vector/and
performs the logical and operation to all bit vectors.
Description
The action runs the logical and operator, the first argument is the bit vector, that is combined with all other bit vectors, so $ v_i = v_i \text{ && } v_1 $ is performed, the action never fails
math/bit/vector/and(Vector,Vector1,Vector2);
See
Source Code
math/bit/vector/boolvalue
returns for the index a boolean value.
Description
The action returns for the first argument, which is a bit vector, all boolean values for all given index values, the action never fails
[B1|B2|B3]=math/bit/vector/boolvalue(BitVector,1,[3,5]);
See
Source Code
math/bit/vector/clear
sets the indexed bit to false within the bit vector.
Description
The action gets bit vectors and index positions and in each bit vector the given bit positions are set to false, the action never fails
math/bit/vector/clear(BitVector1,0,1,BitVector2,[3,5]);
See
Source Code
math/bit/vector/copy
returns a copy of the vector.
Description
All input vector objects will be copied and returned, the action never fails
[A|B]=math/bit/vector/copy(Vector1,Vector2);
See
Source Code
math/bit/vector/create
creates a bit vector.
Description
All arguments are defined the size of bit vectors, so for each input argument a bit vector will be created and returned, the action never fails
[A|B|C|D]=math/bit/vector/create(3,[2,[1,12]]);
See
Source Code
math/bit/vector/falsecount
returns the number of false values.
Description
The actions returnf for each input vector the number of true values, the action never fails
[A|B]=math/bit/vector/falsecount(BitVector1,BitVector2);
See
Source Code
math/bit/vector/hammingdistance
calculates the hamming distance.
Description
The action calculates between bit vectors, the distance will be calculated between the first and all other arguments, the action never fails
[A|B]=math/bit/vector/hammingdistance(Vector1,Vector2,Vector3);
See
https://en.wikipedia.org/wiki/Hamming_distance
Source Code
math/bit/vector/nand
performs the logical not-and operation to all bit vectors.
Description
The action runs the logical not-and operator, the first argument is the bit vector, that is combined with all other bit vectors, so $ v_i = v_i \text{ && not } v_1 $ is performed, the action never fails
math/bit/vector/nand(Vector,Vector1,Vector2);
See
Source Code
math/bit/vector/not
performs the logical not operation to all bit vectors.
Description
Each input argument defines a bit vector and the action apply the logical not operator, the action never fails
math/bit/vector/not(Vector1,Vector2);
See
Source Code
math/bit/vector/numericvalue
returns for the index a numeric value.
Description
The action returns for the first argument, which is a bit vector, all numeric values for all given index values (0 = false, 1 = true), the action never fails
[B1|B2|B3]=math/bit/vector/numericvalue(BitVector,1,[3,5]);
See
Source Code
math/bit/vector/or
performs the logical or operation to all bit vectors.
Description
The action runs the logical or operator, the first argument is the bit vector, that is combined with all other bit vectors, so $ v_i = v_i \text{ || } v_1 $ is performed, the action never fails
math/bit/vector/or(Vector,Vector1,Vector2);
See
Source Code
math/bit/vector/range
returns a new bit vector, based on the current.
Description
The action returns a new bit vector based on the range, the first argument is a bit vector, all other arguments are tuples of ranges, the action fails on wrong input, index starts at zero, the action never fails
[V1|V2]=math/bit/vector/range(BitVector,0,1,[3,5]);
See
Source Code
math/bit/vector/set
sets bit position by index and value.
Description
The first argument is the bit vector, the second argument is a boolean value or number value (0 = false), all other values are index positions, each index bit within the bit vector will be set to the given value, the action never fails
math/bit/vector/set(BitVector,true,1,[3,7]);
See
Source Code
math/bit/vector/size
returns the size of the vector.
Description
All input vector objects will return their size (number of bits), the action never fails
[A|B]=math/bit/vector/size(Vector1,Vector2);
See
Source Code
math/bit/vector/toblas
converts the bit vector to a blas vector.
Description
The action converts the bit vector to a blas vector, the last argument can be "dense" or "sparse", all other arguments are bit vectors and the actions never fails
[A|B]=math/bit/vector/toblas(BitVector1,BitVector2,"dense|sparse");
See
Source Code
math/bit/vector/tolist
returns the long values of the bit vector as list.
Description
The action creates a list with 0 / 1 values of the values of the bit vector, the action never fails
[L1|L2]=math/bit/vector/tolist(Vector1,Vector2);
See
Source Code
math/bit/vector/truecount
returns the number of true values.
Description
The actions returnf for each input vector the number of true values, the action never fails
[A|B]=math/blas/vector/truecount(BitVector1,BitVector2);
See
Source Code
math/bit/vector/xor
performs the logical xor operation to all bit vectors.
Description
The action runs the logical xor operator, the first argument is the bit vector, that is combined with all other bit vectors, so $ v_i = v_i \text{ ^ } v_1 $ is performed, the action never fails
math/bit/vector/xor(Vector,Vector1,Vector2);
See
Source Code

math/blas

math/blas/elementwise
elementweise vector / matrix operation.
Description
The action calculates elementwise different operations (plus, plus-absolute, minus, multiply, divide), all arguments are triples of matrix-operator-matrix|scalar, the action fails on assigning problems
[M1|M2|M3]=math/blas/elementwise(Matrix1,"+",5,Matrix2,"|+|",Matrix3,Matrix4,"-",3,[Matrix5,"*",0.5],[Matrix6,"/",100]);
See
Source Code
math/blas/multiply
defines matrix- / vector-products.
Description
The action multiplies tupel-wise all unflatten arguments, the action fails iif the multiply cannot executed e.g. on wrong input
[M1|M2|M3]=math/blas/multiply(Vector1,Vector2,[[Matrix1,Matrix2],Matrix3,Vector3]);
See
Source Code
math/blas/size
returns the elements within the BLAS structure.
Description
The action returns the size of each BLAS structure
[S1|S2|S3]=math/blas/size(M1,[M2,M3]);
See
Source Code

math/blas/matrix

math/blas/matrix/assign
assigns a value or matrix to all elements.
Description
The action assign the first argument to all other arguments which must be a matrix
math/blas/matrix/assign(2,Matrix1,[Matrix2,Matrix3]);
math/blas/matrix/assign(AssignMatrix,Matrix1,[Matrix2,Matrix3]);
See
Source Code
math/blas/matrix/column
returns a single column of a matrix.
Description
The action returns a column of a matrix as vector, the first argument is the index of the column, all other a matrix objects, the action never fails
[V1|V2]=math/blas/matrix/column(3,Matrix1,[Matrix2]);
See
Source Code
math/blas/matrix/columns
returns the column number of a matrix.
Description
Reads the column number of each input matrix and returns the value, the action never fails.
[C1|C2]=math/blas/matrix/columns(M1,M2);
See
Source Code
math/blas/matrix/columnsum
returns the column-sum of a matrix.
Description
The action returns the column-sum of all matrix objects, a string value defines a sparse or dense resulting vector, the action never fails
[S1|S2]=math/blas/matrix/columnsum(Matrix1,Matrix2);
[S1|S2]=math/blas/matrix/columnsum(Matrix1,Matrix2,"sparse");
See
Source Code
math/blas/matrix/condition
returns the condition of a matrix.
Description
Calculates for each input matrix the condition number and returns the value, the action never fails
[C1|C2]=math/blas/matrix/condition(M1,M2);
See
https://en.wikipedia.org/wiki/Condition_number
Source Code
math/blas/matrix/copy
returns a copy of the matrix.
Description
All input matrix object will be copied and returned, the action never fails
[A|B]=math/blas/matrix/copy(Matrix1,Matrix2);
See
Source Code
math/blas/matrix/create
creates a dense- or sparse-matrix.
Description
The action creates densore or sparse matrix objects, the last object is a string with dense or sparse, all other arguments are tuples of row and column size.
[M1|M2]=math/blas/matrix/create(2,2,[3,2],"dense|sparse");
See
Source Code
math/blas/matrix/determinant
returns the determinant of a matrix.
Description
Calculates for each input matrix the determinat and returns it, the action never fails
[D1|D2|D3]=math/blas/determinant(M1,[M2,M3]);
See
https://en.wikipedia.org/wiki/Determinant
Source Code
math/blas/matrix/diagonal
returns a diagonal matrix.
Description
The action returns for each vector element a matrix which contains the vetcor elements on the diagonal line. A string value indicates a sparse or dense matrix (default sparse), the action fails never
[D1|D2]=math/blas/matrix/diagonal(Vector1,Vector2);
[D3|D4]=math/blas/matrix/diagonal(Vector1,Vector2,"dense");
See
Source Code
math/blas/matrix/dimension
returns the dimension (rows / columns) of a matrix.
Description
Reads the dimension of each input matrix and returns the rows and columns, the action never fails.
[Row1|Column1|Row2|Column2]=math/blas/matrix/dimension(M1,M2);
See
Source Code
math/blas/matrix/eigen
creates the real eigenvalues and eigenvectors of a matrix.
Description
For each input matrix argument the eigen decomposition is executed and two elements eigenvalues (as vector) and eigenvectors (as matrix) are returned, the action never fails.
[Values1|Vectors1|Values2|Vectors2]=math/blas/matrix/eigen(Matrix1,Matrix2);
See
https://en.wikipedia.org/wiki/Eigenvalues_and_eigenvectors
Source Code
math/blas/matrix/get
returns a single element of a matrix.
Description
The action returns single elements of a matrix, the first argument is a matrix object, the other arguments are index tuples and the action never fails
[A|B]=math/blas/matrix(Matrix,3,4,[Row,Column]);
See
Source Code
math/blas/matrix/graphlaplacian
creates the graph laplacian.
Description
For each input adjacency matrix, the graph laplacian is calculated and returned, the action never fails
[L1|L2]=math/blas/matrix/graphlaplacian(AdjacencyMatrix1,AdjacencyMatrix2);
See
https://en.wikipedia.org/wiki/Laplacian_matrix
Source Code
math/blas/matrix/identity
returns the identity matrix.
Description
The action returns the identity matrix multiple times, the arguments defines the size of each matrix, a string defines the resulting matrix type dense or space (default sparse), the action never fails
[E1|E2]=math/blas/matrix/identity(2,3);
[E3|E4]=math/blas/matrix/identity(2,3,"dense");
See
Source Code
math/blas/matrix/infinitynorm
returns the infinitiy-norm of a matrix.
Description
The action calculates for each input matrix object the infinity-norm and returns the value, the action never fails
[N1|N2]=math/blas/matrix/infinitynorm(M1,M2);
See
https://en.wikipedia.org/wiki/Uniform_norm
Source Code
math/blas/matrix/invert
inverts the matrix.
Description
Inverts each input matrix and returns it, the action never fails
[I1|I2]=math/blas/matrix/invert(M1,M2);
See
https://en.wikipedia.org/wiki/Invertible_matrix
Source Code
math/blas/matrix/matrixnorm
returns the frobenius- / matrix-norm of a matrix.
Description
For each input matrix object the frobenius- / matrix-norm is calculates and returned, the action never fails
[N1|N2]=math/blas/matrix/matrixnorm(M1,M2);
See
https://en.wikipedia.org/wiki/Matrix_norm
Source Code
math/blas/matrix/nonzero
returns the number of non-zero cells.
Description
Gets the number of non-zero cells on each matrix input and returns the value, the action never fails
[NZ1|NZ2]=math/blas/matrix/nonzero(M1,M2);
See
Source Code
math/blas/matrix/normalizedgraphlaplacian
creates the normalized graph laplacian.
Description
For each input adjacency matrix, the normalized graph ´laplacian is calculated and returned, the action never fails
[L1|L2]=math/blas/matrix/normalizedgraphlaplacian(AdjacencyMatrix1,AdjacencyMatrix2);
See
https://en.wikipedia.org/wiki/Laplacian_matrix
Source Code
math/blas/matrix/onenorm
returns the one-norm of a matrix.
Description
Calculates for each input matrix the one-norm and returns the value, the action never fails
[N1|N2]=math/blas/matrix/onenorm(M1,M2);
See
https://en.wikipedia.org/wiki/Matrix_norm
Source Code
math/blas/matrix/parse
creates a dense- or sparse-matrix from a string.
Description
The action parses each argument and returns the matrix object, the last argument can be a string with "dense" or "sparse" to defining a dense or sparse matrix, all other arguments string with a semicolon and space / comma seperated list, the action never fails. Semicolon splits the rows, spaces / comma splits the columns
[A|B|C]=math/blas/matrix/parse("1,2;3,4","567;8910","dense|sparse");
See
Source Code
math/blas/matrix/perronfrobenius
calculates the largest eigenvector with perron-frobenius theorem.
Description
The action calculates the largest eigenvector of a sequared matrix based on the perron-frobenius theorem, the calculation is $ E_{t+1} = M \cdot E_t $, the action uses on the first argument the number of iterations and all other argumentes are squared matrices, the returning arguments are the eigenvector for each matrix, the action never fails
[E1|E2|E3]=math/blas/matrix/perronfrobenius(5,M1,M2,M3);
See
https://en.wikipedia.org/wiki/Perron%E2%80%93Frobenius_theorem
Source Code
math/blas/matrix/power
returns the matrix power.
Description
The action creates the matrix power, the first argument is the exponent, all other arguments are input matrix vlaues and the returns the power value for each input matrix
[M1|M2|M3]=blas/matrix/power(3,M1,[M2,[M3]]);
See
https://en.wikipedia.org/wiki/Matrix_exponential
Source Code
math/blas/matrix/rank
rank of the matrix.
Description
For each input matrix the rank is calculated and returned, the action never fails
[R1|R2]=math/blas/matrix/rank(M1,M2);
See
https://en.wikipedia.org/wiki/Rank_(linear_algebra)
Source Code
math/blas/matrix/row
returns a single row of a matrix.
Description
The action returns a row of a matrix as vector, the first argument is the index of the row, all other arguments are matrix object, the action never fails
[R1|R2]=math/blas/matrix/row(2,Matrix1,[Matrix2]);
See
Source Code
math/blas/matrix/rows
returns the row number of a matrix.
Description
Reads the row number of each input matrix and returns the value, the action never fails.
[C1|C2]=math/blas/matrix/rows(M1,M2);
See
Source Code
math/blas/matrix/rowsum
returns the row-sum of a matrix.
Description
The action returns the row-sum of all matrix objects, a string value defines a sparse or dense resulting vector, the action never fails
[S1|S2]=math/blas/matrix/rowsum(Matrix1,Matrix2);
[S1|S2]=math/blas/matrix/rowsum(Matrix1,Matrix2,"sparse");
See
Source Code
math/blas/matrix/set
set a single element of a matrix.
Description
The action sets a value into the matrix, the first argument is the row index, second argument the column index, the third value, the new value, all other arguments are matrix objects
math/blas/matrix/set(2,2,0.33,Matrix1,[Matrix2,Matrix3]);
See
Source Code
math/blas/matrix/singularvalue
creates the singular value decomposition of a matrix.
Description
For each input matrix the singular value decompisition is called and the values, and the two matrixes (left / right) are returned, the action never fails
[Values1|U1|V1|Values2|U2|V2]=blas/matrix/singularvalue(Matrix1,Matrix2);
See
https://en.wikipedia.org/wiki/Singular_value_decomposition
Source Code
math/blas/matrix/solve
solver of matrix-equation.
Description
The action solve the equation $ A \cdot X = B $ for each input tuple, $ A $ is the first matrix argument within the tuple and $ B $ the second, which can be a matrix or vector, for each tuple the action returns $ X $, the action never fails
[R1|R2]=math/blas/matrix(Matrix1,Matrix2,[Matrix3,Vector1]);
See
Source Code
math/blas/matrix/submatrix
returns a submatrix.
Description
The first four arguments defines the index values of the submatrix ( from/to row, from/to column ) and each matrix object that starts at the fiveth position will
[M1|M2]=math/blas/matrix/submatrix(FromRow,ToRow,FromColumn,ToColumn,Matrix1,[Matrix2]);
See
Source Code
math/blas/matrix/sum
returns sum of a matrix.
Description
Calculates for each input matrix the sum and returns the value, the action never fails
[S1|S2]=math/blas/matrix/sum(M1,M2);
See
Source Code
math/blas/matrix/tolist
converts a matrix rowise to a list.
Description
The action creates lists of each input matrix, the action never fails
[L1|L2|L3]=math/blas/matrix/tolist(Matrix1,[Matrix2,Matrix3]);
See
Source Code
math/blas/matrix/trace
creates the trace of the matrix.
Description
Returns for each matrix input argument the trace, the action never fails
[T1|T2]=math/blas/matrix/trace(M1,M2);
See
https://en.wikipedia.org/wiki/Trace_(linear_algebra)
Source Code
math/blas/matrix/transpose
transpose a matrix.
Description
Creates for each input matrix the transposed matrix and returns it, the action never fails
[T1|T2]=math/blas/matrix/transpose(M1,M2);
See
https://en.wikipedia.org/wiki/Transpose
Source Code
math/blas/matrix/twonorm
returns the two-norm of a matrix.
Description
Calculates for each input matrix the two-norm and returns the value, the action never fails
[N1|N2]=math/blas/matrix/twonorm(M1,M2);
See
https://en.wikipedia.org/wiki/Matrix_norm
Source Code

math/blas/vector

math/blas/vector/assign
assigns a value or vector to all elements.
Description
The action assign the first argument to all other arguments which must be vectors
math/blas/vector/assign(2,Vector1,[Vector2,Vector3]);
math/blas/vector/assign(AssignVector,Vector1,[Vector2,Vector3]);
See
Source Code
math/blas/vector/copy
returns a copy of the vector.
Description
All input vector object will be copied and returned, the action never fails
[A|B]=math/blas/vector/copy(Vector1,Vector2);
See
Source Code
math/blas/vector/create
creates a dense- or sparse-vector.
Description
The action creates a vector, the first $ n-1 $ arguments are the size of the vector, the last argument defines as string a dense or sparse vector (default is dense) and the action never fails
[A|B|C]=math/blas/vector/create(3,2,1,"dense|sparse");
See
Source Code
math/blas/vector/dotproduct
returns dot-product of vectors.
Description
The action calculates for each tupel of vectors the dot-product, so the argument number must be odd otherwise the action fails
[D1|D2]=math/blas/vector(V1,V2,[V3,V4]);
See
https://en.wikipedia.org/wiki/Dot_product
Source Code
math/blas/vector/fromlist
creates a dense- or sparse-vector from a list.
Description
All input arguments will be converted to a dense or sparse vector, so the arguments must be lists of numbers, the last optional argument can be a string with "dense | sparse" to create dense or sparse structures, the action never fails
[V1|V2]=math/blas/vector([1,2,3],[4,5,6],"dense|sparse");
See
Source Code
math/blas/vector/get
returns a single element of a vector.
Description
The action returns the values by the given index, first argument is the vector and all other values are the index values, the action never fails
[X|Y|Z]=math/blas/vector/get(Vector,1,[4,5]);
See
Source Code
math/blas/vector/nonzero
returns the number of non-zero cells.
Description
Gets the number of non-zero cells on each vector input and returns the value, the action never fails
[NZ1|NZ2]=math/blas/vector/nonzero(V1,V2);
See
Source Code
math/blas/vector/parse
creates a dense- or sparse-vector from as string.
Description
The action creates for each input argument a vector by parsing the string, the last string can be "dense | sparse" to defining a sparse / dense vector, the action never fails. Seperator is comma, semicolon or space
[V1|V2]=math/blas/vector/parse("1,2,3","7,8,9,10,12","dense|dense");
See
Source Code
math/blas/vector/set
set a single element of a vector.
Description
The first argument is the index, the second argument the value and all other arguments are vector objects, the action never fails
math/blas/vector/assign(3,5.3,Vector1,[Vector2,[Vector3]]);
See
Source Code
math/blas/vector/sum
returns sum of a vector.
Description
Calculates for each input vector the sum and returns the value, the action never fails
[S1|S2]=math/blas/vector/sum(V1,V2);
See
Source Code
math/blas/vector/tolist
converts a vector to a list.
Description
The action creates lists of each input vector, the action never fails
[L1|L2|L3]=math/blas/vector/tolist(Vector1,[Vector2,Vector3]);
See
Source Code

math/interpolate

math/interpolate/create
action to create a spline interpolation.
Description
The action creates an interpolation object, the first is the type of interpolation (akima, divideddifference, linear, loess, neville), and all other number arguments are the the base values for interpolation, the first $ \frac{n}{2} $ are x-values the other $ \frac{n}{2} $ values are the y-values
PI=math/interpolate/create("akima|divideddifference|linear|loess|neville",[-5,1,2,8,14],[7,3,7,4,8]);
See
https://en.wikipedia.org/wiki/Polynomial_interpolation
https://en.wikipedia.org/wiki/Divided_differences
https://en.wikipedia.org/wiki/Linear_interpolation
https://en.wikipedia.org/wiki/Local_regression
https://en.wikipedia.org/wiki/Neville%27s_algorithm
Source Code
math/interpolate/multipleinterpolate
action to create interpolated values.
Description
The action interpolates a single value, the first argument is the value (x-position), all other interpolating functions, the action never fails interpolation
[A|B|C]=math/interpolate/multipleinterpolate(5,InterpolatingFunction1,[InterpolatingFunction2,[InterpolatingFunction3]]);
See
https://en.wikipedia.org/wiki/Polynomial_interpolation
Source Code
math/interpolate/singleinterpolate
action to create interpolated values.
Description
The action interpolates values, the first argument is the interpolating function, all other number values (x-position) for interpolation
[A|B|C]=math/interpolate/singleinterpolate(InterpolatingFunction,3,[10,[50]]);
See
https://en.wikipedia.org/wiki/Polynomial_interpolation
Source Code

math/linearprogram

math/linearprogram/create
action to create a linear program.
Description
This action creates the linear program with the objective functions $ \left( \sum_{i=1} c_i \cdot x_i \right) + d $, the first $ n-1 $ arguments are the $ c_i $ values (coefficients) and the last argument is the $ d $ value (constant) of the objective function, the action is never failing
LP=math/linearprogram/create(1,2,[3,[4,5]],10);
See
https://en.wikipedia.org/wiki/Linear_programming
http://commons.apache.org/proper/commons-math/userguide/optimization.html
Source Code
math/linearprogram/equationconstraint
add a linear equation constraint to the LP.
Description
The arguments of the action contains the left and right side of the equation:
  • $ \left( \sum_{i=1} c_i \cdot x_i \right) + c_{const} = \left( \sum_{i=1} r_i \cdot x_i \right) + r_{const} $
  • $ \left( \sum_{i=1} c_i \cdot x_i \right) + c_{const} \geq \left( \sum_{i=1} r_i \cdot x_i \right) + r_{const} $
  • $ \left( \sum_{i=1} c_i \cdot x_i \right) + c_{const} \leq \left( \sum_{i=1} r_i \cdot x_i \right) + r_{const} $
The first arguments is the LP object, the following arguments are the $ c_i $ values, after that the $ c_{const} $ value must be added, in the middle of the arguments the relation symbol ( $ = $, $ \geq $ or $ \leq $) must be set as string, after that all $ r_i $ elements must be set and the last argument is the $ r_{const} $, the action fails on wrong input
math/linearprogram/equationconstraint(LP,[2,7,[7,12,[19]]],"<",[1,2],3,5);
See
https://en.wikipedia.org/wiki/Linear_programming
http://commons.apache.org/proper/commons-math/userguide/optimization.html
Source Code
math/linearprogram/solve
solves the linear program and returns the solution.
Description
The action solves the linear program and returns the solution. The first argument is the linear program, all other arguments can be a number or a string with the definition:
  • maximize / minimize defines the optimization goal
  • non-negative defines all variables with non-negative values
  • number is the number of iteration for solving
The return arguments are at the first the value, second the number of all referenced $ x_i $ points and after that all arguments the values of $ x_i $
[Value|CountXi|Xi]=math/linearprogram/solve(LP,"maximize","non-negative");
See
https://en.wikipedia.org/wiki/Linear_programming
http://commons.apache.org/proper/commons-math/userguide/optimization.html
Source Code
math/linearprogram/valueconstraint
add a linear value constraint to the LP.
Description
The action create a value constaint with one of the definitions:
  • $ \sum_{i=1} c_i \cdot x_i = v $
  • $ \sum_{i=1} c_i \cdot x_i \geq v $
  • $ \sum_{i=1} c_i \cdot x_i \leq v $
the first $ n-2 $ arguments are the $ c_i $, the $ n-1 $ argument ist the relation symbol ( $ = $, $ \geq $ or $ \leq $) as string and the last value is the $ v $ value and the action never fails
math/linearprogram/valueconstaint(LP,[2,5,[7,8,[9]]],"<",100);
See
https://en.wikipedia.org/wiki/Linear_programming
http://commons.apache.org/proper/commons-math/userguide/optimization.html
Source Code

math/shape

math/shape/incircle
action check if a point is within a circle.
Description
The action checks if a point is within a circle, the first three arguments defines the circle (x- / y-position and radius), all other arguments will be used as tuples (x- / y-position) which defines the point, the action fails on wrong input
[In1|In2]=math/shape/incircle(1,1,1,2,2.5,[3,4]);
See
Source Code
math/shape/inrectangle
action check if a point within a rectangle.
Description
The first four arguments descripes the rectangle (left-upper corner x- / y-postion, right-bottom corner x- / y-position), all other arguments will used as tuples with x- / y-position and will be checked to the rectangle, the action fail on wrong input
[In1|In2]=math/shape/inrectangle(10,100,110,10,40,55,120,110);
See
Source Code
math/shape/intriangle
action check if a point is within a triangle.
Description
The first three tuple of arguments defines the triangle coordinate (x- / y-position), all other tuples are the tuples of x- / y-position, the action fails on wrong input
[In1|In2]=math/shape/intriangle([[350,320],[25,375],40,55],[160,270],0,0);
See
https://en.wikipedia.org/wiki/Barycentric_coordinate_system
Source Code

math/statistic

math/statistic/addstatisticvalue
action to push a values to the statistic object.
Description
The actions adds the given argument number values to each statistic objects within the arguments, the ordering of values and statistic object is free, each value will be added to each statistic object and the action fails on a wrong input, only number and statistic objects are allowed
math/statistic/addstatisticvalue(StatisticObject1,[1,2,3,StatisticObject2],1,5,8,StatisticObject3);
See
Source Code
math/statistic/clearstatistic
action to clears the statistic.
Description
The actions clears statistic objects, so all arguments must be statistic objects
math/statistic/clearstatistic(Statistic1,[Statistic2,[Statistic3]]);
See
Source Code
math/statistic/createdistribution
creates a distribution object.
Description
The action creates a distribution objects, with an individual pseudo-random generator and different distribution paramter, the action never fails, the following distributions are supported with the following number of numeric arguments
  • beta distribution with 2 arguments ( $ \alpha $ and $ \beta $)
  • cauchy distribution with 2 arguments (media and scale)
  • chi-square distribution with 1 argument (degree off freedom)
  • exponential distribution with 1 argument (mean)
  • f distribution with 2 arguments (degrees of freedom, denominator degrees of freedom)
  • gamma distribution with 2 arguments (shape and scale)
  • gumble distribution with 2 arguments ( $ \mu $ and $ \beta $)
  • laplace distirbution with 2 arguments ( $ \mu $ and $ \beta $)
  • levy distirbution with 2 arguments ( $ \mu $ and $ c $)
  • logistic distirbution with 2 arguments ( $ \mu $ and $ s $)
  • lognormal distirbution with 2 arguments (scale and shape)
  • nakagami distribution with 2 arguments ( $ \mu $ and $ \omega $)
  • normal distribution with 2 arguments (expected value, variance)
  • pareto distribution with 2 arguments (scale and shape)
  • t distribution with 1 argument (degrees of freedom)
  • triangular distribution with 3 arguments (a, b, c)
  • uniform distribution with 2 arguments (lower and upper)
  • weibull distribution with 2 arguments ( $ \alpha $ and $ \beta $)
The following pseudo-random number generators are supported:
  • mersennetwister (default)
  • synchronizedmersennetwister
  • isaac
  • synchronizedisaac
  • internal
  • synchronizedinternal
  • well512a
  • synchronizedwell512a
  • well1024a
  • synchronizedwell1024a
  • well19937a
  • synchronizedwell19937a
  • well19937c
  • synchronizedwell19937c
  • well4449a
  • synchronizedwell4449a
  • well44497b
  • synchronizedwell44497b
[D1|D2]=math/statistic/createdistribution("normal",20,10,["beta","isaac",[8,12]]);
See
https://en.wikipedia.org/wiki/Beta_distribution
https://en.wikipedia.org/wiki/Cauchy_distribution
https://en.wikipedia.org/wiki/Chi-squared_distribution
https://en.wikipedia.org/wiki/Exponential_distribution
https://en.wikipedia.org/wiki/F-distribution
https://en.wikipedia.org/wiki/Gamma_distribution
https://en.wikipedia.org/wiki/Gumbel_distribution
https://en.wikipedia.org/wiki/L%C3%A9vy_distribution
https://en.wikipedia.org/wiki/Logistic_distribution
https://en.wikipedia.org/wiki/Log-normal_distribution
https://en.wikipedia.org/wiki/Nakagami_distribution
https://en.wikipedia.org/wiki/Normal_distribution
https://en.wikipedia.org/wiki/Pareto_distribution
https://en.wikipedia.org/wiki/Student%27s_t-distribution
https://en.wikipedia.org/wiki/Triangular_distribution
https://en.wikipedia.org/wiki/Uniform_distribution_(continuous)
https://en.wikipedia.org/wiki/Weibull_distribution
Source Code
math/statistic/createstatistic
action to create a statistic.
Description
The action creates statistic objects to collect data, each argument must be a string with "summary" or "descriptive" for a summary or descriptive statistic object, on no arguments a summary statistic object is created, the action never fails
[S1|S2]=math/statistic/createstaistic("summary",["descriptive"]);
See
http://commons.apache.org/proper/commons-math/userguide/stat.html
Source Code
math/statistic/exponentialselection
action to define a fitness-proportinate-selection mechanism.
Description
The action defines a fitness-proportinate-selection based on an exponential distribution, the first and second argument must be a list, the first list contains elements, the second list contains numeric values for defining the weights, the third argument is the demand / rational factor
S=math/statistic/exponentialselection(["a","b","c","d"],[0.5,0.7,0.9,3],RationalFactor);
See
https://en.wikipedia.org/wiki/Boltzmann_distribution
https://en.wikipedia.org/wiki/Log-linear_model
Source Code
math/statistic/linearselection
action to define a exponential fitness-proportinate-selection mechanism.
Description
The action defines a fitness-proportinate-selection based on a linear distribution, the first and second argument must be a list, the first list contains elements, the second list contains numeric values for defining the weights
S=math/statistic/linearselection(["a","b","c","d"],[0.5,0.7,0.9,3]);
See
https://en.wikipedia.org/wiki/Fitness_proportionate_selection
Source Code
math/statistic/multiplepercentile
returns percentile value.
Description
gets percentile value in $[0,100]$ from the statistic, the action fails on wrong input
[V1|V2|V3]=math/statistic/multiplepercentile(Statistic,50,[25,75]);
See
Source Code
math/statistic/multiplestatisticvalue
gets multiple statistic values of a single statistic object.
Description
The action returns different statistic values from a single statistic object, the first argument is the statistic object, all other values are string with statistic value names: geometricmean, max, min, count, populationvariance, quadraticmean, secondmoment, standarddeviation, sum, sumlog, sumsquare, variance, mean, kurtiosis
[SStd|SVar|SMean]=math/statistic/multiplestatisticvalue(Statistic,"standarddeviation","variance","mean");
See
Source Code
math/statistic/randomsample
create a (set) of random values.
Description
The action creates a set or single random value based on a distirbution, the first argument is the distirbution and all other arguments defines the size of the samples
[R1|R2]=math/statistic/randomsample(Distribution,1,5);
See
Source Code
math/statistic/randomsimple
create a (set) of simple random values.
Description
Returns single or a list of random (uniform distributed) values, all arguments are the number of returning values, if the argument number is 1 a single random value is returned, is the number greater than 1 a list of values is returned
[V1|L1|V2|L2]=math/statistic/randomsimple(1,5,1,10);
See
Source Code
math/statistic/singlepercentile
returns for any static object a percentile value.
Description
The actions reutnrs for any statistic value the given percentile value and the action fails on wrong input
[V1|V2|V3]=math/statistic/multiplepercentile(2,Statistic1,[Statistic2,Statistic3]);
See
Source Code
math/statistic/singlestatisticvalue
gets a single statistic value of multiple statistic objects.
Description
The action returns for each statistic object the statistic value, the first argument is a string with the statitic value name (geometricmean, max, min, count, populationvariance, quadraticmean, secondmoment, standarddeviation, sum, sumlog, sumsquare, variance, mean, kurtiosis) all other arguments are statistic objects
[V1|V2|V3]=math/statistic/getstatisticvalue("mean|min|max|...",Statistic1,[Statistic2,Statistic3]);
See
Source Code

storage

storage/add
adds or overwrites an element in the agent-storage.
Description
The action adds all tuples into the storage, the arguments are tuples of a name and any value, the action never fails
storage/add("foo",X,"bar",Y);
See
Source Code
storage/clear
removes all elements of the storage.
Description
The action removes all elements from the storage except the elements wich are forbidden, the action never fails
storage/clear();
See
Source Code
storage/exists
check if an element exists within the agent-storage.
Description
The action checks if an element is within the action and returns the boolean flag, the action never fails
[A|B]=storage/exist("foo","bar");
See
Source Code
storage/remove
removes an element by name from the storage.
Description
The actions removes any value from the storage which is referenced by the key and returns the value, the action never fails
[A|B]=storage/remove("foo","bar");
See
Source Code

string

string/base64decode
action to decodes a string with Base64.
Description
The decoded string version is created from each string argument, which is based64 encoded, the action fails on decoding error. Return null on encoding errors
[A|B]=string/base64decode("aGVsbG8=","QWdlbnRTcGVhayhMKysp");
See
https://en.wikipedia.org/wiki/Base64
Source Code
string/base64encode
action to encodes a string with Base64.
Description
The base64 encoded version is created from each string argument, the action never fails
[A|B]=string/base64encode("Hello","AgentSpeak(L++)");
See
https://en.wikipedia.org/wiki/Base64
Source Code
string/concat
action to concat / join all strings.
Description
All string arguments will be join to a single result, the action never fails
S=string/concat("A","B","C");
See
Source Code
string/contains
action to check string for containing another string.
Description
The action checks the first string argument if it contains all other arguments, but it returns the boolean result for each argument, the action never fails
[L1|L2]=string/contains("thisisalongstring","long","string");
See
Source Code
string/endswith
action to check string for ends-with.
Description
The acion checks the string, that is the first argument, with each other arguments for the operation ends-with, the action never fails
[L1|L2]=string/endswith("thisisalongstring","longstring","string");
See
Source Code
string/levenshtein
calculates the levenshtein distance.
Description
The action returns the levenshtein distance between string inputs, for the first string argument the distance will be calculated to the rest, if there are numerical arguments the first will be used for the inserting weight, second replace weight and third for the delete weight, the action fails on wrong input
[A|B]=string/levenshtein(1,1.5,3,"start","end","starting");
See
https://en.wikipedia.org/wiki/Levenshtein_distance
Source Code
string/lower
action to create a lower-case string.
Description
All arguments of the action will change to a lower-case string and the action never fails
[A|B|C|D]=string/lower("AbC","Ef",["de","XyZ"]);
See
Source Code
string/ncd
calculates the normalized-compression-distance.
Description
The action calculates the normalized-compression-distance between string, if the first argument matches a compression algorithm ( BZIP | GZIP | DEFLATE | PACK200 | XZ ), it will be used for defining the compression, the next string argument will be the input string and the distances will be calculated between the second and all other arguments, the action fails on wrong input
[A|B]=string/ncd("BZIP|GZIP|DEFLATE|PACK200|XZ","foobar","testfoo","barfoo");
See
https://en.wikipedia.org/wiki/Normalized_compression_distance
Source Code
string/random
action to create random strings, with a definied length.
Description
The first argument are the characters, that will be used to create the string, all other arguments are numbers to present the length of the returning string and the action never fails
[A|B|C]=string/random("abdefgXYZUI",5,3,6);
See
Source Code
string/replace
action to replace all occurence within a string.
Description
The action replaces the first argument with the second argument on each string beginning at the third argument and returns all replaced strings, the action never fails. The first argument of the action be defined as a regular expression
[A|B]=string/replace("search","replacewith","thisisasearchstring","thisisanotherstring");
See
https://en.wikipedia.org/wiki/Regular_expression
Source Code
string/reverse
action to reverse a string.
Description
The action reverse each argument string and returns the reversed string, the action never fails
[A|B|C]=string/reverse("FooBar",["ABBA","Eevee"]);
See
Source Code
string/size
action to get the string length.
Description
For each argument the string length will be returned and the action never fails
[A|B|C]=string/size("A",["CC","XYZ"]);
See
Source Code
string/startswith
action to check string for starts-with.
Description
The acion checks the string, that is the first argument, with each other arguments for the operation starts-with, the action never fails
[L1|L2]=string/startswith("thisisalongstring","longstring","string");
See
Source Code
string/upper
action to create an upper-case string.
Description
All arguments of the action will change to a upper-case string and the action never fails
[A|B|C|D]=string/upper("AbC","Ef",["de","XYZ"]);
See
Source Code

web/graphql

web/graphql/queryliteral
action to run graphql query by a literal.
Description
The calls the data of a graphql service and returns a literal based on the query result, the input argument is at the first position the graphql service url, the second argument a literal, which defines the query structure and all other arguments the literal functor structure. The action fails on connection and parsing errors.
L=generic/type/parseliteral("allUsers(id,firstName,lastName)");GQ=web/graphql/queryliteral("https://fakerql.com/graphql",L,"graphql-fake");
See
http://graphql.org/
Source Code
web/graphql/querynative
action to run a graphql query by a native graphql query.
Description
The calls the data of a graphql service and returns a literal based on the query result, the input argument is at the first position the graphql service url, the second argument a string with a grapqhl query structure, and all other arguments the literal functor structure. The action fails on connection and parsing errors.
GQ=web/graphql/querynative("https://fakerql.com/graphql",'{Product(id:"cjdn6szou00dw25107gcuy114"){idpricename}}',"graphql-fake");
See
http://graphql.org/
Source Code

web/rest

web/rest/jsonlist
action for calling a restful webservice with a JSON object list.
Description
Creates a literal based on an JSON webservice data, the first argument is the URL of the webservice, all other arguments are the literal elements of the returning literal, the webservice must return a JSON list and the last argument will used to encapsulate the list elements
W=web/rest/jsonlist("https://api.github.com/repos/LightJason/AgentSpeak/commits","github","elements");
See
https://en.wikipedia.org/wiki/Representational_state_transfer
https://en.wikipedia.org/wiki/Web_service
https://en.wikipedia.org/wiki/JSON
Source Code
web/rest/jsonobject
action for calling a restful webservice with a JSON object.
Description
Creates a literal based on an JSON webservice data, the first argument is the URL of the webservice, all other arguments are the literal elements of the returning literal, the webservice must return a JSON object
W=web/rest/jsonobject("https://maps.googleapis.com/maps/api/geocode/json?address=Clausthal-Zellerfeld","google","location");
See
https://en.wikipedia.org/wiki/Representational_state_transfer
https://en.wikipedia.org/wiki/Web_service
https://en.wikipedia.org/wiki/JSON
Source Code
web/rest/xmlobject
action to call a restful webservice with XML data.
Description
Creates a literal from an XML REST-webservice, first argument is the URL of the webservice and second argument the functor of the literal
W=web/rest/xmlobject("https://en.wikipedia.org/wiki/Special:Export/AgentSpeak","wikipedia");
See
https://en.wikipedia.org/wiki/Representational_state_transfer
https://en.wikipedia.org/wiki/Web_service
https://en.wikipedia.org/wiki/XML
Source Code