This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
person[name:str~a,age:int~b]{*}~c =>[id] | |
| <=[=mongo][get,users] | |
| [is,[get,name][eq,a]] | |
| [map,[name:[get,'first'][plus,[get,'last']], | |
| age:2019-[get,'dob']]] | |
| | |
|-[-rule]([dedup]|[order]) => [id] | [count] => 100 | |
|-[-path][put,'c',c] | |
|-[-loop][is,[get,i][a,repeat]][incr] | |
|-[-akka][is,[get,remote]][put,c,akka[ip:127.0.0.1,port:2222]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// int is the input to [plus,2]. when executed, it is the output of [plus,2] | |
mmadt> int => [plus,2] | |
==>int <= [plus,2] | |
// => is like function call | |
mmadt> 5 => [plus,2] | |
==>7 | |
// if there is no input to the instruction, then nothing happens. | |
mmadt> 5 <= [plus,2] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmadt> [start,int][plus,10][is,[gt,3]][branch,[mult,20][minus,7][gt,4],[plus,30]] | |
==>bool{?} <= [is,[a,int]][plus,10][is,bool <= [is,[a,int]][gt,3]][mult,20][minus,7][gt,4] | |
==>int{?} <= [is,[a,int]][plus,10][is,bool <= [is,[a,int]][gt,3]][plus,30] | |
mmadt> [start,int][plus,10][is,[gt,3]] * ([mult,20][minus,7][gt,4] + [plus,30]) | |
==>bool{?} <= [is,[a,int]][plus,10][is,bool <= [is,[a,int]][gt,3]][mult,20][minus,7][gt,4] | |
==>int{?} <= [is,[a,int]][plus,10][is,bool <= [is,[a,int]][gt,3]][plus,30] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// type checking/inference | |
// The result is the compiled bytecode which shows the types for nested sequences | |
mmadt> obj{0} <= [start,int][plus,5][mult,5][is,[gt,5]][plus,100][is,[mult,45][minus,10][gt,0]] | |
==>int{?} <= [start,int][plus,5][mult,5][is,bool <= [gt,5]][plus,100][is,bool{?} <= [mult,45][minus,10][gt,0]] | |
// instance execution | |
// take the resultant instruction above and plug in 10 for int at the [start] | |
mmadt> int{?} <= [start,10][plus,5][mult,5][is,bool <= [gt,5]][plus,100][is,bool{?} <= [mult,45][minus,10][gt,0]] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Types in Tensors | |
// Types as "inclusion-predicates" or subspaces in {}-quantifier tensors // SIDENOTE: We need to be more strict on the quantifier ring -- ordered,ring,unity. max and min make life easier). | |
// mm-ADT instruction (mmlang 'assembly') | |
int{0,5} <= [start,int{5}][plus,5][mult,5][is,bool{5} <= [start,bool{5}][gt,5]][plus,100][is,bool{0,5} <= [start,int{0,5}][mult,45][minus,10][gt,0]] | |
// the above in "block form"-syntax | |
if(((int{5} + 5) * 5) > 5) { | |
bool{5} + 100 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_____ _______ | |
/\ | __ |__ __| | |
_ __ ___ _ __ ___ _____ / \ | | | | | | | |
| '_ ` _ \| '_ ` _ |_____/ /\ \| | | | | | | |
| | | | | | | | | | | / ____ \ |__| | | | | |
|_| |_| |_|_| |_| |_| /_/ \_\____/ |_| | |
mm-adt.org | |
mmadt> int{5} // 5 int tokens |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
EXPLAIN: int <= [start,3,5,6][plus,2][map,[plus,4][plus,[mult,1]][count]][count][sum][count] | |
[start,3,5,6]: int -> int{3} | |
[plus,2]: int{3} -> int{3} | |
[map,[plus,4][plus,[mult,1]][count]]: int{3} -> 1{3} | |
[plus,4]: int -> int | |
[plus,[mult,1]]: int -> int | |
[mult,1]: int -> int | |
[count]: int -> 1 | |
[count]: 1{3} -> 3 | |
[sum]: 3 -> 3 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Computing via Model Coupling | |
---------------------------- | |
/** | |
The obj in mm-ADT and the traverser in TP3 wrap some primitive data type and | |
decorate the primitive with extra computaitonal metadata. These decorations | |
transform what would be a regular expression into a more expressive structure (memory). | |
Here are the current "decorations" over obj in mm-ADT. | |
**/ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mmadt> int <= [start,int{4}][div,2][mult,7] | |
error: int does not support divison | |
mmadt> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_____ _______ | |
/\ | __ |__ __| | |
_ __ ___ _ __ ___ _____ / \ | | | | | | | |
| '_ ` _ \| '_ ` _ |_____/ /\ \| | | | | | | |
| | | | | | | | | | | / ____ \ |__| | | | | |
|_| |_| |_|_| |_| |_| /_/ \_\____/ |_| | |
mm-adt.org | |
mmadt> obj{0} <= [explain,int <= [start,1,2,3][plus,2][map,45][mult,2][sum][count][count]] |