Inform(6 or 7)/TADS "Interpreter" (Non Z-Machine/GLULX)

Hi, I would like to know if anyone has experimented or begun to experiment or just have old impl they gave up on. Of non Z-Machine based interpreter for Inform/6/7/TADS/3.

Examples might be a Prolog DCG that asserts to object descriptions and room connectivity as its reading in text.
Or a perl script that does similar.

Also even a set of classes in C#/Java/UML/RDF/CycL or WHATEVER that implement the standard models that we build after data is read in.

I was going to leave out languages references in this post… Because EVERY language is a candidate for what I am looking for.

I don’t know of any.

Inform 6 is a low-level language, and it would be difficult to separate it from its low-level virtual machine. (This is why the architecture of Glulx is so much like the Z-machine – a flat array of bytes, with objects and properties coded into simple C-like byte structures.)

Inform 7 could in theory be handled in a higher-level interpreter. However, the compiler source code is not available, so this is not currently possible.

Ahh, I had only initially seen statements like this before: Easy to interpret

// from Inform_7/Inform7/Extensions/Reserved/WorldModel.i6t 
[ OnStage O set x;
	if (O ofclass K1_room) rfalse;
	if (set < 0) {
		while (metaclass(O) == Object) {
			if (O ofclass K1_room) rtrue;
			if (O ofclass K9_region) rfalse;
			if (O ofclass K4_door) rtrue;
			if (O ofclass K7_backdrop) { if (O has absent) rfalse; rtrue; }
			x = O.component_parent; if (x) { O = x; continue; }
			x = parent(O); if (x) { O = x; continue; }
			rfalse;
		}
	}
	x = OnStage(O, -1);
	if ((x) && (set == false)) RemoveFromPlay(O);
	if ((x == false) && (set)) MoveObject(O, real_location);
	rfalse;
];

Reading Inform_7/Inform7/Extensions/Reserved/MStack.i6t I am seeing that now! (and just about everything other than WorldModel.i6t is No fun to interpret !)

Yeah, the I7 would be pretty easy dispite the closed sourceness to “interpret” to a world model / prolog assertions like done in ftp://ftp.ifarchive.org/if-archive/programming/general-discussion/if-compling.ps.gz Toni.ps (Toni Arnold 1996) After the assertions are made, one still has to implement the game play loop. Example: Adventure In Prolog http://www.amzi.com/AdventureInProlog/a1start.php#Chapter1

OK, so when consumed by I7 authors using the I7-IDE is the main game loop written in I6 or in I7?

The reason I wanted I6 initially is so I could simply use “NI.EXE” Despite closed sourceness, we have access to it producing I6 right? (So I was hoping not to prevent the use of I7 in a universe that I had an I6 interpreter)

Let me know if the below is correct:

1) I7 IDE Concats  Included (C:\pf86\Inform_7\Inform7\Extensions\*.*.i7x)  user supplied i7x (MyStory/Source/story.ni) ->  StoryIncludingIncludes.i7x

2) NI.EXE  StoryIncludingIncludes.i7x   + C:\pf86\Inform_7\Inform7\Extensions\Reserved\*.i6t  ->   BigWadOfLibAndStoryGame.i6t 

Though as you stated, the BigWadOfLibAndStoryGame.i6t would be a PITA to interpret!

After reading more i6t Files … I may as well code my extension in that since I dont see any limits to the language (though I might ad to glxapi.h… to allow it to link to some jni.h (Java Native Interface functions))

Back to interpreting I7… (UserStory.ni + Graham Nelson/Standard Rules.i7x)

It is so well documented and users have an expected ways that it must work, to me, it is completely open source! But, the rain on my parade is:
sure I can let users run I7, but now I am skeptical of promising to give them a backwards compatible I6 the same time.

What are you thinking of doing?

Take a read through Appendix-B.pdf if you’re interested. NI runs through Main.i6t which at the appropriate times reads the source text and other extensions.

Appendix-B.pdf Is, a tome, and answering many of my questions about the infrastructure required to make everything happen…

What I am doing is trying a whack at making http://logicmoo.sourceforge.net/cycmoo/ allow Inform7. ( I still can, but, maybe I cant support Inform6 :frowning: )

Here is a snippet of what is on that webpage…

[code]Room building
(The comments ‘;’ are only when debug output is turned on)

[dmiles@Area1002 mud]$ assert (isa DouglasMilesOffice RoomInAConstruction)
T

[dmiles@Area1002 mud]$ teleport DouglasMilesOffice
you are now in DouglasMilesOffice

[dmiles@DouglasMilesOffice mud]$ look
Nothing apparent about douglas miles office ‘#$DouglasMilesOffice’
(!)

[dmiles@DouglasMilesOffice mud]$ new Thing as Tool Hammer.
; Asserted
; (thereExists (?X)
; (and
; (isa ?X Hammer)
; (isa ?X Tool)
; (located ?X TwistyPassage45SKFn)))
; Warning
; (genls Hammer Tool) is previously entailed
; Your new default object is ‘ToolHammer53455345SKFn’

set ColorProperty Blue
; Asserted
; (hasAttribute ToolHammer53455345SKFn ColorProperty)
; (attribute ToolHammer53455345SKFn Blue)

look
You are in a maze of Twisty passages with exits leading in all directions.
Someone or something has discarded a Blue Hammer here.

take hammer
; Retracted
; (located ToolHammer53455345SKFn TwistyPassage45SKFn)
; Asserted
; (located ToolHammer53455345SKFn Player8)
[/code]

The main game loop is the Main() routine in OrderOfPlay.i6t.

ni.exe inserts the includes as well. The above is one big step.

I have made some progress on the interpreter… bitbucket.org/logicmoo/rellor_interp/wiki/Home

Fork of Rellor @ bitbucket.org/logicmoo/rellor_i … at=default
this is an Attempt to a give Rellor an Evaluate-Only mode over it’s AST (therefore circumventing compile). while not breaking/compromising any of Jesse McGrew’s functionality or direction.
The RellorJava further does not use java bytecode… I have not seen any merit ever showing that “compiled java byte code” would run faster than my already compiled java AST… In fact, it will always run slower … Realize the AST methods heat up very quickly whereas “new bytecode” is always be colder (less likely to get jitted) by at least a factor of two!
This inform6 interpreter is designed to host multiple games at once and uses a savegame state not related to storyfile compatibility. Designed to be Ideal for MUD/MOO hosting where the authors are realtime editing their environment.

I should fore warn the code is 30% complete… . it runs helloworld.inf and passes many basic tests but is pre alpha… I am mentioning it here as a troll for contributors and not yet users