New Page
= operator in Free Form Programming Language

Confidential, unauthorized access forbidden.
CCN Studios internal proprietary software documentation.
𝞪3.0

Synopsis
-
Generally speaking the operation of the operator = in most programming languages is to copy the value/address from the rhs expression to the lhs variable. The said value is singleton and multiple copied values require multiple usage of = operator.
-
In commercial programming languages the operator = has merely the lifespan of a program execution session or scope of a function. Upon termination of the program or the return of the function no residues of the = operations remain.
= operator in Free Form language operates on its operands according to the following:
- To copy from rhs to lhs is optional for = . Such a specific rhs copy to lhs is adequate for algebraic or math like procedures e.g. num = cos[x]; num is understood to be a single value and cos[ ] single-value function.
- = copies certain interim computations in its expression into one or multiple separate Persistent Cloud Objects as opposed to simply copying the rhs to lhs, since both the lhs and rhs are Free to be spread over multiple cloud systems!
- For large geometric objects their values are first Serialized and then copied over the network since the local programming space and its memory quota could be limited and often it is more efficient to spread the computing amongst as many cloud objects as possible.
- Once the program exits and the session ceases, the operator = can still operate on its operands by a number of other processes and processors which will be detailed later.
- 💡Automated compression performed on variables whose content exceeds a certain watermark on byte size.
- 💡For many variables the compression has been used to Serialize the content. As it turned out the standard compression algorithms are perfect as Serializers for difficult binary variable values.
Evaluation
The main evaluator for the composite expressions of the form a = expr; where the rhs is any customary combinations of operators and functions and variables and constants, is called CCNffEqualExpr[ ] which includes number of processors in its body (+130 grammars/evaluators):
- Each processor is a separate cloud object which deposits its scripts and data into the Evaluator
- The level-0 String Rewriting occurs where the Free Form language functions and operators are replaced/rewritten by the actual internal functions available to the evaluator
- At the top of the body it parses and evaluates the double quote strings "ellipse" and double-double quotes "\"ellipse\"" and "http…" strings. Those evaluated are added to the program memory subsystem thus accessible by GetSortedVars[ ] cloud function and the rest of the body of the evaluator is bypassed and finally exit. Those strings and double-double quote strings continue with the evaluator for further processing
- The evaluator also processes string structures which contain grammatical Fee Form expressions e.g. c = circle of radius 2.01 at center = {x0,y0,z0};
The said processors, one after the other, in a smart and applicable sequence of grammar parsers evaluate this string to dismiss or process to transform to a new expression or string acceptable to the Free Form Grammarian. These are in part considered as string or term rewriting operations.
- At strategic locations the evaluator parses the latest version of the parsed expression and isolates symbols.
- While parsing certain functions and operators are placed in Hold or Inactive states
- The level-1 String Rewriting: finally once all the grammars and parsers and processors are exhausted a repeated string replacement loop runs and until there will be no more string replacements possible. At such an ending the Hold states are released and the held expressions, now re-written, are evaluated one last time.
- One last time the completed parsed expressions are scanned for symbols
- Any individual variables with values are added to the Free Form memory subsystems
- Applicable Path variables are constructed and made available to the GetSortedVars[ ] cloud function
Oddity [Experimental]
A mathematician has no problem writing:
Yet in most commercial programming languages this statement returns an error stating that the numeral 5 cannot be reset in value. Indeed in mathematics the = operator is considered commutative in the sense a=b ⟺ b=a .
The Free Form programming language allows without any warnings or anomalies the number 5 set equal to any expression e.g. a trig expression in this case! Therefore, afterwards anywhere in the code the string “(5)” will be replaced by the string “sin[x+pi/6]” ! This was conceived to allow for de novo indexing functions and it is hoped that this feature will be released soon.
Example
Simplest = operator usage:
transforms to the following variable-to-value map in Serialized string form:
The Free Form Programming Language’s code symbolic engine exclusively relies on String and Term Rewriting systems:
- All expressions are required to serialize and matched for Rewriting against the variables in the execution history of the program
- In order not to replace the “y” in “boy” by “5” all expressions are parenthesized at post = action on its operands. And in order to replace the “5” in “25” again once operated upon by = the 5 is parenthesized as “(5)” .
Theorem: The Free Form Programming Language is Turing compatible.
Proof: Since this language can execute any String Rewriting system, it can also execute any Universal String Rewriting systems which simulate the Universal Turing machines.□
Example
The lhs is sin and the rhs is sin[.] and in Free Form language this is a customary occurrence! Since the = operator and its many grammars do not mix up the sin as function vs. sin as a variable.
Output:
The following script models the sin [ ] as function and again “sin” as a return value:
For example:
“num”→ ☁️ denotes the string variable name “num” maps to or points at the value of the variable num and the arrow points at ☁️ a specific location in CCN’s cloud systems.
☁️ : icon for the persistent cloud object
⇶ : denotes multi-arrow indicting a composite map
↪ : return arrow back to the variable in the program
Substantial effort was put into this particular aspect of the = operator in theFree Form Programming Language since to most newbies the return value for a function called foo[.] naturally should also be called foo!
This ability is specific to the = operator and it is a part of its construction.
Example
The Free Form function rock[ ] depending on its arguments constructs a 3D convex rock.
The = in this case transfers the following computations to their target memory systems:
- The texture value is copied to a cloud variable named “rock/texture”. This texture might simply be a name e.g. “glazed” or an image path e.g. “student/dara/myduck”
- Constant value "Mesh_Region3D" is copied to a cloud variable called “rock/type”
- Constant value True is copied to a cloud object called “rock/compressed”. This indicates the “rock/value” is a compressed form in ascii array of unsigned bytes.
- The computed convex rock’s triangular mesh is Serialized into ascii format JSON object and copied to cloud variable “rock/value”
- The string “rock” as a return value and copied to the variable with the same name and this deliberate as it will become clear soon
☁️: icon for the persistent cloud object
"a"→☁️: variable called “a”, its value is copied over the net into a cloud variable persisting in a cloud system
"a"→ a : string “a” is copied to the variable also called “a” but shown as a without ““ in the program text
The newmesh without the ““ is the return value to the variable currently running the program session called newmesh and the said value is its own name but in string format. This was necessary and unavoidable else the infamous Null return value automatically was assigned by the internal development programs.
The {} denotes a map as a functional map and in Free Form internal development language the cloud access API for this map is called
where the cred is the credential path necessary to authorize access e.g. “student/dara/myprogram” with the “group/user/script” format.
👉 Currently GetSortedVars [ name, cred ] works only for one particular program path cred. In order to access multiple program paths and their session variables multiple calls to GetSortedVars [ ] is required.
Each program has multiple persistent cloud objects each serves as a memory subsystem:
- Externals: this allows storage and retrieval of variables and data without requiring a particular program session or you might call it session-less cloud object for values external to all programs (these are not global variables)
- Master archive: cloud objects keep references (maps) to the allocated cloud objects which contain variables and data. Master archive is used for Admin e.g. deleting and freeing space for an existing program in case required for its recurring runs.
- Chains: linearly chained cloud objects for duplicate nested function compositions
- GetSortedVars_Expr [ name, cred ] a sibling of the functional GetSortedVars[ ] which maps the expressional variables e.g. nested functions or linked list-like variables.
- GetSortedVars_VarMaker [ name, cred ] another sibling of GetSortedVars[ ] which updates newly created variables as outputs of functions and operators
⚠️ Free Form Programming language might consolidate or even add additional cloud memory subsystems per new users’ needs and specifications without notice.
Example: Void functions
The argument c can be RGB list e.g. the constant list {0,1,1} or named color the constant string “cyan”.
It returns a fixed string "ffVoid" .
The argument c is copied to a cloud constant called “Color”.
→void means no value is returned to the program session.