Created
November 27, 2019 11:48
-
-
Save okram/b2c82dc9e720b9b122b1b7324d167057 to your computer and use it in GitHub Desktop.
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
/* | |
The [explain] instruction builds a pretty-printable table of the | |
incoming object's instruction sequence's domains and ranges. | |
Every object has a "maps from" (<=) instruction sequence. | |
Instances are mapped from [id]. (i.e. no instructions needed to create it). | |
*/ | |
~/software/mm-adt/vm/java bin/mmadt.sh | |
_____ _______ | |
/\ | __ |__ __| | |
_ __ ___ _ __ ___ _____ / \ | | | | | | | |
| '_ ` _ \| '_ ` _ |_____/ /\ \| | | | | | | |
| | | | | | | | | | | / ____ \ |__| | | | | |
|_| |_| |_|_| |_| |_| /_/ \_\____/ |_| | |
mm-adt.org | |
mmlang> int => [plus,2][is,[mult,5][gt,12]][lt,31][is,true][explain] | |
bool{?} <= [plus,2][is,bool <= [mult,5][gt,12]][lt,31][is,true] | |
instruction domain range | |
------------------------------------------------- | |
[plus,2] int -> int | |
[is,bool <= [mult,5][gt,12]] int -> int{?} | |
[mult,5] int -> int | |
[gt,12] int -> bool | |
[lt,31] int{?} -> bool{?} | |
[is,true] bool{?} -> bool{?} | |
==>bool{?} <= [plus,2][is,bool <= [mult,5][gt,12]][lt,31][is,true] | |
mmlang> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment