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
db20db1e
Commit
db20db1e
authored
Jul 27, 2001
by
Vincent Zweije
Browse files
Associate history patterns with node-ids, not links
parent
899633cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
sucl/history.dcl
View file @
db20db1e
...
...
@@ -17,7 +17,7 @@ from spine import Subspine
// An association between a node-id in the subject graph and a history pattern
::
HistoryAssociation
sym
var
:==
(
(
Link
var
)
// Attachment point in the subject graph where the history pattern is "housed"
:==
(
var
// Attachment point in the subject graph where the history pattern is "housed"
,
HistoryPattern
sym
var
// The pattern in the history
)
...
...
@@ -40,11 +40,11 @@ extendhistory
&
==
pvar
// Check the current subject graph in the history
check
history
::
(
History
sym
var
)
[
Link
var
]
(
Graph
sym
var
)
var
->
[
HistoryPattern
sym
var
]
match
history
::
(
History
sym
var
)
// Complete history against which to check
[
var
]
// Node-ids for which to include history patterns
(
Graph
sym
var
)
// Current subject graph
var
// Current application point of strategy
->
[
HistoryPattern
sym
var
]
// Matching history patterns
|
==
sym
&
==
var
sucl/history.icl
View file @
db20db1e
...
...
@@ -16,7 +16,7 @@ import StdEnv
// An association between a node-id in the subject graph and a history pattern
::
HistoryAssociation
sym
var
:==
(
(
Link
var
)
// Attachment point in the subject graph where the history pattern is "housed"
:==
(
var
// Attachment point in the subject graph where the history pattern is "housed"
,
HistoryPattern
sym
var
// The pattern in the history
)
...
...
@@ -143,10 +143,10 @@ extendopen
)
|
==
var
extendopen
_
_
link
extender0
extendopen
_
snode
link
extender0
=
(
newpattern
,
histpat
,
extender1
)
where
histpat
=
OpenHist
newpattern
=
(
link
,
histpat
)
newpattern
=
(
snode
,
histpat
)
extender1
=
adjust
link
histpat
extender0
extendpartial
...
...
@@ -228,7 +228,7 @@ extendfunction sgraph rule matching issub extendsub snode link extender0
(
sdef
,(
ssym
,_))
=
varcontents
sgraph
snode
rgraph
=
rulegraph
rule
rargs
=
arguments
rule
thisnewpattern
=
(
link
,
thispat
)
thisnewpattern
=
(
snode
,
thispat
)
extendnodes
::
(
Graph
sym
var
)
// Subject graph
...
...
@@ -309,20 +309,20 @@ extendnode sgraph rgraph matching issub extendsub (link,rnode) (newpattern0,rest
* Verifying a subject graph against the history *
************************************************/
check
history
::
(
History
sym
var
)
[
Link
var
]
(
Graph
sym
var
)
var
->
[
HistoryPattern
sym
var
]
match
history
::
(
History
sym
var
)
// Complete history against which to check
[
var
]
// Node-ids for which to include history patterns
(
Graph
sym
var
)
// Current subject graph
var
// Current application point of strategy
->
[
HistoryPattern
sym
var
]
// Matching history patterns
|
==
sym
&
==
var
check
history
hist
spine
link
s
sgraph
snode
=
foldr
(
checkassoc
spine
link
s
sgraph
snode
)
[]
hist
match
history
hist
spine
node
s
sgraph
snode
=
foldr
(
checkassoc
spine
node
s
sgraph
snode
)
[]
hist
checkassoc
spine
link
s
sgraph
snode
(
link
,
pat
)
rest
|
isMember
link
spine
link
s
&&
checkpat
sgraph
pat
snode
checkassoc
spine
node
s
sgraph
snode
(
var
,
pat
)
rest
|
isMember
var
spine
node
s
&&
checkpat
sgraph
pat
snode
=
[
pat
:
rest
]
=
rest
...
...
Write
Preview
Supports
Markdown
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