-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2100 & 2132 - command line completion issues #2135
Conversation
If you restrict the depth to 1, the result is the same for the CASL logic (the one in the example), but not in general. For example, you have different results for
|
I agree with @mcodescu. Please implement a cycle check. I suggest not to use the
If that does not suffice, use Dijkstra's algorithm. |
Cycling through the same logic can be useful, e.g. consider codings from CASL to CASL. Hence, I suggest to equip comorphisms with weights, such that e.g. CASL2CoCASL gets a high weight because it is not part of a path towards a tool-supported logic, and use Dijkstra's algorithm |
Here my proposal for comorphism weights: weight 5 weight 4 weight 3 weight 2 weight 1 |
Looks good. I was wondering if you have a reason to give |
good point. Have changed their weight to 2. |
@mcodescu , need your review after checks passed. Notes about the code:
I comment out traces but I would keep them for some time, while the issue is not resolved. |
Seems like it worth to play with parameters to find optimal configuration. Some output produced by me:
Last variant with |
I'm not sure. I think we might want to apply several transformations to a CASL theory that encode various features without changing the logic, so 2 might be too small. @tillmo what do you think? |
@mcodescu , PR is ready for review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍
Related to #2100 and #2132.
getAllConsCheckers
function inProofs.AbstractState
to remove duplicates among cons checkers.saveConsCheckersInState
function inCMDL.Interface
to check valid binaries for cons checkers on start up incmdRunShell
and save them inCmdlState
.nubWith
fromCommon.Utils
now tail-recursive.findComorphismPaths
inLogic.Grothendieck
changed slightly (n > 2
ton > 0
at line 893) without changing main algo. It affects performance and doesn't affect completion output.What
findComorphismPaths
does is building tree ofAnyComorphism
(Comorphism
as root andComorphism(CompComorphism ...)
in other nodes to be precise). This function doesn't produce any cycle but it grows very quick. Each branch of a tree contains composition of comorphisms and we never repeat previously used comorphism within a branch. But initial pool of comorphisms we use for building new composition isMap.elems $ comorphisms lg
at line 890 which lenght is 71. So our tree grows in width pretty fast and on depth 4 we have 1724 nodes, 11669 nodes on depth 5, 71022 on depth 6 and so on. This is major problem here but if I restrict the depth of the tree to one level after the root (e.g.node > 0
) then performance is OK and result is the same.