!752 !include #1004863 // Dynamic Concepts sclass CKnownString extends Concept { S s; *() {} *(S *s) {} } sclass CUnknownString extends Concept {} sclass CUnknownCharacter extends Concept {} sclass CKnownCharacter extends Concept { char c; *() {} *(char *c) {} } sclass CharInString extends Concept { new Ref string; int index; *() {} *(Concept string, int *index) { this.string.set(string); } } sclass CUnknownInt extends Concept {} sclass CKnownInt extends Concept { BigInteger value; *() {} *(int value) { this.value = bigint(value); } } sclass CKnownEquals extends Concept { new RefL what; } sclass Question extends Concept {} sclass WhichCharacterIsIt extends Question { new Ref character; new Ref answer; *() {} *(Concept character) { this.character.set(character); } } p { CKnownString s = new CKnownString("hello world"); CharInString c = new CharInString(s, 3); WhichCharacterIsIt question = new WhichCharacterIsIt(c); tryToAnswer(question); } svoid tryToAnswer(WhichCharacterIsIt question) { // We need a rewriting engine here }