CategoricalData / CQL

Categorical Query Language IDE
http://categoricaldata.net
299 stars 22 forks source link

Naming Improvements #40

Open tehprofessor opened 4 years ago

tehprofessor commented 4 years ago

Howdy!

A lot of the examples use single letter variables, e.x.

instance I = literal : S {
    generators 
        a b c : Employee
        m s : Department
    equations 
        first(a) = Al
        first(b) = Bob  last(b) = Bo
        first(c) = Carl 
        name(m)  = Math name(s) = CS
        age(a) = age(c) 
        manager(a) = a manager(b) = c manager(c) = c
        worksIn(a) = m worksIn(b) = s worksIn(c) = s
        secretary(s) = c secretary(m) = a 
        secretary(worksIn(a)) = manager(a)
        worksIn(a) = worksIn(manager(a))
        age(a) = "1" 
        age(b) = "5"
    options
        prover_simplify_max = 64    
}

I have no idea what a, b, and c are in this context. It would be nice for at least me, as a learner, to have longer more descriptive names even if they seem redundant or silly at the expert level.

Another example, I have no idea what Ty is supposed to be, is it just a Type or is it some other abstraction?

I'm super happy to help with this I just don't quite know what they should be myself (I'm real new to category theory) or I'd make a PR with some suggestions...

wisnesky commented 4 years ago

In this particular case, the short variable names (eg a b c) are meaningful, in the sense that they are the first letter of the corresponding person (eg Alice Bob Carl) or department. Ty of course is a typeside, as described in the tutorial: https://www.categoricaldata.net/tutorial.html . It would be great if you're willing to help write additional tutorials; additional learning material written from the perspective of a new user would be quite helpful.