root/trunk/ProjectFortress/demos/DynamicSemantics.fsi

Revision 2617, 1.4 KB (checked in by sukyoungryu, 16 months ago)

[demos] Fixed variable shadowing.

Line 
1(*******************************************************************************
2    Copyright 2008 Sun Microsystems, Inc.,
3    4150 Network Circle, Santa Clara, California 95054, U.S.A.
4    All rights reserved.
5
6    U.S. Government Rights - Commercial software.
7    Government users are subject to the Sun Microsystems, Inc. standard
8    license agreement and applicable provisions of the FAR and its supplements.
9
10    Use is subject to license terms.
11
12    This distribution may include materials developed by third parties.
13
14    Sun, Sun Microsystems, the Sun logo and Java are trademarks or registered
15    trademarks of Sun Microsystems, Inc. in the U.S. and other countries.
16 ******************************************************************************)
17
18api DynamicSemantics
19import Map.{...}
20import Syntax.{...}
21
22(* Runtime value ***************************************************************)
23trait RuntimeValue comprises { Val, FnValue }
24  getValue(): Value
25  toString(): String
26  toSource(): String
27end
28
29object Val(v: Value) extends RuntimeValue end
30
31object FnValue(fun: FnExpr, sigma: Map[\String, RuntimeValue\]) extends RuntimeValue end
32
33(* Runtime value factories *****************************************************)
34val(expr: Value): RuntimeValue
35val(expr: FnExpr, sigma: Map[\String, RuntimeValue\]): RuntimeValue
36
37(* Initialize the helper table *)
38initDynamic(): ()
39
40(* Evaluate a given program. *)
41opr VDASH(p: Program): RuntimeValue
42
43end
Note: See TracBrowser for help on using the browser.