@@ -117,26 +117,22 @@ void usage()
117117 std::cout << " \n " ;
118118 std::cout << " * A SBG program starts with a list (possibly empty) of\n " ;
119119 std::cout << " assignments, and then continues with a list (possibly\n " ;
120- std::cout << " empty) of expressions.\n " ;
120+ std::cout << " empty) of expressions, each one separated by a\n " ;
121+ std::cout << " semicolon." ;
121122 std::cout << " * Each assignment or expression should be ended with a\n " ;
122- std::cout << " semicolon ;\n " ;
123+ std::cout << " semicolon ;. \n " ;
123124 std::cout << " * All expressions defined in a SBG program should have the\n " ;
124- std::cout << " number of dimensions.\n " ;
125+ std::cout << " same number of dimensions.\n " ;
125126 std::cout << " * The first assignment of a SBG program should be\n " ;
126127 std::cout << " \" dims = k\" , where k is the number of the dimensions of\n " ;
127128 std::cout << " all elements defined in the SBG program. If it is\n " ;
128129 std::cout << " omitted then is considered to be 1.\n " ;
129- std::cout << " * Numerical (and only numerical) variables can be defined.\n " ;
130- std::cout << " through an assignment. It is forbidden to use a variable\n " ;
131- std::cout << " before its definition.\n " ;
130+ std::cout << " * It is forbidden to use a variable before its definition.\n " ;
132131 std::cout << " * Variable names should start with a letter, and then\n " ;
133132 std::cout << " alfanumeric characters (including \" _\" ) can be used.\n " ;
134133 std::cout << " The variable name \" x\" is forbidden, to preserve it\n " ;
135134 std::cout << " for linear expressions. As explained above, \" dims\"\n " ;
136135 std::cout << " is also reserved.\n " ;
137- std::cout << " * Linear expresssions should include a numeric value for\n " ;
138- std::cout << " its slope. That is, to express a constant expression\n " ;
139- std::cout << " it should be written as: 0*x+h.\n " ;
140136 std::cout << " * Both intervals and linear expressions will be parsed as\n " ;
141137 std::cout << " their multi-dimensional counterparts.\n\n " ;
142138
@@ -157,26 +153,39 @@ void usage()
157153 std::cout << " files can be analyzed. Also /test files can be consulted\n " ;
158154 std::cout << " to start writing basic SBG programs.\n\n " ;
159155
160- std::cout << " \n A comprehensive list of the available functions to call on SBG"
161- << " elements,\n with a short description of the permitted arguments is" ;
162- std::cout << " as follows:\n " ;
156+ std::cout << " A brief list of available operators:\n " ;
157+ std::cout << " * Arithmetic expressions: +, -, *, /.\n " ;
158+ std::cout << " * SBG expressions:\n " ;
159+ std::cout << " - For linear expressions and maps: + and -.\n " ;
160+ std::cout << " - For containers (intervals, MDIs, sets): /\\ \n " ;
161+ std::cout << " (intersection), \\ / (union), \\ (difference),\n " ;
162+ std::cout << " \' (complement).\n " ;
163+ std::cout << " * Relational operators for any expression: <, == (equality)." ;
164+ std::cout << " \n\n " ;
165+
166+ std::cout << " \n A comprehensive list of the available functions to call on"
167+ << " SBG elements,\n with a short description of the correct types for"
168+ << " arguments is as follows\n (a container is either an interval, a mdi or"
169+ << " a set):\n\n " ;
163170 std::cout << " - isEmpty: check if container is empty\n " ;
164- std::cout << " --> isEmpty(interval) | isEmpty(set)\n " ;
165- std::cout << " \n - isMember: check if an element belongs to a container\n " ;
166- std::cout << " --> isMember(nat, interval)\n " ;
171+ std::cout << " --> isEmpty(container)\n " ;
167172 std::cout << " \n - minElem: minimum element of a container\n " ;
168- std::cout << " --> minElem(interval) | minElem(set )\n " ;
173+ std::cout << " --> minElem(container )\n " ;
169174 std::cout << " \n - maxElem: maximum element of a container\n " ;
170- std::cout << " --> maxElem(interval) | maxElem(set )\n " ;
175+ std::cout << " --> maxElem(container )\n " ;
171176 std::cout << " \n - compose: composition of expressions or maps\n " ;
172177 std::cout << " --> compose(lexp, lexp) | compose(mdlexp, mdlexp)\n " ;
173178 std::cout << " | compose(map, map) | compose(pw, pw)\n " ;
174- std::cout << " \n - inv: calculate the inverse of an expression.\n " ;
179+ std::cout << " \n - inv: calculate the inverse of an expression or map .\n " ;
175180 std::cout << " If the expression is constant in some dimension, returns\n " ;
176- std::cout << " inf-inf there\n " ;
177- std::cout << " --> inv(lexp) | inv(mdlexp)\n " ;
178- std::cout << " \n - image: return the image for a set of elements of the domain" ;
179- std::cout << " \n --> image(set, map) | image(set, pw)\n " ;
181+ std::cout << " inf-inf there. If the argument is a map, it should be\n " ;
182+ std::cout << " bijective.\n " ;
183+ std::cout << " --> inv(lexp) | inv(mdlexp) | inv(map) | inv(pw)\n " ;
184+ std::cout << " \n - image: return the image for a set of elements of the\n " ;
185+ std::cout << " domain. If no subdomain is specified, the whole domain\n " ;
186+ std::cout << " is used." ;
187+ std::cout << " \n --> image(map) | image(pw) | image(set, map) " ;
188+ std::cout << " | image(set, pw)\n " ;
180189 std::cout << " \n - preImage: return the pre-image for a set of elements in the\n " ;
181190 std::cout << " image of the map\n " ;
182191 std::cout << " --> preImage(set, map) | preImage(set, pw)\n " ;
0 commit comments