Program from extension

Ingence recognizes a file as a program when its extension belongs to a programming or macro language. Examples are .py, .R and ImageJ macros. If the contents say otherwise, Ingence follows the contents.

program_from_extension version 3

  • Kind of rule: What files are (classifies). Says what a file or a folder is, by placing it in a class.

  • What it concludes: a class

  • Reasoning: defeasible. A conclusion is usually right, and is retracted when a rule it names concludes against it.

  • What it reads: one file at a time

Is it available in this version?

Yes. The engine runs it.

What would defeat it

The engine withdraws what this rule concludes about something when any of these rules concludes about the same thing:

  • content_contradicts_extension: Ingence flags a file when its contents begin the way one format does and its extension names another. Containers that other formats are built on, such as PDF, HDF5 or ZIP, do not count.

This rule is named as what would defeat:

Parameters

Parameter

Shipped value

May be

What it does

senses

["python_source", "notebook_format", "shell_script", "sql_source", "python_wheel", "python_bytecode", "executable_format", "c_source", "c_header", "javascript_source", "perl_source", "r_source", "r_markdown", "java_source", "java_bytecode", "fortran_module", "matlab_source", "imagej_macro", "beanshell_script", "clojure_source", "ruby_source", "groovy_script"]

list of text

The format senses that mean a program: every one the Dictionary declares a program, scripts and macros among them, so a macro named for the movies it processes is never read as a movie. Named as senses, so a laboratory whose scripts are written in something else extends the Dictionary.

minimum_match_quality

"exact"

one of exact, case_folded, loose

How firmly the extension must have matched: it is a symbol.

slot

"extension"

one of extension, name

Where the match is read: the extension, never a word.