17.5 QuickReferenceTable
207
EXAMPLE(105)
ThefollowingXGRSisatypicalstorageusage. Firstanemptyset t xiscreated,whichgets
populatedby an n rule t t executediteratedly, , returning a node whichis writtentothe set.
Thenanotherruleisexecutediteratedforeverymemberofthesetdoingthemainwork,and
nallytheset getsclearedtopreventmemoryleaks orlatermistakes. . If f thegraphshould
stay untouched d duringset t lling you u may y need d visited  ags s to prevent t endless looping.
x=set<Node>{} ;> ( (v)=t() ) && & {x.add(v)} )+ && for{v in x; r(v)} } <; {x.clear()}
You couldhandinthe storage to the rule, and add d there to the set, , this s wouldallow to
shortenthesequenceto:
x=set<Node>{} ;> ( t(x) ) )+ && & for{v in x; r(v)} <; {x.clear()}
The for loopcouldbe replaced by employingthe storage access in the rule construct, cf.
13.6;thiswouldbeespeciallybenecialiftherulerinsidetheforloopwouldhavetochange
thestoragex,whichwouldcorrupttheiteration/enumerationvariable.
NOTE(39)
Thecontaineroverwhichtheforloopiteratesmuststayuntouchedduringiteration.
Usethecopy(.:container):containerfunctiontoclonethecontainerbeforetheiteration
ifyouneedtoiteratethecontainercontentand changeitsvalues.
17.5 QuickReferenceTable
Table17.1listsmostoftheoperationsofthegraphrewritecomputationsataglance.
Pdf to jpeg - Convert PDF to JPEG images in C#.net, ASP.NET MVC, WinForms, WPF project
How to convert PDF to JPEG using C#.NET PDF to JPEG conversion / converter library control SDK
convert multipage pdf to jpg; convert pdf to gif or jpg
Pdf to jpeg - VB.NET PDF Convert to Jpeg SDK: Convert PDF to JPEG images in vb.net, ASP.NET MVC, WinForms, WPF project
Online Tutorial for PDF to JPEG (JPG) Conversion in VB.NET Image Application
convert pdf pages to jpg; change file from pdf to jpg on
208
SequenceComputations
c;d
Computescthend;thevalueofthecomputationisd
feg
Anunspeciedsequenceexpressionexecutedforitsresult,dening
thesuccessofthecomputation.
t=e
Simpleassignmentofanexpressionvaluetoanassignmenttarget
e ? ? f f : : g
Returnsfifeevaluatestotrue,otherwiseg
e op f
Foropbeingoneofthebooleanoperators||,|,&,&&,^
e op f
Foropbeingoneofcomparisonoperators==,!=,<,<=,>,>=,in
e op f
Foropbeingoneofarithmeticoperators+,-,*,/,%
e + f
Forstringconcatenation.
v
Variable.Assignmenttargetorexpression.
v.name
Attributeofgraphelement. Assignmenttargetorexpression.
@(name)
Returngraphelementofgivenname.
def(Parameters)
Checkifallthevariablesaredened.
random(upperBound) Returnsrandomnumberfrom[0;upperbound[,ifupperboundis
missingfrom[0.0;1.0[.
typeof(v)
Returnsthenameofthetypeoftheentityhandedin.
u=set<Node>fg
Exampleforcontainerconstructor,createsstoragesetandassigns
tou.
u[e]
Targetvalueof einu. . Failsif f !(e e in u). Assignmenttargetor
expression.
f(...)
Callsoneofthefunctionsforgraphqueryingdenedin12.1and
explainedin14. Orcallsauserdenedfunction. Thenumerical
functionsarenot available.
(...)=p(...)
Callsoneoftheproceduresforgraphmanipulationdenedin12.4
andexplainedin14. Orcallsauserdenedprocedure.
v.fm(...)
Callsoneofthefunctionmethodssize,empty,peekforcontainer
querying dened d in 16.1 and d explained d in 13. Or r calls a a user
denedfunction.Thestringfunctionmethodsandothercontainer
functionmethodsaswellasinxoperatorsarenot available.
(...)=v.pm(...)
Callsoneoftheproceduremethodsadd,rem,clearforcontainer
manipulationdenedin16.2andexplainedin13. Orcallsauser
denedprocedure.Thechangeassignmentsarenot available.
Let c c and d d d be computations, t t be an n assignment t target, , e, f, , g g be e expressions, , u, , v, , w be
variableidentiers
Table17.1:Sequencecomputationsataglance
Online Convert Jpeg to PDF file. Best free online export Jpg image
Online JPEG to PDF Converter. Download Free Trial. Convert a JPG to PDF. You can drag and drop your JPG file in the box, and then start
change pdf to jpg; convert pdf to jpg 300 dpi
Online Convert PDF to Jpeg images. Best free online PDF JPEG
Online PDF to JPEG Converter. Download Free Trial. Convert a PDF File to JPG. Drag and drop your PDF in the box above and we'll convert the files for you.
.pdf to jpg; change pdf file to jpg online
CHAPTER 18
ADVANCED CONTROL L WITH BACKTRACKING
Inthischapter we’llhavealook at advanced d graphrewrite sequence constructs,withthe
subsequencesandthebacktrackingdoubleanglesasthecentralstatements.
18.1 SequenceDenitions(ProceduralAbstraction)
RewriteSequenceDenition
-
def
-
sequence
-
RewriteSequenceSignature
-
f
-
RewriteSequence
-
g
-
RewriteSequenceSignature
-
SequenceName
-
(
-
InVariable
-
:
-
Type
,
-
)

-
:
-
(
-
OutVariable
-
:
-
Type
,
-
)
-
If youwant touse asequence or sequence part at several locations,just factor it out
intoasequencedenitionandreusewithitsnameasifitwerearule.Asequencedenition
declaresinputandoutputvariables; whenthesequencegets s calledtheinput variablesare
bound to thevalues s it was calledwith. . If f andonly if the sequences s succeeds, the e values
fromtheoutputvariablesgetassignedtotheassignmenttargetofthesequencecall. Thusa
sequencecallbehavesasarulecall,cf. 9.1.
Asequencedenitionmaycallitselfrecursively,ascanbeseeninexample106.
The compiled sequences s must start t withthe e sequence e keyword d inthe rule le. . The
interpretedsequencesintheshellmuststartwiththedefkeyword;ashellsequencescanbe
overwrittenwithanother shellsequence incase thesignatureis identical. . (Overwriting g is
neededinthe shelltodenedirectormutuallyrecursivesequences as asequencemust be
denedbeforeit canget used; ; apart t fromthat itallows for amore rapid-prototypinglike
styleofdevelopmentintheshell.)
209
C# Create PDF from images Library to convert Jpeg, png images to
This example shows how to build a PDF document with three image files (BMP, JPEG and PNG). // Load 3 image files (BMP, JPEG and PNG).
c# pdf to jpg; changing pdf to jpg file
C# HTML5 Viewer: Load, View, Convert, Annotate and Edit Raster
from stream or byte array, print images to tiff or pdf, annotate images C#.NET RasterEdge HTML5 Viewer supports various images formats, including JPEG, GIF, BMP
convert pdf picture to jpg; changing pdf to jpg on
210
AdvancedControlwithBacktracking
EXAMPLE(106)
1
defrec(depth:int){\
2
if{ {depth<::MAXDEPTH};foo();>rec(depth+1);bar()}\
3
}
Thisexampleshowsasequencedenedintheshellwhichisexecutingitselfrecursively. The
hostgraphistransformedbyapplyingMAXDEPTHtimestherulefoo,untilnallytherulebar
is executed. . Theresult t ofthesequence istheresult of f bar,returnedbackfromrecursion
steptorecursionstepwhileunwindingthesequencecallstack.
18.2 Transactions,Backtracking,andPauseInsertions
Theextendedcontrolconstructsoerfurtherruleapplicationcontrolintheformoftransac-
tions,backtracking,andpauseinsertions.
ExtendedControl
-
<
-
RewriteSequence
-
>
-
<<
-
RuleExecution
-
;;
-
RewriteSequence
-
>>
-
/
-
RewriteSequence
-
/
-
Graphrewritesequences canbeprocessedtransactionallybyusinganglebrackets(<>),
i.e. ifthereturnvalueof f thenestedsequenceis false,allthechanges carriedout onthe
hostgraphwillberolledback. Nestedtransactionsaresupported,i.e. . atransactionwhich
wascommittedisrolledbackagainifanenclosingtransactionfails.
EXAMPLE(107)
Wewanttoexecuteasequencersandifitfailsarulet{ontheoriginalgraph. Butrsis
composedoftworules,itdenotesthesequencer&&s. Sorstrmustsucceed,andthens,too.
Unfortunately,itispossiblethatrsucceedsandcarriesoutitseectsonthegraph,andthen
sfails.Sowe’dneedanexplicitundo-rtoreversetheeectofraftersfailed.Luckily,wecan
omitwritingsuchreversalcode(whichmayrequireahorrendousamountofbookkeeping)by
utilizingtransactions,tojusttryoutandrollbackonfailure: if{!< < r r && s s >; t}. . After
rsucceeded{withthegraphinstatepost-r{sisexecuted. Ifssucceeds,thesequenceas
suchsucceeds.Butif sfailswejustrollbacktheeectsofrandexecutetinstead.
Transactionsassuchareonlyhelpfulinalimitednumberofcases,buttheyareakeyin-
gredientforbacktracking,whichissyntacticallyspeciedbydoubleanglebrackets(<<r;;s>>.
Thesemanticsoftheconstructare:Firstcomputeallmatchesforruler,thenstartatrans-
action. Foreachmatch: : executetherewriteofthematch,thenexecute s. . If f sfailedthen
rollbackandcontinuewiththeloop. If f ssucceededthencommitandbreakfromtheloop.
Onrstsightthismaynotlookveryimpressive,butthisconstructincombinationwithre-
cursivesequencesisthekeyoperationforcrawlingthroughsearchspacesorfortheunfolding
ofstatespaces.
Thebacktrackingdoubleangles separatematchingfromrewriting: : rst t allmatchesare
found,butthenonlyoneaftertheotherisapplied,withoutinterferenceoftheothermatches.
The\withoutinterferenceofothermatches"statementisensuredbyrollingbackthechanges
oftheapplicationofthepreviousmatch,andmuchmore,oftheentiresequencewhichfollowed
therewritingofthepreviousmatch.
C# PDF Convert: How to Convert Jpeg, Png, Bmp, & Gif Raster Images
Jpeg, Png, Bmp, Gif Image to PDF. Jpeg to PDF Conversion in C#. In the following C# programming demo, we will firstly take Jpeg to PDF conversion as an example.
changing pdf file to jpg; pdf to jpeg converter
C# PDF Convert to Images SDK: Convert PDF to png, gif images in C#
Our XDoc.PDF allows C# developers to perform high performance conversions from PDF document to multiple image forms. Besides raster image Jpeg, images forms
change pdf to jpg format; convert pdf to jpeg
18.2 Transactions,Backtracking,andPauseInsertions
211
EXAMPLE(108)
The situationwend ourselvesin nowis tond anapplicationofrule r that makes test
t succeed. . Unfortunately,thetestwouldbe e very complicatedto write basedonthe state
before-r.Sowewanttoexecuterandtrytafterwards. Butrememberingtheothermatches
ofrwefoundincasethejustchosenmatchmakestfail,sowecanexhaustivelyenumerate
andtry them m all. . Only y in n case none of them works s do we accept failure. . The e sequence
<<r;;t>>allows us directly todo so,it fails inoneof thepossible applications of f rcan
makeafollowingtsucceeds,itsucceedswiththerstapplicationof rforwhichtsucceeds.
If youare just interestedintherstgoalstate stumbleduponwhich satisesyour re-
quirementsduringasearch,thenyouonlyneedtogiveaconditionaslaststatementofthe
sequencewhichreturnstrueifthegoalwasreached;theiterationstopsexactlyinthetarget
state(seeexampleabove). But t whenyouare interestedinndingallstateswhichsatisfy
yourrequirements,oreveninenumeratingeachandeverystate,justforcebacktrackingby
notingdowntheconstantfalseaslastelementofthesequence(seeexamplebelow).
EXAMPLE(109)
Thesequence<< r ;; t t ;> > false >>allowsus s tovisitallapplications of r that make t
succeed. But t everything is rolledback after sequence end. . So o this s is s only helpfulif you
remembersomethingaboutthestatesthatsawrandtsucceed.Eitherinsomevariables,or
inthegraphitself,duringatransactionpause.
The backtracking g construct encodes s a a single e decision point of f a a search, , splitting g into
breadthalongthedierentchoicesavailableatthatpoint,andfurthercontinuingthesearch
inthesequence. Whenthis s pointofsplittingintobreadthis containedinasequence,and
this sequencecalls itselfagainrecursively oneachbranchof thedecisiontaken,yougeta
recursionwhich is s able to searchinto depth, , continuing decisionmaking on the resulting
graphofthepreviousdecision.
EXAMPLE(110)
Theexampleshowstheschemeforabacktrackingsearch.
1
sequencerec(level:int) {
2
if{ {{level< ::MAXDEPTH}};
3
<< r;;t &&changes-to-be-remembered&& rec(level+1)>>;
4
false }//endofrecursion,willmakealltherecreturn false,causingfullrollback
toinitialstate,withexceptionof changesthatoccuredduringapauseorare
outside the graphand thusoutofreachof transactioncontrol
5
}
Witheachsequencecalladvancingonestepintodepthandeachbacktrackinganglead-
vancing into breadth, you receive a depth-rst enumeration of an entire searchspace (as
sketchedin 18.1). . Eachstate e is visitedintemporal succession, withonlythe most recent
statebeingavailableinthegraph. Butmaybeyouwanttokeepeachstatevisited,because
youareinterestedinviewingallresultsatonce,orbecauseyouwanttocomparethedierent
states. AsthereisonlyonehostgraphinGrGen.NET,keepingeachvisitedstaterequires
apartitionofthehostgraphintoseparatesubgraphs,eachdenotingastate.
VB.NET PDF Convert to Images SDK: Convert PDF to png, gif images
Sometimes, to convert PDF document into BMP, GIF, JPEG and PNG raster images in Visual Basic .NET applications, you may need a third party tool and have some
convert pdf pages to jpg online; convert pdf to jpeg on
VB.NET Create PDF from images Library to convert Jpeg, png images
This VB. NET example shows how to build a PDF document with three image files (BMP, JPEG and PNG). ' Load 3 image files (BMP, JPEG and PNG).
convert pdf image to jpg online; advanced pdf to jpg converter
212
AdvancedControlwithBacktracking
<< r ;; seq >>
[r]
seq
r1
r2
r3
Figure18.1: Searchspaceillustration,abulletstandsforagraph
After youchangedthemodelingfromahostgraphtoastatespacegraphconsistingof
multiplesubgraphs, eachrepresenting oneofthegraphsyounormally y work with,youcan
materializethesearchspacevisitedintemporalsuccessionintoastatespacegraph,bycopying
thesubgraphs(whicharenormallyonlyexistingatonepointintime)duringpauseinsertions
outintospace. Whensubgraphswouldbecopiedwithoutpauseinsertions,they y wouldbe
rolledbackduringbacktracking;buteectsappliedonthegraphfrom/ in between here
/arebypassingtherecordingofthetransactionundologandthusstayinthegraph,evenif
thetransactionfailsandisrolledback.
Whenyouhave switchedfromadepth-rst searchoveronesinglecurrentgraphtothe
unfoldingofastatespacegraphcontainingallthesubgraphsreached,youmaycompareeach
subgraphwhichgets enumeratedwith h allthe already y availablesubgraphs, , and ifthe new
subgraphalreadyexists(i.e. is s isomorphtoanotheralreadygeneratedsubgraph),youmay
refrainfrominsertingit. Thissymmetryreductionallowstosavethespaceandtimeneeded
forstoringandcomputingequivalentbranchesotherwisegeneratedfromtheequivalentstates.
Butpleasenote thatthe == operator ongraphsis optimizedforreturningearly whenthe
graphsaredierent;whenthegraphsareisomorphicyouhavetopaythefullpriceofgraph
isomorphychecking. Thiswillhappensteadilywithautomorphicpatternsandthendegrade
performance.Tocounterthislterthematcheswhichcoverthesamespotindierentways,
see25.4onhowtodothis. MergingstateswithalreadycomputedonesyieldsaDAG-formed
statespace,insteadofthealwaystreelikesearchspace. Havealookatthetransformation
techniqueschapterformoreonstatespaceenumeration19.7andcopying19.5. Onecaveat
ofthetransactionsandbacktrackingmustbementioned: rollbackmightleadtoanincorrect
graphvisualizationwhenemployed from the debugger. . This s holds s especially y when n using
groupingnodestovisualizesubgraphcontainment(21.1).Youmustbeawarethatyoucan’t
relyontheonlinedisplayasmuchasyoucannormally,andthatyoumaybeneedtofallback
toanoinedisplaybyopeninga.vcg-dumpofthegraphwritteninasituationwhenthe
onlinegraphlookedsuspicious;adumpcanbewritteneasilyinasituationofdoubtfromthe
18.3 ForLoopsandIndeterministicChoice
213
debuggerpressingthepkey.
NOTE(40)
While atransaction or abacktrackis pending,all changes to the graphare recordedinto
somekindofundolog,whichisusedtoreversetheeectsonthegraphinthecaseofrollback
(and isthrownaway y whenthe nestingrootgets committed). . So o theseconstructs are not
horriblyinecient,buttheydohavetheirprice|ifyouneedthem,usethem,butevaluate
rstifyoureallydo.
18.3 ForLoopsandIndeterministicChoice
ExtendedControl
-
for
-
f
-
Variable
-
:
-
Type
-
in
-
Function
-
(
-
Parameters
-
)
-
;
-
in
-
[
-
?
-
r
-
]
-
;
-
in
-
[
-
SequenceExpression
-
:
-
SequenceExpression
-
]
-
;
-
in
-
IndexAccess
-
;
-
RewriteSequence
-
g
-
TheforloopovertheFunctionsnodesoredgesareiteratingoveralltheelementsinthe
currenthostgraphwhicharecompatibletothetypegiven. Theiterationvariableisbound
tothecurrentlyenumeratedgraphelement,thenthesequenceinthebodyisexecuted.
Ifyouiterateanodetypefromagraph,youmaybeinterestediniteratingitsincident
edgesoritsadjacentnodes.Thiscanbeachievedwithaforneighbouringelementsloop,which
bindstheiterationvariabletoanedgeincasetheFunction isoneof incoming,outgoing,
orincident. OrwhichbindstheiterationvariabletoanodeincasetheFunctionisoneof
adjacentIncoming,adjacentOutgoing,oradjacent.
Moreover,youmayiteratewithreachableIncoming,reachableOutgoing,andreachable
thenodesreachable fromastartingnode,orwith reachableEdgesIncoming,reachable-
EdgesOutgoing, and reachableEdges s the edges s reachable e from a starting node. . Or r you
mayuseoneoftheboundedreachabilityfunctionsboundedReachable,boundedReachable-
Incoming,boundedReachableOutgoing,boundedReachableEdges,boundedReachableEdges-
Incoming,boundedReachableEdgesOutgoinghere.
Theadmissible Parameters s forthe e Functions s are e thesourcenode,or the source node
plustheincidentedgetype,orthesourcenodeplustheincidentedgetype,plustheadjacent
nodetype|that’sthesameasforthesequenceexpressionfunctionsexplainedin14.2/Con-
nectednessqueries.Incontrasttothesesetreturningfunctions,thisloopcontainedfunctions
enumeratenodes/edgesmultipletimesincaseofre exiveormultiedges.
Thethirdforloopintroducedhere,theformatchesloop,allowstoiteratethroughthe
matchesfoundforanall-bracketedrulereducedtoatest;i.e.theruleisnotapplied,weonly
iterateitsmatches. Theloopvariablemustbeofastaticallyknownmatch<r>typewithr
beingthenameoftherulematched.Theelements(esp. thenodesandedges)ofthepattern
214
AdvancedControlwithBacktracking
ofthe matchedrulecanthenbeaccessedbyapplyingthe .-operator onthe loopvariable,
givingthenameoftheelementofinterestafterthedot.Note: theelementsmustbeassigned
to avariablein order to access their attributes,a direct attribute access after thematch
access is not possible. . Note: : the e matchobject allows only to access the toplevel nodes,
edges,orvariables. Ifyouuse e subpatterns ornestedpatternsandwanttoaccesselements
foundbythem,youhavetoyield(8.3)themouttothetop-levelpattern.
Thefourthforloopfromthediagramabove,theforintegerrangeloop,allowstocycle
through anascending g or r descending series s of f integers; ; the loopvariable e must t be e of type
int. Firsttheleftandrightsequenceexpressionsareevaluated,iftheleftislowerorequal
thantherightthevariableisincrementedfromleftoninstepsofoneuntilrightisreached
(inclusive),otherwisethevariableis decrementedfromleftoninstepsofoneuntilrightis
reached(inclusive).
Thefthfor looplistedaboveallowstoiteratethecontentsofanindex,see22.2.6for
moreonthisandtheIndexAccess.
Themostimportantforloop,theoneiteratingacontainer,forenumeratingtheelements
contained instorages, was s already introducedhere: 17.4. All l for r loops failif one of the
sequenceexecutionsfromthebodyfailed(allarecarriedout,though,evenafterafailure),
andsucceedotherwise.
ExtendedControl
-
$
-
%
-
&
-
|
-
&&
-
||
-
(
-
SequencesList
-
)
-
$
-
%
-
.
-
(
-
WeightedSequencesList
-
)

-
$
-
%
-
f
-
<
-
RuleExecution
,
-
>
-
g
-
SequencesList
-
RewriteSequence
-
,
-
RewriteSequence
-
WeightedSequencesList
-
WeightedSequence
-
,
-
WeightedSequence
-
WeightedSequence
-
FloatingNumber
-
RewriteSequence
-
18.4 QuickReferenceTable
215
The indeterministic c choice operators execute chosen elements from m a a sets of rules or
sequences. Therandom-all-ofoperatorsgiveninfunctioncallnotationwiththedollar r sign
plusoperator symbolas name have the followingsemantics: : Thestrict t operators | and d &
evaluatealltheirsubsequencesinrandomorderreturningthedisjunctionresp. conjunction
oftheir truthvalues. . The e lazy operators ||and&& evaluatethesubsequencesinrandom
orderaslongas theoutcome isnotxedor everysubsequencewasexecuted(whichholds
forthedisjunctionaslongas therewasnosucceedingruleandfortheconjunctionaslong
astherewasnofailingrule). Achoicepoint t maybe usedtodenethesubsequencetobe
executednext.
Thesome-of-setbraces {<r,[s],$[t]>} matches allcontainedrules andthenexecutes
theoneswhichmatched.Theone-of-setbraces${<r,[s],$[t]>}(some-of-setwithrandom
choice applied) matches allcontainedrules andthenexecutes at randomone ofthe rules
whichmatched(i.e. the e one matchof arule,all matches of anallbracketedrule, or one
randomlychosenmatchofanallbracketedrulewithrandomchoice). Theone/some-of-setis
trueifatleastonerulematchedandfalseifnocontainedrulematched.Achoicepointmay
beusedontheone-of-set;itallowsyoutoinspectthematchesavailablegraphicallybefore
decidingontheonetoapply.
Theweightedone operator $.(w1 1 s1, , ..., wn sn) ) is executedlike this: : the e weights
w1-wn(numbersoftypedouble)areaddedintoaseriesofintervals,thenarandomnumber
(uniformdistribution)isdrawninbetween0.0andw1+...+wn,thesubsequenceofthein-
tervalthenumberfallsintoisexecuted,theresultofthesequenceistheresultofthechosen
subsequence.
18.4 QuickReferenceTable
Table18.1listsmostoftheoperationsoftheadvancedgraphrewritesequenceconstructsat
aglance,followedbythelanguageconstructssupportinggraphnesting.
216
AdvancedControlwithBacktracking
<s>
Executestransactionally(rollbackonfailure).
<<r;;s>>
Backtracking: try y thematches ofrule runtils suc-
ceeds.
/ s /
Pause insertion: : execute e s s outside of the enclosing
transactions andsequences,i.e. . thechangesof f sare
notrolledback.
$f<r1,[r2],$[r3]>g
Triestomatchallcontainedrules,thenrewritesinde-
terministically oneoftheruleswhichmatched. . True
ifatleastonematched.
forfv in u; tg
Executet forevery vinstoragesetu. . Onet t failing
pinstheexecutionresulttofailure.
forfv->w in u; tg
Executetforeverypair(v,winstoragemapu. Onet
failingpinstheexecutionresulttofailure.
forfv:match<r> in [?r]; tg
Executetforeverymatchvfromruler.Onetfailing
pinstheexecutionresulttofailure.
forfv in func(...); sg
Execute s s for r every y node/edge in n func, , which
may benodes/edges, , or r incident/adjacent, , or r reach-
able/boundedReachable. Ones s failingpins theexe-
cutionresulttofailure.
forfv:int in [l:r]; tg
Executetforeveryvintheintegerrangestartingat
landendingatr,upwardsbyoneifl<=r,otherwise
downwards byone. . Onet t failingpinstheexecution
resulttofailure.
forfv:N in fasc.(idx>7)g; ; tg g Executet t for everyvintheindex idx,inascending
order,from7exclusiveon.Onetfailingpinstheexe-
cutionresulttofailure. asc. abbreviatesascending,
isnotvalidsyntaxassuch.
fcompg
Anunspeciedsequencecomputation(seetable17.1).
(w)=s(w)
Calls a sequence e s s handing in n w as s input t and writ-
ing its s output t to w; ; dened d e.g. . with h sequence
s(u:Node):(v:Node)f v=u g.
[var] g:graph
Declaresavariablegoftypegraph,asattributeinside
anodeoredgeclass,oraslocalvariableorparameter.
in g fsg
Executessinthegraphg.
(...)=g.r(...)
Executestherulerinthegraphg
this
Returns the e current t graph, , can be e used d like e a a con-
stantvariableinanexpression,ofthe rule language,
orthesequencecomputations. Insideamethod,this
denotestheobjectofthecontainingnodeoredge!
Let r, s, t be sequences, u, , v, , w be variable identiers, , g g be a a variable e or attribute of graph
type,<op>be2f|;^;&;||;&&g
Table18.1:Advancedsequencesandgraphnestingsupportataglance
Documents you may be interested
Documents you may be interested