-# todo: sort arrays on construction?
-class Labelling
-    constructor: (@in=[], @out=[], @undec=[]) ->
-        # todo: check that @in, @out and @undec are disjoint
-
-    # returns true if labelling is the same as this
-    equals: (labelling) ->
-        arrtest = (arr1, arr2) ->
-            arr1.length is arr2.length and arr1[idx] is val for val, idx in arr2 
-        arrtest(@in.sort(), labelling.in.sort()) and 
-            arrtest(@out.sort(), labelling.out.sort()) and 
-            arrtest(@undec.sort(), labelling.undec.sort())
-
-    # returns complement of all labelling args and passed array of args
-    complement: (args) ->
-        return complement @undec, complement @out, complement @in, args
-
-    # returns copy of this labelling
-    clone: () ->
-        # note that .slice(0) creates shallow clone of array
-        return new Labelling(@in.slice(0),@out.slice(0),@undec.slice(0))
-
 class ArgumentFramework
     # defeatermap: object that maps argument ids to arrays of defeating argument ids
     constructor: (@defeatermap={}) ->

            return false unless ok
        return true

# abstract class to be extended by particular reasoners
class Reasoner
    constructor: (@af) ->

    # 2. at least one defeater of an "out" argument is labelled "in"
    # 3. at least one defeater of an "undec" argument is also labelled "undec" and no defeaters of an "undec" argument are labelled "in"
    isLegalLabelling: (labelling) ->
        # check that label spans this AF
        return false unless labelling.complement(@argids).length is 0
        for arg in labelling.in
            for defeater in @defeatermap[arg]
                return false unless defeater in labelling.out
