softlang / megalib

A library of megamodels
6 stars 5 forks source link

Modularize checker #6

Closed rlaemmel closed 8 years ago

rlaemmel commented 8 years ago

/cc @AndrEm12 @MarcelH91 Looking at this:

https://github.com/softlang/megalib/blob/develop/checker/src/org/java/megalib/checker/services/Listener.java

This is a one-pass, monolithic implementation of all (so far) conceivable checks.

I think it should be better to separate listening and checking.

The listener basically would build the data structures.

The checker would consists of many checks that basically just look at the data structures.

In this manner, it would be easy to ignore ANTLR completely when writing checks. Also checks, would be small and it would be encouragable to add more checks. We will have more specific checks for new relations in the future.