0% found this document useful (0 votes)
4 views2 pages

GardenPlan Code Submission Guide

Uploaded by

oliverpasquesi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
4 views2 pages

GardenPlan Code Submission Guide

Uploaded by

oliverpasquesi
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd

SDE1:

submit source code and log (consult (to load file), run tests, log is given). Zip
together th% the 2 things. Make some tests to show that you thourougly tested your
code and that it works. gardenplan should output the result. Then you should also
be able to press semicolon to have it run again and give you another solution that
works. You should be able to press it multiple times to give a bunch of different
outputs.
gardenplan --> essentially the main. What you will type in order to run. Will run
all of the checks. Call writegarden at the end
writegarden --> Print out the current solution using the write command. Similar to
printf. Basically prints the solution in a different format. Any print format you
choose is fine; just demonstrate that you can "pretty print". Print as a table or
something.

protocol predicate --> takes 1 arg (string) which will be the file name. Opens a
channel to that file (opens that file). Any time from then on, when you type
something, all of that will be logged out into the file. A text file will be
returned after you close it that will show the final output text. Do this to run
your tests when you are done. This is the second file (along with the src code)
that you will submit. Use any size of N when you are testing with protocol.

If even number of N, outside will be wet, middle 2 will be dry (or however the rule
is supposed to go). Basically if there is an even number, then the 2 middle plants
will be the wet/dry (according to rule)

You can do the ec in 1D. If you do this, just turn it in with the rest of the
project.

-------------------

Exam:
Practice test, study guide --> check canvas
More questions on Prolog + ocaml, some on lisp (probably mc), also the group of
languages that ar "in between" those ones
signatures --> the things that ocaml spits out when you find a function. have name
of function, expression that tells the types of args and return types (explain/know
how that works). Types of args are basic types. Know how to deal with when there
are more than 1 arguments; what does that look like. Need to know if its tuples
(then will have asterics between types) or curry (then will have an arrow). after
the arguments will be the return type. Look at examples in the slides. If type is
not scalar (scalar is having 1 value. i.e. an array is not scalar bc it has many
values), then put word list and then the type specifying the type contained in the
list. Can have a list by itself - can have a list of nothing; need a list of
something.
Assume there will be another big term matching question on the test.
There will be big questions about prolog and ocaml. Then some smaller questions
about some of the other languages.
Lambda calculus
Will not have to write code; might have to execute some code by hand. Given this
prolog code, what will it output?
cut --> gets rid of all backtracking (in prolog). There will probably be a matching
question about it.
Allowed 1-sided sheet of handwritten notes.
Ch: 8 (lambda calc), 9 (lisp), 10 (clos), 11 (sml, ocaml)

-------------------

SDE Testing:
uniquecheck:

colorcheck:

sizecheck:
All same:
small: P
med: P
tall: P
Expct True:
small, med, small, med: P
small, med, tall, med, small: P
Expct False:
small, tall, small, tall: P
tall, med, tall, small: P

wetcheck:

[flower(daisies, med, wet, yellow), flower(roses, med, dry, red), flower(daffofils,


med, wet, pink), flower(gardenias, med, wet, yellow)]

[flower(daisies, small, wet, yellow), flower(roses, med, dry, red),


flower(daffofils, tall, wet, pink), flower(gardenias, small, wet, yellow)]

[flower(daisies, small, wet, yellow), flower(roses, med, dry, red),


flower(daffofils, small, wet, pink), flower(gardenias, med, wet, yellow)]

[flower(roses, med, dry, red), flower(daisises, med, wet, yellow),


flower(daffodils, med, wet, pink), flower(crocus, med, dry, orange)]

You might also like