Check-in [223107a48f]

Not logged in

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fixed a bug in the translation of Uppercase atoms from Prolog.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | bc-subst
Files: files | file ages | folders
SHA1:223107a48f5b5d41649b39f8e5458effe79046e9
User & Date: andy 2015-04-21 15:45:44
Context
2015-04-21
15:46
Added support for showing rule names in derivations. check-in: a989ccc9e5 user: andy tags: bc-subst
15:45
Fixed a bug in the translation of Uppercase atoms from Prolog. check-in: 223107a48f user: andy tags: bc-subst
2015-04-20
20:58
Updated checker module to work with the new atomic goal expansions. check-in: 4e6407ce10 user: andy tags: bc-subst
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to src/terms.js.

292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
            var body = j['args'].map(terms.fromJSON);

            return new terms.Compound(head,body);
        }
        else if(j === "_")
            // This might actually be any variable at all
            return new terms.PVar("_");
        else if(typeof j === "string" && j.match(/[_A-Z].*/))
            // Starts with upper-case: encode as PVar.
            return new terms.PVar(j);
        else if(typeof j === "string" && j.startsWith(" "))
            return new terms.Variable(j.trimLeft());
        else 
            // Everything else: atoms, numbers, etc. becomes an atom.
            return new terms.Atom(j + "");
    }
}







|

|







292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
            var body = j['args'].map(terms.fromJSON);

            return new terms.Compound(head,body);
        }
        else if(j === "_")
            // This might actually be any variable at all
            return new terms.PVar("_");
        //else if(typeof j === "string" && j.match(/[_A-Z].*/))
            // Starts with upper-case: encode as PVar.
        //    return new terms.PVar(j);
        else if(typeof j === "string" && j.startsWith(" "))
            return new terms.Variable(j.trimLeft());
        else 
            // Everything else: atoms, numbers, etc. becomes an atom.
            return new terms.Atom(j + "");
    }
}