User Tools

Site Tools


cs330_f2016:lab16

Differences

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

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
cs330_f2016:lab16 [2016/11/26 22:54]
wingated
cs330_f2016:lab16 [2018/04/04 22:27]
morse
Line 1: Line 1:
-** This is draft version of the assignmentDo not start on it until this line is removed. **+**This ​assignment ​is still in draft formIt will change up until the due date for the preceding assignment.**
  
 ====Objective:​==== ====Objective:​====
Line 8: Line 8:
 ====Deliverable:​==== ====Deliverable:​====
  
-Implement the CITypes interpreter using [[http://​liftothers.org/​byu/CITypes%20-%20shell.jl|the provided shell]].+Implement the CITypes interpreter using [[http://​liftothers.org/​dokuwiki/doku.php?​id=cs330_f2016:​lab16shell|the provided shell]].
  
 === Language Overview === === Language Overview ===
  
-The CITypes language is based on the CI5 language, just like your Extended Interpreter.+The CITypes language is based on the CI3 language, just like your Extended Interpreter.
 ** You do not need to add any functionality from your previous assignments. ** ** You do not need to add any functionality from your previous assignments. **
  
Line 33: Line 33:
 For example, a simple numeric increment function would be written as  For example, a simple numeric increment function would be written as 
 <code lisp> <code lisp>
-  (lambda x : number (+ x 1)+  (lambda x : number (+ x 1))
 </​code>​ </​code>​
-and a function that takes as input a function from numbers to numbers would look like this:+and a function ​lambda ​that takes as input a function ​from numbers to numbers would look like this:
 <code lisp> <code lisp>
   (lambda f : (number : number) (f 3))   (lambda f : (number : number) (f 3))
Line 64: Line 64:
          | nempty          | nempty
          | (ncons <​expr>​ <​expr>​)          | (ncons <​expr>​ <​expr>​)
-         | (nempty ​<​expr>​)+         | (nisempty ​<​expr>​)
          | (nfirst <​expr>​)          | (nfirst <​expr>​)
          | (nrest <​expr>​)          | (nrest <​expr>​)
Line 94: Line 94:
  
 ** The type checker should perform no evaluation of the code, only type checking. ** ** The type checker should perform no evaluation of the code, only type checking. **
 +
 +In class, we went over [[lab16judgments | the type judgments for the expressions other than those that work with lists]]. ​
 +You will need to determine them for the five list-handling expressions yourself.
  
 Some of the tests will involve comparing two types, and a "​same_types"​ function is provided to do a (recursive if necessary) comparison. Some of the tests will involve comparing two types, and a "​same_types"​ function is provided to do a (recursive if necessary) comparison.
Line 102: Line 105:
 ====Hints:​==== ====Hints:​====
  
-  * The "​calcf"​ function in the CI5 interpreter that read in a test file, ran it through lex / parse / calc has been replaced with a "​typef"​ function that similarly reads in a test file and runs it through lex / parse / type_of_expression. ​ You can use it to run your own test cases.+  * The "​calcf"​ function in the CI3 interpreter that read in a test file, ran it through lex / parse / calc has been replaced with a "​typef"​ function that similarly reads in a test file and runs it through lex / parse / type_of_expression. ​ You can use it to run your own test cases. ​ ​[Still under construction.]
   * Make sure you test not only for validly typed expressions but for each kind of type error.   * Make sure you test not only for validly typed expressions but for each kind of type error.
cs330_f2016/lab16.txt ยท Last modified: 2021/06/30 23:42 (external edit)