User Tools

Site Tools


cs330_f2016:labhppint

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
cs330_f2016:labhppint [2017/02/22 15:23]
wingated
cs330_f2016:labhppint [2021/06/30 23:42] (current)
Line 1: Line 1:
 +=====BYU CS330 - Concepts of Programming Languages - HP Int Lab=====
 +
 ====Objective:​==== ====Objective:​====
  
Line 29: Line 31:
 The primary deliverable for this lab is a new Julia module. ​ Your module should export ''​parse'',​ ''​calc'' ​ ''​analyze''​ functions, and three return types, ''​NumVal'',​ ''​ClosureVal'',​ and ''​MatrixVal''​. The primary deliverable for this lab is a new Julia module. ​ Your module should export ''​parse'',​ ''​calc'' ​ ''​analyze''​ functions, and three return types, ''​NumVal'',​ ''​ClosureVal'',​ and ''​MatrixVal''​.
  
-Your module should be able to do everything that the three previous interpreters. ​ You are welcome to examine the code we developed in class. ​ The ''​CI6.jl''​ module is available on LearningSuite,​ under "​Content -> Julia -> High Performance Primitives"​.+Your module should be able to do everything that the three previous interpreters ​could do.  You are welcome to examine the code we developed in class. ​ The ''​CI6.jl''​ module is available on LearningSuite,​ under "​Content -> Julia -> High Performance Primitives"​.
  
 Please name your module ''​HPInt''​. Please name your module ''​HPInt''​.
Line 53: Line 55:
           | (/ <OWL> <​OWL>​)           | (/ <OWL> <​OWL>​)
           | (mod <OWL> <​OWL>​)           | (mod <OWL> <​OWL>​)
-          | (collatz ​<​OWL>​) +          | (<​OWL>​)  
-          | (<​OWL>​) ​     +          | (collatz ​<​OWL>​) ​    # Only a NumVal version required for collatz ​    
           | id           | id
           | (if0 <OWL> <OWL> <​OWL>​)           | (if0 <OWL> <OWL> <​OWL>​)
Line 96: Line 98:
  
   - The ''​min,​max,​+,​-,/,​*''​ functions all must work with any combination of ''​NumVal''​ and ''​MatrixVal''​s.   - The ''​min,​max,​+,​-,/,​*''​ functions all must work with any combination of ''​NumVal''​ and ''​MatrixVal''​s.
-  - Remember that when multiplying a MatrixVal by a MatrixVal, we want to use the ''​.*''​ operation (element-wise matrix multiply) instead of ''​*''​ (matrix-matrix multiply). ​+  - Remember that when multiplying a MatrixVal by a MatrixVal, we want to use the ''​.*''​ operation (element-wise matrix multiply) instead of ''​*''​ (matrix-matrix multiply).
  
 ---- ----
Line 113: Line 115:
 ---- ----
 ====Hints:​==== ====Hints:​====
 +
 +To verify that your matrix code is working properly, you can run the test cases described in {{ :​cs330_f2016:​cattestcases.pdf |}} on {{:​cs330_f2016:​cat_256.png?​linkonly|}}
  
 Once all is said and done, the following program: Once all is said and done, the following program:
cs330_f2016/labhppint.1487776984.txt.gz · Last modified: 2021/06/30 23:40 (external edit)