Differences

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

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
research:software:gsf [2018/10/18 12:20] – [Example 3: respecting scoping] mtororesearch:software:gsf [2018/10/18 13:58] (current) – [The source program area] mtoro
Line 134: Line 134:
 Here you can select examples from a predefined list of examples. Once an example is selected, a description is shown below and the source of the example is presented in the following area. Here you can select examples from a predefined list of examples. Once an example is selected, a description is shown below and the source of the example is presented in the following area.
  
-==== The source program area ====+==== The scractchpad area ====
  
  
Line 155: Line 155:
 ==== The action area ==== ==== The action area ====
  
-{{:research:software:gsf:button.png?200|}}+{{:research:software:gsf:button.png?300|}}
  
-Here you can type check the source program by clicking the "TYPECHECK!" button. If the source program is valid then its typing derivation is shown below, otherwise an error is shown.+Here you can type check the source program by clicking the "TYPECHECK!" button. If the source program is valid then its typing derivation is shown below, otherwise an error is shown.  
 +The other button is "CLEAR SCARTCHPAD" which will clear the scratchpad as the name suggest
  
  
Line 276: Line 277:
 ==== Example 3: respecting instantiations ==== ==== Example 3: respecting instantiations ====
  
-GSF enforces type instantiations even when applied to an imprecisely-typed value. This program, contrary to gradual parametric languages found in the literature, throws a runtime error as the instantiated function is called with an argument of an incompatible type. For instance consider the following program:+GSF enforces type instantiations even when applied to an imprecisely-typed value. Consider the following program:
  
 {{:research:software:gsf:example4-1.png?700|}} {{:research:software:gsf:example4-1.png?700|}}
  
-This program fails at runtime:+This program, contrary to prior work, throws a runtime error as the instantiated function is called with a boolean after being instantiated to ''Int''.:
  
 {{:research:software:gsf:example4-2.png?700|}} {{:research:software:gsf:example4-2.png?700|}}
  
-because the function is expecting an integer as argument and a boolean is passed instead.