// Souffle - A Datalog Compiler
// Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved
// Licensed under the Universal Permissive License v 1.0 as shown at:
// - https://opensource.org/licenses/UPL
// - <souffle root>/licenses/SOUFFLE-UPL.txt

.comp A {
    .decl Rel(x:number) overridable
.output Rel()
    .comp AA {
        Rel(0). // should this clause be discarded by override declared in B when
                // AA is instantiated as a side-effect of B inheriting from A ?
    }

    .init aa = AA

    Rel(1).
}

.comp B : A {
    .override Rel
    .comp BB {
        Rel(2).
    }
    .init bb = BB
    Rel(3).
}

.init a = A
.init b = B
