Differences

This shows you the differences between two versions of the page.

Link to this comparison view

alf:teme:tema_en_3 [2018/04/23 23:29]
alexandru.radovici
alf:teme:tema_en_3 [2018/04/24 23:59] (current)
alexandru.radovici
Line 78: Line 78:
   * the variable declared in that context   * the variable declared in that context
   * the message declared in that context   * the message declared in that context
-  * the clases ​declared in that context+  * the classes ​declared in that context
   * the parent context id (position in the symbol_table array)   * the parent context id (position in the symbol_table array)
   * the type of the context (module or message)   * the type of the context (module or message)
Line 89: Line 89:
   * the main module ​   * the main module ​
   * a message definition   * a message definition
 +  * a class
 </​note>​ </​note>​
  
Line 145: Line 146:
       }       }
    },    },
-   "​functions": {},+   "​messages": {},
    "​types":​ {    "​types":​ {
       "​school":​ {       "​school":​ {
Line 176: Line 177:
 ==== Expression return type ==== ==== Expression return type ====
 For each of the following nodes, determine the return type For each of the following nodes, determine the return type
-  * expression+  * exp
   * value   * value
-  * id+  * identifier
   * return   * return
-  * element_of_array+  * element
   * property   * property
 +  * dispatch
  
 Set type the by adding a parameter type in the node. Set type the by adding a parameter type in the node.
Line 189: Line 191:
   * if it is a message context, search the local variables   * if it is a message context, search the local variables
   * if not found, search the parameters   * if not found, search the parameters
-  * if not found, search the module ​context local variables+  * if not found, search the class context local variables
  
   * if it is the module context, search the global variables   * if it is the module context, search the global variables
Line 197: Line 199:
 <code javascript>​ <code javascript>​
 {    {   
-   "​id":​ "expression",+   "​id":​ "exp",
    "​op":​ "​=",​    "​op":​ "​=",​
    "​left":​ {    "​left":​ {
-      "​id":​ "expression",+      "​id":​ "exp",
       "​op":​ "​mod",​       "​op":​ "​mod",​
       "​left":​ {       "​left":​ {
Line 502: Line 504:
 Bonus will be awarded only if all other tests pass. Bonus will be awarded only if all other tests pass.
 </​note> ​ </​note> ​
 +
 +===== Copying =====
 +
 +The homework is individual. Any attempt of copying will result in **0p** for the homework. Automated anti copying system will be used.
 +
 +
 +===== Questions =====
 +
 +If you have any questions related to the homework, please ask them by posting an issue on the github [[https://​github.com/​alexandruradovici/​alf2018.git|repository]] with the title format //​[calculator] <your question title>//​. You will need a github account for that.
 +
 +<note warning>
 +**DO NO POST ANY CODE**. This is considered copying and will result in a 0p homework for you.
 +</​note>​
 +
 +If you want to receive an email when issues are posted or when there are new messages, got to the github [[https://​github.com/​alexandruradovici/​alf2018|repository]] and click //Watch//.
   ​   ​
 ===== Testing ===== ===== Testing =====
Line 524: Line 541:
  
 <code bash> <code bash>
-wget https://​nodejs.org/​dist/​v6.10.0/node-v6.10.0-linux-x64.tar.xz +wget https://​nodejs.org/​dist/​v8.9.4/node-v8.9.4-linux-x64.tar.xz 
-tar xvfJ node-v6.10.0-linux-x64.tar.xz +tar xvfJ node-v8.9.4-linux-x64.tar.xz 
-cd node-v6.10.0-linux-x64+cd node-v8.9.4-linux-x64
 sudo cp -R * /usr sudo cp -R * /usr
 </​code>​ </​code>​
Line 557: Line 574:
  
   - Create a zip (not rar, ace, 7zip or anything else) archive containing:   - Create a zip (not rar, ace, 7zip or anything else) archive containing:
-    * your main file (main.js)  ​ +    * your main file   ​ 
-    * your alfy.jison file +    * your grammar.jison file 
     * your javascript files (*.js)     * your javascript files (*.js)
-    * yarn.lock (if you are using yarn) 
     * the package.json file     * the package.json file
     * the Readme file     * the Readme file
   - sign in with [[https://​vmchecker.cs.pub.ro|vmchecker]]   - sign in with [[https://​vmchecker.cs.pub.ro|vmchecker]]
   - select the //Automates et Langages Formelles (FILS)// course   - select the //Automates et Langages Formelles (FILS)// course
-  - select //3. Semantic//+  - select //4. Semantic//
   - upload the archive   - upload the archive
  
Line 580: Line 596:
 unzip archive.zip homework unzip archive.zip homework
 cd homework cd homework
-# if the file yarn.lock exists 
-yarn 
-# else 
 npm install npm install
 echo '{ "​node":​true,​ "​esnext":​true }' > .jshintrc echo '{ "​node":​true,​ "​esnext":​true }' > .jshintrc
alf/teme/tema_en_3.1524515342.txt.gz · Last modified: 2018/04/23 23:29 by alexandru.radovici
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0