https://svn.lrde.epita.fr/svn/xrm/trunk
Index: ChangeLog
from SIGOURE Benoit <sigoure.benoit(a)lrde.epita.fr>
Use libxtclib instead of liblib.
See
https://bugs.cs.uu.nl/browse/STR-564.
Actually we can't use libstratego-xtc at the moment, since it hasn't
made it to strc 0.16 and we target this version of the compiler ATM.
In the future we shall update the imports as commented in FIXMEs.
* src/tools/parse-xrm.str: Import libxtclib instead of liblib.
* src/tools/parse-prism.str,
* src/tools/pp-xrm.str,
* src/tools/pp-prism.str,
* src/lib/xrm/pp/xrm-to-abox.str,
* src/lib/prism/pp/prism-to-abox.str,
* src/str/xrm-front.str: Ditto.
* tests/xrm/array_with_static_dim.xpm: New.
* tests/xrm/desugar_builtins.pm: Move...
* tests/prism/desugar_builtins.pm: Here.
* TODO: More things to do...
TODO | 9 +++++++++
src/lib/prism/pp/prism-to-abox.str | 2 +-
src/lib/xrm/pp/xrm-to-abox.str | 2 +-
src/str/xrm-front.str | 3 +--
src/tools/parse-prism.str | 2 +-
src/tools/parse-xrm.str | 2 +-
src/tools/pp-prism.str | 2 +-
src/tools/pp-xrm.str | 2 +-
tests/xrm/array_with_static_dim.xpm | 5 +++++
9 files changed, 21 insertions(+), 8 deletions(-)
Index: src/tools/parse-xrm.str
--- src/tools/parse-xrm.str (revision 39)
+++ src/tools/parse-xrm.str (working copy)
@@ -2,7 +2,7 @@
module parse-xrm
imports
- liblib
+ libxtclib // FIXME: import libstratego-xtc for strc 0.17
tool-doc
parser-common
Index: src/tools/parse-prism.str
--- src/tools/parse-prism.str (revision 39)
+++ src/tools/parse-prism.str (working copy)
@@ -2,7 +2,7 @@
module parse-prism
imports
- liblib
+ libxtclib // FIXME: import libstratego-xtc for strc 0.17
tool-doc
parser-common
Index: src/tools/pp-xrm.str
--- src/tools/pp-xrm.str (revision 39)
+++ src/tools/pp-xrm.str (working copy)
@@ -2,7 +2,7 @@
module pp-xrm
imports
- liblib
+ libxtclib // FIXME: import libstratego-xtc for strc 0.17
tool-doc
strategies
Index: src/tools/pp-prism.str
--- src/tools/pp-prism.str (revision 39)
+++ src/tools/pp-prism.str (working copy)
@@ -2,7 +2,7 @@
module pp-prism
imports
- liblib
+ libxtclib // FIXME: import libstratego-xtc for strc 0.17
tool-doc
strategies
Index: src/lib/xrm/pp/xrm-to-abox.str
--- src/lib/xrm/pp/xrm-to-abox.str (revision 39)
+++ src/lib/xrm/pp/xrm-to-abox.str (working copy)
@@ -1,6 +1,6 @@
module xrm-to-abox
imports
- liblib
+ libxtclib // FIXME: import libstratego-xtc for strc 0.17
tool-doc
Box
XRM // signature
Index: src/lib/prism/pp/prism-to-abox.str
--- src/lib/prism/pp/prism-to-abox.str (revision 39)
+++ src/lib/prism/pp/prism-to-abox.str (working copy)
@@ -1,6 +1,6 @@
module prism-to-abox
imports
- liblib
+ libxtclib // FIXME: import libstratego-xtc for strc 0.17
tool-doc
Box
PRISM // signature
Index: src/str/xrm-front.str
--- src/str/xrm-front.str (revision 39)
+++ src/str/xrm-front.str (working copy)
@@ -1,7 +1,7 @@
module xrm-front
imports
- liblib
+ libxtclib // FIXME: import libstratego-xtc for strc 0.17
tool-doc
xrm-to-prism
prism-desugar
@@ -23,7 +23,6 @@
; xtc-transform(!"parse-xrm", // parse input (returns a FILE)
<concat>[ ["-b"], <pass-verbose>(),
<pass-add-pos>() ])
; read-from // read parsed input
- ; /*FIXME*/strip-annos // FIXME: remove this line!!!!!!!!!!!!!!!!!!!!!!!!!!
; xrm-front-pipeline // transformations
; if not(must-keep-attributes) then strip-annos end
; if <get-config> "-b" then
Index: tests/xrm/array_with_static_dim.xpm
--- tests/xrm/array_with_static_dim.xpm (revision 0)
+++ tests/xrm/array_with_static_dim.xpm (revision 0)
@@ -0,0 +1,5 @@
+const int N = 10;
+
+module test
+ s[N] : [0..1];
+endmodule
Index: TODO
--- TODO (revision 39)
+++ TODO (working copy)
@@ -48,6 +48,10 @@
declared variables (globals, formulas, local declarations etc.) and ensure
(in check-meta-vars) that their identifiers are unique.
+ * Add a "rand" builtin. Eg:
+ rand(50) -> random value between 0 and 50 (included)
+ rand(42, 50) -> random value between 42 and 50 (included)
+
* Add a sanity check after xrm-front has finished to generate everything in
order to ensure that each module/var decl has a unique name.
@@ -94,6 +98,11 @@
x[3] : [0..4] init {0, 1, 2};
const int array[3] = {0, 1, 2};
+ * Add a possibility to import another module, eg: import common.pm
+ A module can be imported only once.
+
+ * Add parameterized formulas. (Pretty much like macro-functions in C)
+
## -------------- ##
## Desugarisation ##
## -------------- ##