annotate boolean.rhope @ 75:0083b2f7b3c7

Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
author Mike Pavone <pavone@retrodev.com>
date Tue, 06 Jul 2010 07:52:59 -0400
parents 38d9cd036d49
children ac5c2d78663f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
68
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2 Generate Boolean Methods[backend:out]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 {
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 func,inval <- [[[[[backend]Create Function["If@Boolean",("in"),("yes","no"),"rhope"]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5 ]Set Input Type[Type Instance["Boolean"], 0]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 ]Set Output Type[Type Instance["Boolean"], 0]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 ]Set Output Type[Type Instance["Boolean"], 1]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 ]Read Field["in", "Val"]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 ifyes <- [[[func]Instruction Stream
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 ]Move["in","yes"]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12 ]Set Null["no"]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 ifno <- [[[func]Instruction Stream
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15 ]Move["in","no"]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
16 ]Set Null["yes"]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
18 ffunc <- [[func]Do If[inval, ifyes]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
19 ]Do If[NotCond[inval], ifno]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
20
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
21 out <- [backend]Store Function[ffunc]
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
22 }
38d9cd036d49 Add missing file
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
23