Wednesday, December 15, 2010

A General Application Engine

Visit the High Level Logic (HLL) Website
— Home of XPL (eXtensible Process Language)

It's like XML, but you can store source code in it.

One of the difficulties in creating a good description of HLL is that most of the good words have already been used. Consider the following.

What is High Level Logic (HLL)?

“High Level Logic” (HLL) occupies a new position in relation to other software development tools and components. What is the highest level of general support that can be given to software development is the theoretical question that drives HLL development. Over the past 25 years, concrete and practical results have developed from this unconventional approach to envisioning the next generation of software tools.

HLL is a software framework for developing a very large number of applications, linking applications and components that have already been created, facilitating relationships between people and organizations, for interacting with people and their agents, and increasing automation of pretty much anything. In short, it does what modern applications should do; and makes an entire infrastructure easier to develop and maintain.

The opening paragraph and accompanying graphic were added to a document to clarify what HLL is; putting readers on the right track right from the start. But now suddenly, there's a contradiction. The paragraph following the graphic says that "HLL is a software framework." The graphic itself places frameworks two levels down from High Level Logic. Readers can be left wondering, which is it?

To me, this is more than just an editorial problem. It's part of a general problem in developing the language that describes computer systems and software components. Another example in HLL is the use of the term "experts." My use of the term is directly related to the definition found in English language dictionaries. I clarify by calling HLL experts, "HLL experts." For those familiar with AI, the term automatically causes one to wonder whether they're the same thing as rule-based expert system components.

I believe I can use the term framework to describe HLL. I believe it fits existing definitions and uses of the term software framework. But as the graphic shows, I think there's a need to make a distinction between HLL's position on the level-of-logic chart verses the many examples of frameworks that I'm currently familiar with. Knowing that any new terminology is one more thing to explain, I still think it's worth trying to come up with a new term.

The first thing I thought of was that HLL is an application engine. It clearly fits earlier uses of the term "engine" to describe software systems that drive applications by processing application components that have been expressed as data. (Rule-processing engine, for example.)

Ther term comes rather close to Google's App Engine and PeopleSoft's Application Engine. Google's App Engine is a platform for developing and hosting web applications in Google-managed data centers. PeopleSoft's Application engine is a batch processing system using blocks of PeopleCode and SQL.

Both the Google and the PeopleSoft "engines" are much more specialized than HLL, so to make the distinction, HLL can be called a general application engine.

What do you think?


Tuesday, December 14, 2010

Millions of tires travel billions of miles (1)

Visit the High Level Logic (HLL) Website
— Home of XPL (eXtensible Process Language)

It's like XML, but you can store source code in it.

When I was young, before everything was made from synthetics, we heard stories; stories about undomesticated tires living in the woods near the highway. We had seen them ourselves resting in muddy sties and dangling like monkeys in trees.

According to legend, rubber is alive. As old cars roll down the road they deposit microscopic particles of rubber on the pavement. Each particle is a larva. At the moment of birth the tiny prototires instinctively migrate toward the shoulder of the road. They join others along the way forming thin processions that in the scale of the old west would form a wagon train a thousand miles long.

When they reach the shoulder they form small colonies. As more protos arrive they become larger clusters. When large enough, they become the clutter that motorists observe as they speed by. The last stage happens only on the night of a new moon, when the treads undergo a convulsive involution and emerge as mature tires.

The life of a wild tire is tough. Those that make it to the edge of the road and adulthood face further challenges to their survival. After midnight on the darkest nights, tire harvesters cruise the roadways and load their trucks.

There is an advantage to their isolation in the woods near the highway. It’s key to their survival. No humans live there. Most people don't go there except for the occasional moment or two of relief. That's why undomesticated tires go mostly unnoticed, why modern science hasn't written about them, and why great journalists don't comment on their social and economic plight. People notice them sometimes. But they don't really see them, if you know what I mean.

At first we took the stories for just what they seemed to be, just stories. It was entertaining to hear the theory of their birth as the parent tires of our own car rolled along the road. We thought little of it of course, like ghost stories and claptrap on UFO sightings. How strange to think that some people believe in alien visitations.

But we decided to test the theory of undomesticated tires. It was an advantage living in a small town. There were so many quite country roads not far from where we lived. Many were paved which is absolutely essential to serious tire colony hunters. When we spotted a likely spot, we could stop the car and investigate, chat for a while and enjoy the sun. That led to the first of what is now our traditional Sunday drive. Three of us, now four, scouted the highway looking for ripe clusters.

The most exciting event would take place with the new moon. We began exploring three weeks early hoping to find the best spot. John is a fisherman and lectured endlessly about the effects that temperature, instinct, and even rain might have.

We discussed the possibility of danger and then chuckled it away. "Have you ever heard of anyone being mauled by a freshly constituted clan of retreads?" I've tried to remember who said that first, but always come up thinking it was a joint effort, something that emerged from the loose clutter of jovial prattle.

After about two weeks of intensive searching and note taking, Mary declared a clear winner. Out on State Highway 14 a group of clusters had formed that reminded us of a grand community of fire ants. Surely, we thought, each hill would produce a bicycle tire. The site also had the advantage of interesting terrain. We thought about sitting on the car with sandwiches and maybe a little Lone Star beer. "A real night of it," we said.

We wanted all to go perfectly and so a week later we started the evening working down a checklist. Food - check. Beer - check. Ice - stop at the convenience store on the way. We then headed for the highway for a last check of the site before picking up our supplies. It was still early and we didn't expect anything to happen until after dark.

We headed toward State Highway 14 in the mood for a party. John and Mary began building the excitement, telling stories about what we might expect that night and exaggerating the character of our find. When we reached the highway, we met with a surprise beyond all earlier expectations. Still several miles from what had been our best site was a new colony, with black rolling hills and valleys that contained enough tread for a whole sixteen-wheeler.

Mary got all excited. She kept telling me to stop and turn around so we could inspect the mounds. She sounded frustrated with me as I continued driving, eyes fixed forward like I didn't hear her. I saw something about a hundred yards ahead. About half way Mary saw it too. Then John said, "Geeeezzowie!" There was another great mass of chips, shreds, curls and treads about twice the size of the last one.

A hundred feet ahead came a third dark rolling mass. This third colony tapered off to thin low trails meandering through isolated rubber villages, then shot up again into massive towers. Mounds of varying proportion began appearing on both sides of the road with trails between each forming a continuous chain of bustling cities.

We drove on, dazed. The mass on the right side of the road faded again continuing in a smooth thin trail, not ending until it climbed to a gargantuan metropolis where the anthills of our chosen site once stood. The new moon would appear that night. Like the shores of ancient China, Greece, and Egypt, the edge of the road had become the birthplace of a great civilization.

We were numb and silent as we rolled down the highway in the car. What this meant and how it had come to be in such a short period of time was boggling my imagination. I needed to collect my thoughts.

John broke the silence. "It's midsummer's eve."

In Texas, people have long since forgotten the ancient celebrations of the seasons, having found no reason to celebrate midsummer especially. It's warm most of the year, when it's not hot. Better to rouse a sleepy air-conditioned bar or relax in the shade with an ice-cold glass of tea than to embrace the weather with any ritual.

"Frogs …" John choked. Mary and I looked for frogs on the highway but saw none. We looked at John and then at each other. He knew about midsummer's eve because of his knowledge of fishing and frogs. That didn't matter, or so we thought.

We looked back at John again. He was leaning forward with his hands over his face. Mary and I began rethinking our plan. We decided to park the car and hide in the woods behind one of the communities, somewhere we wouldn’t be detected. We decided to stick to the old plan when it came to sandwiches and beer, except for the ice. We’d have to start out with cold ones after dark.

A spot on the hillside beneath the great metropolis seemed right for our purposes. We could sneak in over the thin trail of rubber huts nearby and drop quickly into cover. So that was the plan. John never said another word, except once. He was staring down at his shoes, red-faced, shaking his head and pulling his hair. “Frogs,” he said. And then again, “Frogs.”

As we saw the last orange glow of sunset we assembled the sandwiches and beer and made our way across, hauling John along by his hand.

At home, Mary's mother looked out of the kitchen window and began to wonder. She had a special sense when it came to her children and she sensed something now. She knew it was best not to worry. She continued to gaze through the window into the back yard where Mary used to play and gazed deeper into her sixth sense. Something was going to happen.

Mary and I scouted the area stealthily, communicating in whispers and hand signals. The plateau held a small group of trees to rest our backs against as we sat and waited through the night. There were bushes hiding us but we could see around them when we wanted to. Mary pointed up the hill and snickered, “The Great Mounds of Roador.” We lost control and chuckled a bit too loudly, then both sounded “sshhh!” and broke up chuckling again. It helped ease the tension.

The location secured, base camp established, we turned our attention to the sandwiches and Lone Star beer. John was sitting quietly in a clump of bushes, staring intently in the wrong direction, down the gentlest part of the slope toward a large nearby pond.

Mary and I took our duties very seriously at first, somehow imagining that we knew what they were. We tested our skills as sentinels, sneaking a peak and darting back to cover again. The moon was bright and the sky clear. We began mapping the features of the metropolis for later comparison, only twice pointing out shadows and correcting ourselves.

Late into the second beer, I sat back and relaxed a bit and shook my head while pealing the label from the bottle. “The Great Mounds of Roador,” I mused. Mary smiled back, encouraging the light chatter.

I pitched my voice higher and became a little sing-songy. “Road decor, in the great tradition of Marshall McLuhan,” I said.

The snickers were quieter now. Mary responded faking a low voice. “Road memorabilia.”

We were on a roll and I fired back with my best imitation of Johnny Carson. “Interstate ennui.”

A question shot across Mary’s face. I shrugged my shoulders. She downed another big gulp of beer.

Sounding more philosophical she asked, “if there's rubber on the road, did the blown tire make a sound?”

By then I felt forced to go on. “Is a tire only the afterburn of the wheel?”

With that, we each took another Lone Star, tipped them in quick salute, and drank. Each swallow took us deeper into the philosophical ramifications of rubber. Around our fourth bottle (each), we were convinced that the situation was of enormous importance to the future of humanity. It was on that account that we began to formulate a daring plan.


All the characters in this story are fictional, and any resemblance to actual persons living or dead is purely coincidental.

All rights reserved.
Copyright © 2000-2010 Roger F. Gay.

No part of this story may be reproduced or transmitted in any form or by any means, electronic or mechanical, including photocopying, recording, or by any information storage and retrieval system, without permission in writing from the author.

HLL on Linux

Visit the High Level Logic (HLL) Website
— Home of XPL (eXtensible Process Language)

It's like XML, but you can store source code in it.

The day has come. I've been developing in Windows for a long time; never seeming to get around to installing Linux on something for testing. After a disk drive on a laptop pooped out, the difficulties of getting Windows back pushed me over the edge. Ubuntu was simple to install, but since I haven't been on a Unix system for many (many, many) years, and this is my first experience with Linux, some of the rest ... well - let's just say an experienced Linux guru would have been posting this a couple of weeks ago. (Not like I dedicated 24/7 to this task though.)

Ubuntu comes with some kind of Open Java, so I eventually figured out how to uninstall that and installed Sun Java. Then I installed Apache Tomcat just in case. I haven't tried to run that yet, so I haven't tested the optional HLL browser built as part of the robot demo.

Quite frankly, I don't even know how to create a script file in Linux yet, so I typed in the java command to run HLL by hand rather than converting my Windows batch files. But sure enough, write once run anywhere - the "Hello World!" demo works. No recompile necessary.

Saturday, December 11, 2010

Java Needs an Opt-Out of Static Typing

Visit the High Level Logic (HLL) Website
— Home of XPL (eXtensible Process Language)

It's like XML, but you can store source code in it.

I've, step-by-step, been explaining the history and character of the high level logic problem and the solution being developed in the HLL Open-Source Project. More than once, I've mentioned the enormous advantages of modern computer languages over what was available twenty-five years ago when the first few of my brain-cells became stimulated by the question. For more than one reason, I've selected Java for the implementation language. (One that I'll note is that it's currently the most popular application language on the planet, matching the intent that HLL should be a production tool, rather than an interesting curiosity.)

One great issue remains, however. Java is a statically-typed language. Why is that a problem, you might ask if you haven't yet seen it as a problem yourself? Let me take an example. I have mentioned JBoss Rules (also known as Drools) quite often in my articles. In The Ghosts in My Machine: Chapter 2 I mentioned how it overcame a critical problem in the ancient art of rule-processing.
Popular rule-based expert system tools had been built as stand-alone products to support only rule-processing, and could not be integrated with other programs and were not extensible with other programs. The JBoss rule processing system mentioned in chapter 1 deals with this problem directly. The rule-processing software is built in Java, carrying with it the characteristics of the underlying language. A rule-process can be initiated from another program and program objects can be referenced directly in rules. This allows programmers much greater flexibility to fashion their own hard-coded relationships between rules and other components in each application.
In HLL, I am about to create a similar openness in the configuration system, and that will be carried over into a simple rule-processing and planning system directly supported by the HLL core (with the option to use a more sophisticated systems such as JBoss Rules). Application developers will be able to specify their own components in XML files that the HLL processor will handle generically.

In the prototype, developers could add their own components to the core – which is very much like saying they can add whatever they want by changing the core source code. (Well, du-uh!) Because I want to maintain the concept of the core, a next sort of “bottom-uppish” evolutionary step is to predefine another package specifically for application components (that may in turn initiate other systems that HLL doesn't know about). The HLL core processing components that deal with configurable application components will have all members of the predefined “application package” imported by using a wild card (import nu.isr.hll.light.application.*;). Application developers will be able to put initiator components in the application package, and the HLL core will process them in whatever way is described in (XML) configuration files.

One HLL unit can also contact another HLL unit with a request to have one of its application components executed, with results returned. But I dream other dreams. I would like to build dynamic HLL applications that can process components that were not defined at compile-time. I'd even like to be able to fetch objects from somewhere out in the WWW that a particular HLL unit has never heard of and run them locally. What I'd like is a LoadUndefinedClass class with methods for calling methods and accessing public fields.

And really, I can almost do this with generics. I can almost build the LoadUndefinedClass class using reflection. Almost isn't good enough, of course. No matter what trick I play on the compiler, the run-time engine is going to throw an error if there's no predefined class for it to refer to.

So, what's stopping us from getting a LoadUndefinedClass class? Purity of the language? Fear that Java programmers might write programs that don't work? Come-on!!!

UPDATE (Sept. 6, 2011) InvokeDynamic class : New JDK 7 Feature: Support for Dynamically Typed Languages in the Java Virtual Machine