Stratego/XT JIRA  History | Log In     View a printable version of the current page. Get help!  
Issue Details (XML | Word)

Key: STR-289
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Martin Bravenboer
Reporter: Anonymous
Votes: 0
Watchers: 0
Operations

Clone this issue
Create sub-task
If you were logged in you would be able to see more operations.
Stratego/XT

High order strategies exported incorrectly

Created: 2005-04-27 18:05   Updated: 2008-03-31 20:46
Component/s: strc - Stratego compiler
Affects Version/s: 0.14
Fix Version/s: 0.17

Original Estimate: Unknown Remaining Estimate: Unknown Time Spent: Unknown
Environment: Linux
Issue Links:
Solve
 
This issue will be solved by:
STR-235 Syntactical ambiguity with higher ord... Minor Closed


 Description  « Hide
High order strategies, defined

  mystrat(s1:(a -> a) * a -> a, s2) = ....

when compiled with strc --library, are exported something like:

  external mystrat(o_218 : a -> a * a -> a , p_218 : ATerm() -> ATerm() | )

which I believe should be..

  external mystrat(o_218 : (a -> a) * a -> a , p_218 : ATerm() -> ATerm() | )

since these seem to be considered different.

--error message something like---
compiling simple.str
front-end succeeded: user 7.40 system 0.49
Not a strategy-definition: ExtSDef("rule__process_next_2_0",[VarDec("o_218",amb([FunType([ConstType(SortVar("a"))],
  FunType([ConstType(SortVar("a")),ConstType(SortVar("a"))],ConstType(SortVar("a")))),
  FunType([FunType([ConstType(SortVar("a"))],ConstType(SortVar("a"))),ConstType(SortVar("a"))],
  ConstType(SortVar("a")))])),VarDec("p_218",FunType([ConstType(Sort("ATerm",[]))],ConstType(Sort("ATerm",[]))))],[])
optimization succeeded: user 0.10 system 0.05
/home/dwaddington/proteus/libexec/strc/s2c: rewriting failed
compilation failed (8.16 secs)



I hope I have this correct ;-).


 All   Comments   Work Log   Change History      Sort Order:
Daniel Waddington [2005-04-27 18:15]
Ooops, it was me who reported this. I forgot to log on.

Rob Vermaas [2005-10-19 15:03]
syntax was already adapted to enforce parentheses for fun types, the pretty-printer is now also adapted, which solves the stated problem