Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
clean-compiler-and-rts
compiler
Commits
e50b713b
Commit
e50b713b
authored
Aug 14, 2001
by
Vincent Zweije
Browse files
Use record to model result of symbolic reduction of task expression
parent
46917235
Changes
2
Hide whitespace changes
Inline
Side-by-side
sucl/newtest.dcl
View file @
e50b713b
...
...
@@ -11,14 +11,14 @@ from rule import Rgraph,Rule
from
general
import
Optional
::
Symredresult
sym
var
tsym
tvar
:==
(
Rgraph
sym
var
// The initial area in canonical form
,
sym
// The assigned symbol
,
[
Bool
]
// Strictness annotations
,
Rule
tsym
tvar
// Type rule
,
Trace
sym
var
var
// Truncated and folded trace
,
[
Rule
sym
var
]
// Resulting rewrite rules
,
[
Rgraph
sym
var
]
// New areas for further symbolic reduction (not necessarily canonical)
)
=
{
srr_task_expression
::
Rgraph
sym
var
// The initial area in canonical form
,
srr_assigned_symbol
::
sym
// The assigned symbol
,
srr_strictness
::
[
Bool
]
// Strictness annotations
,
srr_typerule
::
Rule
tsym
tvar
// Type rule
,
srr_trace
::
Trace
sym
var
var
// Truncated and folded trace
,
srr_rules
::
[
Rule
sym
var
]
// Resulting rewrite rules
,
srr_areas
::
[
Rgraph
sym
var
]
// New areas for further symbolic reduction (not necessarily canonical)
}
fullsymred
::
[
SuclSymbol
]
// Fresh function symbols
...
...
sucl/newtest.icl
View file @
e50b713b
...
...
@@ -148,14 +148,14 @@ these tuples.
*/
::
Symredresult
sym
var
tsym
tvar
:==
(
Rgraph
sym
var
// The initial area in canonical form
,
sym
// The assigned symbol
,
[
Bool
]
// Strictness annotations
,
Rule
tsym
tvar
// Type rule
,
Trace
sym
var
var
// Truncated and folded trace
,
[
Rule
sym
var
]
// Resulting rewrite rules
,
[
Rgraph
sym
var
]
// New areas for further symbolic reduction (not necessarily canonical)
)
=
{
srr_task_expression
::
Rgraph
sym
var
// The initial area in canonical form
,
srr_assigned_symbol
::
sym
// The assigned symbol
,
srr_strictness
::
[
Bool
]
// Strictness annotations
,
srr_typerule
::
Rule
tsym
tvar
// Type rule
,
srr_trace
::
Trace
sym
var
var
// Truncated and folded trace
,
srr_rules
::
[
Rule
sym
var
]
// Resulting rewrite rules
,
srr_areas
::
[
Rgraph
sym
var
]
// New areas for further symbolic reduction (not necessarily canonical)
}
/*
> listopt :: [char] -> [[char]] -> [char]
...
...
@@ -315,10 +315,10 @@ initareas cli
targs
=
arguments
(
typerule
cli
symbol
)
getinit
::
(
Symredresult
sym
var
tsym
tvar
)
->
Rgraph
sym
var
getinit
(
area
,
symbol
,
stricts
,
trule
,
trace
,
rules
,
areas
)
=
area
getinit
srr
=
srr
.
srr_task_expression
getareas
::
(
Symredresult
sym
var
tsym
tvar
)
->
[
Rgraph
sym
var
]
getareas
(
area
,
symbol
,
stricts
,
trule
,
trace
,
rules
,
areas
)
=
areas
getareas
srr
=
srr
.
srr_
areas
/*
`Symredarea' is the function that does symbolic reduction of a single
...
...
@@ -352,7 +352,14 @@ symredarea ::
->
Symredresult
SuclSymbol
SuclVariable
SuclTypeSymbol
SuclTypeVariable
symredarea
foldarea
cli
area
=
(
area
,
symbol
,
stricts
,
trule
,
trace
,
rules
,
areas
)
=
{
srr_task_expression
=
area
,
srr_assigned_symbol
=
symbol
,
srr_strictness
=
stricts
,
srr_typerule
=
trule
,
srr_trace
=
trace
,
srr_rules
=
rules
,
srr_areas
=
areas
}
where
agraph
=
rgraphgraph
area
;
aroot
=
rgraphroot
area
(
symbol
,
aargs
)
=
foldarea
area
arule
=
mkrule
aargs
aroot
agraph
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment