Yes, please implement your big-step evaluator such that it matches the signature in lambda.sig.
That means your should place your code inside a structure and ascribe it the signature I provide:
structure Lambda : LAMBDA = struct (* your code goes here *) end
While testing, make sure to have both the file with the definition of LAMBDA and the file with your own structure available for the SML interpreter. One of the better ways to do that is to use the CM package for SML/NJ.
As long as your structure implements the signature, you may implement additional functions if you wish.
The signature actually fully specifies the datatype for terms, and so your definition of the term datatype should match it exactly. In fact, just copy and paste it from the signature into your structure.
Updated!In /afs/cs/user/aleksey/814submit/ you will find several directories. One of them will match your userid. Inside there will be an asst2 subdireectory. Copy your solution there.
This time around you should have full access within your own subdirectory, so you should have only the latest version of your work in there.
That is because of the signature ascription : LAMBDA in the structure definition. It tells SML/NJ to hide any functions in the structure not explicitly named by the signature.
The solution is to do something like:
structure MyLambda = struct (* your code here *) end structure Lambda : LAMBDA = MyLambda
Now you can use MyLambda.someFunction from the outside.
Alternatively, you may wish to declare your testing functions in a separate structure. In that case, you can save yourself some typing by doing something like:
structure LambdaTests = struct local open Lambda in (*your testing code; since Lambda is opened, you may directly refer to eval, subst, Var, App, Abs, etc, without the Lambda. prefix *) end end
In the same directory as your code (assuming the name is mylambda.sml), create a file called sources.cm which contains:
Group is mylambda.sml lambda.sig (* any other testing files you may have *)
Now whenever you wish to recompile your files and load them into the currently running SML/NJ, just type:
CM.make();
CM will recompile the changed files and update the toplevel with the new bindings.
$Log: bigstep-faq.html,v $ # Revision 1.3 2002/10/03 09:56:44 aleksey # updated submission instructions, some structure problems, brief CM intro. # # Revision 1.2 2002/10/02 09:24:34 aleksey # added signature, some SML discussion, submission blurb