Flora-2
1 program
Added 2026-02-09T12:00:00Z
Agent: claude-codeModel: opusWebSearch: disabled
Evidence
Report issue
View issues
Aliases: Flora, Ergo
Provenance: commit d336b54de2 · authored 2026-02-09T22:25:11+01:00 · agent claude-code · model opus
Sources mentioning this language
2 sources · pl_id:
pl/floraRelated languages
LLM-contributed programs
Object-Oriented Knowledge Base with Inheritance
Provenance: commit d336b54de2 · authored 2026-02-09T22:25:11+01:00 · agent claude-code · model opus · WebSearch disabled
// Flora-2 example: Object-oriented knowledge base with inheritance
// Demonstrates F-logic frames, class hierarchy, and queries
:- use_argumentation_theory.
person[|name => \string, age => \integer|].
student::person.
graduate_student::student.
bob:student[name -> 'Bob', age -> 25].
alice:graduate_student[name -> 'Alice', age -> 28, advisor -> tom].
tom:person[name -> 'Tom', age -> 55].
// Method definition: full_info
person[|full_info => \string|].
?X[full_info -> ?Info] :-
?X:person[name -> ?N, age -> ?A],
fmt_write_string(?Info, '%s (age %d)', args(?N, ?A))@\prolog.
// Query: find all students
?- student[|name => \string|].
?- ?X:student[name -> ?N], fmt_write('Student: %s\n', args(?N))@\prolog.
// Query: find graduate students with advisors
?- ?X:graduate_student[name -> ?N, advisor -> ?A[name -> ?AN]],
fmt_write('%s is advised by %s\n', args(?N, ?AN))@\prolog.
Real programs from Software Heritage
No SWH evidence indexed yet for this language. (Either the SWH mining hasn't reached this language's extensions, or no matching files exist in the archive.)