Skip to content

Creating test cases seems to loop forever when grammar doesn't use fields (by accident) #14

@inariksit

Description

@inariksit

Writing this down, on the off chance that I/someone would some day work on gftest again.

I was splitting a CN into two fields, like this

-- old
lincat CN = {s : Str} ;
lin AdvCN adv cn = {s = cn.s ++ adv.s} ;

-- new
lincat CN = {s, postmod : Str} ;
lin AdvCN adv cn = cn ** {postmod = cn.postmod ++ adv.s} ;

Then I had a bunch of functions that used the CN, like this

lin UseCNSomeWay cn stuff = stuff ** {s = stuff.s ++ cn.s} ;

But now that CN had two fields, whatever is in the postmod field never got propagated further. When I ran gftest on this grammar, it seemed to loop forever trying to make test cases. When I fixed my error, i.e. did like this

lin UseCNSomeWay cn stuff = stuff ** {s = stuff.s ++ cn.s ++ cn.postmod} ;

gftest was generating test cases again.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions